From 660873ef8d5139ee92efa05f11d3424abc2647f0 Mon Sep 17 00:00:00 2001 From: Lenny Goodell Date: Wed, 9 Nov 2022 08:08:32 -0700 Subject: [PATCH] feat: Update device service example for Levski (#139) * feat: Update device service example for Levski Signed-off-by: Leonard Goodell build: Update HELM Chart to Levski released images (#140) Signed-off-by: Leonard Goodell Signed-off-by: Leonard Goodell feat: added support for shared and non-shared volumes Close #92 Signed-off-by: Kyle Morton fix: EdgeX UI in kubernetes was not binding container network IF Signed-off-by: Bryon Nevis feat: Added support for onvif and usb camera Closes #107 Signed-off-by: Kyle Morton feat: Added support for modbus-simulator Signed-off-by: Kyle Morton feat: Add support in helm for ds-mqtt and mqtt-broker Signed-off-by: Kyle Morton feat: Add support in helm for ds-modbus Signed-off-by: Kyle Morton feat: Add support in helm for ds-bacnet Signed-off-by: Kyle Morton feat: Add support in helm for ds-snmp Signed-off-by: Kyle Morton feat: Add support in helm for ds-rfid-llrp Signed-off-by: Kyle Morton feat: Add support in helm for ds-gpio Signed-off-by: Kyle Morton feat: Add support in helm for asc-mqtt and asc-httpexport Signed-off-by: Kyle Morton feat: Add support in helm for asc-sample, asc-metrics, and as-llrp Signed-off-by: Kyle Morton fix: Updated device-onvif-camera and device-usb-camera directory and volume (#156) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton fix: added service for edgex-ui (#162) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton feat: Added support for nats (#163) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton fix: Updated health checks to appropriate protocol (#164) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton fix: added kuiper-connections and kuipers-sources volumes (#165) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton fix: Correct addConsulRoles list (#166) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton feat: Support optional hostPort binding (#167) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton feat: Expose services on a per-service basis (#169) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton fix: Added container port names (#170) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton feat!: Remove system-mgmt-agent (deprecated) (#175) BREAKING CHANGE: Remove system-mgmt-agent (deprectated) Signed-off-by: Bryon Nevis Signed-off-by: Bryon Nevis docs: add link to camera app example video Signed-off-by: Anthony Casagrande feat: Add Helm security scanners (#174) Signed-off-by: Bryon Nevis Signed-off-by: Bryon Nevis fix: remove duplicated path from query uri (#182) Signed-off-by: Anthony Casagrande fix: Modify pan tilt function by getting pan/tilt range dynamically (#181) * fix: Get pan/tilt values dynamically Signed-off-by: preethi-satishcandra feat: support for usb cameras and onvif zoom functionality in camera mgmt app (#184) Signed-off-by: Anthony Casagrande Signed-off-by: Christian Darr Signed-off-by: Brian Osburn Co-authored-by: Brian Osburn Co-authored-by: Christian Darr feat: updated app service with target type Signed-off-by: brianointel feat: added code for pipeline function Signed-off-by: brianointel feat: template code for funtion pipelines by topic Signed-off-by: brianointel feat: added initial event handler Signed-off-by: brianointel feat: more device messagebus progress Signed-off-by: brianointel feat: message bus code Signed-off-by: Brian Osburn feat: messagebus progress Signed-off-by: Brian Osburn feat: created defaultpipelinefunction Signed-off-by: Brian Osburn feat: try to start pipelines on startup Signed-off-by: brianointel feat: small changes Signed-off-by: Brian Osburn feat: pr updates Signed-off-by: Brian Osburn feat: added config params Signed-off-by: Brian Osburn feat: pr updates Signed-off-by: Brian Osburn feat: pr updates Signed-off-by: Brian Osburn feat: pr updates Signed-off-by: Brian Osburn feat: handle device delete event to stop pipeline Signed-off-by: brianointel also some minor refactoring Signed-off-by: Anthony Casagrande fix: pr updates Signed-off-by: Brian Osburn refactor: fix imports from merge Signed-off-by: Anthony Casagrande feat: pr updates Signed-off-by: Brian Osburn fix: updated funtion name Signed-off-by: Brian Osburn feat: Add Helm security scanners (#174) Signed-off-by: Bryon Nevis Signed-off-by: Bryon Nevis fix: remove duplicated path from query uri (#182) Signed-off-by: Anthony Casagrande fix: Modify pan tilt function by getting pan/tilt range dynamically (#181) * fix: Get pan/tilt values dynamically Signed-off-by: preethi-satishcandra feat: support for usb cameras and onvif zoom functionality in camera mgmt app (#184) Signed-off-by: Anthony Casagrande Signed-off-by: Christian Darr Signed-off-by: Brian Osburn Co-authored-by: Brian Osburn Co-authored-by: Christian Darr feat: updated app service with target type Signed-off-by: brianointel feat: added code for pipeline function Signed-off-by: brianointel feat: template code for funtion pipelines by topic Signed-off-by: brianointel feat: added initial event handler Signed-off-by: brianointel feat: more device messagebus progress Signed-off-by: brianointel feat: message bus code Signed-off-by: Brian Osburn feat: messagebus progress Signed-off-by: Brian Osburn feat: created defaultpipelinefunction Signed-off-by: Brian Osburn feat: try to start pipelines on startup Signed-off-by: Brian Osburn feat: small changes Signed-off-by: Brian Osburn feat: pr updates Signed-off-by: Brian Osburn feat: added config params Signed-off-by: Brian Osburn feat: pr updates Signed-off-by: Brian Osburn feat: pr updates Signed-off-by: Brian Osburn feat: pr updates Signed-off-by: Brian Osburn feat: handle device delete event to stop pipeline also some minor refactoring Signed-off-by: Anthony Casagrande fix: pr updates Signed-off-by: Brian Osburn refactor: fix imports from merge Signed-off-by: Anthony Casagrande feat: pr updates Signed-off-by: Brian Osburn fix: updated funtion name Signed-off-by: Brian Osburn fix: corrected error message placement Signed-off-by: brianointel --- .../custom/camera-management/Dockerfile | 4 +- .../custom/camera-management/README.md | 213 ++++++-- .../custom/camera-management/appcamera/app.go | 35 +- .../camera-management/appcamera/commands.go | 229 ++++++--- .../camera-management/appcamera/config.go | 13 +- .../camera-management/appcamera/evam.go | 254 ++++++++-- .../camera-management/appcamera/routes.go | 132 ++++- .../camera-management/appcamera/types.go | 239 ++++----- .../camera-management/appcamera/util.go | 74 ++- .../edge-video-analytics/Makefile | 8 +- .../edge-video-analytics/config.json | 4 + .../edge-video-analytics/docker-compose.yml | 18 +- .../models.list.extra.yml | 4 + .../custom/camera-management/main.go | 6 +- .../camera-management/res/configuration.toml | 42 +- .../camera-management/web-ui/dist/index.html | 2 +- .../web-ui/dist/main.137de25ed3b58748.js | 1 + .../web-ui/dist/main.6e157b4d187e4c5d.js | 1 - .../all-pipelines.component.html | 6 +- .../camera-selector.component.html | 84 ++-- .../camera-selector.component.ts | 38 +- .../web-ui/src/app/ptz/ptz.component.html | 18 +- .../web-ui/src/app/ptz/ptz.component.ts | 13 +- .../src/app/services/camera-api.service.ts | 85 +++- .../src/app/services/camera-api.types.ts | 39 +- .../web-ui/src/app/services/data.service.ts | 41 +- .../src/app/services/pipeline-api.types.ts | 51 +- deployment/helm/Makefile | 26 +- deployment/helm/README.md | 1 - .../configmaps/as-common-configmap.yaml | 10 + .../configmaps/device-common-configmap.yaml | 8 + .../{ => configmaps}/edgex-configmap.yaml | 4 +- ...-app-external-mqtt-trigger-deployment.yaml | 118 +++++ ...gex-app-external-mqtt-trigger-service.yaml | 17 + .../edgex-app-http-export-deployment.yaml | 115 +++++ .../edgex-app-http-export-service.yaml | 18 + ...edgex-app-metrics-influxdb-deployment.yaml | 108 ++++ .../edgex-app-metrics-influxdb-service.yaml | 17 + .../edgex-app-mqtt-export-deployment.yaml | 120 +++++ .../edgex-app-mqtt-export-service.yaml | 17 + ...ex-app-rfid-llrp-inventory-deployment.yaml | 111 +++++ ...edgex-app-rfid-llrp-inventory-service.yaml | 17 + .../edgex-app-sample-deployment.yaml | 108 ++++ .../edgex-app-sample-service.yaml | 17 + .../edgex-app-rules-engine-deployment.yaml | 38 +- .../edgex-app-rules-engine-service.yaml | 4 +- .../edgex-consul/edgex-consul-deployment.yaml | 7 +- .../edgex-consul/edgex-consul-service.yaml | 4 +- .../edgex-core-command-deployment.yaml | 17 +- .../edgex-core-command-service.yaml | 4 +- .../edgex-core-data-deployment.yaml | 19 +- .../edgex-core-data-service.yaml | 4 +- .../edgex-device-bacnet-deployment.yaml | 101 ++++ .../edgex-device-bacnet-service.yaml | 18 + .../edgex-device-gpio-deployment.yaml | 103 ++++ .../edgex-device-gpio-service.yaml | 18 + .../edgex-device-modbus-deployment.yaml | 101 ++++ .../edgex-device-modbus-service.yaml | 18 + .../edgex-device-mqtt-deployment.yaml | 103 ++++ .../edgex-device-mqtt-service.yaml | 18 + .../edgex-device-onvif-camera-deployment.yaml | 106 ++++ .../edgex-device-onvif-camera-service.yaml | 18 + .../edgex-device-rest-deployment.yaml | 13 +- .../edgex-device-rest-service.yaml | 4 +- .../edgex-device-rfid-llrp-deployment.yaml | 101 ++++ .../edgex-device-rfid-llrp-service.yaml | 18 + .../edgex-device-snmp-deployment.yaml} | 67 ++- .../edgex-device-snmp-service.yaml | 18 + .../edgex-device-usb-camera-deployment.yaml | 106 ++++ .../edgex-device-usb-camera-service.yaml | 18 + .../edgex-device-virtual-deployment.yaml | 13 +- .../edgex-device-virtual-service.yaml | 4 +- .../edgex-ekuiper-deployment.yaml | 33 +- .../edgex-ekuiper/edgex-ekuiper-service.yaml | 4 +- .../edgex-core-metadata-deployment.yaml | 19 +- .../edgex-core-metadata-service.yaml | 4 +- .../edgex-modbus-simulator-deployment.yaml | 62 +++ .../edgex-modbus-simulator-service.yaml | 18 + .../edgex-mqtt-broker-deployment.yaml | 66 +++ .../edgex-mqtt-broker-service.yaml | 18 + .../edgex-nats-server-deployment.yaml | 62 +++ .../edgex-nats-server-service.yaml | 18 + deployment/helm/templates/edgex-pv.yaml | 154 +++++- deployment/helm/templates/edgex-pvc.yaml | 184 ++++++- .../edgex-redis/edgex-redis-deployment.yaml | 3 +- .../edgex-redis/edgex-redis-service.yaml | 6 +- ...dgex-security-bootstrapper-deployment.yaml | 8 + .../edgex-security-bootstrapper-service.yaml | 4 +- ...security-secretstore-setup-deployment.yaml | 15 +- ...ex-security-secretstore-setup-service.yaml | 2 +- ...dgex-support-notifications-deployment.yaml | 19 +- .../edgex-support-notifications-service.yaml | 4 +- .../edgex-support-scheduler-deployment.yaml | 19 +- .../edgex-support-scheduler-service.yaml | 4 +- .../edgex-sys-mgmt-agent-ingress.yaml | 34 -- .../edgex-sys-mgmt-agent-service.yaml | 17 - .../edgex-ui/edgex-ui-deployment.yaml | 5 + .../templates/edgex-ui/edgex-ui-service.yaml | 17 + .../edgex-vault/edgex-vault-deployment.yaml | 13 +- .../edgex-vault/edgex-vault-service.yaml | 4 +- deployment/helm/values.yaml | 359 ++++++++++++-- device-services/device-random/.gitignore | 1 - device-services/device-random/Dockerfile | 8 +- device-services/device-random/Makefile | 4 +- device-services/device-random/README.md | 1 - .../device-random/cmd/res/configuration.toml | 46 +- device-services/device-random/go.mod | 70 ++- device-services/device-random/go.sum | 460 ++++++++++++++++++ 108 files changed, 4638 insertions(+), 676 deletions(-) create mode 100644 application-services/custom/camera-management/edge-video-analytics/config.json create mode 100644 application-services/custom/camera-management/edge-video-analytics/models.list.extra.yml create mode 100644 application-services/custom/camera-management/web-ui/dist/main.137de25ed3b58748.js delete mode 100644 application-services/custom/camera-management/web-ui/dist/main.6e157b4d187e4c5d.js create mode 100644 deployment/helm/templates/configmaps/as-common-configmap.yaml create mode 100644 deployment/helm/templates/configmaps/device-common-configmap.yaml rename deployment/helm/templates/{ => configmaps}/edgex-configmap.yaml (96%) create mode 100644 deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml create mode 100644 deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-service.yaml create mode 100644 deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-service.yaml create mode 100644 deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-service.yaml create mode 100644 deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-service.yaml create mode 100644 deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-sample/edgex-app-sample-service.yaml create mode 100644 deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml create mode 100644 deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-service.yaml create mode 100644 deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml create mode 100644 deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-service.yaml create mode 100644 deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml create mode 100644 deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-service.yaml create mode 100644 deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml create mode 100644 deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-service.yaml create mode 100644 deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml create mode 100644 deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-service.yaml create mode 100644 deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml create mode 100644 deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-service.yaml rename deployment/helm/templates/{edgex-system/edgex-sys-mgmt-agent-deployment.yaml => edgex-device-snmp/edgex-device-snmp-deployment.yaml} (50%) create mode 100644 deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-service.yaml create mode 100644 deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml create mode 100644 deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-service.yaml create mode 100644 deployment/helm/templates/edgex-modbus-simulator/edgex-modbus-simulator-deployment.yaml create mode 100644 deployment/helm/templates/edgex-modbus-simulator/edgex-modbus-simulator-service.yaml create mode 100644 deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-deployment.yaml create mode 100644 deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-service.yaml create mode 100644 deployment/helm/templates/edgex-nats-server/edgex-nats-server-deployment.yaml create mode 100644 deployment/helm/templates/edgex-nats-server/edgex-nats-server-service.yaml delete mode 100644 deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-ingress.yaml delete mode 100644 deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-service.yaml create mode 100644 deployment/helm/templates/edgex-ui/edgex-ui-service.yaml create mode 100644 device-services/device-random/go.sum diff --git a/application-services/custom/camera-management/Dockerfile b/application-services/custom/camera-management/Dockerfile index 417118bf..ab74906d 100644 --- a/application-services/custom/camera-management/Dockerfile +++ b/application-services/custom/camera-management/Dockerfile @@ -15,7 +15,7 @@ # #build stage -ARG BASE=golang:1.17-alpine3.15 +ARG BASE=golang:1.18-alpine3.16 FROM ${BASE} AS builder ARG ALPINE_PKG_BASE="make git gcc libc-dev libsodium-dev zeromq-dev" @@ -37,7 +37,7 @@ ARG MAKE="make build-app" RUN $MAKE #final stage -FROM alpine:3.15 +FROM alpine:3.16 LABEL license='SPDX-License-Identifier: Apache-2.0' \ copyright='Copyright (c) 2022: Intel' LABEL Name=app-camera-management Version=${VERSION} diff --git a/application-services/custom/camera-management/README.md b/application-services/custom/camera-management/README.md index 9b695134..f9c8c3a5 100644 --- a/application-services/custom/camera-management/README.md +++ b/application-services/custom/camera-management/README.md @@ -1,18 +1,128 @@ # Camera Management Example App Service -Camera management example Edgex application service to auto discover and connect to nearby ONVIF based cameras, -control cameras via commands, create inference pipelines for the camera video streams and publish inference -results to MQTT broker. +Use the Camera Management Example application service to auto discover and connect to nearby ONVIF and USB based cameras. This application will also control cameras via commands, create inference pipelines for the camera video streams and publish inference results to MQTT broker. -This app uses [EdgeX Core Services][edgex-core-services], [Edgex Onvif device service][device-onvif-camera] and [Edge Video Analytics Microservice][evam]. +This app uses [EdgeX compose][edgex-compose], [Edgex Onvif Camera device service][device-onvif-camera], [Edgex USB Camera device service][device-usb-camera] and [Edge Video Analytics Microservice][evam]. + +A brief video demonstration of building and using the example app service can be found [here](https://www.youtube.com/watch?v=vZqd3j2Zn2Y). + +## Install Dependencies + +### Environment +This example has been tested with a relatively modern Linux environment - Ubuntu 20.04 and later + +### Install Docker +Install Docker from the official repository as documented on the [Docker](https://docs.docker.com/engine/install/ubuntu/) site. + +### Configure Docker +To enable running Docker commands without the preface of sudo, add the user to the Docker group. + +> **Warning** +> The docker group grants root-level privileges to the user. For details on how this impacts security in your system, +> see [Docker Daemon Attack Surface](https://docs.docker.com/engine/security/#docker-daemon-attack-surface). + +1. Create Docker group: + ```bash + sudo groupadd docker + ``` + > **Note:** If the group already exists, `groupadd` outputs a message: **groupadd: group `docker` already exists**. This is OK. + +2. Add User to group: + ```bash + sudo usermod -aG docker $USER + ``` + +3. Restart your computer for the changes to take effect. + +### Verify Docker +To verify the Docker installation, run `hello-world`: + +```bash +docker run hello-world +``` +A **Hello from Docker!** greeting indicates successful installation. + +```bash +Unable to find image 'hello-world:latest' locally +latest: Pulling from library/hello-world +2db29710123e: Pull complete +Digest: sha256:10d7d58d5ebd2a652f4d93fdd86da8f265f5318c6a73cc5b6a9798ff6d2b2e67 +Status: Downloaded newer image for hello-world:latest + +Hello from Docker! +This message shows that your installation appears to be working correctly. +... +``` + +### Install Docker Compose +Install Docker Compose from the official repository as documented on the [Docker Compose](https://docs.docker.com/compose/install/linux/#install-using-the-repository) site. + +### Install Golang +Install Golang from the official [Golang](https://go.dev/doc/install) website. + +### Install Tools +Install build tools: + +```bash +sudo apt install build-essential +``` ## Steps for running this example: -We expect you'll be running in a relatively modern Linux environment -with `docker`, `docker-compose`, and `make` installed. -1. Get the [EdgeX Core Services][edgex-core-services] and Edgex device ONVIF service running by referring to docs from - [Edgex Onvif device service][device-onvif-camera]. -2. Get [Edge Video Analytics Microservice][evam] running for inference. +### 1. Start the EdgeX Core Services and Device Services. + +1. Clone `edgex-compose` from github.com. + ```shell + git clone https://github.com/edgexfoundry/edgex-compose.git + ``` + +2. Navigate to the `edgex-compose` directory: + + ```bash + cd edgex-compose + ``` + +3. Checkout the latest compatible release branch + > **Note:** The `levski` branch is the latest stable branch at the time of this writing. + ```shell + git checkout levski + ``` + +4. Navigate to the `compose-builder` subdirectory: + + ```bash + cd compose-builder/ + ``` + +5. (Optional) Update the `add-device-usb-camera.yml` file: + > **Note:** This step is only required if you plan on using USB cameras. + + a. Add the rtsp server hostname environment variable to the `device-usb-camera` service, + where `your-local-ip-address` is the ip address of the machine running the `device-usb-camera` service. + ```yml + services: + device-usb-camera: + environment: + DRIVER_RTSPSERVERHOSTNAME: "your-local-ip-address" + ``` + + b. Under the `ports` section, find the entry for port 8554 and change the host_ip from `127.0.0.1` to either `0.0.0.0` or the ip address you put in the previous step. + +6. Run the following `make` command to run the edgex core services along with the Onvif and Usb device services. + + > **Note:** The `ds-onvif-camera` parameter can be omitted if no Onvif cameras are present, or the `ds-usb-camera` parameter can be omitted if no usb cameras are present. +```shell + make run no-secty ds-onvif-camera ds-usb-camera +``` + + +### 2. Start [Edge Video Analytics Microservice][evam] running for inference. + +> **Note:** The port for EVAM result streams has been changed from 8554 to 8555 to avoid conflicts with the device-usb-camera service. + ```shell +# Go back to the root of this example app +cd edgex-examples/application-services/custom/camera-management + # Run this once to download edge-video-analytics into the edge-video-analytics sub-folder, # download models, and patch pipelines make install-edge-video-analytics @@ -20,54 +130,89 @@ make install-edge-video-analytics # Run the EVAM services (in another terminal) make run-edge-video-analytics # ... -# Leave this running. If needed to stop -make stop-edge-video-analytics +# Leave this running ``` -3. Configure Camera Credentials - Option 1: Modify the `configuration.toml` file +> **Note:** If you press `Ctrl-C` it will stop the EVAM services. If you then run `make stop-edge-video-analytics`, +> it will also remove the containers and free up the port mappings. + +### 3. Build and run the example application service + +#### 3.1 (Optional) Configure Onvif Camera Credentials. + > **Note:** This step is only required if you have Onvif cameras. Currently, this example app is limited to supporting + > only 1 username/password combination for all Onvif cameras. + + Option 1: Modify the [res/configuration.toml](res/configuration.toml) file + ```toml [Writable.InsecureSecrets.CameraCredentials] path = "CameraCredentials" [Writable.InsecureSecrets.CameraCredentials.Secrets] - username = "" - password = "" + username = "" + password = "" ``` - + Option 2: Export environment variable overrides ```shell - export WRITABLE_INSECURESECRETS_CAMERACREDENTIALS_SECRETS_USERNAME= - export WRITABLE_INSECURESECRETS_CAMERACREDENTIALS_SECRETS_PASSWORD= + export WRITABLE_INSECURESECRETS_CAMERACREDENTIALS_SECRETS_USERNAME="" + export WRITABLE_INSECURESECRETS_CAMERACREDENTIALS_SECRETS_PASSWORD="" + ``` + +#### 3.2 Configure Default Pipeline + +Modify the [res/configuration.toml](res/configuration.toml) file with the name and version of the default pipeline to use when a new device is added to the system. + + ```toml +[AppCustom] +DefaultPipelineName = "object_detection" # Name of the default pipeline used when a new device is added to the system +DefaultPipelineVersion = "person" # Version of the default pipeline used when a new device is added to the system ``` -4. Build and run the example application service. Web UI is used to view cameras, select models - and start inference pipelines for camera video streams and also view inference results streams. +#### 3.3 Build and run +```shell +# First make sure you are at the root of this example app +cd edgex-examples/application-services/custom/camera-management +``` + ```shell # Build the app. make build-app # Run the app. make run-app -# ... -# Open your browser to http://localhost:59750 -# ... -# Ctrl-C to stop it ``` -### Development and Testing of UI +Open your browser to [http://localhost:59750](http://localhost:59750) to view the Web-UI. +The Web UI can be used to: +- List USB and Onvif cameras +- Control PTZ cameras +- Select inference models and start inference pipelines +- View inference results from MQTT + +### Additional Development + +> **Note:** The following steps are only useful for developers who wish to make modifications to the code +> and the Web-UI. + +#### Development and Testing of UI +##### 1. Build the production web-ui +This builds the web ui into the `web-ui/dist` folder, which is what is served by the app service on port 59750. ```shell -# Build the production web-ui into the web-ui/dist folder -# This is what is served by the app service on port 59750 make web-ui +``` -# Serve the Web-UI in hot-reload mode on port 4200 +##### 2. Serve the Web-UI in hot-reload mode +This will serve the web ui in hot reload mode on port 4200 which will recompile and update anytime you make changes to a file. It is useful for +rapidly testing changes to the UI. +```shell make serve-ui -# ... -# Open your browser to http://localhost:4200 -# ... -# Ctrl-C to stop it ``` -[edgex-core-services]: https://github.com/edgexfoundry/edgex-go -[device-onvif-camera]: https://github.com/edgexfoundry-holding/device-onvif-camera +Open your browser to [http://localhost:4200](http://localhost:4200) + + + +[edgex-compose]: https://github.com/edgexfoundry/edgex-compose +[device-onvif-camera]: https://github.com/edgexfoundry/device-onvif-camera +[device-usb-camera]: https://github.com/edgexfoundry/device-usb-camera [evam]: https://www.intel.com/content/www/us/en/developer/articles/technical/video-analytics-service.html diff --git a/application-services/custom/camera-management/appcamera/app.go b/application-services/custom/camera-management/appcamera/app.go index 248a3c73..a51967d2 100644 --- a/application-services/custom/camera-management/appcamera/app.go +++ b/application-services/custom/camera-management/appcamera/app.go @@ -1,16 +1,17 @@ // -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 package appcamera import ( + "net/http" + "sync" + "github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces" "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" "github.com/pkg/errors" - "net/http" - "sync" ) type CameraManagementApp struct { @@ -19,6 +20,8 @@ type CameraManagementApp struct { config *ServiceConfig pipelinesMap map[string]PipelineInfo pipelinesMutex sync.RWMutex + ptzRangeMap map[string]PTZRange + ptzRangeMutex sync.RWMutex fileServer http.Handler } @@ -28,6 +31,7 @@ func NewCameraManagementApp(service interfaces.ApplicationService) *CameraManage lc: service.LoggingClient(), config: &ServiceConfig{}, pipelinesMap: make(map[string]PipelineInfo), + ptzRangeMap: make(map[string]PTZRange), } } @@ -40,7 +44,30 @@ func (app *CameraManagementApp) Run() error { return err } - if err := app.service.MakeItRun(); err != nil { + // Subscribe to events. + err := app.service.SetDefaultFunctionsPipeline( + app.processEdgeXDeviceSystemEvent) + if err != nil { + return errors.Wrap(err, "failed to set default pipeline to processEdgeXEvent") + } + + if err = app.queryAllPipelineStatuses(); err != nil { + // do not exit, just log + app.lc.Errorf("Unable to query EVAM pipeline statuses. Is EVAM running? %s", err.Error()) + } + + devices, err := app.getAllDevices() + if err != nil { + app.lc.Errorf("no devices found: %s", err.Error()) + } else { + for _, device := range devices { + if err = app.startDefaultPipeline(device); err != nil { + app.lc.Errorf("Error starting default pipeline for %s, %v", device.Name, err) + } + } + } + + if err = app.service.MakeItRun(); err != nil { return errors.Wrap(err, "failed to run pipeline") } diff --git a/application-services/custom/camera-management/appcamera/commands.go b/application-services/custom/camera-management/appcamera/commands.go index 962cffaf..4b990453 100644 --- a/application-services/custom/camera-management/appcamera/commands.go +++ b/application-services/custom/camera-management/appcamera/commands.go @@ -1,5 +1,5 @@ // -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 @@ -7,7 +7,10 @@ package appcamera import ( "context" - "encoding/json" + "fmt" + + "github.com/IOTechSystems/onvif/device" + "github.com/IOTechSystems/onvif/media" "github.com/IOTechSystems/onvif/ptz" "github.com/IOTechSystems/onvif/xsd/onvif" "github.com/edgexfoundry/go-mod-core-contracts/v2/dtos" @@ -16,57 +19,44 @@ import ( ) const ( - relativeMoveCommand = "RelativeMove" - gotoPresetCommand = "GotoPreset" - streamUriCommand = "StreamUri" - profilesCommand = "Profiles" - getPresetsCommand = "GetPresets" - - moveScaleX = 10 - moveScaleY = 5 - zoomScale = 1 + relativeMoveCommand = "RelativeMove" + gotoPresetCommand = "GotoPreset" + streamUriCommand = "StreamUri" + profilesCommand = "Profiles" + getPresetsCommand = "GetPresets" + getCapabilitiesCommand = "Capabilities" + getConfigurationsCommand = "GetConfigurations" + startStreamingCommand = "StartStreaming" + stopStreamingCommand = "StopStreaming" + usbStreamUriCommand = "StreamURI" + usbStreamingStatusCommand = "StreamingStatus" + usbImageFormatsCommand = "ImageFormats" ) -func (app *CameraManagementApp) getProfiles(deviceName string) (ProfilesResponse, error) { - profiles, err := app.issueGetCommand(context.Background(), deviceName, profilesCommand, struct{}{}) - if err != nil { - return ProfilesResponse{}, errors.Wrapf(err, "failed to issue get Profiles command") - } - - val := profiles.Event.Readings[0].ObjectValue - js, err := json.Marshal(val) +func (app *CameraManagementApp) getImageFormats(deviceName string) (interface{}, error) { + resp, err := app.issueGetCommand(context.Background(), deviceName, usbImageFormatsCommand) if err != nil { - return ProfilesResponse{}, errors.Wrapf(err, "failed to marshal profiles json object") + return nil, errors.Wrapf(err, "failed to issue get ImageFormats command") } - pr := ProfilesResponse{} - err = json.Unmarshal(js, &pr) - return pr, err + return resp.Event.Readings[0].ObjectValue, nil } -func (app *CameraManagementApp) queryStreamUri(deviceName, profileToken string) (string, error) { - req := StreamUriRequest{ProfileToken: profileToken} - cmdResponse, err := app.issueGetCommand(context.Background(), deviceName, streamUriCommand, req) - if err != nil { - return "", errors.Wrapf(err, "failed to issue get StreamUri command") - } - streamUri, errUri := parseStreamUri(cmdResponse) - if errUri != nil { - return "", errors.Wrapf(errUri, "failed to get stream Uri from the device %s", deviceName) - } - - return streamUri, nil +func (app *CameraManagementApp) getProfiles(deviceName string) (media.GetProfilesResponse, error) { + resp := media.GetProfilesResponse{} + err := app.issueGetCommandForResponse(context.Background(), deviceName, profilesCommand, &resp) + return resp, err } func (app *CameraManagementApp) doPTZ(deviceName, profileToken string, x, y, zoom float64) (dtosCommon.BaseResponse, error) { trans := ptz.Vector{ PanTilt: &onvif.Vector2D{ - X: x * moveScaleX, - Y: y * moveScaleY, + X: x, + Y: y, }, } if zoom != 0 { trans.Zoom = &onvif.Vector1D{ - X: zoom * zoomScale, + X: zoom, } } @@ -77,24 +67,108 @@ func (app *CameraManagementApp) doPTZ(deviceName, profileToken string, x, y, zoo return app.sendPutCommand(deviceName, relativeMoveCommand, cmd) } -func (app *CameraManagementApp) getPresets(deviceName string, profileToken string) (GetPresetsResponse, error) { - cmd := &ptz.GetPresets{ - ProfileToken: onvif.ReferenceToken(profileToken), +func (app *CameraManagementApp) getCameraFeatures(deviceName string) (CameraFeatures, error) { + var err error + features := CameraFeatures{} + dev, err := app.getDeviceByName(deviceName) + if err != nil { + return CameraFeatures{}, err } - presets, err := app.issueGetCommand(context.Background(), deviceName, getPresetsCommand, cmd) - if err != nil { - return GetPresetsResponse{}, errors.Wrapf(err, "failed to issue get presets command") + switch dev.ServiceName { + case app.config.AppCustom.OnvifDeviceServiceName: + features.CameraType = Onvif + caps, err := app.getCapabilities(deviceName) + if err != nil { + return CameraFeatures{}, errors.Wrapf(err, "unable to get device capabilities") + } + if caps.Capabilities.PTZ.XAddr != "" { + features.PTZ = true + + if ptzConfigs, err := app.getPTZConfiguration(deviceName); err != nil { + app.lc.Errorf("Error calling Get PTZ Configuration for device %s: %s", deviceName, err.Error()) + } else { + features.Zoom = ptzConfigs.PTZConfiguration[0].ZoomLimits != nil + } + } + case app.config.AppCustom.USBDeviceServiceName: + features.CameraType = USB + default: + features.CameraType = Unknown } - val := presets.Event.Readings[0].ObjectValue - js, err := json.Marshal(val) + return features, nil +} + +func (app *CameraManagementApp) getCapabilities(deviceName string) (device.GetCapabilitiesResponse, error) { + cmd := &device.GetCapabilities{ + Category: onvif.CapabilityCategory("All"), + } + + resp := device.GetCapabilitiesResponse{} + err := app.issueGetCommandWithJsonForResponse(context.Background(), deviceName, getCapabilitiesCommand, cmd, &resp) + return resp, err +} + +func (app *CameraManagementApp) getPresets(deviceName string, profileToken string) (ptz.GetPresetsResponse, error) { +func (app *CameraManagementApp) getCameraFeatures(deviceName string) (CameraFeatures, error) { + var err error + features := CameraFeatures{} + dev, err := app.getDeviceByName(deviceName) if err != nil { - return GetPresetsResponse{}, errors.Wrapf(err, "failed to marshal presets json object") + return CameraFeatures{}, err + } + + switch dev.ServiceName { + case app.config.AppCustom.OnvifDeviceServiceName: + features.CameraType = Onvif + caps, err := app.getCapabilities(deviceName) + if err != nil { + return CameraFeatures{}, errors.Wrapf(err, "unable to get device capabilities") + } + if caps.Capabilities.PTZ.XAddr != "" { + features.PTZ = true + + if ptzConfigs, err := app.getPTZConfiguration(deviceName); err != nil { + app.lc.Errorf("Error calling Get PTZ Configuration for device %s: %s", deviceName, err.Error()) + } else { + features.Zoom = ptzConfigs.PTZConfiguration[0].ZoomLimits != nil + } + } + case app.config.AppCustom.USBDeviceServiceName: + features.CameraType = USB + default: + features.CameraType = Unknown } - pr := GetPresetsResponse{} - err = json.Unmarshal(js, &pr) - return pr, err + + return features, nil +} + +func (app *CameraManagementApp) getCapabilities(deviceName string) (device.GetCapabilitiesResponse, error) { + cmd := &device.GetCapabilities{ + Category: onvif.CapabilityCategory("All"), + } + + resp := device.GetCapabilitiesResponse{} + err := app.issueGetCommandWithJsonForResponse(context.Background(), deviceName, getCapabilitiesCommand, cmd, &resp) + return resp, err +} +func (app *CameraManagementApp) getPresets(deviceName string, profileToken string) (ptz.GetPresetsResponse, error) { + cmd := &ptz.GetPresets{ + ProfileToken: onvif.ReferenceToken(profileToken), + } + + resp := ptz.GetPresetsResponse{} + err := app.issueGetCommandWithJsonForResponse(context.Background(), deviceName, getPresetsCommand, cmd, &resp) + return resp, err +} + +func (app *CameraManagementApp) getPTZConfiguration(deviceName string) (ptz.GetConfigurationsResponse, error) { + cmd := &ptz.GetConfigurations{} + + resp := ptz.GetConfigurationsResponse{} + err := app.issueGetCommandWithJsonForResponse(context.Background(), deviceName, getConfigurationsCommand, cmd, &resp) + return resp, err } func (app *CameraManagementApp) gotoPreset(deviceName string, profile string, preset string) (dtosCommon.BaseResponse, error) { @@ -106,6 +180,31 @@ func (app *CameraManagementApp) gotoPreset(deviceName string, profile string, pr return app.sendPutCommand(deviceName, gotoPresetCommand, cmd) } +func (app *CameraManagementApp) isStreaming(deviceName string) (bool, error) { + resp := StreamingStatusResponse{} + err := app.issueGetCommandForResponse(context.Background(), deviceName, usbStreamingStatusCommand, &resp) + if err != nil { + return false, err + } + return resp.IsStreaming, nil +} + +func (app *CameraManagementApp) startStreaming(deviceName string, req USBStartStreamingRequest) (dtosCommon.BaseResponse, error) { + isStreaming, err := app.isStreaming(deviceName) + if err == nil && isStreaming { + // skip if already streaming + return dtosCommon.BaseResponse{}, nil + } + if err != nil { + app.lc.Errorf(err.Error()) + } + return app.sendPutCommand(deviceName, startStreamingCommand, req) +} + +func (app *CameraManagementApp) stopStreaming(deviceName string) (dtosCommon.BaseResponse, error) { + return app.sendPutCommand(deviceName, stopStreamingCommand, true) +} + func (app *CameraManagementApp) sendPutCommand(deviceName string, commandName string, commandValue interface{}) (dtosCommon.BaseResponse, error) { app.lc.Infof("Sending PUT command: %s, %+v", commandName, commandValue) return app.service.CommandClient().IssueSetCommandByNameWithObject(context.Background(), deviceName, commandName, @@ -115,21 +214,31 @@ func (app *CameraManagementApp) sendPutCommand(deviceName string, commandName st }) } -func (app *CameraManagementApp) getDevices() ([]dtos.Device, error) { - response, err := app.service.DeviceClient().DevicesByServiceName(context.Background(), app.config.AppCustom.DeviceServiceName, 0, -1) - if err != nil { - return nil, errors.Wrapf(err, "failed to get devices for the device service %s", app.config.AppCustom.DeviceServiceName) - } - if len(response.Devices) <= 0 { - return nil, errors.Errorf("no devices registered yet for the device service %s", app.config.AppCustom.DeviceServiceName) +func (app *CameraManagementApp) getAllDevices() ([]dtos.Device, error) { + onvifResponse, err1 := app.service.DeviceClient().DevicesByServiceName(context.Background(), app.config.AppCustom.OnvifDeviceServiceName, 0, -1) + usbResponse, err2 := app.service.DeviceClient().DevicesByServiceName(context.Background(), app.config.AppCustom.USBDeviceServiceName, 0, -1) + + // if both failed, throw an error + if err1 != nil && err2 != nil { + return nil, fmt.Errorf("failed to get devices for the device services: %v, %v", err1, err2) } - // filter out the control-plane device var devices []dtos.Device - for _, d := range response.Devices { - if d.Name != d.ServiceName { + if err1 == nil { + // if the first one succeeded, just overwrite the slice + devices = onvifResponse.Devices + } + if err2 == nil { + // if the second one succeeded, append all items + for _, d := range usbResponse.Devices { devices = append(devices, d) } } + + if len(devices) <= 0 { + return nil, errors.Errorf("no devices registered yet for the device services %s or %s", + app.config.AppCustom.OnvifDeviceServiceName, app.config.AppCustom.USBDeviceServiceName) + } + return devices, nil } diff --git a/application-services/custom/camera-management/appcamera/config.go b/application-services/custom/camera-management/appcamera/config.go index ae353320..b55add59 100644 --- a/application-services/custom/camera-management/appcamera/config.go +++ b/application-services/custom/camera-management/appcamera/config.go @@ -1,5 +1,5 @@ // -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 @@ -7,10 +7,13 @@ package appcamera // CustomConfig holds the values for the app configuration type CustomConfig struct { - DeviceServiceName string - EvamBaseUrl string - MqttAddress string - MqttTopic string + OnvifDeviceServiceName string + USBDeviceServiceName string + EvamBaseUrl string + MqttAddress string + MqttTopic string + DefaultPipelineName string + DefaultPipelineVersion string } // ServiceConfig a struct that wraps CustomConfig which holds the values for driver configuration diff --git a/application-services/custom/camera-management/appcamera/evam.go b/application-services/custom/camera-management/appcamera/evam.go index 332bc648..971e2e6a 100644 --- a/application-services/custom/camera-management/appcamera/evam.go +++ b/application-services/custom/camera-management/appcamera/evam.go @@ -1,5 +1,5 @@ // -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 @@ -9,9 +9,21 @@ import ( "context" "encoding/json" "fmt" - "github.com/pkg/errors" "net/url" "path" + + "github.com/edgexfoundry/go-mod-core-contracts/v2/common" + + "github.com/IOTechSystems/onvif/media" + "github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces" + "github.com/edgexfoundry/go-mod-core-contracts/v2/dtos" + "github.com/pkg/errors" +) + +const ( + Aborted = "ABORTED" + + evamRtspPort = 8555 ) // Note: DLStreamer Pipeline Server / EVAM APIs can be viewed here: @@ -26,8 +38,6 @@ type PipelineInfo struct { // Version is the second part of the pipeline's full name. In the case of 'object_detection/person_vehicle_bike' // the version is 'person_vehicle_bike' Version string `json:"version,omitempty"` - // Profile is the ProfileToken for the specific stream - Profile string `json:"profile,omitempty"` } type PipelineInfoStatus struct { @@ -36,15 +46,6 @@ type PipelineInfoStatus struct { Status interface{} `json:"status"` } -func (info PipelineInfo) getPipelineUrl(evamBaseUrl string) (string, error) { - uri, err := url.Parse(evamBaseUrl) - if err != nil { - return "", err - } - uri.Path = path.Join(uri.Path, "pipelines", info.Name, info.Version, info.Id) - return uri.String(), nil -} - func (app *CameraManagementApp) addPipelineInfo(camera string, info PipelineInfo) error { app.pipelinesMutex.Lock() defer app.pipelinesMutex.Unlock() @@ -52,15 +53,13 @@ func (app *CameraManagementApp) addPipelineInfo(camera string, info PipelineInfo app.pipelinesMap[camera] = info return nil } - return errors.Errorf("Pipeline already running for device %v", camera) + return errors.Errorf("pipeline already running for device %v", camera) } func (app *CameraManagementApp) deletePipelineInfo(camera string) { app.pipelinesMutex.Lock() defer app.pipelinesMutex.Unlock() - if _, exists := app.pipelinesMap[camera]; exists { - delete(app.pipelinesMap, camera) - } + delete(app.pipelinesMap, camera) } func (app *CameraManagementApp) isPipelineRunning(camera string) bool { @@ -78,22 +77,56 @@ func (app *CameraManagementApp) getPipelineInfo(camera string) (PipelineInfo, bo return val, found } -func (app *CameraManagementApp) startPipeline(deviceName, profileToken, pipelineName, pipelineVersion string) error { - streamUri, err := app.queryStreamUri(deviceName, profileToken) +func (app *CameraManagementApp) queryStreamUri(deviceName string, sr StartPipelineRequest) (string, error) { + if sr.USB != nil { + return app.getUSBStreamUri(deviceName) + } else if sr.Onvif != nil { + return app.getOnvifStreamUri(deviceName, sr.Onvif.ProfileToken) + } + return "", errors.New("missing required stream configuration") +} + +func (app *CameraManagementApp) getOnvifStreamUri(deviceName string, profileToken string) (string, error) { + req := StreamUriRequest{ProfileToken: profileToken} + resp := media.GetStreamUriResponse{} + err := app.issueGetCommandWithJsonForResponse(context.Background(), deviceName, streamUriCommand, req, &resp) + if err != nil { + return "", err + } + return string(resp.MediaUri.Uri), nil +} + +func (app *CameraManagementApp) getUSBStreamUri(deviceName string) (string, error) { + cmdResponse, err := app.issueGetCommand(context.Background(), deviceName, usbStreamUriCommand) + if err != nil { + return "", errors.Wrapf(err, "failed to issue get StreamUri command") + } + return cmdResponse.Event.Readings[0].Value, nil +} + +func (app *CameraManagementApp) startPipeline(deviceName string, sr StartPipelineRequest) error { + streamUri, err := app.queryStreamUri(deviceName, sr) if err != nil { return err } app.lc.Infof("Received stream uri for the device %s: %s", deviceName, streamUri) + // if device is usb camera, start streaming first + if sr.USB != nil { + _, err := app.startStreaming(deviceName, *sr.USB) + if err != nil { + return errors.Wrapf(err, "failed to start streaming usb camera %s", deviceName) + } + } + body, err := app.createPipelineRequestBody(streamUri, deviceName) if err != nil { return errors.Wrapf(err, "failed to create DLStreamer pipeline request body") } info := PipelineInfo{ - Name: pipelineName, - Version: pipelineVersion, - Profile: profileToken, + Name: sr.PipelineName, + Version: sr.PipelineVersion, } var res interface{} baseUrl, err := url.Parse(app.config.AppCustom.EvamBaseUrl) @@ -103,7 +136,14 @@ func (app *CameraManagementApp) startPipeline(deviceName, profileToken, pipeline reqPath := path.Join("pipelines", info.Name, info.Version) if err = issuePostRequest(context.Background(), &res, baseUrl.String(), reqPath, body); err != nil { - return errors.Wrap(err, "POST request to start EVAM pipeline failed") + err = errors.Wrap(err, "POST request to start EVAM pipeline failed") + // if we started the streaming on usb camera, we need to stop it + if sr.USB != nil { + if _, err2 := app.stopStreaming(deviceName); err2 != nil { + err = errors.Wrapf(err, "failed to stop streaming usb camera %s", deviceName) + } + } + return err } info.Id = fmt.Sprintf("%v", res) @@ -112,24 +152,22 @@ func (app *CameraManagementApp) startPipeline(deviceName, profileToken, pipeline } app.lc.Infof("Successfully started EVAM pipeline for the device %s", deviceName) - app.lc.Infof("View inference results at 'rtsp://:8554/%s'", deviceName) + app.lc.Infof("View inference results at 'rtsp://:%d/%s'", evamRtspPort, deviceName) return nil } -func (app *CameraManagementApp) stopPipeline(deviceName string) error { +func (app *CameraManagementApp) stopPipeline(deviceName string, id string) error { var res interface{} - if info, found := app.getPipelineInfo(deviceName); found { - pipelineUrl, err := info.getPipelineUrl(app.config.AppCustom.EvamBaseUrl) - if err != nil { - return err - } - if err := issueDeleteRequest(context.Background(), &res, pipelineUrl, ""); err != nil { - return errors.Wrap(err, "DELETE request to stop EVAM pipeline failed") - } + if err := issueDeleteRequest(context.Background(), &res, app.config.AppCustom.EvamBaseUrl, path.Join("pipelines", id)); err != nil { + return errors.Wrap(err, "DELETE request to stop EVAM pipeline failed") + } + app.lc.Infof("Successfully stopped EVAM pipeline for the device %s", deviceName) + + if info, found := app.getPipelineInfo(deviceName); found && info.Id == id { + // only delete pipeline if it matches the id app.deletePipelineInfo(deviceName) - app.lc.Infof("Successfully stopped EVAM pipeline for the device %s", deviceName) } return nil @@ -176,12 +214,8 @@ func (app *CameraManagementApp) createPipelineRequestBody(streamUri string, devi func (app *CameraManagementApp) getPipelineStatus(deviceName string) (interface{}, error) { if info, found := app.getPipelineInfo(deviceName); found { var res interface{} - pipelineUrl, err := info.getPipelineUrl(app.config.AppCustom.EvamBaseUrl) - if err != nil { - return nil, err - } - if err := issueGetRequest(context.Background(), &res, pipelineUrl, "status"); err != nil { - return nil, errors.Wrap(err, "GET request to query EVAM pipeline failed") + if err := issueGetRequest(context.Background(), &res, app.config.AppCustom.EvamBaseUrl, path.Join("pipelines", "status", info.Id)); err != nil { + return nil, errors.Wrap(err, "GET request to query EVAM pipeline status failed") } return res, nil } @@ -189,6 +223,140 @@ func (app *CameraManagementApp) getPipelineStatus(deviceName string) (interface{ return nil, nil } +// processEdgeXDeviceSystemEvent is the function that is called when an EdgeX Device System Event is received +func (app *CameraManagementApp) processEdgeXDeviceSystemEvent(_ interfaces.AppFunctionContext, data interface{}) (bool, interface{}) { + if data == nil { + app.lc.Errorf("processEdgeXEvent: was called without any data") + return false, fmt.Errorf("processEdgeXEvent: was called without any data") + } + + systemEvent, ok := data.(dtos.SystemEvent) + if !ok { + app.lc.Errorf("type received is not a SystemEvent") + return false, fmt.Errorf("type received %T is not a SystemEvent", data) + } + + app.lc.Debugf("Received system event: %v", systemEvent) + + if systemEvent.Type != common.DeviceSystemEventType { + app.lc.Error("System event type is not " + common.DeviceSystemEventType) + return false, fmt.Errorf("system event type is not " + common.DeviceSystemEventType) + } + + device := dtos.Device{} + err := systemEvent.DecodeDetails(&device) + if err != nil { + app.lc.Errorf("failed to decode device details: %v", err) + return false, fmt.Errorf("failed to decode device details: %v", err) + } + + switch systemEvent.Action { + case common.DeviceSystemEventActionAdd: + if err = app.startDefaultPipeline(device); err != nil { + return false, err + } + case common.DeviceSystemEventActionDelete: + // stop any running pipelines for the deleted device + if info, found := app.getPipelineInfo(device.Name); found { + if err = app.stopPipeline(device.Name, info.Id); err != nil { + return false, fmt.Errorf("error stopping pipleline for device %s, %v", device.Name, err) + } + } + default: + app.lc.Debugf("System event action %s is not handled", systemEvent.Action) + } + + return false, nil +} + +func (app *CameraManagementApp) startDefaultPipeline(device dtos.Device) error { + pipelineRunning := app.isPipelineRunning(device.Name) + + if pipelineRunning { + app.lc.Debugf("pipeline is already running for device %s", device.Name) + return nil + } else { + app.lc.Debugf("pipeline is not running for device %s", device.Name) + } + + if app.config.AppCustom.DefaultPipelineName == "" || app.config.AppCustom.DefaultPipelineVersion == "" { + app.lc.Warnf("no default pipeline name/version specified, skip starting pipeline for device %s", device.Name) + return nil + } + + startPipelineRequest := StartPipelineRequest{ + PipelineName: app.config.AppCustom.DefaultPipelineName, + PipelineVersion: app.config.AppCustom.DefaultPipelineVersion, + } + + protocol, ok := device.Protocols["Onvif"] + if ok { + app.lc.Debugf("Onvif protocol information found for device: %s message: %v", device.Name, protocol) + profileResponse, err := app.getProfiles(device.Name) + if err != nil { + app.lc.Errorf("failed to get profiles for device %s, message: %v", device.Name, err) + return err + } + + app.lc.Debugf("Onvif profile information found for device: %s message: %v", device.Name, profileResponse) + startPipelineRequest.Onvif = &OnvifPipelineConfig{ + ProfileToken: string(profileResponse.Profiles[0].Token), + } + } else if _, ok := device.Protocols["USB"]; ok { + app.lc.Debugf("Usb protocol found for device: %s", device.Name) + startPipelineRequest.USB = &USBStartStreamingRequest{} + } + + app.lc.Debugf("Starting default pipeline for device %s", device.Name) + if err := app.startPipeline(device.Name, startPipelineRequest); err != nil { + app.lc.Errorf("Pipeline failed to start for device %s, message: %v", device.Name, err) + return err + } + + return nil +} + +// queryAllPipelineStatuses queries EVAM for all pipeline statuses, attempts to link them to devices, and then +// insert them into the pipeline map. +func (app *CameraManagementApp) queryAllPipelineStatuses() error { + var statuses []PipelineStatus + if err := issueGetRequest(context.Background(), &statuses, app.config.AppCustom.EvamBaseUrl, path.Join("pipelines", "status")); err != nil { + return errors.Wrap(err, "GET request to query EVAM pipeline statuses failed") + } + + for _, status := range statuses { + if status.State == Aborted { + continue // ignore stopped pipelines + } + + var resp PipelineInformationResponse + if err := issueGetRequest(context.Background(), &resp, app.config.AppCustom.EvamBaseUrl, path.Join("pipelines", status.Id)); err != nil { + app.lc.Errorf("GET request to query EVAM pipeline %s info failed: %s", status.Id, err.Error()) + continue + } + + // assume the destination streaming path is the camera name, because that is how it is when we created the pipeline instance + deviceName := resp.Request.Destination.Frame.Path + // ensure the device actually exists + if _, err := app.getDeviceByName(deviceName); err != nil { + app.lc.Warnf("Unable to determine device name from EVAM pipeline %s: %s", status.Id, err.Error()) + continue + } + + info := PipelineInfo{ + Id: resp.Id, + Name: resp.Request.Pipeline.Name, + Version: resp.Request.Pipeline.Version, + } + app.deletePipelineInfo(deviceName) // delete the info in case it already exists + // add pipeline info to map to ensure we track it + if err := app.addPipelineInfo(deviceName, info); err != nil { + app.lc.Errorf("Error adding pipeline info to map: %s", err.Error()) + } + } + return nil +} + func (app *CameraManagementApp) getAllPipelineStatuses() (map[string]PipelineInfoStatus, error) { response := make(map[string]PipelineInfoStatus) // pre-create the response object using a read lock to minimize the time we hold the lock @@ -203,11 +371,7 @@ func (app *CameraManagementApp) getAllPipelineStatuses() (map[string]PipelineInf // loop through the partially filled response map to fill in the missing data. we do not need to hold the lock here. for camera, data := range response { - pipelineUrl, err := data.Info.getPipelineUrl(app.config.AppCustom.EvamBaseUrl) - if err != nil { - return nil, err - } - if err = issueGetRequest(context.Background(), &data.Status, pipelineUrl, "status"); err != nil { + if err := issueGetRequest(context.Background(), &data.Status, app.config.AppCustom.EvamBaseUrl, path.Join("pipelines", "status", data.Info.Id)); err != nil { return nil, errors.Wrap(err, "GET request to query EVAM pipeline failed") } // overwrite the changed result in the map diff --git a/application-services/custom/camera-management/appcamera/routes.go b/application-services/custom/camera-management/appcamera/routes.go index 376dd10e..3438ed6e 100644 --- a/application-services/custom/camera-management/appcamera/routes.go +++ b/application-services/custom/camera-management/appcamera/routes.go @@ -1,5 +1,5 @@ // -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 @@ -7,38 +7,39 @@ package appcamera import ( "fmt" - dtosCommon "github.com/edgexfoundry/go-mod-core-contracts/v2/dtos/common" - "github.com/gorilla/mux" "net/http" "path" + dtosCommon "github.com/edgexfoundry/go-mod-core-contracts/v2/dtos/common" + "github.com/gorilla/mux" + "github.com/edgexfoundry/go-mod-core-contracts/v2/common" "github.com/pkg/errors" ) const ( - left = -1 - right = 1 - up = 1 - down = -1 - zoomIn = 1 - zoomOut = -1 + panTiltOffset = 0.05 + zoomOffset = 0.1 webUIDistDir = "./web-ui/dist" getCamerasPath = common.ApiBase + "/cameras" cameraApiBase = getCamerasPath + "/{name}" - getProfilesPath = cameraApiBase + "/profiles" - cameraProfileApiBase = getProfilesPath + "/{profile}" - getPipelinesPath = common.ApiBase + "/pipelines" allPipelineStatusesPath = getPipelinesPath + "/status/all" startPipelinePath = cameraApiBase + "/pipeline/start" - stopPipelinePath = cameraApiBase + "/pipeline/stop" + stopPipelinePath = cameraApiBase + "/pipeline/stop/{id}" pipelineStatusPath = cameraApiBase + "/pipeline/status" + imageFormatsPath = cameraApiBase + "/imageformats" + + getProfilesPath = cameraApiBase + "/profiles" + cameraProfileApiBase = getProfilesPath + "/{profile}" + + featuresPath = cameraApiBase + "/features" + ptzPath = cameraProfileApiBase + "/ptz/{action}" getPresetsPath = cameraProfileApiBase + "/presets" gotoPresetPath = cameraProfileApiBase + "/presets/{preset}" @@ -91,6 +92,16 @@ func (app *CameraManagementApp) addRoutes() error { return err } + if err := app.addRoute( + featuresPath, http.MethodGet, app.getCameraFeaturesRoute); err != nil { + return err + } + + if err := app.addRoute( + imageFormatsPath, http.MethodGet, app.getImageFormatsRoute); err != nil { + return err + } + app.fileServer = http.FileServer(http.Dir(webUIDistDir)) // this is a bit of a hack to get refreshing working, as the path is /home if err := app.addRoute("/home", http.MethodGet, app.index); err != nil { @@ -120,6 +131,20 @@ func (app *CameraManagementApp) serveWebUI(w http.ResponseWriter, req *http.Requ app.fileServer.ServeHTTP(w, req) } +func (app *CameraManagementApp) getCameraFeaturesRoute(w http.ResponseWriter, req *http.Request) { + rv := mux.Vars(req) + deviceName := rv["name"] + + features, err := app.getCameraFeatures(deviceName) + if err != nil { + respondError(app.lc, w, http.StatusInternalServerError, + fmt.Sprintf("Failed to get camera features: %v", err)) + return + } + + respondJson(app.lc, w, features) +} + func (app *CameraManagementApp) getPresetsRoute(w http.ResponseWriter, req *http.Request) { rv := mux.Vars(req) deviceName := rv["name"] @@ -135,6 +160,20 @@ func (app *CameraManagementApp) getPresetsRoute(w http.ResponseWriter, req *http respondJson(app.lc, w, presets) } +func (app *CameraManagementApp) getImageFormatsRoute(w http.ResponseWriter, req *http.Request) { + rv := mux.Vars(req) + deviceName := rv["name"] + + formats, err := app.getImageFormats(deviceName) + if err != nil { + respondError(app.lc, w, http.StatusInternalServerError, + fmt.Sprintf("Failed to get image formats: %v", err)) + return + } + + respondJson(app.lc, w, formats) +} + func (app *CameraManagementApp) getProfilesRoute(w http.ResponseWriter, req *http.Request) { rv := mux.Vars(req) deviceName := rv["name"] @@ -150,7 +189,7 @@ func (app *CameraManagementApp) getProfilesRoute(w http.ResponseWriter, req *htt } func (app *CameraManagementApp) getCamerasRoute(w http.ResponseWriter, _ *http.Request) { - devices, err := app.getDevices() + devices, err := app.getAllDevices() if err != nil { respondError(app.lc, w, http.StatusInternalServerError, fmt.Sprintf("Failed to get cameras list: %v", err)) @@ -184,7 +223,7 @@ func (app *CameraManagementApp) startPipelineRoute(w http.ResponseWriter, req *h return } - if err := app.startPipeline(deviceName, sr.ProfileToken, sr.PipelineName, sr.PipelineVersion); err != nil { + if err := app.startPipeline(deviceName, sr); err != nil { respondError(app.lc, w, http.StatusInternalServerError, fmt.Sprintf("Failed to start pipeline: %v", err)) return } @@ -223,7 +262,28 @@ func (app *CameraManagementApp) allPipelineStatusesRoute(w http.ResponseWriter, func (app *CameraManagementApp) stopPipelineRoute(w http.ResponseWriter, req *http.Request) { rv := mux.Vars(req) deviceName := rv["name"] - if err := app.stopPipeline(deviceName); err != nil { + id := rv["id"] + + defer func() { + dev, err := app.getDeviceByName(deviceName) + if err != nil { + respondError(app.lc, w, http.StatusBadRequest, + fmt.Sprintf("failed to query device %s: %v", deviceName, err)) + return + } + + // if the device is a usb device, stop streaming after shutting off the pipeline + if dev.ServiceName == app.config.AppCustom.USBDeviceServiceName { + _, err := app.stopStreaming(deviceName) + if err != nil { + respondError(app.lc, w, http.StatusInternalServerError, + fmt.Sprintf("failed to stop streaming usb camera %s: %v", deviceName, err)) + return + } + } + }() + + if err := app.stopPipeline(deviceName, id); err != nil { respondError(app.lc, w, http.StatusInternalServerError, fmt.Sprintf("failed to stop pipeline: %v", err)) return @@ -257,6 +317,20 @@ func (app *CameraManagementApp) ptzRoute(w http.ResponseWriter, req *http.Reques var res dtosCommon.BaseResponse var err error + ptzRange, err := app.getPTZRange(deviceName) + if err != nil { + respondError(app.lc, w, http.StatusInternalServerError, + fmt.Sprintf("Failed to get PTZ configuration for the device %s: %v", deviceName, err)) + return + } + + right := panTiltOffset * ptzRange.XRange + left := -right + up := panTiltOffset * ptzRange.YRange + down := -up + zoomIn := zoomOffset * ptzRange.ZRange + zoomOut := -zoomIn + switch action { case "left": res, err = app.doPTZ(deviceName, profileToken, left, 0, 0) @@ -296,3 +370,29 @@ func (app *CameraManagementApp) ptzRoute(w http.ResponseWriter, req *http.Reques app.lc.Error(err.Error()) } } + +func (app *CameraManagementApp) getPTZRange(deviceName string) (PTZRange, error) { + app.ptzRangeMutex.Lock() + defer app.ptzRangeMutex.Unlock() + ptzRange, exists := app.ptzRangeMap[deviceName] + if !exists { + ptzConfigs, err := app.getPTZConfiguration(deviceName) + if err != nil { + return PTZRange{}, err + } + + xRange := ptzConfigs.PTZConfiguration[0].PanTiltLimits.Range.XRange.Max - ptzConfigs.PTZConfiguration[0].PanTiltLimits.Range.XRange.Min + yRange := ptzConfigs.PTZConfiguration[0].PanTiltLimits.Range.YRange.Max - ptzConfigs.PTZConfiguration[0].PanTiltLimits.Range.YRange.Min + var zRange float64 + if ptzConfigs.PTZConfiguration[0].ZoomLimits != nil { + zRange = ptzConfigs.PTZConfiguration[0].ZoomLimits.Range.XRange.Max - ptzConfigs.PTZConfiguration[0].ZoomLimits.Range.XRange.Min + } + ptzRange = PTZRange{ + XRange: xRange, + YRange: yRange, + ZRange: zRange, + } + app.ptzRangeMap[deviceName] = ptzRange + } + return ptzRange, nil +} diff --git a/application-services/custom/camera-management/appcamera/types.go b/application-services/custom/camera-management/appcamera/types.go index b82b5163..8dd1a69d 100644 --- a/application-services/custom/camera-management/appcamera/types.go +++ b/application-services/custom/camera-management/appcamera/types.go @@ -1,5 +1,5 @@ // -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 @@ -12,6 +12,17 @@ type StreamUriRequest struct { StreamSetup StreamSetup `json:"StreamSetup"` ProfileToken string `json:"ProfileToken"` } +type USBStartStreamingRequest struct { + InputFps string `json:"InputFps,omitempty"` + InputImageSize string `json:"InputImageSize,omitempty"` + InputPixelFormat string `json:"InputPixelFormat,omitempty"` + OutputFrames string `json:"OutputFrames,omitempty"` + OutputFps string `json:"OutputFps,omitempty"` + OutputImageSize string `json:"OutputImageSize,omitempty"` + OutputAspect string `json:"OutputAspect,omitempty"` + OutputVideoCodec string `json:"OutputVideoCodec,omitempty"` + OutputVideoQuality string `json:"OutputVideoQuality,omitempty"` +} type Transport struct { Protocol string `json:"Protocol"` } @@ -20,145 +31,30 @@ type StreamSetup struct { Transport Transport `json:"Transport"` } -type ProfilesResponse struct { - Profiles []struct { - AudioEncoderConfiguration struct { - Bitrate int `json:"Bitrate"` - Encoding string `json:"Encoding"` - Multicast struct { - Address struct { - IPv4Address string `json:"IPv4Address"` - Type string `json:"Type"` - } `json:"Address"` - AutoStart bool `json:"AutoStart"` - Port int `json:"Port"` - TTL int `json:"TTL"` - } `json:"Multicast"` - Name string `json:"Name"` - SampleRate int `json:"SampleRate"` - SessionTimeout string `json:"SessionTimeout"` - Token string `json:"Token"` - UseCount int `json:"UseCount"` - } `json:"AudioEncoderConfiguration"` - AudioSourceConfiguration struct { - Name string `json:"Name"` - SourceToken string `json:"SourceToken"` - Token string `json:"Token"` - UseCount int `json:"UseCount"` - } `json:"AudioSourceConfiguration"` - Extension interface{} `json:"Extension"` - Fixed bool `json:"Fixed"` - MetadataConfiguration interface{} `json:"MetadataConfiguration"` - Name string `json:"Name"` - PTZConfiguration struct { - DefaultAbsolutePantTiltPositionSpace string `json:"DefaultAbsolutePantTiltPositionSpace"` - DefaultContinuousPanTiltVelocitySpace string `json:"DefaultContinuousPanTiltVelocitySpace"` - DefaultPTZSpeed struct { - } `json:"DefaultPTZSpeed"` - DefaultPTZTimeout string `json:"DefaultPTZTimeout"` - DefaultRelativePanTiltTranslationSpace string `json:"DefaultRelativePanTiltTranslationSpace"` - PanTiltLimits struct { - Range struct { - URI string `json:"URI"` - XRange struct { - Max int `json:"Max"` - Min int `json:"Min"` - } `json:"XRange"` - YRange struct { - Max int `json:"Max"` - Min int `json:"Min"` - } `json:"YRange"` - } `json:"Range"` - } `json:"PanTiltLimits"` - Token string `json:"Token"` - } `json:"PTZConfiguration"` - Token string `json:"Token"` - VideoAnalyticsConfiguration struct { - AnalyticsEngineConfiguration struct { - AnalyticsModule []struct { - Name string `json:"Name"` - Parameters struct { - ElementItem []struct { - Name string `json:"Name"` - } `json:"ElementItem"` - SimpleItem []struct { - Name string `json:"Name"` - Value string `json:"Value"` - } `json:"SimpleItem"` - } `json:"Parameters"` - Type string `json:"Type"` - } `json:"AnalyticsModule"` - } `json:"AnalyticsEngineConfiguration"` - Name string `json:"Name"` - RuleEngineConfiguration struct { - Rule struct { - Name string `json:"Name"` - Parameters struct { - SimpleItem []struct { - Name string `json:"Name"` - Value string `json:"Value"` - } `json:"SimpleItem"` - } `json:"Parameters"` - Type string `json:"Type"` - } `json:"Rule"` - } `json:"RuleEngineConfiguration"` - Token string `json:"Token"` - UseCount int `json:"UseCount"` - } `json:"VideoAnalyticsConfiguration"` - VideoEncoderConfiguration struct { - Encoding string `json:"Encoding"` - H264 struct { - GovLength int `json:"GovLength"` - H264Profile string `json:"H264Profile"` - } `json:"H264"` - Multicast struct { - Address struct { - IPv4Address string `json:"IPv4Address"` - Type string `json:"Type"` - } `json:"Address"` - AutoStart bool `json:"AutoStart"` - Port int `json:"Port"` - TTL int `json:"TTL"` - } `json:"Multicast"` - Name string `json:"Name"` - Quality int `json:"Quality"` - RateControl struct { - BitrateLimit int `json:"BitrateLimit"` - EncodingInterval int `json:"EncodingInterval"` - FrameRateLimit int `json:"FrameRateLimit"` - } `json:"RateControl"` - Resolution struct { - Height int `json:"Height"` - Width int `json:"Width"` - } `json:"Resolution"` - SessionTimeout string `json:"SessionTimeout"` - Token string `json:"Token"` - UseCount int `json:"UseCount"` - } `json:"VideoEncoderConfiguration"` - VideoSourceConfiguration struct { - Bounds struct { - Height int `json:"Height"` - Width int `json:"Width"` - X int `json:"X"` - Y int `json:"Y"` - } `json:"Bounds"` - Extension interface{} `json:"Extension"` - Name string `json:"Name"` - SourceToken string `json:"SourceToken"` - Token string `json:"Token"` - UseCount int `json:"UseCount"` - ViewMode string `json:"ViewMode"` - } `json:"VideoSourceConfiguration"` - } `json:"Profiles"` +type StreamingStatusResponse struct { + Error string `json:"Error"` + InputFps string `json:"InputFps"` + InputImageSize string `json:"InputImageSize"` + IsStreaming bool `json:"IsStreaming"` + OutputAspect string `json:"OutputAspect"` + OutputFps string `json:"OutputFps"` + OutputFrames string `json:"OutputFrames"` + OutputImageSize string `json:"OutputImageSize"` + OutputVideoQuality string `json:"OutputVideoQuality"` } -type StreamUriResponse struct { - MediaURI struct { - InvalidAfterConnect bool `json:"InvalidAfterConnect"` - InvalidAfterReboot bool `json:"InvalidAfterReboot"` - Timeout string `json:"Timeout"` - URI string `json:"Uri"` - } `json:"MediaUri"` +type CameraType string + +const ( + USB CameraType = "USB" + Onvif CameraType = "Onvif" + Unknown CameraType = "Unknown" +) + +type CameraFeatures struct { + PTZ bool `json:"PTZ"` + Zoom bool `json:"Zoom"` + CameraType CameraType `json:"CameraType"` } type PipelineRequest struct { @@ -183,14 +79,16 @@ type Destination struct { Frame Frame `json:"frame"` } +type OnvifPipelineConfig struct { + ProfileToken string `json:"profile_token"` type GetPresetsResponse struct { Preset []struct { Name string `json:"Name"` PTZPosition struct { PanTilt struct { - Space string `json:"Space"` - X int `json:"X"` - Y int `json:"Y"` + Space string `json:"Space"` + X float64 `json:"X"` + Y float64 `json:"Y"` } `json:"PanTilt"` } `json:"PTZPosition"` Token string `json:"Token"` @@ -198,7 +96,60 @@ type GetPresetsResponse struct { } type StartPipelineRequest struct { - ProfileToken string `json:"profile_token"` - PipelineName string `json:"pipeline_name"` - PipelineVersion string `json:"pipeline_version"` + Onvif *OnvifPipelineConfig `json:"onvif,omitempty"` + USB *USBStartStreamingRequest `json:"usb,omitempty"` + PipelineName string `json:"pipeline_name"` + PipelineVersion string `json:"pipeline_version"` +} + +type PTZRange struct { + XRange float64 `json:"XRange"` + YRange float64 `json:"YRange"` + ZRange float64 `json:"ZRange"` +} + +type PipelineStatus struct { + AvgFps float64 `json:"avg_fps"` + AvgPipelineLatency float64 `json:"avg_pipeline_latency,omitempty"` + ElapsedTime float64 `json:"elapsed_time"` + Id string `json:"id"` + StartTime float64 `json:"start_time"` + State string `json:"state"` +} + +type PipelineInformationResponse struct { + Id string `json:"id"` + LaunchCommand string `json:"launch_command"` + Request struct { + AutoSource string `json:"auto_source"` + Destination struct { + Frame struct { + CacheLength int `json:"cache-length"` + Class string `json:"class"` + EncodeQuality int `json:"encode-quality"` + Path string `json:"path"` + SyncWithDestination bool `json:"sync-with-destination"` + SyncWithSource bool `json:"sync-with-source"` + Type string `json:"type"` + } `json:"frame"` + Metadata struct { + Host string `json:"host"` + Topic string `json:"topic"` + Type string `json:"type"` + } `json:"metadata"` + } `json:"destination"` + Parameters struct { + DetectionDevice string `json:"detection-device"` + } `json:"parameters"` + Pipeline struct { + Name string `json:"name"` + Version string `json:"version"` + } `json:"pipeline"` + Source struct { + Element string `json:"element"` + Type string `json:"type"` + Uri string `json:"uri"` + } `json:"source"` + } `json:"request"` + Type string `json:"type"` } diff --git a/application-services/custom/camera-management/appcamera/util.go b/application-services/custom/camera-management/appcamera/util.go index c476609f..40565de0 100644 --- a/application-services/custom/camera-management/appcamera/util.go +++ b/application-services/custom/camera-management/appcamera/util.go @@ -1,5 +1,5 @@ // -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 @@ -13,38 +13,64 @@ import ( "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/http/utils" "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" "github.com/edgexfoundry/go-mod-core-contracts/v2/common" + "github.com/edgexfoundry/go-mod-core-contracts/v2/dtos" "github.com/edgexfoundry/go-mod-core-contracts/v2/dtos/responses" + "github.com/pkg/errors" "io" "net/http" - "net/url" - "path" ) const ( maxBodySz = 1024 * 1024 * 10 ) -func parseStreamUri(res *responses.EventResponse) (string, error) { - val := res.Event.Readings[0].ObjectValue +func (app *CameraManagementApp) issueGetCommandWithJson(ctx context.Context, deviceName string, commandName string, jsonValue interface{}) (*responses.EventResponse, error) { + jsonStr, err := json.Marshal(jsonValue) + if err != nil { + return nil, err + } + + return app.service.CommandClient().IssueGetCommandByNameWithQueryParams(ctx, deviceName, commandName, + map[string]string{"jsonObject": base64.URLEncoding.EncodeToString(jsonStr)}) +} + +func (app *CameraManagementApp) parseResponse(commandName string, event *responses.EventResponse, response interface{}) error { + val := event.Event.Readings[0].ObjectValue js, err := json.Marshal(val) if err != nil { - return "", err + return errors.Wrapf(err, "failed to marshal %s object value as json object", commandName) } - sr := StreamUriResponse{} - if err := json.Unmarshal(js, &sr); err != nil { - return "", err + + err = json.Unmarshal(js, response) + if err != nil { + return errors.Wrapf(err, "failed to unmarhal %s json object to response type %T", commandName, response) } - return sr.MediaURI.URI, nil + + return nil } -func (app *CameraManagementApp) issueGetCommand(ctx context.Context, deviceName string, commandName string, jsonValue interface{}) (*responses.EventResponse, error) { - jsonStr, err := json.Marshal(jsonValue) +func (app *CameraManagementApp) issueGetCommandWithJsonForResponse(ctx context.Context, deviceName string, commandName string, + jsonValue interface{}, response interface{}) error { + + event, err := app.issueGetCommandWithJson(ctx, deviceName, commandName, jsonValue) if err != nil { - return nil, err + return errors.Wrapf(err, "failed to issue get command %s for device %s", commandName, deviceName) } + return app.parseResponse(commandName, event, response) +} - return app.service.CommandClient().IssueGetCommandByNameWithQueryParams(ctx, deviceName, commandName, - map[string]string{"jsonObject": base64.URLEncoding.EncodeToString(jsonStr)}) +func (app *CameraManagementApp) issueGetCommand(ctx context.Context, deviceName string, commandName string) (*responses.EventResponse, error) { + return app.service.CommandClient().IssueGetCommandByName(ctx, deviceName, commandName, "no", "yes") +} + +func (app *CameraManagementApp) issueGetCommandForResponse(ctx context.Context, deviceName string, commandName string, + response interface{}) error { + + event, err := app.issueGetCommand(ctx, deviceName, commandName) + if err != nil { + return errors.Wrapf(err, "failed to issue get command %s for device %s", commandName, deviceName) + } + return app.parseResponse(commandName, event, response) } func issuePostRequest(ctx context.Context, res interface{}, baseUrl string, reqPath string, jsonValue []byte) (err error) { @@ -52,20 +78,10 @@ func issuePostRequest(ctx context.Context, res interface{}, baseUrl string, reqP } func issueGetRequest(ctx context.Context, res interface{}, baseUrl string, requestPath string) (err error) { - u, err := url.Parse(baseUrl) - if err != nil { - return err - } - requestPath = path.Join(u.Path, requestPath) return utils.GetRequest(ctx, &res, baseUrl, requestPath, nil) } func issueDeleteRequest(ctx context.Context, res interface{}, baseUrl string, requestPath string) (err error) { - u, err := url.Parse(baseUrl) - if err != nil { - return err - } - requestPath = path.Join(u.Path, requestPath) return utils.DeleteRequest(ctx, &res, baseUrl, requestPath) } @@ -122,3 +138,11 @@ func extractJSONBody(lc logger.LoggingClient, w http.ResponseWriter, r *http.Req return true } + +func (app *CameraManagementApp) getDeviceByName(deviceName string) (dtos.Device, error) { + resp, err := app.service.DeviceClient().DeviceByName(context.Background(), deviceName) + if err != nil { + return dtos.Device{}, nil + } + return resp.Device, nil +} diff --git a/application-services/custom/camera-management/edge-video-analytics/Makefile b/application-services/custom/camera-management/edge-video-analytics/Makefile index 13edc9d9..c9260e43 100644 --- a/application-services/custom/camera-management/edge-video-analytics/Makefile +++ b/application-services/custom/camera-management/edge-video-analytics/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Intel Corporation +# Copyright (C) 2022-2023 Intel Corporation # SPDX-License-Identifier: Apache-2.0 include ../make/base.mk @@ -6,18 +6,19 @@ include ../make/base.mk .PHONY: run download-models install patch-pipelines sniff-events stop GITHUB_URL = https://github.com/intel/edge-video-analytics-microservice.git -VERSION ?= v0.7.0 +VERSION ?= v0.7.2 SRC = src_$(VERSION) MODELS_DIR = models PIPELINES_LINK = pipelines -DOCKER_COMPOSE = docker-compose +DOCKER_COMPOSE ?= docker compose COMPOSE_ARGS += -p edge-video-analytics $(SRC): git clone --depth=1 --branch $(VERSION) $(GITHUB_URL) $@ $(PIPELINES_LINK): $(SRC) + -rm -f $@ ln -sf $(SRC)/$@ $@ $(MODELS_DIR): @@ -26,6 +27,7 @@ $(MODELS_DIR): download-models: $(SRC) | $(MODELS_DIR) chmod +x $(SRC)/tools/model_downloader/model_downloader.sh $(SRC)/docker/run.sh $(SRC)/tools/model_downloader/model_downloader.sh --model-list $(SRC)/models_list/models.list.yml + $(SRC)/tools/model_downloader/model_downloader.sh --model-list models.list.extra.yml # patch pipeline to accept rtsp video patch-pipelines: $(PIPELINES_LINK) diff --git a/application-services/custom/camera-management/edge-video-analytics/config.json b/application-services/custom/camera-management/edge-video-analytics/config.json new file mode 100644 index 00000000..2e6c0e32 --- /dev/null +++ b/application-services/custom/camera-management/edge-video-analytics/config.json @@ -0,0 +1,4 @@ +{ + "configs": [ + ] +} diff --git a/application-services/custom/camera-management/edge-video-analytics/docker-compose.yml b/application-services/custom/camera-management/edge-video-analytics/docker-compose.yml index 113a328a..dd1fb2bc 100644 --- a/application-services/custom/camera-management/edge-video-analytics/docker-compose.yml +++ b/application-services/custom/camera-management/edge-video-analytics/docker-compose.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Intel Corporation +# Copyright (c) 2022-2023 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,23 +33,29 @@ services: - evam_network edge_video_analytics_microservice: - image: intel/edge_video_analytics_microservice:0.7.0 + image: intel/edge_video_analytics_microservice:0.7.2 hostname: edge_video_analytics_microservice privileged: true entrypoint: ["./run.sh"] ports: - '8080:8080' - - '8554:8554' + - '8555:8555' networks: - evam_network environment: ENABLE_RTSP: "true" - RTSP_PORT: 8554 + RTSP_PORT: 8555 RUN_MODE: EVA + ENABLE_WEBRTC: "false" + WEBRTC_SIGNALING_SERVER: ws://localhost:8443 + # Default Detection and Classification Device + DETECTION_DEVICE: CPU + CLASSIFICATION_DEVICE: CPU GST_DEBUG: "*:2,python*:4" volumes: - - "./pipelines/:/app/pipelines/" - - "./models:/app/models/" + - "./pipelines/:/home/pipeline-server/pipelines/" + - "./models:/home/pipeline-server/models/" + - "./config.json:/home/pipeline-server/config.json" device_cgroup_rules: # Default run - device-cgroup-rule='c 189:* rmw' # NCS2 run - device-cgroup-rule='c 209:* rmw' diff --git a/application-services/custom/camera-management/edge-video-analytics/models.list.extra.yml b/application-services/custom/camera-management/edge-video-analytics/models.list.extra.yml new file mode 100644 index 00000000..f6a65d00 --- /dev/null +++ b/application-services/custom/camera-management/edge-video-analytics/models.list.extra.yml @@ -0,0 +1,4 @@ +- model: person-detection-retail-0013 + alias: object_detection + version: person + precision: [FP16, FP32] diff --git a/application-services/custom/camera-management/main.go b/application-services/custom/camera-management/main.go index 48e0ebee..84743237 100644 --- a/application-services/custom/camera-management/main.go +++ b/application-services/custom/camera-management/main.go @@ -18,9 +18,11 @@ package main import ( "fmt" + "os" + appsdk "github.com/edgexfoundry/app-functions-sdk-go/v2/pkg" "github.com/edgexfoundry/edgex-examples/application-services/custom/camera-management/appcamera" - "os" + "github.com/edgexfoundry/go-mod-core-contracts/v2/dtos" ) const ( @@ -28,7 +30,7 @@ const ( ) func main() { - service, ok := appsdk.NewAppService(serviceKey) + service, ok := appsdk.NewAppServiceWithTargetType(serviceKey, &dtos.SystemEvent{}) if !ok { fmt.Printf("error: unable to create new app service %s!\n", serviceKey) os.Exit(-1) diff --git a/application-services/custom/camera-management/res/configuration.toml b/application-services/custom/camera-management/res/configuration.toml index 91d0502c..15b93d4f 100644 --- a/application-services/custom/camera-management/res/configuration.toml +++ b/application-services/custom/camera-management/res/configuration.toml @@ -24,7 +24,6 @@ LogLevel = "INFO" [Writable.InsecureSecrets.CameraCredentials.Secrets] username = "" password = "" - [Writable.Telemetry] Interval = "30s" PublishTopicPrefix = "edgex/telemetry" # // will be added to this Publish Topic prefix @@ -102,11 +101,44 @@ TokenFile = "/tmp/edgex/secrets/app-camera-management/secrets-token.json" Host = "localhost" Port = 59882 -[Trigger] -Type="http" - [AppCustom] -DeviceServiceName = "device-onvif-camera" +OnvifDeviceServiceName = "device-onvif-camera" +USBDeviceServiceName = "device-usb-camera" EvamBaseUrl = "http://localhost:8080" MqttAddress = "broker:1883" MqttTopic = "incoming/data/edge-video-analytics/inference-event" +DefaultPipelineName = "object_detection" # Name of the default pipeline used when a new device is added to the system; can be left blank to disable feature +DefaultPipelineVersion = "person" # Version of the default pipeline used when a new device is added to the system; can be left blank to disable feature + + [Trigger] + Type="edgex-messagebus" + [Trigger.EdgexMessageBus] + Type = "redis" + [Trigger.EdgexMessageBus.SubscribeHost] + Host = "localhost" + Port = 6379 + Protocol = "redis" + AuthMode = "usernamepassword" # required for redis messagebus (secure or insecure). + SecretName = "redisdb" + SubscribeTopics="edgex/system-events/#/device/#" + + [Trigger.EdgexMessageBus.Optional] + authmode = "usernamepassword" # required for redis messagebus (secure or insecure). + secretname = "redisdb" + # Default MQTT Specific options that need to be here to enable environment variable overrides of them + ClientId ="app-camera-management" + Qos = "0" # Quality of Service values are 0 (At most once), 1 (At least once) or 2 (Exactly once) + KeepAlive = "10" # Seconds (must be 2 or greater) + Retained = "false" + AutoReconnect = "true" + ConnectTimeout = "5" # Seconds + SkipCertVerify = "false" + # Default NATS Specific options that need to be here to enable environment variable overrides of them + Format = "nats" + RetryOnFailedConnect = "true" + QueueGroup = "" + Durable = "" + AutoProvision = "true" + Deliver = "new" + DefaultPubRetryAttempts = "2" + Subject = "edgex/#" # Required for NATS JetStream only for stream autoprovisioning diff --git a/application-services/custom/camera-management/web-ui/dist/index.html b/application-services/custom/camera-management/web-ui/dist/index.html index b73d0c7b..4be617ca 100644 --- a/application-services/custom/camera-management/web-ui/dist/index.html +++ b/application-services/custom/camera-management/web-ui/dist/index.html @@ -9,6 +9,6 @@ - + \ No newline at end of file diff --git a/application-services/custom/camera-management/web-ui/dist/main.137de25ed3b58748.js b/application-services/custom/camera-management/web-ui/dist/main.137de25ed3b58748.js new file mode 100644 index 00000000..cdefcea2 --- /dev/null +++ b/application-services/custom/camera-management/web-ui/dist/main.137de25ed3b58748.js @@ -0,0 +1 @@ +(self.webpackChunkcamera_management_web_ui=self.webpackChunkcamera_management_web_ui||[]).push([[179],{736:(js,Wa,ps)=>{"use strict";function ut(n){return"function"==typeof n}function Br(n){const e=n(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const ms=Br(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function V(n,t){if(n){const e=n.indexOf(t);0<=e&&n.splice(e,1)}}class X{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const s of e)s.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(ut(i))try{i()}catch(s){t=s instanceof ms?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{S(s)}catch(o){t=null!=t?t:[],o instanceof ms?t=[...t,...o.errors]:t.push(o)}}if(t)throw new ms(t)}}add(t){var e;if(t&&t!==this)if(this.closed)S(t);else{if(t instanceof X){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&V(e,t)}remove(t){const{_finalizers:e}=this;e&&V(e,t),t instanceof X&&t._removeParent(this)}}X.EMPTY=(()=>{const n=new X;return n.closed=!0,n})();const re=X.EMPTY;function T(n){return n instanceof X||n&&"closed"in n&&ut(n.remove)&&ut(n.add)&&ut(n.unsubscribe)}function S(n){ut(n)?n():n.unsubscribe()}const R={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},D={setTimeout(n,t,...e){const{delegate:i}=D;return null!=i&&i.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){const{delegate:t}=D;return((null==t?void 0:t.clearTimeout)||clearTimeout)(n)},delegate:void 0};function m(n){D.setTimeout(()=>{const{onUnhandledError:t}=R;if(!t)throw n;t(n)})}function y(){}const v=z("C",void 0,void 0);function z(n,t,e){return{kind:n,value:t,error:e}}let C=null;function P(n){if(R.useDeprecatedSynchronousErrorHandling){const t=!C;if(t&&(C={errorThrown:!1,error:null}),n(),t){const{errorThrown:e,error:i}=C;if(C=null,e)throw i}}else n()}class O extends X{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,T(t)&&t.add(this)):this.destination=Y}static create(t,e,i){return new G(t,e,i)}next(t){this.isStopped?le(function I(n){return z("N",n,void 0)}(t),this):this._next(t)}error(t){this.isStopped?le(function _(n){return z("E",void 0,n)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?le(v,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const F=Function.prototype.bind;function B(n,t){return F.call(n,t)}class Q{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){oe(i)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){oe(i)}else oe(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){oe(e)}}}class G extends O{constructor(t,e,i){let r;if(super(),ut(t)||!t)r={next:null!=t?t:void 0,error:null!=e?e:void 0,complete:null!=i?i:void 0};else{let s;this&&R.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&B(t.next,s),error:t.error&&B(t.error,s),complete:t.complete&&B(t.complete,s)}):r=t}this.destination=new Q(r)}}function oe(n){R.useDeprecatedSynchronousErrorHandling?function M(n){R.useDeprecatedSynchronousErrorHandling&&C&&(C.errorThrown=!0,C.error=n)}(n):m(n)}function le(n,t){const{onStoppedNotification:e}=R;e&&D.setTimeout(()=>e(n,t))}const Y={closed:!0,next:y,error:function de(n){throw n},complete:y},H="function"==typeof Symbol&&Symbol.observable||"@@observable";function N(n){return n}let J=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const s=function ge(n){return n&&n instanceof O||function Ce(n){return n&&ut(n.next)&&ut(n.error)&&ut(n.complete)}(n)&&T(n)}(e)?e:new G(e,i,r);return P(()=>{const{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return new(i=pe(i))((r,s)=>{const o=new G({next:a=>{try{e(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[H](){return this}pipe(...e){return function se(n){return 0===n.length?N:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}(e)(this)}toPromise(e){return new(e=pe(e))((i,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>i(s))})}}return n.create=t=>new n(t),n})();function pe(n){var t;return null!==(t=null!=n?n:R.Promise)&&void 0!==t?t:Promise}const Fe=Br(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let ue=(()=>{class n extends J{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const i=new Ye(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new Fe}next(e){P(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(e)}})}error(e){P(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){P(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:i,isStopped:r,observers:s}=this;return i||r?re:(this.currentObservers=null,s.push(e),new X(()=>{this.currentObservers=null,V(s,e)}))}_checkFinalizedStatuses(e){const{hasError:i,thrownError:r,isStopped:s}=this;i?e.error(r):s&&e.complete()}asObservable(){const e=new J;return e.source=this,e}}return n.create=(t,e)=>new Ye(t,e),n})();class Ye extends ue{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,t)}error(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,t)}complete(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)}_subscribe(t){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==i?i:re}}function Ne(n){return ut(null==n?void 0:n.lift)}function Pe(n){return t=>{if(Ne(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function _e(n,t,e,i,r){return new ve(n,t,e,i,r)}class ve extends O{constructor(t,e,i,r,s,o){super(t),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:e}=this;super.unsubscribe(),!e&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function U(n,t){return Pe((e,i)=>{let r=0;e.subscribe(_e(i,s=>{i.next(n.call(t,s,r++))}))})}function L(n){return this instanceof L?(this.v=n,this):new L(n)}function Z(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e.apply(n,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(w){i[w]&&(r[w]=function(k){return new Promise(function(j,K){s.push([w,k,j,K])>1||a(w,k)})})}function a(w,k){try{!function l(w){w.value instanceof L?Promise.resolve(w.value.v).then(c,d):f(s[0][2],w)}(i[w](k))}catch(j){f(s[0][3],j)}}function c(w){a("next",w)}function d(w){a("throw",w)}function f(w,k){w(k),s.shift(),s.length&&a(s[0][0],s[0][1])}}function Se(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=n[Symbol.asyncIterator];return t?t.call(n):(n=function ne(n){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(s){e[s]=n[s]&&function(o){return new Promise(function(a,l){!function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}(a,l,(o=n[s](o)).done,o.value)})}}}const Oi=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function Vr(n){return ut(null==n?void 0:n.then)}function Hr(n){return ut(n[H])}function Xv(n){return Symbol.asyncIterator&&ut(null==n?void 0:n[Symbol.asyncIterator])}function Jv(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const ey=function yA(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function ty(n){return ut(null==n?void 0:n[ey])}function ny(n){return Z(this,arguments,function*(){const e=n.getReader();try{for(;;){const{value:i,done:r}=yield L(e.read());if(r)return yield L(void 0);yield yield L(i)}}finally{e.releaseLock()}})}function iy(n){return ut(null==n?void 0:n.getReader)}function di(n){if(n instanceof J)return n;if(null!=n){if(Hr(n))return function bA(n){return new J(t=>{const e=n[H]();if(ut(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(Oi(n))return function wA(n){return new J(t=>{for(let e=0;e{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,m)})}(n);if(Xv(n))return ry(n);if(ty(n))return function DA(n){return new J(t=>{for(const e of n)if(t.next(e),t.closed)return;t.complete()})}(n);if(iy(n))return function EA(n){return ry(ny(n))}(n)}throw Jv(n)}function ry(n){return new J(t=>{(function MA(n,t){var e,i,r,s;return function W(n,t,e,i){return new(e||(e=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(f){o(f)}}function l(d){try{c(i.throw(d))}catch(f){o(f)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((i=i.apply(n,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Se(n);!(i=yield e.next()).done;)if(t.next(i.value),t.closed)return}catch(o){r={error:o}}finally{try{i&&!i.done&&(s=e.return)&&(yield s.call(e))}finally{if(r)throw r.error}}t.complete()})})(n,t).catch(e=>t.error(e))})}function jr(n,t,e,i=0,r=!1){const s=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(s),!r)return s}function Pn(n,t,e=1/0){return ut(t)?Pn((i,r)=>U((s,o)=>t(i,s,r,o))(di(n(i,r))),e):("number"==typeof t&&(e=t),Pe((i,r)=>function xA(n,t,e,i,r,s,o,a){const l=[];let c=0,d=0,f=!1;const w=()=>{f&&!l.length&&!c&&t.complete()},k=K=>c{s&&t.next(K),c++;let ae=!1;di(e(K,d++)).subscribe(_e(t,ce=>{null==r||r(ce),s?k(ce):t.next(ce)},()=>{ae=!0},void 0,()=>{if(ae)try{for(c--;l.length&&cj(ce)):j(ce)}w()}catch(ce){t.error(ce)}}))};return n.subscribe(_e(t,k,()=>{f=!0,w()})),()=>{null==a||a()}}(i,r,n,e)))}function To(n=1/0){return Pn(N,n)}const Fi=new J(n=>n.complete());function sy(n){return n&&ut(n.schedule)}function tf(n){return n[n.length-1]}function oy(n){return ut(tf(n))?n.pop():void 0}function qa(n){return sy(tf(n))?n.pop():void 0}function ay(n,t=0){return Pe((e,i)=>{e.subscribe(_e(i,r=>jr(i,n,()=>i.next(r),t),()=>jr(i,n,()=>i.complete(),t),r=>jr(i,n,()=>i.error(r),t)))})}function ly(n,t=0){return Pe((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function cy(n,t){if(!n)throw new Error("Iterable cannot be null");return new J(e=>{jr(e,t,()=>{const i=n[Symbol.asyncIterator]();jr(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function gn(n,t){return t?function OA(n,t){if(null!=n){if(Hr(n))return function TA(n,t){return di(n).pipe(ly(t),ay(t))}(n,t);if(Oi(n))return function IA(n,t){return new J(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}(n,t);if(Vr(n))return function AA(n,t){return di(n).pipe(ly(t),ay(t))}(n,t);if(Xv(n))return cy(n,t);if(ty(n))return function RA(n,t){return new J(e=>{let i;return jr(e,t,()=>{i=n[ey](),jr(e,t,()=>{let r,s;try{({value:r,done:s}=i.next())}catch(o){return void e.error(o)}s?e.complete():e.next(r)},0,!0)}),()=>ut(null==i?void 0:i.return)&&i.return()})}(n,t);if(iy(n))return function PA(n,t){return cy(ny(n),t)}(n,t)}throw Jv(n)}(n,t):di(n)}function $n(...n){const t=qa(n),e=function kA(n,t){return"number"==typeof tf(n)?n.pop():t}(n,1/0),i=n;return i.length?1===i.length?di(i[0]):To(e)(gn(i,t)):Fi}function sn(n){return n<=0?()=>Fi:Pe((t,e)=>{let i=0;t.subscribe(_e(e,r=>{++i<=n&&(e.next(r),n<=i&&e.complete())}))})}function dy(n={}){const{connector:t=(()=>new ue),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return s=>{let o=null,a=null,l=null,c=0,d=!1,f=!1;const w=()=>{null==a||a.unsubscribe(),a=null},k=()=>{w(),o=l=null,d=f=!1},j=()=>{const K=o;k(),null==K||K.unsubscribe()};return Pe((K,ae)=>{c++,!f&&!d&&w();const ce=l=null!=l?l:t();ae.add(()=>{c--,0===c&&!f&&!d&&(a=nf(j,r))}),ce.subscribe(ae),o||(o=new G({next:Te=>ce.next(Te),error:Te=>{f=!0,w(),a=nf(k,e,Te),ce.error(Te)},complete:()=>{d=!0,w(),a=nf(k,i),ce.complete()}}),gn(K).subscribe(o))})(s)}}function nf(n,t,...e){return!0===t?(n(),null):!1===t?null:t(...e).pipe(sn(1)).subscribe(()=>n())}function Yt(n){for(let t in n)if(n[t]===Yt)return t;throw Error("Could not find renamed property on target object.")}function rf(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function Kt(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(Kt).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function sf(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const FA=Yt({__forward_ref__:Yt});function Ft(n){return n.__forward_ref__=Ft,n.toString=function(){return Kt(this())},n}function pt(n){return af(n)?n():n}function af(n){return"function"==typeof n&&n.hasOwnProperty(FA)&&n.__forward_ref__===Ft}class Be extends Error{constructor(t,e){super(function Lc(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}}function gt(n){return"string"==typeof n?n:null==n?"":String(n)}function Nc(n,t){throw new Be(-201,!1)}function yi(n,t){null==n&&function $t(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function Ie(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function qe(n){return{providers:n.providers||[],imports:n.imports||[]}}function lf(n){return uy(n,Bc)||uy(n,fy)}function uy(n,t){return n.hasOwnProperty(t)?n[t]:null}function hy(n){return n&&(n.hasOwnProperty(cf)||n.hasOwnProperty(zA))?n[cf]:null}const Bc=Yt({\u0275prov:Yt}),cf=Yt({\u0275inj:Yt}),fy=Yt({ngInjectableDef:Yt}),zA=Yt({ngInjectorDef:Yt});var at=(()=>((at=at||{})[at.Default=0]="Default",at[at.Host=1]="Host",at[at.Self=2]="Self",at[at.SkipSelf=4]="SkipSelf",at[at.Optional=8]="Optional",at))();let df;function pr(n){const t=df;return df=n,t}function py(n,t,e){const i=lf(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&at.Optional?null:void 0!==t?t:void Nc(Kt(n))}function gs(n){return{toString:n}.toString()}var Xi=(()=>((Xi=Xi||{})[Xi.OnPush=0]="OnPush",Xi[Xi.Default=1]="Default",Xi))(),Ji=(()=>{return(n=Ji||(Ji={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",Ji;var n})();const qt=(()=>"undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof global&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self)(),Ao={},jt=[],Vc=Yt({\u0275cmp:Yt}),uf=Yt({\u0275dir:Yt}),hf=Yt({\u0275pipe:Yt}),my=Yt({\u0275mod:Yt}),zr=Yt({\u0275fac:Yt}),Ya=Yt({__NG_ELEMENT_ID__:Yt});let GA=0;function vt(n){return gs(()=>{const e=!0===n.standalone,i={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===Xi.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||jt,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Ji.Emulated,id:"c"+GA++,styles:n.styles||jt,_:null,setInput:null,schemas:n.schemas||null,tView:null},s=n.dependencies,o=n.features;return r.inputs=vy(n.inputs,i),r.outputs=vy(n.outputs),o&&o.forEach(a=>a(r)),r.directiveDefs=s?()=>("function"==typeof s?s():s).map(gy).filter(_y):null,r.pipeDefs=s?()=>("function"==typeof s?s():s).map(ei).filter(_y):null,r})}function gy(n){return Qt(n)||Jn(n)}function _y(n){return null!==n}const qA={};function Ke(n){return gs(()=>{const t={type:n.type,bootstrap:n.bootstrap||jt,declarations:n.declarations||jt,imports:n.imports||jt,exports:n.exports||jt,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(qA[n.id]=n.type),t})}function vy(n,t){if(null==n)return Ao;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),e[r]=i,t&&(t[r]=s)}return e}const Me=vt;function ui(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Qt(n){return n[Vc]||null}function Jn(n){return n[uf]||null}function ei(n){return n[hf]||null}function bi(n,t){const e=n[my]||null;if(!e&&!0===t)throw new Error(`Type ${Kt(n)} does not have '\u0275mod' property.`);return e}function hi(n){return Array.isArray(n)&&"object"==typeof n[1]}function tr(n){return Array.isArray(n)&&!0===n[1]}function mf(n){return 0!=(8&n.flags)}function zc(n){return 2==(2&n.flags)}function $c(n){return 1==(1&n.flags)}function nr(n){return null!==n.template}function XA(n){return 0!=(256&n[2])}function Ws(n,t){return n.hasOwnProperty(zr)?n[zr]:null}class tI{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function cn(){return wy}function wy(n){return n.type.prototype.ngOnChanges&&(n.setInput=iI),nI}function nI(){const n=Dy(this),t=null==n?void 0:n.current;if(t){const e=n.previous;if(e===Ao)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function iI(n,t,e,i){const r=Dy(n)||function rI(n,t){return n[Cy]=t}(n,{previous:Ao,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[e],l=o[a];s[a]=new tI(l&&l.currentValue,t,o===Ao),n[i]=t}cn.ngInherit=!0;const Cy="__ngSimpleChanges__";function Dy(n){return n[Cy]||null}let bf;function dn(n){return!!n.listen}const Ey={createRenderer:(n,t)=>function wf(){return void 0!==bf?bf:"undefined"!=typeof document?document:void 0}()};function Cn(n){for(;Array.isArray(n);)n=n[0];return n}function Gc(n,t){return Cn(t[n])}function Bi(n,t){return Cn(t[n.index])}function Cf(n,t){return n.data[t]}function Fo(n,t){return n[t]}function Ci(n,t){const e=t[n];return hi(e)?e:e[0]}function My(n){return 4==(4&n[2])}function Df(n){return 64==(64&n[2])}function _s(n,t){return null==t?null:n[t]}function xy(n){n[18]=0}function Ef(n,t){n[5]+=t;let e=n,i=n[3];for(;null!==i&&(1===t&&1===e[5]||-1===t&&0===e[5]);)i[5]+=t,e=i,i=i[3]}const mt={lFrame:Fy(null),bindingsEnabled:!0};function ky(){return mt.bindingsEnabled}function ke(){return mt.lFrame.lView}function Lt(){return mt.lFrame.tView}function Bn(n){return mt.lFrame.contextLView=n,n[8]}function Vn(n){return mt.lFrame.contextLView=null,n}function Sn(){let n=Ty();for(;null!==n&&64===n.type;)n=n.parent;return n}function Ty(){return mt.lFrame.currentTNode}function mr(n,t){const e=mt.lFrame;e.currentTNode=n,e.isParent=t}function Mf(){return mt.lFrame.isParent}function xf(){mt.lFrame.isParent=!1}function ti(){const n=mt.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function $r(){return mt.lFrame.bindingIndex}function Lo(){return mt.lFrame.bindingIndex++}function Gr(n){const t=mt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function wI(n,t){const e=mt.lFrame;e.bindingIndex=e.bindingRootIndex=n,Sf(t)}function Sf(n){mt.lFrame.currentDirectiveIndex=n}function kf(n){const t=mt.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function Ry(){return mt.lFrame.currentQueryIndex}function Tf(n){mt.lFrame.currentQueryIndex=n}function DI(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function Py(n,t,e){if(e&at.SkipSelf){let r=t,s=n;for(;!(r=r.parent,null!==r||e&at.Host||(r=DI(s),null===r||(s=s[15],10&r.type))););if(null===r)return!1;t=r,n=s}const i=mt.lFrame=Oy();return i.currentTNode=t,i.lView=n,!0}function qc(n){const t=Oy(),e=n[1];mt.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Oy(){const n=mt.lFrame,t=null===n?null:n.child;return null===t?Fy(n):t}function Fy(n){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function Ly(){const n=mt.lFrame;return mt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Ny=Ly;function Yc(){const n=Ly();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function ni(){return mt.lFrame.selectedIndex}function vs(n){mt.lFrame.selectedIndex=n}function un(){const n=mt.lFrame;return Cf(n.tView,n.selectedIndex)}function Ja(){mt.lFrame.currentNamespace="svg"}function Kc(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===t){n[2]+=2048;try{s.call(a)}finally{}}}else try{s.call(a)}finally{}}class el{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Xc(n,t,e){const i=dn(n);let r=0;for(;rt){o=s-1;break}}}for(;s>16}(n),i=t;for(;e>0;)i=i[15],e--;return i}let Pf=!0;function ed(n){const t=Pf;return Pf=n,t}let LI=0;const gr={};function nl(n,t){const e=Ff(n,t);if(-1!==e)return e;const i=t[1];i.firstCreatePass&&(n.injectorIndex=t.length,Of(i.data,n),Of(t,null),Of(i.blueprint,null));const r=td(n,t),s=n.injectorIndex;if(Uy(r)){const o=No(r),a=Bo(r,t),l=a[1].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function Of(n,t){n.push(0,0,0,0,0,0,0,0,t)}function Ff(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function td(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=Zy(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function nd(n,t,e){!function NI(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Ya)&&(i=e[Ya]),null==i&&(i=e[Ya]=LI++);const r=255&i;t.data[n+(r>>5)]|=1<=0?255&t:jI:t}(e);if("function"==typeof s){if(!Py(t,n,i))return i&at.Host?Gy(r,0,i):Wy(t,e,i,r);try{const o=s(i);if(null!=o||i&at.Optional)return o;Nc()}finally{Ny()}}else if("number"==typeof s){let o=null,a=Ff(n,t),l=-1,c=i&at.Host?t[16][6]:null;for((-1===a||i&at.SkipSelf)&&(l=-1===a?td(n,t):t[a+8],-1!==l&&Qy(i,!1)?(o=t[1],a=No(l),t=Bo(l,t)):a=-1);-1!==a;){const d=t[1];if(Ky(s,a,d.data)){const f=VI(a,t,e,o,i,c);if(f!==gr)return f}l=t[a+8],-1!==l&&Qy(i,t[1].data[a+8]===c)&&Ky(s,a,t)?(o=d,a=No(l),t=Bo(l,t)):a=-1}}return r}function VI(n,t,e,i,r,s){const o=t[1],a=o.data[n+8],d=id(a,o,e,null==i?zc(a)&&Pf:i!=o&&0!=(3&a.type),r&at.Host&&s===a);return null!==d?il(t,o,d,a):gr}function id(n,t,e,i,r){const s=n.providerIndexes,o=t.data,a=1048575&s,l=n.directiveStart,d=s>>20,w=r?a+d:n.directiveEnd;for(let k=i?a:a+d;k=l&&j.type===e)return k}if(r){const k=o[l];if(k&&nr(k)&&k.type===e)return l}return null}function il(n,t,e,i){let r=n[e];const s=t.data;if(function II(n){return n instanceof el}(r)){const o=r;o.resolving&&function LA(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new Be(-200,`Circular dependency in DI detected for ${n}${e}`)}(function Ht(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():gt(n)}(s[e]));const a=ed(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?pr(o.injectImpl):null;Py(n,i,at.Default);try{r=n[e]=o.factory(void 0,s,n,i),t.firstCreatePass&&e>=i.directiveStart&&function TI(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(i){const o=wy(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,o)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,r),s&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,s))}(e,s[e],t)}finally{null!==l&&pr(l),ed(a),o.resolving=!1,Ny()}}return r}function Ky(n,t,e){return!!(e[t+(n>>5)]&1<{const t=n.prototype.constructor,e=t[zr]||Lf(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const s=r[zr]||Lf(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function Lf(n){return af(n)?()=>{const t=Lf(pt(n));return t&&t()}:Ws(n)}function Zy(n){const t=n[1],e=t.type;return 2===e?t.declTNode:1===e?n[6]:null}function ii(n){return function BI(n,t){if("class"===t)return n.classes;if("style"===t)return n.styles;const e=n.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function Nf(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);function r(...s){if(this instanceof r)return i.apply(this,s),this;const o=new r(...s);return a.annotation=o,a;function a(l,c,d){const f=l.hasOwnProperty(jo)?l[jo]:Object.defineProperty(l,jo,{value:[]})[jo];for(;f.length<=d;)f.push(null);return(f[d]=f[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class De{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Ie({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const $I=new De("AnalyzeForEntryComponents");function Di(n,t){void 0===t&&(t=n);for(let e=0;eArray.isArray(e)?Wr(e,t):t(e))}function Jy(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function rd(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function ol(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function qI(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function Vf(n,t){const e=$o(n,t);if(e>=0)return n[1|e]}function $o(n,t){return function nb(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const s=i+(r-i>>1),o=n[s<t?r=s:i=s+1}return~(r<({token:n})),-1),Hn=cl(zo("Optional"),8),ir=cl(zo("SkipSelf"),4);let hd;function Wo(n){var t;return(null===(t=function zf(){if(void 0===hd&&(hd=null,qt.trustedTypes))try{hd=qt.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return hd}())||void 0===t?void 0:t.createHTML(n))||n}class qs{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class vR extends qs{getTypeName(){return"HTML"}}class yR extends qs{getTypeName(){return"Style"}}class bR extends qs{getTypeName(){return"Script"}}class wR extends qs{getTypeName(){return"URL"}}class CR extends qs{getTypeName(){return"ResourceURL"}}function Mi(n){return n instanceof qs?n.changingThisBreaksApplicationSecurity:n}function _r(n,t){const e=mb(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see https://g.co/ng/security#xss)`)}return e===t}function mb(n){return n instanceof qs&&n.getTypeName()||null}class kR{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Wo(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(e){return null}}}class TR{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Wo(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=Wo(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0hl(t.trim())).join(", ")),this.buf.push(" ",o,'="',Cb(l),'"')}var n;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();Gf.hasOwnProperty(e)&&!vb.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Cb(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const FR=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,LR=/([^\#-~ |!])/g;function Cb(n){return n.replace(/&/g,"&").replace(FR,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(LR,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let pd;function Db(n,t){let e=null;try{pd=pd||function gb(n){const t=new TR(n);return function AR(){try{return!!(new window.DOMParser).parseFromString(Wo(""),"text/html")}catch(n){return!1}}()?new kR(t):t}(n);let i=t?String(t):"";e=pd.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=e.innerHTML,e=pd.getInertBodyElement(i)}while(i!==s);return Wo((new OR).sanitizeChildren(Yf(e)||e))}finally{if(e){const i=Yf(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Yf(n){return"content"in n&&function NR(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ut=(()=>((Ut=Ut||{})[Ut.NONE=0]="NONE",Ut[Ut.HTML=1]="HTML",Ut[Ut.STYLE=2]="STYLE",Ut[Ut.SCRIPT=3]="SCRIPT",Ut[Ut.URL=4]="URL",Ut[Ut.RESOURCE_URL=5]="RESOURCE_URL",Ut))();function Kf(n){const t=function pl(){const n=ke();return n&&n[12]}();return t?t.sanitize(Ut.URL,n)||"":_r(n,"URL")?Mi(n):hl(gt(n))}function Zf(n){return n.ngOriginalError}class qr{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&Zf(t);for(;e&&Zf(e);)e=Zf(e);return e||null}}const Xf=new Map;let JR=0;const ep="__ngContext__";function qn(n,t){hi(t)?(n[ep]=t[20],function t1(n){Xf.set(n[20],n)}(t)):n[ep]=t}function ml(n){const t=n[ep];return"number"==typeof t?function xb(n){return Xf.get(n)||null}(t):t||null}function tp(n){const t=ml(n);return t?hi(t)?t:t.lView:null}const u1=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(qt))();function Yr(n){return n instanceof Function?n():n}var xi=(()=>((xi=xi||{})[xi.Important=1]="Important",xi[xi.DashCase=2]="DashCase",xi))();function ip(n,t){return undefined(n,t)}function gl(n){const t=n[3];return tr(t)?t[3]:t}function rp(n){return Fb(n[13])}function sp(n){return Fb(n[4])}function Fb(n){for(;null!==n&&!tr(n);)n=n[4];return n}function Yo(n,t,e,i,r){if(null!=i){let s,o=!1;tr(i)?s=i:hi(i)&&(o=!0,i=i[0]);const a=Cn(i);0===n&&null!==e?null==r?jb(t,e,a):Ys(t,e,a,r||null,!0):1===n&&null!==e?Ys(t,e,a,r||null,!0):2===n?function Kb(n,t,e){const i=md(n,t);i&&function x1(n,t,e,i){dn(n)?n.removeChild(t,e,i):t.removeChild(e)}(n,i,t,e)}(t,a,o):3===n&&t.destroyNode(a),null!=s&&function T1(n,t,e,i,r){const s=e[7];s!==Cn(e)&&Yo(t,n,i,s,r);for(let a=10;a0&&(n[e-1][4]=i[4]);const s=rd(n,10+t);!function v1(n,t){_l(n,t,t[11],2,null,null),t[0]=null,t[6]=null}(i[1],i);const o=s[19];null!==o&&o.detachView(s[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function Bb(n,t){if(!(128&t[2])){const e=t[11];dn(e)&&e.destroyNode&&_l(n,t,e,3,null,null),function w1(n){let t=n[13];if(!t)return cp(n[1],n);for(;t;){let e=null;if(hi(t))e=t[13];else{const i=t[10];i&&(e=i)}if(!e){for(;t&&!t[4]&&t!==n;)hi(t)&&cp(t[1],t),t=t[3];null===t&&(t=n),hi(t)&&cp(t[1],t),e=t&&t[4]}t=e}}(t)}}function cp(n,t){if(!(128&t[2])){t[2]&=-65,t[2]|=128,function M1(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=c]():i[r=-c].unsubscribe(),s+=2}else{const o=i[r=e[s+1]];e[s].call(o)}if(null!==i){for(let s=r+1;ss?"":r[f+1].toLowerCase();const k=8&i?w:null;if(k&&-1!==Xb(k,c,0)||2&i&&c!==w){if(rr(i))return!1;o=!0}}}}else{if(!o&&!rr(i)&&!rr(l))return!1;if(o&&rr(l))continue;o=!1,i=l|1&i}}return rr(i)||o}function rr(n){return 0==(1&n)}function O1(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let s=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""!==r&&!rr(o)&&(t+=n0(s,r),r=""),i=o,s=s||!rr(i);e++}return""!==r&&(t+=n0(s,r)),t}const _t={};function Ee(n){r0(Lt(),ke(),ni()+n,!1)}function r0(n,t,e,i){if(!i)if(3==(3&t[2])){const s=n.preOrderCheckHooks;null!==s&&Qc(t,s,e)}else{const s=n.preOrderHooks;null!==s&&Zc(t,s,0,e)}vs(e)}const l0=new De("ENVIRONMENT_INITIALIZER"),c0=new De("INJECTOR_DEF_TYPES");function q1(...n){return{\u0275providers:d0(0,n)}}function d0(n,...t){const e=[],i=new Set;let r;return Wr(t,s=>{const o=s;pp(o,e,[],i)&&(r||(r=[]),r.push(o))}),void 0!==r&&u0(r,e),e}function u0(n,t){for(let e=0;e{t.push(s)})}}function pp(n,t,e,i){if(!(n=pt(n)))return!1;let r=null,s=hy(n);const o=!s&&Qt(n);if(s||o){if(o&&!o.standalone)return!1;r=n}else{const l=n.ngModule;if(s=hy(l),!s)return!1;r=l}const a=i.has(r);if(o){if(a)return!1;if(i.add(r),o.dependencies){const l="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const c of l)pp(c,t,e,i)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;i.add(r);try{Wr(s.imports,d=>{pp(d,t,e,i)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&u0(c,t)}if(!a){const c=Ws(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:jt},{provide:c0,useValue:r,multi:!0},{provide:l0,useValue:()=>te(r),multi:!0})}const l=s.providers;null==l||a||Wr(l,d=>{t.push(d)})}}return r!==n&&void 0!==n.providers}const Y1=Yt({provide:String,useValue:Yt});function mp(n){return null!==n&&"object"==typeof n&&Y1 in n}function Ks(n){return"function"==typeof n}const gp=new De("INJECTOR",-1);class p0{get(t,e=al){if(e===al){const i=new Error(`NullInjectorError: No provider for ${Kt(t)}!`);throw i.name="NullInjectorError",i}return e}}const _p=new De("Set Injector scope."),vd={},Q1={};let vp;function yp(){return void 0===vp&&(vp=new p0),vp}class Qs{}class m0 extends Qs{constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,wp(t,o=>this.processProvider(o)),this.records.set(gp,Ko(void 0,this)),r.has("environment")&&this.records.set(Qs,Ko(void 0,this));const s=this.records.get(_p);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(c0.multi,jt,at.Self))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}get(t,e=al,i=at.Default){this.assertNotDestroyed();const r=ad(this),s=pr(void 0);try{if(!(i&at.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function tP(n){return"function"==typeof n||"object"==typeof n&&n instanceof De}(t)&&lf(t);a=l&&this.injectableDefInScope(l)?Ko(bp(t),vd):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&at.Self?yp():this.parent).get(t,e=i&at.Optional&&e===al?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[od]=o[od]||[]).unshift(Kt(t)),r)throw o;return function sR(n,t,e,i){const r=n[od];throw t[ib]&&r.unshift(t[ib]),n.message=function oR(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=Kt(t);if(Array.isArray(t))r=t.map(Kt).join(" -> ");else if("object"==typeof t){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):Kt(a)))}r=`{${s.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(tR,"\n ")}`}("\n"+n.message,r,e,i),n.ngTokenPath=r,n[od]=null,n}(o,t,"R3InjectorError",this.source)}throw o}finally{pr(s),ad(r)}}resolveInjectorInitializers(){const t=ad(this),e=pr(void 0);try{const i=this.get(l0.multi,jt,at.Self);for(const r of i)r()}finally{ad(t),pr(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(Kt(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Be(205,!1)}processProvider(t){let e=Ks(t=pt(t))?t:pt(t&&t.provide);const i=function X1(n){return mp(n)?Ko(void 0,n.useValue):Ko(g0(n),vd)}(t);if(Ks(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ko(void 0,vd,!0),r.factory=()=>Uf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===vd&&(e.value=Q1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function eP(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=pt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function bp(n){const t=lf(n),e=null!==t?t.factory:Ws(n);if(null!==e)return e;if(n instanceof De)throw new Be(204,!1);if(n instanceof Function)return function Z1(n){const t=n.length;if(t>0)throw ol(t,"?"),new Be(204,!1);const e=function jA(n){const t=n&&(n[Bc]||n[fy]);if(t){const e=function UA(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new Be(204,!1)}function g0(n,t,e){let i;if(Ks(n)){const r=pt(n);return Ws(r)||bp(r)}if(mp(n))i=()=>pt(n.useValue);else if(function f0(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...Uf(n.deps||[]));else if(function h0(n){return!(!n||!n.useExisting)}(n))i=()=>te(pt(n.useExisting));else{const r=pt(n&&(n.useClass||n.provide));if(!function J1(n){return!!n.deps}(n))return Ws(r)||bp(r);i=()=>new r(...Uf(n.deps))}return i}function Ko(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function nP(n){return!!n.\u0275providers}function wp(n,t){for(const e of n)Array.isArray(e)?wp(e,t):nP(e)?wp(e.\u0275providers,t):t(e)}function _0(n,t=null,e=null,i){const r=v0(n,t,e,i);return r.resolveInjectorInitializers(),r}function v0(n,t=null,e=null,i,r=new Set){const s=[e||jt,q1(n)];return i=i||("object"==typeof n?void 0:Kt(n)),new m0(s,t||yp(),i||null,r)}let Jt=(()=>{class n{static create(e,i){var r;if(Array.isArray(e))return _0({name:""},i,e,"");{const s=null!==(r=e.name)&&void 0!==r?r:"";return _0({name:s},e.parent,e.providers,s)}}}return n.THROW_IF_NOT_FOUND=al,n.NULL=new p0,n.\u0275prov=Ie({token:n,providedIn:"any",factory:()=>te(gp)}),n.__NG_ELEMENT_ID__=-1,n})();function x(n,t=at.Default){const e=ke();return null===e?te(n,t):qy(Sn(),e,pt(n),t)}function bs(){throw new Error("invalid")}function bd(n,t){return n<<17|t<<2}function sr(n){return n>>17&32767}function Tp(n){return 2|n}function Kr(n){return(131068&n)>>2}function Ap(n,t){return-131069&n|t<<2}function Ip(n){return 1|n}function B0(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;i22&&r0(n,t,22,!1),e(i,r)}finally{vs(s)}}function H0(n,t,e){if(mf(t)){const r=t.directiveEnd;for(let s=t.directiveStart;s0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(a)!=l&&a.push(l),a.push(i,r,o)}}function q0(n,t){null!==n.hostBindings&&n.hostBindings(1,t)}function Y0(n,t){t.flags|=2,(n.components||(n.components=[])).push(t.index)}function GP(n,t,e){if(e){if(t.exportAs)for(let i=0;i0&&Gp(e)}}function Gp(n){for(let i=rp(n);null!==i;i=sp(i))for(let r=10;r0&&Gp(s)}const e=n[1].components;if(null!==e)for(let i=0;i0&&Gp(r)}}function XP(n,t){const e=Ci(t,n),i=e[1];(function JP(n,t){for(let e=t.length;ePromise.resolve(null))();function J0(n){return n[7]||(n[7]=[])}function ew(n){return n.cleanup||(n.cleanup=[])}function tw(n,t,e){return(null===n||nr(n))&&(e=function uI(n){for(;Array.isArray(n);){if("object"==typeof n[1])return n;n=n[0]}return null}(e[t.index])),e[11]}function nw(n,t){const e=n[9],i=e?e.get(qr,null):null;i&&i.handleError(t)}function iw(n,t,e,i,r){for(let s=0;s=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Jc(r.hostAttrs,e=Jc(e,r.hostAttrs))}}(i)}function Zp(n){return n===Ao?{}:n===jt?[]:n}function pO(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function mO(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,s)=>{t(i,r,s),e(i,r,s)}:t}function gO(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}let xd=null;function Zs(){if(!xd){const n=qt.Symbol;if(n&&n.iterator)xd=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ea(Cn(Oe[i.index])):i.index;if(dn(e)){let Oe=null;if(!a&&l&&(Oe=function SO(n,t,e,i){const r=n.cleanup;if(null!=r)for(let s=0;sl?a[l]:null}"string"==typeof o&&(s+=2)}return null}(n,t,r,i.index)),null!==Oe)(Oe.__ngLastListenerFn__||Oe).__ngNextListenerFn__=s,Oe.__ngLastListenerFn__=s,k=!1;else{s=tm(i,t,f,s,!1);const ft=e.listen(ce,r,s);w.push(s,ft),d&&d.push(r,he,Te,Te+1)}}else s=tm(i,t,f,s,!0),ce.addEventListener(r,s,o),w.push(s),d&&d.push(r,he,Te,o)}else s=tm(i,t,f,s,!1);const j=i.outputs;let K;if(k&&null!==j&&(K=j[r])){const ae=K.length;if(ae)for(let ce=0;ce0;)t=t[15],n--;return t}(n,mt.lFrame.contextLView))[8]}(n)}function kO(n,t){let e=null;const i=function F1(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(0==(1&e))return t[e+1]}return null}(n);for(let r=0;r=0}const Tn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Lw(n){return n.substring(Tn.key,Tn.keyEnd)}function Nw(n,t){const e=Tn.textEnd;return e===t?-1:(t=Tn.keyEnd=function FO(n,t,e){for(;t32;)t++;return t}(n,Tn.key=t,e),da(n,t,e))}function da(n,t,e){for(;t=0;e=Nw(t,e))Ei(n,Lw(t),!0)}function ar(n,t,e,i){const r=ke(),s=Lt(),o=Gr(2);s.firstUpdatePass&&zw(s,n,o,i),t!==_t&&Yn(r,o,t)&&Gw(s,s.data[ni()],r,r[11],n,r[o+1]=function WO(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=Kt(Mi(n)))),n}(t,e),i,o)}function Uw(n,t){return t>=n.expandoStartIndex}function zw(n,t,e,i){const r=n.data;if(null===r[e+1]){const s=r[ni()],o=Uw(n,e);qw(s,i)&&null===t&&!o&&(t=!1),t=function HO(n,t,e,i){const r=kf(n);let s=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=Dl(e=im(null,n,t,e,i),t.attrs,i),s=null);else{const o=t.directiveStylingLast;if(-1===o||n[o]!==r)if(e=im(r,n,t,e,i),null===s){let l=function jO(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Kr(i))return n[sr(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=im(null,n,t,l[1],i),l=Dl(l,t.attrs,i),function UO(n,t,e,i){n[sr(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else s=function zO(n,t,e){let i;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)}else d=e;if(r)if(0!==l){const w=sr(n[a+1]);n[i+1]=bd(w,a),0!==w&&(n[w+1]=Ap(n[w+1],i)),n[a+1]=function yP(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=bd(a,0),0!==a&&(n[a+1]=Ap(n[a+1],i)),a=i;else n[i+1]=bd(l,0),0===a?a=i:n[l+1]=Ap(n[l+1],i),l=i;c&&(n[i+1]=Tp(n[i+1])),Fw(n,d,i,!0),Fw(n,d,i,!1),function AO(n,t,e,i,r){const s=r?n.residualClasses:n.residualStyles;null!=s&&"string"==typeof t&&$o(s,t)>=0&&(e[i+1]=Ip(e[i+1]))}(t,d,n,i,s),o=bd(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,i)}}function im(n,t,e,i,r){let s=null;const o=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),d=c?l[1]:l,f=null===d;let w=e[r+1];w===_t&&(w=f?jt:void 0);let k=f?Vf(w,i):d===i?w:void 0;if(c&&!Ad(k)&&(k=Vf(l,i)),Ad(k)&&(a=k,o))return a;const j=n[r+1];r=o?sr(j):Kr(j)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Vf(l,i))}return a}function Ad(n){return void 0!==n}function qw(n,t){return 0!=(n.flags&(t?16:32))}function Ue(n,t=""){const e=ke(),i=Lt(),r=n+22,s=i.firstCreatePass?Zo(i,r,1,t,null):i.data[r],o=e[r]=function op(n,t){return dn(n)?n.createText(t):n.createTextNode(t)}(e[11],t);gd(i,e,o,s),mr(s,!1)}function Kn(n){return Ln("",n,""),Kn}function Ln(n,t,e){const i=ke(),r=ta(i,n,t,e);return r!==_t&&Qr(i,ni(),r),Ln}function El(n,t,e,i,r){const s=ke(),o=na(s,n,t,e,i,r);return o!==_t&&Qr(s,ni(),o),El}function rm(n,t,e,i,r,s,o){const a=ke(),l=ia(a,n,t,e,i,r,s,o);return l!==_t&&Qr(a,ni(),l),rm}function sm(n,t,e,i,r,s,o,a,l,c,d){const f=ke(),w=sa(f,n,t,e,i,r,s,o,a,l,c,d);return w!==_t&&Qr(f,ni(),w),sm}function om(n,t,e){!function lr(n,t,e,i){const r=Lt(),s=Gr(2);r.firstUpdatePass&&zw(r,null,s,i);const o=ke();if(e!==_t&&Yn(o,s,e)){const a=r.data[ni()];if(qw(a,i)&&!Uw(r,s)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=sf(l,e||"")),Jp(r,a,o,e,i)}else!function GO(n,t,e,i,r,s,o,a){r===_t&&(r=jt);let l=0,c=0,d=0((He=He||{})[He.LocaleId=0]="LocaleId",He[He.DayPeriodsFormat=1]="DayPeriodsFormat",He[He.DayPeriodsStandalone=2]="DayPeriodsStandalone",He[He.DaysFormat=3]="DaysFormat",He[He.DaysStandalone=4]="DaysStandalone",He[He.MonthsFormat=5]="MonthsFormat",He[He.MonthsStandalone=6]="MonthsStandalone",He[He.Eras=7]="Eras",He[He.FirstDayOfWeek=8]="FirstDayOfWeek",He[He.WeekendRange=9]="WeekendRange",He[He.DateFormat=10]="DateFormat",He[He.TimeFormat=11]="TimeFormat",He[He.DateTimeFormat=12]="DateTimeFormat",He[He.NumberSymbols=13]="NumberSymbols",He[He.NumberFormats=14]="NumberFormats",He[He.CurrencyCode=15]="CurrencyCode",He[He.CurrencySymbol=16]="CurrencySymbol",He[He.CurrencyName=17]="CurrencyName",He[He.Currencies=18]="Currencies",He[He.Directionality=19]="Directionality",He[He.PluralCase=20]="PluralCase",He[He.ExtraData=21]="ExtraData",He))();const ha="en-US";let dC=ha;function cm(n,t,e,i,r){if(n=pt(n),Array.isArray(n))for(let s=0;s>20;if(Ks(n)||!n.multi){const k=new el(l,r,x),j=um(a,t,r?d:d+w,f);-1===j?(nd(nl(c,o),s,a),dm(s,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(k),o.push(k)):(e[j]=k,o[j]=k)}else{const k=um(a,t,d+w,f),j=um(a,t,d,d+w),K=k>=0&&e[k],ae=j>=0&&e[j];if(r&&!ae||!r&&!K){nd(nl(c,o),s,a);const ce=function cL(n,t,e,i,r){const s=new el(n,e,x);return s.multi=[],s.index=t,s.componentProviders=0,FC(s,r,i&&!e),s}(r?lL:aL,e.length,r,i,l);!r&&ae&&(e[j].providerFactory=ce),dm(s,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(ce),o.push(ce)}else dm(s,n,k>-1?k:j,FC(e[r?j:k],l,!r&&i));!r&&i&&ae&&e[j].componentProviders++}}}function dm(n,t,e,i){const r=Ks(t),s=function K1(n){return!!n.useClass}(t);if(r||s){const l=(s?pt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[i,l]):c[d+1].push(i,l)}else c.push(e,l)}}}function FC(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function um(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function oL(n,t,e){const i=Lt();if(i.firstCreatePass){const r=nr(n);cm(e,i.data,i.blueprint,r,!0),cm(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class uL{resolveComponentFactory(t){throw function dL(n){const t=Error(`No component factory found for ${Kt(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let io=(()=>{class n{}return n.NULL=new uL,n})();class Ds{}class NC{}class BC{}function fL(){return pa(Sn(),ke())}function pa(n,t){return new Je(Bi(n,t))}let Je=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=fL,n})();function pL(n){return n instanceof Je?n.nativeElement:n}class Tl{}let Xr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function gL(){const n=ke(),e=Ci(Sn().index,n);return function mL(n){return n[11]}(hi(e)?e:n)}(),n})(),_L=(()=>{class n{}return n.\u0275prov=Ie({token:n,providedIn:"root",factory:()=>null}),n})();class ro{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const vL=new ro("14.0.1"),fm={};function Ld(n,t,e,i,r=!1){for(;null!==e;){const s=t[e.index];if(null!==s&&i.push(Cn(s)),tr(s))for(let a=10;a-1&&(lp(t,i),rd(e,i))}this._attachedToViewContainer=!1}Bb(this._lView[1],this._lView)}onDestroy(t){$0(this._lView[1],this._lView,null,t)}markForCheck(){Wp(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){!function Yp(n,t,e){const i=t[10];i.begin&&i.begin();try{Jo(n,t,n.template,e)}catch(r){throw nw(t,r),r}finally{i.end&&i.end()}}(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Be(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function b1(n,t){_l(n,t,t[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Be(902,"");this._appRef=t}}class yL extends Al{constructor(t){super(t),this._view=t}detectChanges(){X0(this._view)}checkNoChanges(){}get context(){return null}}class pm extends io{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Qt(t);return new mm(e,this.ngModule)}}function VC(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class wL{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){const r=this.injector.get(t,fm,i);return r!==fm||e===fm?r:this.parentInjector.get(t,e,i)}}class mm extends BC{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function H1(n){return n.map(V1).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return VC(this.componentDef.inputs)}get outputs(){return VC(this.componentDef.outputs)}create(t,e,i,r){let s=(r=r||this.ngModule)instanceof Qs?r:null==r?void 0:r.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new wL(t,s):t,a=o.get(Tl,Ey),l=o.get(_L,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",f=i?function z0(n,t,e){if(dn(n))return n.selectRootElement(t,e===Ji.ShadowDom);let i="string"==typeof t?n.querySelector(t):t;return i.textContent="",i}(c,i,this.componentDef.encapsulation):ap(a.createRenderer(null,this.componentDef),d,function bL(n){const t=n.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(d)),w=this.componentDef.onPush?288:272,k=function pw(n,t){return{components:[],scheduler:n||u1,clean:tO,playerHandler:t||null,flags:0}}(),j=Dd(0,null,null,1,0,null,null,null,null,null),K=vl(null,j,k,w,null,null,a,c,l,o,null);let ae,ce;qc(K);try{const Te=function hw(n,t,e,i,r,s){const o=e[1];e[22]=n;const l=Zo(o,22,2,"#host",null),c=l.mergedAttrs=t.hostAttrs;null!==c&&(Md(l,c,!0),null!==n&&(Xc(r,n,c),null!==l.classes&&fp(r,n,l.classes),null!==l.styles&&Zb(r,n,l.styles)));const d=i.createRenderer(n,t),f=vl(e,j0(t),null,t.onPush?32:16,e[22],l,i,d,s||null,null,null);return o.firstCreatePass&&(nd(nl(l,e),o,t.type),Y0(o,l),K0(l,e.length,1)),Ed(e,f),e[22]=f}(f,this.componentDef,K,a,c);if(f)if(i)Xc(c,f,["ng-version",vL.full]);else{const{attrs:he,classes:Oe}=function j1(n){const t=[],e=[];let i=1,r=2;for(;i0&&fp(c,f,Oe.join(" "))}if(ce=Cf(j,22),void 0!==e){const he=ce.projection=[];for(let Oe=0;Oee()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class gm extends NC{constructor(t){super(),this.moduleType=t}create(t){return new HC(this.moduleType,t)}}class ML extends Ds{constructor(t,e,i){super(),this.componentFactoryResolver=new pm(this),this.instance=null;const r=new m0([...t,{provide:Ds,useValue:this},{provide:io,useValue:this.componentFactoryResolver}],e||yp(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Nd(n,t=null,e=null){return new ML(n,t,e).injector}function Il(n,t){const e=n[t];return e===_t?void 0:e}function Jr(n,t){const e=Lt();let i;const r=n+22;e.firstCreatePass?(i=function BL(n,t){if(t)for(let e=t.length-1;e>=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const s=i.factory||(i.factory=Ws(i.type)),o=pr(x);try{const a=ed(!1),l=s();return ed(a),function EO(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,ke(),r,l),l}finally{pr(o)}}function so(n,t,e){const i=n+22,r=ke(),s=Fo(r,i);return Rl(r,i)?function jC(n,t,e,i,r,s){const o=t+e;return Yn(n,o,r)?br(n,o+1,s?i.call(s,r):i(r)):Il(n,o+1)}(r,ti(),t,s.transform,e,s):s.transform(e)}function vm(n,t,e,i){const r=n+22,s=ke(),o=Fo(s,r);return Rl(s,r)?function UC(n,t,e,i,r,s,o){const a=t+e;return Xs(n,a,r,s)?br(n,a+2,o?i.call(o,r,s):i(r,s)):Il(n,a+2)}(s,ti(),t,o.transform,e,i,o):o.transform(e,i)}function Rl(n,t){return n[1].data[t].pure}function ym(n){return t=>{setTimeout(n,void 0,t)}}const je=class UL extends ue{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){var r,s,o;let a=t,l=e||(()=>null),c=i;if(t&&"object"==typeof t){const f=t;a=null===(r=f.next)||void 0===r?void 0:r.bind(f),l=null===(s=f.error)||void 0===s?void 0:s.bind(f),c=null===(o=f.complete)||void 0===o?void 0:o.bind(f)}this.__isAsync&&(l=ym(l),a&&(a=ym(a)),c&&(c=ym(c)));const d=super.subscribe({next:a,error:l,complete:c});return t instanceof X&&t.add(d),d}};function zL(){return this._results[Zs()]()}class ma{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=Zs(),i=ma.prototype;i[e]||(i[e]=zL)}get changes(){return this._changes||(this._changes=new je)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const i=this;i.dirty=!1;const r=Di(t);(this._changesDetected=!function GI(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=WL,n})();const $L=_n,GL=class extends $L{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tViews,r=vl(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[19];return null!==o&&(r[19]=o.createEmbeddedView(i)),yl(i,r,t),new Al(r)}};function WL(){return Bd(Sn(),ke())}function Bd(n,t){return 4&n.type?new GL(t,n,pa(n,t)):null}let An=(()=>{class n{}return n.__NG_ELEMENT_ID__=qL,n})();function qL(){return YC(Sn(),ke())}const YL=An,WC=class extends YL{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return pa(this._hostTNode,this._hostLView)}get injector(){return new Vo(this._hostTNode,this._hostLView)}get parentInjector(){const t=td(this._hostTNode,this._hostLView);if(Uy(t)){const e=Bo(t,this._hostLView),i=No(t);return new Vo(e[1].data[i+8],e)}return new Vo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=qC(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){let r,s;"number"==typeof i?r=i:null!=i&&(r=i.index,s=i.injector);const o=t.createEmbeddedView(e||{},s);return this.insert(o,r),o}createComponent(t,e,i,r,s){const o=t&&!function sl(n){return"function"==typeof n}(t);let a;if(o)a=e;else{const f=e||{};a=f.index,i=f.injector,r=f.projectableNodes,s=f.environmentInjector||f.ngModuleRef}const l=o?t:new mm(Qt(t)),c=i||this.parentInjector;if(!s&&null==l.ngModule){const w=(o?c:this.parentInjector).get(Qs,null);w&&(s=w)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const i=t._lView,r=i[1];if(function fI(n){return tr(n[3])}(i)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const f=i[3],w=new WC(f,f[6],f[3]);w.detach(w.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function C1(n,t,e,i){const r=10+i,s=e.length;i>0&&(e[r-1][4]=t),i0)i.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let f=10;f{class n{constructor(e){this.appInits=e,this.resolve=Hd,this.reject=Hd,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{s.subscribe({complete:a,error:l})});e.push(o)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(te(Am,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ol=new De("AppId",{providedIn:"root",factory:function vD(){return`${Im()}${Im()}${Im()}`}});function Im(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const yD=new De("Platform Initializer"),Ud=new De("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),bD=new De("appBootstrapListener"),fn=new De("AnimationModuleType");let DN=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Er=new De("LocaleId",{providedIn:"root",factory:()=>ld(Er,at.Optional|at.SkipSelf)||function EN(){return"undefined"!=typeof $localize&&$localize.locale||ha}()});class xN{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let Rm=(()=>{class n{compileModuleSync(e){return new gm(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),s=Yr(bi(e).declarations).reduce((o,a)=>{const l=Qt(a);return l&&o.push(new mm(l)),o},[]);return new xN(i,s)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const kN=(()=>Promise.resolve(0))();function Pm(n){"undefined"==typeof Zone?kN.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class et{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new je(!1),this.onMicrotaskEmpty=new je(!1),this.onStable=new je(!1),this.onError=new je(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function TN(){let n=qt.requestAnimationFrame,t=qt.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function RN(n){const t=()=>{!function IN(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(qt,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Fm(n),n.isCheckStableRunning=!0,Om(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Fm(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,s,o,a)=>{try{return wD(n),e.invokeTask(r,s,o,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||n.shouldCoalesceRunChangeDetection)&&t(),CD(n)}},onInvoke:(e,i,r,s,o,a,l)=>{try{return wD(n),e.invoke(r,s,o,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),CD(n)}},onHasTask:(e,i,r,s)=>{e.hasTask(r,s),i===r&&("microTask"==s.change?(n._hasPendingMicrotasks=s.microTask,Fm(n),Om(n)):"macroTask"==s.change&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,i,r,s)=>(e.handleError(r,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!et.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(et.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,t,AN,Hd,Hd);try{return s.runTask(o,e,i)}finally{s.cancelTask(o)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const AN={};function Om(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Fm(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function wD(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function CD(n){n._nesting--,Om(n)}class PN{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new je,this.onMicrotaskEmpty=new je,this.onStable=new je,this.onError=new je}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}const DD=new De(""),zd=new De("");let Fl,Lm=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,Fl||(function ON(n){Fl=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{et.assertNotInAngularZone(),Pm(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Pm(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:s,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(Nm),te(zd))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),Nm=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){var r;return null!==(r=null==Fl?void 0:Fl.findTestabilityInTree(this,e,i))&&void 0!==r?r:null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),Mr=null;const ED=new De("AllowMultipleToken"),MD=new De("PlatformOnDestroy");class xD{constructor(t,e){this.name=t,this.token=e}}function kD(n,t,e=[]){const i=`Platform: ${t}`,r=new De(i);return(s=[])=>{let o=Bm();if(!o||o.injector.get(ED,!1)){const a=[...e,...s,{provide:r,useValue:!0}];n?n(a):function NN(n){if(Mr&&!Mr.get(ED,!1))throw new Be(400,"");Mr=n;const t=n.get(AD);(function SD(n){const t=n.get(yD,null);t&&t.forEach(e=>e())})(n)}(function TD(n=[],t){return Jt.create({name:t,providers:[{provide:_p,useValue:"platform"},{provide:MD,useValue:()=>Mr=null},...n]})}(a,i))}return function VN(n){const t=Bm();if(!t)throw new Be(401,"");return t}()}}function Bm(){var n;return null!==(n=null==Mr?void 0:Mr.get(AD))&&void 0!==n?n:null}let AD=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function HN(n,t){let e;return e="noop"===n?new PN:("zone.js"===n?void 0:n)||new et(t),e}(null==i?void 0:i.ngZone,function ID(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),s=[{provide:et,useValue:r}];return r.run(()=>{const o=Jt.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(qr,null);if(!l)throw new Be(402,"");return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{$d(this._modules,a),c.unsubscribe()})}),function RD(n,t,e){try{const i=e();return Cl(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(jd);return c.runInitializers(),c.donePromise.then(()=>(function uC(n){yi(n,"Expected localeId to be defined"),"string"==typeof n&&(dC=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Er,ha)||ha),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=PD({},i);return function FN(n,t,e){const i=new gm(e);return Promise.resolve(i)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const i=e.injector.get(Ll);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Be(403,"");e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Be(404,"");this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(MD,null);null==e||e(),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(te(Jt))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function PD(n,t){return Array.isArray(t)?t.reduce(PD,n):Object.assign(Object.assign({},n),t)}let Ll=(()=>{class n{constructor(e,i,r,s){this._zone=e,this._injector=i,this._exceptionHandler=r,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new J(l=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{l.next(this._stable),l.complete()})}),a=new J(l=>{let c;this._zone.runOutsideAngular(()=>{c=this._zone.onStable.subscribe(()=>{et.assertNotInAngularZone(),Pm(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,l.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{et.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{l.next(!1)}))});return()=>{c.unsubscribe(),d.unsubscribe()}});this.isStable=$n(o,a.pipe(dy()))}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(e,i){const r=e instanceof BC;if(!this._initStatus.done)throw!r&&function _a(n){const t=Qt(n)||Jn(n)||ei(n);return null!==t&&t.standalone}(e),new Be(405,false);let s;s=r?e:this._injector.get(io).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const o=function LN(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Ds),l=s.create(Jt.NULL,[],i||s.selector,o),c=l.location.nativeElement,d=l.injector.get(DD,null);return null==d||d.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),$d(this.components,l),null==d||d.unregisterApplication(c)}),this._loadComponent(l),l}tick(){if(this._runningTick)throw new Be(101,"");try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;$d(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(bD,[]).concat(this._bootstrapListeners).forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>$d(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Be(406,false);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(Jt),te(qr),te(jd))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function $d(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let FD=!0,en=(()=>{class n{}return n.__NG_ELEMENT_ID__=zN,n})();function zN(n){return function $N(n,t,e){if(zc(n)&&!e){const i=Ci(n.index,t);return new Al(i,i)}return 47&n.type?new Al(t[16],t):null}(Sn(),ke(),16==(16&n))}class HD{constructor(){}supports(t){return bl(t)}create(t){return new QN(t)}}const KN=(n,t)=>t;class QN{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||KN}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,s=null;for(;e||i;){const o=!i||e&&e.currentIndex{o=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,o)?(i&&(e=this._verifyReinsertion(e,a,o,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,o,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,r)):t=this._addAfter(new ZN(e,i),s,r),t}_verifyReinsertion(t,e,i,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==s?t=this._reinsertAfter(s,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,s=t._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new jD),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new jD),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class ZN{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class XN{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class jD{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new XN,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function UD(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const s=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,s)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const i=new eB(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class eB{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function $D(){return new es([new HD])}let es=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||$D()),deps:[[n,new ir,new Hn]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Be(901,"")}}return n.\u0275prov=Ie({token:n,providedIn:"root",factory:$D}),n})();function GD(){return new Nl([new zD])}let Nl=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||GD()),deps:[[n,new ir,new Hn]]}}find(e){const i=this.factories.find(s=>s.supports(e));if(i)return i;throw new Be(901,"")}}return n.\u0275prov=Ie({token:n,providedIn:"root",factory:GD}),n})();const iB=kD(null,"core",[]);let rB=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(te(Ll))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();function ts(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}let qd=null;function Sr(){return qd}const ct=new De("DocumentToken");let Bl=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:function(){return function lB(){return te(WD)}()},providedIn:"platform"}),n})();const cB=new De("Location Initialized");let WD=(()=>{class n extends Bl{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Sr().getBaseHref(this._doc)}onPopState(e){const i=Sr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Sr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(e){this.location.pathname=e}pushState(e,i,r){qD()?this._history.pushState(e,i,r):this.location.hash=r}replaceState(e,i,r){qD()?this._history.replaceState(e,i,r):this.location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(te(ct))},n.\u0275prov=Ie({token:n,factory:function(){return function dB(){return new WD(te(ct))}()},providedIn:"platform"}),n})();function qD(){return!!window.history.pushState}function zm(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function YD(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function ns(n){return n&&"?"!==n[0]?"?"+n:n}let ya=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:function(){return function uB(){const n=te(ct).location;return new KD(te(Bl),n&&n.origin||"")}()},providedIn:"root"}),n})();const $m=new De("appBaseHref");let KD=(()=>{class n extends ya{constructor(e,i){if(super(),this._platformLocation=e,this._removeListenerFns=[],null==i&&(i=this._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=i}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return zm(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+ns(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,s){const o=this.prepareExternalUrl(r+ns(s));this._platformLocation.pushState(e,i,o)}replaceState(e,i,r,s){const o=this.prepareExternalUrl(r+ns(s));this._platformLocation.replaceState(e,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){var i,r;null===(r=(i=this._platformLocation).historyGo)||void 0===r||r.call(i,e)}}return n.\u0275fac=function(e){return new(e||n)(te(Bl),te($m,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),hB=(()=>{class n extends ya{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=zm(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,s){let o=this.prepareExternalUrl(r+ns(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,i,o)}replaceState(e,i,r,s){let o=this.prepareExternalUrl(r+ns(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){var i,r;null===(r=(i=this._platformLocation).historyGo)||void 0===r||r.call(i,e)}}return n.\u0275fac=function(e){return new(e||n)(te(Bl),te($m,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),Vl=(()=>{class n{constructor(e){this._subject=new je,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._baseHref=YD(QD(i)),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){var e;null===(e=this._urlChangeSubscription)||void 0===e||e.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+ns(i))}normalize(e){return n.stripTrailingSlash(function pB(n,t){return n&&t.startsWith(n)?t.substring(n.length):t}(this._baseHref,QD(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+ns(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+ns(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){var i,r;null===(r=(i=this._locationStrategy).historyGo)||void 0===r||r.call(i,e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{var i;const r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),0===this._urlChangeListeners.length&&(null===(i=this._urlChangeSubscription)||void 0===i||i.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=ns,n.joinWithSlash=zm,n.stripTrailingSlash=YD,n.\u0275fac=function(e){return new(e||n)(te(ya))},n.\u0275prov=Ie({token:n,factory:function(){return function fB(){return new Vl(te(ya))}()},providedIn:"root"}),n})();function QD(n){return n.replace(/\/index.html$/,"")}var fi=(()=>((fi=fi||{})[fi.Decimal=0]="Decimal",fi[fi.Percent=1]="Percent",fi[fi.Currency=2]="Currency",fi[fi.Scientific=3]="Scientific",fi))(),st=(()=>((st=st||{})[st.Decimal=0]="Decimal",st[st.Group=1]="Group",st[st.List=2]="List",st[st.PercentSign=3]="PercentSign",st[st.PlusSign=4]="PlusSign",st[st.MinusSign=5]="MinusSign",st[st.Exponential=6]="Exponential",st[st.SuperscriptingExponent=7]="SuperscriptingExponent",st[st.PerMille=8]="PerMille",st[st.Infinity=9]="Infinity",st[st.NaN=10]="NaN",st[st.TimeSeparator=11]="TimeSeparator",st[st.CurrencyDecimal=12]="CurrencyDecimal",st[st.CurrencyGroup=13]="CurrencyGroup",st))();function ji(n,t){const e=si(n),i=e[He.NumberSymbols][t];if(void 0===i){if(t===st.CurrencyDecimal)return e[He.NumberSymbols][st.Decimal];if(t===st.CurrencyGroup)return e[He.NumberSymbols][st.Group]}return i}const HB=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function Xm(n){const t=parseInt(n);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+n);return t}function sE(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,s]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(s)}return null}let eg=(()=>{class n{constructor(e,i,r,s){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=s,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(bl(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(i=>this._toggleClass(i.key,i.currentValue)),e.forEachChangedItem(i=>this._toggleClass(i.key,i.currentValue)),e.forEachRemovedItem(i=>{i.previousValue&&this._toggleClass(i.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(i=>{if("string"!=typeof i.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Kt(i.item)}`);this._toggleClass(i.item,!0)}),e.forEachRemovedItem(i=>this._toggleClass(i.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(i=>this._toggleClass(i,!0)):Object.keys(e).forEach(i=>this._toggleClass(i,!!e[i])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(i=>this._toggleClass(i,!1)):Object.keys(e).forEach(i=>this._toggleClass(i,!1)))}_toggleClass(e,i){(e=e.trim())&&e.split(/\s+/g).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(x(es),x(Nl),x(Je),x(Xr))},n.\u0275dir=Me({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),n})();class XB{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ao=(()=>{class n{constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,s,o)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new XB(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)i.remove(null===s?void 0:s);else if(null!==s){const a=i.get(s);i.move(a,o),aE(a,r)}});for(let r=0,s=i.length;r{aE(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(x(An),x(_n),x(es))},n.\u0275dir=Me({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();function aE(n,t){n.context.$implicit=t.item}let zi=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new JB,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){lE("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){lE("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(x(An),x(_n))},n.\u0275dir=Me({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class JB{constructor(){this.$implicit=null,this.ngIf=null}}function lE(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${Kt(t)}'.`)}class tg{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let ba=(()=>{class n{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews&&e!==this._defaultUsed){this._defaultUsed=e;for(let i=0;i{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new tg(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(x(An),x(_n),x(ba,9))},n.\u0275dir=Me({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),n})(),cE=(()=>{class n{constructor(e,i,r){r._addDefault(new tg(e,i))}}return n.\u0275fac=function(e){return new(e||n)(x(An),x(_n),x(ba,9))},n.\u0275dir=Me({type:n,selectors:[["","ngSwitchDefault",""]]}),n})();function dr(n,t){return new Be(2100,"")}let hE=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw dr();return e.toUpperCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=ui({name:"uppercase",type:n,pure:!0}),n})(),ru=(()=>{class n{transform(e){return JSON.stringify(e,null,2)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=ui({name:"json",type:n,pure:!1}),n})(),fE=(()=>{class n{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=pE}transform(e,i=pE){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const r=this.differ.diff(e),s=i!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(o=>{this.keyValues.push(function mV(n,t){return{key:n,value:t}}(o.key,o.currentValue))})),(r||s)&&(this.keyValues.sort(i),this.compareFn=i),this.keyValues}}return n.\u0275fac=function(e){return new(e||n)(x(Nl,16))},n.\u0275pipe=ui({name:"keyvalue",type:n,pure:!1}),n})();function pE(n,t){const e=n.key,i=t.key;if(e===i)return 0;if(void 0===e)return 1;if(void 0===i)return-1;if(null===e)return 1;if(null===i)return-1;if("string"==typeof e&&"string"==typeof i)return e{class n{constructor(e){this._locale=e}transform(e,i,r){if(!function ig(n){return!(null==n||""===n||n!=n)}(e))return null;r=r||this._locale;try{return function WB(n,t,e){return function Qm(n,t,e,i,r,s,o=!1){let a="",l=!1;if(isFinite(n)){let c=function YB(n){let i,r,s,o,a,t=Math.abs(n)+"",e=0;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(s=t.search(/e/i))>0?(r<0&&(r=s),r+=+t.slice(s+1),t=t.substring(0,s)):r<0&&(r=t.length),s=0;"0"===t.charAt(s);s++);if(s===(a=t.length))i=[0],r=1;else{for(a--;"0"===t.charAt(a);)a--;for(r-=s,i=[],o=0;s<=a;s++,o++)i[o]=Number(t.charAt(s))}return r>22&&(i=i.splice(0,21),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(n);o&&(c=function qB(n){if(0===n.digits[0])return n;const t=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(0===t?n.digits.push(0,0):1===t&&n.digits.push(0),n.integerLen+=2),n}(c));let d=t.minInt,f=t.minFrac,w=t.maxFrac;if(s){const Te=s.match(HB);if(null===Te)throw new Error(`${s} is not a valid digit info`);const he=Te[1],Oe=Te[3],ft=Te[5];null!=he&&(d=Xm(he)),null!=Oe&&(f=Xm(Oe)),null!=ft?w=Xm(ft):null!=Oe&&f>w&&(w=f)}!function KB(n,t,e){if(t>e)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${e}).`);let i=n.digits,r=i.length-n.integerLen;const s=Math.min(Math.max(t,r),e);let o=s+n.integerLen,a=i[o];if(o>0){i.splice(Math.max(n.integerLen,o));for(let f=o;f=5)if(o-1<0){for(let f=0;f>o;f--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[o-1]++;for(;r=c?j.pop():l=!1),w>=10?1:0},0);d&&(i.unshift(d),n.integerLen++)}(c,f,w);let k=c.digits,j=c.integerLen;const K=c.exponent;let ae=[];for(l=k.every(Te=>!Te);j0?ae=k.splice(j,k.length):(ae=k,k=[0]);const ce=[];for(k.length>=t.lgSize&&ce.unshift(k.splice(-t.lgSize,k.length).join(""));k.length>t.gSize;)ce.unshift(k.splice(-t.gSize,k.length).join(""));k.length&&ce.unshift(k.join("")),a=ce.join(ji(e,i)),ae.length&&(a+=ji(e,r)+ae.join("")),K&&(a+=ji(e,st.Exponential)+"+"+K)}else a=ji(e,st.Infinity);return a=n<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(n,function Zm(n,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(";"),r=i[0],s=i[1],o=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf("#"));for(let d=0;d{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();const mE="browser";let DV=(()=>{class n{}return n.\u0275prov=Ie({token:n,providedIn:"root",factory:()=>new EV(te(ct),window)}),n})();class EV{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function MV(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(t)||s.querySelector(`[name="${t}"]`);if(o)return o}r=i.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(i-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=gE(this.window.history)||gE(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(t){return!1}}}function gE(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class _E{}class sg extends class xV extends class aB{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function oB(n){qd||(qd=n)}(new sg)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function SV(){return Ul=Ul||document.querySelector("base"),Ul?Ul.getAttribute("href"):null}();return null==e?null:function kV(n){su=su||document.createElement("a"),su.setAttribute("href",n);const t=su.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){Ul=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return sE(document.cookie,t)}}let su,Ul=null;const vE=new De("TRANSITION_ID"),AV=[{provide:Am,useFactory:function TV(n,t,e){return()=>{e.get(jd).donePromise.then(()=>{const i=Sr(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let s=0;s{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();const ou=new De("EventManagerPlugins");let au=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>r.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let s=0;s{class n{constructor(){this._stylesSet=new Set}addStyles(e){const i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),zl=(()=>{class n extends bE{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(s=>{const o=this._doc.createElement("style");o.textContent=s,r.push(i.appendChild(o))})}addHost(e){const i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){const i=this._hostNodes.get(e);i&&i.forEach(wE),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(wE))}}return n.\u0275fac=function(e){return new(e||n)(te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();function wE(n){Sr().remove(n)}const og={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},ag=/%COMP%/g;function lu(n,t,e){for(let i=0;i{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let cu=(()=>{class n{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new lg(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case Ji.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new BV(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case 1:case Ji.ShadowDom:return new VV(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=lu(i.id,i.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(te(au),te(zl),te(Ol))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();class lg{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(og[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(xE(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(xE(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;const s=og[r];s?t.setAttributeNS(s,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=og[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(xi.DashCase|xi.Important)?t.style.setProperty(e,i,r&xi.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&xi.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,EE(i)):this.eventManager.addEventListener(t,e,EE(i))}}function xE(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class BV extends lg{constructor(t,e,i,r){super(t),this.component=i;const s=lu(r+"-"+i.id,i.styles,[]);e.addStyles(s),this.contentAttr=function FV(n){return"_ngcontent-%COMP%".replace(ag,n)}(r+"-"+i.id),this.hostAttr=function LV(n){return"_nghost-%COMP%".replace(ag,n)}(r+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class VV extends lg{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=lu(r.id,r.styles,[]);for(let o=0;o{class n extends yE{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();const SE=["alt","control","meta","shift"],UV={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},kE={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},zV={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let $V=(()=>{class n extends yE{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Sr().onAndCancel(e,s.domEventName,o))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=n._normalizeKey(i.pop());let o="";if(SE.forEach(l=>{const c=i.indexOf(l);c>-1&&(i.splice(c,1),o+=l+".")}),o+=s,0!=i.length||0===s.length)return null;const a={};return a.domEventName=r,a.fullKey=o,a}static getEventFullKey(e){let i="",r=function GV(n){let t=n.key;if(null==t){if(t=n.keyIdentifier,null==t)return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===n.location&&kE.hasOwnProperty(t)&&(t=kE[t]))}return UV[t]||t}(e);return r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),SE.forEach(s=>{s!=r&&zV[s](e)&&(i+=s+".")}),i+=r,i}static eventCallback(e,i,r){return s=>{n.getEventFullKey(s)===e&&r.runGuarded(()=>i(s))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();const KV=kD(iB,"browser",[{provide:Ud,useValue:mE},{provide:yD,useValue:function WV(){sg.makeCurrent()},multi:!0},{provide:ct,useFactory:function YV(){return function cI(n){bf=n}(document),document},deps:[]}]),AE=new De(""),IE=[{provide:zd,useClass:class IV{addToWindow(t){qt.getAngularTestability=(i,r=!0)=>{const s=t.findTestabilityInTree(i,r);if(null==s)throw new Error("Could not find testability for element.");return s},qt.getAllAngularTestabilities=()=>t.getAllTestabilities(),qt.getAllAngularRootElements=()=>t.getAllRootElements(),qt.frameworkStabilizers||(qt.frameworkStabilizers=[]),qt.frameworkStabilizers.push(i=>{const r=qt.getAllAngularTestabilities();let s=r.length,o=!1;const a=function(l){o=o||l,s--,0==s&&i(o)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,e,i){if(null==e)return null;const r=t.getTestability(e);return null!=r?r:i?Sr().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}},deps:[]},{provide:DD,useClass:Lm,deps:[et,Nm,zd]},{provide:Lm,useClass:Lm,deps:[et,Nm,zd]}],RE=[{provide:_p,useValue:"root"},{provide:qr,useFactory:function qV(){return new qr},deps:[]},{provide:ou,useClass:HV,multi:!0,deps:[ct,et,Ud]},{provide:ou,useClass:$V,multi:!0,deps:[ct]},{provide:cu,useClass:cu,deps:[au,zl,Ol]},{provide:Tl,useExisting:cu},{provide:bE,useExisting:zl},{provide:zl,useClass:zl,deps:[ct]},{provide:au,useClass:au,deps:[ou,et]},{provide:_E,useClass:RV,deps:[]},[]];let PE=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:Ol,useValue:e.appId},{provide:vE,useExisting:Ol},AV]}}}return n.\u0275fac=function(e){return new(e||n)(te(AE,12))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[...RE,...IE],imports:[pi,rB]}),n})(),OE=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return n.\u0275fac=function(e){return new(e||n)(te(ct))},n.\u0275prov=Ie({token:n,factory:function(e){let i=null;return i=e?new e:function ZV(){return new OE(te(ct))}(),i},providedIn:"root"}),n})();"undefined"!=typeof window&&window;let ug=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:function(e){let i=null;return i=e?new(e||n):te(NE),i},providedIn:"root"}),n})(),NE=(()=>{class n extends ug{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Ut.NONE:return i;case Ut.HTML:return _r(i,"HTML")?Mi(i):Db(this._doc,String(i)).toString();case Ut.STYLE:return _r(i,"Style")?Mi(i):i;case Ut.SCRIPT:if(_r(i,"Script"))return Mi(i);throw new Error("unsafe value used in a script context");case Ut.URL:return mb(i),_r(i,"URL")?Mi(i):hl(String(i));case Ut.RESOURCE_URL:if(_r(i,"ResourceURL"))return Mi(i);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${e} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(e){return function DR(n){return new vR(n)}(e)}bypassSecurityTrustStyle(e){return function ER(n){return new yR(n)}(e)}bypassSecurityTrustScript(e){return function MR(n){return new bR(n)}(e)}bypassSecurityTrustUrl(e){return function xR(n){return new wR(n)}(e)}bypassSecurityTrustResourceUrl(e){return function SR(n){return new CR(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(te(ct))},n.\u0275prov=Ie({token:n,factory:function(e){let i=null;return i=e?new e:function o2(n){return new NE(n.get(ct))}(te(Jt)),i},providedIn:"root"}),n})();class BE{}const rs="*";function jn(n,t){return{type:7,name:n,definitions:t,options:{}}}function Zt(n,t=null){return{type:4,styles:t,timings:n}}function VE(n,t=null){return{type:3,steps:n,options:t}}function HE(n,t=null){return{type:2,steps:n,options:t}}function Qe(n){return{type:6,styles:n,offset:null}}function zt(n,t,e){return{type:0,name:n,styles:t,options:e}}function Wt(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function du(n=null){return{type:9,options:n}}function uu(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function jE(n){Promise.resolve(null).then(n)}class $l{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){jE(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class UE{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const s=this.players.length;0==s?jE(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++e==s&&this._onFinish()}),o.onDestroy(()=>{++i==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const Rt=!1;function zE(n){return new Be(3e3,Rt)}function U2(){return"undefined"!=typeof window&&void 0!==window.document}function fg(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Ms(n){switch(n.length){case 0:return new $l;case 1:return n[0];default:return new UE(n)}}function $E(n,t,e,i,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(i.forEach(d=>{const f=d.get("offset"),w=f==l,k=w&&c||new Map;d.forEach((j,K)=>{let ae=K,ce=j;if("offset"!==K)switch(ae=t.normalizePropertyName(ae,o),ce){case"!":ce=r.get(K);break;case rs:ce=s.get(K);break;default:ce=t.normalizeStyleValue(K,ae,ce,o)}k.set(ae,ce)}),w||a.push(k),c=k,l=f}),o.length)throw function A2(n){return new Be(3502,Rt)}();return a}function pg(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&mg(e,"start",n)));break;case"done":n.onDone(()=>i(e&&mg(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&mg(e,"destroy",n)))}}function mg(n,t,e){const i=e.totalTime,s=gg(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,null==i?n.totalTime:i,!!e.disabled),o=n._data;return null!=o&&(s._data=o),s}function gg(n,t,e,i,r="",s=0,o){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function Ti(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function GE(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let _g=(n,t)=>!1,WE=(n,t,e)=>[],qE=null;function vg(n){const t=n.parentNode||n.host;return t===qE?null:t}(fg()||"undefined"!=typeof Element)&&(U2()?(qE=(()=>document.documentElement)(),_g=(n,t)=>{for(;t;){if(t===n)return!0;t=vg(t)}return!1}):_g=(n,t)=>n.contains(t),WE=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let co=null,YE=!1;const KE=_g,QE=WE;let ZE=(()=>{class n{validateStyleProperty(e){return function $2(n){co||(co=function G2(){return"undefined"!=typeof document?document.body:null}()||{},YE=!!co.style&&"WebkitAppearance"in co.style);let t=!0;return co.style&&!function z2(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in co.style,!t&&YE&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in co.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return KE(e,i)}getParentElement(e){return vg(e)}query(e,i,r){return QE(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,s,o,a=[],l){return new $l(r,s)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),yg=(()=>{class n{}return n.NOOP=new ZE,n})();const bg="ng-enter",fu="ng-leave",pu="ng-trigger",mu=".ng-trigger",JE="ng-animating",wg=".ng-animating";function xs(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:Cg(parseFloat(t[1]),t[2])}function Cg(n,t){return"s"===t?1e3*n:n}function gu(n,t,e){return n.hasOwnProperty("duration")?n:function Y2(n,t,e){let r,s=0,o="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(zE()),{duration:0,delay:0,easing:""};r=Cg(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=Cg(parseFloat(l),a[4]));const c=a[5];c&&(o=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(function l2(){return new Be(3100,Rt)}()),a=!0),s<0&&(t.push(function c2(){return new Be(3101,Rt)}()),a=!0),a&&t.splice(l,0,zE())}return{duration:r,delay:s,easing:o}}(n,t,e)}function Gl(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function eM(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function Ss(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function nM(n,t,e){return e?t+":"+e+";":""}function iM(n){let t="";for(let e=0;e{const s=Eg(r);e&&!e.has(r)&&e.set(r,n.style[s]),n.style[s]=i}),fg()&&iM(n))}function uo(n,t){n.style&&(t.forEach((e,i)=>{const r=Eg(i);n.style[r]=""}),fg()&&iM(n))}function Wl(n){return Array.isArray(n)?1==n.length?n[0]:HE(n):n}const Dg=new RegExp("{{\\s*(.+?)\\s*}}","g");function rM(n){let t=[];if("string"==typeof n){let e;for(;e=Dg.exec(n);)t.push(e[1]);Dg.lastIndex=0}return t}function _u(n,t,e){const i=n.toString(),r=i.replace(Dg,(s,o)=>{let a=t[o];return null==a&&(e.push(function u2(n){return new Be(3003,Rt)}()),a=""),a.toString()});return r==i?n:r}function vu(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const Z2=/-+([a-z0-9])/g;function Eg(n){return n.replace(Z2,(...t)=>t[1].toUpperCase())}function X2(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ai(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function h2(n){return new Be(3004,Rt)}()}}function sM(n,t){return window.getComputedStyle(n)[t]}function rH(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function sH(n,t,e){if(":"==n[0]){const l=function oH(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function M2(n){return new Be(3015,Rt)}()),t;const r=i[1],s=i[2],o=i[3];t.push(oM(r,o));"<"==s[0]&&!("*"==r&&"*"==o)&&t.push(oM(o,r))}(i,e,t)):e.push(n),e}const Cu=new Set(["true","1"]),Du=new Set(["false","0"]);function oM(n,t){const e=Cu.has(n)||Du.has(n),i=Cu.has(t)||Du.has(t);return(r,s)=>{let o="*"==n||n==r,a="*"==t||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?Cu.has(n):Du.has(n)),!a&&i&&"boolean"==typeof s&&(a=s?Cu.has(t):Du.has(t)),o&&a}}const aH=new RegExp("s*:selfs*,?","g");function Mg(n,t,e,i){return new lH(n).build(t,e,i)}class lH{constructor(t){this._driver=t}build(t,e,i){const r=new uH(e);return this._resetContextStyleTimingState(r),Ai(this,Wl(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const s=[],o=[];return"@"==t.name.charAt(0)&&e.errors.push(function p2(){return new Be(3006,Rt)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,s.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,o.push(l)}else e.errors.push(function m2(){return new Be(3007,Rt)}())}),{type:7,name:t.name,states:s,transitions:o,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const s=new Set,o=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{rM(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(vu(s.values()),e.errors.push(function g2(n,t){return new Be(3008,Rt)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=Ai(this,Wl(t.animation),e);return{type:1,matchers:rH(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:ho(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>Ai(this,i,e)),options:ho(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=i;const a=Ai(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:ho(t.options)}}visitAnimate(t,e){const i=function fH(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return xg(gu(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=xg(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=gu(e,t);return xg(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,s=t.styles?t.styles:Qe({});if(5==s.type)r=this.visitKeyframes(s,e);else{let o=t.styles,a=!1;if(!o){a=!0;const c={};i.easing&&(c.easing=i.easing),o=Qe(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(o,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===rs?i.push(a):e.errors.push(new Be(3002,Rt)):i.push(eM(a));let s=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!s))for(let l of a.values())if(l.toString().indexOf("{{")>=0){s=!0;break}}),{type:6,styles:i,easing:o,offset:t.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,s=e.currentTime;i&&s>0&&(s-=i.duration+i.delay),t.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),d=c.get(l);let f=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function v2(n,t,e,i,r){return new Be(3010,Rt)}()),f=!1),s=d.startTime),f&&c.set(l,{startTime:s,endTime:r}),e.options&&function Q2(n,t,e){const i=t.params||{},r=rM(n);r.length&&r.forEach(s=>{i.hasOwnProperty(s)||e.push(function d2(n){return new Be(3001,Rt)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function y2(){return new Be(3011,Rt)}()),i;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(ce=>{const Te=this._makeStyleAst(ce,e);let he=null!=Te.offset?Te.offset:function hH(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(Te.styles),Oe=0;return null!=he&&(s++,Oe=Te.offset=he),l=l||Oe<0||Oe>1,a=a||Oe0&&s{const he=w>0?Te==k?1:w*Te:o[Te],Oe=he*ae;e.currentTime=j+K.delay+Oe,K.duration=Oe,this._validateStyleAst(ce,e),ce.offset=he,i.styles.push(ce)}),i}visitReference(t,e){return{type:8,animation:Ai(this,Wl(t.animation),e),options:ho(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:ho(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:ho(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function cH(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(aH,"")),n=n.replace(/@\*/g,mu).replace(/@\w+/g,e=>mu+"-"+e.slice(1)).replace(/:animating/g,wg),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+s:s,Ti(e.collectedStyles,e.currentQuerySelector,new Map);const a=Ai(this,Wl(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:a,originalSelector:t.selector,options:ho(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function D2(){return new Be(3013,Rt)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:gu(t.timings,e.errors,!0);return{type:12,animation:Ai(this,Wl(t.animation),e),timings:i,options:null}}}class uH{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set,this.nonAnimatableCSSPropertiesFound=new Set}}function ho(n){return n?(n=Gl(n)).params&&(n.params=function dH(n){return n?Gl(n):null}(n.params)):n={},n}function xg(n,t,e){return{duration:n,delay:t,easing:e}}function Sg(n,t,e,i,r,s,o=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class Eu{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const gH=new RegExp(":enter","g"),vH=new RegExp(":leave","g");function kg(n,t,e,i,r,s=new Map,o=new Map,a,l,c=[]){return(new yH).buildKeyframes(n,t,e,i,r,s,o,a,l,c)}class yH{buildKeyframes(t,e,i,r,s,o,a,l,c,d=[]){c=c||new Eu;const f=new Tg(t,e,c,r,s,d,[]);f.options=l;const w=l.delay?xs(l.delay):0;f.currentTimeline.delayNextStep(w),f.currentTimeline.setStyles([o],null,f.errors,l),Ai(this,i,f);const k=f.timelines.filter(j=>j.containsAnimation());if(k.length&&a.size){let j;for(let K=k.length-1;K>=0;K--){const ae=k[K];if(ae.element===e){j=ae;break}}j&&!j.allowOnlyTimelineStyles()&&j.setStyles([a],null,f.errors,l)}return k.length?k.map(j=>j.buildKeyframes()):[Sg(e,[],[],[],0,w,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),s=e.currentTimeline.currentTime,o=this._visitSubInstructions(i,r,r.options);s!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,i){let s=e.currentTimeline.currentTime;const o=null!=i.duration?xs(i.duration):null,a=null!=i.delay?xs(i.delay):null;return 0!==o&&t.forEach(l=>{const c=e.appendInstructionToTimeline(l,o,a);s=Math.max(s,c.duration+c.delay)}),s}visitReference(t,e){e.updateOptions(t.options,!0),Ai(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const s=t.options;if(s&&(s.params||s.delay)&&(r=e.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Mu);const o=xs(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>Ai(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?xs(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),Ai(this,o,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>e.currentTimeline.mergeTimelineCollectedStyles(o)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return gu(e.params?_u(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(i.duration),this.visitStyle(s,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const s=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(s):i.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,s=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*s),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+s),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},s=r.delay?xs(r.delay):0;s&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Mu);let o=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,d)=>{e.currentQueryIndex=d;const f=e.createSubContext(t.options,c);s&&f.delayNextStep(s),c===e.element&&(l=f.currentTimeline),Ai(this,t.animation,f),f.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,f.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,s=t.timings,o=Math.abs(s.duration),a=o*(e.currentQueryTotal-1);let l=o*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const d=e.currentTimeline;l&&d.delayNextStep(l);const f=d.currentTime;Ai(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-f+(r.startTime-i.currentTimeline.startTime)}}const Mu={};class Tg{constructor(t,e,i,r,s,o,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Mu,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new xu(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=xs(i.duration)),null!=i.delay&&(r.delay=xs(i.delay));const s=i.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!e||!o.hasOwnProperty(a))&&(o[a]=_u(s[a],o,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,s=new Tg(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=Mu,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+t.delay,easing:""},s=new bH(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,s,o){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(gH,"."+this._enterClassName)).replace(vH,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!s&&0==a.length&&o.push(function E2(n){return new Be(3014,Rt)}()),a}}class xu{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new xu(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||rs),this._currentKeyframe.set(e,rs);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function wH(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let s of i)e.set(s,rs)}else Ss(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=_u(l,s,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)||rs),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Ss(a,new Map,this._backFill);c.forEach((d,f)=>{"!"===d?t.add(f):d===rs&&e.add(f)}),i||c.set("offset",l/this.duration),r.push(c)});const s=t.size?vu(t.values()):[],o=e.size?vu(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return Sg(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class bH extends xu{constructor(t,e,i,r,s,o,a=!1){super(t,e,o.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],o=i+e,a=e/o,l=Ss(t[0]);l.set("offset",0),s.push(l);const c=Ss(t[0]);c.set("offset",cM(a)),s.push(c);const d=t.length-1;for(let f=1;f<=d;f++){let w=Ss(t[f]);const k=w.get("offset");w.set("offset",cM((e+k*i)/o)),s.push(w)}i=o,e=0,r="",t=s}return Sg(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function cM(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class Ag{}const CH=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class DH extends Ag{normalizePropertyName(t,e){return Eg(t)}normalizeStyleValue(t,e,i,r){let s="";const o=i.toString().trim();if(CH.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)s="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function f2(n,t){return new Be(3005,Rt)}())}return o+s}}function dM(n,t,e,i,r,s,o,a,l,c,d,f,w){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:f,errors:w}}const Ig={};class uM{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function EH(n,t,e,i,r){return n.some(s=>s(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(null==t?void 0:t.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,s,o,a,l,c,d){var f;const w=[],k=this.ast.options&&this.ast.options.params||Ig,K=this.buildStyles(i,a&&a.params||Ig,w),ae=l&&l.params||Ig,ce=this.buildStyles(r,ae,w),Te=new Set,he=new Map,Oe=new Map,ft="void"===r,Nt={params:MH(ae,k),delay:null===(f=this.ast.options)||void 0===f?void 0:f.delay},pn=d?[]:kg(t,e,this.ast.animation,s,o,K,ce,Nt,c,w);let Zn=0;if(pn.forEach(ci=>{Zn=Math.max(ci.duration+ci.delay,Zn)}),w.length)return dM(e,this._triggerName,i,r,ft,K,ce,[],[],he,Oe,Zn,w);pn.forEach(ci=>{const us=ci.element,hs=Ti(he,us,new Set);ci.preStyleProps.forEach(Lr=>hs.add(Lr));const fs=Ti(Oe,us,new Set);ci.postStyleProps.forEach(Lr=>fs.add(Lr)),us!==e&&Te.add(us)});const Vs=vu(Te.values());return dM(e,this._triggerName,i,r,ft,K,ce,pn,Vs,he,Oe,Zn)}}function MH(n,t){const e=Gl(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class xH{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=Gl(this.defaultParams);return Object.keys(t).forEach(s=>{const o=t[s];null!==o&&(r[s]=o)}),this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((o,a)=>{o&&(o=_u(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),i.set(l,o)})}),i}}class kH{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new xH(r.style,r.options&&r.options.params||{},i))}),hM(this.states,"true","1"),hM(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new uM(t,r,this.states))}),this.fallbackTransition=function TH(n,t,e){return new uM(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(o=>o.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function hM(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const AH=new Eu;class IH{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],s=Mg(this._driver,e,i,[]);if(i.length)throw function I2(n){return new Be(3503,Rt)}();this._animations.set(t,s)}_buildPlayer(t,e,i){const r=t.element,s=$E(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],s=this._animations.get(t);let o;const a=new Map;if(s?(o=kg(this._driver,e,s,bg,fu,new Map,new Map,i,AH,r),o.forEach(d=>{const f=Ti(a,d.element,new Map);d.postStyleProps.forEach(w=>f.set(w,null))})):(r.push(function R2(){return new Be(3300,Rt)}()),o=[]),r.length)throw function P2(n){return new Be(3504,Rt)}();a.forEach((d,f)=>{d.forEach((w,k)=>{d.set(k,this._driver.computeStyle(f,k,rs))})});const c=Ms(o.map(d=>{const f=a.get(d.element);return this._buildPlayer(d,new Map,f)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function O2(n){return new Be(3301,Rt)}();return e}listen(t,e,i,r){const s=gg(e,"","","");return pg(this._getPlayer(t),i,s,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const s=this._getPlayer(t);switch(i){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const fM="ng-animate-queued",Rg="ng-animate-disabled",LH=[],pM={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},NH={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},$i="__ng_removed";class Pg{constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function jH(n){return null!=n?n:null}(i?t.value:t),i){const s=Gl(t);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const ql="void",Og=new Pg(ql);class BH{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Gi(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function F2(n,t){return new Be(3302,Rt)}();if(null==i||0==i.length)throw function L2(n){return new Be(3303,Rt)}();if(!function UH(n){return"start"==n||"done"==n}(i))throw function N2(n,t){return new Be(3400,Rt)}();const s=Ti(this._elementListeners,t,[]),o={name:e,phase:i,callback:r};s.push(o);const a=Ti(this._engine.statesByElement,t,new Map);return a.has(e)||(Gi(t,pu),Gi(t,pu+"-"+e),a.set(e,Og)),()=>{this._engine.afterFlush(()=>{const l=s.indexOf(o);l>=0&&s.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function B2(n){return new Be(3401,Rt)}();return e}trigger(t,e,i,r=!0){const s=this._getTrigger(e),o=new Fg(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Gi(t,pu),Gi(t,pu+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new Pg(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=Og),c.value!==ql&&l.value===c.value){if(!function GH(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{uo(t,ae),kr(t,ce)})}return}const w=Ti(this._engine.playersByElement,t,[]);w.forEach(K=>{K.namespaceId==this.id&&K.triggerName==e&&K.queued&&K.destroy()});let k=s.matchTransition(l.value,c.value,t,c.params),j=!1;if(!k){if(!r)return;k=s.fallbackTransition,j=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:k,fromState:l,toState:c,player:o,isFallbackTransition:j}),j||(Gi(t,fM),o.onStart(()=>{wa(t,fM)})),o.onDone(()=>{let K=this.players.indexOf(o);K>=0&&this.players.splice(K,1);const ae=this._engine.playersByElement.get(t);if(ae){let ce=ae.indexOf(o);ce>=0&&ae.splice(ce,1)}}),this.players.push(o),w.push(o),o}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,mu,!0);i.forEach(r=>{if(r[$i])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const s=this._engine.statesByElement.get(t),o=new Map;if(s){const a=[];if(s.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){const d=this.trigger(t,c,ql,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),i&&Ms(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const l=this._triggers.get(o).fallbackTransition,c=i.get(o)||Og,d=new Pg(ql),f=new Fg(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,player:f,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const s=i.players.length?i.playersByQueriedElement.get(t):[];if(s&&s.length)r=!0;else{let o=t;for(;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const s=t[$i];(!s||s===pM)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Gi(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const s=i.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==i.triggerName){const l=gg(s,i.triggerName,i.fromState.value,i.toState.value);l._data=t,pg(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const s=i.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class VH{constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new BH(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&e.add(s)}return e}trigger(t,e,i,r){if(Su(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Su(e))return;const s=e[$i];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(e);o>=0&&this.collectedLeaveElements.splice(o,1)}if(t){const o=this._fetchNamespace(t);o&&o.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Gi(t,Rg)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),wa(t,Rg))}removeNode(t,e,i,r){if(Su(e)){const s=t?this._fetchNamespace(t):null;if(s?s.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,s){this.collectedLeaveElements.push(e),e[$i]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,i,r,s){return Su(e)?this._fetchNamespace(t).listen(e,i,r,s):()=>{}}_buildInstruction(t,e,i,r,s){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,s)}destroyInnerAnimations(t){let e=this.driver.query(t,mu,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,wg,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Ms(this.players).onDone(()=>t());t()})}processLeaveNode(t){var e;const i=t[$i];if(i&&i.setForRemoval){if(t[$i]=pM,i.namespaceId){this.destroyInnerAnimations(t);const r=this._fetchNamespace(i.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,i.setForRemoval)}!(null===(e=t.classList)||void 0===e)&&e.contains(Rg)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?Ms(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function V2(n){return new Be(3402,Rt)}()}_flushAnimations(t,e){const i=new Eu,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(ze=>{d.add(ze);const nt=this.driver.query(ze,".ng-animate-queued",!0);for(let ot=0;ot{const ot=bg+K++;j.set(nt,ot),ze.forEach(St=>Gi(St,ot))});const ae=[],ce=new Set,Te=new Set;for(let ze=0;zece.add(St)):Te.add(nt))}const he=new Map,Oe=_M(w,Array.from(ce));Oe.forEach((ze,nt)=>{const ot=fu+K++;he.set(nt,ot),ze.forEach(St=>Gi(St,ot))}),t.push(()=>{k.forEach((ze,nt)=>{const ot=j.get(nt);ze.forEach(St=>wa(St,ot))}),Oe.forEach((ze,nt)=>{const ot=he.get(nt);ze.forEach(St=>wa(St,ot))}),ae.forEach(ze=>{this.processLeaveNode(ze)})});const ft=[],Nt=[];for(let ze=this._namespaceList.length-1;ze>=0;ze--)this._namespaceList[ze].drainQueuedTransitions(e).forEach(ot=>{const St=ot.player,mn=ot.element;if(ft.push(St),this.collectedEnterElements.length){const Xn=mn[$i];if(Xn&&Xn.setForMove){if(Xn.previousTriggersValues&&Xn.previousTriggersValues.has(ot.triggerName)){const ko=Xn.previousTriggersValues.get(ot.triggerName),Zi=this.statesByElement.get(ot.element);if(Zi&&Zi.has(ot.triggerName)){const ef=Zi.get(ot.triggerName);ef.value=ko,Zi.set(ot.triggerName,ef)}}return void St.destroy()}}const Nr=!f||!this.driver.containsElement(f,mn),Pi=he.get(mn),Hs=j.get(mn),ln=this._buildInstruction(ot,i,Hs,Pi,Nr);if(ln.errors&&ln.errors.length)return void Nt.push(ln);if(Nr)return St.onStart(()=>uo(mn,ln.fromStyles)),St.onDestroy(()=>kr(mn,ln.toStyles)),void r.push(St);if(ot.isFallbackTransition)return St.onStart(()=>uo(mn,ln.fromStyles)),St.onDestroy(()=>kr(mn,ln.toStyles)),void r.push(St);const vA=[];ln.timelines.forEach(Xn=>{Xn.stretchStartingKeyframe=!0,this.disabledNodes.has(Xn.element)||vA.push(Xn)}),ln.timelines=vA,i.append(mn,ln.timelines),o.push({instruction:ln,player:St,element:mn}),ln.queriedElements.forEach(Xn=>Ti(a,Xn,[]).push(St)),ln.preStyleProps.forEach((Xn,ko)=>{if(Xn.size){let Zi=l.get(ko);Zi||l.set(ko,Zi=new Set),Xn.forEach((ef,Zv)=>Zi.add(Zv))}}),ln.postStyleProps.forEach((Xn,ko)=>{let Zi=c.get(ko);Zi||c.set(ko,Zi=new Set),Xn.forEach((ef,Zv)=>Zi.add(Zv))})});if(Nt.length){const ze=[];Nt.forEach(nt=>{ze.push(function H2(n,t){return new Be(3505,Rt)}())}),ft.forEach(nt=>nt.destroy()),this.reportError(ze)}const pn=new Map,Zn=new Map;o.forEach(ze=>{const nt=ze.element;i.has(nt)&&(Zn.set(nt,nt),this._beforeAnimationBuild(ze.player.namespaceId,ze.instruction,pn))}),r.forEach(ze=>{const nt=ze.element;this._getPreviousPlayers(nt,!1,ze.namespaceId,ze.triggerName,null).forEach(St=>{Ti(pn,nt,[]).push(St),St.destroy()})});const Vs=ae.filter(ze=>yM(ze,l,c)),ci=new Map;gM(ci,this.driver,Te,c,rs).forEach(ze=>{yM(ze,l,c)&&Vs.push(ze)});const hs=new Map;k.forEach((ze,nt)=>{gM(hs,this.driver,new Set(ze),l,"!")}),Vs.forEach(ze=>{var nt,ot;const St=ci.get(ze),mn=hs.get(ze);ci.set(ze,new Map([...Array.from(null!==(nt=null==St?void 0:St.entries())&&void 0!==nt?nt:[]),...Array.from(null!==(ot=null==mn?void 0:mn.entries())&&void 0!==ot?ot:[])]))});const fs=[],Lr=[],Ga={};o.forEach(ze=>{const{element:nt,player:ot,instruction:St}=ze;if(i.has(nt)){if(d.has(nt))return ot.onDestroy(()=>kr(nt,St.toStyles)),ot.disabled=!0,ot.overrideTotalTime(St.totalTime),void r.push(ot);let mn=Ga;if(Zn.size>1){let Pi=nt;const Hs=[];for(;Pi=Pi.parentNode;){const ln=Zn.get(Pi);if(ln){mn=ln;break}Hs.push(Pi)}Hs.forEach(ln=>Zn.set(ln,mn))}const Nr=this._buildAnimation(ot.namespaceId,St,pn,s,hs,ci);if(ot.setRealPlayer(Nr),mn===Ga)fs.push(ot);else{const Pi=this.playersByElement.get(mn);Pi&&Pi.length&&(ot.parentPlayer=Ms(Pi)),r.push(ot)}}else uo(nt,St.fromStyles),ot.onDestroy(()=>kr(nt,St.toStyles)),Lr.push(ot),d.has(nt)&&r.push(ot)}),Lr.forEach(ze=>{const nt=s.get(ze.element);if(nt&&nt.length){const ot=Ms(nt);ze.setRealPlayer(ot)}}),r.forEach(ze=>{ze.parentPlayer?ze.syncPlayerEvents(ze.parentPlayer):ze.destroy()});for(let ze=0;ze!Nr.destroyed);mn.length?zH(this,nt,mn):this.processLeaveNode(nt)}return ae.length=0,fs.forEach(ze=>{this.players.push(ze),ze.onDone(()=>{ze.destroy();const nt=this.players.indexOf(ze);this.players.splice(nt,1)}),ze.play()}),fs}elementContainsData(t,e){let i=!1;const r=e[$i];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,s){let o=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(o=a)}else{const a=this.playersByElement.get(t);if(a){const l=!s||s==ql;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||o.push(c)})}}return(i||r)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),o}_beforeAnimationBuild(t,e,i){const s=e.element,o=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,d=c!==s,f=Ti(i,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(k=>{const j=k.getRealPlayer();j.beforeDestroy&&j.beforeDestroy(),k.destroy(),f.push(k)})}uo(s,e.fromStyles)}_buildAnimation(t,e,i,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,f=new Set,w=e.timelines.map(j=>{const K=j.element;d.add(K);const ae=K[$i];if(ae&&ae.removedBeforeQueried)return new $l(j.duration,j.delay);const ce=K!==l,Te=function $H(n){const t=[];return vM(n,t),t}((i.get(K)||LH).map(pn=>pn.getRealPlayer())).filter(pn=>!!pn.element&&pn.element===K),he=s.get(K),Oe=o.get(K),ft=$E(0,this._normalizer,0,j.keyframes,he,Oe),Nt=this._buildPlayer(j,ft,Te);if(j.subTimeline&&r&&f.add(K),ce){const pn=new Fg(t,a,K);pn.setRealPlayer(Nt),c.push(pn)}return Nt});c.forEach(j=>{Ti(this.playersByQueriedElement,j.element,[]).push(j),j.onDone(()=>function HH(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,j.element,j))}),d.forEach(j=>Gi(j,JE));const k=Ms(w);return k.onDestroy(()=>{d.forEach(j=>wa(j,JE)),kr(l,e.toStyles)}),f.forEach(j=>{Ti(r,j,[]).push(k)}),k}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new $l(t.duration,t.delay)}}class Fg{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new $l,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>pg(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){Ti(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Su(n){return n&&1===n.nodeType}function mM(n,t){const e=n.style.display;return n.style.display=null!=t?t:"none",e}function gM(n,t,e,i,r){const s=[];e.forEach(l=>s.push(mM(l)));const o=[];i.forEach((l,c)=>{const d=new Map;l.forEach(f=>{const w=t.computeStyle(c,f,r);d.set(f,w),(!w||0==w.length)&&(c[$i]=NH,o.push(c))}),n.set(c,d)});let a=0;return e.forEach(l=>mM(l,s[a++])),o}function _M(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const r=new Set(t),s=new Map;function o(a){if(!a)return 1;let l=s.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?1:o(c),s.set(a,l),l}return t.forEach(a=>{const l=o(a);1!==l&&e.get(l).push(a)}),e}function Gi(n,t){var e;null===(e=n.classList)||void 0===e||e.add(t)}function wa(n,t){var e;null===(e=n.classList)||void 0===e||e.remove(t)}function zH(n,t,e){Ms(e).onDone(()=>n.processLeaveNode(t))}function vM(n,t){for(let e=0;er.add(s)):t.set(n,i),e.delete(n),!0}class ku{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new VH(t,e,i),this._timelineEngine=new IH(t,e,i),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(t,e,i,r,s){const o=t+"-"+r;let a=this._triggerCache[o];if(!a){const l=[],d=Mg(this._driver,s,l,[]);if(l.length)throw function T2(n,t){return new Be(3404,Rt)}();a=function SH(n,t,e){return new kH(n,t,e)}(r,d,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[s,o]=GE(i);this._timelineEngine.command(s,e,o,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,s){if("@"==i.charAt(0)){const[o,a]=GE(i);return this._timelineEngine.listen(o,e,a,s)}return this._transitionEngine.listen(t,e,i,r,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let qH=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let s=n.initialStylesByElement.get(e);s||n.initialStylesByElement.set(e,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&kr(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(kr(this._element,this._initialStyles),this._endStyles&&(kr(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(uo(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(uo(this._element,this._endStyles),this._endStyles=null),kr(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function Lg(n){let t=null;return n.forEach((e,i)=>{(function YH(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class bM{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:sM(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class KH{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return KE(t,e)}getParentElement(t){return vg(t)}query(t,e,i){return QE(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,s,o=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};s&&(l.easing=s);const c=new Map,d=o.filter(k=>k instanceof bM);(function J2(n,t){return 0===n||0===t})(i,r)&&d.forEach(k=>{k.currentSnapshot.forEach((j,K)=>c.set(K,j))});let f=function K2(n){return n.length?n[0]instanceof Map?n:n.map(t=>eM(t)):[]}(e).map(k=>Ss(k));f=function eH(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((s,o)=>{i.has(o)||r.push(o),i.set(o,s)}),r.length)for(let s=1;so.set(a,sM(n,a)))}}return t}(t,f,c);const w=function WH(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=Lg(t[0]),t.length>1&&(i=Lg(t[t.length-1]))):t instanceof Map&&(e=Lg(t)),e||i?new qH(n,e,i):null}(t,f);return new bM(t,f,l,w)}}let QH=(()=>{class n extends BE{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:Ji.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?HE(e):e;return wM(this._renderer,null,i,"register",[r]),new ZH(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(te(Tl),te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();class ZH extends class a2{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new XH(this._id,t,e||{},this._renderer)}}class XH{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return wM(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){var t,e;return null!==(e=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}}function wM(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const CM="@.disabled";let JH=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(s,o)=>{const a=null==o?void 0:o.parentNode(s);a&&o.removeChild(a,s)}}createRenderer(e,i){const s=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let d=this._rendererCache.get(s);return d||(d=new DM("",s,this.engine),this._rendererCache.set(s,d)),d}const o=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return i.data.animation.forEach(l),new ej(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(te(Tl),te(ku),te(et))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();class DM{constructor(t,e,i){this.namespaceId=t,this.delegate=e,this.engine=i,this.destroyNode=this.delegate.destroyNode?r=>e.destroyNode(r):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==CM?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class ej extends DM{constructor(t,e,i,r){super(e,i,r),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==CM?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function tj(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let s=e.slice(1),o="";return"@"!=s.charAt(0)&&([s,o]=function nj(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}const EM=[{provide:BE,useClass:QH},{provide:Ag,useFactory:function rj(){return new DH}},{provide:ku,useClass:(()=>{class n extends ku{constructor(e,i,r){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(te(ct),te(yg),te(Ag))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})()},{provide:Tl,useFactory:function sj(n,t,e){return new JH(n,t,e)},deps:[cu,ku,et]}],MM=[{provide:yg,useFactory:()=>new KH},{provide:fn,useValue:"BrowserAnimations"},...EM],oj=[{provide:yg,useClass:ZE},{provide:fn,useValue:"NoopAnimations"},...EM];let aj=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?oj:MM}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:MM,imports:[PE]}),n})();const{isArray:lj}=Array,{getPrototypeOf:cj,prototype:dj,keys:uj}=Object;function xM(n){if(1===n.length){const t=n[0];if(lj(t))return{args:t,keys:null};if(function hj(n){return n&&"object"==typeof n&&cj(n)===dj}(t)){const e=uj(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}const{isArray:fj}=Array;function Ng(n){return U(t=>function pj(n,t){return fj(t)?n(...t):n(t)}(n,t))}function SM(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function kM(...n){const t=oy(n),{args:e,keys:i}=xM(n),r=new J(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{f||(f=!0,c--),a[d]=w},()=>l--,void 0,()=>{(!l||!f)&&(c||s.next(i?SM(i,a):a),s.complete())}))}});return t?r.pipe(Ng(t)):r}let TM=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(x(Xr),x(Je))},n.\u0275dir=Me({type:n}),n})(),fo=(()=>{class n extends TM{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Mt(n)))(i||n)}}(),n.\u0275dir=Me({type:n,features:[Le]}),n})();const ai=new De("NgValueAccessor"),gj={provide:ai,useExisting:Ft(()=>Bg),multi:!0},vj=new De("CompositionEventMode");let Bg=(()=>{class n extends TM{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function _j(){const n=Sr()?Sr().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",null==e?"":e)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(x(Xr),x(Je),x(vj,8))},n.\u0275dir=Me({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&$e("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},features:[Xe([gj]),Le]}),n})();function ks(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function IM(n){return null!=n&&"number"==typeof n.length}const Nn=new De("NgValidators"),Ts=new De("NgAsyncValidators"),yj=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Vg{static min(t){return function RM(n){return t=>{if(ks(t.value)||ks(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(ks(t.value)||ks(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return function OM(n){return ks(n.value)?{required:!0}:null}(t)}static requiredTrue(t){return function FM(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function LM(n){return ks(n.value)||yj.test(n.value)?null:{email:!0}}(t)}static minLength(t){return function NM(n){return t=>ks(t.value)||!IM(t.value)?null:t.value.lengthIM(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return function VM(n){if(!n)return Au;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(ks(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(t)}static nullValidator(t){return null}static compose(t){return GM(t)}static composeAsync(t){return WM(t)}}function Au(n){return null}function HM(n){return null!=n}function jM(n){const t=Cl(n)?gn(n):n;return em(t),t}function UM(n){let t={};return n.forEach(e=>{t=null!=e?Object.assign(Object.assign({},t),e):t}),0===Object.keys(t).length?null:t}function zM(n,t){return t.map(e=>e(n))}function $M(n){return n.map(t=>function bj(n){return!n.validate}(t)?t:e=>t.validate(e))}function GM(n){if(!n)return null;const t=n.filter(HM);return 0==t.length?null:function(e){return UM(zM(e,t))}}function Hg(n){return null!=n?GM($M(n)):null}function WM(n){if(!n)return null;const t=n.filter(HM);return 0==t.length?null:function(e){return kM(zM(e,t).map(jM)).pipe(U(UM))}}function jg(n){return null!=n?WM($M(n)):null}function qM(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function YM(n){return n._rawValidators}function KM(n){return n._rawAsyncValidators}function Ug(n){return n?Array.isArray(n)?n:[n]:[]}function Iu(n,t){return Array.isArray(n)?n.includes(t):n===t}function QM(n,t){const e=Ug(t);return Ug(n).forEach(r=>{Iu(e,r)||e.push(r)}),e}function ZM(n,t){return Ug(t).filter(e=>!Iu(n,e))}class XM{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Hg(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=jg(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Tr extends XM{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class li extends XM{get formDirective(){return null}get path(){return null}}let ex=(()=>{class n extends class JM{constructor(t){this._cd=t}get isTouched(){var t,e;return!(null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e||!e.touched)}get isUntouched(){var t,e;return!(null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e||!e.untouched)}get isPristine(){var t,e;return!(null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e||!e.pristine)}get isDirty(){var t,e;return!(null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e||!e.dirty)}get isValid(){var t,e;return!(null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e||!e.valid)}get isInvalid(){var t,e;return!(null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e||!e.invalid)}get isPending(){var t,e;return!(null===(e=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===e||!e.pending)}get isSubmitted(){var t;return!(null===(t=this._cd)||void 0===t||!t.submitted)}}{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(x(Tr,2))},n.\u0275dir=Me({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&At("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Le]}),n})();const Yl="VALID",Pu="INVALID",Ca="PENDING",Kl="DISABLED";function Wg(n){return(Ou(n)?n.validators:n)||null}function nx(n){return Array.isArray(n)?Hg(n):n||null}function qg(n,t){return(Ou(t)?t.asyncValidators:n)||null}function ix(n){return Array.isArray(n)?jg(n):n||null}function Ou(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}class ox{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=nx(this._rawValidators),this._composedAsyncValidatorFn=ix(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Yl}get invalid(){return this.status===Pu}get pending(){return this.status==Ca}get disabled(){return this.status===Kl}get enabled(){return this.status!==Kl}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=nx(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=ix(t)}addValidators(t){this.setValidators(QM(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(QM(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(ZM(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(ZM(t,this._rawAsyncValidators))}hasValidator(t){return Iu(this._rawValidators,t)}hasAsyncValidator(t){return Iu(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=Ca,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Kl,this.errors=null,this._forEachChild(i=>{i.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Yl,this._forEachChild(i=>{i.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Yl||this.status===Ca)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Kl:Yl}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Ca,this._hasOwnPendingAsyncValidator=!0;const e=jM(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new je,this.statusChanges=new je}_calculateStatus(){return this._allControlsDisabled()?Kl:this.errors?Pu:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ca)?Ca:this._anyControlsHaveStatus(Pu)?Pu:Yl}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Ou(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}}class Yg extends ox{constructor(t,e,i){super(Wg(e),qg(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){(function sx(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new Be(1002,"")})})(this,0,t),Object.keys(t).forEach(i=>{(function rx(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new Be(1e3,"");if(!i[e])throw new Be(1001,"")})(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}function Ql(n,t){var e,i;Kg(n,t),t.valueAccessor.writeValue(n.value),n.disabled&&(null===(i=(e=t.valueAccessor).setDisabledState)||void 0===i||i.call(e,!0)),function Aj(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&ax(n,t)})}(n,t),function Rj(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function Ij(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&ax(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function Tj(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function Lu(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Bu(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Nu(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Kg(n,t){const e=YM(n);null!==t.validator?n.setValidators(qM(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=KM(n);null!==t.asyncValidator?n.setAsyncValidators(qM(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();Nu(t._rawValidators,r),Nu(t._rawAsyncValidators,r)}function Bu(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=YM(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(null!==t.asyncValidator){const r=KM(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}const i=()=>{};return Nu(t._rawValidators,i),Nu(t._rawAsyncValidators,i),e}function ax(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function lx(n,t){Kg(n,t)}function dx(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}const Nj={provide:li,useExisting:Ft(()=>Xl)},Zl=(()=>Promise.resolve(null))();let Xl=(()=>{class n extends li{constructor(e,i){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new je,this.form=new Yg({},Hg(e),jg(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Zl.then(()=>{const i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),Ql(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Zl.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Zl.then(()=>{const i=this._findContainer(e.path),r=new Yg({});lx(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Zl.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Zl.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,dx(this.form,this._directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return n.\u0275fac=function(e){return new(e||n)(x(Nn,10),x(Ts,10))},n.\u0275dir=Me({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&$e("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Xe([Nj]),Le]}),n})();function ux(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function hx(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const fx=class extends ox{constructor(t=null,e,i){super(Wg(e),qg(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ou(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=hx(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){ux(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){ux(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){hx(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},Hj={provide:Tr,useExisting:Ft(()=>Xg)},gx=(()=>Promise.resolve(null))();let Xg=(()=>{class n extends Tr{constructor(e,i,r,s,o){super(),this._changeDetectorRef=o,this.control=new fx,this._registered=!1,this.update=new je,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function Zg(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(s=>{s.constructor===Bg?e=s:function Fj(n){return Object.getPrototypeOf(n.constructor)===fo}(s)?i=s:r=s}),r||i||e||null}(0,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function Qg(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Ql(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){gx.then(()=>{var i;this.control.setValue(e,{emitViewToModelChange:!1}),null===(i=this._changeDetectorRef)||void 0===i||i.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&ts(i);gx.then(()=>{var s;r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),null===(s=this._changeDetectorRef)||void 0===s||s.markForCheck()})}_getPath(e){return this._parent?function Fu(n,t){return[...t.path,n]}(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(x(li,9),x(Nn,10),x(Ts,10),x(ai,10),x(en,8))},n.\u0275dir=Me({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Xe([Hj]),Le,cn]}),n})(),vx=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();const Jg=new De("NgModelWithFormControlWarning"),qj={provide:li,useExisting:Ft(()=>Jl)};let Jl=(()=>{class n extends li{constructor(e,i){super(),this.validators=e,this.asyncValidators=i,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new je,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Bu(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return Ql(i,e),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Lu(e.control||null,e,!1),function Lj(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,dx(this.form,this.directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(Lu(i||null,e),(n=>n instanceof fx)(r)&&(Ql(r,e),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);lx(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function Pj(n,t){return Bu(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Kg(this.form,this),this._oldForm&&Bu(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(x(Nn,10),x(Ts,10))},n.\u0275dir=Me({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&$e("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Xe([qj]),Le,cn]}),n})(),Fx=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[vx]}),n})(),h3=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Fx]}),n})(),f3=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Jg,useValue:e.warnOnNgModelWithFormControl}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Fx]}),n})();function tt(...n){return gn(n,qa(n))}function Da(n,t){return ut(t)?Pn(n,t,1):Pn(n,1)}function yn(n,t){return Pe((e,i)=>{let r=0;e.subscribe(_e(i,s=>n.call(t,s,r++)&&i.next(s)))})}class Lx{}class Nx{}class Wi{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),s=r.toLowerCase(),o=e.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Wi?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Wi;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Wi?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const s=t.value;if(s){let o=this.headers.get(e);if(!o)return;o=o.filter(a=>-1===s.indexOf(a)),0===o.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class g3{encodeKey(t){return Bx(t)}encodeValue(t){return Bx(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const v3=/%(\d[a-f0-9])/gi,y3={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Bx(n){return encodeURIComponent(n).replace(v3,(t,e)=>{var i;return null!==(i=y3[e])&&void 0!==i?i:t})}function Vu(n){return`${n}`}class As{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new g3,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function _3(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,a]=-1==s?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,s)),t.decodeValue(r.slice(s+1))],l=e.get(o)||[];l.push(a),e.set(o,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map(Vu):[Vu(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(s=>{e.push({param:i,value:s,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new As({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(Vu(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(Vu(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class b3{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function Vx(n){return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer}function Hx(n){return"undefined"!=typeof Blob&&n instanceof Blob}function jx(n){return"undefined"!=typeof FormData&&n instanceof FormData}class ec{constructor(t,e,i,r){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function w3(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params)),this.headers||(this.headers=new Wi),this.context||(this.context=new b3),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":aw.set(k,t.setHeaders[k]),c)),t.setParams&&(d=Object.keys(t.setParams).reduce((w,k)=>w.set(k,t.setParams[k]),d)),new ec(i,r,o,{params:d,headers:c,context:f,reportProgress:l,responseType:s,withCredentials:a})}}var Mn=(()=>((Mn=Mn||{})[Mn.Sent=0]="Sent",Mn[Mn.UploadProgress=1]="UploadProgress",Mn[Mn.ResponseHeader=2]="ResponseHeader",Mn[Mn.DownloadProgress=3]="DownloadProgress",Mn[Mn.Response=4]="Response",Mn[Mn.User=5]="User",Mn))();class o_{constructor(t,e=200,i="OK"){this.headers=t.headers||new Wi,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class a_ extends o_{constructor(t={}){super(t),this.type=Mn.ResponseHeader}clone(t={}){return new a_({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class tc extends o_{constructor(t={}){super(t),this.type=Mn.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new tc({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class l_ extends o_{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function c_(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let nc=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let s;if(e instanceof ec)s=e;else{let l,c;l=r.headers instanceof Wi?r.headers:new Wi(r.headers),r.params&&(c=r.params instanceof As?r.params:new As({fromObject:r.params})),s=new ec(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const o=tt(s).pipe(Da(l=>this.handler.handle(l)));if(e instanceof ec||"events"===r.observe)return o;const a=o.pipe(yn(l=>l instanceof tc));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(U(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(U(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(U(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(U(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new As).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,c_(r,i))}post(e,i,r={}){return this.request("POST",e,c_(r,i))}put(e,i,r={}){return this.request("PUT",e,c_(r,i))}}return n.\u0275fac=function(e){return new(e||n)(te(Lx))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();class Ux{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const d_=new De("HTTP_INTERCEPTORS");let D3=(()=>{class n{intercept(e,i){return i.handle(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();const E3=/^\)\]\}',?\n/;let zx=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new J(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((k,j)=>r.setRequestHeader(k,j.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const k=e.detectContentTypeHeader();null!==k&&r.setRequestHeader("Content-Type",k)}if(e.responseType){const k=e.responseType.toLowerCase();r.responseType="json"!==k?k:"text"}const s=e.serializeBody();let o=null;const a=()=>{if(null!==o)return o;const k=r.statusText||"OK",j=new Wi(r.getAllResponseHeaders()),K=function M3(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return o=new a_({headers:j,status:r.status,statusText:k,url:K}),o},l=()=>{let{headers:k,status:j,statusText:K,url:ae}=a(),ce=null;204!==j&&(ce=void 0===r.response?r.responseText:r.response),0===j&&(j=ce?200:0);let Te=j>=200&&j<300;if("json"===e.responseType&&"string"==typeof ce){const he=ce;ce=ce.replace(E3,"");try{ce=""!==ce?JSON.parse(ce):null}catch(Oe){ce=he,Te&&(Te=!1,ce={error:Oe,text:ce})}}Te?(i.next(new tc({body:ce,headers:k,status:j,statusText:K,url:ae||void 0})),i.complete()):i.error(new l_({error:ce,headers:k,status:j,statusText:K,url:ae||void 0}))},c=k=>{const{url:j}=a(),K=new l_({error:k,status:r.status||0,statusText:r.statusText||"Unknown Error",url:j||void 0});i.error(K)};let d=!1;const f=k=>{d||(i.next(a()),d=!0);let j={type:Mn.DownloadProgress,loaded:k.loaded};k.lengthComputable&&(j.total=k.total),"text"===e.responseType&&!!r.responseText&&(j.partialText=r.responseText),i.next(j)},w=k=>{let j={type:Mn.UploadProgress,loaded:k.loaded};k.lengthComputable&&(j.total=k.total),i.next(j)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",f),null!==s&&r.upload&&r.upload.addEventListener("progress",w)),r.send(s),i.next({type:Mn.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",f),null!==s&&r.upload&&r.upload.removeEventListener("progress",w)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(te(_E))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();const u_=new De("XSRF_COOKIE_NAME"),h_=new De("XSRF_HEADER_NAME");class $x{}let p_,x3=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=sE(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(te(ct),te(Ud),te(u_))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),f_=(()=>{class n{constructor(e,i){this.tokenService=e,this.headerName=i}intercept(e,i){const r=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||r.startsWith("http://")||r.startsWith("https://"))return i.handle(e);const s=this.tokenService.getToken();return null!==s&&!e.headers.has(this.headerName)&&(e=e.clone({headers:e.headers.set(this.headerName,s)})),i.handle(e)}}return n.\u0275fac=function(e){return new(e||n)(te($x),te(h_))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),S3=(()=>{class n{constructor(e,i){this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=this.injector.get(d_,[]);this.chain=i.reduceRight((r,s)=>new Ux(r,s),this.backend)}return this.chain.handle(e)}}return n.\u0275fac=function(e){return new(e||n)(te(Nx),te(Jt))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),k3=(()=>{class n{static disable(){return{ngModule:n,providers:[{provide:f_,useClass:D3}]}}static withOptions(e={}){return{ngModule:n,providers:[e.cookieName?{provide:u_,useValue:e.cookieName}:[],e.headerName?{provide:h_,useValue:e.headerName}:[]]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[f_,{provide:d_,useExisting:f_,multi:!0},{provide:$x,useClass:x3},{provide:u_,useValue:"XSRF-TOKEN"},{provide:h_,useValue:"X-XSRF-TOKEN"}]}),n})(),T3=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[nc,{provide:Lx,useClass:S3},zx,{provide:Nx,useExisting:zx}],imports:[k3.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]}),n})();try{p_="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(n){p_=!1}let ic,mo,m_,bn=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function CV(n){return n===mE}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!p_)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(te(Ud))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Ar(n){return function A3(){if(null==ic&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>ic=!0}))}finally{ic=ic||!1}return ic}()?n:!!n.capture}function I3(){if(null==mo){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return mo=!1,mo;if("scrollBehavior"in document.documentElement.style)mo=!0;else{const n=Element.prototype.scrollTo;mo=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return mo}function ju(n){if(function R3(){if(null==m_){const n="undefined"!=typeof document?document.head:null;m_=!(!n||!n.createShadowRoot&&!n.attachShadow)}return m_}()){const t=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function g_(){let n="undefined"!=typeof document&&document?document.activeElement:null;for(;n&&n.shadowRoot;){const t=n.shadowRoot.activeElement;if(t===n)break;n=t}return n}function ur(n){return n.composedPath?n.composedPath()[0]:n.target}function __(){return"undefined"!=typeof __karma__&&!!__karma__||"undefined"!=typeof jasmine&&!!jasmine||"undefined"!=typeof jest&&!!jest||"undefined"!=typeof Mocha&&!!Mocha}function rt(n){return null!=n&&"false"!=`${n}`}function Ii(n,t=0){return function P3(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}(n)?Number(n):t}function Uu(n){return Array.isArray(n)?n:[n]}function xn(n){return null==n?"":"string"==typeof n?n:`${n}px`}function Rn(n){return n instanceof Je?n.nativeElement:n}class mi extends ue{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){const{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}function gi(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}function wn(n,t,e){const i=ut(n)||t||e?{next:n,error:t,complete:e}:n;return i?Pe((r,s)=>{var o;null===(o=i.subscribe)||void 0===o||o.call(i);let a=!0;r.subscribe(_e(s,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),s.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),s.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),s.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):N}class G3 extends X{constructor(t,e){super()}schedule(t,e=0){return this}}const zu={setInterval(n,t,...e){const{delegate:i}=zu;return null!=i&&i.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){const{delegate:t}=zu;return((null==t?void 0:t.clearInterval)||clearInterval)(n)},delegate:void 0};class D_ extends G3{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,i=0){return zu.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;zu.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(s){i=!0,r=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,V(i,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const E_={now:()=>(E_.delegate||Date).now(),delegate:void 0};class sc{constructor(t,e=sc.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}sc.now=E_.now;class M_ extends sc{constructor(t,e=sc.now){super(t,e),this.actions=[],this._active=!1,this._scheduled=void 0}flush(t){const{actions:e}=this;if(this._active)return void e.push(t);let i;this._active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const $u=new M_(D_),W3=$u;function x_(n,t=$u){return Pe((e,i)=>{let r=null,s=null,o=null;const a=()=>{if(r){r.unsubscribe(),r=null;const c=s;s=null,i.next(c)}};function l(){const c=o+n,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{s=r=null}))})}function S_(n){return yn((t,e)=>n<=e)}function k_(n,t=N){return n=null!=n?n:q3,Pe((e,i)=>{let r,s=!0;e.subscribe(_e(i,o=>{const a=t(o);(s||!n(r,a))&&(s=!1,r=a,i.next(o))}))})}function q3(n,t){return n===t}function Ot(n){return Pe((t,e)=>{di(n).subscribe(_e(e,()=>e.complete(),y)),!e.closed&&t.subscribe(e)})}let Kx=(()=>{class n{create(e){return"undefined"==typeof MutationObserver?null:new MutationObserver(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Y3=(()=>{class n{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){const i=Rn(e);return new J(r=>{const o=this._observeElement(i).subscribe(r);return()=>{o.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{const i=new ue,r=this._mutationObserverFactory.create(s=>i.next(s));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:i,count:1})}return this._observedElements.get(e).stream}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){const{observer:i,stream:r}=this._observedElements.get(e);i&&i.disconnect(),r.complete(),this._observedElements.delete(e)}}}return n.\u0275fac=function(e){return new(e||n)(te(Kx))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),T_=(()=>{class n{constructor(e,i,r){this._contentObserver=e,this._elementRef=i,this._ngZone=r,this.event=new je,this._disabled=!1,this._currentSubscription=null}get disabled(){return this._disabled}set disabled(e){this._disabled=rt(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Ii(e),this._subscribe()}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?e.pipe(x_(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){var e;null===(e=this._currentSubscription)||void 0===e||e.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(x(Y3),x(Je),x(et))},n.\u0275dir=Me({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),Gu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[Kx]}),n})();class Xx{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new ue,this._typeaheadSubscription=X.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new ue,this.change=new ue,t instanceof ma&&t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}})}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(wn(e=>this._pressedLetters.push(e)),x_(t),yn(()=>this._pressedLetters.length>0),U(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;default:return void((r||gi(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t),r=e[i];this._activeItem=null==r?null:r,this._activeItemIndex=i}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof ma?this._items.toArray():this._items}}class Z3 extends Xx{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class Wu extends Xx{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}let qu=(()=>{class n{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function J3(n){return!!(n.offsetWidth||n.offsetHeight||"function"==typeof n.getClientRects&&n.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;const i=function X3(n){try{return n.frameElement}catch(t){return null}}(function aU(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}(e));if(i&&(-1===eS(i)||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),s=eS(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function sU(n){let t=n.nodeName.toLowerCase(),e="input"===t&&n.type;return"text"===e||"password"===e||"select"===t||"textarea"===t}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}isFocusable(e,i){return function oU(n){return!function tU(n){return function iU(n){return"input"==n.nodeName.toLowerCase()}(n)&&"hidden"==n.type}(n)&&(function eU(n){let t=n.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(n)||function nU(n){return function rU(n){return"a"==n.nodeName.toLowerCase()}(n)&&n.hasAttribute("href")}(n)||n.hasAttribute("contenteditable")||Jx(n))}(e)&&!this.isDisabled(e)&&((null==i?void 0:i.ignoreVisibility)||this.isVisible(e))}}return n.\u0275fac=function(e){return new(e||n)(te(bn))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Jx(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let t=n.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function eS(n){if(!Jx(n))return null;const t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class lU{constructor(t,e,i,r,s=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){const e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){const e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){const i=this._getFirstTabbableElement(e);return null==i||i.focus(t),!!i}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){const e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){const e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;const e=t.children;for(let i=0;i=0;i--){const r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(sn(1)).subscribe(t)}}let A_=(()=>{class n{constructor(e,i,r){this._checker=e,this._ngZone=i,this._document=r}create(e,i=!1){return new lU(e,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(e){return new(e||n)(te(qu),te(et),te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function I_(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function R_(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}const cU=new De("cdk-input-modality-detector-options"),dU={ignoreKeys:[18,17,224,91,16]},xa=Ar({passive:!0,capture:!0});let uU=(()=>{class n{constructor(e,i,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new mi(null),this._lastTouchMs=0,this._onKeydown=o=>{var a,l;null!==(l=null===(a=this._options)||void 0===a?void 0:a.ignoreKeys)&&void 0!==l&&l.some(c=>c===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=ur(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(I_(o)?"keyboard":"mouse"),this._mostRecentTarget=ur(o))},this._onTouchstart=o=>{R_(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=ur(o))},this._options=Object.assign(Object.assign({},dU),s),this.modalityDetected=this._modality.pipe(S_(1)),this.modalityChanged=this.modalityDetected.pipe(k_()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,xa),r.addEventListener("mousedown",this._onMousedown,xa),r.addEventListener("touchstart",this._onTouchstart,xa)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,xa),document.removeEventListener("mousedown",this._onMousedown,xa),document.removeEventListener("touchstart",this._onTouchstart,xa))}}return n.\u0275fac=function(e){return new(e||n)(te(bn),te(et),te(ct),te(cU,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const hU=new De("liveAnnouncerElement",{providedIn:"root",factory:function fU(){return null}}),pU=new De("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let P_=(()=>{class n{constructor(e,i,r,s){this._ngZone=i,this._defaultOptions=s,this._document=r,this._liveElement=e||this._createLiveElement()}announce(e,...i){const r=this._defaultOptions;let s,o;return 1===i.length&&"number"==typeof i[0]?o=i[0]:[s,o]=i,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==o&&r&&(o=r.duration),this._liveElement.setAttribute("aria-live",s),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,"number"==typeof o&&(this._previousTimeout=setTimeout(()=>this.clear(),o)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){var e,i;clearTimeout(this._previousTimeout),null===(e=this._liveElement)||void 0===e||e.remove(),this._liveElement=null,null===(i=this._currentResolve)||void 0===i||i.call(this),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const e="cdk-live-announcer-element",i=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let s=0;s{class n{constructor(e,i,r,s,o){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new ue,this._rootNodeFocusAndBlurListener=a=>{const l=ur(a),c="focus"===a.type?this._onFocus:this._onBlur;for(let d=l;d;d=d.parentElement)c.call(this,a,d)},this._document=s,this._detectionMode=(null==o?void 0:o.detectionMode)||0}monitor(e,i=!1){const r=Rn(e);if(!this._platform.isBrowser||1!==r.nodeType)return tt(null);const s=ju(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return i&&(o.checkChildren=!0),o.subject;const a={checkChildren:i,subject:new ue,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const i=Rn(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){const s=Rn(e);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!(null==e||!e.contains(this._inputModalityDetector._mostRecentTarget))}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused","touch"===i),e.classList.toggle("cdk-keyboard-focused","keyboard"===i),e.classList.toggle("cdk-mouse-focused","mouse"===i),e.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,i){const r=this._elementInfo.get(i),s=ur(e);!r||!r.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),r)}_onBlur(e,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;const i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,Yu),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,Yu)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ot(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(e){const i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Yu),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Yu),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){const i=[];return this._elementInfo.forEach((r,s)=>{(s===e||r.checkChildren&&s.contains(e))&&i.push([s,r])}),i}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(bn),te(uU),te(ct,8),te(mU,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const nS="cdk-high-contrast-black-on-white",iS="cdk-high-contrast-white-on-black",O_="cdk-high-contrast-active";let rS=(()=>{class n{constructor(e,i){this._platform=e,this._document=i}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),s){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const e=this._document.body.classList;e.remove(O_,nS,iS),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?e.add(O_,nS):2===i&&e.add(O_,iS)}}}return n.\u0275fac=function(e){return new(e||n)(te(bn),te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ku=(()=>{class n{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(e){return new(e||n)(te(rS))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Gu]}),n})();function F_(n=0,t,e=W3){let i=-1;return null!=t&&(sy(t)?e=t:i=t),new J(r=>{let s=function gU(n){return n instanceof Date&&!isNaN(n)}(n)?+n-e.now():n;s<0&&(s=0);let o=0;return e.schedule(function(){r.closed||(r.next(o++),0<=i?this.schedule(void 0,i):r.complete())},s)})}const oc={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:i}=oc;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);const r=t(s=>{e=void 0,n(s)});return new X(()=>null==e?void 0:e(r))},requestAnimationFrame(...n){const{delegate:t}=oc;return((null==t?void 0:t.requestAnimationFrame)||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){const{delegate:t}=oc;return((null==t?void 0:t.cancelAnimationFrame)||cancelAnimationFrame)(...n)},delegate:void 0},sS=new class yU extends M_{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;t=t||i.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}}(class vU extends D_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=oc.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(t,e,i);t.actions.some(r=>r.id===e)||(oc.cancelAnimationFrame(e),t._scheduled=void 0)}}),bU=["addListener","removeListener"],wU=["addEventListener","removeEventListener"],CU=["on","off"];function _o(n,t,e,i){if(ut(e)&&(i=e,e=void 0),i)return _o(n,t,e).pipe(Ng(i));const[r,s]=function MU(n){return ut(n.addEventListener)&&ut(n.removeEventListener)}(n)?wU.map(o=>a=>n[o](t,a,e)):function DU(n){return ut(n.addListener)&&ut(n.removeListener)}(n)?bU.map(oS(n,t)):function EU(n){return ut(n.on)&&ut(n.off)}(n)?CU.map(oS(n,t)):[];if(!r&&Oi(n))return Pn(o=>_o(o,t,e))(di(n));if(!r)throw new TypeError("Invalid event target");return new J(o=>{const a=(...l)=>o.next(1s(a)})}function oS(n,t){return e=>i=>n[e](t,i)}let L_,xU=1;const Qu={};function aS(n){return n in Qu&&(delete Qu[n],!0)}const SU={setImmediate(n){const t=xU++;return Qu[t]=!0,L_||(L_=Promise.resolve()),L_.then(()=>aS(t)&&n()),t},clearImmediate(n){aS(n)}},{setImmediate:kU,clearImmediate:TU}=SU,Zu={setImmediate(...n){const{delegate:t}=Zu;return((null==t?void 0:t.setImmediate)||kU)(...n)},clearImmediate(n){const{delegate:t}=Zu;return((null==t?void 0:t.clearImmediate)||TU)(n)},delegate:void 0};new class IU extends M_{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;t=t||i.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}}(class AU extends D_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Zu.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(t,e,i);t.actions.some(r=>r.id===e)||(Zu.clearImmediate(e),t._scheduled=void 0)}});function lS(n,t=$u){return function PU(n){return Pe((t,e)=>{let i=!1,r=null,s=null,o=!1;const a=()=>{if(null==s||s.unsubscribe(),s=null,i){i=!1;const c=r;r=null,e.next(c)}o&&e.complete()},l=()=>{s=null,o&&e.complete()};t.subscribe(_e(e,c=>{i=!0,r=c,s||di(n(c)).subscribe(s=_e(e,a,l))},()=>{o=!0,(!i||!s||s.closed)&&e.complete()}))})}(()=>F_(n,t))}const OU=new De("cdk-dir-doc",{providedIn:"root",factory:function FU(){return ld(ct)}}),LU=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let qi=(()=>{class n{constructor(e){if(this.value="ltr",this.change=new je,e){const r=e.documentElement?e.documentElement.dir:null;this.value=function NU(n){const t=(null==n?void 0:n.toLowerCase())||"";return"auto"===t&&"undefined"!=typeof navigator&&(null==navigator?void 0:navigator.language)?LU.test(navigator.language)?"rtl":"ltr":"rtl"===t?"rtl":"ltr"}((e.body?e.body.dir:null)||r||"ltr")}}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(te(OU,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ac=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),VU=(()=>{class n{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new ue,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){const i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new J(i=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(lS(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):tt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){const r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(yn(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(e){const i=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,e)&&i.push(s)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=Rn(i),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>_o(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(bn),te(ct,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ss=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new ue,this._changeListener=s=>{this._change.next(s)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,i=this._getWindow(),r=e.documentElement,s=r.getBoundingClientRect();return{top:-s.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-s.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(lS(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(te(bn),te(et),te(ct,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Sa=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),N_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ac,Sa,ac,Sa]}),n})();function B_(n,t,e){for(let i in t)if(t.hasOwnProperty(i)){const r=t[i];r?n.setProperty(i,r,null!=e&&e.has(i)?"important":""):n.removeProperty(i)}return n}function ka(n,t){const e=t?"":"none";B_(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function cS(n,t,e){B_(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Xu(n,t){return t&&"none"!=t?n+" "+t:n}function dS(n){const t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function V_(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function H_(n){const t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function j_(n,t,e){const{top:i,bottom:r,left:s,right:o}=n;return e>=i&&e<=r&&t>=s&&t<=o}function lc(n,t,e){n.top+=t,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function uS(n,t,e,i){const{top:r,right:s,bottom:o,left:a,width:l,height:c}=n,d=l*t,f=c*t;return i>r-f&&ia-d&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:H_(e)})})}handleScroll(t){const e=ur(t),i=this.positions.get(e);if(!i)return null;const r=i.scrollPosition;let s,o;if(e===this._document){const c=this.getViewportScrollPosition();s=c.top,o=c.left}else s=e.scrollTop,o=e.scrollLeft;const a=r.top-s,l=r.left-o;return this.positions.forEach((c,d)=>{c.clientRect&&e!==d&&e.contains(d)&&lc(c.clientRect,a,l)}),r.top=s,r.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function fS(n){const t=n.cloneNode(!0),e=t.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();t.removeAttribute("id");for(let r=0;r{if(this.beforeStarted.next(),this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(l.x-this._pickupPositionOnPage.x)+Math.abs(l.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const k=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),j=this._dropContainer;if(!k)return void this._endDragSequence(a);(!j||!j.isDragging()&&!j.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();const c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{const d=this._activeTransform;d.x=c.x-this._pickupPositionOnPage.x+this._passiveTransform.x,d.y=c.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(d.x,d.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new hS(i),o.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(t){const e=rt(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(i=>ka(i,e)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>Rn(i)),this._handles.forEach(i=>ka(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=Rn(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,Ju),e.addEventListener("touchstart",this._pointerDown,_S),e.addEventListener("dragstart",this._nativeDragStart,Ju)}),this._initialTransform=void 0,this._rootElement=e),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?Rn(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){var t,e;this._removeRootElementListeners(this._rootElement),this.isDragging()&&(null===(t=this._rootElement)||void 0===t||t.remove()),null===(e=this._anchor)||void 0===e||e.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),ka(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),ka(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){var t,e;null===(t=this._preview)||void 0===t||t.remove(),null===(e=this._previewRef)||void 0===e||e.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){var t,e;null===(t=this._placeholder)||void 0===t||t.remove(),null===(e=this._placeholderRef)||void 0===e||e.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){cc(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const i=this._rootElement,r=i.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();r.insertBefore(o,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),cS(i,!1,U_),this._document.body.appendChild(r.replaceChild(s,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),r=cc(e),s=!r&&0!==e.button,o=this._rootElement,a=ur(e),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=r?R_(e):I_(e);if(a&&a.draggable&&"mousedown"===e.type&&e.preventDefault(),i||s||l||c)return;if(this._handles.length){const w=o.style;this._rootElementTapHighlight=w.webkitTapHighlightColor||"",w.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(w=>this._updateOnScroll(w)),this._boundaryElement&&(this._boundaryRect=H_(this._boundaryElement));const d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);const f=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:f.x,y:f.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){cS(this._rootElement,!0,U_),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),s=this._getDragDistance(r),o=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:s,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:s,dropPoint:r,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,o,s,r),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:r}){let s=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,t,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let r;if(i&&t){const s=t.matchSize?this._rootElement.getBoundingClientRect():null,o=t.viewContainer.createEmbeddedView(i,t.context);o.detectChanges(),r=yS(o,this._document),this._previewRef=o,t.matchSize?bS(r,s):r.style.transform=eh(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const s=this._rootElement;r=fS(s),bS(r,s.getBoundingClientRect()),this._initialTransform&&(r.style.transform=this._initialTransform)}return B_(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},U_),ka(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>r.classList.add(s)):r.classList.add(e)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);const e=function jU(n){const t=getComputedStyle(n),e=V_(t,"transition-property"),i=e.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=e.indexOf(i),s=V_(t,"transition-duration"),o=V_(t,"transition-delay");return dS(s[r])+dS(o[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=o=>{var a;(!o||ur(o)===this._preview&&"transform"===o.propertyName)&&(null===(a=this._preview)||void 0===a||a.removeEventListener("transitionend",r),i(),clearTimeout(s))},s=setTimeout(r,1.5*e);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=yS(this._placeholderRef,this._document)):i=fS(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e){const i=this._rootElement.getBoundingClientRect(),r=t===this._rootElement?null:t,s=r?r.getBoundingClientRect():i,o=cc(e)?e.targetTouches[0]:e,a=this._getViewportScrollPosition();return{x:s.left-i.left+(o.pageX-s.left-a.left),y:s.top-i.top+(o.pageY-s.top-a.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=cc(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=i.pageX-e.left,s=i.pageY-e.top;if(this._ownerSVGElement){const o=this._ownerSVGElement.getScreenCTM();if(o){const a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=s,a.matrixTransform(o.inverse())}}return{x:r,y:s}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(t,this):t;if("x"===this.lockAxis||"x"===e?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:s,y:o}=this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+o,f=a.bottom-(c-o);i=vS(i,a.left+s,a.right-(l-s)),r=vS(r,d,f)}return{x:i,y:r}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,r=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-s.x),a=Math.abs(i-s.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=e>s.x?1:-1,s.x=e),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>s.y?1:-1,s.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,ka(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,Ju),t.removeEventListener("touchstart",this._pointerDown,_S),t.removeEventListener("dragstart",this._nativeDragStart,Ju)}_applyRootElementTransform(t,e){const i=eh(t,e),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=Xu(i,this._initialTransform)}_applyPreviewTransform(t,e){var i;const r=null!==(i=this._previewTemplate)&&void 0!==i&&i.template?void 0:this._initialTransform,s=eh(t,e);this._preview.style.transform=Xu(s,r)}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._boundaryElement.getBoundingClientRect(),r=this._rootElement.getBoundingClientRect();if(0===i.width&&0===i.height||0===r.width&&0===r.height)return;const s=i.left-r.left,o=r.right-i.right,a=i.top-r.top,l=r.bottom-i.bottom;i.width>r.width?(s>0&&(t+=s),o>0&&(t-=o)):t=0,i.height>r.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:cc(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=ur(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&lc(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){var t;return(null===(t=this._parentPositions.positions.get(this._document))||void 0===t?void 0:t.scrollPosition)||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=ju(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){const i=this._previewContainer||"global";if("parent"===i)return t;if("global"===i){const r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Rn(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()),this._previewRect}_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}}function eh(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`}function vS(n,t,e){return Math.max(t,Math.min(e,n))}function cc(n){return"t"===n.type[0]}function yS(n,t){const e=n.rootNodes;if(1===e.length&&e[0].nodeType===t.ELEMENT_NODE)return e[0];const i=t.createElement("div");return e.forEach(r=>i.appendChild(r)),i}function bS(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=eh(t.left,t.top)}function dc(n,t){return Math.max(0,Math.min(t,n))}class WU{constructor(t,e,i,r,s){this._dragDropRegistry=e,this._ngZone=r,this._viewportRuler=s,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new ue,this.entered=new ue,this.exited=new ue,this.dropped=new ue,this.sorted=new ue,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=X.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new ue,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function _U(n=0,t=$u){return n<0&&(n=0),F_(n,n,t)}(0,sS).pipe(Ot(this._stopScrollTimers)).subscribe(()=>{const o=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?o.scrollBy(0,-a):2===this._verticalScrollDirection&&o.scrollBy(0,a),1===this._horizontalScrollDirection?o.scrollBy(-a,0):2===this._horizontalScrollDirection&&o.scrollBy(a,0)})},this.element=Rn(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new hS(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,i,r){let s;this._draggingStarted(),null==r?(s=this.sortingDisabled?this._draggables.indexOf(t):-1,-1===s&&(s=this._getItemIndexFromPointerPosition(t,e,i))):s=r;const o=this._activeDraggables,a=o.indexOf(t),l=t.getPlaceholderElement();let c=o[s];if(c===t&&(c=o[s+1]),!c&&(null==s||-1===s||s-1&&o.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const d=c.getRootElement();d.parentElement.insertBefore(l,d),o.splice(s,0,t)}else Rn(this.element).appendChild(l),o.push(t);l.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,r,s,o,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:s,distance:o,dropPoint:a,event:l})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(r=>r.isDragging()).every(r=>-1===t.indexOf(r))?this._reset():this._cacheItems()),this}withDirection(t){return this._direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._orientation=t,this}withScrollableParents(t){const e=Rn(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,r){if(this.sortingDisabled||!this._clientRect||!uS(this._clientRect,.05,e,i))return;const s=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,r);if(-1===o&&s.length>0)return;const a="horizontal"===this._orientation,l=s.findIndex(ae=>ae.drag===t),c=s[o],f=c.clientRect,w=l>o?1:-1,k=this._getItemOffsetPx(s[l].clientRect,f,w),j=this._getSiblingOffsetPx(l,s,w),K=s.slice();(function GU(n,t,e){const i=dc(t,n.length-1),r=dc(e,n.length-1);if(i===r)return;const s=n[i],o=r{if(K[ce]===ae)return;const Te=ae.drag===t,he=Te?k:j,Oe=Te?t.getPlaceholderElement():ae.drag.getRootElement();ae.offset+=he,a?(Oe.style.transform=Xu(`translate3d(${Math.round(ae.offset)}px, 0, 0)`,ae.initialTransform),lc(ae.clientRect,0,he)):(Oe.style.transform=Xu(`translate3d(0, ${Math.round(ae.offset)}px, 0)`,ae.initialTransform),lc(ae.clientRect,he,0))}),this._previousSwap.overlaps=j_(f,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,r=0,s=0;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||uS(o.clientRect,.05,t,e)&&([r,s]=function qU(n,t,e,i){const r=DS(t,i),s=ES(t,e);let o=0,a=0;if(r){const l=n.scrollTop;1===r?l>0&&(o=1):n.scrollHeight-l>n.clientHeight&&(o=2)}if(s){const l=n.scrollLeft;1===s?l>0&&(a=1):n.scrollWidth-l>n.clientWidth&&(a=2)}return[o,a]}(a,o.clientRect,t,e),(r||s)&&(i=a))}),!r&&!s){const{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};r=DS(l,e),s=ES(l,t),i=window}i&&(r!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=s,this._scrollNode=i,(r||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const t=Rn(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=Rn(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_cacheItemPositions(){const t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:H_(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_reset(){this._isDragging=!1;const t=Rn(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(e=>{var i;const r=e.getRootElement();if(r){const s=null===(i=this._itemPositions.find(o=>o.drag===e))||void 0===i?void 0:i.initialTransform;r.style.transform=s||""}}),this._siblings.forEach(e=>e._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(t,e,i){const r="horizontal"===this._orientation,s=e[t].clientRect,o=e[t+-1*i];let a=s[r?"width":"height"]*i;if(o){const l=r?"left":"top",c=r?"right":"bottom";-1===i?a-=o.clientRect[l]-s[c]:a+=s[l]-o.clientRect[c]}return a}_getItemOffsetPx(t,e,i){const r="horizontal"===this._orientation;let s=r?e.left-t.left:e.top-t.top;return-1===i&&(s+=r?e.width-t.width:e.height-t.height),s}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,r="horizontal"===this._orientation;if(i[0].drag!==this._activeDraggables[0]){const o=i[i.length-1].clientRect;return r?t>=o.right:e>=o.bottom}{const o=i[0].clientRect;return r?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,i,r){const s="horizontal"===this._orientation,o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return!1;if(r){const c=s?r.x:r.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return s?e>=Math.floor(l.left)&&e=Math.floor(l.top)&&ir._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!j_(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const r=this._getShadowRoot().elementFromPoint(e,i);if(!r)return!1;const s=Rn(this.element);return r===s||s.contains(r)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&(this._itemPositions.forEach(({clientRect:i})=>{lc(i,e.top,e.left)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=ju(Rn(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._activeDraggables.filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function DS(n,t){const{top:e,bottom:i,height:r}=n,s=.05*r;return t>=e-s&&t<=e+s?1:t>=i-s&&t<=i+s?2:0}function ES(n,t){const{left:e,right:i,width:r}=n,s=.05*r;return t>=e-s&&t<=e+s?1:t>=i-s&&t<=i+s?2:0}const th=Ar({passive:!1,capture:!0});let YU=(()=>{class n{constructor(e,i){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new ue,this.pointerUp=new ue,this.scroll=new ue,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,th)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,th)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const r=i.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:th}),r||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:th}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,o)=>{this._document.addEventListener(o,s.handler,s.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new J(r=>this._ngZone.runOutsideAngular(()=>{const o=a=>{this._activeDragInstances.length&&r.next(a)};return e.addEventListener("scroll",o,!0),()=>{e.removeEventListener("scroll",o,!0)}}))),$n(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const KU={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let QU=(()=>{class n{constructor(e,i,r,s){this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=s}createDrag(e,i=KU){return new $U(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new WU(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(e){return new(e||n)(te(ct),te(et),te(ss),te(YU))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ZU=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[QU],imports:[Sa]}),n})();function nh(...n){return function XU(){return To(1)}()(gn(n,qa(n)))}function Qn(...n){const t=qa(n);return Pe((e,i)=>{(t?nh(n,e,t):nh(n,e)).subscribe(i)})}function JU(n,t){if(1&n&&kt(0,"mat-pseudo-checkbox",4),2&n){const e=lt();Ae("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function ez(n,t){if(1&n&&(fe(0,"span",5),Ue(1),we()),2&n){const e=lt();Ee(1),Ln("(",e.group.label,")")}}const tz=["*"],sz=new De("mat-sanity-checks",{providedIn:"root",factory:function rz(){return!0}});let ht=(()=>{class n{constructor(e,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!__()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return n.\u0275fac=function(e){return new(e||n)(te(rS),te(sz,8),te(ct))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ac,ac]}),n})();function uc(n){return class extends n{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=rt(t)}}}function vo(n,t){return class extends n{constructor(...e){super(...e),this.defaultColor=t,this.color=t}get color(){return this._color}set color(e){const i=e||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}}}function Rs(n){return class extends n{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=rt(t)}}}function yo(n,t=0){return class extends n{constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Ii(e):this.defaultTabIndex}}}function SS(n){return class extends n{constructor(...t){super(...t),this.errorState=!1}updateErrorState(){const t=this.errorState,s=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);s!==t&&(this.errorState=s,this.stateChanges.next())}}}const oz=new De("MAT_DATE_LOCALE",{providedIn:"root",factory:function az(){return ld(Er)}});class Ir{constructor(){this._localeChanges=new ue,this.localeChanges=this._localeChanges}getValidDateOrNull(t){return this.isDateInstance(t)&&this.isValid(t)?t:null}deserialize(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()}setLocale(t){this.locale=t,this._localeChanges.next()}compareDate(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)}sameDate(t,e){if(t&&e){let i=this.isValid(t),r=this.isValid(e);return i&&r?!this.compareDate(t,e):i==r}return t==e}clampDate(t,e,i){return e&&this.compareDate(t,e)<0?e:i&&this.compareDate(t,i)>0?i:t}}const z_=new De("mat-date-formats"),lz=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function $_(n,t){const e=Array(n);for(let i=0;i{class n extends Ir{constructor(e,i){super(),this.useUtcForDisplay=!1,super.setLocale(e)}getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getMonthNames(e){const i=new Intl.DateTimeFormat(this.locale,{month:e,timeZone:"utc"});return $_(12,r=>this._format(i,new Date(2017,r,1)))}getDateNames(){const e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return $_(31,i=>this._format(e,new Date(2017,0,i+1)))}getDayOfWeekNames(e){const i=new Intl.DateTimeFormat(this.locale,{weekday:e,timeZone:"utc"});return $_(7,r=>this._format(i,new Date(2017,0,r+1)))}getYearName(e){const i=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._format(i,e)}getFirstDayOfWeek(){return 0}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))}clone(e){return new Date(e.getTime())}createDate(e,i,r){let s=this._createDateWithOverflow(e,i,r);return s.getMonth(),s}today(){return new Date}parse(e){return"number"==typeof e?new Date(e):e?new Date(Date.parse(e)):null}format(e,i){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");const r=new Intl.DateTimeFormat(this.locale,Object.assign(Object.assign({},i),{timeZone:"utc"}));return this._format(r,e)}addCalendarYears(e,i){return this.addCalendarMonths(e,12*i)}addCalendarMonths(e,i){let r=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+i,this.getDate(e));return this.getMonth(r)!=((this.getMonth(e)+i)%12+12)%12&&(r=this._createDateWithOverflow(this.getYear(r),this.getMonth(r),0)),r}addCalendarDays(e,i){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+i)}toIso8601(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")}deserialize(e){if("string"==typeof e){if(!e)return null;if(lz.test(e)){let i=new Date(e);if(this.isValid(i))return i}}return super.deserialize(e)}isDateInstance(e){return e instanceof Date}isValid(e){return!isNaN(e.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(e,i,r){const s=new Date;return s.setFullYear(e,i,r),s.setHours(0,0,0,0),s}_2digit(e){return("00"+e).slice(-2)}_format(e,i){const r=new Date;return r.setUTCFullYear(i.getFullYear(),i.getMonth(),i.getDate()),r.setUTCHours(i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()),e.format(r)}}return n.\u0275fac=function(e){return new(e||n)(te(oz,8),te(bn))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();const dz={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let uz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[{provide:Ir,useClass:cz}]}),n})(),hz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[{provide:z_,useValue:dz}],imports:[uz]}),n})(),ih=(()=>{class n{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),kS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]}),n})();function hc(n,t,e){n.nativeElement.classList.toggle(t,e)}let rh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ht,ht]}),n})();class fz{constructor(t,e,i,r=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const AS={enterDuration:225,exitDuration:150},G_=Ar({passive:!0}),IS=["mousedown","touchstart"],RS=["mouseup","mouseleave","touchend","touchcancel"];class W_{constructor(t,e,i,r){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Rn(i))}fadeInRipple(t,e,i={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s=Object.assign(Object.assign({},AS),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=i.radius||function mz(n,t,e){const i=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+r*r)}(t,e,r),a=t-r.left,l=e-r.top,c=s.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=i.color&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const f=window.getComputedStyle(d),k=f.transitionDuration,j="none"===f.transitionProperty||"0s"===k||"0s, 0s"===k,K=new fz(this,d,i,j);d.style.transform="scale3d(1, 1, 1)",K.state=0,i.persistent||(this._mostRecentTransientRipple=K);let ae=null;return!j&&(c||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const ce=()=>this._finishRippleTransition(K),Te=()=>this._destroyRipple(K);d.addEventListener("transitionend",ce),d.addEventListener("transitioncancel",Te),ae={onTransitionEnd:ce,onTransitionCancel:Te}}),this._activeRipples.set(K,ae),(j||!c)&&this._finishRippleTransition(K),K}fadeOutRipple(t){if(2===t.state||3===t.state)return;const e=t.element,i=Object.assign(Object.assign({},AS),t.config.animation);e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=2,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){const e=Rn(t);!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(IS))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(RS),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){0===t.state?this._startFadeOutTransition(t):2===t.state&&this._destroyRipple(t)}_startFadeOutTransition(t){const e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=1,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){var e;const i=null!==(e=this._activeRipples.get(t))&&void 0!==e?e:null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=3,null!==i&&(t.element.removeEventListener("transitionend",i.onTransitionEnd),t.element.removeEventListener("transitioncancel",i.onTransitionCancel)),t.element.remove()}_onMousedown(t){const e=I_(t),i=this._lastTouchStartEvent&&Date.now(){!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_registerEvents(t){this._ngZone.runOutsideAngular(()=>{t.forEach(e=>{this._triggerElement.addEventListener(e,this,G_)})})}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){this._triggerElement&&(IS.forEach(t=>{this._triggerElement.removeEventListener(t,this,G_)}),this._pointerUpEventsRegistered&&RS.forEach(t=>{this._triggerElement.removeEventListener(t,this,G_)}))}}const sh=new De("mat-ripple-global-options");let Ps=(()=>{class n{constructor(e,i,r,s,o){this._elementRef=e,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new W_(this,i,e,r)}get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,i,Object.assign(Object.assign({},this.rippleConfig),r)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),e))}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(et),x(bn),x(sh,8),x(fn,8))},n.\u0275dir=Me({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,i){2&e&&At("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),Ta=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ht,ht]}),n})(),PS=(()=>{class n{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1}}return n.\u0275fac=function(e){return new(e||n)(x(fn,8))},n.\u0275cmp=vt({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(e,i){2&e&&At("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(e,i){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}'],encapsulation:2,changeDetection:0}),n})(),q_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ht]}),n})();const OS=new De("MAT_OPTION_PARENT_COMPONENT"),FS=new De("MatOptgroup");let gz=0;class _z{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let vz=(()=>{class n{constructor(e,i,r,s){this._element=e,this._changeDetectorRef=i,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+gz++,this.onSelectionChange=new je,this._stateChanges=new ue}get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=rt(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(e,i){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!gi(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getAriaSelected(){return this.selected||!this.multiple&&null}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue=e,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new _z(this,e))}}return n.\u0275fac=function(e){bs()},n.\u0275dir=Me({type:n,inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),Y_=(()=>{class n extends vz{constructor(e,i,r,s){super(e,i,r,s)}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(en),x(OS,8),x(FS,8))},n.\u0275cmp=vt({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(e,i){1&e&&$e("click",function(){return i._selectViaInteraction()})("keydown",function(s){return i._handleKeydown(s)}),2&e&&(Zr("id",i.id),wt("tabindex",i._getTabIndex())("aria-selected",i._getAriaSelected())("aria-disabled",i.disabled.toString()),At("mat-selected",i.selected)("mat-option-multiple",i.multiple)("mat-active",i.active)("mat-option-disabled",i.disabled))},exportAs:["matOption"],features:[Le],ngContentSelectors:tz,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(e,i){1&e&&(Fn(),it(0,JU,1,2,"mat-pseudo-checkbox",0),fe(1,"span",1),Tt(2),we(),it(3,ez,2,1,"span",2),kt(4,"div",3)),2&e&&(Ae("ngIf",i.multiple),Ee(3),Ae("ngIf",i.group&&i.group._inert),Ee(1),Ae("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[Ps,zi,PS],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],encapsulation:2,changeDetection:0}),n})();function LS(n,t,e){if(e.length){let i=t.toArray(),r=e.toArray(),s=0;for(let o=0;o{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Ta,pi,ht,q_]}),n})();const bz=["mat-button",""],wz=["*"],Dz=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],Ez=vo(uc(Rs(class{constructor(n){this._elementRef=n}})));let Aa=(()=>{class n extends Ez{constructor(e,i,r){super(e),this._focusMonitor=i,this._animationMode=r,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const s of Dz)this._hasHostAttributes(s)&&this._getHostElement().classList.add(s);e.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...e){return e.some(i=>this._getHostElement().hasAttribute(i))}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(hr),x(fn,8))},n.\u0275cmp=vt({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(e,i){if(1&e&&Gt(Ps,5),2&e){let r;Ge(r=We())&&(i.ripple=r.first)}},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(e,i){2&e&&(wt("disabled",i.disabled||null),At("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-button-disabled",i.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Le],attrs:bz,ngContentSelectors:wz,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(e,i){1&e&&(Fn(),fe(0,"span",0),Tt(1),we(),kt(2,"span",1)(3,"span",2)),2&e&&(Ee(2),At("mat-button-ripple-round",i.isRoundButton||i.isIconButton),Ae("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i.isIconButton)("matRippleTrigger",i._getHostElement()))},dependencies:[Ps],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}"],encapsulation:2,changeDetection:0}),n})(),oh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Ta,ht,ht]}),n})();const Mz=["*",[["mat-card-footer"]]],xz=["*","mat-card-footer"];let Sz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-card-content"],["","mat-card-content",""],["","matCardContent",""]],hostAttrs:[1,"mat-card-content"]}),n})(),kz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-card-title"]}),n})(),Tz=(()=>{class n{constructor(e){this._animationMode=e}}return n.\u0275fac=function(e){return new(e||n)(x(fn,8))},n.\u0275cmp=vt({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-card","mat-focus-indicator"],hostVars:2,hostBindings:function(e,i){2&e&&At("_mat-animation-noopable","NoopAnimations"===i._animationMode)},exportAs:["matCard"],ngContentSelectors:xz,decls:2,vars:0,template:function(e,i){1&e&&(Fn(Mz),Tt(0),Tt(1,1))},styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:block;position:relative;padding:16px;border-radius:4px}.mat-card._mat-animation-noopable{transition:none !important;animation:none !important}.mat-card>.mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card>.mat-divider-horizontal{left:auto;right:0}.mat-card>.mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card>.mat-divider-horizontal.mat-divider-inset{margin-right:0}.cdk-high-contrast-active .mat-card{outline:solid 1px}.mat-card-actions,.mat-card-subtitle,.mat-card-content{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px;display:block;overflow:hidden}.mat-card-image img{width:100%}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button,.mat-card-actions .mat-stroked-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media(max-width: 599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card>:first-child,.mat-card-content>:first-child{margin-top:0}.mat-card>:last-child:not(.mat-card-footer),.mat-card-content>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions:not(.mat-card-actions-align-end) .mat-button:first-child,.mat-card-actions:not(.mat-card-actions-align-end) .mat-raised-button:first-child,.mat-card-actions:not(.mat-card-actions-align-end) .mat-stroked-button:first-child{margin-left:0;margin-right:0}.mat-card-actions-align-end .mat-button:last-child,.mat-card-actions-align-end .mat-raised-button:last-child,.mat-card-actions-align-end .mat-stroked-button:last-child{margin-left:0;margin-right:0}.mat-card-title:not(:first-child),.mat-card-subtitle:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}"],encapsulation:2,changeDetection:0}),n})(),Az=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ht,ht]}),n})(),HS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),zz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Ta,ht,Gu,HS,ht,HS]}),n})();class ah{constructor(t=!1,e,i=!0){this._multiple=t,this._emitChanges=i,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new ue,e&&e.length&&(t?e.forEach(r=>this._markSelected(r)):this._markSelected(e[0]),this._selectedToEmit.length=0)}get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}select(...t){this._verifyValueAssignment(t),t.forEach(e=>this._markSelected(e)),this._emitChangeEvent()}deselect(...t){this._verifyValueAssignment(t),t.forEach(e=>this._unmarkSelected(e)),this._emitChangeEvent()}toggle(t){this.isSelected(t)?this.deselect(t):this.select(t)}clear(){this._unmarkAll(),this._emitChangeEvent()}isSelected(t){return this._selection.has(t)}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}}let Q_=(()=>{class n{constructor(){this._listeners=[]}notify(e,i){for(let r of this._listeners)r(e,i)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(i=>e!==i)}}ngOnDestroy(){this._listeners=[]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const $z=["connectionContainer"],Gz=["inputContainer"],Wz=["label"];function qz(n,t){1&n&&(eo(0),fe(1,"div",14),kt(2,"div",15)(3,"div",16)(4,"div",17),we(),fe(5,"div",18),kt(6,"div",15)(7,"div",16)(8,"div",17),we(),to())}function Yz(n,t){if(1&n){const e=ki();fe(0,"div",19),$e("cdkObserveContent",function(){return Bn(e),Vn(lt().updateOutlineGap())}),Tt(1,1),we()}2&n&&Ae("cdkObserveContentDisabled","outline"!=lt().appearance)}function Kz(n,t){if(1&n&&(eo(0),Tt(1,2),fe(2,"span"),Ue(3),we(),to()),2&n){const e=lt(2);Ee(3),Kn(e._control.placeholder)}}function Qz(n,t){1&n&&Tt(0,3,["*ngSwitchCase","true"])}function Zz(n,t){1&n&&(fe(0,"span",23),Ue(1," *"),we())}function Xz(n,t){if(1&n){const e=ki();fe(0,"label",20,21),$e("cdkObserveContent",function(){return Bn(e),Vn(lt().updateOutlineGap())}),it(2,Kz,4,1,"ng-container",12),it(3,Qz,1,0,"ng-content",12),it(4,Zz,2,0,"span",22),we()}if(2&n){const e=lt();At("mat-empty",e._control.empty&&!e._shouldAlwaysFloat())("mat-form-field-empty",e._control.empty&&!e._shouldAlwaysFloat())("mat-accent","accent"==e.color)("mat-warn","warn"==e.color),Ae("cdkObserveContentDisabled","outline"!=e.appearance)("id",e._labelId)("ngSwitch",e._hasLabel()),wt("for",e._control.id)("aria-owns",e._control.id),Ee(2),Ae("ngSwitchCase",!1),Ee(1),Ae("ngSwitchCase",!0),Ee(1),Ae("ngIf",!e.hideRequiredMarker&&e._control.required&&!e._control.disabled)}}function Jz(n,t){1&n&&(fe(0,"div",24),Tt(1,4),we())}function e8(n,t){if(1&n&&(fe(0,"div",25),kt(1,"span",26),we()),2&n){const e=lt();Ee(1),At("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)}}function t8(n,t){1&n&&(fe(0,"div"),Tt(1,5),we()),2&n&&Ae("@transitionMessages",lt()._subscriptAnimationState)}function n8(n,t){if(1&n&&(fe(0,"div",30),Ue(1),we()),2&n){const e=lt(2);Ae("id",e._hintLabelId),Ee(1),Kn(e.hintLabel)}}function i8(n,t){if(1&n&&(fe(0,"div",27),it(1,n8,2,2,"div",28),Tt(2,6),kt(3,"div",29),Tt(4,7),we()),2&n){const e=lt();Ae("@transitionMessages",e._subscriptAnimationState),Ee(1),Ae("ngIf",e.hintLabel)}}const r8=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],s8=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],o8=new De("MatError"),a8={transitionMessages:jn("transitionMessages",[zt("enter",Qe({opacity:1,transform:"translateY(0%)"})),Wt("void => enter",[Qe({opacity:0,transform:"translateY(-5px)"}),Zt("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let lh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n}),n})();const l8=new De("MatHint");let ch=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-label"]]}),n})(),c8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-placeholder"]]}),n})();const d8=new De("MatPrefix"),u8=new De("MatSuffix");let zS=0;const f8=vo(class{constructor(n){this._elementRef=n}},"primary"),p8=new De("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Z_=new De("MatFormField");let GS=(()=>{class n extends f8{constructor(e,i,r,s,o,a,l){super(e),this._changeDetectorRef=i,this._dir=r,this._defaults=s,this._platform=o,this._ngZone=a,this._outlineGapCalculationNeededImmediately=!1,this._outlineGapCalculationNeededOnStable=!1,this._destroyed=new ue,this._hideRequiredMarker=!1,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId="mat-hint-"+zS++,this._labelId="mat-form-field-label-"+zS++,this.floatLabel=this._getDefaultFloatLabelState(),this._animationsEnabled="NoopAnimations"!==l,this.appearance=(null==s?void 0:s.appearance)||"legacy",s&&(this._hideRequiredMarker=Boolean(s.hideRequiredMarker),s.color&&(this.color=this.defaultColor=s.color))}get appearance(){return this._appearance}set appearance(e){var i;const r=this._appearance;this._appearance=e||(null===(i=this._defaults)||void 0===i?void 0:i.appearance)||"legacy","outline"===this._appearance&&r!==e&&(this._outlineGapCalculationNeededOnStable=!0)}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=rt(e)}_shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}_canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}get _control(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic}set _control(e){this._explicitFormFieldControl=e}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild();const e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add(`mat-form-field-type-${e.controlType}`),e.stateChanges.pipe(Qn(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(Ot(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Ot(this._destroyed)).subscribe(()=>{this._outlineGapCalculationNeededOnStable&&this.updateOutlineGap()})}),$n(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._outlineGapCalculationNeededOnStable=!0,this._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Qn(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Qn(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Ot(this._destroyed)).subscribe(()=>{"function"==typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this.updateOutlineGap())}):this.updateOutlineGap()})}ngAfterContentChecked(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_shouldForward(e){const i=this._control?this._control.ngControl:null;return i&&i[e]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}_shouldLabelFloat(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,_o(this._label.nativeElement,"transitionend").pipe(sn(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_getDefaultFloatLabelState(){return this._defaults&&this._defaults.floatLabel||"auto"}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&e.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const i=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;i?e.push(i.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(e)}}_validateControlChild(){}updateOutlineGap(){const e=this._label?this._label.nativeElement:null,i=this._connectionContainerRef.nativeElement,r=".mat-form-field-outline-start",s=".mat-form-field-outline-gap";if("outline"!==this.appearance||!this._platform.isBrowser)return;if(!e||!e.children.length||!e.textContent.trim()){const d=i.querySelectorAll(`${r}, ${s}`);for(let f=0;f0?.75*j+10:0}for(let d=0;d{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[pi,ht,Gu,ht]}),n})();const m8=["*"],WS=new De("MatChipRemove"),qS=new De("MatChipAvatar"),YS=new De("MatChipTrailingIcon");class g8{constructor(t){this._elementRef=t}}const _8=yo(vo(Rs(g8),"primary"),-1);let Ia=(()=>{class n extends _8{constructor(e,i,r,s,o,a,l,c){super(e),this._ngZone=i,this._changeDetectorRef=o,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this.role="option",this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new ue,this._onBlur=new ue,this.selectionChange=new je,this.destroyed=new je,this.removed=new je,this._addHostClassName(),this._chipRippleTarget=a.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new W_(this,i,this._chipRippleTarget,r),this._chipRipple.setupTriggerEvents(e),this.rippleConfig=s||{},this._animationsDisabled="NoopAnimations"===l,this.tabIndex=null!=c&&parseInt(c)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(e){const i=rt(e);i!==this._selected&&(this._selected=i,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(e){this._value=e}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=rt(e)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(e){this._disabled=rt(e)}get removable(){return this._removable}set removable(e){this._removable=rt(e)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const e="mat-basic-chip",i=this._elementRef.nativeElement;i.hasAttribute(e)||i.tagName.toLowerCase()===e?i.classList.add(e):i.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(e=!1){return this._selected=!this.selected,this._dispatchSelectionChange(e),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(e){this.disabled&&e.preventDefault()}_handleKeydown(e){if(!this.disabled)switch(e.keyCode){case 46:case 8:this.remove(),e.preventDefault();break;case 32:this.selectable&&this.toggleSelected(!0),e.preventDefault()}}_blur(){this._ngZone.onStable.pipe(sn(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(e=!1){this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(et),x(bn),x(sh,8),x(en),x(ct),x(fn,8),ii("tabindex"))},n.\u0275dir=Me({type:n,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,i,r){if(1&e&&(It(r,qS,5),It(r,YS,5),It(r,WS,5)),2&e){let s;Ge(s=We())&&(i.avatar=s.first),Ge(s=We())&&(i.trailingIcon=s.first),Ge(s=We())&&(i.removeIcon=s.first)}},hostAttrs:[1,"mat-chip","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&$e("click",function(s){return i._handleClick(s)})("keydown",function(s){return i._handleKeydown(s)})("focus",function(){return i.focus()})("blur",function(){return i._blur()}),2&e&&(wt("tabindex",i.disabled?null:i.tabIndex)("role",i.role)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString())("aria-selected",i.ariaSelected),At("mat-chip-selected",i.selected)("mat-chip-with-avatar",i.avatar)("mat-chip-with-trailing-icon",i.trailingIcon||i.removeIcon)("mat-chip-disabled",i.disabled)("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",role:"role",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[Le]}),n})();const KS=new De("mat-chips-default-options"),D8=SS(class{constructor(n,t,e,i){this._defaultErrorStateMatcher=n,this._parentForm=t,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new ue}});let E8=0;class M8{constructor(t,e){this.source=t,this.value=e}}let uh=(()=>{class n extends D8{constructor(e,i,r,s,o,a,l){super(a,s,o,l),this._elementRef=e,this._changeDetectorRef=i,this._dir=r,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new ue,this._uid="mat-chip-list-"+E8++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(c,d)=>c===d,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new je,this.valueChange=new je,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){var e,i;return this.multiple?(null===(e=this._selectionModel)||void 0===e?void 0:e.selected)||[]:null===(i=this._selectionModel)||void 0===i?void 0:i.selected[0]}get role(){return this._explicitRole?this._explicitRole:this.empty?null:"listbox"}set role(e){this._explicitRole=e}get multiple(){return this._multiple}set multiple(e){this._multiple=rt(e),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){var e,i,r,s;return null!==(s=null!==(e=this._required)&&void 0!==e?e:null===(r=null===(i=this.ngControl)||void 0===i?void 0:i.control)||void 0===r?void 0:r.hasValidator(Vg.required))&&void 0!==s&&s}set required(e){this._required=rt(e),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=rt(e),this._syncChipsState()}get selectable(){return this._selectable}set selectable(e){this._selectable=rt(e),this.chips&&this.chips.forEach(i=>i.chipListSelectable=this._selectable)}set tabIndex(e){this._userTabIndex=e,this._tabIndex=e}get chipSelectionChanges(){return $n(...this.chips.map(e=>e.selectionChange))}get chipFocusChanges(){return $n(...this.chips.map(e=>e._onFocus))}get chipBlurChanges(){return $n(...this.chips.map(e=>e._onBlur))}get chipRemoveChanges(){return $n(...this.chips.map(e=>e.destroyed))}ngAfterContentInit(){this._keyManager=new Wu(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Ot(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.tabOut.pipe(Ot(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe(Qn(null),Ot(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new ah(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(e){this._chipInput=e,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",e.id)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}writeValue(e){this.chips&&this._setSelectionByValue(e,!1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}onContainerClick(e){this._originatesFromChip(e)||this.focus()}focus(e){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(e),this.stateChanges.next()))}_focusInput(e){this._chipInput&&this._chipInput.focus(e)}_keydown(e){const i=e.target;i&&i.classList.contains("mat-chip")&&(this._keyManager.onKeydown(e),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const e=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(e)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(e){return e>=0&&er.deselect()),Array.isArray(e))e.forEach(r=>this._selectValue(r,i)),this._sortValues();else{const r=this._selectValue(e,i);r&&i&&this._keyManager.setActiveItem(r)}}_selectValue(e,i=!0){const r=this.chips.find(s=>null!=s.value&&this._compareWith(s.value,e));return r&&(i?r.selectViaInteraction():r.select(),this._selectionModel.select(r)),r}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(e){this._selectionModel.clear(),this.chips.forEach(i=>{i!==e&&i.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(e=>{e.selected&&this._selectionModel.select(e)}),this.stateChanges.next())}_propagateChanges(e){let i=null;i=Array.isArray(this.selected)?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.change.emit(new M8(this,i)),this.valueChange.emit(i),this._onChange(i),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(e=>{e.source.selected?this._selectionModel.select(e.source):this._selectionModel.deselect(e.source),this.multiple||this.chips.forEach(i=>{!this._selectionModel.isSelected(i)&&i.selected&&i.deselect()}),e.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(e=>{let i=this.chips.toArray().indexOf(e.chip);this._isValidIndex(i)&&this._keyManager.updateActiveItem(i),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(e=>{const i=e.chip,r=this.chips.toArray().indexOf(e.chip);this._isValidIndex(r)&&i._hasFocus&&(this._lastDestroyedChipIndex=r)})}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-chip"))return!0;i=i.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(e=>e._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(e=>{e._chipListDisabled=this._disabled,e._chipListMultiple=this.multiple})}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(en),x(qi,8),x(Xl,8),x(Jl,8),x(ih),x(Tr,10))},n.\u0275cmp=vt({type:n,selectors:[["mat-chip-list"]],contentQueries:function(e,i,r){if(1&e&&It(r,Ia,5),2&e){let s;Ge(s=We())&&(i.chips=s)}},hostAttrs:[1,"mat-chip-list"],hostVars:14,hostBindings:function(e,i){1&e&&$e("focus",function(){return i.focus()})("blur",function(){return i._blur()})("keydown",function(s){return i._keydown(s)}),2&e&&(Zr("id",i._uid),wt("tabindex",i.disabled?null:i._tabIndex)("aria-required",i.role?i.required:null)("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-multiselectable",i.multiple)("role",i.role)("aria-orientation",i.ariaOrientation),At("mat-chip-list-disabled",i.disabled)("mat-chip-list-invalid",i.errorState)("mat-chip-list-required",i.required))},inputs:{role:"role",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],errorStateMatcher:"errorStateMatcher",multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",ariaOrientation:["aria-orientation","ariaOrientation"],selectable:"selectable",tabIndex:"tabIndex"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[Xe([{provide:lh,useExisting:n}]),Le],ngContentSelectors:m8,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(e,i){1&e&&(Fn(),fe(0,"div",0),Tt(1),we())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}'],encapsulation:2,changeDetection:0}),n})(),x8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[ih,{provide:KS,useValue:{separatorKeyCodes:[13]}}],imports:[ht]}),n})();class X_{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class pc extends X_{constructor(t,e,i,r){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r}}class mc extends X_{constructor(t,e,i,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class S8 extends X_{constructor(t){super(),this.element=t instanceof Je?t.nativeElement:t}}class hh{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof pc?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof mc?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof S8?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class k8 extends hh{constructor(t,e,i,r,s){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=o=>{const a=o.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=s}attachComponentPortal(t){const i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let r;return t.viewContainerRef?(r=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(t.injector||this._defaultInjector||Jt.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=t,r}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=t,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let Ra=(()=>{class n extends hh{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new je,this.attachDomPortal=s=>{const o=s.element,a=this._document.createComment("dom-portal");s.setAttachedHost(this),o.parentNode.insertBefore(a,o),this._getRootNode().appendChild(o),this._attachedPortal=s,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(o,a)})},this._document=r}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedPortal=null,this._attachedRef=null}attachComponentPortal(e){e.setAttachedHost(this);const i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,s=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),o=i.createComponent(s,i.length,e.injector||i.injector);return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=e,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(e){e.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}}return n.\u0275fac=function(e){return new(e||n)(x(io),x(An),x(ct))},n.\u0275dir=Me({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Le]}),n})(),Os=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();const QS=I3();class A8{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=xn(-this._previousScrollPosition.left),t.style.top=xn(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,i=t.style,r=this._document.body.style,s=i.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),QS&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),QS&&(i.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const e=this._document.body,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}}class I8{constructor(t,e,i,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class ZS{enable(){}disable(){}attach(){}}function J_(n,t){return t.some(e=>n.bottome.bottom||n.righte.right)}function XS(n,t){return t.some(e=>n.tope.bottom||n.lefte.right)}class R8{constructor(t,e,i,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();J_(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let P8=(()=>{class n{constructor(e,i,r,s){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new ZS,this.close=o=>new I8(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new A8(this._viewportRuler,this._document),this.reposition=o=>new R8(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return n.\u0275fac=function(e){return new(e||n)(te(VU),te(ss),te(et),te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class fh{constructor(t){if(this.scrollStrategy=new ZS,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class O8{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}class gc{constructor(t,e,i,r,s,o,a,l,c,d=!1){this._portalOutlet=t,this._host=e,this._pane=i,this._config=r,this._ngZone=s,this._keyboardDispatcher=o,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._backdropElement=null,this._backdropClick=new ue,this._attachments=new ue,this._detachments=new ue,this._locationChanges=X.EMPTY,this._backdropClickHandler=f=>this._backdropClick.next(f),this._backdropTransitionendHandler=f=>{this._disposeBackdrop(f.target)},this._keydownEvents=new ue,this._outsidePointerEvents=new ue,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(sn(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){var t;const e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),null===(t=this._host)||void 0===t||t.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=xn(this._config.width),t.height=xn(this._config.height),t.minWidth=xn(this._config.minWidth),t.minHeight=xn(this._config.minHeight),t.maxWidth=xn(this._config.maxWidth),t.maxHeight=xn(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){const t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),this._animationsDisabled||"undefined"==typeof requestAnimationFrame?this._backdropElement.classList.add(t):this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})})}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const t=this._backdropElement;if(t){if(this._animationsDisabled)return void this._disposeBackdrop(t);t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",this._backdropTransitionendHandler)}),t.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(t)},500))}}_toggleClasses(t,e,i){const r=Uu(e||[]).filter(s=>!!s);r.length&&(i?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(Ot($n(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}_disposeBackdrop(t){t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",this._backdropTransitionendHandler),t.remove(),this._backdropElement===t&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}let ph=(()=>{class n{constructor(e,i){this._platform=i,this._document=e}ngOnDestroy(){var e;null===(e=this._containerElement)||void 0===e||e.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e="cdk-overlay-container";if(this._platform.isBrowser||__()){const r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let s=0;s{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,s=[];let o;for(let a of this._preferredPositions){let l=this._getOriginPoint(t,r,a),c=this._getOverlayPoint(l,e,a),d=this._getOverlayFit(c,e,i,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,i)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,a=c)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&bo(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(JS),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,i){let r,s;if("center"==i.originX)r=t.left+t.width/2;else{const o=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r="start"==i.originX?o:a}return e.left<0&&(r-=e.left),s="center"==i.originY?t.top+t.height/2:"top"==i.originY?t.top:t.bottom,e.top<0&&(s-=e.top),{x:r,y:s}}_getOverlayPoint(t,e,i){let r,s;return r="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,s="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+r,y:t.y+s}}_getOverlayFit(t,e,i,r){const s=tk(e);let{x:o,y:a}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(o+=l),c&&(a+=c);let w=0-a,k=a+s.height-i.height,j=this._subtractOverflows(s.width,0-o,o+s.width-i.width),K=this._subtractOverflows(s.height,w,k),ae=j*K;return{visibleArea:ae,isCompletelyWithinViewport:s.width*s.height===ae,fitsInViewportVertically:K===s.height,fitsInViewportHorizontally:j==s.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const r=i.bottom-e.y,s=i.right-e.x,o=ek(this._overlayRef.getConfig().minHeight),a=ek(this._overlayRef.getConfig().minWidth),c=t.fitsInViewportHorizontally||null!=a&&a<=s;return(t.fitsInViewportVertically||null!=o&&o<=r)&&c}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const r=tk(e),s=this._viewportRect,o=Math.max(t.x+r.width-s.width,0),a=Math.max(t.y+r.height-s.height,0),l=Math.max(s.top-i.top-t.y,0),c=Math.max(s.left-i.left-t.x,0);let d=0,f=0;return d=r.width<=s.width?c||-o:t.xj&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-j/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)w=i.width-t.x+this._viewportMargin,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)f=t.x,d=i.right-t.x;else{const k=Math.min(i.right-t.x+i.left,t.x),j=this._lastBoundingBoxSize.width;d=2*k,f=t.x-k,d>j&&!this._isInitialRender&&!this._growAfterOpen&&(f=t.x-j/2)}return{top:o,left:f,bottom:a,right:w,width:d,height:s}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=xn(i.height),r.top=xn(i.top),r.bottom=xn(i.bottom),r.width=xn(i.width),r.left=xn(i.left),r.right=xn(i.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",s&&(r.maxHeight=xn(s)),o&&(r.maxWidth=xn(o))}this._lastBoundingBoxSize=i,bo(this._boundingBox.style,r)}_resetBoundingBoxStyles(){bo(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){bo(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){const d=this._viewportRuler.getViewportScrollPosition();bo(i,this._getExactOverlayY(e,t,d)),bo(i,this._getExactOverlayX(e,t,d))}else i.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),o.maxHeight&&(r?i.maxHeight=xn(o.maxHeight):s&&(i.maxHeight="")),o.maxWidth&&(r?i.maxWidth=xn(o.maxWidth):s&&(i.maxWidth="")),bo(this._pane.style,i)}_getExactOverlayY(t,e,i){let r={top:"",bottom:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=xn(s.y),r}_getExactOverlayX(t,e,i){let o,r={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),o=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===o?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=xn(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:XS(t,i),isOriginOutsideView:J_(t,i),isOverlayClipped:XS(e,i),isOverlayOutsideView:J_(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,r)=>i-Math.max(r,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&Uu(t).forEach(e=>{""!==e&&-1===this._appliedPanelClasses.indexOf(e)&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof Je)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function bo(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function ek(n){if("number"!=typeof n&&null!=n){const[t,e]=n.split(F8);return e&&"px"!==e?null:parseFloat(t)}return n||null}function tk(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}const nk="cdk-global-overlay-wrapper";class N8{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(nk),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:a}=i,l=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),c=!("100%"!==s&&"100vh"!==s||a&&"100%"!==a&&"100vh"!==a),d=this._xPosition,f=this._xOffset,w="rtl"===this._overlayRef.getConfig().direction;let k="",j="",K="";l?K="flex-start":"center"===d?(K="center",w?j=f:k=f):w?"left"===d||"end"===d?(K="flex-end",k=f):("right"===d||"start"===d)&&(K="flex-start",j=f):"left"===d||"start"===d?(K="flex-start",k=f):("right"===d||"end"===d)&&(K="flex-end",j=f),t.position=this._cssPosition,t.marginLeft=l?"0":k,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":j,e.justifyContent=K,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(nk),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let B8=(()=>{class n{constructor(e,i,r,s){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=s}global(){return new N8}flexibleConnectedTo(e){return new L8(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(e){return new(e||n)(te(ss),te(ct),te(bn),te(ph))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ik=(()=>{class n{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){const i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(e){return new(e||n)(te(ct))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),V8=(()=>{class n extends ik{constructor(e,i){super(e),this._ngZone=i,this._keydownListener=r=>{const s=this._attachedOverlays;for(let o=s.length-1;o>-1;o--)if(s[o]._keydownEvents.observers.length>0){const a=s[o]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(e){return new(e||n)(te(ct),te(et,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),H8=(()=>{class n extends ik{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=ur(s)},this._clickListener=s=>{const o=ur(s),a="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;const l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){const d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const f=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>f.next(s)):f.next(s)}}}add(e){if(super.add(e),!this._isAttached){const i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}}return n.\u0275fac=function(e){return new(e||n)(te(ct),te(bn),te(et,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),j8=0,Yi=(()=>{class n{constructor(e,i,r,s,o,a,l,c,d,f,w,k){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=o,this._injector=a,this._ngZone=l,this._document=c,this._directionality=d,this._location=f,this._outsideClickDispatcher=w,this._animationsModuleType=k}create(e){const i=this._createHostElement(),r=this._createPaneElement(i),s=this._createPortalOutlet(r),o=new fh(e);return o.direction=o.direction||this._directionality.value,new gc(s,i,r,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(e){const i=this._document.createElement("div");return i.id="cdk-overlay-"+j8++,i.classList.add("cdk-overlay-pane"),e.appendChild(i),i}_createHostElement(){const e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(Ll)),new k8(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(e){return new(e||n)(te(P8),te(ph),te(io),te(B8),te(V8),te(Jt),te(et),te(ct),te(qi),te(Vl),te(H8),te(fn,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();const U8=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],rk=new De("cdk-connected-overlay-scroll-strategy");let sk=(()=>{class n{constructor(e){this.elementRef=e}}return n.\u0275fac=function(e){return new(e||n)(x(Je))},n.\u0275dir=Me({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),n})(),ok=(()=>{class n{constructor(e,i,r,s,o){this._overlay=e,this._dir=o,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=X.EMPTY,this._attachSubscription=X.EMPTY,this._detachSubscription=X.EMPTY,this._positionSubscription=X.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new je,this.positionChange=new je,this.attach=new je,this.detach=new je,this.overlayKeydown=new je,this.overlayOutsideClick=new je,this._templatePortal=new mc(i,r),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=rt(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=rt(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=rt(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=rt(e)}get push(){return this._push}set push(e){this._push=rt(e)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=U8);const e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!gi(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){const e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new fh({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){const i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const e=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(e),e}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof sk?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function T8(n,t=!1){return Pe((e,i)=>{let r=0;e.subscribe(_e(i,s=>{const o=n(s,r++);(o||t)&&i.next(s),!o&&i.complete()}))})}(()=>this.positionChange.observers.length>0)).subscribe(e=>{this.positionChange.emit(e),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(x(Yi),x(_n),x(An),x(rk),x(qi,8))},n.\u0275dir=Me({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[cn]}),n})();const $8={provide:rk,deps:[Yi],useFactory:function z8(n){return()=>n.scrollStrategies.reposition()}};let Pa=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[Yi,$8],imports:[ac,Os,N_,N_]}),n})(),ak=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),W8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[ih],imports:[ak,dh,ht,ak,dh]}),n})(),n$=(()=>{class n{constructor(){this.changes=new ue,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}formatYearRange(e,i){return`${e} \u2013 ${i}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const s$={provide:new De("mat-datepicker-scroll-strategy"),deps:[Yi],useFactory:function r$(n){return()=>n.scrollStrategies.reposition()}};let d$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[n$,s$],imports:[pi,oh,Pa,Ku,Os,ht,Sa]}),n})();function _c(n){return new J(t=>{di(n()).subscribe(t)})}function u$(n,t){}class vh{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0}}let uk=(()=>{class n extends hh{constructor(e,i,r,s,o,a,l,c){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=s,this._interactivityChecker=o,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=d=>{this._portalOutlet.hasAttached();const f=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),f},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(){const e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const e=this._config.restoreFocus;let i=null;if("string"==typeof e?i=this._document.querySelector(e):"boolean"==typeof e?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&"function"==typeof i.focus){const r=g_(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const e=this._elementRef.nativeElement,i=g_();return e===i||e.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=g_())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(A_),x(ct,8),x(vh),x(qu),x(et),x(gc),x(hr))},n.\u0275cmp=vt({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(1&e&&Gt(Ra,7),2&e){let r;Ge(r=We())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){2&e&&wt("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[Le],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&it(0,u$,0,0,"ng-template",0)},dependencies:[Ra],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})();class ev{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new ue,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!gi(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})})}close(t,e){if(this.containerInstance){const i=this.closed;this.containerInstance._closeInteractionType=(null==e?void 0:e.focusOrigin)||"program",this.overlayRef.dispose(),i.next(t),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}}const hk=new De("DialogScrollStrategy"),h$=new De("DialogData"),f$=new De("DefaultDialogConfig"),m$={provide:hk,deps:[Yi],useFactory:function p$(n){return()=>n.scrollStrategies.block()}};let g$=0,fk=(()=>{class n{constructor(e,i,r,s,o,a){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=o,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ue,this._afterOpenedAtThisLevel=new ue,this._ariaHiddenElements=new Map,this.afterAllClosed=_c(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Qn(void 0))),this._scrollStrategy=a}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}open(e,i){const r=this._defaultOptions||new vh;(i=Object.assign(Object.assign({},r),i)).id=i.id||"cdk-dialog-"+g$++,i.id&&this.getDialogById(i.id);const s=this._getOverlayConfig(i),o=this._overlay.create(s),a=new ev(o,i),l=this._attachContainer(o,a,i);return a.containerInstance=l,this._attachDialogContent(e,a,l,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){tv(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){tv(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),tv(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const i=new fh({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){var s,o;const a=null!==(s=r.injector)&&void 0!==s?s:null===(o=r.viewContainerRef)||void 0===o?void 0:o.injector,l=[{provide:vh,useValue:r},{provide:ev,useValue:i},{provide:gc,useValue:e}];let c;r.container?"function"==typeof r.container?c=r.container:(c=r.container.type,l.push(...r.container.providers(r))):c=uk;const d=new pc(c,r.viewContainerRef,Jt.create({parent:a||this._injector,providers:l}),r.componentFactoryResolver);return e.attach(d).instance}_attachDialogContent(e,i,r,s){const o=this._createInjector(s,i,r);if(e instanceof _n){let a={$implicit:s.data,dialogRef:i};s.templateContext&&(a=Object.assign(Object.assign({},a),"function"==typeof s.templateContext?s.templateContext():s.templateContext)),r.attachTemplatePortal(new mc(e,null,a,o))}else{const a=r.attachComponentPortal(new pc(e,s.viewContainerRef,o,s.componentFactoryResolver));i.componentInstance=a.instance}}_createInjector(e,i,r){const s=e&&e.viewContainerRef&&e.viewContainerRef.injector,o=[{provide:h$,useValue:e.data},{provide:ev,useValue:i}];return e.providers&&("function"==typeof e.providers?o.push(...e.providers(i,e,r)):o.push(...e.providers)),e.direction&&(!s||!s.get(qi,null,at.Optional))&&o.push({provide:qi,useValue:{value:e.direction,change:tt()}}),Jt.create({parent:s||this._injector,providers:o})}_removeOpenDialog(e,i){const r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const e=this._overlayContainer.getContainerElement();if(e.parentElement){const i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){const s=i[r];s!==e&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return n.\u0275fac=function(e){return new(e||n)(te(Yi),te(Jt),te(f$,8),te(n,12),te(ph),te(hk))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();function tv(n,t){let e=n.length;for(;e--;)t(n[e])}let _$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[fk,m$],imports:[Pa,Os,Ku,Os]}),n})();function v$(n,t){}const Fa={params:{enterAnimationDuration:"150ms",exitAnimationDuration:"75ms"}},y$={dialogContainer:jn("dialogContainer",[zt("void, exit",Qe({opacity:0,transform:"scale(0.7)"})),zt("enter",Qe({transform:"none"})),Wt("* => enter",VE([Zt("{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)",Qe({transform:"none",opacity:1})),uu("@*",du(),{optional:!0})]),Fa),Wt("* => void, * => exit",VE([Zt("{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)",Qe({opacity:0})),uu("@*",du(),{optional:!0})]),Fa)])};class yh{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0,this.enterAnimationDuration=Fa.params.enterAnimationDuration,this.exitAnimationDuration=Fa.params.exitAnimationDuration}}let b$=(()=>{class n extends uk{constructor(e,i,r,s,o,a,l,c){super(e,i,r,s,o,a,l,c),this._animationStateChanged=new je}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(A_),x(ct,8),x(yh),x(qu),x(et),x(gc),x(hr))},n.\u0275cmp=vt({type:n,selectors:[["ng-component"]],features:[Le],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),w$=(()=>{class n extends b${constructor(e,i,r,s,o,a,l,c,d){super(e,i,r,s,o,a,l,d),this._changeDetectorRef=c,this._state="enter"}_onAnimationDone({toState:e,totalTime:i}){"enter"===e?this._openAnimationDone(i):"exit"===e&&this._animationStateChanged.next({state:"closed",totalTime:i})}_onAnimationStart({toState:e,totalTime:i}){"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:i}):("exit"===e||"void"===e)&&this._animationStateChanged.next({state:"closing",totalTime:i})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}_getAnimationState(){return{value:this._state,params:{enterAnimationDuration:this._config.enterAnimationDuration||Fa.params.enterAnimationDuration,exitAnimationDuration:this._config.exitAnimationDuration||Fa.params.exitAnimationDuration}}}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(A_),x(ct,8),x(yh),x(qu),x(et),x(gc),x(en),x(hr))},n.\u0275cmp=vt({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-dialog-container"],hostVars:7,hostBindings:function(e,i){1&e&&kd("@dialogContainer.start",function(s){return i._onAnimationStart(s)})("@dialogContainer.done",function(s){return i._onAnimationDone(s)}),2&e&&(Zr("id",i._config.id),wt("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),Id("@dialogContainer",i._getAnimationState()))},features:[Le],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&it(0,v$,0,0,"ng-template",0)},dependencies:[Ra],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,data:{animation:[y$.dialogContainer]}}),n})();class C${constructor(t,e,i){this._ref=t,this._containerInstance=i,this._afterOpened=new ue,this._beforeClosed=new ue,this._state=0,this.disableClose=e.disableClose,this.id=t.id,i._animationStateChanged.pipe(yn(r=>"opened"===r.state),sn(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(yn(r=>"closed"===r.state),sn(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),$n(this.backdropClick(),this.keydownEvents().pipe(yn(r=>27===r.keyCode&&!this.disableClose&&!gi(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),function D$(n,t,e){n._closeInteractionType=t,n.close(e)}(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(yn(e=>"closing"===e.state),sn(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}const E$=new De("MatDialogData"),M$=new De("mat-dialog-default-options"),pk=new De("mat-dialog-scroll-strategy"),S$={provide:pk,deps:[Yi],useFactory:function x$(n){return()=>n.scrollStrategies.block()}};let k$=0,T$=(()=>{class n{constructor(e,i,r,s,o,a,l,c,d,f){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ue,this._afterOpenedAtThisLevel=new ue,this._idPrefix="mat-dialog-",this.afterAllClosed=_c(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Qn(void 0))),this._scrollStrategy=a,this._dialog=i.get(fk)}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}open(e,i){let r;(i=Object.assign(Object.assign({},this._defaultOptions||new yh),i)).id=i.id||`${this._idPrefix}${k$++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(e,Object.assign(Object.assign({},i),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:yh,useValue:i},{provide:vh,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(o,a,l)=>(r=new this._dialogRefConstructor(o,i,l),r.updatePosition(null==i?void 0:i.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])}));return r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const o=this.openDialogs.indexOf(r);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}}return n.\u0275fac=function(e){bs()},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),A$=(()=>{class n extends T${constructor(e,i,r,s,o,a,l,c){super(e,i,s,a,l,o,C$,w$,E$,c)}}return n.\u0275fac=function(e){return new(e||n)(te(Yi),te(Jt),te(Vl,8),te(M$,8),te(pk),te(n,12),te(ph),te(fn,8))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),I$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[A$,S$],imports:[_$,Pa,Os,ht,ht]}),n})();const R$=[[["","mat-grid-avatar",""],["","matGridAvatar",""]],[["","mat-line",""],["","matLine",""]],"*"],P$=["[mat-grid-avatar], [matGridAvatar]","[mat-line], [matLine]","*"];let F$=(()=>{class n{constructor(e){this._element=e}ngAfterContentInit(){!function TS(n,t,e="mat"){n.changes.pipe(Qn(n)).subscribe(({length:i})=>{hc(t,`${e}-2-line`,!1),hc(t,`${e}-3-line`,!1),hc(t,`${e}-multi-line`,!1),2===i||3===i?hc(t,`${e}-${i}-line`,!0):i>3&&hc(t,`${e}-multi-line`,!0)})}(this._lines,this._element)}}return n.\u0275fac=function(e){return new(e||n)(x(Je))},n.\u0275cmp=vt({type:n,selectors:[["mat-grid-tile-header"],["mat-grid-tile-footer"]],contentQueries:function(e,i,r){if(1&e&&It(r,kS,5),2&e){let s;Ge(s=We())&&(i._lines=s)}},ngContentSelectors:P$,decls:4,vars:0,consts:[[1,"mat-grid-list-text"]],template:function(e,i){1&e&&(Fn(R$),Tt(0),fe(1,"div",0),Tt(2,1),we(),Tt(3,2))},encapsulation:2,changeDetection:0}),n})(),L$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-grid-tile-header"]],hostAttrs:[1,"mat-grid-tile-header"]}),n})(),B$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[rh,ht,rh,ht]}),n})();function La(n,t){const e=ut(n)?n:()=>n,i=r=>r.error(e());return new J(t?r=>t.schedule(i,0,r):i)}function os(n){return Pe((t,e)=>{let s,i=null,r=!1;i=t.subscribe(_e(e,void 0,void 0,o=>{s=di(n(o,os(n)(t))),i?(i.unsubscribe(),i=null,s.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,s.subscribe(e))})}function bh(n){return Pe((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}const V$=["*"];let wh;function vc(n){var t;return(null===(t=function H$(){if(void 0===wh&&(wh=null,"undefined"!=typeof window)){const n=window;void 0!==n.trustedTypes&&(wh=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return wh}())||void 0===t?void 0:t.createHTML(n))||n}function gk(n){return Error(`Unable to find icon with the name "${n}"`)}function _k(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function vk(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}class Co{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}}let Ch=(()=>{class n{constructor(e,i,r,s){this._httpClient=e,this._sanitizer=i,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons"],this._document=r}addSvgIcon(e,i,r){return this.addSvgIconInNamespace("",e,i,r)}addSvgIconLiteral(e,i,r){return this.addSvgIconLiteralInNamespace("",e,i,r)}addSvgIconInNamespace(e,i,r,s){return this._addSvgIconConfig(e,i,new Co(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,s){const o=this._sanitizer.sanitize(Ut.HTML,r);if(!o)throw vk(r);const a=vc(o);return this._addSvgIconConfig(e,i,new Co("",a,s))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,r){return this._addSvgIconSetConfig(e,new Co(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){const s=this._sanitizer.sanitize(Ut.HTML,i);if(!s)throw vk(i);const o=vc(s);return this._addSvgIconSetConfig(e,new Co("",o,r))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){const i=this._sanitizer.sanitize(Ut.RESOURCE_URL,e);if(!i)throw _k(e);const r=this._cachedIconsByUrl.get(i);return r?tt(Dh(r)):this._loadSvgIconFromConfig(new Co(e,null)).pipe(wn(s=>this._cachedIconsByUrl.set(i,s)),U(s=>Dh(s)))}getNamedSvgIcon(e,i=""){const r=yk(i,e);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(i,e),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const o=this._iconSetConfigs.get(i);return o?this._getSvgFromIconSetConfigs(e,o):La(gk(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?tt(Dh(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(U(i=>Dh(i)))}_getSvgFromIconSetConfigs(e,i){const r=this._extractIconWithNameFromAnySet(e,i);return r?tt(r):kM(i.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(os(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Ut.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),tt(null)})))).pipe(U(()=>{const o=this._extractIconWithNameFromAnySet(e,i);if(!o)throw gk(e);return o}))}_extractIconWithNameFromAnySet(e,i){for(let r=i.length-1;r>=0;r--){const s=i[r];if(s.svgText&&s.svgText.toString().indexOf(e)>-1){const o=this._svgElementFromConfig(s),a=this._extractSvgIconFromSet(o,e,s.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(wn(i=>e.svgText=i),U(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?tt(null):this._fetchIcon(e).pipe(wn(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){const s=e.querySelector(`[id="${i}"]`);if(!s)return null;const o=s.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,r);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),r);const a=this._svgElementFromString(vc(""));return a.appendChild(o),this._setSvgAttributes(a,r)}_svgElementFromString(e){const i=this._document.createElement("DIV");i.innerHTML=e;const r=i.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(e){const i=this._svgElementFromString(vc("")),r=e.attributes;for(let s=0;svc(d)),bh(()=>this._inProgressUrlFetches.delete(a)),dy());return this._inProgressUrlFetches.set(a,c),c}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(yk(e,i),r),this}_addSvgIconSetConfig(e,i){const r=this._iconSetConfigs.get(e);return r?r.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){const i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let r=0;rt?t.pathname+t.search:""}}}),bk=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Y$=bk.map(n=>`[${n}]`).join(", "),K$=/^url\(['"]?#(.*?)['"]?\)$/;let Eh=(()=>{class n extends $${constructor(e,i,r,s,o,a){super(e),this._iconRegistry=i,this._location=s,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=X.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),r||e.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(e){this._inline=rt(e)}get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}get fontSet(){return this._fontSet}set fontSet(e){const i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){const i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}_splitIconName(e){if(!e)return["",""];const i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const e=this._elementsWithExternalReferences;if(e&&e.size){const i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){const e=this._elementRef.nativeElement;let i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){const r=e.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const e=this._elementRef.nativeElement,i=(this.fontSet?[this._iconRegistry.classNameForFontAlias(this.fontSet)]:this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),i.forEach(r=>e.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return"string"==typeof e?e.trim().split(" ")[0]:e}_prependPathToReferences(e){const i=this._elementsWithExternalReferences;i&&i.forEach((r,s)=>{r.forEach(o=>{s.setAttribute(o.name,`url('${e}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(e){const i=e.querySelectorAll(Y$),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=i[s],l=a.getAttribute(o),c=l?l.match(K$):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.push({name:o,value:c[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){const[i,r]=this._splitIconName(e);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(sn(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${s.message}`))})}}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(Ch),ii("aria-hidden"),x(W$),x(qr),x(G$,8))},n.\u0275cmp=vt({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(e,i){2&e&&(wt("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet),At("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[Le],ngContentSelectors:V$,decls:1,vars:0,template:function(e,i){1&e&&(Fn(),Tt(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),n})(),Q$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ht,ht]}),n})(),Z$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ht,ht]}),n})(),h5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[rh,Ta,ht,q_,pi,rh,ht,q_,Z$]}),n})();function Rr(n,t){return Pe((e,i)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&i.complete();e.subscribe(_e(i,l=>{null==r||r.unsubscribe();let c=0;const d=s++;di(n(l,d)).subscribe(r=_e(i,f=>i.next(t?t(l,f,d,c++):f),()=>{r=null,a()}))},()=>{o=!0,a()}))})}const f5=["trigger"],p5=["panel"];function m5(n,t){if(1&n&&(fe(0,"span",8),Ue(1),we()),2&n){const e=lt();Ee(1),Kn(e.placeholder)}}function g5(n,t){if(1&n&&(fe(0,"span",12),Ue(1),we()),2&n){const e=lt(2);Ee(1),Kn(e.triggerValue)}}function _5(n,t){1&n&&Tt(0,0,["*ngSwitchCase","true"])}function v5(n,t){1&n&&(fe(0,"span",9),it(1,g5,2,1,"span",10),it(2,_5,1,0,"ng-content",11),we()),2&n&&(Ae("ngSwitch",!!lt().customTrigger),Ee(2),Ae("ngSwitchCase",!0))}function y5(n,t){if(1&n){const e=ki();fe(0,"div",13)(1,"div",14,15),$e("@transformPanel.done",function(r){return Bn(e),Vn(lt()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return Bn(e),Vn(lt()._handleKeydown(r))}),Tt(3,1),we()()}if(2&n){const e=lt();Ae("@transformPanelWrap",void 0),Ee(1),om("mat-select-panel ",e._getPanelTheme(),""),Hi("transform-origin",e._transformOrigin)("font-size",e._triggerFontSize,"px"),Ae("ngClass",e.panelClass)("@transformPanel",e.multiple?"showing-multiple":"showing"),wt("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}const b5=[[["mat-select-trigger"]],"*"],w5=["mat-select-trigger","*"],Ck={transformPanelWrap:jn("transformPanelWrap",[Wt("* => void",uu("@transformPanel",[du()],{optional:!0}))]),transformPanel:jn("transformPanel",[zt("void",Qe({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),zt("showing",Qe({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),zt("showing-multiple",Qe({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Wt("void => *",Zt("120ms cubic-bezier(0, 0, 0.2, 1)")),Wt("* => void",Zt("100ms 25ms linear",Qe({opacity:0})))])};let Dk=0;const Mk=new De("mat-select-scroll-strategy"),M5=new De("MAT_SELECT_CONFIG"),x5={provide:Mk,deps:[Yi],useFactory:function E5(n){return()=>n.scrollStrategies.reposition()}};class S5{constructor(t,e){this.source=t,this.value=e}}const k5=Rs(yo(uc(SS(class{constructor(n,t,e,i,r){this._elementRef=n,this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new ue}})))),T5=new De("MatSelectTrigger");let A5=(()=>{class n extends k5{constructor(e,i,r,s,o,a,l,c,d,f,w,k,j,K){var ae,ce,Te;super(o,s,l,c,f),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=a,this._parentFormField=d,this._liveAnnouncer=j,this._defaultOptions=K,this._panelOpen=!1,this._compareWith=(he,Oe)=>he===Oe,this._uid="mat-select-"+Dk++,this._triggerAriaLabelledBy=null,this._destroy=new ue,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+Dk++,this._panelDoneAnimatingStream=new ue,this._overlayPanelClass=(null===(ae=this._defaultOptions)||void 0===ae?void 0:ae.overlayPanelClass)||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=null!==(Te=null===(ce=this._defaultOptions)||void 0===ce?void 0:ce.disableOptionCentering)&&void 0!==Te&&Te,this.ariaLabel="",this.optionSelectionChanges=_c(()=>{const he=this.options;return he?he.changes.pipe(Qn(he),Rr(()=>$n(...he.map(Oe=>Oe.onSelectionChange)))):this._ngZone.onStable.pipe(sn(1),Rr(()=>this.optionSelectionChanges))}),this.openedChange=new je,this._openedStream=this.openedChange.pipe(yn(he=>he),U(()=>{})),this._closedStream=this.openedChange.pipe(yn(he=>!he),U(()=>{})),this.selectionChange=new je,this.valueChange=new je,this.ngControl&&(this.ngControl.valueAccessor=this),null!=(null==K?void 0:K.typeaheadDebounceInterval)&&(this._typeaheadDebounceInterval=K.typeaheadDebounceInterval),this._scrollStrategyFactory=k,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(w)||0,this.id=this.id}get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){var e,i,r,s;return null!==(s=null!==(e=this._required)&&void 0!==e?e:null===(r=null===(i=this.ngControl)||void 0===i?void 0:i.control)||void 0===r?void 0:r.hasValidator(Vg.required))&&void 0!==s&&s}set required(e){this._required=rt(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=rt(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=rt(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=Ii(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}ngOnInit(){this._selectionModel=new ah(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(k_(),Ot(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ot(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(Qn(null),Ot(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){var e,i;return this.multiple?(null===(e=this._selectionModel)||void 0===e?void 0:e.selected)||[]:null===(i=this._selectionModel)||void 0===i?void 0:i.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){const i=e.keyCode,r=40===i||38===i||37===i||39===i,s=13===i||32===i,o=this._keyManager;if(!o.isTyping()&&s&&!gi(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){const a=this.selected;o.onKeydown(e);const l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(e){const i=this._keyManager,r=e.keyCode,s=40===r||38===r,o=i.isTyping();if(s&&e.altKey)e.preventDefault(),this.close();else if(o||13!==r&&32!==r||!i.activeItem||gi(e))if(!o&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();const a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{const a=i.activeItemIndex;i.onKeydown(e),this._multiple&&s&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(sn(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this._selectionModel.selected.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){const i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,e)}catch(s){return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_initKeyManager(){this._keyManager=new Z3(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Ot(this._destroy)).subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.pipe(Ot(this._destroy)).subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const e=$n(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ot(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),$n(...this.options.map(i=>i._stateChanges)).pipe(Ot(e)).subscribe(()=>{this._changeDetectorRef.markForCheck(),this.stateChanges.next()})}_onSelect(e,i){const r=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const e=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,e):e.indexOf(i)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){var e;return!this._panelOpen&&!this.disabled&&(null===(e=this.options)||void 0===e?void 0:e.length)>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){var e;if(this.ariaLabel)return null;const i=null===(e=this._parentFormField)||void 0===e?void 0:e.getLabelId();return this.ariaLabelledby?(i?i+" ":"")+this.ariaLabelledby:i}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){var e;if(this.ariaLabel)return null;const i=null===(e=this._parentFormField)||void 0===e?void 0:e.getLabelId();let r=(i?i+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return n.\u0275fac=function(e){return new(e||n)(x(ss),x(en),x(et),x(ih),x(Je),x(qi,8),x(Xl,8),x(Jl,8),x(Z_,8),x(Tr,10),ii("tabindex"),x(Mk),x(P_),x(M5,8))},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&(Gt(f5,5),Gt(p5,5),Gt(ok,5)),2&e){let r;Ge(r=We())&&(i.trigger=r.first),Ge(r=We())&&(i.panel=r.first),Ge(r=We())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[Le,cn]}),n})(),xk=(()=>{class n extends A5{constructor(){super(...arguments),this._scrollTop=0,this._triggerFontSize=0,this._transformOrigin="top",this._offsetY=0,this._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}]}_calculateOverlayScroll(e,i,r){const s=this._getItemHeight();return Math.min(Math.max(0,s*e-i+s/2),r)}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(Ot(this._destroy)).subscribe(()=>{this.panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._changeDetectorRef.markForCheck())})}open(){super._canOpen()&&(super.open(),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe(sn(1)).subscribe(()=>{this._triggerFontSize&&this._overlayDir.overlayRef&&this._overlayDir.overlayRef.overlayElement&&(this._overlayDir.overlayRef.overlayElement.style.fontSize=`${this._triggerFontSize}px`)}))}_scrollOptionIntoView(e){const i=LS(e,this.options,this.optionGroups),r=this._getItemHeight();this.panel.nativeElement.scrollTop=0===e&&1===i?0:function yz(n,t,e,i){return ne+i?Math.max(0,n-i+t):e}((e+i)*r,r,this.panel.nativeElement.scrollTop,256)}_positioningSettled(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}_panelDoneAnimating(e){this.panelOpen?this._scrollTop=0:(this._overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),super._panelDoneAnimating(e)}_getChangeEvent(e){return new S5(this,e)}_calculateOverlayOffsetX(){const e=this._overlayDir.overlayRef.overlayElement.getBoundingClientRect(),i=this._viewportRuler.getViewportSize(),r=this._isRtl(),s=this.multiple?56:32;let o;if(this.multiple)o=40;else if(this.disableOptionCentering)o=16;else{let c=this._selectionModel.selected[0]||this.options.first;o=c&&c.group?32:16}r||(o*=-1);const a=0-(e.left+o-(r?s:0)),l=e.right+o-i.width+(r?0:s);a>0?o+=a+8:l>0&&(o-=l+8),this._overlayDir.offsetX=Math.round(o),this._overlayDir.overlayRef.updatePosition()}_calculateOverlayOffsetY(e,i,r){const s=this._getItemHeight(),o=(s-this._triggerRect.height)/2,a=Math.floor(256/s);let l;return this.disableOptionCentering?0:(l=0===this._scrollTop?e*s:this._scrollTop===r?(e-(this._getItemCount()-a))*s+(s-(this._getItemCount()*s-256)%s):i-s/2,Math.round(-1*l-o))}_checkOverlayWithinViewport(e){const i=this._getItemHeight(),r=this._viewportRuler.getViewportSize(),s=this._triggerRect.top-8,o=r.height-this._triggerRect.bottom-8,a=Math.abs(this._offsetY),c=Math.min(this._getItemCount()*i,256)-a-this._triggerRect.height;c>o?this._adjustPanelUp(c,o):a>s?this._adjustPanelDown(a,s,e):this._transformOrigin=this._getOriginBasedOnOption()}_adjustPanelUp(e,i){const r=Math.round(e-i);this._scrollTop-=r,this._offsetY-=r,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}_adjustPanelDown(e,i,r){const s=Math.round(e-i);if(this._scrollTop+=s,this._offsetY+=s,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=r)return this._scrollTop=r,this._offsetY=0,void(this._transformOrigin="50% top 0px")}_calculateOverlayPosition(){const e=this._getItemHeight(),i=this._getItemCount(),r=Math.min(i*e,256),o=i*e-r;let a;a=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),a+=LS(a,this.options,this.optionGroups);const l=r/2;this._scrollTop=this._calculateOverlayScroll(a,l,o),this._offsetY=this._calculateOverlayOffsetY(a,l,o),this._checkOverlayWithinViewport(o)}_getOriginBasedOnOption(){const e=this._getItemHeight(),i=(e-this._triggerRect.height)/2;return`50% ${Math.abs(this._offsetY)-i+e/2}px 0px`}_getItemHeight(){return 3*this._triggerFontSize}_getItemCount(){return this.options.length+this.optionGroups.length}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Mt(n)))(i||n)}}(),n.\u0275cmp=vt({type:n,selectors:[["mat-select"]],contentQueries:function(e,i,r){if(1&e&&(It(r,T5,5),It(r,Y_,5),It(r,FS,5)),2&e){let s;Ge(s=We())&&(i.customTrigger=s.first),Ge(s=We())&&(i.options=s),Ge(s=We())&&(i.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:19,hostBindings:function(e,i){1&e&&$e("keydown",function(s){return i._handleKeydown(s)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&e&&(wt("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),At("mat-select-disabled",i.disabled)("mat-select-invalid",i.errorState)("mat-select-required",i.required)("mat-select-empty",i.empty)("mat-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[Xe([{provide:lh,useExisting:n},{provide:OS,useExisting:n}]),Le],ngContentSelectors:w5,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(e,i){if(1&e&&(Fn(b5),fe(0,"div",0,1),$e("click",function(){return i.toggle()}),fe(3,"div",2),it(4,m5,2,1,"span",3),it(5,v5,3,2,"span",4),we(),fe(6,"div",5),kt(7,"div",6),we()(),it(8,y5,4,14,"ng-template",7),$e("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&e){const r=Js(1);wt("aria-owns",i.panelOpen?i.id+"-panel":null),Ee(3),Ae("ngSwitch",i.empty),wt("id",i._valueId),Ee(1),Ae("ngSwitchCase",!0),Ee(1),Ae("ngSwitchCase",!1),Ee(3),Ae("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayMinWidth",null==i._triggerRect?null:i._triggerRect.width)("cdkConnectedOverlayOffsetY",i._offsetY)}},dependencies:[eg,ba,iu,cE,ok,sk],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{height:16px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;margin:0 4px}.mat-form-field.mat-focused .mat-select-arrow{transform:translateX(0)}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Ck.transformPanelWrap,Ck.transformPanel]},changeDetection:0}),n})(),Sk=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[x5],imports:[pi,Pa,NS,ht,Sa,dh,NS,ht]}),n})();const O5={provide:new De("mat-tooltip-scroll-strategy"),deps:[Yi],useFactory:function P5(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}};let kk=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[O5],imports:[Ku,pi,Pa,ht,ht,Sa]}),n})(),nv=(()=>{class n{constructor(){this.changes=new ue,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,i,r)=>{if(0==r||0==i)return`0 of ${r}`;const s=e*i;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+i,r):s+i} of ${r}`}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const H5={provide:nv,deps:[[new Hn,new ir,nv]],useFactory:function V5(n){return n||new nv}};let j5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[H5],imports:[pi,oh,Sk,kk,ht]}),n})();function U5(n,t){if(1&n&&(Ja(),kt(0,"circle",4)),2&n){const e=lt(),i=Js(1);Hi("animation-name","mat-progress-spinner-stroke-rotate-"+e._spinnerAnimationLabel)("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%")("transform-origin",e._getCircleTransformOrigin(i)),wt("r",e._getCircleRadius())}}function z5(n,t){if(1&n&&(Ja(),kt(0,"circle",4)),2&n){const e=lt(),i=Js(1);Hi("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%")("transform-origin",e._getCircleTransformOrigin(i)),wt("r",e._getCircleRadius())}}const G5=vo(class{constructor(n){this._elementRef=n}},"primary"),W5=new De("mat-progress-spinner-default-options",{providedIn:"root",factory:function q5(){return{diameter:100}}});class Fs extends G5{constructor(t,e,i,r,s,o,a,l){super(t),this._document=i,this._diameter=100,this._value=0,this._resizeSubscription=X.EMPTY,this.mode="determinate";const c=Fs._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),c.has(i.head)||c.set(i.head,new Set([100])),this._noopAnimations="NoopAnimations"===r&&!!s&&!s._forceAnimations,"mat-spinner"===t.nativeElement.nodeName.toLowerCase()&&(this.mode="indeterminate"),s&&(s.color&&(this.color=this.defaultColor=s.color),s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth)),e.isBrowser&&e.SAFARI&&a&&o&&l&&(this._resizeSubscription=a.change(150).subscribe(()=>{"indeterminate"===this.mode&&l.run(()=>o.markForCheck())}))}get diameter(){return this._diameter}set diameter(t){this._diameter=Ii(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=Ii(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,Ii(t)))}ngOnInit(){const t=this._elementRef.nativeElement;this._styleRoot=ju(t)||this._document.head,this._attachStyleNode(),t.classList.add("mat-progress-spinner-indeterminate-animation")}ngOnDestroy(){this._resizeSubscription.unsubscribe()}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){const t=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_getCircleTransformOrigin(t){var e;const i=50*(null!==(e=t.currentScale)&&void 0!==e?e:1);return`${i}% ${i}%`}_attachStyleNode(){const t=this._styleRoot,e=this._diameter,i=Fs._diameters;let r=i.get(t);if(!r||!r.has(e)){const s=this._document.createElement("style");s.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),s.textContent=this._getAnimationText(),t.appendChild(s),r||(r=new Set,i.set(t,r)),r.add(e)}}_getAnimationText(){const t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,""+.95*t).replace(/END_VALUE/g,""+.2*t).replace(/DIAMETER/g,`${this._spinnerAnimationLabel}`)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}}Fs._diameters=new WeakMap,Fs.\u0275fac=function(t){return new(t||Fs)(x(Je),x(bn),x(ct,8),x(fn,8),x(W5),x(en),x(ss),x(et))},Fs.\u0275cmp=vt({type:Fs,selectors:[["mat-progress-spinner"],["mat-spinner"]],hostAttrs:["role","progressbar","tabindex","-1",1,"mat-progress-spinner","mat-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(wt("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),Hi("width",e.diameter,"px")("height",e.diameter,"px"),At("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",diameter:"diameter",strokeWidth:"strokeWidth",mode:"mode",value:"value"},exportAs:["matProgressSpinner"],features:[Le],decls:4,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false","aria-hidden","true",3,"ngSwitch"],["svg",""],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width","transform-origin",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width","transform-origin",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(Ja(),fe(0,"svg",0,1),it(2,U5,1,11,"circle",2),it(3,z5,1,9,"circle",3),we()),2&t&&(Hi("width",e.diameter,"px")("height",e.diameter,"px"),Ae("ngSwitch","indeterminate"===e.mode),wt("viewBox",e._getViewBox()),Ee(2),Ae("ngSwitchCase",!0),Ee(1),Ae("ngSwitchCase",!1))},dependencies:[ba,iu],styles:[".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:rgba(0,0,0,0);transition:stroke-dashoffset 225ms linear}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}.mat-progress-spinner[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}.mat-progress-spinner._mat-animation-noopable svg,.mat-progress-spinner._mat-animation-noopable circle{animation:none;transition:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}"],encapsulation:2,changeDetection:0});let K5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ht,pi,ht]}),n})(),c4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Ta,ht,ht]}),n})(),b4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[pi,ht,ht]}),n})(),sv=(()=>{class n{constructor(){this.changes=new ue}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const C4={provide:sv,deps:[[new Hn,new ir,sv]],useFactory:function w4(n){return n||new sv}};let D4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[C4],imports:[pi,ht]}),n})(),B4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[N_]}),n})(),t6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[B4,ht,ht]}),n})();const r6=["*"],s6=["tabListContainer"],o6=["tabList"],a6=["tabListInner"],l6=["nextPaginator"],c6=["previousPaginator"],f6=["mat-tab-nav-bar",""],p6=new De("MatInkBarPositioner",{providedIn:"root",factory:function m6(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}});let $k=(()=>{class n{constructor(e,i,r,s){this._elementRef=e,this._ngZone=i,this._inkBarPositioner=r,this._animationMode=s}alignToElement(e){this.show(),this._ngZone.onStable.pipe(sn(1)).subscribe(()=>{const i=this._inkBarPositioner(e),r=this._elementRef.nativeElement;r.style.left=i.left,r.style.width=i.width})}show(){this._elementRef.nativeElement.style.visibility="visible"}hide(){this._elementRef.nativeElement.style.visibility="hidden"}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(et),x(p6),x(fn,8))},n.\u0275dir=Me({type:n,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(e,i){2&e&&At("_mat-animation-noopable","NoopAnimations"===i._animationMode)}}),n})();const Gk=Ar({passive:!0});let v6=(()=>{class n{constructor(e,i,r,s,o,a,l){this._elementRef=e,this._changeDetectorRef=i,this._viewportRuler=r,this._dir=s,this._ngZone=o,this._platform=a,this._animationMode=l,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new ue,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new ue,this._disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new je,this.indexFocused=new je,o.runOutsideAngular(()=>{_o(e.nativeElement,"mouseleave").pipe(Ot(this._destroyed)).subscribe(()=>{this._stopInterval()})})}get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=rt(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){e=Ii(e),this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}ngAfterViewInit(){_o(this._previousPaginator.nativeElement,"touchstart",Gk).pipe(Ot(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),_o(this._nextPaginator.nativeElement,"touchstart",Gk).pipe(Ot(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const e=this._dir?this._dir.change:tt("ltr"),i=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Wu(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(sn(1)).subscribe(r),$n(e,i,this._items.changes,this._itemsResized()).pipe(Ot(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.pipe(Ot(this._destroyed)).subscribe(s=>{this.indexFocused.emit(s),this._setTabFocus(s)})}_itemsResized(){return"function"!=typeof ResizeObserver?Fi:this._items.changes.pipe(Qn(this._items),Rr(e=>new J(i=>this._ngZone.runOutsideAngular(()=>{const r=new ResizeObserver(()=>{i.next()});return e.forEach(s=>{r.observe(s.elementRef.nativeElement)}),()=>{r.disconnect()}}))),S_(1))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!gi(e))switch(e.keyCode){case 13:case 32:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e));break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){const e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){if(!this._items)return!0;const i=this._items?this._items.toArray()[e]:null;return!!i&&!i.disabled}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();const i=this._tabListContainer.nativeElement;i.scrollLeft="ltr"==this._getLayoutDirection()?0:i.scrollWidth-i.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const e=this.scrollDistance,i="ltr"===this._getLayoutDirection()?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){return this._scrollTo(this._scrollDistance+("before"==e?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;const i=this._items?this._items.toArray()[e]:null;if(!i)return;const r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:s,offsetWidth:o}=i.elementRef.nativeElement;let a,l;"ltr"==this._getLayoutDirection()?(a=s,l=a+o):(l=this._tabListInner.nativeElement.offsetWidth-s,a=l-o);const c=this.scrollDistance,d=this.scrollDistance+r;ad&&(this.scrollDistance+=l-d+60)}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const e=this._tabListInner.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=e}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,i=e?e.elementRef.nativeElement:null;i?this._inkBar.alignToElement(i):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,i){i&&null!=i.button&&0!==i.button||(this._stopInterval(),F_(650,100).pipe(Ot($n(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:r,distance:s}=this._scrollHeader(e);(0===s||s>=r)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const i=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(i,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:i,distance:this._scrollDistance}}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(en),x(ss),x(qi,8),x(et),x(bn),x(fn,8))},n.\u0275dir=Me({type:n,inputs:{disablePagination:"disablePagination"}}),n})(),y6=0,qk=(()=>{class n extends v6{constructor(e,i,r,s,o,a,l){super(e,s,o,i,r,a,l),this._disableRipple=!1,this.color="primary"}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){const i=this._elementRef.nativeElement.classList;i.remove(`mat-background-${this.backgroundColor}`),e&&i.add(`mat-background-${e}`),this._backgroundColor=e}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=rt(e)}_itemSelected(){}ngAfterContentInit(){this._items.changes.pipe(Qn(null),Ot(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}updateActiveLink(){if(!this._items)return;const e=this._items.toArray();for(let i=0;i{class n extends qk{constructor(e,i,r,s,o,a,l){super(e,i,r,s,o,a,l)}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(qi,8),x(et),x(en),x(ss),x(bn),x(fn,8))},n.\u0275cmp=vt({type:n,selectors:[["","mat-tab-nav-bar",""]],contentQueries:function(e,i,r){if(1&e&&It(r,Kk,5),2&e){let s;Ge(s=We())&&(i._items=s)}},viewQuery:function(e,i){if(1&e&&(Gt($k,7),Gt(s6,7),Gt(o6,7),Gt(a6,7),Gt(l6,5),Gt(c6,5)),2&e){let r;Ge(r=We())&&(i._inkBar=r.first),Ge(r=We())&&(i._tabListContainer=r.first),Ge(r=We())&&(i._tabList=r.first),Ge(r=We())&&(i._tabListInner=r.first),Ge(r=We())&&(i._nextPaginator=r.first),Ge(r=We())&&(i._previousPaginator=r.first)}},hostAttrs:[1,"mat-tab-nav-bar","mat-tab-header"],hostVars:11,hostBindings:function(e,i){2&e&&(wt("role",i._getRole()),At("mat-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-tab-header-rtl","rtl"==i._getLayoutDirection())("mat-primary","warn"!==i.color&&"accent"!==i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color))},inputs:{color:"color"},exportAs:["matTabNavBar","matTabNav"],features:[Le],attrs:f6,ngContentSelectors:r6,decls:14,vars:10,consts:[["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","disabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-link-container",3,"keydown"],["tabListContainer",""],[1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-links"],["tabListInner",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","disabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(e,i){1&e&&(Fn(),fe(0,"button",0,1),$e("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(s){return i._handlePaginatorPress("before",s)})("touchend",function(){return i._stopInterval()}),kt(2,"div",2),we(),fe(3,"div",3,4),$e("keydown",function(s){return i._handleKeydown(s)}),fe(5,"div",5,6),$e("cdkObserveContent",function(){return i._onContentChanges()}),fe(7,"div",7,8),Tt(9),we(),kt(10,"mat-ink-bar"),we()(),fe(11,"button",9,10),$e("mousedown",function(s){return i._handlePaginatorPress("after",s)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),kt(13,"div",2),we()),2&e&&(At("mat-tab-header-pagination-disabled",i._disableScrollBefore),Ae("matRippleDisabled",i._disableScrollBefore||i.disableRipple)("disabled",i._disableScrollBefore||null),Ee(5),At("_mat-animation-noopable","NoopAnimations"===i._animationMode),Ee(6),At("mat-tab-header-pagination-disabled",i._disableScrollAfter),Ae("matRippleDisabled",i._disableScrollAfter||i.disableRipple)("disabled",i._disableScrollAfter||null))},dependencies:[Ps,T_,$k],styles:[".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-tab-header-pagination::-moz-focus-inner{border:0}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}"],encapsulation:2}),n})();const b6=yo(Rs(uc(class{})));let w6=(()=>{class n extends b6{constructor(e,i,r,s,o,a){super(),this._tabNavBar=e,this.elementRef=i,this._focusMonitor=o,this._isActive=!1,this.id="mat-tab-link-"+y6++,this.rippleConfig=r||{},this.tabIndex=parseInt(s)||0,"NoopAnimations"===a&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0})}get active(){return this._isActive}set active(e){const i=rt(e);i!==this._isActive&&(this._isActive=i,this._tabNavBar.updateActiveLink())}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.elementRef)}_handleFocus(){this._tabNavBar.focusIndex=this._tabNavBar._items.toArray().indexOf(this)}_handleKeydown(e){this._tabNavBar.tabPanel&&32===e.keyCode&&this.elementRef.nativeElement.click()}_getAriaControls(){var e;return this._tabNavBar.tabPanel?null===(e=this._tabNavBar.tabPanel)||void 0===e?void 0:e.id:this.elementRef.nativeElement.getAttribute("aria-controls")}_getAriaSelected(){return this._tabNavBar.tabPanel?this.active?"true":"false":this.elementRef.nativeElement.getAttribute("aria-selected")}_getAriaCurrent(){return this.active&&!this._tabNavBar.tabPanel?"page":null}_getRole(){return this._tabNavBar.tabPanel?"tab":this.elementRef.nativeElement.getAttribute("role")}_getTabIndex(){return this._tabNavBar.tabPanel?this._isActive&&!this.disabled?0:-1:this.tabIndex}}return n.\u0275fac=function(e){return new(e||n)(x(qk),x(Je),x(sh,8),ii("tabindex"),x(hr),x(fn,8))},n.\u0275dir=Me({type:n,inputs:{active:"active",id:"id"},features:[Le]}),n})(),Kk=(()=>{class n extends w6{constructor(e,i,r,s,o,a,l,c){super(e,i,o,a,l,c),this._tabLinkRipple=new W_(this,r,i,s),this._tabLinkRipple.setupTriggerEvents(i.nativeElement)}ngOnDestroy(){super.ngOnDestroy(),this._tabLinkRipple._removeTriggerEvents()}}return n.\u0275fac=function(e){return new(e||n)(x(Yk),x(Je),x(et),x(bn),x(sh,8),ii("tabindex"),x(hr),x(fn,8))},n.\u0275dir=Me({type:n,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mat-tab-link","mat-focus-indicator"],hostVars:11,hostBindings:function(e,i){1&e&&$e("focus",function(){return i._handleFocus()})("keydown",function(s){return i._handleKeydown(s)}),2&e&&(wt("aria-controls",i._getAriaControls())("aria-current",i._getAriaCurrent())("aria-disabled",i.disabled)("aria-selected",i._getAriaSelected())("id",i.id)("tabIndex",i._getTabIndex())("role",i._getRole()),At("mat-tab-disabled",i.disabled)("mat-tab-label-active",i.active))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matTabLink"],features:[Le]}),n})(),C6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[pi,ht,Os,Ta,Gu,Ku,ht]}),n})(),D6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ht,ht]}),n})();function gv(...n){const t=qa(n),e=oy(n),{args:i,keys:r}=xM(n);if(0===i.length)return gn([],t);const s=new J(function E6(n,t,e=N){return i=>{Qk(t,()=>{const{length:r}=n,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=gn(n[l],t);let d=!1;c.subscribe(_e(i,f=>{s[l]=f,d||(d=!0,a--),a||i.next(e(s.slice()))},()=>{--o||i.complete()}))},i)},i)}}(i,t,r?o=>SM(r,o):N));return e?s.pipe(Ng(e)):s}function Qk(n,t,e){n?jr(e,n,t):t()}const Zk=new Set;let ja,M6=(()=>{class n{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):S6}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function x6(n){if(!Zk.has(n))try{ja||(ja=document.createElement("style"),ja.setAttribute("type","text/css"),document.head.appendChild(ja)),ja.sheet&&(ja.sheet.insertRule(`@media ${n} {body{ }}`,0),Zk.add(n))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return n.\u0275fac=function(e){return new(e||n)(te(bn))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function S6(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}let _v=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new ue}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return Xk(Uu(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=gv(Xk(Uu(e)).map(o=>this._registerQuery(o).observable));return s=nh(s.pipe(sn(1)),s.pipe(S_(1),x_(0))),s.pipe(U(o=>{const a={matches:!1,breakpoints:{}};return o.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);const i=this._mediaMatcher.matchMedia(e),s={observable:new J(o=>{const a=l=>this._zone.run(()=>o.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(Qn(i),U(({matches:o})=>({query:e,matches:o})),Ot(this._destroySubject)),mql:i};return this._queries.set(e,s),s}}return n.\u0275fac=function(e){return new(e||n)(te(M6),te(et))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Xk(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function T6(n,t){if(1&n){const e=ki();fe(0,"div",2)(1,"button",3),$e("click",function(){return Bn(e),Vn(lt().action())}),Ue(2),we()()}if(2&n){const e=lt();Ee(2),Kn(e.data.action)}}function A6(n,t){}const Jk=new De("MatSnackBarData");class Fh{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const I6=Math.pow(2,31)-1;class vv{constructor(t,e){this._overlayRef=e,this._afterDismissed=new ue,this._afterOpened=new ue,this._onAction=new ue,this._dismissedByAction=!1,this.containerInstance=t,t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,I6))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let R6=(()=>{class n{constructor(e,i){this.snackBarRef=e,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(e){return new(e||n)(x(vv),x(Jk))},n.\u0275cmp=vt({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[[1,"mat-simple-snack-bar-content"],["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(e,i){1&e&&(fe(0,"span",0),Ue(1),we(),it(2,T6,3,1,"div",1)),2&e&&(Ee(1),Kn(i.data.message),Ee(1),Ae("ngIf",i.hasAction))},dependencies:[zi,Aa],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}.mat-simple-snack-bar-content{overflow:hidden;text-overflow:ellipsis}"],encapsulation:2,changeDetection:0}),n})();const P6={snackBarState:jn("state",[zt("void, hidden",Qe({transform:"scale(0.8)",opacity:0})),zt("visible",Qe({transform:"scale(1)",opacity:1})),Wt("* => visible",Zt("150ms cubic-bezier(0, 0, 0.2, 1)")),Wt("* => void, * => hidden",Zt("75ms cubic-bezier(0.4, 0.0, 1, 1)",Qe({opacity:0})))])};let O6=(()=>{class n extends hh{constructor(e,i,r,s,o){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new ue,this._onExit=new ue,this._onEnter=new ue,this._animationState="void",this.attachDomPortal=a=>{this._assertNotAttached();const l=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),l},this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}onAnimationEnd(e){const{fromState:i,toState:r}=e;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(sn(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){const e=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>e.classList.add(r)):e.classList.add(i))}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),null==r||r.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(e){return new(e||n)(x(et),x(Je),x(en),x(bn),x(Fh))},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&Gt(Ra,7),2&e){let r;Ge(r=We())&&(i._portalOutlet=r.first)}},features:[Le]}),n})(),F6=(()=>{class n extends O6{_afterPortalAttached(){super._afterPortalAttached(),"center"===this.snackBarConfig.horizontalPosition&&this._elementRef.nativeElement.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&this._elementRef.nativeElement.classList.add("mat-snack-bar-top")}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Mt(n)))(i||n)}}(),n.\u0275cmp=vt({type:n,selectors:[["snack-bar-container"]],hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(e,i){1&e&&kd("@state.done",function(s){return i.onAnimationEnd(s)}),2&e&&Id("@state",i._animationState)},features:[Le],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(fe(0,"div",0),it(1,A6,0,0,"ng-template",1),we(),kt(2,"div")),2&e&&(Ee(2),wt("aria-live",i._live)("role",i._role))},dependencies:[Ra],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}"],encapsulation:2,data:{animation:[P6.snackBarState]}}),n})(),eT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Pa,Os,pi,oh,ht,ht]}),n})();const tT=new De("mat-snack-bar-default-options",{providedIn:"root",factory:function L6(){return new Fh}});let N6=(()=>{class n{constructor(e,i,r,s,o,a){this._overlay=e,this._live=i,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=o,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}get _openedSnackBarRef(){const e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}openFromComponent(e,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",r){const s=Object.assign(Object.assign({},this._defaultConfig),r);return s.data={message:e,action:i},s.announcementMessage===e&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,i){const s=Jt.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:Fh,useValue:i}]}),o=new pc(this.snackBarContainerComponent,i.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=i,a.instance}_attach(e,i){const r=Object.assign(Object.assign(Object.assign({},new Fh),this._defaultConfig),i),s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new vv(o,s);if(e instanceof _n){const l=new mc(e,null,{$implicit:r.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(r,a),c=new pc(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ot(s.detachments())).subscribe(l=>{s.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration))}_createOverlay(e){const i=new fh;i.direction=e.direction;let r=this._overlay.position().global();const s="rtl"===e.direction,o="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!s||"end"===e.horizontalPosition&&s,a=!o&&"center"!==e.horizontalPosition;return o?r.left("0"):a?r.right("0"):r.centerHorizontally(),"top"===e.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(e,i){return Jt.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:vv,useValue:i},{provide:Jk,useValue:e.data}]})}}return n.\u0275fac=function(e){return new(e||n)(te(Yi),te(P_),te(Jt),te(_v),te(n,12),te(tT))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),B6=(()=>{class n extends N6{constructor(e,i,r,s,o,a){super(e,i,r,s,o,a),this.simpleSnackBarComponent=R6,this.snackBarContainerComponent=F6,this.handsetCssClass="mat-snack-bar-handset"}}return n.\u0275fac=function(e){return new(e||n)(te(Yi),te(P_),te(Jt),te(_v),te(n,12),te(tT))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:eT}),n})();const Dc=Br(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function Lh(){return Pe((n,t)=>{let e=null;n._refCount++;const i=_e(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(e=null);const r=n._connection,s=e;e=null,r&&(!s||r===s)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})}class yv extends J{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Ne(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,null==t||t.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new X;const e=this.getSubject();t.add(this.source.subscribe(_e(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=X.EMPTY)}return t}refCount(){return Lh()(this)}}function V6(n,t,e,i,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(_e(o,d=>{const f=c++;l=a?n(l,d,f):(a=!0,d),i&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}function nT(n,t){return Pe(V6(n,t,arguments.length>=2,!0))}function bv(n){return n<=0?()=>Fi:Pe((t,e)=>{let i=[];t.subscribe(_e(e,r=>{i.push(r),n{for(const r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function iT(n=H6){return Pe((t,e)=>{let i=!1;t.subscribe(_e(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(n())))})}function H6(){return new Dc}function wv(n){return Pe((t,e)=>{let i=!1;t.subscribe(_e(e,r=>{i=!0,e.next(r)},()=>{i||e.next(n),e.complete()}))})}function Do(n,t){const e=arguments.length>=2;return i=>i.pipe(n?yn((r,s)=>n(r,s,i)):N,sn(1),e?wv(t):iT(()=>new Dc))}class cs{constructor(t,e){this.id=t,this.url=e}}class Cv extends cs{constructor(t,e,i="imperative",r=null){super(t,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Ec extends cs{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class rT extends cs{constructor(t,e,i){super(t,e),this.reason=i,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class z6 extends cs{constructor(t,e,i){super(t,e),this.error=i,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class $6 extends cs{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class G6 extends cs{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class W6 extends cs{constructor(t,e,i,r,s){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class q6 extends cs{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y6 extends cs{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class K6{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Q6{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Z6{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class X6{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class J6{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class eG{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class sT{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const Et="primary";class tG{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Ua(n){return new tG(n)}const oT="ngNavigationCancelingError";function Dv(n){const t=Error("NavigationCancelingError: "+n);return t[oT]=!0,t}function iG(n,t,e){const i=e.path.split("/");if(i.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||i.lengthi[s]===r)}return n===t}function lT(n){return Array.prototype.concat.apply([],n)}function cT(n){return n.length>0?n[n.length-1]:null}function Un(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function fr(n){return em(n)?n:Cl(n)?gn(Promise.resolve(n)):tt(n)}const oG={exact:function hT(n,t,e){if(!Mo(n.segments,t.segments)||!Nh(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!n.children[i]||!hT(n.children[i],t.children[i],e))return!1;return!0},subset:fT},dT={exact:function aG(n,t){return Pr(n,t)},subset:function lG(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>aT(n[e],t[e]))},ignored:()=>!0};function uT(n,t,e){return oG[e.paths](n.root,t.root,e.matrixParams)&&dT[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function fT(n,t,e){return pT(n,t,t.segments,e)}function pT(n,t,e,i){if(n.segments.length>e.length){const r=n.segments.slice(0,e.length);return!(!Mo(r,e)||t.hasChildren()||!Nh(r,e,i))}if(n.segments.length===e.length){if(!Mo(n.segments,e)||!Nh(n.segments,e,i))return!1;for(const r in t.children)if(!n.children[r]||!fT(n.children[r],t.children[r],i))return!1;return!0}{const r=e.slice(0,n.segments.length),s=e.slice(n.segments.length);return!!(Mo(n.segments,r)&&Nh(n.segments,r,i)&&n.children[Et])&&pT(n.children[Et],t,s,i)}}function Nh(n,t,e){return t.every((i,r)=>dT[e](n[r].parameters,i.parameters))}class Eo{constructor(t,e,i){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Ua(this.queryParams)),this._queryParamMap}toString(){return uG.serialize(this)}}class Pt{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Un(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Bh(this)}}class Mc{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Ua(this.parameters)),this._parameterMap}toString(){return yT(this)}}function Mo(n,t){return n.length===t.length&&n.every((e,i)=>e.path===t[i].path)}class mT{}class gT{parse(t){const e=new bG(t);return new Eo(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${xc(t.root,!0)}`,i=function pG(n){const t=Object.keys(n).map(e=>{const i=n[e];return Array.isArray(i)?i.map(r=>`${Vh(e)}=${Vh(r)}`).join("&"):`${Vh(e)}=${Vh(i)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${i}${"string"==typeof t.fragment?`#${function hG(n){return encodeURI(n)}(t.fragment)}`:""}`}}const uG=new gT;function Bh(n){return n.segments.map(t=>yT(t)).join("/")}function xc(n,t){if(!n.hasChildren())return Bh(n);if(t){const e=n.children[Et]?xc(n.children[Et],!1):"",i=[];return Un(n.children,(r,s)=>{s!==Et&&i.push(`${s}:${xc(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function dG(n,t){let e=[];return Un(n.children,(i,r)=>{r===Et&&(e=e.concat(t(i,r)))}),Un(n.children,(i,r)=>{r!==Et&&(e=e.concat(t(i,r)))}),e}(n,(i,r)=>r===Et?[xc(n.children[Et],!1)]:[`${r}:${xc(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[Et]?`${Bh(n)}/${e[0]}`:`${Bh(n)}/(${e.join("//")})`}}function _T(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Vh(n){return _T(n).replace(/%3B/gi,";")}function Ev(n){return _T(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Hh(n){return decodeURIComponent(n)}function vT(n){return Hh(n.replace(/\+/g,"%20"))}function yT(n){return`${Ev(n.path)}${function fG(n){return Object.keys(n).map(t=>`;${Ev(t)}=${Ev(n[t])}`).join("")}(n.parameters)}`}const mG=/^[^\/()?;=#]+/;function jh(n){const t=n.match(mG);return t?t[0]:""}const gG=/^[^=?&#]+/,vG=/^[^&#]+/;class bG{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Pt([],{}):new Pt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[Et]=new Pt(t,e)),i}parseSegment(){const t=jh(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new Mc(Hh(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=jh(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=jh(this.remaining);r&&(i=r,this.capture(i))}t[Hh(e)]=Hh(i)}parseQueryParam(t){const e=function _G(n){const t=n.match(gG);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const o=function yG(n){const t=n.match(vG);return t?t[0]:""}(this.remaining);o&&(i=o,this.capture(i))}const r=vT(e),s=vT(i);if(t.hasOwnProperty(r)){let o=t[r];Array.isArray(o)||(o=[o],t[r]=o),o.push(s)}else t[r]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=jh(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=Et);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[Et]:new Pt([],o),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class bT{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Mv(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){const e=Mv(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=xv(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return xv(t,this._root).map(e=>e.value)}}function Mv(n,t){if(n===t.value)return t;for(const e of t.children){const i=Mv(n,e);if(i)return i}return null}function xv(n,t){if(n===t.value)return[t];for(const e of t.children){const i=xv(n,e);if(i.length)return i.unshift(t),i}return[]}class ds{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function za(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class wT extends bT{constructor(t,e){super(t),this.snapshot=e,Sv(this,t)}toString(){return this.snapshot.toString()}}function CT(n,t){const e=function wG(n,t){const o=new Uh([],{},{},"",{},Et,t,null,n.root,-1,{});return new ET("",new ds(o,[]))}(n,t),i=new mi([new Mc("",{})]),r=new mi({}),s=new mi({}),o=new mi({}),a=new mi(""),l=new $a(i,r,o,a,s,Et,t,e.root);return l.snapshot=e.root,new wT(new ds(l,[]),e)}class $a{constructor(t,e,i,r,s,o,a,l){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(U(t=>Ua(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(U(t=>Ua(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function DT(n,t="emptyOnly"){const e=n.pathFromRoot;let i=0;if("always"!==t)for(i=e.length-1;i>=1;){const r=e[i],s=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(s.component)break;i--}}return function CG(n){return n.reduce((t,e)=>{var i;return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign(Object.assign(Object.assign({},e.data),t.resolve),null===(i=e.routeConfig)||void 0===i?void 0:i.data),e._resolvedData)}},{params:{},data:{},resolve:{}})}(e.slice(i))}class Uh{constructor(t,e,i,r,s,o,a,l,c,d,f,w){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=d,this._correctedLastPathIndex=null!=w?w:d,this._resolve=f}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Ua(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Ua(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class ET extends bT{constructor(t,e){super(e),this.url=t,Sv(this,e)}toString(){return MT(this._root)}}function Sv(n,t){t.value._routerState=n,t.children.forEach(e=>Sv(n,e))}function MT(n){const t=n.children.length>0?` { ${n.children.map(MT).join(", ")} } `:"";return`${n.value}${t}`}function kv(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Pr(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Pr(t.params,e.params)||n.params.next(e.params),function rG(n,t){if(n.length!==t.length)return!1;for(let e=0;ePr(e.parameters,t[i].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||Tv(n.parent,t.parent))}function Sc(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=t.value;const r=function EG(n,t,e){return t.children.map(i=>{for(const r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Sc(n,i,r);return Sc(n,i)})}(n,t,e);return new ds(i,r)}{if(n.shouldAttach(t.value)){const s=n.retrieve(t.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=t.value,o.children=t.children.map(a=>Sc(n,a)),o}}const i=function MG(n){return new $a(new mi(n.url),new mi(n.params),new mi(n.queryParams),new mi(n.fragment),new mi(n.data),n.outlet,n.component,n)}(t.value),r=t.children.map(s=>Sc(n,s));return new ds(i,r)}}function zh(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function kc(n){return"object"==typeof n&&null!=n&&n.outlets}function Av(n,t,e,i,r){let s={};if(i&&Un(i,(a,l)=>{s[l]=Array.isArray(a)?a.map(c=>`${c}`):`${a}`}),n===t)return new Eo(e,s,r);const o=xT(n,t,e);return new Eo(o,s,r)}function xT(n,t,e){const i={};return Un(n.children,(r,s)=>{i[s]=r===t?e:xT(r,t,e)}),new Pt(n.segments,i)}class ST{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&zh(i[0]))throw new Error("Root segment cannot have matrix parameters");const r=i.find(kc);if(r&&r!==cT(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Iv{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function kT(n,t,e){if(n||(n=new Pt([],{})),0===n.segments.length&&n.hasChildren())return $h(n,t,e);const i=function IG(n,t,e){let i=0,r=t;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return s;const o=n.segments[r],a=e[i];if(kc(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!AT(l,c,o))return s;i+=2}else{if(!AT(l,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof s&&(s=[s]),null!==s&&(r[o]=kT(n.children[o],t,s))}),Un(n.children,(s,o)=>{void 0===i[o]&&(r[o]=s)}),new Pt(n.segments,r)}}function Rv(n,t,e){const i=n.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[i]=Rv(new Pt([],{}),0,e))}),t}function TT(n){const t={};return Un(n,(e,i)=>t[i]=`${e}`),t}function AT(n,t,e){return n==e.path&&Pr(t,e.parameters)}class PG{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Tc,this.attachRef=null}}class Tc{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const i=this.getOrCreateContext(t);i.outlet=e,this.contexts.set(t,i)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new PG,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}let Pv=(()=>{class n{constructor(e,i,r,s,o){this.parentContexts=e,this.location=i,this.changeDetector=s,this.environmentInjector=o,this.activated=null,this._activatedRoute=null,this.activateEvents=new je,this.deactivateEvents=new je,this.attachEvents=new je,this.detachEvents=new je,this.name=r||Et,e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const r=this.location,o=e._futureSnapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new OG(e,a,r.injector);if(i&&function FG(n){return!!n.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(o);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(o,{index:r.length,injector:l,environmentInjector:null!=i?i:this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(e){return new(e||n)(x(Tc),x(An),ii("name"),x(en),x(Qs))},n.\u0275dir=Me({type:n,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"]}),n})();class OG{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===$a?this.route:t===Tc?this.childContexts:this.parent.get(t,e)}}let IT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=vt({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,i){1&e&&kt(0,"router-outlet")},dependencies:[Pv],encapsulation:2}),n})();function RT(n,t){var e;return n.providers&&!n._injector&&(n._injector=Nd(n.providers,t,`Route: ${n.path}`)),null!==(e=n._injector)&&void 0!==e?e:t}function Fv(n){const t=n.children&&n.children.map(Fv),e=t?Object.assign(Object.assign({},n),{children:t}):Object.assign({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Et&&(e.component=IT),e}function Qi(n){return n.outlet||Et}function PT(n,t){const e=n.filter(i=>Qi(i)===t);return e.push(...n.filter(i=>Qi(i)!==t)),e}function OT(n){var t;if(!n)return null;if(null!==(t=n.routeConfig)&&void 0!==t&&t._injector)return n.routeConfig._injector;for(let e=n.parent;e;e=e.parent){const i=e.routeConfig;if(null!=i&&i._loadedInjector)return i._loadedInjector;if(null!=i&&i._injector)return i._injector}return null}class HG{constructor(t,e,i,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),kv(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const r=za(e);t.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),Un(r,(s,o)=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(t,e,i){const r=t.value,s=e?e.value:null;if(r===s)if(r.component){const o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,i);else s&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=za(t);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);if(i&&i.outlet){const o=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:o,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=za(t);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(t,e,i){const r=za(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new eG(s.value.snapshot))}),t.children.length&&this.forwardEvent(new X6(t.value.snapshot))}activateRoutes(t,e,i){var r;const s=t.value,o=e?e.value:null;if(kv(s),s===o)if(s.component){const a=i.getOrCreateContext(s.outlet);this.activateChildRoutes(t,e,a.children)}else this.activateChildRoutes(t,e,i);else if(s.component){const a=i.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const l=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),a.children.onOutletReAttached(l.contexts),a.attachRef=l.componentRef,a.route=l.route.value,a.outlet&&a.outlet.attach(l.componentRef,l.route.value),kv(l.route.value),this.activateChildRoutes(t,null,a.children)}else{const l=OT(s.snapshot),c=null!==(r=null==l?void 0:l.get(io))&&void 0!==r?r:null;a.attachRef=null,a.route=s,a.resolver=c,a.injector=l,a.outlet&&a.outlet.activateWith(s,a.injector),this.activateChildRoutes(t,null,a.children)}}else this.activateChildRoutes(t,null,i)}}function Ns(n){return"function"==typeof n}function xo(n){return n instanceof Eo}const Ac=Symbol("INITIAL_VALUE");function Ic(){return Rr(n=>gv(n.map(t=>t.pipe(sn(1),Qn(Ac)))).pipe(nT((t,e)=>{let i=!1;return e.reduce((r,s,o)=>r!==Ac?r:(s===Ac&&(i=!0),i||!1!==s&&o!==e.length-1&&!xo(s)?r:s),t)},Ac),yn(t=>t!==Ac),U(t=>xo(t)?t:!0===t),sn(1)))}const FT={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Gh(n,t,e){var i;if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?Object.assign({},FT):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const s=(t.matcher||iG)(e,n,t);if(!s)return Object.assign({},FT);const o={};Un(s.posParams,(l,c)=>{o[c]=l.path});const a=s.consumed.length>0?Object.assign(Object.assign({},o),s.consumed[s.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:s.consumed,remainingSegments:e.slice(s.consumed.length),parameters:a,positionalParamSegments:null!==(i=s.posParams)&&void 0!==i?i:{}}}function Wh(n,t,e,i,r="corrected"){if(e.length>0&&function YG(n,t,e){return e.some(i=>qh(n,t,i)&&Qi(i)!==Et)}(n,e,i)){const o=new Pt(t,function qG(n,t,e,i){const r={};r[Et]=i,i._sourceSegment=n,i._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Qi(s)!==Et){const o=new Pt([],{});o._sourceSegment=n,o._segmentIndexShift=t.length,r[Qi(s)]=o}return r}(n,t,i,new Pt(e,n.children)));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function KG(n,t,e){return e.some(i=>qh(n,t,i))}(n,e,i)){const o=new Pt(n.segments,function WG(n,t,e,i,r,s){const o={};for(const a of i)if(qh(n,e,a)&&!r[Qi(a)]){const l=new Pt([],{});l._sourceSegment=n,l._segmentIndexShift="legacy"===s?n.segments.length:t.length,o[Qi(a)]=l}return Object.assign(Object.assign({},r),o)}(n,t,e,i,n.children,r));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:e}}const s=new Pt(n.segments,n.children);return s._sourceSegment=n,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:e}}function qh(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function LT(n,t,e,i){return!!(Qi(n)===i||i!==Et&&qh(t,e,n))&&("**"===n.path||Gh(t,n,e).matched)}function NT(n,t,e){return 0===t.length&&!n.children[e]}class Yh{constructor(t){this.segmentGroup=t||null}}class BT{constructor(t){this.urlTree=t}}function Rc(n){return La(new Yh(n))}function VT(n){return La(new BT(n))}class JG{constructor(t,e,i,r,s){this.injector=t,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=s,this.allowRedirects=!0}apply(){const t=Wh(this.urlTree.root,[],[],this.config).segmentGroup,e=new Pt(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,Et).pipe(U(s=>this.createUrlTree(Lv(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(os(s=>{if(s instanceof BT)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof Yh?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,Et).pipe(U(r=>this.createUrlTree(Lv(r),t.queryParams,t.fragment))).pipe(os(r=>{throw r instanceof Yh?this.noMatchError(r):r}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,i){const r=t.segments.length>0?new Pt([],{[Et]:t}):t;return new Eo(r,e,i)}expandSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(U(s=>new Pt([],s))):this.expandSegment(t,i,e,i.segments,r,!0)}expandChildren(t,e,i){const r=[];for(const s of Object.keys(i.children))"primary"===s?r.unshift(s):r.push(s);return gn(r).pipe(Da(s=>{const o=i.children[s],a=PT(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(U(l=>({segment:l,outlet:s})))}),nT((s,o)=>(s[o.outlet]=o.segment,s),{}),function j6(n,t){const e=arguments.length>=2;return i=>i.pipe(n?yn((r,s)=>n(r,s,i)):N,bv(1),e?wv(t):iT(()=>new Dc))}())}expandSegment(t,e,i,r,s,o){return gn(i).pipe(Da(a=>this.expandSegmentAgainstRoute(t,e,i,a,r,s,o).pipe(os(c=>{if(c instanceof Yh)return tt(null);throw c}))),Do(a=>!!a),os((a,l)=>{if(a instanceof Dc||"EmptyError"===a.name)return NT(e,r,s)?tt(new Pt([],{})):Rc(e);throw a}))}expandSegmentAgainstRoute(t,e,i,r,s,o,a){return LT(r,e,s,o)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,s,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o):Rc(e):Rc(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,r){const s=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?VT(s):this.lineralizeSegments(i,s).pipe(Pn(o=>{const a=new Pt(o,{});return this.expandSegment(t,a,e,o,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:d}=Gh(e,r,s);if(!a)return Rc(e);const f=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?VT(f):this.lineralizeSegments(r,f).pipe(Pn(w=>this.expandSegment(t,e,i,w.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,i,r,s){if("**"===i.path)return t=RT(i,t),i.loadChildren?(i._loadedRoutes?tt({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(t,i)).pipe(U(f=>(i._loadedRoutes=f.routes,i._loadedInjector=f.injector,new Pt(r,{})))):tt(new Pt(r,{}));const{matched:o,consumedSegments:a,remainingSegments:l}=Gh(e,i,r);return o?(t=RT(i,t),this.getChildConfig(t,i,r).pipe(Pn(d=>{var f;const w=null!==(f=d.injector)&&void 0!==f?f:t,k=d.routes,{segmentGroup:j,slicedSegments:K}=Wh(e,a,l,k),ae=new Pt(j.segments,j.children);if(0===K.length&&ae.hasChildren())return this.expandChildren(w,k,ae).pipe(U(Oe=>new Pt(a,Oe)));if(0===k.length&&0===K.length)return tt(new Pt(a,{}));const ce=Qi(i)===s;return this.expandSegment(w,ae,k,K,ce?Et:s,!0).pipe(U(he=>new Pt(a.concat(he.segments),he.children)))}))):Rc(e)}getChildConfig(t,e,i){return e.children?tt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?tt({routes:e._loadedRoutes,injector:e._loadedInjector}):this.runCanLoadGuards(t,e,i).pipe(Pn(r=>r?this.configLoader.loadChildren(t,e).pipe(wn(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function ZG(n){return La(Dv(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`))}(e))):tt({routes:[],injector:t})}runCanLoadGuards(t,e,i){const r=e.canLoad;return r&&0!==r.length?tt(r.map(o=>{const a=t.get(o);let l;if(function UG(n){return n&&Ns(n.canLoad)}(a))l=a.canLoad(e,i);else{if(!Ns(a))throw new Error("Invalid CanLoad guard");l=a(e,i)}return fr(l)})).pipe(Ic(),wn(o=>{if(!xo(o))return;const a=Dv(`Redirecting to "${this.urlSerializer.serialize(o)}"`);throw a.url=o,a}),U(o=>!0===o)):tt(!0)}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return tt(i);if(r.numberOfChildren>1||!r.children[Et])return La(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t.redirectTo}'`));r=r.children[Et]}}applyRedirectCommands(t,e,i){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreatreUrlTree(t,e,i,r){const s=this.createSegmentGroup(t,e.root,i,r);return new Eo(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return Un(t,(r,s)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[s]=e[a]}else i[s]=r}),i}createSegmentGroup(t,e,i,r){const s=this.createSegments(t,e.segments,i,r);let o={};return Un(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,i,r)}),new Pt(s,o)}createSegments(t,e,i,r){return e.map(s=>s.path.startsWith(":")?this.findPosParam(t,s,r):this.findOrReturn(s,i))}findPosParam(t,e,i){const r=i[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return r}findOrReturn(t,e){let i=0;for(const r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}}function Lv(n){const t={};for(const i of Object.keys(n.children)){const s=Lv(n.children[i]);(s.segments.length>0||s.hasChildren())&&(t[i]=s)}return function eW(n){if(1===n.numberOfChildren&&n.children[Et]){const t=n.children[Et];return new Pt(n.segments.concat(t.segments),t.children)}return n}(new Pt(n.segments,t))}class HT{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Kh{constructor(t,e){this.component=t,this.route=e}}function nW(n,t,e){const i=n._root;return Pc(i,t?t._root:null,e,[i.value])}function Qh(n,t,e){const i=OT(t);return(null!=i?i:e).get(n)}function Pc(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=za(t);return n.children.forEach(o=>{(function rW(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=n.value,o=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function sW(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!Mo(n.url,t.url);case"pathParamsOrQueryParamsChange":return!Mo(n.url,t.url)||!Pr(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Tv(n,t)||!Pr(n.queryParams,t.queryParams);default:return!Tv(n,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new HT(i)):(s.data=o.data,s._resolvedData=o._resolvedData),Pc(n,t,s.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Kh(a.outlet.component,o))}else o&&Oc(t,a,r),r.canActivateChecks.push(new HT(i)),Pc(n,null,s.component?a?a.children:null:e,i,r)})(o,s[o.value.outlet],e,i.concat([o.value]),r),delete s[o.value.outlet]}),Un(s,(o,a)=>Oc(o,e.getContext(a),r)),r}function Oc(n,t,e){const i=za(n),r=n.value;Un(i,(s,o)=>{Oc(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new Kh(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}class pW{}function UT(n){return new J(t=>t.error(n))}class gW{constructor(t,e,i,r,s,o){this.rootComponentType=t,this.config=e,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=s,this.relativeLinkResolution=o}recognize(){const t=Wh(this.urlTree.root,[],[],this.config.filter(o=>void 0===o.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,Et);if(null===e)return null;const i=new Uh([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Et,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new ds(i,e),s=new ET(this.url,r);return this.inheritParamsAndData(s._root),s}inheritParamsAndData(t){const e=t.value,i=DT(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(t,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,i)}processChildren(t,e){const i=[];for(const s of Object.keys(e.children)){const o=e.children[s],a=PT(t,s),l=this.processSegmentGroup(a,o,s);if(null===l)return null;i.push(...l)}const r=zT(i);return function _W(n){n.sort((t,e)=>t.value.outlet===Et?-1:e.value.outlet===Et?1:t.value.outlet.localeCompare(e.value.outlet))}(r),r}processSegment(t,e,i,r){for(const s of t){const o=this.processSegmentAgainstRoute(s,e,i,r);if(null!==o)return o}return NT(e,i,r)?[]:null}processSegmentAgainstRoute(t,e,i,r){var s,o,a,l;if(t.redirectTo||!LT(t,e,i,r))return null;let c,d=[],f=[];if("**"===t.path){const ce=i.length>0?cT(i).parameters:{},Te=GT(e)+i.length;c=new Uh(i,ce,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,qT(t),Qi(t),null!==(o=null!==(s=t.component)&&void 0!==s?s:t._loadedComponent)&&void 0!==o?o:null,t,$T(e),Te,YT(t),Te)}else{const ce=Gh(e,t,i);if(!ce.matched)return null;d=ce.consumedSegments,f=ce.remainingSegments;const Te=GT(e)+d.length;c=new Uh(d,ce.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,qT(t),Qi(t),null!==(l=null!==(a=t.component)&&void 0!==a?a:t._loadedComponent)&&void 0!==l?l:null,t,$T(e),Te,YT(t),Te)}const w=function vW(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(t),{segmentGroup:k,slicedSegments:j}=Wh(e,d,f,w.filter(ce=>void 0===ce.redirectTo),this.relativeLinkResolution);if(0===j.length&&k.hasChildren()){const ce=this.processChildren(w,k);return null===ce?null:[new ds(c,ce)]}if(0===w.length&&0===j.length)return[new ds(c,[])];const K=Qi(t)===r,ae=this.processSegment(w,k,j,K?Et:r);return null===ae?null:[new ds(c,ae)]}}function yW(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function zT(n){const t=[],e=new Set;for(const i of n){if(!yW(i)){t.push(i);continue}const r=t.find(s=>i.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):t.push(i)}for(const i of e){const r=zT(i.children);t.push(new ds(i.value,r))}return t.filter(i=>!e.has(i))}function $T(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function GT(n){var t,e;let i=n,r=null!==(t=i._segmentIndexShift)&&void 0!==t?t:0;for(;i._sourceSegment;)i=i._sourceSegment,r+=null!==(e=i._segmentIndexShift)&&void 0!==e?e:0;return r-1}function qT(n){return n.data||{}}function YT(n){return n.resolve||{}}const Nv=Symbol("RouteTitle");function KT(n){return"string"==typeof n.title||null===n.title}function Zh(n){return Rr(t=>{const e=n(t);return e?gn(e).pipe(U(()=>t)):tt(t)})}class kW extends class SW{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const Bv=new De("ROUTES");let Vv=(()=>{class n{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return tt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=fr(e.loadComponent()).pipe(wn(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),bh(()=>{this.componentLoaders.delete(e)})),r=new yv(i,()=>new ue).pipe(Lh());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return tt({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const s=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(U(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=lT(l.get(Bv,[],at.Self|at.Optional)));return{routes:c.map(Fv),injector:l}}),bh(()=>{this.childrenLoaders.delete(i)})),o=new yv(s,()=>new ue).pipe(Lh());return this.childrenLoaders.set(i,o),o}loadModuleFactoryOrRoutes(e){return fr(e()).pipe(Pn(i=>i instanceof NC||Array.isArray(i)?tt(i):gn(this.compiler.compileModuleAsync(i))))}}return n.\u0275fac=function(e){return new(e||n)(te(Jt),te(Rm))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();class AW{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function RW(n){throw n}function PW(n,t,e){return t.parse("/")}function ZT(n,t){return tt(null)}const OW={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},FW={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ri=(()=>{class n{constructor(e,i,r,s,o,a,l){this.rootComponentType=e,this.urlSerializer=i,this.rootContexts=r,this.location=s,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new ue,this.errorHandler=RW,this.malformedUriErrorHandler=PW,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:ZT,afterPreactivation:ZT},this.urlHandlingStrategy=new AW,this.routeReuseStrategy=new kW,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.configLoader=o.get(Vv),this.configLoader.onLoadEndListener=w=>this.triggerEvent(new Q6(w)),this.configLoader.onLoadStartListener=w=>this.triggerEvent(new K6(w)),this.ngModule=o.get(Ds),this.console=o.get(DN);const f=o.get(et);this.isNgZoneEnabled=f instanceof et&&et.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=function sG(){return new Eo(new Pt([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=CT(this.currentUrlTree,this.rootComponentType),this.transitions=new mi({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var e;return null===(e=this.location.getState())||void 0===e?void 0:e.\u0275routerPageId}setupNavigations(e){const i=this.events;return e.pipe(yn(r=>0!==r.id),U(r=>Object.assign(Object.assign({},r),{extractedUrl:this.urlHandlingStrategy.extract(r.rawUrl)})),Rr(r=>{let s=!1,o=!1;return tt(r).pipe(wn(a=>{this.currentNavigation={id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Rr(a=>{const l=this.browserUrlTree.toString(),c=!this.navigated||a.extractedUrl.toString()!==l||l!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||c)&&this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return XT(a.source)&&(this.browserUrlTree=a.extractedUrl),tt(a).pipe(Rr(f=>{const w=this.transitions.getValue();return i.next(new Cv(f.id,this.serializeUrl(f.extractedUrl),f.source,f.restoredState)),w!==this.transitions.getValue()?Fi:Promise.resolve(f)}),function tW(n,t,e,i){return Rr(r=>function XG(n,t,e,i,r){return new JG(n,t,e,i,r).apply()}(n,t,e,r.extractedUrl,i).pipe(U(s=>Object.assign(Object.assign({},r),{urlAfterRedirects:s}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),wn(f=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:f.urlAfterRedirects})}),function bW(n,t,e,i,r){return Pn(s=>function mW(n,t,e,i,r="emptyOnly",s="legacy"){try{const o=new gW(n,t,e,i,r,s).recognize();return null===o?UT(new pW):tt(o)}catch(o){return UT(o)}}(n,t,s.urlAfterRedirects,e(s.urlAfterRedirects),i,r).pipe(U(o=>Object.assign(Object.assign({},s),{targetSnapshot:o}))))}(this.rootComponentType,this.config,f=>this.serializeUrl(f),this.paramsInheritanceStrategy,this.relativeLinkResolution),wn(f=>{if("eager"===this.urlUpdateStrategy){if(!f.extras.skipLocationChange){const k=this.urlHandlingStrategy.merge(f.urlAfterRedirects,f.rawUrl);this.setBrowserUrl(k,f)}this.browserUrlTree=f.urlAfterRedirects}const w=new $6(f.id,this.serializeUrl(f.extractedUrl),this.serializeUrl(f.urlAfterRedirects),f.targetSnapshot);i.next(w)}));if(c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:w,extractedUrl:k,source:j,restoredState:K,extras:ae}=a,ce=new Cv(w,this.serializeUrl(k),j,K);i.next(ce);const Te=CT(k,this.rootComponentType).snapshot;return tt(Object.assign(Object.assign({},a),{targetSnapshot:Te,urlAfterRedirects:k,extras:Object.assign(Object.assign({},ae),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=a.rawUrl,a.resolve(null),Fi}),Zh(a=>{const{targetSnapshot:l,id:c,extractedUrl:d,rawUrl:f,extras:{skipLocationChange:w,replaceUrl:k}}=a;return this.hooks.beforePreactivation(l,{navigationId:c,appliedUrlTree:d,rawUrlTree:f,skipLocationChange:!!w,replaceUrl:!!k})}),wn(a=>{const l=new G6(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),U(a=>Object.assign(Object.assign({},a),{guards:nW(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function oW(n,t){return Pn(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?tt(Object.assign(Object.assign({},e),{guardsResult:!0})):function aW(n,t,e,i){return gn(n).pipe(Pn(r=>function fW(n,t,e,i,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?tt(s.map(a=>{const l=Qh(a,t,r);let c;if(function GG(n){return n&&Ns(n.canDeactivate)}(l))c=fr(l.canDeactivate(n,t,e,i));else{if(!Ns(l))throw new Error("Invalid CanDeactivate guard");c=fr(l(n,t,e,i))}return c.pipe(Do())})).pipe(Ic()):tt(!0)}(r.component,r.route,e,t,i)),Do(r=>!0!==r,!0))}(o,i,r,n).pipe(Pn(a=>a&&function jG(n){return"boolean"==typeof n}(a)?function lW(n,t,e,i){return gn(t).pipe(Da(r=>nh(function dW(n,t){return null!==n&&t&&t(new Z6(n)),tt(!0)}(r.route.parent,i),function cW(n,t){return null!==n&&t&&t(new J6(n)),tt(!0)}(r.route,i),function hW(n,t,e){const i=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function iW(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(o)).filter(o=>null!==o).map(o=>_c(()=>tt(o.guards.map(l=>{const c=Qh(l,o.node,e);let d;if(function $G(n){return n&&Ns(n.canActivateChild)}(c))d=fr(c.canActivateChild(i,n));else{if(!Ns(c))throw new Error("Invalid CanActivateChild guard");d=fr(c(i,n))}return d.pipe(Do())})).pipe(Ic())));return tt(s).pipe(Ic())}(n,r.path,e),function uW(n,t,e){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return tt(!0);const r=i.map(s=>_c(()=>{const o=Qh(s,t,e);let a;if(function zG(n){return n&&Ns(n.canActivate)}(o))a=fr(o.canActivate(t,n));else{if(!Ns(o))throw new Error("Invalid CanActivate guard");a=fr(o(t,n))}return a.pipe(Do())}));return tt(r).pipe(Ic())}(n,r.route,e))),Do(r=>!0!==r,!0))}(i,s,n,t):tt(a)),U(a=>Object.assign(Object.assign({},e),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),wn(a=>{if(xo(a.guardsResult)){const c=Dv(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw c.url=a.guardsResult,c}const l=new W6(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),yn(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),Zh(a=>{if(a.guards.canActivateChecks.length)return tt(a).pipe(wn(l=>{const c=new q6(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}),Rr(l=>{let c=!1;return tt(l).pipe(function wW(n,t){return Pn(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return tt(e);let s=0;return gn(r).pipe(Da(o=>function CW(n,t,e,i){const r=n.routeConfig,s=n._resolve;return void 0!==(null==r?void 0:r.title)&&!KT(r)&&(s[Nv]=r.title),function DW(n,t,e,i){const r=function EW(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return tt({});const s={};return gn(r).pipe(Pn(o=>function MW(n,t,e,i){const r=Qh(n,t,i);return fr(r.resolve?r.resolve(t,e):r(t,e))}(n[o],t,e,i).pipe(Do(),wn(a=>{s[o]=a}))),bv(1),function U6(n){return U(()=>n)}(s),os(o=>o instanceof Dc?Fi:La(o)))}(s,n,t,i).pipe(U(o=>(n._resolvedData=o,n.data=DT(n,e).resolve,r&&KT(r)&&(n.data[Nv]=r.title),null)))}(o.route,i,n,t)),wn(()=>s++),bv(1),Pn(o=>s===r.length?tt(e):Fi))})}(this.paramsInheritanceStrategy,this.ngModule.injector),wn({next:()=>c=!0,complete:()=>{c||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),wn(l=>{const c=new Y6(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}))}),Zh(a=>{const{targetSnapshot:l,id:c,extractedUrl:d,rawUrl:f,extras:{skipLocationChange:w,replaceUrl:k}}=a;return this.hooks.afterPreactivation(l,{navigationId:c,appliedUrlTree:d,rawUrlTree:f,skipLocationChange:!!w,replaceUrl:!!k})}),Zh(a=>{const l=c=>{var d;const f=[];(null===(d=c.routeConfig)||void 0===d?void 0:d.loadComponent)&&!c.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(c.routeConfig).pipe(wn(w=>{c.component=w}),U(()=>{})));for(const w of c.children)f.push(...l(w));return f};return gv(l(a.targetSnapshot.root)).pipe(wv(),sn(1))}),U(a=>{const l=function DG(n,t,e){const i=Sc(n,t._root,e?e._root:void 0);return new wT(i,t)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return Object.assign(Object.assign({},a),{targetRouterState:l})}),wn(a=>{this.currentUrlTree=a.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(a.urlAfterRedirects,a.rawUrl),this.routerState=a.targetRouterState,"deferred"===this.urlUpdateStrategy&&(a.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,a),this.browserUrlTree=a.urlAfterRedirects)}),((n,t,e)=>U(i=>(new HG(t,i.targetRouterState,i.currentRouterState,e).activate(n),i)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),wn({next(){s=!0},complete(){s=!0}}),bh(()=>{var a;s||o||this.cancelNavigationTransition(r,`Navigation ID ${r.id} is not equal to the current navigation id ${this.navigationId}`),(null===(a=this.currentNavigation)||void 0===a?void 0:a.id)===r.id&&(this.currentNavigation=null)}),os(a=>{if(o=!0,function nG(n){return n&&n[oT]}(a)){const l=xo(a.url);l||(this.navigated=!0,this.restoreHistory(r,!0));const c=new rT(r.id,this.serializeUrl(r.extractedUrl),a.message);if(i.next(c),l){const d=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),f={skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||XT(r.source)};this.scheduleNavigation(d,"imperative",null,f,{resolve:r.resolve,reject:r.reject,promise:r.promise})}else r.resolve(!1)}else{this.restoreHistory(r,!0);const l=new z6(r.id,this.serializeUrl(r.extractedUrl),a);i.next(l);try{r.resolve(this.errorHandler(a))}catch(c){r.reject(c)}}return Fi}))}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}setTransition(e){this.transitions.next(Object.assign(Object.assign({},this.transitions.value),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{var r;const s={replaceUrl:!0},o=null!==(r=e.state)&&void 0!==r&&r.navigationId?e.state:null;if(o){const l=Object.assign({},o);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(s.state=l)}const a=this.parseUrl(e.url);this.scheduleNavigation(a,i,o,s)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){this.config=e.map(Fv),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:a,preserveFragment:l}=i,c=r||this.routerState.root,d=l?this.currentUrlTree.fragment:o;let f=null;switch(a){case"merge":f=Object.assign(Object.assign({},this.currentUrlTree.queryParams),s);break;case"preserve":f=this.currentUrlTree.queryParams;break;default:f=s||null}return null!==f&&(f=this.removeEmptyProps(f)),function xG(n,t,e,i,r){var s;if(0===e.length)return Av(t.root,t.root,t.root,i,r);const a=function SG(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new ST(!0,0,n);let t=0,e=!1;const i=n.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const a={};return Un(s.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,s]},[]);return new ST(e,t,i)}(e);return a.toRoot()?Av(t.root,t.root,new Pt([],{}),i,r):function l(d){var f;const w=function kG(n,t,e,i){return n.isAbsolute?new Iv(t.root,!0,0):-1===i?new Iv(e,e===t.root,0):function TG(n,t,e){let i=n,r=t,s=e;for(;s>r;){if(s-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new Iv(i,!1,r-s)}(e,i+(zh(n.commands[0])?0:1),n.numberOfDoubleDots)}(a,t,null===(f=n.snapshot)||void 0===f?void 0:f._urlSegment,d),k=w.processChildren?$h(w.segmentGroup,w.index,a.commands):kT(w.segmentGroup,w.index,a.commands);return Av(t.root,w.segmentGroup,k,i,r)}(null===(s=n.snapshot)||void 0===s?void 0:s._lastPathIndex)}(c,this.currentUrlTree,e,f,null!=d?d:null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=xo(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,"imperative",null,i)}navigate(e,i={skipLocationChange:!1}){return function LW(n){for(let t=0;t{const s=e[r];return null!=s&&(i[r]=s),i},{})}processNavigations(){this.navigations.subscribe(e=>{var i;this.navigated=!0,this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId,this.events.next(new Ec(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,null===(i=this.titleStrategy)||void 0===i||i.updateTitle(this.routerState.snapshot),e.resolve(!0)},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}scheduleNavigation(e,i,r,s,o){var a,l;if(this.disposed)return Promise.resolve(!1);let c,d,f;o?(c=o.resolve,d=o.reject,f=o.promise):f=new Promise((j,K)=>{c=j,d=K});const w=++this.navigationId;let k;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(r=this.location.getState()),k=r&&r.\u0275routerPageId?r.\u0275routerPageId:s.replaceUrl||s.skipLocationChange?null!==(a=this.browserPageId)&&void 0!==a?a:0:(null!==(l=this.browserPageId)&&void 0!==l?l:0)+1):k=0,this.setTransition({id:w,targetPageId:k,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:s,resolve:c,reject:d,promise:f,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),f.catch(j=>Promise.reject(j))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),s=Object.assign(Object.assign({},i.extras.state),this.generateNgRouterState(i.id,i.targetPageId));this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",s):this.location.go(r,"",s)}restoreHistory(e,i=!1){var r,s;if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(r=this.currentNavigation)||void 0===r?void 0:r.finalUrl)||0===o?this.currentUrlTree===(null===(s=this.currentNavigation)||void 0===s?void 0:s.finalUrl)&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(o)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(e,i){const r=new rT(e.id,this.serializeUrl(e.extractedUrl),i);this.triggerEvent(r),e.resolve(!1)}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return n.\u0275fac=function(e){bs()},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();function XT(n){return"imperative"!==n}let Xh=(()=>{class n{constructor(e,i,r){this.router=e,this.route=i,this.locationStrategy=r,this.commands=null,this.href=null,this.onChanges=new ue,this.subscription=e.events.subscribe(s=>{s instanceof Ec&&this.updateTargetUrlAndHref()})}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:null}ngOnChanges(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(e,i,r,s,o){if(0!==e||i||r||s||o||"string"==typeof this.target&&"_self"!=this.target||null===this.urlTree)return!0;const a={skipLocationChange:ts(this.skipLocationChange),replaceUrl:ts(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,a),!1}updateTargetUrlAndHref(){this.href=null!==this.urlTree?this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:ts(this.preserveFragment)})}}return n.\u0275fac=function(e){return new(e||n)(x(Ri),x($a),x(ya))},n.\u0275dir=Me({type:n,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,i){1&e&&$e("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),2&e&&wt("target",i.target)("href",i.href,Kf)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[cn]}),n})();class JT{buildTitle(t){var e;let i,r=t.root;for(;void 0!==r;)i=null!==(e=this.getResolvedTitleForRoute(r))&&void 0!==e?e:i,r=r.children.find(s=>s.outlet===Et);return i}getResolvedTitleForRoute(t){return t.data[Nv]}}let VW=(()=>{class n extends JT{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(e){return new(e||n)(te(OE))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class eA{}class tA{preload(t,e){return tt(null)}}let nA=(()=>{class n{constructor(e,i,r,s,o){this.router=e,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(yn(e=>e instanceof Ec),Da(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){var r,s,o;const a=[];for(const l of i){l.providers&&!l._injector&&(l._injector=Nd(l.providers,e,`Route: ${l.path}`));const c=null!==(r=l._injector)&&void 0!==r?r:e,d=null!==(s=l._loadedInjector)&&void 0!==s?s:c;l.loadChildren&&!l._loadedRoutes||l.loadComponent&&!l._loadedComponent?a.push(this.preloadConfig(c,l)):(l.children||l._loadedRoutes)&&a.push(this.processRoutes(d,null!==(o=l.children)&&void 0!==o?o:l._loadedRoutes))}return gn(a).pipe(To())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):tt(null);const s=r.pipe(Pn(o=>{var a;return null===o?tt(void 0):(i._loadedRoutes=o.routes,i._loadedInjector=o.injector,this.processRoutes(null!==(a=o.injector)&&void 0!==a?a:e,o.routes))}));return i.loadComponent&&!i._loadedComponent?gn([s,this.loader.loadComponent(i)]).pipe(To()):s})}}return n.\u0275fac=function(e){return new(e||n)(te(Ri),te(Rm),te(Qs),te(eA),te(Vv))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})(),jv=(()=>{class n{constructor(e,i,r={}){this.router=e,this.viewportScroller=i,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration=r.scrollPositionRestoration||"disabled",r.anchorScrolling=r.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof Cv?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ec&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof sT&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.router.triggerEvent(new sT(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(e){bs()},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();const So=new De("ROUTER_CONFIGURATION"),iA=new De("ROUTER_FORROOT_GUARD"),jW=[Vl,{provide:mT,useClass:gT},{provide:Ri,useFactory:function WW(n,t,e,i,r,s,o={},a,l,c,d){const f=new Ri(null,n,t,e,i,r,lT(s));return c&&(f.urlHandlingStrategy=c),d&&(f.routeReuseStrategy=d),f.titleStrategy=null!=l?l:a,function qW(n,t){n.errorHandler&&(t.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(t.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(t.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(t.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(t.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(t.urlUpdateStrategy=n.urlUpdateStrategy),n.canceledNavigationResolution&&(t.canceledNavigationResolution=n.canceledNavigationResolution)}(o,f),f},deps:[mT,Tc,Vl,Jt,Rm,Bv,So,VW,[JT,new Hn],[class TW{},new Hn],[class xW{},new Hn]]},Tc,{provide:$a,useFactory:function YW(n){return n.routerState.root},deps:[Ri]},nA,tA,class HW{preload(t,e){return e().pipe(os(()=>tt(null)))}},{provide:So,useValue:{enableTracing:!1}},Vv];function UW(){return new xD("Router",Ri)}let rA=(()=>{class n{constructor(e,i){}static forRoot(e,i){return{ngModule:n,providers:[jW,sA(e),{provide:iA,useFactory:GW,deps:[[Ri,new Hn,new ir]]},{provide:So,useValue:i||{}},{provide:ya,useFactory:$W,deps:[Bl,[new cd($m),new Hn],So]},{provide:jv,useFactory:zW,deps:[Ri,DV,So]},{provide:eA,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:tA},{provide:xD,multi:!0,useFactory:UW},[Uv,{provide:Am,multi:!0,useFactory:KW,deps:[Uv]},{provide:oA,useFactory:QW,deps:[Uv]},{provide:bD,multi:!0,useExisting:oA}]]}}static forChild(e){return{ngModule:n,providers:[sA(e)]}}}return n.\u0275fac=function(e){return new(e||n)(te(iA,8),te(Ri,8))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();function zW(n,t,e){return e.scrollOffset&&t.setOffset(e.scrollOffset),new jv(n,t,e)}function $W(n,t,e={}){return e.useHash?new hB(n,t):new KD(n,t)}function GW(n){return"guarded"}function sA(n){return[{provide:$I,multi:!0,useValue:n},{provide:Bv,multi:!0,useValue:n}]}let Uv=(()=>{class n{constructor(e){this.injector=e,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new ue}appInitializer(){return this.injector.get(cB,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let i=null;const r=new Promise(a=>i=a),s=this.injector.get(Ri),o=this.injector.get(So);return"disabled"===o.initialNavigation?(s.setUpLocationChangeListener(),i(!0)):"enabledBlocking"===o.initialNavigation?(s.hooks.afterPreactivation=()=>this.initNavigation?tt(null):(this.initNavigation=!0,i(!0),this.resultOfPreactivationDone),s.initialNavigation()):i(!0),r})}bootstrapListener(e){const i=this.injector.get(So),r=this.injector.get(nA),s=this.injector.get(jv),o=this.injector.get(Ri),a=this.injector.get(Ll);e===a.components[0]&&(("enabledNonBlocking"===i.initialNavigation||void 0===i.initialNavigation)&&o.initialNavigation(),r.setUpPreloading(),s.init(),o.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(e){return new(e||n)(te(Jt))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac}),n})();function KW(n){return n.appInitializer.bind(n)}function QW(n){return n.bootstrapListener.bind(n)}const oA=new De("Router Initializer");class XW{constructor(t){this.request=t}}let Or=(()=>{class n{constructor(){this.pages=[{page:"home",caption:"Home"}],this.apiLog=new Array,this.pipelineMap=new Map}cameraIsOnvif(){return void 0!==this.cameraFeatures&&"Onvif"===this.cameraFeatures.CameraType}cameraIsUSB(){return void 0!==this.cameraFeatures&&"USB"===this.cameraFeatures.CameraType}getUSBConfig(){const e=this.inputPixelFormat?this.imageFormats[this.inputPixelFormat]:void 0,i=e&&this.inputImageSize?e.FrameSizes[this.inputImageSize].Size:void 0;return{InputFps:this.inputFps,InputImageSize:i?i.MaxWidth+"x"+i.MaxHeight:void 0,InputPixelFormat:e?e.PixelFormat:void 0,OutputVideoQuality:this.outputVideoQuality}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Fr_mqtt_port=59001,Fr_mqtt_path="/mqtt",Fr_mqtt_topic="incoming/data/edge-video-analytics/inference-event";class Fc{static forUSB(t,e,i){const r=new Fc;return r.usb=i,r.pipeline_name=t,r.pipeline_version=e,r}static forOnvif(t,e,i){const r=new Fc;return r.onvif=i,r.pipeline_name=t,r.pipeline_version=e,r}}const zv="X-CameraApp-Ignore",aA={headers:new Wi({"Content-Type":"application/json; charset=utf-8"})};let Jh=(()=>{class n{constructor(e,i){this.httpClient=e,this.data=i,this.camerasUrl="/api/v2/cameras"}makeCameraUrl(e,i){return`${this.camerasUrl}/${e}${i}`}makePipelineUrl(e,i){return this.makeCameraUrl(e,`/pipeline${i}`)}makeProfileUrl(e,i,r){return this.makeCameraUrl(e,`/profiles/${i}`)+r}makePresetUrl(e,i,r){return this.makeProfileUrl(e,i,"/presets/")+r}updateCameraList(){this.data.cameras=void 0,this.data.cameraMap=void 0,this.httpClient.get(this.camerasUrl).subscribe({next:e=>{this.data.cameras=e,this.data.cameraMap=new Map;for(let i of e)this.data.cameraMap.set(i.name,i);e.length>0?(this.data.selectedCamera=e[0].name,this.updateCameraChanged(this.data.selectedCamera),this.refreshPipelineStatus(this.data.selectedCamera,!0)):this.data.selectedCamera=void 0},error:e=>{this.data.cameras=void 0,this.data.cameraMap=void 0}})}clearCameraInfo(){this.data.selectedProfile=void 0,this.data.profiles=void 0,this.data.selectedPreset=void 0,this.data.presets=void 0,this.data.imageFormats=void 0,this.data.inputPixelFormat=void 0,this.data.inputImageSize=void 0,this.data.cameraFeatures=void 0}updateCameraChanged(e){this.clearCameraInfo(),this.updateCameraFeatures(e)}updateCameraFeatures(e){this.httpClient.get(this.makeCameraUrl(e,"/features")).subscribe({next:i=>{this.data.cameraFeatures=i,this.data.cameraIsOnvif()?this.updateProfiles(e):this.data.cameraIsUSB()?this.updateImageFormats(e):console.log("error, invalid camera type: "+i.CameraType)},error:i=>{}})}updateProfiles(e){this.httpClient.get(this.makeCameraUrl(e,"/profiles")).subscribe({next:i=>{this.data.profiles=i.Profiles,this.data.selectedProfile=i.Profiles.length>0?i.Profiles[0].Token:void 0,this.updatePresets(e,this.data.selectedProfile)},error:i=>{this.data.selectedProfile=void 0,this.data.profiles=void 0}})}updatePresets(e,i){this.httpClient.get(this.makeProfileUrl(e,i,"/presets")).subscribe({next:r=>{this.data.presets=r.Preset,this.data.selectedPreset=r.Preset.length>0?r.Preset[0].Token:void 0},error:r=>{this.data.presets=void 0}})}updateImageFormats(e){this.data.imageFormats=void 0,this.httpClient.get(this.makeCameraUrl(e,"/imageformats")).subscribe({next:i=>{this.data.imageFormats=i.ImageFormats},error:i=>{this.data.imageFormats=void 0}})}gotoPreset(e,i,r){return this.httpClient.post(this.makePresetUrl(e,i,r),"").subscribe()}startOnvifPipeline(e,i,r,s){let o=this.makePipelineUrl(e,"/start"),a=Fc.forOnvif(i,r,{profile_token:s});this.httpClient.post(o,JSON.stringify(a),aA).subscribe(l=>{this.refreshPipelineStatus(this.data.selectedCamera,!0)})}startUSBPipeline(e,i,r,s){let o=this.makePipelineUrl(e,"/start"),a=Fc.forUSB(i,r,s);this.httpClient.post(o,JSON.stringify(a),aA).subscribe(l=>{this.refreshPipelineStatus(this.data.selectedCamera,!0)})}stopPipeline(e,i){let r=this.makePipelineUrl(e,`/stop/${i}`);this.httpClient.post(r,"").subscribe(s=>{this.refreshPipelineStatus(this.data.selectedCamera,!0)})}refreshPipelineStatus(e,i){let r=this.makePipelineUrl(e,"/status"),s={};i&&(s[zv]="true"),this.httpClient.get(r,{headers:new Wi(s)}).subscribe({next:o=>{this.data.pipelineStatus=o},error:o=>{this.data.pipelineStatus=void 0}})}refreshAllPipelineStatuses(){this.httpClient.get("/api/v2/pipelines/status/all",{headers:new Wi({"X-CameraApp-Ignore":"true"})}).subscribe({next:r=>{if(null!=r){for(const s of this.data.pipelineMap.keys())r.hasOwnProperty(s)||(console.log("deleting key:",s),this.data.pipelineMap.delete(s));for(const[s,o]of Object.entries(r)){let a=this.data.pipelineMap.get(s);void 0===a?this.data.pipelineMap.set(s,o):(a.status=o.status,a.info=o.info)}}else this.data.pipelineMap.clear()},error:r=>{this.data.pipelineMap.clear()}})}updatePipelinesList(){this.data.pipelines=void 0,this.httpClient.get("/api/v2/pipelines").subscribe({next:e=>{this.data.pipelines=e.filter(i=>!!this.shouldShowPipeline(i)&&("object_detection/person_vehicle_bike"==`${i.name}/${i.version}`&&(this.data.selectedPipeline="object_detection/person_vehicle_bike"),!0))},error:e=>{this.data.pipelines=void 0}})}shouldShowPipeline(e){return"audio_detection"!==e.name&&"video_decode"!==e.name&&"app_src_dst"!==e.version&&"object_zone_count"!==e.version&&"object_line_crossing"!==e.version}}return n.\u0275fac=function(e){return new(e||n)(te(nc),te(Or))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var JW=ps(841),lA=ps(703);class tq extends ue{constructor(t=1/0,e=1/0,i=E_){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){const{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:s,_windowTime:o}=this;e||(i.push(t),!r&&i.push(s.now()+o)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();const e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,s=r.slice();for(let o=0;onew ue};function cA(n,t=iq){const{connector:e}=t;return Pe((i,r)=>{const s=e();gn(n(function nq(n){return new J(t=>n.subscribe(t))}(s))).subscribe(r),r.add(i.subscribe(s))})}function dA(n,t){const e=ut(n)?n:()=>n;return ut(t)?cA(t,{connector:e}):i=>new yv(i,e)}var Bs=(()=>{return(n=Bs||(Bs={}))[n.CLOSED=0]="CLOSED",n[n.CONNECTING=1]="CONNECTING",n[n.CONNECTED=2]="CONNECTED",Bs;var n})();const $v=new De("NgxMqttServiceConfig"),Gv=new De("NgxMqttClientService");let oq=(()=>{class n{static forRoot(e,i){return{ngModule:n,providers:[{provide:$v,useValue:e},{provide:Gv,useValue:i}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),aq=(()=>{class n{constructor(e,i){this.options=e,this.client=i,this.observables={},this.state=new mi(Bs.CLOSED),this.messages=new ue,this._clientId=this._generateClientId(),this._connectTimeout=1e4,this._reconnectPeriod=1e4,this._url=void 0,this._onConnect=new je,this._onReconnect=new je,this._onClose=new je,this._onOffline=new je,this._onError=new je,this._onEnd=new je,this._onMessage=new je,this._onSuback=new je,this._onPacketsend=new je,this._onPacketreceive=new je,this._handleOnConnect=r=>{!0===this.options.connectOnCreate&&Object.keys(this.observables).forEach(s=>{this.client.subscribe(s)}),this.state.next(Bs.CONNECTED),this._onConnect.emit(r)},this._handleOnReconnect=()=>{!0===this.options.connectOnCreate&&Object.keys(this.observables).forEach(r=>{this.client.subscribe(r)}),this.state.next(Bs.CONNECTING),this._onReconnect.emit()},this._handleOnClose=()=>{this.state.next(Bs.CLOSED),this._onClose.emit()},this._handleOnOffline=()=>{this._onOffline.emit()},this._handleOnError=r=>{this._onError.emit(r),console.error(r)},this._handleOnEnd=()=>{this._onEnd.emit()},this._handleOnMessage=(r,s,o)=>{this._onMessage.emit(o),"publish"===o.cmd&&this.messages.next(o)},this._handleOnPacketsend=r=>{this._onPacketsend.emit()},this._handleOnPacketreceive=r=>{this._onPacketreceive.emit()},!1!==e.connectOnCreate&&this.connect({},i),this.state.subscribe()}get clientId(){return this._clientId}get onConnect(){return this._onConnect}get onReconnect(){return this._onReconnect}get onClose(){return this._onClose}get onOffline(){return this._onOffline}get onError(){return this._onError}get onEnd(){return this._onEnd}get onMessage(){return this._onMessage}get onPacketsend(){return this._onPacketsend}get onPacketreceive(){return this._onPacketreceive}get onSuback(){return this._onSuback}static filterMatchesTopic(e,i){if("#"===e[0]&&"$"===i[0])return!1;const r=(e||"").split("/").reverse(),s=(i||"").split("/").reverse(),o=()=>{const a=r.pop(),l=s.pop();switch(a){case"#":return!0;case"+":return!!l&&o();default:return a===l&&(void 0===a||o())}};return o()}connect(e,i){const r=lA(this.options||{},e),s=r.protocol||"ws",o=r.hostname||"localhost";r.url?this._url=r.url:(this._url=`${s}://${o}`,this._url+=r.port?`:${r.port}`:"",this._url+=r.path?`${r.path}`:""),this.state.next(Bs.CONNECTING);const a=lA({clientId:this._clientId,reconnectPeriod:this._reconnectPeriod,connectTimeout:this._connectTimeout},r);this.client&&this.client.end(!0),this.client=i||(0,JW.connect)(this._url,a),this._clientId=a.clientId,this.client.on("connect",this._handleOnConnect),this.client.on("reconnect",this._handleOnReconnect),this.client.on("close",this._handleOnClose),this.client.on("offline",this._handleOnOffline),this.client.on("error",this._handleOnError),this.client.stream.on("error",this._handleOnError),this.client.on("end",this._handleOnEnd),this.client.on("message",this._handleOnMessage),this.client.on("packetsend",this._handleOnPacketsend),this.client.on("packetreceive",this._handleOnPacketreceive)}disconnect(e=!0){if(!this.client)throw new Error("mqtt client not connected");this.client.end(e)}observeRetained(e,i={qos:1}){return this._generalObserve(e,()=>function rq(n,t,e,i){e&&!ut(e)&&(i=e);const r=ut(e)?e:void 0;return s=>dA(new tq(n,t,i),r)(s)}(1),i)}observe(e,i={qos:1}){return this._generalObserve(e,()=>function sq(n){return n?t=>cA(n)(t):t=>dA(new ue)(t)}(),i)}_generalObserve(e,i,r){if(!this.client)throw new Error("mqtt client not connected");if(!this.observables[e]){const s=new ue;this.observables[e]=function eq(n,t){return new J(e=>{const i=n(),r=t(i);return(r?di(r):Fi).subscribe(e),()=>{i&&i.unsubscribe()}})}(()=>{const o=new X;return this.client.subscribe(e,r,(a,l)=>{l&&l.forEach(c=>{128===c.qos&&(delete this.observables[c.topic],this.client.unsubscribe(c.topic),s.error(`subscription for '${c.topic}' rejected!`)),this._onSuback.emit({filter:e,granted:128!==c.qos})})}),o.add(()=>{delete this.observables[e],this.client.unsubscribe(e)}),o},o=>$n(s,this.messages)).pipe(yn(o=>n.filterMatchesTopic(e,o.topic)),i(),Lh())}return this.observables[e]}publish(e,i,r={}){if(!this.client)throw new Error("mqtt client not connected");return J.create(s=>{this.client.publish(e,i,r,o=>{o?s.error(o):(s.next(null),s.complete())})})}unsafePublish(e,i,r={}){if(!this.client)throw new Error("mqtt client not connected");this.client.publish(e,i,r,s=>{if(s)throw s})}_generateClientId(){return"client-"+Math.random().toString(36).substr(2,19)}}return n.\u0275fac=function(e){return new(e||n)(te($v),te(Gv))},n.\u0275prov=Ie({factory:function(){return new n(te($v),te(Gv))},token:n,providedIn:"root"}),n})(),Wv=(()=>{class n{constructor(e){this._mqttService=e,this.paused=!0,this.eventCount=0}isPaused(){return this.paused}pause(){this.paused||(this.paused=!0,this.unsubscribe())}resume(){this.paused&&(this.paused=!1,this.subscribe())}unsubscribe(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}subscribe(){this.subscription=this._mqttService.observe(Fr_mqtt_topic).subscribe(e=>{this.lastEvent=JSON.parse(e.payload.toString()),this.eventCount++})}}return n.\u0275fac=function(e){return new(e||n)(te(aq))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),lq=(()=>{class n{constructor(e,i){this.httpClient=e,this.data=i}makePtzUrl(e,i,r){return`/api/v2/cameras/${e}/profiles/${i}/ptz${r}`}post(e,i,r){let s=this.makePtzUrl(e,i,r);return this.httpClient.post(s,"").subscribe()}downLeft(e,i){return this.post(e,i,"/down-left")}down(e,i){return this.post(e,i,"/down")}downRight(e,i){return this.post(e,i,"/down-right")}upLeft(e,i){return this.post(e,i,"/up-left")}up(e,i){return this.post(e,i,"/up")}upRight(e,i){return this.post(e,i,"/up-right")}left(e,i){return this.post(e,i,"/left")}right(e,i){return this.post(e,i,"/right")}home(e,i){return this.post(e,i,"/home")}zoomIn(e,i){return this.post(e,i,"/zoom-in")}zoomOut(e,i){return this.post(e,i,"/zoom-out")}}return n.\u0275fac=function(e){return new(e||n)(te(nc),te(Or))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function cq(n,t){if(1&n&&(fe(0,"mat-option",9),Ue(1),we()),2&n){const e=t.$implicit;Ae("value",e.Token),Ee(1),Ln(" ",void 0===e.Name||""===e.Name?e.Token:e.Name," ")}}function dq(n,t){if(1&n){const e=ki();fe(0,"div",4),kt(1,"br"),fe(2,"mat-form-field",5)(3,"mat-label"),Ue(4,"Select Preset"),we(),fe(5,"mat-select",6),$e("ngModelChange",function(r){return Bn(e),Vn(lt().data.selectedPreset=r)}),it(6,cq,2,2,"mat-option",7),we()(),fe(7,"button",8),$e("click",function(){Bn(e);const r=lt();return Vn(r.api.gotoPreset(r.data.selectedCamera,r.data.selectedProfile,r.data.selectedPreset))}),Ue(8," Goto Preset "),we()()}if(2&n){const e=lt();Ee(5),Ae("ngModel",e.data.selectedPreset),Ee(1),Ae("ngForOf",e.data.presets),Ee(1),Ae("disabled",void 0===e.data.selectedPreset)}}let uq=(()=>{class n{constructor(e,i,r){this.data=e,this.ptz=i,this.api=r}ngOnInit(){}ngOnDestroy(){}isPtzDisabled(){return void 0===this.data.cameraFeatures||!1===this.data.cameraFeatures.PTZ}isZoomDisabled(){return void 0===this.data.cameraFeatures||!1===this.data.cameraFeatures.Zoom}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(lq),x(Jh))},n.\u0275cmp=vt({type:n,selectors:[["app-ptz"]],decls:37,vars:12,consts:[["mat-icon-button","",3,"disabled","click"],["mat-icon-button","",3,"disabled"],[1,"center-button"],["class","goto-presets",4,"ngIf"],[1,"goto-presets"],["appearance","fill"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary",1,"preset-button",3,"disabled","click"],[3,"value"]],template:function(e,i){1&e&&(fe(0,"div")(1,"button",0),$e("click",function(){return i.ptz.upLeft(i.data.selectedCamera,i.data.selectedProfile)}),fe(2,"mat-icon"),Ue(3,"north_west"),we()(),fe(4,"button",0),$e("click",function(){return i.ptz.up(i.data.selectedCamera,i.data.selectedProfile)}),fe(5,"mat-icon"),Ue(6,"north"),we()(),fe(7,"button",0),$e("click",function(){return i.ptz.upRight(i.data.selectedCamera,i.data.selectedProfile)}),fe(8,"mat-icon"),Ue(9,"north_east"),we()(),fe(10,"button",0),$e("click",function(){return i.ptz.zoomIn(i.data.selectedCamera,i.data.selectedProfile)}),fe(11,"mat-icon"),Ue(12,"zoom_in"),we()()(),fe(13,"div")(14,"button",0),$e("click",function(){return i.ptz.left(i.data.selectedCamera,i.data.selectedProfile)}),fe(15,"mat-icon"),Ue(16,"west"),we()(),fe(17,"button",1)(18,"mat-icon",2),Ue(19,"circle"),we()(),fe(20,"button",0),$e("click",function(){return i.ptz.right(i.data.selectedCamera,i.data.selectedProfile)}),fe(21,"mat-icon"),Ue(22,"east"),we()(),fe(23,"button",0),$e("click",function(){return i.ptz.zoomOut(i.data.selectedCamera,i.data.selectedProfile)}),fe(24,"mat-icon"),Ue(25,"zoom_out"),we()()(),fe(26,"div")(27,"button",0),$e("click",function(){return i.ptz.downLeft(i.data.selectedCamera,i.data.selectedProfile)}),fe(28,"mat-icon"),Ue(29,"south_west"),we()(),fe(30,"button",0),$e("click",function(){return i.ptz.down(i.data.selectedCamera,i.data.selectedProfile)}),fe(31,"mat-icon"),Ue(32,"south"),we()(),fe(33,"button",0),$e("click",function(){return i.ptz.downRight(i.data.selectedCamera,i.data.selectedProfile)}),fe(34,"mat-icon"),Ue(35,"south_east"),we()()(),it(36,dq,9,3,"div",3)),2&e&&(Ee(1),Ae("disabled",i.isPtzDisabled()),Ee(3),Ae("disabled",i.isPtzDisabled()),Ee(3),Ae("disabled",i.isPtzDisabled()),Ee(3),Ae("disabled",i.isZoomDisabled()),Ee(4),Ae("disabled",i.isPtzDisabled()),Ee(3),Ae("disabled",!0),Ee(3),Ae("disabled",i.isPtzDisabled()),Ee(3),Ae("disabled",i.isZoomDisabled()),Ee(4),Ae("disabled",i.isPtzDisabled()),Ee(3),Ae("disabled",i.isPtzDisabled()),Ee(3),Ae("disabled",i.isPtzDisabled()),Ee(3),Ae("ngIf",null!=i.data.presets&&i.data.presets.length>0))},dependencies:[ao,zi,ex,Xg,Aa,GS,ch,Eh,xk,Y_],styles:[".mat-icon-button[_ngcontent-%COMP%]{width:auto;height:auto;margin:5px}.material-icons[_ngcontent-%COMP%]{zoom:2}.preset-button[_ngcontent-%COMP%]{margin:10px}.center-button[_ngcontent-%COMP%]{color:transparent;background-color:transparent}"]}),n})(),hq=0;const qv=new De("CdkAccordion");let fq=(()=>{class n{constructor(){this._stateChanges=new ue,this._openCloseAllActions=new ue,this.id="cdk-accordion-"+hq++,this._multi=!1}get multi(){return this._multi}set multi(e){this._multi=rt(e)}openAll(){this._multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[Xe([{provide:qv,useExisting:n}]),cn]}),n})(),pq=0,mq=(()=>{class n{constructor(e,i,r){this.accordion=e,this._changeDetectorRef=i,this._expansionDispatcher=r,this._openCloseAllSubscription=X.EMPTY,this.closed=new je,this.opened=new je,this.destroyed=new je,this.expandedChange=new je,this.id="cdk-accordion-child-"+pq++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((s,o)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===o&&this.id!==s&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}get expanded(){return this._expanded}set expanded(e){e=rt(e),this._expanded!==e&&(this._expanded=e,this.expandedChange.emit(e),e?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){this._disabled=rt(e)}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}}return n.\u0275fac=function(e){return new(e||n)(x(qv,12),x(en),x(Q_))},n.\u0275dir=Me({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Xe([{provide:qv,useValue:void 0}])]}),n})(),gq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();const _q=["body"];function vq(n,t){}const yq=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],bq=["mat-expansion-panel-header","*","mat-action-row"];function wq(n,t){1&n&&kt(0,"span",2),2&n&&Ae("@indicatorRotate",lt()._getExpandedState())}const Cq=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Dq=["mat-panel-title","mat-panel-description","*"],Yv=new De("MAT_ACCORDION"),uA="225ms cubic-bezier(0.4,0.0,0.2,1)",hA={indicatorRotate:jn("indicatorRotate",[zt("collapsed, void",Qe({transform:"rotate(0deg)"})),zt("expanded",Qe({transform:"rotate(180deg)"})),Wt("expanded <=> collapsed, void => collapsed",Zt(uA))]),bodyExpansion:jn("bodyExpansion",[zt("collapsed, void",Qe({height:"0px",visibility:"hidden"})),zt("expanded",Qe({height:"*",visibility:"visible"})),Wt("expanded <=> collapsed, void => collapsed",Zt(uA))])},fA=new De("MAT_EXPANSION_PANEL");let Eq=(()=>{class n{constructor(e,i){this._template=e,this._expansionPanel=i}}return n.\u0275fac=function(e){return new(e||n)(x(_n),x(fA,8))},n.\u0275dir=Me({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]}),n})(),Mq=0;const pA=new De("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let Kv=(()=>{class n extends mq{constructor(e,i,r,s,o,a,l){super(e,i,r),this._viewContainerRef=s,this._animationMode=a,this._hideToggle=!1,this.afterExpand=new je,this.afterCollapse=new je,this._inputChanges=new ue,this._headerId="mat-expansion-panel-header-"+Mq++,this._bodyAnimationDone=new ue,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(k_((c,d)=>c.fromState===d.fromState&&c.toState===d.toState)).subscribe(c=>{"void"!==c.fromState&&("expanded"===c.toState?this.afterExpand.emit():"collapsed"===c.toState&&this.afterCollapse.emit())}),l&&(this.hideToggle=l.hideToggle)}get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=rt(e)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Qn(null),yn(()=>this.expanded&&!this._portal),sn(1)).subscribe(()=>{this._portal=new mc(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const e=this._document.activeElement,i=this._body.nativeElement;return e===i||i.contains(e)}return!1}}return n.\u0275fac=function(e){return new(e||n)(x(Yv,12),x(en),x(Q_),x(An),x(ct),x(fn,8),x(pA,8))},n.\u0275cmp=vt({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(e,i,r){if(1&e&&It(r,Eq,5),2&e){let s;Ge(s=We())&&(i._lazyContent=s.first)}},viewQuery:function(e,i){if(1&e&&Gt(_q,5),2&e){let r;Ge(r=We())&&(i._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,i){2&e&&At("mat-expanded",i.expanded)("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[Xe([{provide:Yv,useValue:void 0},{provide:fA,useExisting:n}]),Le,cn],ngContentSelectors:bq,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(e,i){1&e&&(Fn(yq),Tt(0),fe(1,"div",0,1),$e("@bodyExpansion.done",function(s){return i._bodyAnimationDone.next(s)}),fe(3,"div",2),Tt(4,1),it(5,vq,0,0,"ng-template",3),we(),Tt(6,2),we()),2&e&&(Ee(1),Ae("@bodyExpansion",i._getExpandedState())("id",i.id),wt("aria-labelledby",i._headerId),Ee(4),Ae("cdkPortalOutlet",i._portal))},dependencies:[Ra],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[hA.bodyExpansion]},changeDetection:0}),n})();class xq{}const Sq=yo(xq);let Qv=(()=>{class n extends Sq{constructor(e,i,r,s,o,a,l){super(),this.panel=e,this._element=i,this._focusMonitor=r,this._changeDetectorRef=s,this._animationMode=a,this._parentChangeSubscription=X.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(yn(d=>!(!d.hideToggle&&!d.togglePosition))):Fi;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=$n(e.opened,e.closed,c,e._inputChanges.pipe(yn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(yn(()=>e._containsFocus())).subscribe(()=>r.focusVia(i,"program")),o&&(this.expandedHeight=o.expandedHeight,this.collapsedHeight=o.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:gi(e)||(e.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e))}}focus(e,i){e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return n.\u0275fac=function(e){return new(e||n)(x(Kv,1),x(Je),x(hr),x(en),x(pA,8),x(fn,8),ii("tabindex"))},n.\u0275cmp=vt({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&$e("click",function(){return i._toggle()})("keydown",function(s){return i._keydown(s)}),2&e&&(wt("id",i.panel._headerId)("tabindex",i.tabIndex)("aria-controls",i._getPanelId())("aria-expanded",i._isExpanded())("aria-disabled",i.panel.disabled),Hi("height",i._getHeaderHeight()),At("mat-expanded",i._isExpanded())("mat-expansion-toggle-indicator-after","after"===i._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===i._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{tabIndex:"tabIndex",expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},features:[Le],ngContentSelectors:Dq,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,i){1&e&&(Fn(Cq),fe(0,"span",0),Tt(1),Tt(2,1),Tt(3,2),we(),it(4,wq,1,1,"span",1)),2&e&&(Ee(4),Ae("ngIf",i._showToggle()))},dependencies:[zi],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-program-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled=true])::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;border:3px solid;border-radius:4px;content:""}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[hA.indicatorRotate]},changeDetection:0}),n})(),mA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),n})(),gA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),n})(),_A=(()=>{class n extends fq{constructor(){super(...arguments),this._ownHeaders=new ma,this._hideToggle=!1,this.displayMode="default",this.togglePosition="after"}get hideToggle(){return this._hideToggle}set hideToggle(e){this._hideToggle=rt(e)}ngAfterContentInit(){this._headers.changes.pipe(Qn(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(i=>i.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new Wu(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(e){this._keyManager.onKeydown(e)}_handleHeaderFocus(e){this._keyManager.updateActiveItem(e)}ngOnDestroy(){super.ngOnDestroy(),this._ownHeaders.destroy()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Mt(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["mat-accordion"]],contentQueries:function(e,i,r){if(1&e&&It(r,Qv,5),2&e){let s;Ge(s=We())&&(i._headers=s)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(e,i){2&e&&At("mat-accordion-multi",i.multi)},inputs:{multi:"multi",hideToggle:"hideToggle",displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],features:[Xe([{provide:Yv,useExisting:n}]),Le]}),n})(),kq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[pi,ht,gq,Os]}),n})();function Tq(n,t){if(1&n&&(fe(0,"mat-chip-list",5)(1,"mat-chip",6),Ue(2),we()()),2&n){const e=lt().$implicit;Ee(1),Ae("ngClass",e.response.ok?"ok-chip":"bad-chip"),Ee(1),El("",e.response.status,": ",e.response.statusText,"")}}function Aq(n,t){if(1&n&&(fe(0,"pre"),Ue(1),Jr(2,"json"),we()),2&n){const e=lt().$implicit;Ee(1),Kn(so(2,1,e.response.body))}}function Iq(n,t){if(1&n&&(fe(0,"pre"),Ue(1),Jr(2,"json"),we()),2&n){const e=lt().$implicit;Ee(1),Kn(so(2,1,e.response.error))}}function Rq(n,t){if(1&n&&(fe(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-chip-list",1)(4,"mat-chip",2),Ue(5),we()()(),fe(6,"mat-panel-description")(7,"span"),Ue(8),we()(),it(9,Tq,3,3,"mat-chip-list",3),we(),it(10,Aq,3,3,"pre",4),it(11,Iq,3,3,"pre",4),we()),2&n){const e=t.$implicit;Ee(4),Ae("ngClass","GET"===e.request.method?"request-get":"POST"===e.request.method?"request-post":""),Ee(1),Kn(e.request.method),Ee(3),Kn(e.request.url),Ee(1),Ae("ngIf",void 0!==e.response),Ee(1),Ae("ngIf",void 0!==e.response&&void 0!==e.response.body),Ee(1),Ae("ngIf",void 0!==e.response&&void 0!==e.response.error)}}let Pq=(()=>{class n{constructor(e){this.data=e}ngOnInit(){}ngOnDestroy(){}}return n.\u0275fac=function(e){return new(e||n)(x(Or))},n.\u0275cmp=vt({type:n,selectors:[["app-api-log"]],decls:2,vars:1,consts:[[4,"ngFor","ngForOf"],["selectable","false"],[1,"request-method",3,"ngClass"],["class","response-chips","selectable","false",4,"ngIf"],[4,"ngIf"],["selectable","false",1,"response-chips"],[3,"ngClass"]],template:function(e,i){1&e&&(fe(0,"mat-accordion"),it(1,Rq,12,6,"mat-expansion-panel",0),we()),2&e&&(Ee(1),Ae("ngForOf",i.data.apiLog))},dependencies:[eg,ao,zi,uh,Ia,_A,Kv,Qv,gA,mA,ru],styles:[".mat-expansion-panel-header-title[_ngcontent-%COMP%]{flex-grow:0}.mat-expansion-panel-header-description[_ngcontent-%COMP%]{text-align:left}.response-chips[_ngcontent-%COMP%]{margin-right:20px;flex:none}.request-method[_ngcontent-%COMP%]{width:60px;margin-right:10px;flex:none}.request-post[_ngcontent-%COMP%]{background-color:#0288d1;color:#fff}.request-get[_ngcontent-%COMP%]{background-color:#00838f;color:#fff;flex:none}.ok-chip[_ngcontent-%COMP%]{background-color:#09af00;color:#fff}.bad-chip[_ngcontent-%COMP%]{background-color:#c62828;color:#fff}pre[_ngcontent-%COMP%]{overflow-x:auto}"]}),n})();function Oq(n,t){if(1&n&&(fe(0,"mat-chip")(1,"mat-icon"),Ue(2),we(),fe(3,"span"),Ue(4),Jr(5,"number"),we()()),2&n){const e=t.$implicit,i=lt(2);Ee(2),Ln(" ",i.labelToIcon(e.detection.label)," "),Ee(2),Ln("",vm(5,2,100*e.detection.confidence,"2.0-0"),"%")}}function Fq(n,t){if(1&n&&(fe(0,"div")(1,"h3"),Ue(2),we(),fe(3,"div")(4,"mat-chip-list",1),it(5,Oq,6,5,"mat-chip",2),we()(),fe(6,"pre"),Ue(7),Jr(8,"json"),we()()),2&n){const e=lt();Ee(2),Ln("",e.eventService.eventCount," Total Events"),Ee(3),Ae("ngForOf",e.eventService.lastEvent.objects),Ee(2),Kn(so(8,3,e.eventService.lastEvent))}}let Lq=(()=>{class n{constructor(e,i){this.data=e,this.eventService=i}ngOnInit(){}ngOnDestroy(){}labelToIcon(e){switch(e){case"vehicle":return"directions_car";case"bicycle":return"pedal_bike";default:return e}}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(Wv))},n.\u0275cmp=vt({type:n,selectors:[["app-inference-events"]],decls:1,vars:1,consts:[[4,"ngIf"],["selectable","false"],[4,"ngFor","ngForOf"]],template:function(e,i){1&e&&it(0,Fq,9,5,"div",0),2&e&&Ae("ngIf",void 0!==i.eventService.lastEvent)},dependencies:[ao,zi,uh,Ia,Eh,ru,ng]}),n})();function Nq(n,t){if(1&n&&(fe(0,"mat-option",6),Ue(1),we()),2&n){const e=t.$implicit;ca("value",e.name),Ee(1),Ln(" ",e.name," ")}}function Bq(n,t){if(1&n&&(fe(0,"mat-option",6),Ue(1),we()),2&n){const e=t.$implicit;ca("value",e.Token),Ee(1),sm(" ",e.Token," (",e.VideoEncoderConfiguration.Resolution.Width,"x",e.VideoEncoderConfiguration.Resolution.Height," ",e.VideoEncoderConfiguration.Encoding," @ ",e.VideoEncoderConfiguration.RateControl.FrameRateLimit," fps) ")}}function Vq(n,t){if(1&n){const e=ki();fe(0,"div")(1,"mat-form-field",0)(2,"mat-label"),Ue(3,"Select a video stream"),we(),fe(4,"mat-select",1),$e("valueChange",function(r){return Bn(e),Vn(lt().data.selectedProfile=r)})("valueChange",function(r){return Bn(e),Vn(lt().profileSelectionChanged(r))}),it(5,Bq,2,6,"mat-option",2),we()()()}if(2&n){const e=lt();Ee(4),Ae("value",e.data.selectedProfile),Ee(1),Ae("ngForOf",e.data.profiles)}}function Hq(n,t){if(1&n&&(fe(0,"mat-option",6),Ue(1),we()),2&n){const e=t.$implicit;ca("value",t.index),Ee(1),Kn(e.PixelFormat)}}function jq(n,t){if(1&n){const e=ki();fe(0,"div")(1,"mat-form-field",0)(2,"mat-label"),Ue(3,"Select image format (optional)"),we(),fe(4,"mat-select",1),$e("valueChange",function(r){return Bn(e),Vn(lt().data.inputPixelFormat=r)})("valueChange",function(r){return Bn(e),Vn(lt().pixelSelectionChanged(r))}),it(5,Hq,2,2,"mat-option",2),we()()()}if(2&n){const e=lt();Ee(4),Ae("value",e.data.inputPixelFormat),Ee(1),Ae("ngForOf",e.data.imageFormats)}}function Uq(n,t){if(1&n&&(fe(0,"mat-option",6),Ue(1),we()),2&n){const e=t.$implicit;ca("value",t.index),Ee(1),El(" ",e.Size.MaxWidth,"x",e.Size.MaxHeight," ")}}function zq(n,t){if(1&n){const e=ki();fe(0,"div")(1,"mat-form-field",0)(2,"mat-label"),Ue(3,"Select image resolution (optional)"),we(),fe(4,"mat-select",1),$e("valueChange",function(r){return Bn(e),Vn(lt().data.inputImageSize=r)}),it(5,Uq,2,3,"mat-option",2),we()()()}if(2&n){const e=lt();Ee(4),Ae("value",e.data.inputImageSize),Ee(1),Ae("ngForOf",e.data.imageSizes)}}function $q(n,t){if(1&n&&(fe(0,"mat-option",6),Ue(1),we()),2&n){const e=t.$implicit;nm("value","",e.name,"/",e.version,""),Ee(1),El(" ",e.name," - ",e.version," ")}}let Gq=(()=>{class n{constructor(e,i,r){this.data=e,this.api=i,this.eventService=r}ngOnInit(){this.api.updateCameraList(),this.api.updatePipelinesList()}ngOnDestroy(){}cameraSelectionChanged(e){this.api.updateCameraChanged(e),this.api.refreshPipelineStatus(e,!0)}pixelSelectionChanged(e){this.data.imageSizes=this.data.imageFormats[e].FrameSizes}profileSelectionChanged(e){this.api.updatePresets(this.data.selectedCamera,e)}startPipeline(){const e=this.data.selectedPipeline.split("/");this.data.cameraIsOnvif()?this.api.startOnvifPipeline(this.data.selectedCamera,e[0],e[1],this.data.selectedProfile):this.api.startUSBPipeline(this.data.selectedCamera,e[0],e[1],this.data.getUSBConfig())}shouldDisablePipeline(){return void 0===this.data.selectedCamera||void 0===this.data.selectedProfile&&this.data.cameraIsOnvif()||void 0!==this.data.pipelineMap[this.data.selectedCamera]&&"RUNNING"===this.data.pipelineMap[this.data.selectedCamera].status.state}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(Jh),x(Wv))},n.\u0275cmp=vt({type:n,selectors:[["app-camera-selector"]],decls:17,vars:8,consts:[["appearance","fill"],[3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["appearance","fill",1,"pipeline-picker"],["mat-raised-button","",1,"start-button",3,"disabled","click"],[3,"value"]],template:function(e,i){1&e&&(fe(0,"div")(1,"mat-form-field",0)(2,"mat-label"),Ue(3,"Select a camera"),we(),fe(4,"mat-select",1),$e("valueChange",function(s){return i.data.selectedCamera=s})("valueChange",function(s){return i.cameraSelectionChanged(s)}),it(5,Nq,2,2,"mat-option",2),we()()(),it(6,Vq,6,2,"div",3),it(7,jq,6,2,"div",3),it(8,zq,6,2,"div",3),fe(9,"div")(10,"mat-form-field",4)(11,"mat-label"),Ue(12,"Select a pipeline"),we(),fe(13,"mat-select",1),$e("valueChange",function(s){return i.data.selectedPipeline=s}),it(14,$q,2,4,"mat-option",2),we()(),fe(15,"button",5),$e("click",function(){return i.startPipeline()}),Ue(16," Start Pipeline "),we()()),2&e&&(Ee(4),Ae("value",i.data.selectedCamera),Ee(1),Ae("ngForOf",i.data.cameras),Ee(1),Ae("ngIf",i.data.cameraIsOnvif()),Ee(1),Ae("ngIf",i.data.cameraIsUSB()),Ee(1),Ae("ngIf",i.data.cameraIsUSB()&&void 0!==i.data.inputPixelFormat),Ee(5),Ae("value",i.data.selectedPipeline),Ee(1),Ae("ngForOf",i.data.pipelines),Ee(1),Ae("disabled",i.shouldDisablePipeline()))},dependencies:[ao,zi,Aa,GS,ch,xk,Y_],styles:["button[_ngcontent-%COMP%]{width:auto;height:auto}.material-icons[_ngcontent-%COMP%]{zoom:2}mat-form-field[_ngcontent-%COMP%]{width:600px}.pipeline-picker[_ngcontent-%COMP%]{width:471px}.start-button[_ngcontent-%COMP%]{margin-left:10px;vertical-align:top;margin-top:10px}.start-button[_ngcontent-%COMP%]:enabled{background-color:#09af00;color:#fff}"]}),n})();function Wq(n,t){if(1&n&&(fe(0,"mat-chip"),Ue(1),Jr(2,"number"),we()),2&n){const e=lt().$implicit;Ee(1),Ln(" ",vm(2,1,e.value.status.avg_fps,"2.0-0")," FPS ")}}function qq(n,t){if(1&n){const e=ki();fe(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-chip-list",1)(4,"mat-chip"),Ue(5),we()()(),fe(6,"mat-panel-description")(7,"span"),Ue(8),we()(),fe(9,"mat-chip-list",1)(10,"mat-chip"),Ue(11),we(),it(12,Wq,3,4,"mat-chip",2),fe(13,"button",3),$e("click",function(){const s=Bn(e).$implicit;return Vn(lt().api.stopPipeline(s.value.camera,s.value.info.id))}),fe(14,"mat-icon"),Ue(15,"stop"),we()()()(),fe(16,"pre"),Ue(17),Jr(18,"json"),we()()}if(2&n){const e=t.$implicit;Ee(5),Ln(" Pipeline ",e.value.info.id," "),Ee(3),rm("",e.value.camera," - ",e.value.info.name,"/",e.value.info.version,""),Ee(2),om("state-",e.value.status.state,""),Ee(1),Ln(" ",e.value.status.state," "),Ee(1),Ae("ngIf","RUNNING"===e.value.status.state),Ee(5),Kn(so(18,10,e.value))}}let Yq=(()=>{class n{constructor(e,i,r){this.data=e,this.api=i,this.ref=r}ngOnInit(){}ngOnDestroy(){}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(Jh),x(en))},n.\u0275cmp=vt({type:n,selectors:[["app-all-pipelines"]],decls:3,vars:3,consts:[[4,"ngFor","ngForOf"],["selectable","false"],[4,"ngIf"],["mat-icon-button","","color","warn",1,"stop-button",3,"click"]],template:function(e,i){1&e&&(fe(0,"mat-accordion"),it(1,qq,19,12,"mat-expansion-panel",0),Jr(2,"keyvalue"),we()),2&e&&(Ee(1),Ae("ngForOf",so(2,1,i.data.pipelineMap)))},dependencies:[ao,zi,Aa,uh,Ia,Eh,_A,Kv,Qv,gA,mA,ru,ng,fE],styles:[".state-RUNNING[_ngcontent-%COMP%]{background-color:#09af00;color:#fff}.state-QUEUED[_ngcontent-%COMP%]{background-color:#00838f;color:#fff}.state-ERROR[_ngcontent-%COMP%]{background-color:#c62828;color:#fff}button[_ngcontent-%COMP%]{width:auto;height:auto}.stop-button[_ngcontent-%COMP%]{margin-right:10px}"]}),n})();function Kq(n,t){1&n&&(fe(0,"mat-card")(1,"mat-card-title"),Ue(2,"Running Pipelines"),we(),fe(3,"mat-card-content"),kt(4,"app-all-pipelines"),we()())}function Qq(n,t){if(1&n){const e=ki();fe(0,"button",5),$e("click",function(){return Bn(e),Vn(lt().eventService.pause())}),Ue(1,"Pause Events "),we()}}function Zq(n,t){if(1&n){const e=ki();fe(0,"button",6),$e("click",function(){return Bn(e),Vn(lt().eventService.resume())}),Ue(1,"Stream Events "),we()}}const Xq=[{path:"",redirectTo:"home",pathMatch:"full"},{path:"home",component:(()=>{class n{constructor(e,i,r){this.data=e,this.api=i,this.eventService=r,this.data.currentPage="home"}ngOnInit(){this.interval=setInterval(()=>{this.api.refreshAllPipelineStatuses()},1e3)}ngOnDestroy(){clearInterval(this.interval)}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(Jh),x(Wv))},n.\u0275cmp=vt({type:n,selectors:[["app-home"]],decls:29,vars:3,consts:[[1,"jumbotron","bg-image-home"],[1,"text-justify"],[4,"ngIf"],["mat-button","","class","pause-events",3,"click",4,"ngIf"],["mat-button","","class","stream-events",3,"click",4,"ngIf"],["mat-button","",1,"pause-events",3,"click"],["mat-button","",1,"stream-events",3,"click"]],template:function(e,i){1&e&&(fe(0,"mat-grid-tile-header")(1,"div",0)(2,"h1"),Ue(3,"Camera Management"),we(),fe(4,"p",1),Ue(5," This is the landing page for the Camera Management Reference Implementation. "),we()(),fe(6,"mat-card")(7,"mat-card-title"),Ue(8,"Camera Position"),we(),fe(9,"mat-card-content"),kt(10,"app-ptz"),we()(),fe(11,"mat-card")(12,"mat-card-title"),Ue(13,"Camera"),we(),fe(14,"mat-card-content"),kt(15,"app-camera-selector"),we()(),it(16,Kq,5,0,"mat-card",2),fe(17,"mat-card")(18,"mat-card-title"),Ue(19,"API Log"),we(),fe(20,"mat-card-content"),kt(21,"app-api-log"),we()(),fe(22,"mat-card")(23,"mat-card-title"),Ue(24," Inference Events "),it(25,Qq,2,0,"button",3),it(26,Zq,2,0,"button",4),we(),fe(27,"mat-card-content"),kt(28,"app-inference-events"),we()()()),2&e&&(Ee(16),Ae("ngIf",null!=i.data.pipelineMap&&i.data.pipelineMap.size>0),Ee(9),Ae("ngIf",!i.eventService.isPaused()),Ee(1),Ae("ngIf",i.eventService.isPaused()))},dependencies:[zi,Aa,Tz,Sz,kz,F$,L$,uq,Pq,Lq,Gq,Yq],styles:[".material-icons[_ngcontent-%COMP%]{font-size:32px;zoom:2}.pause-events[_ngcontent-%COMP%]{margin-left:10px;background-color:#ffbd3a}.stream-events[_ngcontent-%COMP%]{margin-left:10px;background-color:#188729;color:#fff}"]}),n})(),pathMatch:"full"},{path:"**",redirectTo:"home"}];let Jq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[rA.forRoot(Xq,{scrollPositionRestoration:"enabled"}),rA]}),n})();function eY(n,t){if(1&n){const e=ki();fe(0,"a",6),$e("click",function(){const s=Bn(e).$implicit;return Vn(lt().data.currentPage=s.page)}),Ue(1),Jr(2,"uppercase"),we()}if(2&n){const e=t.$implicit;Ae("active",lt().data.currentPage==e.page)("routerLink",e.page),Ee(1),Ln(" ",so(2,3,e.caption)," ")}}let tY=(()=>{class n{constructor(e,i){this.data=e,this.bo=i,this.title="Camera Management UI",this.navbarCollapseShow=!1,i.observe("(prefers-color-scheme: dark)").subscribe(r=>{this.useDarkTheme=r.matches})}get useDarkTheme(){return this.darkTheme}set useDarkTheme(e){this.darkTheme=e,e?document.body.classList.add("dark-theme"):document.body.classList.remove("dark-theme")}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(_v))},n.\u0275cmp=vt({type:n,selectors:[["app-root"]],decls:8,vars:3,consts:[["mat-tab-nav-bar","","backgroundColor","primary",1,"mat-elevation-z8"],["routerLink","home",1,"mat-tab-link",3,"click"],["mat-icon-button","","type","button",3,"title","click"],["role","img","aria-hidden","true"],["mat-tab-link","",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","main"],["mat-tab-link","",3,"active","routerLink","click"]],template:function(e,i){1&e&&(fe(0,"nav",0)(1,"a",1),$e("click",function(){return i.data.currentPage="home"}),we(),fe(2,"button",2),$e("click",function(){return i.useDarkTheme=!i.useDarkTheme}),fe(3,"mat-icon",3),Ue(4),we()(),it(5,eY,3,5,"a",4),we(),fe(6,"main",5),kt(7,"router-outlet"),we()),2&e&&(Ee(2),Td("title","Switch to ",i.useDarkTheme?"light":"dark"," theme"),Ee(2),Ln(" ",i.useDarkTheme?"light_mode":"dark_mode"," "),Ee(1),Ae("ngForOf",i.data.pages))},dependencies:[ao,Aa,Eh,Yk,Kk,Pv,Xh,hE],styles:[".mat-tab-link[_ngcontent-%COMP%]{padding-top:35px;padding-bottom:35px}"]}),n})(),nY=(()=>{class n{constructor(e,i){this.data=e,this.snackbar=i}intercept(e,i){if(e.headers.has(zv))return i.handle(e);let r=new XW(e);for(this.data.apiLog.unshift(r);this.data.apiLog.length>5;)this.data.apiLog.pop();return i.handle(e).pipe(wn(s=>(s instanceof tc&&(r.response=s),s),s=>{s instanceof l_&&(r.response=s,this.snackbar.open(`${s.status} ${s.statusText}\n${s.error.substring(0,60)}...`,"",{duration:2500,panelClass:["mat-toolbar","mat-warn","error-snackbar"]}))}))}}return n.\u0275fac=function(e){return new(e||n)(te(Or),te(B6))},n.\u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const iY={hostname:window.location.hostname,port:Fr_mqtt_port,path:Fr_mqtt_path};let rY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n,bootstrap:[tY]}),n.\u0275inj=qe({providers:[{provide:d_,useClass:nY,multi:!0}],imports:[PE,aj,h3,f3,T3,ZU,oh,Az,zz,x8,d$,I$,dh,B$,Q$,W8,h5,hz,j5,K5,c4,Sk,b4,D4,t6,C6,D6,eT,Jq,kk,kq,oq.forRoot(iY)]}),n})();(function UN(){FD=!1})(),KV().bootstrapModule(rY).catch(n=>console.error(n))},841:(js,Wa,ps)=>{js.exports=function V(X,re,T){function S(m,y){if(!re[m]){if(!X[m]){if(R)return R(m,!0);var _=new Error("Cannot find module '"+m+"'");throw _.code="MODULE_NOT_FOUND",_}var I=re[m]={exports:{}};X[m][0].call(I.exports,function(z){return S(X[m][1][z]||z)},I,I.exports,V,X,re,T)}return re[m].exports}for(var R=void 0,D=0;D0?Q-4:Q;for(Y=0;Y>16&255,oe[de++]=F>>8&255,oe[de++]=255&F;return 2===G&&(F=S[O.charCodeAt(Y)]<<2|S[O.charCodeAt(Y+1)]>>4,oe[de++]=255&F),1===G&&(F=S[O.charCodeAt(Y)]<<10|S[O.charCodeAt(Y+1)]<<4|S[O.charCodeAt(Y+2)]>>2,oe[de++]=F>>8&255,oe[de++]=255&F),oe},re.fromByteArray=function M(O){for(var F,B=O.length,Q=B%3,G=[],de=0,le=B-Q;dele?le:de+16383));return 1===Q?G.push(T[(F=O[B-1])>>2]+T[F<<4&63]+"=="):2===Q&&G.push(T[(F=(O[B-2]<<8)+O[B-1])>>10]+T[F>>4&63]+T[F<<2&63]+"="),G.join("")};for(var T=[],S=[],R="undefined"!=typeof Uint8Array?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,y=D.length;m0)throw new Error("Invalid string. Length must be a multiple of 4");var B=O.indexOf("=");return-1===B&&(B=F),[B,B===F?0:4-B%4]}function C(O){return T[O>>18&63]+T[O>>12&63]+T[O>>6&63]+T[63&O]}function P(O,F,B){for(var G=[],oe=F;oeD)throw new RangeError('The value "'+h+'" is invalid for option "size"');var u=new Uint8Array(h);return u.__proto__=v.prototype,u}function v(h,u,p){if("number"==typeof h){if("string"==typeof u)throw new TypeError('The "string" argument must be of type string. Received type number');return C(h)}return _(h,u,p)}function _(h,u,p){if("string"==typeof h)return function P(h,u){if(("string"!=typeof u||""===u)&&(u="utf8"),!v.isEncoding(u))throw new TypeError("Unknown encoding: "+u);var p=0|G(h,u),L=y(p),Z=L.write(h,u);return Z!==p&&(L=L.slice(0,Z)),L}(h,u);if(ArrayBuffer.isView(h))return M(h);if(null==h)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if(ne(h,ArrayBuffer)||h&&ne(h.buffer,ArrayBuffer))return function O(h,u,p){if(u<0||h.byteLength=D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");return 0|h}function G(h,u){if(v.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||ne(h,ArrayBuffer))return h.byteLength;if("string"!=typeof h)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof h);var p=h.length,L=arguments.length>2&&!0===arguments[2];if(!L&&0===p)return 0;for(var Z=!1;;)switch(u){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Re(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*p;case"hex":return p>>>1;case"base64":return b(h).length;default:if(Z)return L?-1:Re(h).length;u=(""+u).toLowerCase(),Z=!0}}function oe(h,u,p){var L=!1;if((void 0===u||u<0)&&(u=0),u>this.length||((void 0===p||p>this.length)&&(p=this.length),p<=0)||(p>>>=0)<=(u>>>=0))return"";for(h||(h="utf8");;)switch(h){case"hex":return Pe(this,u,p);case"utf8":case"utf-8":return ge(this,u,p);case"ascii":return Ye(this,u,p);case"latin1":case"binary":return Ne(this,u,p);case"base64":return Ce(this,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,u,p);default:if(L)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),L=!0}}function de(h,u,p){var L=h[u];h[u]=h[p],h[p]=L}function le(h,u,p,L,Z){if(0===h.length)return-1;if("string"==typeof p?(L=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),A(p=+p)&&(p=Z?0:h.length-1),p<0&&(p=h.length+p),p>=h.length){if(Z)return-1;p=h.length-1}else if(p<0){if(!Z)return-1;p=0}if("string"==typeof u&&(u=v.from(u,L)),v.isBuffer(u))return 0===u.length?-1:Y(h,u,p,L,Z);if("number"==typeof u)return u&=255,"function"==typeof Uint8Array.prototype.indexOf?Z?Uint8Array.prototype.indexOf.call(h,u,p):Uint8Array.prototype.lastIndexOf.call(h,u,p):Y(h,[u],p,L,Z);throw new TypeError("val must be string, number or Buffer")}function Y(h,u,p,L,Z){var Vt,me=1,Se=h.length,Ze=u.length;if(void 0!==L&&("ucs2"===(L=String(L).toLowerCase())||"ucs-2"===L||"utf16le"===L||"utf-16le"===L)){if(h.length<2||u.length<2)return-1;me=2,Se/=2,Ze/=2,p/=2}function yt(_i,Oi){return 1===me?_i[Oi]:_i.readUInt16BE(Oi*me)}if(Z){var nn=-1;for(Vt=p;VtSe&&(p=Se-Ze),Vt=p;Vt>=0;Vt--){for(var Bt=!0,zn=0;znZ&&(L=Z):L=Z;var me=u.length;L>me/2&&(L=me/2);for(var Se=0;Se>8,me.push(p%256),me.push(L);return me}(u,h.length-p),h,p,L)}function Ce(h,u,p){return S.fromByteArray(0===u&&p===h.length?h:h.slice(u,p))}function ge(h,u,p){p=Math.min(h.length,p);for(var L=[],Z=u;Z239?4:me>223?3:me>191?2:1;if(Z+Ze<=p)switch(Ze){case 1:me<128&&(Se=me);break;case 2:128==(192&(yt=h[Z+1]))&&(Bt=(31&me)<<6|63&yt)>127&&(Se=Bt);break;case 3:Vt=h[Z+2],128==(192&(yt=h[Z+1]))&&128==(192&Vt)&&(Bt=(15&me)<<12|(63&yt)<<6|63&Vt)>2047&&(Bt<55296||Bt>57343)&&(Se=Bt);break;case 4:Vt=h[Z+2],nn=h[Z+3],128==(192&(yt=h[Z+1]))&&128==(192&Vt)&&128==(192&nn)&&(Bt=(15&me)<<18|(63&yt)<<12|(63&Vt)<<6|63&nn)>65535&&Bt<1114112&&(Se=Bt)}null===Se?(Se=65533,Ze=1):Se>65535&&(L.push((Se-=65536)>>>10&1023|55296),Se=56320|1023&Se),L.push(Se),Z+=Ze}return function ue(h){var u=h.length;if(u<=4096)return String.fromCharCode.apply(String,h);for(var p="",L=0;Lp&&(u+=" ... "),""},v.prototype.compare=function(u,p,L,Z,me){if(ne(u,Uint8Array)&&(u=v.from(u,u.offset,u.byteLength)),!v.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(void 0===p&&(p=0),void 0===L&&(L=u?u.length:0),void 0===Z&&(Z=0),void 0===me&&(me=this.length),p<0||L>u.length||Z<0||me>this.length)throw new RangeError("out of range index");if(Z>=me&&p>=L)return 0;if(Z>=me)return-1;if(p>=L)return 1;if(this===u)return 0;for(var Se=(me>>>=0)-(Z>>>=0),Ze=(L>>>=0)-(p>>>=0),yt=Math.min(Se,Ze),Vt=this.slice(Z,me),nn=u.slice(p,L),Bt=0;Bt>>=0,isFinite(L)?(L>>>=0,void 0===Z&&(Z="utf8")):(Z=L,L=void 0)}var me=this.length-p;if((void 0===L||L>me)&&(L=me),u.length>0&&(L<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");Z||(Z="utf8");for(var Se=!1;;)switch(Z){case"hex":return H(this,u,p,L);case"utf8":case"utf-8":return N(this,u,p,L);case"ascii":return E(this,u,p,L);case"latin1":case"binary":return se(this,u,p,L);case"base64":return J(this,u,p,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,u,p,L);default:if(Se)throw new TypeError("Unknown encoding: "+Z);Z=(""+Z).toLowerCase(),Se=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ye(h,u,p){var L="";p=Math.min(h.length,p);for(var Z=u;ZL)&&(p=L);for(var Z="",me=u;mep)throw new RangeError("Trying to access beyond buffer length")}function U(h,u,p,L,Z,me){if(!v.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>Z||uh.length)throw new RangeError("Index out of range")}function ee(h,u,p,L,Z,me){if(p+L>h.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function be(h,u,p,L,Z){return u=+u,p>>>=0,Z||ee(h,0,p,4),R.write(h,u,p,L,23,4),p+4}function xe(h,u,p,L,Z){return u=+u,p>>>=0,Z||ee(h,0,p,8),R.write(h,u,p,L,52,8),p+8}v.prototype.slice=function(u,p){var L=this.length;(u=~~u)<0?(u+=L)<0&&(u=0):u>L&&(u=L),(p=void 0===p?L:~~p)<0?(p+=L)<0&&(p=0):p>L&&(p=L),p>>=0,p>>>=0,L||ve(u,p,this.length);for(var Z=this[u],me=1,Se=0;++Se>>=0,p>>>=0,L||ve(u,p,this.length);for(var Z=this[u+--p],me=1;p>0&&(me*=256);)Z+=this[u+--p]*me;return Z},v.prototype.readUInt8=function(u,p){return u>>>=0,p||ve(u,1,this.length),this[u]},v.prototype.readUInt16LE=function(u,p){return u>>>=0,p||ve(u,2,this.length),this[u]|this[u+1]<<8},v.prototype.readUInt16BE=function(u,p){return u>>>=0,p||ve(u,2,this.length),this[u]<<8|this[u+1]},v.prototype.readUInt32LE=function(u,p){return u>>>=0,p||ve(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+16777216*this[u+3]},v.prototype.readUInt32BE=function(u,p){return u>>>=0,p||ve(u,4,this.length),16777216*this[u]+(this[u+1]<<16|this[u+2]<<8|this[u+3])},v.prototype.readIntLE=function(u,p,L){u>>>=0,p>>>=0,L||ve(u,p,this.length);for(var Z=this[u],me=1,Se=0;++Se=(me*=128)&&(Z-=Math.pow(2,8*p)),Z},v.prototype.readIntBE=function(u,p,L){u>>>=0,p>>>=0,L||ve(u,p,this.length);for(var Z=p,me=1,Se=this[u+--Z];Z>0&&(me*=256);)Se+=this[u+--Z]*me;return Se>=(me*=128)&&(Se-=Math.pow(2,8*p)),Se},v.prototype.readInt8=function(u,p){return u>>>=0,p||ve(u,1,this.length),128&this[u]?-1*(255-this[u]+1):this[u]},v.prototype.readInt16LE=function(u,p){u>>>=0,p||ve(u,2,this.length);var L=this[u]|this[u+1]<<8;return 32768&L?4294901760|L:L},v.prototype.readInt16BE=function(u,p){u>>>=0,p||ve(u,2,this.length);var L=this[u+1]|this[u]<<8;return 32768&L?4294901760|L:L},v.prototype.readInt32LE=function(u,p){return u>>>=0,p||ve(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},v.prototype.readInt32BE=function(u,p){return u>>>=0,p||ve(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},v.prototype.readFloatLE=function(u,p){return u>>>=0,p||ve(u,4,this.length),R.read(this,u,!0,23,4)},v.prototype.readFloatBE=function(u,p){return u>>>=0,p||ve(u,4,this.length),R.read(this,u,!1,23,4)},v.prototype.readDoubleLE=function(u,p){return u>>>=0,p||ve(u,8,this.length),R.read(this,u,!0,52,8)},v.prototype.readDoubleBE=function(u,p){return u>>>=0,p||ve(u,8,this.length),R.read(this,u,!1,52,8)},v.prototype.writeUIntLE=function(u,p,L,Z){u=+u,p>>>=0,L>>>=0,Z||U(this,u,p,L,Math.pow(2,8*L)-1,0);var Se=1,Ze=0;for(this[p]=255&u;++Ze>>=0,L>>>=0,Z||U(this,u,p,L,Math.pow(2,8*L)-1,0);var Se=L-1,Ze=1;for(this[p+Se]=255&u;--Se>=0&&(Ze*=256);)this[p+Se]=u/Ze&255;return p+L},v.prototype.writeUInt8=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,1,255,0),this[p]=255&u,p+1},v.prototype.writeUInt16LE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,2,65535,0),this[p]=255&u,this[p+1]=u>>>8,p+2},v.prototype.writeUInt16BE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,2,65535,0),this[p]=u>>>8,this[p+1]=255&u,p+2},v.prototype.writeUInt32LE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,4,4294967295,0),this[p+3]=u>>>24,this[p+2]=u>>>16,this[p+1]=u>>>8,this[p]=255&u,p+4},v.prototype.writeUInt32BE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,4,4294967295,0),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=255&u,p+4},v.prototype.writeIntLE=function(u,p,L,Z){if(u=+u,p>>>=0,!Z){var me=Math.pow(2,8*L-1);U(this,u,p,L,me-1,-me)}var Se=0,Ze=1,yt=0;for(this[p]=255&u;++Se>0)-yt&255;return p+L},v.prototype.writeIntBE=function(u,p,L,Z){if(u=+u,p>>>=0,!Z){var me=Math.pow(2,8*L-1);U(this,u,p,L,me-1,-me)}var Se=L-1,Ze=1,yt=0;for(this[p+Se]=255&u;--Se>=0&&(Ze*=256);)u<0&&0===yt&&0!==this[p+Se+1]&&(yt=1),this[p+Se]=(u/Ze>>0)-yt&255;return p+L},v.prototype.writeInt8=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,1,127,-128),u<0&&(u=255+u+1),this[p]=255&u,p+1},v.prototype.writeInt16LE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,2,32767,-32768),this[p]=255&u,this[p+1]=u>>>8,p+2},v.prototype.writeInt16BE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,2,32767,-32768),this[p]=u>>>8,this[p+1]=255&u,p+2},v.prototype.writeInt32LE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,4,2147483647,-2147483648),this[p]=255&u,this[p+1]=u>>>8,this[p+2]=u>>>16,this[p+3]=u>>>24,p+4},v.prototype.writeInt32BE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=255&u,p+4},v.prototype.writeFloatLE=function(u,p,L){return be(this,u,p,!0,L)},v.prototype.writeFloatBE=function(u,p,L){return be(this,u,p,!1,L)},v.prototype.writeDoubleLE=function(u,p,L){return xe(this,u,p,!0,L)},v.prototype.writeDoubleBE=function(u,p,L){return xe(this,u,p,!1,L)},v.prototype.copy=function(u,p,L,Z){if(!v.isBuffer(u))throw new TypeError("argument should be a Buffer");if(L||(L=0),!Z&&0!==Z&&(Z=this.length),p>=u.length&&(p=u.length),p||(p=0),Z>0&&Z=this.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("sourceEnd out of bounds");Z>this.length&&(Z=this.length),u.length-p=0;--Se)u[Se+p]=this[Se+L];else Uint8Array.prototype.set.call(u,this.subarray(L,Z),p);return me},v.prototype.fill=function(u,p,L,Z){if("string"==typeof u){if("string"==typeof p?(Z=p,p=0,L=this.length):"string"==typeof L&&(Z=L,L=this.length),void 0!==Z&&"string"!=typeof Z)throw new TypeError("encoding must be a string");if("string"==typeof Z&&!v.isEncoding(Z))throw new TypeError("Unknown encoding: "+Z);if(1===u.length){var me=u.charCodeAt(0);("utf8"===Z&&me<128||"latin1"===Z)&&(u=me)}}else"number"==typeof u&&(u&=255);if(p<0||this.length>>=0,L=void 0===L?this.length:L>>>0,u||(u=0),"number"==typeof u)for(Se=p;Se55295&&p<57344){if(!Z){if(p>56319){(u-=3)>-1&&me.push(239,191,189);continue}if(Se+1===L){(u-=3)>-1&&me.push(239,191,189);continue}Z=p;continue}if(p<56320){(u-=3)>-1&&me.push(239,191,189),Z=p;continue}p=65536+(Z-55296<<10|p-56320)}else Z&&(u-=3)>-1&&me.push(239,191,189);if(Z=null,p<128){if((u-=1)<0)break;me.push(p)}else if(p<2048){if((u-=2)<0)break;me.push(p>>6|192,63&p|128)}else if(p<65536){if((u-=3)<0)break;me.push(p>>12|224,p>>6&63|128,63&p|128)}else{if(!(p<1114112))throw new Error("Invalid code point");if((u-=4)<0)break;me.push(p>>18|240,p>>12&63|128,p>>6&63|128,63&p|128)}}return me}function b(h){return S.toByteArray(function $(h){if((h=(h=h.split("=")[0]).trim().replace(ie,"")).length<2)return"";for(;h.length%4!=0;)h+="=";return h}(h))}function q(h,u,p,L){for(var Z=0;Z=u.length||Z>=h.length);++Z)u[Z+p]=h[Z];return Z}function ne(h,u){return h instanceof u||null!=h&&null!=h.constructor&&null!=h.constructor.name&&h.constructor.name===u.name}function A(h){return h!=h}}).call(this)}).call(this,V("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:5}],4:[function(V,X,re){"use strict";var R,T="object"==typeof Reflect?Reflect:null,S=T&&"function"==typeof T.apply?T.apply:function(Y,H,N){return Function.prototype.apply.call(Y,H,N)};R=T&&"function"==typeof T.ownKeys?T.ownKeys:Object.getOwnPropertySymbols?function(Y){return Object.getOwnPropertyNames(Y).concat(Object.getOwnPropertySymbols(Y))}:function(Y){return Object.getOwnPropertyNames(Y)};var m=Number.isNaN||function(Y){return Y!=Y};function y(){y.init.call(this)}X.exports=y,X.exports.once=function G(le,Y){return new Promise(function(H,N){function E(J){le.removeListener(Y,se),N(J)}function se(){"function"==typeof le.removeListener&&le.removeListener("error",E),H([].slice.call(arguments))}de(le,Y,se,{once:!0}),"error"!==Y&&function oe(le,Y,H){"function"==typeof le.on&&de(le,"error",Y,H)}(le,E,{once:!0})})},y.EventEmitter=y,y.prototype._events=void 0,y.prototype._eventsCount=0,y.prototype._maxListeners=void 0;var v=10;function _(le){if("function"!=typeof le)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof le)}function I(le){return void 0===le._maxListeners?y.defaultMaxListeners:le._maxListeners}function z(le,Y,H,N){var E,se,J;if(_(H),void 0===(se=le._events)?(se=le._events=Object.create(null),le._eventsCount=0):(void 0!==se.newListener&&(le.emit("newListener",Y,H.listener?H.listener:H),se=le._events),J=se[Y]),void 0===J)J=se[Y]=H,++le._eventsCount;else if("function"==typeof J?J=se[Y]=N?[H,J]:[J,H]:N?J.unshift(H):J.push(H),(E=I(le))>0&&J.length>E&&!J.warned){J.warned=!0;var pe=new Error("Possible EventEmitter memory leak detected. "+J.length+" "+String(Y)+" listeners added. Use emitter.setMaxListeners() to increase limit");pe.name="MaxListenersExceededWarning",pe.emitter=le,pe.type=Y,pe.count=J.length,function D(le){console&&console.warn&&console.warn(le)}(pe)}return le}function C(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P(le,Y,H){var N={fired:!1,wrapFn:void 0,target:le,type:Y,listener:H},E=C.bind(N);return E.listener=H,N.wrapFn=E,E}function M(le,Y,H){var N=le._events;if(void 0===N)return[];var E=N[Y];return void 0===E?[]:"function"==typeof E?H?[E.listener||E]:[E]:H?function Q(le){for(var Y=new Array(le.length),H=0;H0&&(J=H[0]),J instanceof Error)throw J;var pe=new Error("Unhandled error."+(J?" ("+J.message+")":""));throw pe.context=J,pe}var Ce=se[Y];if(void 0===Ce)return!1;if("function"==typeof Ce)S(Ce,this,H);else{var ge=Ce.length,Fe=F(Ce,ge);for(N=0;N=0;J--)if(N[J]===H||N[J].listener===H){pe=N[J].listener,se=J;break}if(se<0)return this;0===se?N.shift():function B(le,Y){for(;Y+1=0;E--)this.removeListener(Y,H[E]);return this},y.prototype.listeners=function(Y){return M(this,Y,!0)},y.prototype.rawListeners=function(Y){return M(this,Y,!1)},y.listenerCount=function(le,Y){return"function"==typeof le.listenerCount?le.listenerCount(Y):O.call(le,Y)},y.prototype.listenerCount=O,y.prototype.eventNames=function(){return this._eventsCount>0?R(this._events):[]}},{}],5:[function(V,X,re){re.read=function(T,S,R,D,m){var y,v,_=8*m-D-1,I=(1<<_)-1,z=I>>1,C=-7,P=R?m-1:0,M=R?-1:1,O=T[S+P];for(P+=M,y=O&(1<<-C)-1,O>>=-C,C+=_;C>0;y=256*y+T[S+P],P+=M,C-=8);for(v=y&(1<<-C)-1,y>>=-C,C+=D;C>0;v=256*v+T[S+P],P+=M,C-=8);if(0===y)y=1-z;else{if(y===I)return v?NaN:1/0*(O?-1:1);v+=Math.pow(2,D),y-=z}return(O?-1:1)*v*Math.pow(2,y-D)},re.write=function(T,S,R,D,m,y){var v,_,I,z=8*y-m-1,C=(1<>1,M=23===m?Math.pow(2,-24)-Math.pow(2,-77):0,O=D?0:y-1,F=D?1:-1,B=S<0||0===S&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(_=isNaN(S)?1:0,v=C):(v=Math.floor(Math.log(S)/Math.LN2),S*(I=Math.pow(2,-v))<1&&(v--,I*=2),(S+=v+P>=1?M/I:M*Math.pow(2,1-P))*I>=2&&(v++,I/=2),v+P>=C?(_=0,v=C):v+P>=1?(_=(S*I-1)*Math.pow(2,m),v+=P):(_=S*Math.pow(2,P-1)*Math.pow(2,m),v=0));m>=8;T[R+O]=255&_,O+=F,_/=256,m-=8);for(v=v<0;T[R+O]=255&v,O+=F,v/=256,z-=8);T[R+O-F]|=128*B}},{}],6:[function(V,X,re){function T(R){return!!R.constructor&&"function"==typeof R.constructor.isBuffer&&R.constructor.isBuffer(R)}X.exports=function(R){return null!=R&&(T(R)||function S(R){return"function"==typeof R.readFloatLE&&"function"==typeof R.slice&&T(R.slice(0,0))}(R)||!!R._isBuffer)}},{}],7:[function(V,X,re){(function(T,S){(function(){"use strict";var R=V("events").EventEmitter,D=V("./store"),m=V("mqtt-packet"),y=V("readable-stream").Writable,v=V("inherits"),_=V("reinterval"),I=V("./validations"),z=V("xtend"),C=V("debug")("mqttjs:client"),P=T?T.nextTick:function(N){setTimeout(N,0)},M=S.setImmediate||function(N){P(N)},O={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},F=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],B={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function G(N,E,se){C("sendPacket :: packet: %O",E),C("sendPacket :: emitting `packetsend`"),N.emit("packetsend",E),C("sendPacket :: writing to stream");var J=m.writeToStream(E,N.stream,N.options);C("sendPacket :: writeToStream result %s",J),!J&&se?(C("sendPacket :: handle events on `drain` once through callback."),N.stream.once("drain",se)):se&&(C("sendPacket :: invoking cb"),se())}function oe(N){N&&(C("flush: queue exists? %b",!!N),Object.keys(N).forEach(function(E){"function"==typeof N[E].cb&&(N[E].cb(new Error("Connection closed")),delete N[E])}))}function le(N,E,se,J){C("storeAndSend :: store packet with cmd %s to outgoingStore",E.cmd),N.outgoingStore.put(E,function(Ce){if(Ce)return se&&se(Ce);J(),G(N,E,se)})}function Y(N){C("nop ::",N)}function H(N,E){var se,J=this;if(!(this instanceof H))return new H(N,E);for(se in this.options=E||{},O)this.options[se]=void 0===this.options[se]?O[se]:E[se];C("MqttClient :: options.protocol",E.protocol),C("MqttClient :: options.protocolVersion",E.protocolVersion),C("MqttClient :: options.username",E.username),C("MqttClient :: options.keepalive",E.keepalive),C("MqttClient :: options.reconnectPeriod",E.reconnectPeriod),C("MqttClient :: options.rejectUnauthorized",E.rejectUnauthorized),this.options.clientId="string"==typeof E.clientId?E.clientId:function Q(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}(),C("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=5===E.protocolVersion&&E.customHandleAcks?E.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=N,this.outgoingStore=E.outgoingStore||new D,this.incomingStore=E.incomingStore||new D,this.queueQoSZero=void 0===E.queueQoSZero||E.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this.nextId=Math.max(1,Math.floor(65535*Math.random())),this.outgoing={},this._firstConnection=!0,this.on("connect",function(){var pe=this.queue;C("connect :: sending queued packets"),function Ce(){var ge=pe.shift();C("deliver :: entry %o",ge);var Fe=null;!ge||(C("deliver :: call _sendPacket for %o",Fe=ge.packet),J._sendPacket(Fe,function(ue){ge.cb&&ge.cb(ue),Ce()}))}()}),this.on("close",function(){C("close :: connected set to `false`"),this.connected=!1,C("close :: clearing connackTimer"),clearTimeout(this.connackTimer),C("close :: clearing ping timer"),null!==J.pingTimer&&(J.pingTimer.clear(),J.pingTimer=null),C("close :: calling _setupReconnect"),this._setupReconnect()}),R.call(this),C("MqttClient :: setting up stream"),this._setupStream()}v(H,R),H.prototype._setupStream=function(){var N,E=this,se=new y,J=m.parser(this.options),pe=null,Ce=[];function ge(){if(Ce.length)P(Fe);else{var Ne=pe;pe=null,Ne()}}function Fe(){C("work :: getting next packet in queue");var Ne=Ce.shift();if(Ne)C("work :: packet pulled from queue"),E._handlePacket(Ne,ge);else{C("work :: no packets in queue");var Pe=pe;pe=null,C("work :: done flag is %s",!!Pe),Pe&&Pe()}}if(C("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),C("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),J.on("packet",function(Ne){C("parser :: on packet push to packets array."),Ce.push(Ne)}),se._write=function(Ne,Pe,_e){pe=_e,C("writable stream :: parsing buffer"),J.parse(Ne),Fe()},C("_setupStream :: pipe stream to writable stream"),this.stream.pipe(se),this.stream.on("error",function ue(Ne){C("streamErrorHandler :: error",Ne.message),F.includes(Ne.code)?(C("streamErrorHandler :: emitting error"),E.emit("error",Ne)):Y(Ne)}),this.stream.on("close",function(){C("(%s)stream :: on close",E.options.clientId),function de(N){N&&(C("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(N).forEach(function(E){N[E].volatile&&"function"==typeof N[E].cb&&(N[E].cb(new Error("Connection closed")),delete N[E])}))}(E.outgoing),C("stream: emit close to MqttClient"),E.emit("close")}),C("_setupStream: sending packet `connect`"),(N=Object.create(this.options)).cmd="connect",G(this,N),J.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return E.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket&&G(this,z({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){C("!!connectTimeout hit!! Calling _cleanUp with force `true`"),E._cleanUp(!0)},this.options.connectTimeout)},H.prototype._handlePacket=function(N,E){var se=this.options;if(5===se.protocolVersion&&se.properties&&se.properties.maximumPacketSize&&se.properties.maximumPacketSizeCe.properties.topicAliasMaximum||!Ce.properties.topicAliasMaximum&&se.properties.topicAlias))&&delete pe.properties.topicAlias),C("publish :: qos",se.qos),se.qos){case 1:case 2:this.outgoing[pe.messageId]={volatile:!1,cb:J||Y},this._storeProcessing?(C("_storeProcessing enabled"),this._packetIdsDuringStoreProcessing[pe.messageId]=!1,this._storePacket(pe,void 0,se.cbStorePut)):(C("MqttClient:publish: packet cmd: %s",pe.cmd),this._sendPacket(pe,void 0,se.cbStorePut));break;default:this._storeProcessing?(C("_storeProcessing enabled"),this._storePacket(pe,J,se.cbStorePut)):(C("MqttClient:publish: packet cmd: %s",pe.cmd),this._sendPacket(pe,J,se.cbStorePut))}return this},H.prototype.subscribe=function(){for(var N,E=new Array(arguments.length),se=0;se0){var U={qos:ve.qos};5===Ne&&(U.nl=ve.nl||!1,U.rap=ve.rap||!1,U.rh=ve.rh||0,U.properties=ve.properties),Ye._resubscribeTopics[ve.topic]=U,_e.push(ve.topic)}}),Ye.messageIdToTopic[N.messageId]=_e}return this.outgoing[N.messageId]={volatile:!0,cb:function(ve,U){if(!ve)for(var ee=U.granted,be=0;be{C("end :: finish :: calling process.nextTick on closeStores"),P(pe.bind(J))},E)}return C("end :: (%s)",this.options.clientId),(null==N||"boolean"!=typeof N)&&(se=E||Y,E=N,N=!1,"object"!=typeof E&&(se=E,E=null,"function"!=typeof se&&(se=Y))),"object"!=typeof E&&(se=E,E=null),C("end :: cb? %s",!!se),se=se||Y,this.disconnecting?(se(),this):(this._clearReconnect(),this.disconnecting=!0,!N&&Object.keys(this.outgoing).length>0?(C("end :: (%s) :: calling finish in 10ms once outgoing is empty",J.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,Ce,10))):(C("end :: (%s) :: immediately calling finish",J.options.clientId),Ce()),this)},H.prototype.removeOutgoingMessage=function(N){var E=this.outgoing[N]?this.outgoing[N].cb:null;return delete this.outgoing[N],this.outgoingStore.del({messageId:N},function(){E(new Error("Message removed"))}),this},H.prototype.reconnect=function(N){C("client reconnect");var E=this,se=function(){N?(E.options.incomingStore=N.incomingStore,E.options.outgoingStore=N.outgoingStore):(E.options.incomingStore=null,E.options.outgoingStore=null),E.incomingStore=E.options.incomingStore||new D,E.outgoingStore=E.options.outgoingStore||new D,E.disconnecting=!1,E.disconnected=!1,E._deferredReconnect=null,E._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=se:se(),this},H.prototype._reconnect=function(){C("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),C("client already connected. disconnecting first.")):(C("_reconnect: calling _setupStream"),this._setupStream())},H.prototype._setupReconnect=function(){var N=this;!N.disconnecting&&!N.reconnectTimer&&N.options.reconnectPeriod>0?(this.reconnecting||(C("_setupReconnect :: emit `offline` state"),this.emit("offline"),C("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),C("_setupReconnect :: setting reconnectTimer for %d ms",N.options.reconnectPeriod),N.reconnectTimer=setInterval(function(){C("reconnectTimer :: reconnect triggered!"),N._reconnect()},N.options.reconnectPeriod)):C("_setupReconnect :: doing nothing...")},H.prototype._clearReconnect=function(){C("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},H.prototype._cleanUp=function(N,E){var se=arguments[2];if(E&&(C("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",E)),C("_cleanUp :: forced? %s",N),N)0===this.options.reconnectPeriod&&this.options.clean&&oe(this.outgoing),C("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{var J=z({cmd:"disconnect"},se);C("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(J,M.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(C("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(C("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),E&&!this.connected&&(C("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",E),E())},H.prototype._sendPacket=function(N,E,se){if(C("_sendPacket :: (%s) :: start",this.options.clientId),se=se||Y,!this.connected)return C("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(N,E,se);switch(this._shiftPingInterval(),N.cmd){case"publish":break;case"pubrel":return void le(this,N,E,se);default:return void G(this,N,E)}switch(N.qos){case 2:case 1:le(this,N,E,se);break;default:G(this,N,E)}C("_sendPacket :: (%s) :: end",this.options.clientId)},H.prototype._storePacket=function(N,E,se){C("_storePacket :: packet: %o",N),C("_storePacket :: cb? %s",!!E),se=se||Y,0===(N.qos||0)&&this.queueQoSZero||"publish"!==N.cmd?this.queue.push({packet:N,cb:E}):N.qos>0?(E=this.outgoing[N.messageId]?this.outgoing[N.messageId].cb:null,this.outgoingStore.put(N,function(J){if(J)return E&&E(J);se()})):E&&E(new Error("No connection to broker"))},H.prototype._setupPingTimer=function(){C("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);var N=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=_(function(){N._checkPing()},1e3*this.options.keepalive))},H.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},H.prototype._checkPing=function(){C("_checkPing :: checking ping..."),this.pingResp?(C("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(C("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},H.prototype._handlePingresp=function(){this.pingResp=!0},H.prototype._handleConnack=function(N){C("_handleConnack");var E=this.options,J=5===E.protocolVersion?N.reasonCode:N.returnCode;if(clearTimeout(this.connackTimer),N.properties&&(N.properties.topicAliasMaximum&&(E.properties||(E.properties={}),E.properties.topicAliasMaximum=N.properties.topicAliasMaximum),N.properties.serverKeepAlive&&E.keepalive&&(E.keepalive=N.properties.serverKeepAlive,this._shiftPingInterval()),N.properties.maximumPacketSize&&(E.properties||(E.properties={}),E.properties.maximumPacketSize=N.properties.maximumPacketSize)),0===J)this.reconnecting=!1,this._onConnect(N);else if(J>0){var pe=new Error("Connection refused: "+B[J]);pe.code=J,this.emit("error",pe)}},H.prototype._handlePublish=function(N,E){C("_handlePublish: packet %o",N),E=void 0!==E?E:Y;var se=N.topic.toString(),J=N.payload,pe=N.qos,Ce=N.messageId,ge=this,Fe=this.options,ue=[0,16,128,131,135,144,145,151,153];switch(C("_handlePublish: qos %d",pe),pe){case 2:Fe.customHandleAcks(se,J,N,function(Ye,Ne){return Ye instanceof Error||(Ne=Ye,Ye=null),Ye?ge.emit("error",Ye):-1===ue.indexOf(Ne)?ge.emit("error",new Error("Wrong reason code for pubrec")):void(Ne?ge._sendPacket({cmd:"pubrec",messageId:Ce,reasonCode:Ne},E):ge.incomingStore.put(N,function(){ge._sendPacket({cmd:"pubrec",messageId:Ce},E)}))});break;case 1:Fe.customHandleAcks(se,J,N,function(Ye,Ne){return Ye instanceof Error||(Ne=Ye,Ye=null),Ye?ge.emit("error",Ye):-1===ue.indexOf(Ne)?ge.emit("error",new Error("Wrong reason code for puback")):(Ne||ge.emit("message",se,J,N),void ge.handleMessage(N,function(Pe){if(Pe)return E&&E(Pe);ge._sendPacket({cmd:"puback",messageId:Ce,reasonCode:Ne},E)}))});break;case 0:this.emit("message",se,J,N),this.handleMessage(N,E);break;default:C("_handlePublish: unknown QoS. Doing nothing.")}},H.prototype.handleMessage=function(N,E){E()},H.prototype._handleAck=function(N){var ge,E=N.messageId,se=N.cmd,J=null,pe=this.outgoing[E]?this.outgoing[E].cb:null,Ce=this;if(pe){switch(C("_handleAck :: packet type",se),se){case"pubcomp":case"puback":var Fe=N.reasonCode;Fe&&Fe>0&&16!==Fe&&((ge=new Error("Publish error: "+B[Fe])).code=Fe,pe(ge,N)),delete this.outgoing[E],this.outgoingStore.del(N,pe);break;case"pubrec":J={cmd:"pubrel",qos:2,messageId:E};var ue=N.reasonCode;ue&&ue>0&&16!==ue?((ge=new Error("Publish error: "+B[ue])).code=ue,pe(ge,N)):this._sendPacket(J);break;case"suback":delete this.outgoing[E];for(var Ye=0;Ye0)if(this.options.resubscribe)if(5===this.options.protocolVersion){C("_resubscribe: protocolVersion 5");for(var se=0;sede&&setTimeout(ue,le,Ne,Pe,_e),Y&&"string"==typeof Ne&&(Ne=S.from(Ne,"utf8"));try{H.send(Ne)}catch(ve){return _e(ve)}_e()},function Ye(Ne){H.close(),Ne()});Q.objectMode||(N._writev=Fe),N.on("close",()=>{H.close()});const E=void 0===H.addEventListener;function J(){G.setReadable(N),G.setWritable(N),G.emit("connect")}function pe(){G.end(),G.destroy()}function Ce(Ne){G.destroy(Ne)}function ge(Ne){let Pe=Ne.data;Pe=Pe instanceof ArrayBuffer?S.from(Pe):S.from(Pe,"utf8"),N.push(Pe)}function Fe(Ne,Pe){const _e=new Array(Ne.length);for(let ve=0;vethis.length||m<0)return;const y=this._offset(m);return this._bufs[y[0]][y[1]]},R.prototype.slice=function(m,y){return"number"==typeof m&&m<0&&(m+=this.length),"number"==typeof y&&y<0&&(y+=this.length),this.copy(null,0,m,y)},R.prototype.copy=function(m,y,v,_){if(("number"!=typeof v||v<0)&&(v=0),("number"!=typeof _||_>this.length)&&(_=this.length),v>=this.length||_<=0)return m||T.alloc(0);const I=!!m,z=this._offset(v),C=_-v;let P=C,M=I&&y||0,O=z[1];if(0===v&&_===this.length){if(!I)return 1===this._bufs.length?this._bufs[0]:T.concat(this._bufs,this.length);for(let F=0;FB)){this._bufs[F].copy(m,M,O,O+P),M+=B;break}this._bufs[F].copy(m,M,O),M+=B,P-=B,O&&(O=0)}return m.length>M?m.slice(0,M):m},R.prototype.shallowSlice=function(m,y){if((m=m||0)<0&&(m+=this.length),(y="number"!=typeof y?this.length:y)<0&&(y+=this.length),m===y)return this._new();const v=this._offset(m),_=this._offset(y),I=this._bufs.slice(v[0],_[0]+1);return 0===_[1]?I.pop():I[I.length-1]=I[I.length-1].slice(0,_[1]),0!==v[1]&&(I[0]=I[0].slice(v[1])),this._new(I)},R.prototype.toString=function(m,y,v){return this.slice(y,v).toString(m)},R.prototype.consume=function(m){if(m=Math.trunc(m),Number.isNaN(m)||m<=0)return this;for(;this._bufs.length;){if(!(m>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(m),this.length-=m;break}m-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},R.prototype.duplicate=function(){const m=this._new();for(let y=0;ythis.length?this.length:m;const v=this._offset(m);let _=v[0],I=v[1];for(;_=D.length){const P=z.indexOf(D,I);if(-1!==P)return this._reverseOffset([_,P]);I=z.length-D.length+1}else{const P=this._reverseOffset([_,I]);if(this._match(P,D))return P;I++}I=0}return-1},R.prototype._match=function(D,m){if(this.length-D{"%%"!==P&&(z++,"%c"===P&&(C=z))}),_.splice(C,0,I)},re.save=function D(_){try{_?re.storage.setItem("debug",_):re.storage.removeItem("debug")}catch(I){}},re.load=function m(){let _;try{_=re.storage.getItem("debug")}catch(I){}return!_&&void 0!==T&&"env"in T&&(_=T.env.DEBUG),_},re.useColors=function S(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},re.storage=function y(){try{return localStorage}catch(_){}}(),re.destroy=(()=>{let _=!1;return()=>{_||(_=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),re.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],re.log=console.debug||console.log||(()=>{}),X.exports=V("./common")(re);const{formatters:v}=X.exports;v.j=function(_){try{return JSON.stringify(_)}catch(I){return"[UnexpectedJSONParseError]: "+I.message}}}).call(this)}).call(this,V("_process"))},{"./common":20,_process:69}],20:[function(V,X,re){X.exports=function T(S){function D(P){let M,O=null;function F(...B){if(!F.enabled)return;const Q=F,G=Number(new Date);Q.diff=G-(M||G),Q.prev=M,Q.curr=G,M=G,B[0]=D.coerce(B[0]),"string"!=typeof B[0]&&B.unshift("%O");let de=0;B[0]=B[0].replace(/%([a-zA-Z%])/g,(Y,H)=>{if("%%"===Y)return"%";de++;const N=D.formatters[H];return"function"==typeof N&&(Y=N.call(Q,B[de]),B.splice(de,1),de--),Y}),D.formatArgs.call(Q,B),(Q.log||D.log).apply(Q,B)}return F.namespace=P,F.useColors=D.useColors(),F.color=D.selectColor(P),F.extend=m,F.destroy=D.destroy,Object.defineProperty(F,"enabled",{enumerable:!0,configurable:!1,get:()=>null===O?D.enabled(P):O,set:B=>{O=B}}),"function"==typeof D.init&&D.init(F),F}function m(P,M){const O=D(this.namespace+(void 0===M?":":M)+P);return O.log=this.log,O}function I(P){return P.toString().substring(2,P.toString().length-2).replace(/\.\*\?$/,"*")}return D.debug=D,D.default=D,D.coerce=function z(P){return P instanceof Error?P.stack||P.message:P},D.disable=function v(){const P=[...D.names.map(I),...D.skips.map(I).map(M=>"-"+M)].join(",");return D.enable(""),P},D.enable=function y(P){let M;D.save(P),D.names=[],D.skips=[];const O=("string"==typeof P?P:"").split(/[\s,]+/),F=O.length;for(M=0;M{D[P]=S[P]}),D.names=[],D.skips=[],D.formatters={},D.selectColor=function R(P){let M=0;for(let O=0;O0?("string"!=typeof b&&!h.objectMode&&Object.getPrototypeOf(b)!==I.prototype&&(b=function C(g){return I.from(g)}(b)),ne?h.endEmitted?g.emit("error",new Error("stream.unshift() after end event")):N(g,h,b,!0):h.ended?g.emit("error",new Error("stream.push() after EOF")):(h.reading=!1,h.decoder&&!q?(b=h.decoder.write(b),h.objectMode||0!==b.length?N(g,h,b,!1):Ye(g,h)):N(g,h,b,!1))):ne||(h.reading=!1)),function se(g){return!g.ended&&(g.needReadable||g.lengthb.highWaterMark&&(b.highWaterMark=function pe(g){return g>=J?g=J:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}(g)),g<=b.length?g:b.ended?b.length:(b.needReadable=!0,0))}function Fe(g){var b=g._readableState;b.needReadable=!1,b.emittedReadable||(F("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?R.nextTick(ue,g):ue(g))}function ue(g){F("emit readable"),g.emit("readable"),ee(g)}function Ye(g,b){b.readingMore||(b.readingMore=!0,R.nextTick(Ne,g,b))}function Ne(g,b){for(var q=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=b.length?(q=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),b.buffer.clear()):q=function xe(g,b,q){var ne;return gh.length?h.length:g;if(A+=u===h.length?h:h.slice(0,g),0==(g-=u)){u===h.length?(++ne,b.head=q.next?q.next:b.tail=null):(b.head=q,q.data=h.slice(u));break}++ne}return b.length-=ne,A}(g,b):function $(g,b){var q=I.allocUnsafe(g),ne=b.head,A=1;for(ne.data.copy(q),g-=ne.data.length;ne=ne.next;){var h=ne.data,u=g>h.length?h.length:g;if(h.copy(q,q.length-g,0,u),0==(g-=u)){u===h.length?(++A,b.head=ne.next?ne.next:b.tail=null):(b.head=ne,ne.data=h.slice(u));break}++A}return b.length-=A,q}(g,b),ne}(g,b.buffer,b.decoder),q);var q}function ye(g){var b=g._readableState;if(b.length>0)throw new Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,R.nextTick(Re,b,g))}function Re(g,b){!g.endEmitted&&0===g.length&&(g.endEmitted=!0,b.readable=!1,b.emit("end"))}function W(g,b){for(var q=0,ne=g.length;q=b.highWaterMark||b.ended))return F("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?ye(this):Fe(this),null;if(0===(g=Ce(g,b))&&b.ended)return 0===b.length&&ye(this),null;var A,ne=b.needReadable;return F("need readable",ne),(0===b.length||b.length-g0?be(g,b):null)?(b.needReadable=!0,g=0):b.length-=g,0===b.length&&(b.ended||(b.needReadable=!0),q!==g&&b.ended&&ye(this)),null!==A&&this.emit("data",A),A},Y.prototype._read=function(g){this.emit("error",new Error("_read() is not implemented"))},Y.prototype.pipe=function(g,b){var q=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=g;break;case 1:ne.pipes=[ne.pipes,g];break;default:ne.pipes.push(g)}ne.pipesCount+=1,F("pipe count=%d opts=%j",ne.pipesCount,b);var h=b&&!1===b.end||g===T.stdout||g===T.stderr?Bt:p;function u(zn,_i){F("onunpipe"),zn===q&&_i&&!1===_i.hasUnpiped&&(_i.hasUnpiped=!0,function me(){F("cleanup"),g.removeListener("close",Vt),g.removeListener("finish",nn),g.removeListener("drain",L),g.removeListener("error",yt),g.removeListener("unpipe",u),q.removeListener("end",p),q.removeListener("end",Bt),q.removeListener("data",Ze),Z=!0,ne.awaitDrain&&(!g._writableState||g._writableState.needDrain)&&L()}())}function p(){F("onend"),g.end()}ne.endEmitted?R.nextTick(h):q.once("end",h),g.on("unpipe",u);var L=function Pe(g){return function(){var b=g._readableState;F("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&v(g,"data")&&(b.flowing=!0,ee(g))}}(q);g.on("drain",L);var Z=!1;var Se=!1;function Ze(zn){F("ondata"),Se=!1,!1===g.write(zn)&&!Se&&((1===ne.pipesCount&&ne.pipes===g||ne.pipesCount>1&&-1!==W(ne.pipes,g))&&!Z&&(F("false write response, pause",q._readableState.awaitDrain),q._readableState.awaitDrain++,Se=!0),q.pause())}function yt(zn){F("onerror",zn),Bt(),g.removeListener("error",yt),0===v(g,"error")&&g.emit("error",zn)}function Vt(){g.removeListener("finish",nn),Bt()}function nn(){F("onfinish"),g.removeListener("close",Vt),Bt()}function Bt(){F("unpipe"),q.unpipe(g)}return q.on("data",Ze),function de(g,b,q){if("function"==typeof g.prependListener)return g.prependListener(b,q);g._events&&g._events[b]?D(g._events[b])?g._events[b].unshift(q):g._events[b]=[q,g._events[b]]:g.on(b,q)}(g,"error",yt),g.once("close",Vt),g.once("finish",nn),g.emit("pipe",q),ne.flowing||(F("pipe resume"),q.resume()),g},Y.prototype.unpipe=function(g){var b=this._readableState,q={hasUnpiped:!1};if(0===b.pipesCount)return this;if(1===b.pipesCount)return g&&g!==b.pipes||(g||(g=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,g&&g.emit("unpipe",this,q)),this;if(!g){var ne=b.pipes,A=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var h=0;h-1?R:D.nextTick;de.WritableState=G;var I=Object.create(V("core-util-is"));I.inherits=V("inherits");var z={deprecate:V("util-deprecate")},C=V("./internal/streams/stream"),P=V("safe-buffer").Buffer,M=S.Uint8Array||function(){};var oe,B=V("./internal/streams/destroy");function Q(){}function G(U,ee){_=_||V("./_stream_duplex");var be=ee instanceof _;this.objectMode=!!(U=U||{}).objectMode,be&&(this.objectMode=this.objectMode||!!U.writableObjectMode);var xe=U.highWaterMark,ie=U.writableHighWaterMark;this.highWaterMark=xe||0===xe?xe:be&&(ie||0===ie)?ie:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===U.decodeStrings),this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Re){!function pe(U,ee){var be=U._writableState,xe=be.sync,ie=be.writecb;if(function J(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}(be),ee)!function se(U,ee,be,xe,ie){--ee.pendingcb,be?(D.nextTick(ie,xe),D.nextTick(Pe,U,ee),U._writableState.errorEmitted=!0,U.emit("error",xe)):(ie(xe),U._writableState.errorEmitted=!0,U.emit("error",xe),Pe(U,ee))}(U,be,xe,ee,ie);else{var $=ue(be);!$&&!be.corked&&!be.bufferProcessing&&be.bufferedRequest&&Fe(U,be),xe?v(Ce,U,be,$,ie):Ce(U,be,$,ie)}}(ee,Re)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new y(this)}function de(U){if(_=_||V("./_stream_duplex"),!(oe.call(de,this)||this instanceof _))return new de(U);this._writableState=new G(U,this),this.writable=!0,U&&("function"==typeof U.write&&(this._write=U.write),"function"==typeof U.writev&&(this._writev=U.writev),"function"==typeof U.destroy&&(this._destroy=U.destroy),"function"==typeof U.final&&(this._final=U.final)),C.call(this)}function N(U,ee,be,xe,ie,$){if(!be){var ye=function H(U,ee,be){return!U.objectMode&&!1!==U.decodeStrings&&"string"==typeof ee&&(ee=P.from(ee,be)),ee}(ee,xe,ie);xe!==ye&&(be=!0,ie="buffer",xe=ye)}var Re=ee.objectMode?1:xe.length;ee.length+=Re;var W=ee.length-1))throw new TypeError("Unknown encoding: "+ee);return this._writableState.defaultEncoding=ee,this},Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),de.prototype._write=function(U,ee,be){be(new Error("_write() is not implemented"))},de.prototype._writev=null,de.prototype.end=function(U,ee,be){var xe=this._writableState;"function"==typeof U?(be=U,U=null,ee=null):"function"==typeof ee&&(be=ee,ee=null),null!=U&&this.write(U,ee),xe.corked&&(xe.corked=1,this.uncork()),!xe.ending&&!xe.finished&&function _e(U,ee,be){ee.ending=!0,Pe(U,ee),be&&(ee.finished?D.nextTick(be):U.once("finish",be)),ee.ended=!0,U.writable=!1}(this,xe,be)},Object.defineProperty(de.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(U){!this._writableState||(this._writableState.destroyed=U)}}),de.prototype.destroy=B.destroy,de.prototype._undestroy=B.undestroy,de.prototype._destroy=function(U,ee){this.end(),ee(U)}}).call(this)}).call(this,V("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},V("timers").setImmediate)},{"./_stream_duplex":22,"./internal/streams/destroy":28,"./internal/streams/stream":29,_process:69,"core-util-is":18,inherits:34,"process-nextick-args":45,"safe-buffer":31,timers:74,"util-deprecate":65}],27:[function(V,X,re){"use strict";var S=V("safe-buffer").Buffer,R=V("util");function D(m,y,v){m.copy(y,v)}X.exports=function(){function m(){(function T(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")})(this,m),this.head=null,this.tail=null,this.length=0}return m.prototype.push=function(v){var _={data:v,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length},m.prototype.unshift=function(v){var _={data:v,next:this.head};0===this.length&&(this.tail=_),this.head=_,++this.length},m.prototype.shift=function(){if(0!==this.length){var v=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,v}},m.prototype.clear=function(){this.head=this.tail=null,this.length=0},m.prototype.join=function(v){if(0===this.length)return"";for(var _=this.head,I=""+_.data;_=_.next;)I+=v+_.data;return I},m.prototype.concat=function(v){if(0===this.length)return S.alloc(0);if(1===this.length)return this.head.data;for(var _=S.allocUnsafe(v>>>0),I=this.head,z=0;I;)D(I.data,_,z),z+=I.data.length,I=I.next;return _},m}(),R&&R.inspect&&R.inspect.custom&&(X.exports.prototype[R.inspect.custom]=function(){var m=R.inspect({length:this.length});return this.constructor.name+" "+m})},{"safe-buffer":31,util:2}],28:[function(V,X,re){"use strict";var T=V("process-nextick-args");function D(m,y){m.emit("error",y)}X.exports={destroy:function S(m,y){var v=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(y?y(m):m&&(!this._writableState||!this._writableState.errorEmitted)&&T.nextTick(D,this,m),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,function(z){!y&&z?(T.nextTick(D,v,z),v._writableState&&(v._writableState.errorEmitted=!0)):y&&y(z)}),this)},undestroy:function R(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":45}],29:[function(V,X,re){X.exports=V("events").EventEmitter},{events:4}],30:[function(V,X,re){(re=X.exports=V("./lib/_stream_readable.js")).Stream=re,re.Readable=re,re.Writable=V("./lib/_stream_writable.js"),re.Duplex=V("./lib/_stream_duplex.js"),re.Transform=V("./lib/_stream_transform.js"),re.PassThrough=V("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":22,"./lib/_stream_passthrough.js":23,"./lib/_stream_readable.js":24,"./lib/_stream_transform.js":25,"./lib/_stream_writable.js":26}],31:[function(V,X,re){var T=V("buffer"),S=T.Buffer;function R(m,y){for(var v in m)y[v]=m[v]}function D(m,y,v){return S(m,y,v)}S.from&&S.alloc&&S.allocUnsafe&&S.allocUnsafeSlow?X.exports=T:(R(T,re),re.Buffer=D),R(S,D),D.from=function(m,y,v){if("number"==typeof m)throw new TypeError("Argument must not be a number");return S(m,y,v)},D.alloc=function(m,y,v){if("number"!=typeof m)throw new TypeError("Argument must be a number");var _=S(m);return void 0!==y?"string"==typeof v?_.fill(y,v):_.fill(y):_.fill(0),_},D.allocUnsafe=function(m){if("number"!=typeof m)throw new TypeError("Argument must be a number");return S(m)},D.allocUnsafeSlow=function(m){if("number"!=typeof m)throw new TypeError("Argument must be a number");return T.SlowBuffer(m)}},{buffer:3}],32:[function(V,X,re){"use strict";var T=V("safe-buffer").Buffer,S=T.isEncoding||function(G){switch((G=""+G)&&G.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function m(G){var oe;switch(this.encoding=function D(G){var oe=function R(G){if(!G)return"utf8";for(var oe;;)switch(G){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return G;default:if(oe)return;G=(""+G).toLowerCase(),oe=!0}}(G);if("string"!=typeof oe&&(T.isEncoding===S||!S(G)))throw new Error("Unknown encoding: "+G);return oe||G}(G),this.encoding){case"utf16le":this.text=P,this.end=M,oe=4;break;case"utf8":this.fillLast=I,oe=4;break;case"base64":this.text=O,this.end=F,oe=3;break;default:return this.write=B,void(this.end=Q)}this.lastNeed=0,this.lastTotal=0,this.lastChar=T.allocUnsafe(oe)}function y(G){return G<=127?0:G>>5==6?2:G>>4==14?3:G>>3==30?4:G>>6==2?-1:-2}function I(G){var oe=this.lastTotal-this.lastNeed,de=function _(G,oe,de){if(128!=(192&oe[0]))return G.lastNeed=0,"\ufffd";if(G.lastNeed>1&&oe.length>1){if(128!=(192&oe[1]))return G.lastNeed=1,"\ufffd";if(G.lastNeed>2&&oe.length>2&&128!=(192&oe[2]))return G.lastNeed=2,"\ufffd"}}(this,G);return void 0!==de?de:this.lastNeed<=G.length?(G.copy(this.lastChar,oe,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(G.copy(this.lastChar,oe,0,G.length),void(this.lastNeed-=G.length))}function P(G,oe){if((G.length-oe)%2==0){var de=G.toString("utf16le",oe);if(de){var le=de.charCodeAt(de.length-1);if(le>=55296&&le<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=G[G.length-2],this.lastChar[1]=G[G.length-1],de.slice(0,-1)}return de}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=G[G.length-1],G.toString("utf16le",oe,G.length-1)}function M(G){var oe=G&&G.length?this.write(G):"";return this.lastNeed?oe+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):oe}function O(G,oe){var de=(G.length-oe)%3;return 0===de?G.toString("base64",oe):(this.lastNeed=3-de,this.lastTotal=3,1===de?this.lastChar[0]=G[G.length-1]:(this.lastChar[0]=G[G.length-2],this.lastChar[1]=G[G.length-1]),G.toString("base64",oe,G.length-de))}function F(G){var oe=G&&G.length?this.write(G):"";return this.lastNeed?oe+this.lastChar.toString("base64",0,3-this.lastNeed):oe}function B(G){return G.toString(this.encoding)}function Q(G){return G&&G.length?this.write(G):""}re.StringDecoder=m,m.prototype.write=function(G){if(0===G.length)return"";var oe,de;if(this.lastNeed){if(void 0===(oe=this.fillLast(G)))return"";de=this.lastNeed,this.lastNeed=0}else de=0;return de=0?(Y>0&&(G.lastNeed=Y-1),Y):--le=0?(Y>0&&(G.lastNeed=Y-2),Y):--le=0?(Y>0&&(2===Y?Y=0:G.lastNeed=Y-3),Y):0}(this,G,oe);if(!this.lastNeed)return G.toString("utf8",oe);this.lastTotal=de;var le=G.length-(de-this.lastNeed);return G.copy(this.lastChar,0,le),G.toString("utf8",oe,le)},m.prototype.fillLast=function(G){if(this.lastNeed<=G.length)return G.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);G.copy(this.lastChar,this.lastTotal-this.lastNeed,0,G.length),this.lastNeed-=G.length}},{"safe-buffer":31}],33:[function(V,X,re){(function(T){(function(){var S=V("once"),R=function(){},y=function(v,_,I){if("function"==typeof _)return y(v,null,_);_||(_={}),I=S(I||R);var z=v._writableState,C=v._readableState,P=_.readable||!1!==_.readable&&v.readable,M=_.writable||!1!==_.writable&&v.writable,O=!1,F=function(){v.writable||B()},B=function(){M=!1,P||I.call(v)},Q=function(){P=!1,M||I.call(v)},G=function(H){I.call(v,H?new Error("exited with error code: "+H):null)},oe=function(H){I.call(v,H)},de=function(){T.nextTick(le)},le=function(){if(!O){if(P&&(!C||!C.ended||C.destroyed))return I.call(v,new Error("premature close"));if(M&&(!z||!z.ended||z.destroyed))return I.call(v,new Error("premature close"))}},Y=function(){v.req.on("finish",B)};return function(v){return v.setHeader&&"function"==typeof v.abort}(v)?(v.on("complete",B),v.on("abort",de),v.req?Y():v.on("request",Y)):M&&!z&&(v.on("end",F),v.on("close",F)),function(v){return v.stdio&&Array.isArray(v.stdio)&&3===v.stdio.length}(v)&&v.on("exit",G),v.on("end",Q),v.on("finish",B),!1!==_.error&&v.on("error",oe),v.on("close",de),function(){O=!0,v.removeListener("complete",B),v.removeListener("abort",de),v.removeListener("request",Y),v.req&&v.req.removeListener("finish",B),v.removeListener("end",F),v.removeListener("close",F),v.removeListener("finish",B),v.removeListener("exit",G),v.removeListener("end",Q),v.removeListener("error",oe),v.removeListener("close",de)}};X.exports=y}).call(this)}).call(this,V("_process"))},{_process:69,once:44}],34:[function(V,X,re){X.exports="function"==typeof Object.create?function(S,R){R&&(S.super_=R,S.prototype=Object.create(R.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}))}:function(S,R){if(R){S.super_=R;var D=function(){};D.prototype=R.prototype,S.prototype=new D,S.prototype.constructor=S}}},{}],35:[function(V,X,re){var T={}.toString;X.exports=Array.isArray||function(S){return"[object Array]"==T.call(S)}},{}],36:[function(V,X,re){(function(T){(function(){const S=X.exports;S.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},S.codes={};for(const D in S.types)S.codes[S.types[D]]=D;S.CMD_SHIFT=4,S.CMD_MASK=240,S.DUP_MASK=8,S.QOS_MASK=3,S.QOS_SHIFT=1,S.RETAIN_MASK=1,S.VARBYTEINT_MASK=127,S.VARBYTEINT_FIN_MASK=128,S.VARBYTEINT_MAX=268435455,S.SESSIONPRESENT_MASK=1,S.SESSIONPRESENT_HEADER=T.from([S.SESSIONPRESENT_MASK]),S.CONNACK_HEADER=T.from([S.codes.connack<[0,1].map(y=>[0,1].map(v=>{const _=T.alloc(1);return _.writeUInt8(S.codes[D]<T.from([D])),S.EMPTY={pingreq:T.from([S.codes.pingreq<<4,0]),pingresp:T.from([S.codes.pingresp<<4,0]),disconnect:T.from([S.codes.disconnect<<4,0])}}).call(this)}).call(this,V("buffer").Buffer)},{buffer:3}],37:[function(V,X,re){(function(T){(function(){const S=V("./writeToStream"),R=V("events");class m extends R{constructor(){super(),this._array=new Array(20),this._i=0}write(v){return this._array[this._i++]=v,!0}concat(){let v=0;const _=new Array(this._array.length),I=this._array;let C,z=0;for(C=0;C>8,0),z.writeUInt8(255&I,1),z}X.exports={cache:R,generateCache:function y(){for(let I=0;I<65536;I++)R[I]=m(I)},generateNumber:m,genBufVariableByteInt:function v(I){let C=0,P=0;const M=T.allocUnsafe(4);do{C=I%128|0,(I=I/128|0)>0&&(C|=128),M.writeUInt8(C,P++)}while(I>0&&P<4);return I>0&&(P=0),D?M.subarray(0,P):M.slice(0,P)},generate4ByteBuffer:function _(I){const z=T.allocUnsafe(4);return z.writeUInt32BE(I,0),z}}}).call(this)}).call(this,V("buffer").Buffer)},{buffer:3}],40:[function(V,X,re){X.exports=class T{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},{}],41:[function(V,X,re){const T=V("bl"),S=V("events"),R=V("./packet"),D=V("./constants"),m=V("debug")("mqtt-packet:parser");class y extends S{constructor(){super(),this.parser=this.constructor.parser}static parser(_){return this instanceof y?(this.settings=_||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new y).parser(_)}_resetState(){m("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new R,this.error=null,this._list=T(),this._stateCounter=0}parse(_){for(this.error&&this._resetState(),this._list.append(_),m("parse: current state: %s",this._states[this._stateCounter]);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,m("parse: state complete. _stateCounter is now: %d",this._stateCounter),m("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return m("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const _=this._list.readUInt8(0);return this.packet.cmd=D.types[_>>D.CMD_SHIFT],this.packet.retain=0!=(_&D.RETAIN_MASK),this.packet.qos=_>>D.QOS_SHIFT&D.QOS_MASK,this.packet.dup=0!=(_&D.DUP_MASK),m("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const _=this._parseVarByteNum(!0);return _&&(this.packet.length=_.value,this._list.consume(_.bytes)),m("_parseLength %d",_.value),!!_}_parsePayload(){m("_parsePayload: payload %O",this._list);let _=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}_=!0}return m("_parsePayload complete result: %s",_),_}_parseConnect(){let _,I,z,C;m("_parseConnect");const P={},M=this.packet,O=this._parseString();if(null===O)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==O&&"MQIsdp"!==O)return this._emitError(new Error("Invalid protocolId"));if(M.protocolId=O,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(M.protocolVersion=this._list.readUInt8(this._pos),M.protocolVersion>=128&&(M.bridgeMode=!0,M.protocolVersion=M.protocolVersion-128),3!==M.protocolVersion&&4!==M.protocolVersion&&5!==M.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(P.username=this._list.readUInt8(this._pos)&D.USERNAME_MASK,P.password=this._list.readUInt8(this._pos)&D.PASSWORD_MASK,P.will=this._list.readUInt8(this._pos)&D.WILL_FLAG_MASK,P.will&&(M.will={},M.will.retain=0!=(this._list.readUInt8(this._pos)&D.WILL_RETAIN_MASK),M.will.qos=(this._list.readUInt8(this._pos)&D.WILL_QOS_MASK)>>D.WILL_QOS_SHIFT),M.clean=0!=(this._list.readUInt8(this._pos)&D.CLEAN_SESSION_MASK),this._pos++,M.keepalive=this._parseNum(),-1===M.keepalive)return this._emitError(new Error("Packet too short"));if(5===M.protocolVersion){const B=this._parseProperties();Object.getOwnPropertyNames(B).length&&(M.properties=B)}const F=this._parseString();if(null===F)return this._emitError(new Error("Packet too short"));if(M.clientId=F,m("_parseConnect: packet.clientId: %s",M.clientId),P.will){if(5===M.protocolVersion){const B=this._parseProperties();Object.getOwnPropertyNames(B).length&&(M.will.properties=B)}if(_=this._parseString(),null===_)return this._emitError(new Error("Cannot parse will topic"));if(M.will.topic=_,m("_parseConnect: packet.will.topic: %s",M.will.topic),I=this._parseBuffer(),null===I)return this._emitError(new Error("Cannot parse will payload"));M.will.payload=I,m("_parseConnect: packet.will.paylaod: %s",M.will.payload)}if(P.username){if(C=this._parseString(),null===C)return this._emitError(new Error("Cannot parse username"));M.username=C,m("_parseConnect: packet.username: %s",M.username)}if(P.password){if(z=this._parseBuffer(),null===z)return this._emitError(new Error("Cannot parse password"));M.password=z}return this.settings=M,m("_parseConnect: complete"),M}_parseConnack(){m("_parseConnack");const _=this.packet;if(this._list.length<1)return null;if(_.sessionPresent=!!(this._list.readUInt8(this._pos++)&D.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)_.reasonCode=this._list.length>=2?this._list.readUInt8(this._pos++):0;else{if(this._list.length<2)return null;_.returnCode=this._list.readUInt8(this._pos++)}if(-1===_.returnCode||-1===_.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}m("_parseConnack: complete")}_parsePublish(){m("_parsePublish");const _=this.packet;if(_.topic=this._parseString(),null===_.topic)return this._emitError(new Error("Cannot parse topic"));if(!(_.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}_.payload=this._list.slice(this._pos,_.length),m("_parsePublish: payload from buffer list: %o",_.payload)}}_parseSubscribe(){m("_parseSubscribe");const _=this.packet;let I,z,C,P,M,O,F;if(1!==_.qos)return this._emitError(new Error("Wrong subscribe header"));if(_.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const B=this._parseProperties();Object.getOwnPropertyNames(B).length&&(_.properties=B)}for(;this._pos<_.length;){if(I=this._parseString(),null===I)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=_.length)return this._emitError(new Error("Malformed Subscribe Payload"));z=this._parseByte(),C=z&D.SUBSCRIBE_OPTIONS_QOS_MASK,O=0!=(z>>D.SUBSCRIBE_OPTIONS_NL_SHIFT&D.SUBSCRIBE_OPTIONS_NL_MASK),M=0!=(z>>D.SUBSCRIBE_OPTIONS_RAP_SHIFT&D.SUBSCRIBE_OPTIONS_RAP_MASK),P=z>>D.SUBSCRIBE_OPTIONS_RH_SHIFT&D.SUBSCRIBE_OPTIONS_RH_MASK,F={topic:I,qos:C},5===this.settings.protocolVersion?(F.nl=O,F.rap=M,F.rh=P):this.settings.bridgeMode&&(F.rh=0,F.rap=!0,F.nl=!0),m("_parseSubscribe: push subscription `%s` to subscription",F),_.subscriptions.push(F)}}}_parseSuback(){m("_parseSuback");const _=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}for(;this._pos2?(_.reasonCode=this._parseByte(),m("_parseConfirmation: packet.reasonCode `%d`",_.reasonCode)):_.reasonCode=0,_.length>3)){const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}return!0}_parseDisconnect(){const _=this.packet;if(m("_parseDisconnect"),5===this.settings.protocolVersion){_.reasonCode=this._list.length>0?this._parseByte():0;const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}return m("_parseDisconnect result: true"),!0}_parseAuth(){m("_parseAuth");const _=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));_.reasonCode=this._parseByte();const I=this._parseProperties();return Object.getOwnPropertyNames(I).length&&(_.properties=I),m("_parseAuth: result: true"),!0}_parseMessageId(){const _=this.packet;return _.messageId=this._parseNum(),null===_.messageId?(this._emitError(new Error("Cannot parse messageId")),!1):(m("_parseMessageId: packet.messageId %d",_.messageId),!0)}_parseString(_){const I=this._parseNum(),z=I+this._pos;if(-1===I||z>this._list.length||z>this.packet.length)return null;const C=this._list.toString("utf8",this._pos,z);return this._pos+=I,m("_parseString: result: %s",C),C}_parseStringPair(){return m("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const _=this._parseNum(),I=_+this._pos;if(-1===_||I>this._list.length||I>this.packet.length)return null;const z=this._list.slice(this._pos,I);return this._pos+=_,m("_parseBuffer: result: %o",z),z}_parseNum(){if(this._list.length-this._pos<2)return-1;const _=this._list.readUInt16BE(this._pos);return this._pos+=2,m("_parseNum: result: %s",_),_}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const _=this._list.readUInt32BE(this._pos);return this._pos+=4,m("_parse4ByteNum: result: %s",_),_}_parseVarByteNum(_){m("_parseVarByteNum");let O,z=0,C=1,P=0,M=!1;const F=this._pos?this._pos:0;for(;z<4&&F+z=z&&this._emitError(new Error("Invalid variable byte integer")),F&&(this._pos+=z),M=!!M&&(_?{bytes:z,value:P}:P),m("_parseVarByteNum: result: %o",M),M}_parseByte(){let _;return this._pos=4)&&(A||q))L+=T.byteLength(A)+2;else{if(g<4)return $.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*q==0)return $.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!=typeof ne||ne<0||ne>65535||ne%1!=0)return $.emit("error",new Error("Invalid keepalive")),!1;if(L+=2,L+=1,5===g){var Z=_e($,p);if(!Z)return!1;L+=Z.length}if(b){if("object"!=typeof b)return $.emit("error",new Error("Invalid will")),!1;if(!b.topic||"string"!=typeof b.topic)return $.emit("error",new Error("Invalid will topic")),!1;if(L+=T.byteLength(b.topic)+2,L+=2,b.payload){if(!(b.payload.length>=0))return $.emit("error",new Error("Invalid will payload")),!1;L+="string"==typeof b.payload?T.byteLength(b.payload):b.payload.length}var me={};if(5===g){if(!(me=_e($,b.properties)))return!1;L+=me.length}}let Se=!1;if(null!=h){if(!xe(h))return $.emit("error",new Error("Invalid username")),!1;Se=!0,L+=T.byteLength(h)+2}if(null!=u){if(!Se)return $.emit("error",new Error("Username is required to use password")),!1;if(!xe(u))return $.emit("error",new Error("Invalid password")),!1;L+=be(u)+2}$.write(S.CONNECT_HEADER),Ce($,L),Pe($,W),Re.bridgeMode&&(g+=128),$.write(131===g?S.VERSION131:132===g?S.VERSION132:4===g?S.VERSION4:5===g?S.VERSION5:S.VERSION3);let Ze=0;return Ze|=null!=h?S.USERNAME_MASK:0,Ze|=null!=u?S.PASSWORD_MASK:0,Ze|=b&&b.retain?S.WILL_RETAIN_MASK:0,Ze|=b&&b.qos?b.qos<0&&M($,A),null!=p&&p.write(),v("publish: payload: %o",ne),$.write(ne)}(ie,$,ye);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function de(ie,$,ye){const Re=ye?ye.protocolVersion:4,W=ie||{},g=W.cmd||"puback",b=W.messageId,q=W.dup&&"pubrel"===g?S.DUP_MASK:0;let ne=0;const A=W.reasonCode,h=W.properties;let u=5===Re?3:2;if("pubrel"===g&&(ne=1),"number"!=typeof b)return $.emit("error",new Error("Invalid messageId")),!1;let p=null;if(5===Re&&"object"==typeof h){if(p=ve($,h,ye,u),!p)return!1;u+=p.length}return $.write(S.ACKS[g][ne][q][0]),Ce($,u),M($,b),5===Re&&$.write(T.from([A])),null!==p&&p.write(),!0}(ie,$,ye);case"subscribe":return function le(ie,$,ye){v("subscribe: packet: ");const Re=ye?ye.protocolVersion:4,W=ie||{},g=W.dup?S.DUP_MASK:0,b=W.messageId,q=W.subscriptions,ne=W.properties;let A=0;if("number"!=typeof b)return $.emit("error",new Error("Invalid messageId")),!1;A+=2;let h=null;if(5===Re){if(h=_e($,ne),!h)return!1;A+=h.length}if("object"!=typeof q||!q.length)return $.emit("error",new Error("Invalid subscriptions")),!1;for(let p=0;p2)return $.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}A+=T.byteLength(L)+2+1}v("subscribe: writing to stream: %o",S.SUBSCRIBE_HEADER),$.write(S.SUBSCRIBE_HEADER[1][g?1:0][0]),Ce($,A),M($,b),null!==h&&h.write();let u=!0;for(const p of q){const Z=p.qos,me=+p.nl,Se=+p.rap,Ze=p.rh;let yt;ge($,p.topic),yt=S.SUBSCRIBE_OPTIONS_QOS[Z],5===Re&&(yt|=me?S.SUBSCRIBE_OPTIONS_NL:0,yt|=Se?S.SUBSCRIBE_OPTIONS_RAP:0,yt|=Ze?S.SUBSCRIBE_OPTIONS_RH[Ze]:0),u=$.write(T.from([yt]))}return u}(ie,$,ye);case"suback":return function Y(ie,$,ye){const Re=ye?ye.protocolVersion:4,W=ie||{},g=W.messageId,b=W.granted,q=W.properties;let ne=0;if("number"!=typeof g)return $.emit("error",new Error("Invalid messageId")),!1;if(ne+=2,"object"!=typeof b||!b.length)return $.emit("error",new Error("Invalid qos vector")),!1;for(let h=0;hM===ue,set(ie){ie?((!_||0===Object.keys(_).length)&&(O=!0),M=ue):(O=!1,M=Ye)}});const pe={};function Ce(ie,$){if($>S.VARBYTEINT_MAX)return ie.emit("error",new Error(`Invalid variable byte integer: ${$}`)),!1;let ye=pe[$];return ye||(ye=C($),$<16384&&(pe[$]=ye)),v("writeVarByteInt: writing to stream: %o",ye),ie.write(ye)}function ge(ie,$){const ye=T.byteLength($);return M(ie,ye),v("writeString: %s",$),ie.write($,"utf8")}function Fe(ie,$,ye){ge(ie,$),ge(ie,ye)}function ue(ie,$){return v("writeNumberCached: number: %d",$),v("writeNumberCached: %o",_[$]),ie.write(_[$])}function Ye(ie,$){const ye=I($);return v("writeNumberGenerated: %o",ye),ie.write(ye)}function Pe(ie,$){"string"==typeof $?ge(ie,$):$?(M(ie,$.length),ie.write($)):M(ie,0)}function _e(ie,$){if("object"!=typeof $||null!=$.length)return{length:1,write(){ee(ie,{},0)}};let ye=0;function Re(g,b){let ne=0;switch(S.propertiesTypes[g]){case"byte":if("boolean"!=typeof b)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=2;break;case"int8":if("number"!=typeof b||b<0||b>255)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=2;break;case"binary":if(b&&null===b)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=1+T.byteLength(b)+2;break;case"int16":if("number"!=typeof b||b<0||b>65535)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=3;break;case"int32":if("number"!=typeof b||b<0||b>4294967295)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=5;break;case"var":if("number"!=typeof b||b<0||b>268435455)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=1+T.byteLength(C(b));break;case"string":if("string"!=typeof b)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=3+T.byteLength(b.toString());break;case"pair":if("object"!=typeof b)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=Object.getOwnPropertyNames(b).reduce((A,h)=>{const u=b[h];return Array.isArray(u)?A+=u.reduce((p,L)=>p+(3+T.byteLength(h.toString())+2+T.byteLength(L.toString())),0):A+=3+T.byteLength(h.toString())+2+T.byteLength(b[h].toString()),A},0);break;default:return ie.emit("error",new Error(`Invalid property ${g}: ${b}`)),!1}return ne}if($)for(const g in $){let b=0,q=0;const ne=$[g];if(Array.isArray(ne))for(let A=0;Ag;){const q=W.shift();if(!q||!$[q])return!1;delete $[q],b=_e(ie,$)}return b}function U(ie,$,ye){switch(S.propertiesTypes[$]){case"byte":ie.write(T.from([S.properties[$]])),ie.write(T.from([+ye]));break;case"int8":ie.write(T.from([S.properties[$]])),ie.write(T.from([ye]));break;case"binary":ie.write(T.from([S.properties[$]])),Pe(ie,ye);break;case"int16":ie.write(T.from([S.properties[$]])),M(ie,ye);break;case"int32":ie.write(T.from([S.properties[$]])),function Ne(ie,$){const ye=P($);return v("write4ByteNumber: %o",ye),ie.write(ye)}(ie,ye);break;case"var":ie.write(T.from([S.properties[$]])),Ce(ie,ye);break;case"string":ie.write(T.from([S.properties[$]])),ge(ie,ye);break;case"pair":Object.getOwnPropertyNames(ye).forEach(W=>{const g=ye[W];Array.isArray(g)?g.forEach(b=>{ie.write(T.from([S.properties[$]])),Fe(ie,W.toString(),b.toString())}):(ie.write(T.from([S.properties[$]])),Fe(ie,W.toString(),g.toString()))});break;default:return ie.emit("error",new Error(`Invalid property ${$} value: ${ye}`)),!1}}function ee(ie,$,ye){Ce(ie,ye);for(const Re in $)if(Object.prototype.hasOwnProperty.call($,Re)&&null!==$[Re]){const W=$[Re];if(Array.isArray(W))for(let g=0;g=1.5*M;return Math.round(C/M)+" "+O+(F?"s":"")}X.exports=function(C,P){P=P||{};var M=typeof C;if("string"===M&&C.length>0)return function v(C){if(!((C=String(C)).length>100)){var P=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(C);if(P){var M=parseFloat(P[1]);switch((P[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*M;case"weeks":case"week":case"w":return 6048e5*M;case"days":case"day":case"d":return M*D;case"hours":case"hour":case"hrs":case"hr":case"h":return M*R;case"minutes":case"minute":case"mins":case"min":case"m":return M*S;case"seconds":case"second":case"secs":case"sec":case"s":return M*T;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return M;default:return}}}}(C);if("number"===M&&isFinite(C))return P.long?function I(C){var P=Math.abs(C);return P>=D?z(C,P,D,"day"):P>=R?z(C,P,R,"hour"):P>=S?z(C,P,S,"minute"):P>=T?z(C,P,T,"second"):C+" ms"}(C):function _(C){var P=Math.abs(C);return P>=D?Math.round(C/D)+"d":P>=R?Math.round(C/R)+"h":P>=S?Math.round(C/S)+"m":P>=T?Math.round(C/T)+"s":C+"ms"}(C);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(C))}},{}],44:[function(V,X,re){var T=V("wrappy");function S(D){var m=function(){return m.called?m.value:(m.called=!0,m.value=D.apply(this,arguments))};return m.called=!1,m}function R(D){var m=function(){if(m.called)throw new Error(m.onceError);return m.called=!0,m.value=D.apply(this,arguments)};return m.onceError=(D.name||"Function wrapped with `once`")+" shouldn't be called more than once",m.called=!1,m}X.exports=T(S),X.exports.strict=T(R),S.proto=S(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return S(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return R(this)},configurable:!0})})},{wrappy:66}],45:[function(V,X,re){(function(T){(function(){"use strict";X.exports=void 0===T||!T.version||0===T.version.indexOf("v0.")||0===T.version.indexOf("v1.")&&0!==T.version.indexOf("v1.8.")?{nextTick:function S(R,D,m,y){if("function"!=typeof R)throw new TypeError('"callback" argument must be a function');var _,I,v=arguments.length;switch(v){case 0:case 1:return T.nextTick(R);case 2:return T.nextTick(function(){R.call(null,D)});case 3:return T.nextTick(function(){R.call(null,D,m)});case 4:return T.nextTick(function(){R.call(null,D,m,y)});default:for(_=new Array(v-1),I=0;I<_.length;)_[I++]=arguments[I];return T.nextTick(function(){R.apply(null,_)})}}}:T}).call(this)}).call(this,V("_process"))},{_process:69}],46:[function(V,X,re){"use strict";var S={};function R(_,I,z){z||(z=Error);var P=function(M){function O(F,B,Q){return M.call(this,function C(M,O,F){return"string"==typeof I?I:I(M,O,F)}(F,B,Q))||this}return function T(_,I){_.prototype=Object.create(I.prototype),_.prototype.constructor=_,_.__proto__=I}(O,M),O}(z);P.prototype.name=z.name,P.prototype.code=_,S[_]=P}function D(_,I){if(Array.isArray(_)){var z=_.length;return _=_.map(function(C){return String(C)}),z>2?"one of ".concat(I," ").concat(_.slice(0,z-1).join(", "),", or ")+_[z-1]:2===z?"one of ".concat(I," ").concat(_[0]," or ").concat(_[1]):"of ".concat(I," ").concat(_[0])}return"of ".concat(I," ").concat(String(_))}R("ERR_INVALID_OPT_VALUE",function(_,I){return'The value "'+I+'" is invalid for option "'+_+'"'},TypeError),R("ERR_INVALID_ARG_TYPE",function(_,I,z){var C,P;if("string"==typeof I&&function m(_,I,z){return _.substr(!z||z<0?0:+z,I.length)===I}(I,"not ")?(C="must not be",I=I.replace(/^not /,"")):C="must be",function y(_,I,z){return(void 0===z||z>_.length)&&(z=_.length),_.substring(z-I.length,z)===I}(_," argument"))P="The ".concat(_," ").concat(C," ").concat(D(I,"type"));else{var M=function v(_,I,z){return"number"!=typeof z&&(z=0),!(z+I.length>_.length)&&-1!==_.indexOf(I,z)}(_,".")?"property":"argument";P='The "'.concat(_,'" ').concat(M," ").concat(C," ").concat(D(I,"type"))}return P+". Received type ".concat(typeof z)},TypeError),R("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),R("ERR_METHOD_NOT_IMPLEMENTED",function(_){return"The "+_+" method is not implemented"}),R("ERR_STREAM_PREMATURE_CLOSE","Premature close"),R("ERR_STREAM_DESTROYED",function(_){return"Cannot call "+_+" after a stream was destroyed"}),R("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),R("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),R("ERR_STREAM_WRITE_AFTER_END","write after end"),R("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),R("ERR_UNKNOWN_ENCODING",function(_){return"Unknown encoding: "+_},TypeError),R("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),X.exports.codes=S},{}],47:[function(V,X,re){(function(T){(function(){"use strict";var S=Object.keys||function(C){var P=[];for(var M in C)P.push(M);return P};X.exports=_;var R=V("./_stream_readable"),D=V("./_stream_writable");V("inherits")(_,R);for(var m=S(D.prototype),y=0;y0)if("string"!=typeof h&&!Z.objectMode&&Object.getPrototypeOf(h)!==v.prototype&&(h=function I(A){return v.from(A)}(h)),p)Z.endEmitted?E(A,new le):Fe(A,Z,h,!0);else if(Z.ended)E(A,new oe);else{if(Z.destroyed)return!1;Z.reading=!1,Z.decoder&&!u?(h=Z.decoder.write(h),Z.objectMode||0!==h.length?Fe(A,Z,h,!1):ee(A,Z)):Fe(A,Z,h,!1)}else p||(Z.reading=!1,ee(A,Z));return!Z.ended&&(Z.lengthh.highWaterMark&&(h.highWaterMark=function Ne(A){return A>=Ye?A=Ye:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}(A)),A<=h.length?A:h.ended?h.length:(h.needReadable=!0,0))}function ve(A){var h=A._readableState;P("emitReadable",h.needReadable,h.emittedReadable),h.needReadable=!1,h.emittedReadable||(P("emitReadable",h.flowing),h.emittedReadable=!0,T.nextTick(U,A))}function U(A){var h=A._readableState;P("emitReadable_",h.destroyed,h.length,h.ended),!h.destroyed&&(h.length||h.ended)&&(A.emit("readable"),h.emittedReadable=!1),h.needReadable=!h.flowing&&!h.ended&&h.length<=h.highWaterMark,W(A)}function ee(A,h){h.readingMore||(h.readingMore=!0,T.nextTick(be,A,h))}function be(A,h){for(;!h.reading&&!h.ended&&(h.length0,h.resumeScheduled&&!h.paused?h.flowing=!0:A.listenerCount("data")>0&&A.resume()}function $(A){P("readable nexttick read 0"),A.read(0)}function Re(A,h){P("resume",h.reading),h.reading||A.read(0),h.resumeScheduled=!1,A.emit("resume"),W(A),h.flowing&&!h.reading&&A.read(0)}function W(A){var h=A._readableState;for(P("flow",h.flowing);h.flowing&&null!==A.read(););}function g(A,h){return 0===h.length?null:(h.objectMode?u=h.buffer.shift():!A||A>=h.length?(u=h.decoder?h.buffer.join(""):1===h.buffer.length?h.buffer.first():h.buffer.concat(h.length),h.buffer.clear()):u=h.buffer.consume(A,h.decoder),u);var u}function b(A){var h=A._readableState;P("endReadable",h.endEmitted),h.endEmitted||(h.ended=!0,T.nextTick(q,h,A))}function q(A,h){if(P("endReadableNT",A.endEmitted,A.length),!A.endEmitted&&0===A.length&&(A.endEmitted=!0,h.readable=!1,h.emit("end"),A.autoDestroy)){var u=h._writableState;(!u||u.autoDestroy&&u.finished)&&h.destroy()}}function ne(A,h){for(var u=0,p=A.length;u=h.highWaterMark:h.length>0)||h.ended))return P("read: emitReadable",h.length,h.ended),0===h.length&&h.ended?b(this):ve(this),null;if(0===(A=Pe(A,h))&&h.ended)return 0===h.length&&b(this),null;var L,p=h.needReadable;return P("need readable",p),(0===h.length||h.length-A0?g(A,h):null)?(h.needReadable=h.length<=h.highWaterMark,A=0):(h.length-=A,h.awaitDrain=0),0===h.length&&(h.ended||(h.needReadable=!0),u!==A&&h.ended&&b(this)),null!==L&&this.emit("data",L),L},Ce.prototype._read=function(A){E(this,new de("_read()"))},Ce.prototype.pipe=function(A,h){var u=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=A;break;case 1:p.pipes=[p.pipes,A];break;default:p.pipes.push(A)}p.pipesCount+=1,P("pipe count=%d opts=%j",p.pipesCount,h);var Z=h&&!1===h.end||A===T.stdout||A===T.stderr?Oi:Se;function me(Vr,Hr){P("onunpipe"),Vr===u&&Hr&&!1===Hr.hasUnpiped&&(Hr.hasUnpiped=!0,function Vt(){P("cleanup"),A.removeListener("close",zn),A.removeListener("finish",_i),A.removeListener("drain",Ze),A.removeListener("error",Bt),A.removeListener("unpipe",me),u.removeListener("end",Se),u.removeListener("end",Oi),u.removeListener("data",nn),yt=!0,p.awaitDrain&&(!A._writableState||A._writableState.needDrain)&&Ze()}())}function Se(){P("onend"),A.end()}p.endEmitted?T.nextTick(Z):u.once("end",Z),A.on("unpipe",me);var Ze=function xe(A){return function(){var u=A._readableState;P("pipeOnDrain",u.awaitDrain),u.awaitDrain&&u.awaitDrain--,0===u.awaitDrain&&m(A,"data")&&(u.flowing=!0,W(A))}}(u);A.on("drain",Ze);var yt=!1;function nn(Vr){P("ondata");var Hr=A.write(Vr);P("dest.write",Hr),!1===Hr&&((1===p.pipesCount&&p.pipes===A||p.pipesCount>1&&-1!==ne(p.pipes,A))&&!yt&&(P("false write response, pause",p.awaitDrain),p.awaitDrain++),u.pause())}function Bt(Vr){P("onerror",Vr),Oi(),A.removeListener("error",Bt),0===m(A,"error")&&E(A,Vr)}function zn(){A.removeListener("finish",_i),Oi()}function _i(){P("onfinish"),A.removeListener("close",zn),Oi()}function Oi(){P("unpipe"),u.unpipe(A)}return u.on("data",nn),function J(A,h,u){if("function"==typeof A.prependListener)return A.prependListener(h,u);A._events&&A._events[h]?Array.isArray(A._events[h])?A._events[h].unshift(u):A._events[h]=[u,A._events[h]]:A.on(h,u)}(A,"error",Bt),A.once("close",zn),A.once("finish",_i),A.emit("pipe",u),p.flowing||(P("pipe resume"),u.resume()),A},Ce.prototype.unpipe=function(A){var h=this._readableState,u={hasUnpiped:!1};if(0===h.pipesCount)return this;if(1===h.pipesCount)return A&&A!==h.pipes||(A||(A=h.pipes),h.pipes=null,h.pipesCount=0,h.flowing=!1,A&&A.emit("unpipe",this,u)),this;if(!A){var p=h.pipes,L=h.pipesCount;h.pipes=null,h.pipesCount=0,h.flowing=!1;for(var Z=0;Z0,!1!==p.flowing&&this.resume()):"readable"===A&&!p.endEmitted&&!p.readableListening&&(p.readableListening=p.needReadable=!0,p.flowing=!1,p.emittedReadable=!1,P("on readable",p.length,p.reading),p.length?ve(this):p.reading||T.nextTick($,this)),u},Ce.prototype.removeListener=function(A,h){var u=y.prototype.removeListener.call(this,A,h);return"readable"===A&&T.nextTick(ie,this),u},Ce.prototype.removeAllListeners=function(A){var h=y.prototype.removeAllListeners.apply(this,arguments);return("readable"===A||void 0===A)&&T.nextTick(ie,this),h},Ce.prototype.resume=function(){var A=this._readableState;return A.flowing||(P("resume"),A.flowing=!A.readableListening,function ye(A,h){h.resumeScheduled||(h.resumeScheduled=!0,T.nextTick(Re,A,h))}(this,A)),A.paused=!1,this},Ce.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Ce.prototype.wrap=function(A){var h=this,u=this._readableState,p=!1;for(var L in A.on("end",function(){if(P("wrapped end"),u.decoder&&!u.ended){var me=u.decoder.end();me&&me.length&&h.push(me)}h.push(null)}),A.on("data",function(me){P("wrapped data"),u.decoder&&(me=u.decoder.write(me)),u.objectMode&&null==me||!(u.objectMode||me&&me.length)||h.push(me)||(p=!0,A.pause())}),A)void 0===this[L]&&"function"==typeof A[L]&&(this[L]=function(Se){return function(){return A[Se].apply(A,arguments)}}(L));for(var Z=0;Z-1))throw new H(g);return this._writableState.defaultEncoding=g,this},Object.defineProperty(pe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(pe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),pe.prototype._write=function(W,g,b){b(new Q("_write()"))},pe.prototype._writev=null,pe.prototype.end=function(W,g,b){var q=this._writableState;return"function"==typeof W?(b=W,W=null,g=null):"function"==typeof g&&(b=g,g=null),null!=W&&this.write(W,g),q.corked&&(q.corked=1,this.uncork()),q.ending||function ye(W,g,b){g.ending=!0,$(W,g),b&&(g.finished?T.nextTick(b):W.once("finish",b)),g.ended=!0,W.writable=!1}(this,q,b),this},Object.defineProperty(pe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(pe.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(g){!this._writableState||(this._writableState.destroyed=g)}}),pe.prototype.destroy=P.destroy,pe.prototype._undestroy=P.undestroy,pe.prototype._destroy=function(W,g){g(W)}}).call(this)}).call(this,V("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":46,"./_stream_duplex":47,"./internal/streams/destroy":54,"./internal/streams/state":58,"./internal/streams/stream":59,_process:69,buffer:3,inherits:34,"util-deprecate":65}],52:[function(V,X,re){(function(T){(function(){"use strict";var S;function R(oe,de,le){return de in oe?Object.defineProperty(oe,de,{value:le,enumerable:!0,configurable:!0,writable:!0}):oe[de]=le,oe}var D=V("./end-of-stream"),m=Symbol("lastResolve"),y=Symbol("lastReject"),v=Symbol("error"),_=Symbol("ended"),I=Symbol("lastPromise"),z=Symbol("handlePromise"),C=Symbol("stream");function P(oe,de){return{value:oe,done:de}}function M(oe){var de=oe[m];if(null!==de){var le=oe[C].read();null!==le&&(oe[I]=null,oe[m]=null,oe[y]=null,de(P(le,!1)))}}function O(oe){T.nextTick(M,oe)}var B=Object.getPrototypeOf(function(){}),Q=Object.setPrototypeOf((R(S={get stream(){return this[C]},next:function(){var de=this,le=this[v];if(null!==le)return Promise.reject(le);if(this[_])return Promise.resolve(P(void 0,!0));if(this[C].destroyed)return new Promise(function(E,se){T.nextTick(function(){de[v]?se(de[v]):E(P(void 0,!0))})});var H,Y=this[I];if(Y)H=new Promise(function F(oe,de){return function(le,Y){oe.then(function(){de[_]?le(P(void 0,!0)):de[z](le,Y)},Y)}}(Y,this));else{var N=this[C].read();if(null!==N)return Promise.resolve(P(N,!1));H=new Promise(this[z])}return this[I]=H,H}},Symbol.asyncIterator,function(){return this}),R(S,"return",function(){var de=this;return new Promise(function(le,Y){de[C].destroy(null,function(H){H?Y(H):le(P(void 0,!0))})})}),S),B);X.exports=function(de){var le,Y=Object.create(Q,(R(le={},C,{value:de,writable:!0}),R(le,m,{value:null,writable:!0}),R(le,y,{value:null,writable:!0}),R(le,v,{value:null,writable:!0}),R(le,_,{value:de._readableState.endEmitted,writable:!0}),R(le,z,{value:function(N,E){var se=Y[C].read();se?(Y[I]=null,Y[m]=null,Y[y]=null,N(P(se,!1))):(Y[m]=N,Y[y]=E)},writable:!0}),le));return Y[I]=null,D(de,function(H){if(H&&"ERR_STREAM_PREMATURE_CLOSE"!==H.code){var N=Y[y];return null!==N&&(Y[I]=null,Y[m]=null,Y[y]=null,N(H)),void(Y[v]=H)}var E=Y[m];null!==E&&(Y[I]=null,Y[m]=null,Y[y]=null,E(P(void 0,!0))),Y[_]=!0}),de.on("readable",O.bind(null,Y)),Y}}).call(this)}).call(this,V("_process"))},{"./end-of-stream":55,_process:69}],53:[function(V,X,re){"use strict";function T(M,O){var F=Object.keys(M);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(M);O&&(B=B.filter(function(Q){return Object.getOwnPropertyDescriptor(M,Q).enumerable})),F.push.apply(F,B)}return F}function R(M,O,F){return O in M?Object.defineProperty(M,O,{value:F,enumerable:!0,configurable:!0,writable:!0}):M[O]=F,M}function m(M,O){for(var F=0;F0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(F){var B={data:F,next:this.head};0===this.length&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(0!==this.length){var F=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,F}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(F){if(0===this.length)return"";for(var B=this.head,Q=""+B.data;B=B.next;)Q+=F+B.data;return Q}},{key:"concat",value:function(F){if(0===this.length)return _.alloc(0);for(var B=_.allocUnsafe(F>>>0),Q=this.head,G=0;Q;)P(Q.data,B,G),G+=Q.data.length,Q=Q.next;return B}},{key:"consume",value:function(F,B){var Q;return Foe.length?oe.length:F;if(G+=de===oe.length?oe:oe.slice(0,F),0==(F-=de)){de===oe.length?(++Q,this.head=B.next?B.next:this.tail=null):(this.head=B,B.data=oe.slice(de));break}++Q}return this.length-=Q,G}},{key:"_getBuffer",value:function(F){var B=_.allocUnsafe(F),Q=this.head,G=1;for(Q.data.copy(B),F-=Q.data.length;Q=Q.next;){var oe=Q.data,de=F>oe.length?oe.length:F;if(oe.copy(B,B.length-F,0,de),0==(F-=de)){de===oe.length?(++G,this.head=Q.next?Q.next:this.tail=null):(this.head=Q,Q.data=oe.slice(de));break}++G}return this.length-=G,B}},{key:C,value:function(F,B){return z(this,function S(M){for(var O=1;O0,function(H){Q||(Q=H),H&&G.forEach(I),!le&&(G.forEach(I),B(Q))})});return O.reduce(z)}},{"../../../errors":46,"./end-of-stream":55}],58:[function(V,X,re){"use strict";var T=V("../../../errors").codes.ERR_INVALID_OPT_VALUE;X.exports={getHighWaterMark:function R(D,m,y,v){var _=function S(D,m,y){return null!=D.highWaterMark?D.highWaterMark:m?D[y]:null}(m,v,y);if(null!=_){if(!isFinite(_)||Math.floor(_)!==_||_<0)throw new T(v?y:"highWaterMark",_);return Math.floor(_)}return D.objectMode?16:16384}}},{"../../../errors":46}],59:[function(V,X,re){arguments[4][29][0].apply(re,arguments)},{dup:29,events:4}],60:[function(V,X,re){(re=X.exports=V("./lib/_stream_readable.js")).Stream=re,re.Readable=re,re.Writable=V("./lib/_stream_writable.js"),re.Duplex=V("./lib/_stream_duplex.js"),re.Transform=V("./lib/_stream_transform.js"),re.PassThrough=V("./lib/_stream_passthrough.js"),re.finished=V("./lib/internal/streams/end-of-stream.js"),re.pipeline=V("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":47,"./lib/_stream_passthrough.js":48,"./lib/_stream_readable.js":49,"./lib/_stream_transform.js":50,"./lib/_stream_writable.js":51,"./lib/internal/streams/end-of-stream.js":55,"./lib/internal/streams/pipeline.js":57}],61:[function(V,X,re){"use strict";function T(R,D,m){var y=this;this._callback=R,this._args=m,this._interval=setInterval(R,D,this._args),this.reschedule=function(v){v||(v=y._interval),y._interval&&clearInterval(y._interval),y._interval=setInterval(y._callback,v,y._args)},this.clear=function(){y._interval&&(clearInterval(y._interval),y._interval=void 0)},this.destroy=function(){y._interval&&clearInterval(y._interval),y._callback=void 0,y._interval=void 0,y._args=void 0}}X.exports=function S(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var R;if(arguments.length>0){R=new Array(arguments.length-2);for(var D=0;D1)for(var G=1;G= 0x80 (not a basic code point)","invalid-input":"Invalid input"},le=Math.floor,Y=String.fromCharCode;function N(_e){throw new RangeError(oe[_e])}function E(_e,ve){for(var U=_e.length,ee=[];U--;)ee[U]=ve(_e[U]);return ee}function se(_e,ve){var U=_e.split("@"),ee="";return U.length>1&&(ee=U[0]+"@",_e=U[1]),ee+E((_e=_e.replace(G,".")).split("."),ve).join(".")}function J(_e){for(var be,xe,ve=[],U=0,ee=_e.length;U=55296&&be<=56319&&U65535&&(U+=Y((ve-=65536)>>>10&1023|55296),ve=56320|1023&ve),U+Y(ve)}).join("")}function Ce(_e){return _e-48<10?_e-22:_e-65<26?_e-65:_e-97<26?_e-97:_}function ge(_e,ve){return _e+22+75*(_e<26)-((0!=ve)<<5)}function Fe(_e,ve,U){var ee=0;for(_e=U?le(_e/700):_e>>1,_e+=le(_e/ve);_e>455;ee+=_)_e=le(_e/35);return le(ee+36*_e/(_e+38))}function ue(_e){var ee,$,ye,Re,W,g,b,q,ne,A,ve=[],U=_e.length,be=0,xe=128,ie=72;for(($=_e.lastIndexOf("-"))<0&&($=0),ye=0;ye<$;++ye)_e.charCodeAt(ye)>=128&&N("not-basic"),ve.push(_e.charCodeAt(ye));for(Re=$>0?$+1:0;Re=U&&N("invalid-input"),((q=Ce(_e.charCodeAt(Re++)))>=_||q>le((v-be)/g))&&N("overflow"),be+=q*g,!(q<(ne=b<=ie?1:b>=ie+26?26:b-ie));b+=_)g>le(v/(A=_-ne))&&N("overflow"),g*=A;ie=Fe(be-W,ee=ve.length+1,0==W),le(be/ee)>v-xe&&N("overflow"),xe+=le(be/ee),be%=ee,ve.splice(be++,0,xe)}return pe(ve)}function Ye(_e){var ve,U,ee,be,xe,ie,$,ye,Re,W,g,q,ne,A,h,b=[];for(q=(_e=J(_e)).length,ve=128,U=0,xe=72,ie=0;ie=ve&&g<$&&($=g);for($-ve>le((v-U)/(ne=ee+1))&&N("overflow"),U+=($-ve)*ne,ve=$,ie=0;iev&&N("overflow"),g==ve){for(ye=U,Re=_;!(ye<(W=Re<=xe?1:Re>=xe+26?26:Re-xe));Re+=_)b.push(Y(ge(W+(h=ye-W)%(A=_-W),0))),ye=le(h/A);b.push(Y(ge(ye,0))),xe=Fe(U,ne,ee==be),U=0,++ee}++U,++ve}return b.join("")}if(y={version:"1.4.1",ucs2:{decode:J,encode:pe},decode:ue,encode:Ye,toASCII:function Pe(_e){return se(_e,function(ve){return Q.test(ve)?"xn--"+Ye(ve):ve})},toUnicode:function Ne(_e){return se(_e,function(ve){return B.test(ve)?ue(ve.slice(4).toLowerCase()):ve})}},R&&D)if(X.exports==R)D.exports=y;else for(H in y)y.hasOwnProperty(H)&&(R[H]=y[H]);else S.punycode=y}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],71:[function(V,X,re){"use strict";function T(R,D){return Object.prototype.hasOwnProperty.call(R,D)}X.exports=function(R,D,m,y){m=m||"=";var v={};if("string"!=typeof R||0===R.length)return v;var _=/\+/g;R=R.split(D=D||"&");var I=1e3;y&&"number"==typeof y.maxKeys&&(I=y.maxKeys);var z=R.length;I>0&&z>I&&(z=I);for(var C=0;C=0?(O=P.substr(0,M),F=P.substr(M+1)):(O=P,F=""),B=decodeURIComponent(O),Q=decodeURIComponent(F),T(v,B)?S(v[B])?v[B].push(Q):v[B]=[v[B],Q]:v[B]=Q}return v};var S=Array.isArray||function(R){return"[object Array]"===Object.prototype.toString.call(R)}},{}],72:[function(V,X,re){"use strict";var T=function(m){switch(typeof m){case"string":return m;case"boolean":return m?"true":"false";case"number":return isFinite(m)?m:"";default:return""}};X.exports=function(m,y,v,_){return y=y||"&",v=v||"=",null===m&&(m=void 0),"object"==typeof m?R(D(m),function(I){var z=encodeURIComponent(T(I))+v;return S(m[I])?R(m[I],function(C){return z+encodeURIComponent(T(C))}).join(y):z+encodeURIComponent(T(m[I]))}).join(y):_?encodeURIComponent(T(_))+v+encodeURIComponent(T(m)):""};var S=Array.isArray||function(m){return"[object Array]"===Object.prototype.toString.call(m)};function R(m,y){if(m.map)return m.map(y);for(var v=[],_=0;_=0&&(I._idleTimeoutId=setTimeout(function(){I._onTimeout&&I._onTimeout()},z))},re.setImmediate="function"==typeof T?T:function(I){var z=v++,C=!(arguments.length<2)&&m.call(arguments,1);return y[z]=!0,R(function(){y[z]&&(C?I.apply(null,C):I.call(null),re.clearImmediate(z))}),z},re.clearImmediate="function"==typeof S?S:function(I){delete y[I]}}).call(this)}).call(this,V("timers").setImmediate,V("timers").clearImmediate)},{"process/browser.js":69,timers:74}],75:[function(V,X,re){"use strict";var T=V("punycode"),S=V("./util");function R(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}re.parse=oe,re.resolve=function le(H,N){return oe(H,!1,!0).resolve(N)},re.resolveObject=function Y(H,N){return H?oe(H,!1,!0).resolveObject(N):N},re.format=function de(H){return S.isString(H)&&(H=oe(H)),H instanceof R?H.format():R.prototype.format.call(H)},re.Url=R;var D=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,y=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,_=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),I=["'"].concat(_),z=["%","/","?",";","#"].concat(I),C=["/","?","#"],M=/^[+a-z0-9A-Z_-]{0,63}$/,O=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,F={javascript:!0,"javascript:":!0},B={javascript:!0,"javascript:":!0},Q={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},G=V("querystring");function oe(H,N,E){if(H&&S.isObject(H)&&H instanceof R)return H;var se=new R;return se.parse(H,N,E),se}R.prototype.parse=function(H,N,E){if(!S.isString(H))throw new TypeError("Parameter 'url' must be a string, not "+typeof H);var se=H.indexOf("?"),J=-1!==se&&se127?ye+="x":ye+=$[Re];if(!ye.match(M)){var g=xe.slice(0,_e),b=xe.slice(_e+1),q=$.match(O);q&&(g.push(q[1]),b.unshift(q[2])),b.length&&(ge="/"+b.join(".")+ge),this.hostname=g.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),be||(this.hostname=T.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,be&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==ge[0]&&(ge="/"+ge))}if(!F[Ye])for(_e=0,ie=I.length;_e0)&&E.host.split("@"))&&(E.auth=ye.shift(),E.host=E.hostname=ye.shift())),E.search=H.search,E.query=H.query,(!S.isNull(E.pathname)||!S.isNull(E.search))&&(E.path=(E.pathname?E.pathname:"")+(E.search?E.search:"")),E.href=E.format(),E;if(!xe.length)return E.pathname=null,E.path=E.search?"/"+E.search:null,E.href=E.format(),E;for(var Re=xe.slice(-1)[0],W=(E.host||H.host||xe.length>1)&&("."===Re||".."===Re)||""===Re,g=0,b=xe.length;b>=0;b--)"."===(Re=xe[b])?xe.splice(b,1):".."===Re?(xe.splice(b,1),g++):g&&(xe.splice(b,1),g--);if(!ee&&!be)for(;g--;g)xe.unshift("..");ee&&""!==xe[0]&&(!xe[0]||"/"!==xe[0].charAt(0))&&xe.unshift(""),W&&"/"!==xe.join("/").substr(-1)&&xe.push("");var ye,q=""===xe[0]||xe[0]&&"/"===xe[0].charAt(0);return $&&(E.hostname=E.host=q?"":xe.length?xe.shift():"",(ye=!!(E.host&&E.host.indexOf("@")>0)&&E.host.split("@"))&&(E.auth=ye.shift(),E.host=E.hostname=ye.shift())),(ee=ee||E.host&&xe.length)&&!q&&xe.unshift(""),xe.length?E.pathname=xe.join("/"):(E.pathname=null,E.path=null),(!S.isNull(E.pathname)||!S.isNull(E.search))&&(E.path=(E.pathname?E.pathname:"")+(E.search?E.search:"")),E.auth=H.auth||E.auth,E.slashes=E.slashes||H.slashes,E.href=E.format(),E},R.prototype.parseHost=function(){var H=this.host,N=m.exec(H);N&&(":"!==(N=N[0])&&(this.port=N.substr(1)),H=H.substr(0,H.length-N.length)),H&&(this.hostname=H)}},{"./util":76,punycode:70,querystring:73}],76:[function(V,X,re){"use strict";X.exports={isString:function(T){return"string"==typeof T},isObject:function(T){return"object"==typeof T&&null!==T},isNull:function(T){return null===T},isNullOrUndefined:function(T){return null==T}}},{}]},{},[15])(15)},703:js=>{js.exports=function ps(){for(var ut={},Br=0;Br{js(js.s=736)}]); \ No newline at end of file diff --git a/application-services/custom/camera-management/web-ui/dist/main.6e157b4d187e4c5d.js b/application-services/custom/camera-management/web-ui/dist/main.6e157b4d187e4c5d.js deleted file mode 100644 index 4783dff1..00000000 --- a/application-services/custom/camera-management/web-ui/dist/main.6e157b4d187e4c5d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkcamera_management_web_ui=self.webpackChunkcamera_management_web_ui||[]).push([[179],{736:(js,Ga,ps)=>{"use strict";function dt(n){return"function"==typeof n}function Br(n){const e=n(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const ms=Br(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function V(n,t){if(n){const e=n.indexOf(t);0<=e&&n.splice(e,1)}}class X{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const s of e)s.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(dt(i))try{i()}catch(s){t=s instanceof ms?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{S(s)}catch(o){t=null!=t?t:[],o instanceof ms?t=[...t,...o.errors]:t.push(o)}}if(t)throw new ms(t)}}add(t){var e;if(t&&t!==this)if(this.closed)S(t);else{if(t instanceof X){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&V(e,t)}remove(t){const{_finalizers:e}=this;e&&V(e,t),t instanceof X&&t._removeParent(this)}}X.EMPTY=(()=>{const n=new X;return n.closed=!0,n})();const re=X.EMPTY;function T(n){return n instanceof X||n&&"closed"in n&&dt(n.remove)&&dt(n.add)&&dt(n.unsubscribe)}function S(n){dt(n)?n():n.unsubscribe()}const R={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},D={setTimeout(n,t,...e){const{delegate:i}=D;return null!=i&&i.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){const{delegate:t}=D;return((null==t?void 0:t.clearTimeout)||clearTimeout)(n)},delegate:void 0};function m(n){D.setTimeout(()=>{const{onUnhandledError:t}=R;if(!t)throw n;t(n)})}function y(){}const v=z("C",void 0,void 0);function z(n,t,e){return{kind:n,value:t,error:e}}let C=null;function P(n){if(R.useDeprecatedSynchronousErrorHandling){const t=!C;if(t&&(C={errorThrown:!1,error:null}),n(),t){const{errorThrown:e,error:i}=C;if(C=null,e)throw i}}else n()}class O extends X{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,T(t)&&t.add(this)):this.destination=Y}static create(t,e,i){return new G(t,e,i)}next(t){this.isStopped?le(function I(n){return z("N",n,void 0)}(t),this):this._next(t)}error(t){this.isStopped?le(function _(n){return z("E",void 0,n)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?le(v,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const F=Function.prototype.bind;function B(n,t){return F.call(n,t)}class Q{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){oe(i)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){oe(i)}else oe(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){oe(e)}}}class G extends O{constructor(t,e,i){let r;if(super(),dt(t)||!t)r={next:null!=t?t:void 0,error:null!=e?e:void 0,complete:null!=i?i:void 0};else{let s;this&&R.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&B(t.next,s),error:t.error&&B(t.error,s),complete:t.complete&&B(t.complete,s)}):r=t}this.destination=new Q(r)}}function oe(n){R.useDeprecatedSynchronousErrorHandling?function M(n){R.useDeprecatedSynchronousErrorHandling&&C&&(C.errorThrown=!0,C.error=n)}(n):m(n)}function le(n,t){const{onStoppedNotification:e}=R;e&&D.setTimeout(()=>e(n,t))}const Y={closed:!0,next:y,error:function de(n){throw n},complete:y},H="function"==typeof Symbol&&Symbol.observable||"@@observable";function N(n){return n}let J=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const s=function me(n){return n&&n instanceof O||function we(n){return n&&dt(n.next)&&dt(n.error)&&dt(n.complete)}(n)&&T(n)}(e)?e:new G(e,i,r);return P(()=>{const{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return new(i=fe(i))((r,s)=>{const o=new G({next:a=>{try{e(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[H](){return this}pipe(...e){return function se(n){return 0===n.length?N:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}(e)(this)}toPromise(e){return new(e=fe(e))((i,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>i(s))})}}return n.create=t=>new n(t),n})();function fe(n){var t;return null!==(t=null!=n?n:R.Promise)&&void 0!==t?t:Promise}const Fe=Br(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let ue=(()=>{class n extends J{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const i=new Ye(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new Fe}next(e){P(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(e)}})}error(e){P(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){P(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:i,isStopped:r,observers:s}=this;return i||r?re:(this.currentObservers=null,s.push(e),new X(()=>{this.currentObservers=null,V(s,e)}))}_checkFinalizedStatuses(e){const{hasError:i,thrownError:r,isStopped:s}=this;i?e.error(r):s&&e.complete()}asObservable(){const e=new J;return e.source=this,e}}return n.create=(t,e)=>new Ye(t,e),n})();class Ye extends ue{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,t)}error(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,t)}complete(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)}_subscribe(t){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==i?i:re}}function Ne(n){return dt(null==n?void 0:n.lift)}function Re(n){return t=>{if(Ne(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function ge(n,t,e,i,r){return new ve(n,t,e,i,r)}class ve extends O{constructor(t,e,i,r,s,o){super(t),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:e}=this;super.unsubscribe(),!e&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function U(n,t){return Re((e,i)=>{let r=0;e.subscribe(ge(i,s=>{i.next(n.call(t,s,r++))}))})}function L(n){return this instanceof L?(this.v=n,this):new L(n)}function Z(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e.apply(n,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(w){i[w]&&(r[w]=function(k){return new Promise(function(j,K){s.push([w,k,j,K])>1||a(w,k)})})}function a(w,k){try{!function l(w){w.value instanceof L?Promise.resolve(w.value.v).then(c,d):f(s[0][2],w)}(i[w](k))}catch(j){f(s[0][3],j)}}function c(w){a("next",w)}function d(w){a("throw",w)}function f(w,k){w(k),s.shift(),s.length&&a(s[0][0],s[0][1])}}function Se(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=n[Symbol.asyncIterator];return t?t.call(n):(n=function ne(n){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(s){e[s]=n[s]&&function(o){return new Promise(function(a,l){!function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}(a,l,(o=n[s](o)).done,o.value)})}}}const Ii=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function Vr(n){return dt(null==n?void 0:n.then)}function Hr(n){return dt(n[H])}function Kv(n){return Symbol.asyncIterator&&dt(null==n?void 0:n[Symbol.asyncIterator])}function Qv(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Zv=function pA(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Xv(n){return dt(null==n?void 0:n[Zv])}function Jv(n){return Z(this,arguments,function*(){const e=n.getReader();try{for(;;){const{value:i,done:r}=yield L(e.read());if(r)return yield L(void 0);yield yield L(i)}}finally{e.releaseLock()}})}function ey(n){return dt(null==n?void 0:n.getReader)}function li(n){if(n instanceof J)return n;if(null!=n){if(Hr(n))return function mA(n){return new J(t=>{const e=n[H]();if(dt(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(Ii(n))return function gA(n){return new J(t=>{for(let e=0;e{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,m)})}(n);if(Kv(n))return ty(n);if(Xv(n))return function vA(n){return new J(t=>{for(const e of n)if(t.next(e),t.closed)return;t.complete()})}(n);if(ey(n))return function yA(n){return ty(Jv(n))}(n)}throw Qv(n)}function ty(n){return new J(t=>{(function bA(n,t){var e,i,r,s;return function W(n,t,e,i){return new(e||(e=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(f){o(f)}}function l(d){try{c(i.throw(d))}catch(f){o(f)}}function c(d){d.done?s(d.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(d.value).then(a,l)}c((i=i.apply(n,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Se(n);!(i=yield e.next()).done;)if(t.next(i.value),t.closed)return}catch(o){r={error:o}}finally{try{i&&!i.done&&(s=e.return)&&(yield s.call(e))}finally{if(r)throw r.error}}t.complete()})})(n,t).catch(e=>t.error(e))})}function jr(n,t,e,i=0,r=!1){const s=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(s),!r)return s}function Pn(n,t,e=1/0){return dt(t)?Pn((i,r)=>U((s,o)=>t(i,s,r,o))(li(n(i,r))),e):("number"==typeof t&&(e=t),Re((i,r)=>function wA(n,t,e,i,r,s,o,a){const l=[];let c=0,d=0,f=!1;const w=()=>{f&&!l.length&&!c&&t.complete()},k=K=>c{s&&t.next(K),c++;let ae=!1;li(e(K,d++)).subscribe(ge(t,ce=>{null==r||r(ce),s?k(ce):t.next(ce)},()=>{ae=!0},void 0,()=>{if(ae)try{for(c--;l.length&&cj(ce)):j(ce)}w()}catch(ce){t.error(ce)}}))};return n.subscribe(ge(t,k,()=>{f=!0,w()})),()=>{null==a||a()}}(i,r,n,e)))}function To(n=1/0){return Pn(N,n)}const Ri=new J(n=>n.complete());function ny(n){return n&&dt(n.schedule)}function Jh(n){return n[n.length-1]}function iy(n){return dt(Jh(n))?n.pop():void 0}function Wa(n){return ny(Jh(n))?n.pop():void 0}function ry(n,t=0){return Re((e,i)=>{e.subscribe(ge(i,r=>jr(i,n,()=>i.next(r),t),()=>jr(i,n,()=>i.complete(),t),r=>jr(i,n,()=>i.error(r),t)))})}function sy(n,t=0){return Re((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function oy(n,t){if(!n)throw new Error("Iterable cannot be null");return new J(e=>{jr(e,t,()=>{const i=n[Symbol.asyncIterator]();jr(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function gn(n,t){return t?function TA(n,t){if(null!=n){if(Hr(n))return function EA(n,t){return li(n).pipe(sy(t),ry(t))}(n,t);if(Ii(n))return function xA(n,t){return new J(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}(n,t);if(Vr(n))return function MA(n,t){return li(n).pipe(sy(t),ry(t))}(n,t);if(Kv(n))return oy(n,t);if(Xv(n))return function SA(n,t){return new J(e=>{let i;return jr(e,t,()=>{i=n[Zv](),jr(e,t,()=>{let r,s;try{({value:r,done:s}=i.next())}catch(o){return void e.error(o)}s?e.complete():e.next(r)},0,!0)}),()=>dt(null==i?void 0:i.return)&&i.return()})}(n,t);if(ey(n))return function kA(n,t){return oy(Jv(n),t)}(n,t)}throw Qv(n)}(n,t):li(n)}function Un(...n){const t=Wa(n),e=function DA(n,t){return"number"==typeof Jh(n)?n.pop():t}(n,1/0),i=n;return i.length?1===i.length?li(i[0]):To(e)(gn(i,t)):Ri}function sn(n){return n<=0?()=>Ri:Re((t,e)=>{let i=0;t.subscribe(ge(e,r=>{++i<=n&&(e.next(r),n<=i&&e.complete())}))})}function ay(n={}){const{connector:t=(()=>new ue),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return s=>{let o=null,a=null,l=null,c=0,d=!1,f=!1;const w=()=>{null==a||a.unsubscribe(),a=null},k=()=>{w(),o=l=null,d=f=!1},j=()=>{const K=o;k(),null==K||K.unsubscribe()};return Re((K,ae)=>{c++,!f&&!d&&w();const ce=l=null!=l?l:t();ae.add(()=>{c--,0===c&&!f&&!d&&(a=ef(j,r))}),ce.subscribe(ae),o||(o=new G({next:Te=>ce.next(Te),error:Te=>{f=!0,w(),a=ef(k,e,Te),ce.error(Te)},complete:()=>{d=!0,w(),a=ef(k,i),ce.complete()}}),gn(K).subscribe(o))})(s)}}function ef(n,t,...e){return!0===t?(n(),null):!1===t?null:t(...e).pipe(sn(1)).subscribe(()=>n())}function Yt(n){for(let t in n)if(n[t]===Yt)return t;throw Error("Could not find renamed property on target object.")}function tf(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function Kt(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(Kt).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function nf(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const AA=Yt({__forward_ref__:Yt});function Ft(n){return n.__forward_ref__=Ft,n.toString=function(){return Kt(this())},n}function ft(n){return rf(n)?n():n}function rf(n){return"function"==typeof n&&n.hasOwnProperty(AA)&&n.__forward_ref__===Ft}class Be extends Error{constructor(t,e){super(function Pc(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}}function mt(n){return"string"==typeof n?n:null==n?"":String(n)}function Oc(n,t){throw new Be(-201,!1)}function _i(n,t){null==n&&function $t(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function Ae(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function qe(n){return{providers:n.providers||[],imports:n.imports||[]}}function sf(n){return ly(n,Fc)||ly(n,dy)}function ly(n,t){return n.hasOwnProperty(t)?n[t]:null}function cy(n){return n&&(n.hasOwnProperty(af)||n.hasOwnProperty(BA))?n[af]:null}const Fc=Yt({\u0275prov:Yt}),af=Yt({\u0275inj:Yt}),dy=Yt({ngInjectableDef:Yt}),BA=Yt({ngInjectorDef:Yt});var ot=(()=>((ot=ot||{})[ot.Default=0]="Default",ot[ot.Host=1]="Host",ot[ot.Self=2]="Self",ot[ot.SkipSelf=4]="SkipSelf",ot[ot.Optional=8]="Optional",ot))();let lf;function fr(n){const t=lf;return lf=n,t}function uy(n,t,e){const i=sf(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&ot.Optional?null:void 0!==t?t:void Oc(Kt(n))}function gs(n){return{toString:n}.toString()}var Yi=(()=>((Yi=Yi||{})[Yi.OnPush=0]="OnPush",Yi[Yi.Default=1]="Default",Yi))(),Ki=(()=>{return(n=Ki||(Ki={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",Ki;var n})();const qt=(()=>"undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof global&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self)(),Ao={},jt=[],Lc=Yt({\u0275cmp:Yt}),cf=Yt({\u0275dir:Yt}),df=Yt({\u0275pipe:Yt}),hy=Yt({\u0275mod:Yt}),zr=Yt({\u0275fac:Yt}),qa=Yt({__NG_ELEMENT_ID__:Yt});let HA=0;function _t(n){return gs(()=>{const e=!0===n.standalone,i={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===Yi.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||jt,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Ki.Emulated,id:"c"+HA++,styles:n.styles||jt,_:null,setInput:null,schemas:n.schemas||null,tView:null},s=n.dependencies,o=n.features;return r.inputs=my(n.inputs,i),r.outputs=my(n.outputs),o&&o.forEach(a=>a(r)),r.directiveDefs=s?()=>("function"==typeof s?s():s).map(fy).filter(py):null,r.pipeDefs=s?()=>("function"==typeof s?s():s).map(Xn).filter(py):null,r})}function fy(n){return Qt(n)||Zn(n)}function py(n){return null!==n}const UA={};function Ke(n){return gs(()=>{const t={type:n.type,bootstrap:n.bootstrap||jt,declarations:n.declarations||jt,imports:n.imports||jt,exports:n.exports||jt,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(UA[n.id]=n.type),t})}function my(n,t){if(null==n)return Ao;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),e[r]=i,t&&(t[r]=s)}return e}const Ee=_t;function ci(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Qt(n){return n[Lc]||null}function Zn(n){return n[cf]||null}function Xn(n){return n[df]||null}function vi(n,t){const e=n[hy]||null;if(!e&&!0===t)throw new Error(`Type ${Kt(n)} does not have '\u0275mod' property.`);return e}function di(n){return Array.isArray(n)&&"object"==typeof n[1]}function Zi(n){return Array.isArray(n)&&!0===n[1]}function ff(n){return 0!=(8&n.flags)}function Hc(n){return 2==(2&n.flags)}function jc(n){return 1==(1&n.flags)}function Xi(n){return null!==n.template}function qA(n){return 0!=(256&n[2])}function Ws(n,t){return n.hasOwnProperty(zr)?n[zr]:null}class QA{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function cn(){return vy}function vy(n){return n.type.prototype.ngOnChanges&&(n.setInput=XA),ZA}function ZA(){const n=by(this),t=null==n?void 0:n.current;if(t){const e=n.previous;if(e===Ao)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function XA(n,t,e,i){const r=by(n)||function JA(n,t){return n[yy]=t}(n,{previous:Ao,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[e],l=o[a];s[a]=new QA(l&&l.currentValue,t,o===Ao),n[i]=t}cn.ngInherit=!0;const yy="__ngSimpleChanges__";function by(n){return n[yy]||null}let vf;function dn(n){return!!n.listen}const wy={createRenderer:(n,t)=>function yf(){return void 0!==vf?vf:"undefined"!=typeof document?document:void 0}()};function Cn(n){for(;Array.isArray(n);)n=n[0];return n}function Uc(n,t){return Cn(t[n])}function Fi(n,t){return Cn(t[n.index])}function bf(n,t){return n.data[t]}function Fo(n,t){return n[t]}function bi(n,t){const e=t[n];return di(e)?e:e[0]}function Cy(n){return 4==(4&n[2])}function wf(n){return 64==(64&n[2])}function _s(n,t){return null==t?null:n[t]}function Dy(n){n[18]=0}function Cf(n,t){n[5]+=t;let e=n,i=n[3];for(;null!==i&&(1===t&&1===e[5]||-1===t&&0===e[5]);)i[5]+=t,e=i,i=i[3]}const pt={lFrame:Ry(null),bindingsEnabled:!0};function My(){return pt.bindingsEnabled}function ke(){return pt.lFrame.lView}function Lt(){return pt.lFrame.tView}function Ji(n){return pt.lFrame.contextLView=n,n[8]}function er(n){return pt.lFrame.contextLView=null,n}function Sn(){let n=xy();for(;null!==n&&64===n.type;)n=n.parent;return n}function xy(){return pt.lFrame.currentTNode}function pr(n,t){const e=pt.lFrame;e.currentTNode=n,e.isParent=t}function Df(){return pt.lFrame.isParent}function Ef(){pt.lFrame.isParent=!1}function Jn(){const n=pt.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function $r(){return pt.lFrame.bindingIndex}function Lo(){return pt.lFrame.bindingIndex++}function Gr(n){const t=pt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function gI(n,t){const e=pt.lFrame;e.bindingIndex=e.bindingRootIndex=n,Mf(t)}function Mf(n){pt.lFrame.currentDirectiveIndex=n}function xf(n){const t=pt.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function Ty(){return pt.lFrame.currentQueryIndex}function Sf(n){pt.lFrame.currentQueryIndex=n}function vI(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function Ay(n,t,e){if(e&ot.SkipSelf){let r=t,s=n;for(;!(r=r.parent,null!==r||e&ot.Host||(r=vI(s),null===r||(s=s[15],10&r.type))););if(null===r)return!1;t=r,n=s}const i=pt.lFrame=Iy();return i.currentTNode=t,i.lView=n,!0}function $c(n){const t=Iy(),e=n[1];pt.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Iy(){const n=pt.lFrame,t=null===n?null:n.child;return null===t?Ry(n):t}function Ry(n){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function Py(){const n=pt.lFrame;return pt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Oy=Py;function Gc(){const n=Py();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function ei(){return pt.lFrame.selectedIndex}function vs(n){pt.lFrame.selectedIndex=n}function un(){const n=pt.lFrame;return bf(n.tView,n.selectedIndex)}function Xa(){pt.lFrame.currentNamespace="svg"}function Wc(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===t){n[2]+=2048;try{s.call(a)}finally{}}}else try{s.call(a)}finally{}}class Ja{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Kc(n,t,e){const i=dn(n);let r=0;for(;rt){o=s-1;break}}}for(;s>16}(n),i=t;for(;e>0;)i=i[15],e--;return i}let If=!0;function Zc(n){const t=If;return If=n,t}let II=0;const mr={};function tl(n,t){const e=Pf(n,t);if(-1!==e)return e;const i=t[1];i.firstCreatePass&&(n.injectorIndex=t.length,Rf(i.data,n),Rf(t,null),Rf(i.blueprint,null));const r=Xc(n,t),s=n.injectorIndex;if(Vy(r)){const o=No(r),a=Bo(r,t),l=a[1].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function Rf(n,t){n.push(0,0,0,0,0,0,0,0,t)}function Pf(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function Xc(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=Yy(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function Jc(n,t,e){!function RI(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(qa)&&(i=e[qa]),null==i&&(i=e[qa]=II++);const r=255&i;t.data[n+(r>>5)]|=1<=0?255&t:LI:t}(e);if("function"==typeof s){if(!Ay(t,n,i))return i&ot.Host?Uy(r,0,i):zy(t,e,i,r);try{const o=s(i);if(null!=o||i&ot.Optional)return o;Oc()}finally{Oy()}}else if("number"==typeof s){let o=null,a=Pf(n,t),l=-1,c=i&ot.Host?t[16][6]:null;for((-1===a||i&ot.SkipSelf)&&(l=-1===a?Xc(n,t):t[a+8],-1!==l&&qy(i,!1)?(o=t[1],a=No(l),t=Bo(l,t)):a=-1);-1!==a;){const d=t[1];if(Wy(s,a,d.data)){const f=OI(a,t,e,o,i,c);if(f!==mr)return f}l=t[a+8],-1!==l&&qy(i,t[1].data[a+8]===c)&&Wy(s,a,t)?(o=d,a=No(l),t=Bo(l,t)):a=-1}}return r}function OI(n,t,e,i,r,s){const o=t[1],a=o.data[n+8],d=ed(a,o,e,null==i?Hc(a)&&If:i!=o&&0!=(3&a.type),r&ot.Host&&s===a);return null!==d?nl(t,o,d,a):mr}function ed(n,t,e,i,r){const s=n.providerIndexes,o=t.data,a=1048575&s,l=n.directiveStart,d=s>>20,w=r?a+d:n.directiveEnd;for(let k=i?a:a+d;k=l&&j.type===e)return k}if(r){const k=o[l];if(k&&Xi(k)&&k.type===e)return l}return null}function nl(n,t,e,i){let r=n[e];const s=t.data;if(function xI(n){return n instanceof Ja}(r)){const o=r;o.resolving&&function IA(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new Be(-200,`Circular dependency in DI detected for ${n}${e}`)}(function Ht(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():mt(n)}(s[e]));const a=Zc(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?fr(o.injectImpl):null;Ay(n,i,ot.Default);try{r=n[e]=o.factory(void 0,s,n,i),t.firstCreatePass&&e>=i.directiveStart&&function EI(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(i){const o=vy(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,o)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,r),s&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,s))}(e,s[e],t)}finally{null!==l&&fr(l),Zc(a),o.resolving=!1,Oy()}}return r}function Wy(n,t,e){return!!(e[t+(n>>5)]&1<{const t=n.prototype.constructor,e=t[zr]||Of(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const s=r[zr]||Of(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function Of(n){return rf(n)?()=>{const t=Of(ft(n));return t&&t()}:Ws(n)}function Yy(n){const t=n[1],e=t.type;return 2===e?t.declTNode:1===e?n[6]:null}function ti(n){return function PI(n,t){if("class"===t)return n.classes;if("style"===t)return n.styles;const e=n.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function Ff(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);function r(...s){if(this instanceof r)return i.apply(this,s),this;const o=new r(...s);return a.annotation=o,a;function a(l,c,d){const f=l.hasOwnProperty(jo)?l[jo]:Object.defineProperty(l,jo,{value:[]})[jo];for(;f.length<=d;)f.push(null);return(f[d]=f[d]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class Ce{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Ae({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const VI=new Ce("AnalyzeForEntryComponents");function wi(n,t){void 0===t&&(t=n);for(let e=0;eArray.isArray(e)?Wr(e,t):t(e))}function Qy(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function td(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function sl(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function UI(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function Nf(n,t){const e=$o(n,t);if(e>=0)return n[1|e]}function $o(n,t){return function Jy(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const s=i+(r-i>>1),o=n[s<t?r=s:i=s+1}return~(r<({token:n})),-1),Nn=ll(zo("Optional"),8),tr=ll(zo("SkipSelf"),4);let cd;function Wo(n){var t;return(null===(t=function jf(){if(void 0===cd&&(cd=null,qt.trustedTypes))try{cd=qt.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return cd}())||void 0===t?void 0:t.createHTML(n))||n}class qs{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class fR extends qs{getTypeName(){return"HTML"}}class pR extends qs{getTypeName(){return"Style"}}class mR extends qs{getTypeName(){return"Script"}}class gR extends qs{getTypeName(){return"URL"}}class _R extends qs{getTypeName(){return"ResourceURL"}}function Di(n){return n instanceof qs?n.changingThisBreaksApplicationSecurity:n}function gr(n,t){const e=hb(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see https://g.co/ng/security#xss)`)}return e===t}function hb(n){return n instanceof qs&&n.getTypeName()||null}class DR{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Wo(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(e){return null}}}class ER{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Wo(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=Wo(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0ul(t.trim())).join(", ")),this.buf.push(" ",o,'="',yb(l),'"')}var n;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();zf.hasOwnProperty(e)&&!mb.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(yb(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const AR=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,IR=/([^\#-~ |!])/g;function yb(n){return n.replace(/&/g,"&").replace(AR,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(IR,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let ud;function bb(n,t){let e=null;try{ud=ud||function fb(n){const t=new ER(n);return function MR(){try{return!!(new window.DOMParser).parseFromString(Wo(""),"text/html")}catch(n){return!1}}()?new DR(t):t}(n);let i=t?String(t):"";e=ud.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=e.innerHTML,e=ud.getInertBodyElement(i)}while(i!==s);return Wo((new TR).sanitizeChildren(Wf(e)||e))}finally{if(e){const i=Wf(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Wf(n){return"content"in n&&function RR(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ut=(()=>((Ut=Ut||{})[Ut.NONE=0]="NONE",Ut[Ut.HTML=1]="HTML",Ut[Ut.STYLE=2]="STYLE",Ut[Ut.SCRIPT=3]="SCRIPT",Ut[Ut.URL=4]="URL",Ut[Ut.RESOURCE_URL=5]="RESOURCE_URL",Ut))();function qf(n){const t=function fl(){const n=ke();return n&&n[12]}();return t?t.sanitize(Ut.URL,n)||"":gr(n,"URL")?Di(n):ul(mt(n))}function Kf(n){return n.ngOriginalError}class qr{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&Kf(t);for(;e&&Kf(e);)e=Kf(e);return e||null}}const Qf=new Map;let YR=0;const Xf="__ngContext__";function Gn(n,t){di(t)?(n[Xf]=t[20],function QR(n){Qf.set(n[20],n)}(t)):n[Xf]=t}function pl(n){const t=n[Xf];return"number"==typeof t?function Db(n){return Qf.get(n)||null}(t):t||null}function Jf(n){const t=pl(n);return t?di(t)?t:t.lView:null}const o1=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(qt))();function Yr(n){return n instanceof Function?n():n}var Ei=(()=>((Ei=Ei||{})[Ei.Important=1]="Important",Ei[Ei.DashCase=2]="DashCase",Ei))();function tp(n,t){return undefined(n,t)}function ml(n){const t=n[3];return Zi(t)?t[3]:t}function np(n){return Rb(n[13])}function ip(n){return Rb(n[4])}function Rb(n){for(;null!==n&&!Zi(n);)n=n[4];return n}function Yo(n,t,e,i,r){if(null!=i){let s,o=!1;Zi(i)?s=i:di(i)&&(o=!0,i=i[0]);const a=Cn(i);0===n&&null!==e?null==r?Bb(t,e,a):Ys(t,e,a,r||null,!0):1===n&&null!==e?Ys(t,e,a,r||null,!0):2===n?function Wb(n,t,e){const i=hd(n,t);i&&function w1(n,t,e,i){dn(n)?n.removeChild(t,e,i):t.removeChild(e)}(n,i,t,e)}(t,a,o):3===n&&t.destroyNode(a),null!=s&&function E1(n,t,e,i,r){const s=e[7];s!==Cn(e)&&Yo(t,n,i,s,r);for(let a=10;a0&&(n[e-1][4]=i[4]);const s=td(n,10+t);!function f1(n,t){gl(n,t,t[11],2,null,null),t[0]=null,t[6]=null}(i[1],i);const o=s[19];null!==o&&o.detachView(s[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function Fb(n,t){if(!(128&t[2])){const e=t[11];dn(e)&&e.destroyNode&&gl(n,t,e,3,null,null),function g1(n){let t=n[13];if(!t)return ap(n[1],n);for(;t;){let e=null;if(di(t))e=t[13];else{const i=t[10];i&&(e=i)}if(!e){for(;t&&!t[4]&&t!==n;)di(t)&&ap(t[1],t),t=t[3];null===t&&(t=n),di(t)&&ap(t[1],t),e=t&&t[4]}t=e}}(t)}}function ap(n,t){if(!(128&t[2])){t[2]&=-65,t[2]|=128,function b1(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=c]():i[r=-c].unsubscribe(),s+=2}else{const o=i[r=e[s+1]];e[s].call(o)}if(null!==i){for(let s=r+1;ss?"":r[f+1].toLowerCase();const k=8&i?w:null;if(k&&-1!==Kb(k,c,0)||2&i&&c!==w){if(nr(i))return!1;o=!0}}}}else{if(!o&&!nr(i)&&!nr(l))return!1;if(o&&nr(l))continue;o=!1,i=l|1&i}}return nr(i)||o}function nr(n){return 0==(1&n)}function T1(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let s=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""!==r&&!nr(o)&&(t+=Jb(s,r),r=""),i=o,s=s||!nr(i);e++}return""!==r&&(t+=Jb(s,r)),t}const gt={};function xe(n){e0(Lt(),ke(),ei()+n,!1)}function e0(n,t,e,i){if(!i)if(3==(3&t[2])){const s=n.preOrderCheckHooks;null!==s&&qc(t,s,e)}else{const s=n.preOrderHooks;null!==s&&Yc(t,s,0,e)}vs(e)}const s0=new Ce("ENVIRONMENT_INITIALIZER"),o0=new Ce("INJECTOR_DEF_TYPES");function U1(...n){return{\u0275providers:a0(0,n)}}function a0(n,...t){const e=[],i=new Set;let r;return Wr(t,s=>{const o=s;hp(o,e,[],i)&&(r||(r=[]),r.push(o))}),void 0!==r&&l0(r,e),e}function l0(n,t){for(let e=0;e{t.push(s)})}}function hp(n,t,e,i){if(!(n=ft(n)))return!1;let r=null,s=cy(n);const o=!s&&Qt(n);if(s||o){if(o&&!o.standalone)return!1;r=n}else{const l=n.ngModule;if(s=cy(l),!s)return!1;r=l}const a=i.has(r);if(o){if(a)return!1;if(i.add(r),o.dependencies){const l="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const c of l)hp(c,t,e,i)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;i.add(r);try{Wr(s.imports,d=>{hp(d,t,e,i)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&l0(c,t)}if(!a){const c=Ws(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:jt},{provide:o0,useValue:r,multi:!0},{provide:s0,useValue:()=>te(r),multi:!0})}const l=s.providers;null==l||a||Wr(l,d=>{t.push(d)})}}return r!==n&&void 0!==n.providers}const z1=Yt({provide:String,useValue:Yt});function fp(n){return null!==n&&"object"==typeof n&&z1 in n}function Ks(n){return"function"==typeof n}const pp=new Ce("INJECTOR",-1);class u0{get(t,e=ol){if(e===ol){const i=new Error(`NullInjectorError: No provider for ${Kt(t)}!`);throw i.name="NullInjectorError",i}return e}}const mp=new Ce("Set Injector scope."),md={},G1={};let gp;function _p(){return void 0===gp&&(gp=new u0),gp}class Qs{}class h0 extends Qs{constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,yp(t,o=>this.processProvider(o)),this.records.set(pp,Ko(void 0,this)),r.has("environment")&&this.records.set(Qs,Ko(void 0,this));const s=this.records.get(mp);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(o0.multi,jt,ot.Self))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}get(t,e=ol,i=ot.Default){this.assertNotDestroyed();const r=rd(this),s=fr(void 0);try{if(!(i&ot.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function Q1(n){return"function"==typeof n||"object"==typeof n&&n instanceof Ce}(t)&&sf(t);a=l&&this.injectableDefInScope(l)?Ko(vp(t),md):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&ot.Self?_p():this.parent).get(t,e=i&ot.Optional&&e===ol?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[id]=o[id]||[]).unshift(Kt(t)),r)throw o;return function eR(n,t,e,i){const r=n[id];throw t[eb]&&r.unshift(t[eb]),n.message=function tR(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=Kt(t);if(Array.isArray(t))r=t.map(Kt).join(" -> ");else if("object"==typeof t){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):Kt(a)))}r=`{${s.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(QI,"\n ")}`}("\n"+n.message,r,e,i),n.ngTokenPath=r,n[id]=null,n}(o,t,"R3InjectorError",this.source)}throw o}finally{fr(s),rd(r)}}resolveInjectorInitializers(){const t=rd(this),e=fr(void 0);try{const i=this.get(s0.multi,jt,ot.Self);for(const r of i)r()}finally{rd(t),fr(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(Kt(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Be(205,!1)}processProvider(t){let e=Ks(t=ft(t))?t:ft(t&&t.provide);const i=function q1(n){return fp(n)?Ko(void 0,n.useValue):Ko(f0(n),md)}(t);if(Ks(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ko(void 0,md,!0),r.factory=()=>Hf(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===md&&(e.value=G1,e.value=e.factory()),"object"==typeof e.value&&e.value&&function K1(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=ft(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function vp(n){const t=sf(n),e=null!==t?t.factory:Ws(n);if(null!==e)return e;if(n instanceof Ce)throw new Be(204,!1);if(n instanceof Function)return function W1(n){const t=n.length;if(t>0)throw sl(t,"?"),new Be(204,!1);const e=function LA(n){const t=n&&(n[Fc]||n[dy]);if(t){const e=function NA(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new Be(204,!1)}function f0(n,t,e){let i;if(Ks(n)){const r=ft(n);return Ws(r)||vp(r)}if(fp(n))i=()=>ft(n.useValue);else if(function d0(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...Hf(n.deps||[]));else if(function c0(n){return!(!n||!n.useExisting)}(n))i=()=>te(ft(n.useExisting));else{const r=ft(n&&(n.useClass||n.provide));if(!function Y1(n){return!!n.deps}(n))return Ws(r)||vp(r);i=()=>new r(...Hf(n.deps))}return i}function Ko(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function Z1(n){return!!n.\u0275providers}function yp(n,t){for(const e of n)Array.isArray(e)?yp(e,t):Z1(e)?yp(e.\u0275providers,t):t(e)}function p0(n,t=null,e=null,i){const r=m0(n,t,e,i);return r.resolveInjectorInitializers(),r}function m0(n,t=null,e=null,i,r=new Set){const s=[e||jt,U1(n)];return i=i||("object"==typeof n?void 0:Kt(n)),new h0(s,t||_p(),i||null,r)}let Jt=(()=>{class n{static create(e,i){var r;if(Array.isArray(e))return p0({name:""},i,e,"");{const s=null!==(r=e.name)&&void 0!==r?r:"";return p0({name:s},e.parent,e.providers,s)}}}return n.THROW_IF_NOT_FOUND=ol,n.NULL=new u0,n.\u0275prov=Ae({token:n,providedIn:"any",factory:()=>te(pp)}),n.__NG_ELEMENT_ID__=-1,n})();function x(n,t=ot.Default){const e=ke();return null===e?te(n,t):$y(Sn(),e,ft(n),t)}function bs(){throw new Error("invalid")}function _d(n,t){return n<<17|t<<2}function ir(n){return n>>17&32767}function Sp(n){return 2|n}function Kr(n){return(131068&n)>>2}function kp(n,t){return-131069&n|t<<2}function Tp(n){return 1|n}function F0(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;i22&&e0(n,t,22,!1),e(i,r)}finally{vs(s)}}function N0(n,t,e){if(ff(t)){const r=t.directiveEnd;for(let s=t.directiveStart;s0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(a)!=l&&a.push(l),a.push(i,r,o)}}function $0(n,t){null!==n.hostBindings&&n.hostBindings(1,t)}function G0(n,t){t.flags|=2,(n.components||(n.components=[])).push(t.index)}function HP(n,t,e){if(e){if(t.exportAs)for(let i=0;i0&&zp(e)}}function zp(n){for(let i=np(n);null!==i;i=ip(i))for(let r=10;r0&&zp(s)}const e=n[1].components;if(null!==e)for(let i=0;i0&&zp(r)}}function qP(n,t){const e=bi(t,n),i=e[1];(function YP(n,t){for(let e=t.length;ePromise.resolve(null))();function Q0(n){return n[7]||(n[7]=[])}function Z0(n){return n.cleanup||(n.cleanup=[])}function X0(n,t,e){return(null===n||Xi(n))&&(e=function oI(n){for(;Array.isArray(n);){if("object"==typeof n[1])return n;n=n[0]}return null}(e[t.index])),e[11]}function J0(n,t){const e=n[9],i=e?e.get(qr,null):null;i&&i.handleError(t)}function ew(n,t,e,i,r){for(let s=0;s=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Qc(r.hostAttrs,e=Qc(e,r.hostAttrs))}}(i)}function Kp(n){return n===Ao?{}:n===jt?[]:n}function cO(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function dO(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,s)=>{t(i,r,s),e(i,r,s)}:t}function uO(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}let Dd=null;function Zs(){if(!Dd){const n=qt.Symbol;if(n&&n.iterator)Dd=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ea(Cn(Pe[i.index])):i.index;if(dn(e)){let Pe=null;if(!a&&l&&(Pe=function CO(n,t,e,i){const r=n.cleanup;if(null!=r)for(let s=0;sl?a[l]:null}"string"==typeof o&&(s+=2)}return null}(n,t,r,i.index)),null!==Pe)(Pe.__ngLastListenerFn__||Pe).__ngNextListenerFn__=s,Pe.__ngLastListenerFn__=s,k=!1;else{s=Jp(i,t,f,s,!1);const ht=e.listen(ce,r,s);w.push(s,ht),d&&d.push(r,he,Te,Te+1)}}else s=Jp(i,t,f,s,!0),ce.addEventListener(r,s,o),w.push(s),d&&d.push(r,he,Te,o)}else s=Jp(i,t,f,s,!1);const j=i.outputs;let K;if(k&&null!==j&&(K=j[r])){const ae=K.length;if(ae)for(let ce=0;ce0;)t=t[15],n--;return t}(n,pt.lFrame.contextLView))[8]}(n)}function DO(n,t){let e=null;const i=function A1(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(0==(1&e))return t[e+1]}return null}(n);for(let r=0;r=0}const Tn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Pw(n){return n.substring(Tn.key,Tn.keyEnd)}function Ow(n,t){const e=Tn.textEnd;return e===t?-1:(t=Tn.keyEnd=function AO(n,t,e){for(;t32;)t++;return t}(n,Tn.key=t,e),ca(n,t,e))}function ca(n,t,e){for(;t=0;e=Ow(t,e))Ci(n,Pw(t),!0)}function sr(n,t,e,i){const r=ke(),s=Lt(),o=Gr(2);s.firstUpdatePass&&Hw(s,n,o,i),t!==gt&&Wn(r,o,t)&&Uw(s,s.data[ei()],r,r[11],n,r[o+1]=function jO(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=Kt(Di(n)))),n}(t,e),i,o)}function Vw(n,t){return t>=n.expandoStartIndex}function Hw(n,t,e,i){const r=n.data;if(null===r[e+1]){const s=r[ei()],o=Vw(n,e);$w(s,i)&&null===t&&!o&&(t=!1),t=function FO(n,t,e,i){const r=xf(n);let s=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=Cl(e=tm(null,n,t,e,i),t.attrs,i),s=null);else{const o=t.directiveStylingLast;if(-1===o||n[o]!==r)if(e=tm(r,n,t,e,i),null===s){let l=function LO(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Kr(i))return n[ir(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=tm(null,n,t,l[1],i),l=Cl(l,t.attrs,i),function NO(n,t,e,i){n[ir(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else s=function BO(n,t,e){let i;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)}else d=e;if(r)if(0!==l){const w=ir(n[a+1]);n[i+1]=_d(w,a),0!==w&&(n[w+1]=kp(n[w+1],i)),n[a+1]=function pP(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=_d(a,0),0!==a&&(n[a+1]=kp(n[a+1],i)),a=i;else n[i+1]=_d(l,0),0===a?a=i:n[l+1]=kp(n[l+1],i),l=i;c&&(n[i+1]=Sp(n[i+1])),Rw(n,d,i,!0),Rw(n,d,i,!1),function MO(n,t,e,i,r){const s=r?n.residualClasses:n.residualStyles;null!=s&&"string"==typeof t&&$o(s,t)>=0&&(e[i+1]=Tp(e[i+1]))}(t,d,n,i,s),o=_d(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,i)}}function tm(n,t,e,i,r){let s=null;const o=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),d=c?l[1]:l,f=null===d;let w=e[r+1];w===gt&&(w=f?jt:void 0);let k=f?Nf(w,i):d===i?w:void 0;if(c&&!kd(k)&&(k=Nf(l,i)),kd(k)&&(a=k,o))return a;const j=n[r+1];r=o?ir(j):Kr(j)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=Nf(l,i))}return a}function kd(n){return void 0!==n}function $w(n,t){return 0!=(n.flags&(t?16:32))}function We(n,t=""){const e=ke(),i=Lt(),r=n+22,s=i.firstCreatePass?Zo(i,r,1,t,null):i.data[r],o=e[r]=function rp(n,t){return dn(n)?n.createText(t):n.createTextNode(t)}(e[11],t);fd(i,e,o,s),pr(s,!1)}function qn(n){return Bn("",n,""),qn}function Bn(n,t,e){const i=ke(),r=ta(i,n,t,e);return r!==gt&&Qr(i,ei(),r),Bn}function Td(n,t,e,i,r){const s=ke(),o=na(s,n,t,e,i,r);return o!==gt&&Qr(s,ei(),o),Td}function nm(n,t,e,i,r,s,o){const a=ke(),l=ia(a,n,t,e,i,r,s,o);return l!==gt&&Qr(a,ei(),l),nm}function im(n,t,e,i,r,s,o,a,l,c,d){const f=ke(),w=sa(f,n,t,e,i,r,s,o,a,l,c,d);return w!==gt&&Qr(f,ei(),w),im}function rm(n,t,e){!function or(n,t,e,i){const r=Lt(),s=Gr(2);r.firstUpdatePass&&Hw(r,null,s,i);const o=ke();if(e!==gt&&Wn(o,s,e)){const a=r.data[ei()];if($w(a,i)&&!Vw(r,s)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=nf(l,e||"")),Zp(r,a,o,e,i)}else!function HO(n,t,e,i,r,s,o,a){r===gt&&(r=jt);let l=0,c=0,d=0((He=He||{})[He.LocaleId=0]="LocaleId",He[He.DayPeriodsFormat=1]="DayPeriodsFormat",He[He.DayPeriodsStandalone=2]="DayPeriodsStandalone",He[He.DaysFormat=3]="DaysFormat",He[He.DaysStandalone=4]="DaysStandalone",He[He.MonthsFormat=5]="MonthsFormat",He[He.MonthsStandalone=6]="MonthsStandalone",He[He.Eras=7]="Eras",He[He.FirstDayOfWeek=8]="FirstDayOfWeek",He[He.WeekendRange=9]="WeekendRange",He[He.DateFormat=10]="DateFormat",He[He.TimeFormat=11]="TimeFormat",He[He.DateTimeFormat=12]="DateTimeFormat",He[He.NumberSymbols=13]="NumberSymbols",He[He.NumberFormats=14]="NumberFormats",He[He.CurrencyCode=15]="CurrencyCode",He[He.CurrencySymbol=16]="CurrencySymbol",He[He.CurrencyName=17]="CurrencyName",He[He.Currencies=18]="Currencies",He[He.Directionality=19]="Directionality",He[He.PluralCase=20]="PluralCase",He[He.ExtraData=21]="ExtraData",He))();const ua="en-US";let aC=ua;function am(n,t,e,i,r){if(n=ft(n),Array.isArray(n))for(let s=0;s>20;if(Ks(n)||!n.multi){const k=new Ja(l,r,x),j=cm(a,t,r?d:d+w,f);-1===j?(Jc(tl(c,o),s,a),lm(s,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(k),o.push(k)):(e[j]=k,o[j]=k)}else{const k=cm(a,t,d+w,f),j=cm(a,t,d,d+w),K=k>=0&&e[k],ae=j>=0&&e[j];if(r&&!ae||!r&&!K){Jc(tl(c,o),s,a);const ce=function rL(n,t,e,i,r){const s=new Ja(n,e,x);return s.multi=[],s.index=t,s.componentProviders=0,RC(s,r,i&&!e),s}(r?iL:nL,e.length,r,i,l);!r&&ae&&(e[j].providerFactory=ce),lm(s,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(ce),o.push(ce)}else lm(s,n,k>-1?k:j,RC(e[r?j:k],l,!r&&i));!r&&i&&ae&&e[j].componentProviders++}}}function lm(n,t,e,i){const r=Ks(t),s=function $1(n){return!!n.useClass}(t);if(r||s){const l=(s?ft(t.useClass):t).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const d=c.indexOf(e);-1===d?c.push(e,[i,l]):c[d+1].push(i,l)}else c.push(e,l)}}}function RC(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function cm(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function tL(n,t,e){const i=Lt();if(i.firstCreatePass){const r=Xi(n);am(e,i.data,i.blueprint,r,!0),am(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class oL{resolveComponentFactory(t){throw function sL(n){const t=Error(`No component factory found for ${Kt(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let io=(()=>{class n{}return n.NULL=new oL,n})();class Ds{}class OC{}class FC{}function lL(){return fa(Sn(),ke())}function fa(n,t){return new Je(Fi(n,t))}let Je=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=lL,n})();function cL(n){return n instanceof Je?n.nativeElement:n}class Sl{}let Xr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function uL(){const n=ke(),e=bi(Sn().index,n);return function dL(n){return n[11]}(di(e)?e:n)}(),n})(),hL=(()=>{class n{}return n.\u0275prov=Ae({token:n,providedIn:"root",factory:()=>null}),n})();class ro{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const fL=new ro("14.0.1"),um={};function Fd(n,t,e,i,r=!1){for(;null!==e;){const s=t[e.index];if(null!==s&&i.push(Cn(s)),Zi(s))for(let a=10;a-1&&(op(t,i),td(e,i))}this._attachedToViewContainer=!1}Fb(this._lView[1],this._lView)}onDestroy(t){j0(this._lView[1],this._lView,null,t)}markForCheck(){$p(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){!function Wp(n,t,e){const i=t[10];i.begin&&i.begin();try{Jo(n,t,n.template,e)}catch(r){throw J0(t,r),r}finally{i.end&&i.end()}}(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Be(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function m1(n,t){gl(n,t,t[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Be(902,"");this._appRef=t}}class pL extends kl{constructor(t){super(t),this._view=t}detectChanges(){K0(this._view)}checkNoChanges(){}get context(){return null}}class hm extends io{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Qt(t);return new fm(e,this.ngModule)}}function LC(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class gL{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){const r=this.injector.get(t,um,i);return r!==um||e===um?r:this.parentInjector.get(t,e,i)}}class fm extends FC{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function F1(n){return n.map(O1).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return LC(this.componentDef.inputs)}get outputs(){return LC(this.componentDef.outputs)}create(t,e,i,r){let s=(r=r||this.ngModule)instanceof Qs?r:null==r?void 0:r.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new gL(t,s):t,a=o.get(Sl,wy),l=o.get(hL,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",f=i?function H0(n,t,e){if(dn(n))return n.selectRootElement(t,e===Ki.ShadowDom);let i="string"==typeof t?n.querySelector(t):t;return i.textContent="",i}(c,i,this.componentDef.encapsulation):sp(a.createRenderer(null,this.componentDef),d,function mL(n){const t=n.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(d)),w=this.componentDef.onPush?288:272,k=function uw(n,t){return{components:[],scheduler:n||o1,clean:QP,playerHandler:t||null,flags:0}}(),j=bd(0,null,null,1,0,null,null,null,null,null),K=_l(null,j,k,w,null,null,a,c,l,o,null);let ae,ce;$c(K);try{const Te=function cw(n,t,e,i,r,s){const o=e[1];e[22]=n;const l=Zo(o,22,2,"#host",null),c=l.mergedAttrs=t.hostAttrs;null!==c&&(Cd(l,c,!0),null!==n&&(Kc(r,n,c),null!==l.classes&&up(r,n,l.classes),null!==l.styles&&Yb(r,n,l.styles)));const d=i.createRenderer(n,t),f=_l(e,B0(t),null,t.onPush?32:16,e[22],l,i,d,s||null,null,null);return o.firstCreatePass&&(Jc(tl(l,e),o,t.type),G0(o,l),W0(l,e.length,1)),wd(e,f),e[22]=f}(f,this.componentDef,K,a,c);if(f)if(i)Kc(c,f,["ng-version",fL.full]);else{const{attrs:he,classes:Pe}=function L1(n){const t=[],e=[];let i=1,r=2;for(;i0&&up(c,f,Pe.join(" "))}if(ce=bf(j,22),void 0!==e){const he=ce.projection=[];for(let Pe=0;Pee()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class pm extends OC{constructor(t){super(),this.moduleType=t}create(t){return new NC(this.moduleType,t)}}class bL extends Ds{constructor(t,e,i){super(),this.componentFactoryResolver=new hm(this),this.instance=null;const r=new h0([...t,{provide:Ds,useValue:this},{provide:io,useValue:this.componentFactoryResolver}],e||_p(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Ld(n,t=null,e=null){return new bL(n,t,e).injector}function Tl(n,t){const e=n[t];return e===gt?void 0:e}function Jr(n,t){const e=Lt();let i;const r=n+22;e.firstCreatePass?(i=function PL(n,t){if(t)for(let e=t.length-1;e>=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const s=i.factory||(i.factory=Ws(i.type)),o=fr(x);try{const a=Zc(!1),l=s();return Zc(a),function yO(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,ke(),r,l),l}finally{fr(o)}}function so(n,t,e){const i=n+22,r=ke(),s=Fo(r,i);return Al(r,i)?function BC(n,t,e,i,r,s){const o=t+e;return Wn(n,o,r)?yr(n,o+1,s?i.call(s,r):i(r)):Tl(n,o+1)}(r,Jn(),t,s.transform,e,s):s.transform(e)}function gm(n,t,e,i){const r=n+22,s=ke(),o=Fo(s,r);return Al(s,r)?function VC(n,t,e,i,r,s,o){const a=t+e;return Xs(n,a,r,s)?yr(n,a+2,o?i.call(o,r,s):i(r,s)):Tl(n,a+2)}(s,Jn(),t,o.transform,e,i,o):o.transform(e,i)}function Al(n,t){return n[1].data[t].pure}function _m(n){return t=>{setTimeout(n,void 0,t)}}const je=class NL extends ue{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){var r,s,o;let a=t,l=e||(()=>null),c=i;if(t&&"object"==typeof t){const f=t;a=null===(r=f.next)||void 0===r?void 0:r.bind(f),l=null===(s=f.error)||void 0===s?void 0:s.bind(f),c=null===(o=f.complete)||void 0===o?void 0:o.bind(f)}this.__isAsync&&(l=_m(l),a&&(a=_m(a)),c&&(c=_m(c)));const d=super.subscribe({next:a,error:l,complete:c});return t instanceof X&&t.add(d),d}};function BL(){return this._results[Zs()]()}class pa{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=Zs(),i=pa.prototype;i[e]||(i[e]=BL)}get changes(){return this._changes||(this._changes=new je)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const i=this;i.dirty=!1;const r=wi(t);(this._changesDetected=!function HI(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=jL,n})();const VL=_n,HL=class extends VL{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tViews,r=_l(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[19];return null!==o&&(r[19]=o.createEmbeddedView(i)),vl(i,r,t),new kl(r)}};function jL(){return Nd(Sn(),ke())}function Nd(n,t){return 4&n.type?new HL(t,n,fa(n,t)):null}let An=(()=>{class n{}return n.__NG_ELEMENT_ID__=UL,n})();function UL(){return GC(Sn(),ke())}const zL=An,zC=class extends zL{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return fa(this._hostTNode,this._hostLView)}get injector(){return new Vo(this._hostTNode,this._hostLView)}get parentInjector(){const t=Xc(this._hostTNode,this._hostLView);if(Vy(t)){const e=Bo(t,this._hostLView),i=No(t);return new Vo(e[1].data[i+8],e)}return new Vo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=$C(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){let r,s;"number"==typeof i?r=i:null!=i&&(r=i.index,s=i.injector);const o=t.createEmbeddedView(e||{},s);return this.insert(o,r),o}createComponent(t,e,i,r,s){const o=t&&!function rl(n){return"function"==typeof n}(t);let a;if(o)a=e;else{const f=e||{};a=f.index,i=f.injector,r=f.projectableNodes,s=f.environmentInjector||f.ngModuleRef}const l=o?t:new fm(Qt(t)),c=i||this.parentInjector;if(!s&&null==l.ngModule){const w=(o?c:this.parentInjector).get(Qs,null);w&&(s=w)}const d=l.create(c,r,void 0,s);return this.insert(d.hostView,a),d}insert(t,e){const i=t._lView,r=i[1];if(function lI(n){return Zi(n[3])}(i)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const f=i[3],w=new zC(f,f[6],f[3]);w.detach(w.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function _1(n,t,e,i){const r=10+i,s=e.length;i>0&&(e[r-1][4]=t),i0)i.push(o[a/2]);else{const c=s[a+1],d=t[-l];for(let f=10;f{class n{constructor(e){this.appInits=e,this.resolve=Vd,this.reject=Vd,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{s.subscribe({complete:a,error:l})});e.push(o)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(te(km,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Rl=new Ce("AppId",{providedIn:"root",factory:function mD(){return`${Tm()}${Tm()}${Tm()}`}});function Tm(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const gD=new Ce("Platform Initializer"),jd=new Ce("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),_D=new Ce("appBootstrapListener"),fn=new Ce("AnimationModuleType");let vN=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Er=new Ce("LocaleId",{providedIn:"root",factory:()=>sd(Er,ot.Optional|ot.SkipSelf)||function yN(){return"undefined"!=typeof $localize&&$localize.locale||ua}()});class wN{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let Am=(()=>{class n{compileModuleSync(e){return new pm(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),s=Yr(vi(e).declarations).reduce((o,a)=>{const l=Qt(a);return l&&o.push(new fm(l)),o},[]);return new wN(i,s)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const DN=(()=>Promise.resolve(0))();function Im(n){"undefined"==typeof Zone?DN.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class et{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new je(!1),this.onMicrotaskEmpty=new je(!1),this.onStable=new je(!1),this.onError=new je(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function EN(){let n=qt.requestAnimationFrame,t=qt.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function SN(n){const t=()=>{!function xN(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(qt,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Pm(n),n.isCheckStableRunning=!0,Rm(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Pm(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,s,o,a)=>{try{return vD(n),e.invokeTask(r,s,o,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||n.shouldCoalesceRunChangeDetection)&&t(),yD(n)}},onInvoke:(e,i,r,s,o,a,l)=>{try{return vD(n),e.invoke(r,s,o,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),yD(n)}},onHasTask:(e,i,r,s)=>{e.hasTask(r,s),i===r&&("microTask"==s.change?(n._hasPendingMicrotasks=s.microTask,Pm(n),Rm(n)):"macroTask"==s.change&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,i,r,s)=>(e.handleError(r,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!et.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(et.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,t,MN,Vd,Vd);try{return s.runTask(o,e,i)}finally{s.cancelTask(o)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const MN={};function Rm(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Pm(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function vD(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function yD(n){n._nesting--,Rm(n)}class kN{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new je,this.onMicrotaskEmpty=new je,this.onStable=new je,this.onError=new je}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}const bD=new Ce(""),Ud=new Ce("");let Pl,Om=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,Pl||(function TN(n){Pl=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{et.assertNotInAngularZone(),Im(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Im(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:s,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(Fm),te(Ud))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),Fm=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){var r;return null!==(r=null==Pl?void 0:Pl.findTestabilityInTree(this,e,i))&&void 0!==r?r:null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),Mr=null;const wD=new Ce("AllowMultipleToken"),CD=new Ce("PlatformOnDestroy");class DD{constructor(t,e){this.name=t,this.token=e}}function MD(n,t,e=[]){const i=`Platform: ${t}`,r=new Ce(i);return(s=[])=>{let o=Lm();if(!o||o.injector.get(wD,!1)){const a=[...e,...s,{provide:r,useValue:!0}];n?n(a):function RN(n){if(Mr&&!Mr.get(wD,!1))throw new Be(400,"");Mr=n;const t=n.get(SD);(function ED(n){const t=n.get(gD,null);t&&t.forEach(e=>e())})(n)}(function xD(n=[],t){return Jt.create({name:t,providers:[{provide:mp,useValue:"platform"},{provide:CD,useValue:()=>Mr=null},...n]})}(a,i))}return function ON(n){const t=Lm();if(!t)throw new Be(401,"");return t}()}}function Lm(){var n;return null!==(n=null==Mr?void 0:Mr.get(SD))&&void 0!==n?n:null}let SD=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function FN(n,t){let e;return e="noop"===n?new kN:("zone.js"===n?void 0:n)||new et(t),e}(null==i?void 0:i.ngZone,function kD(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),s=[{provide:et,useValue:r}];return r.run(()=>{const o=Jt.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(qr,null);if(!l)throw new Be(402,"");return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{zd(this._modules,a),c.unsubscribe()})}),function TD(n,t,e){try{const i=e();return wl(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(Hd);return c.runInitializers(),c.donePromise.then(()=>(function lC(n){_i(n,"Expected localeId to be defined"),"string"==typeof n&&(aC=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Er,ua)||ua),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=AD({},i);return function AN(n,t,e){const i=new pm(e);return Promise.resolve(i)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const i=e.injector.get(Ol);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Be(403,"");e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Be(404,"");this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(CD,null);null==e||e(),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(te(Jt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function AD(n,t){return Array.isArray(t)?t.reduce(AD,n):Object.assign(Object.assign({},n),t)}let Ol=(()=>{class n{constructor(e,i,r,s){this._zone=e,this._injector=i,this._exceptionHandler=r,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new J(l=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{l.next(this._stable),l.complete()})}),a=new J(l=>{let c;this._zone.runOutsideAngular(()=>{c=this._zone.onStable.subscribe(()=>{et.assertNotInAngularZone(),Im(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,l.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{et.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{l.next(!1)}))});return()=>{c.unsubscribe(),d.unsubscribe()}});this.isStable=Un(o,a.pipe(ay()))}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(e,i){const r=e instanceof FC;if(!this._initStatus.done)throw!r&&function ga(n){const t=Qt(n)||Zn(n)||Xn(n);return null!==t&&t.standalone}(e),new Be(405,false);let s;s=r?e:this._injector.get(io).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const o=function IN(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Ds),l=s.create(Jt.NULL,[],i||s.selector,o),c=l.location.nativeElement,d=l.injector.get(bD,null);return null==d||d.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),zd(this.components,l),null==d||d.unregisterApplication(c)}),this._loadComponent(l),l}tick(){if(this._runningTick)throw new Be(101,"");try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;zd(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(_D,[]).concat(this._bootstrapListeners).forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>zd(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Be(406,false);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(Jt),te(qr),te(Hd))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function zd(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let RD=!0,en=(()=>{class n{}return n.__NG_ELEMENT_ID__=BN,n})();function BN(n){return function VN(n,t,e){if(Hc(n)&&!e){const i=bi(n.index,t);return new kl(i,i)}return 47&n.type?new kl(t[16],t):null}(Sn(),ke(),16==(16&n))}class ND{constructor(){}supports(t){return yl(t)}create(t){return new GN(t)}}const $N=(n,t)=>t;class GN{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||$N}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,s=null;for(;e||i;){const o=!i||e&&e.currentIndex{o=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,o)?(i&&(e=this._verifyReinsertion(e,a,o,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,o,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,r)):t=this._addAfter(new WN(e,i),s,r),t}_verifyReinsertion(t,e,i,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==s?t=this._reinsertAfter(s,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,s=t._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new BD),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new BD),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class WN{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class qN{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class BD{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new qN,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function VD(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const s=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,s)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const i=new KN(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class KN{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function jD(){return new es([new ND])}let es=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||jD()),deps:[[n,new tr,new Nn]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Be(901,"")}}return n.\u0275prov=Ae({token:n,providedIn:"root",factory:jD}),n})();function UD(){return new Fl([new HD])}let Fl=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||UD()),deps:[[n,new tr,new Nn]]}}find(e){const i=this.factories.find(s=>s.supports(e));if(i)return i;throw new Be(901,"")}}return n.\u0275prov=Ae({token:n,providedIn:"root",factory:UD}),n})();const XN=MD(null,"core",[]);let JN=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(te(Ol))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();function ts(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}let Wd=null;function Sr(){return Wd}const lt=new Ce("DocumentToken");let Ll=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:function(){return function iB(){return te(zD)}()},providedIn:"platform"}),n})();const rB=new Ce("Location Initialized");let zD=(()=>{class n extends Ll{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Sr().getBaseHref(this._doc)}onPopState(e){const i=Sr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Sr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(e){this.location.pathname=e}pushState(e,i,r){$D()?this._history.pushState(e,i,r):this.location.hash=r}replaceState(e,i,r){$D()?this._history.replaceState(e,i,r):this.location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(te(lt))},n.\u0275prov=Ae({token:n,factory:function(){return function sB(){return new zD(te(lt))}()},providedIn:"platform"}),n})();function $D(){return!!window.history.pushState}function jm(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function GD(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function ns(n){return n&&"?"!==n[0]?"?"+n:n}let va=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:function(){return function oB(){const n=te(lt).location;return new WD(te(Ll),n&&n.origin||"")}()},providedIn:"root"}),n})();const Um=new Ce("appBaseHref");let WD=(()=>{class n extends va{constructor(e,i){if(super(),this._platformLocation=e,this._removeListenerFns=[],null==i&&(i=this._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=i}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return jm(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+ns(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,s){const o=this.prepareExternalUrl(r+ns(s));this._platformLocation.pushState(e,i,o)}replaceState(e,i,r,s){const o=this.prepareExternalUrl(r+ns(s));this._platformLocation.replaceState(e,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){var i,r;null===(r=(i=this._platformLocation).historyGo)||void 0===r||r.call(i,e)}}return n.\u0275fac=function(e){return new(e||n)(te(Ll),te(Um,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),aB=(()=>{class n extends va{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=jm(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,s){let o=this.prepareExternalUrl(r+ns(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,i,o)}replaceState(e,i,r,s){let o=this.prepareExternalUrl(r+ns(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){var i,r;null===(r=(i=this._platformLocation).historyGo)||void 0===r||r.call(i,e)}}return n.\u0275fac=function(e){return new(e||n)(te(Ll),te(Um,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),Nl=(()=>{class n{constructor(e){this._subject=new je,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._baseHref=GD(qD(i)),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){var e;null===(e=this._urlChangeSubscription)||void 0===e||e.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+ns(i))}normalize(e){return n.stripTrailingSlash(function cB(n,t){return n&&t.startsWith(n)?t.substring(n.length):t}(this._baseHref,qD(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+ns(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+ns(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){var i,r;null===(r=(i=this._locationStrategy).historyGo)||void 0===r||r.call(i,e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{var i;const r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),0===this._urlChangeListeners.length&&(null===(i=this._urlChangeSubscription)||void 0===i||i.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=ns,n.joinWithSlash=jm,n.stripTrailingSlash=GD,n.\u0275fac=function(e){return new(e||n)(te(va))},n.\u0275prov=Ae({token:n,factory:function(){return function lB(){return new Nl(te(va))}()},providedIn:"root"}),n})();function qD(n){return n.replace(/\/index.html$/,"")}var ui=(()=>((ui=ui||{})[ui.Decimal=0]="Decimal",ui[ui.Percent=1]="Percent",ui[ui.Currency=2]="Currency",ui[ui.Scientific=3]="Scientific",ui))(),rt=(()=>((rt=rt||{})[rt.Decimal=0]="Decimal",rt[rt.Group=1]="Group",rt[rt.List=2]="List",rt[rt.PercentSign=3]="PercentSign",rt[rt.PlusSign=4]="PlusSign",rt[rt.MinusSign=5]="MinusSign",rt[rt.Exponential=6]="Exponential",rt[rt.SuperscriptingExponent=7]="SuperscriptingExponent",rt[rt.PerMille=8]="PerMille",rt[rt.Infinity=9]="Infinity",rt[rt.NaN=10]="NaN",rt[rt.TimeSeparator=11]="TimeSeparator",rt[rt.CurrencyDecimal=12]="CurrencyDecimal",rt[rt.CurrencyGroup=13]="CurrencyGroup",rt))();function Bi(n,t){const e=ii(n),i=e[He.NumberSymbols][t];if(void 0===i){if(t===rt.CurrencyDecimal)return e[He.NumberSymbols][rt.Decimal];if(t===rt.CurrencyGroup)return e[He.NumberSymbols][rt.Group]}return i}const FB=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function Qm(n){const t=parseInt(n);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+n);return t}function nE(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,s]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(s)}return null}let Xm=(()=>{class n{constructor(e,i,r,s){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=s,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(yl(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(i=>this._toggleClass(i.key,i.currentValue)),e.forEachChangedItem(i=>this._toggleClass(i.key,i.currentValue)),e.forEachRemovedItem(i=>{i.previousValue&&this._toggleClass(i.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(i=>{if("string"!=typeof i.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Kt(i.item)}`);this._toggleClass(i.item,!0)}),e.forEachRemovedItem(i=>this._toggleClass(i.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(i=>this._toggleClass(i,!0)):Object.keys(e).forEach(i=>this._toggleClass(i,!!e[i])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(i=>this._toggleClass(i,!1)):Object.keys(e).forEach(i=>this._toggleClass(i,!1)))}_toggleClass(e,i){(e=e.trim())&&e.split(/\s+/g).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(x(es),x(Fl),x(Je),x(Xr))},n.\u0275dir=Ee({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),n})();class qB{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ao=(()=>{class n{constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,s,o)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new qB(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)i.remove(null===s?void 0:s);else if(null!==s){const a=i.get(s);i.move(a,o),rE(a,r)}});for(let r=0,s=i.length;r{rE(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(x(An),x(_n),x(es))},n.\u0275dir=Ee({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();function rE(n,t){n.context.$implicit=t.item}let lr=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new YB,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){sE("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){sE("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(x(An),x(_n))},n.\u0275dir=Ee({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class YB{constructor(){this.$implicit=null,this.ngIf=null}}function sE(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${Kt(t)}'.`)}class Jm{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let ya=(()=>{class n{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews&&e!==this._defaultUsed){this._defaultUsed=e;for(let i=0;i{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new Jm(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(x(An),x(_n),x(ya,9))},n.\u0275dir=Ee({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),n})(),oE=(()=>{class n{constructor(e,i,r){r._addDefault(new Jm(e,i))}}return n.\u0275fac=function(e){return new(e||n)(x(An),x(_n),x(ya,9))},n.\u0275dir=Ee({type:n,selectors:[["","ngSwitchDefault",""]]}),n})();function cr(n,t){return new Be(2100,"")}let cE=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw cr();return e.toUpperCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=ci({name:"uppercase",type:n,pure:!0}),n})(),iu=(()=>{class n{transform(e){return JSON.stringify(e,null,2)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=ci({name:"json",type:n,pure:!1}),n})(),dE=(()=>{class n{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=uE}transform(e,i=uE){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const r=this.differ.diff(e),s=i!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(o=>{this.keyValues.push(function dV(n,t){return{key:n,value:t}}(o.key,o.currentValue))})),(r||s)&&(this.keyValues.sort(i),this.compareFn=i),this.keyValues}}return n.\u0275fac=function(e){return new(e||n)(x(Fl,16))},n.\u0275pipe=ci({name:"keyvalue",type:n,pure:!1}),n})();function uE(n,t){const e=n.key,i=t.key;if(e===i)return 0;if(void 0===e)return 1;if(void 0===i)return-1;if(null===e)return 1;if(null===i)return-1;if("string"==typeof e&&"string"==typeof i)return e{class n{constructor(e){this._locale=e}transform(e,i,r){if(!function tg(n){return!(null==n||""===n||n!=n)}(e))return null;r=r||this._locale;try{return function jB(n,t,e){return function Ym(n,t,e,i,r,s,o=!1){let a="",l=!1;if(isFinite(n)){let c=function zB(n){let i,r,s,o,a,t=Math.abs(n)+"",e=0;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(s=t.search(/e/i))>0?(r<0&&(r=s),r+=+t.slice(s+1),t=t.substring(0,s)):r<0&&(r=t.length),s=0;"0"===t.charAt(s);s++);if(s===(a=t.length))i=[0],r=1;else{for(a--;"0"===t.charAt(a);)a--;for(r-=s,i=[],o=0;s<=a;s++,o++)i[o]=Number(t.charAt(s))}return r>22&&(i=i.splice(0,21),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(n);o&&(c=function UB(n){if(0===n.digits[0])return n;const t=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(0===t?n.digits.push(0,0):1===t&&n.digits.push(0),n.integerLen+=2),n}(c));let d=t.minInt,f=t.minFrac,w=t.maxFrac;if(s){const Te=s.match(FB);if(null===Te)throw new Error(`${s} is not a valid digit info`);const he=Te[1],Pe=Te[3],ht=Te[5];null!=he&&(d=Qm(he)),null!=Pe&&(f=Qm(Pe)),null!=ht?w=Qm(ht):null!=Pe&&f>w&&(w=f)}!function $B(n,t,e){if(t>e)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${e}).`);let i=n.digits,r=i.length-n.integerLen;const s=Math.min(Math.max(t,r),e);let o=s+n.integerLen,a=i[o];if(o>0){i.splice(Math.max(n.integerLen,o));for(let f=o;f=5)if(o-1<0){for(let f=0;f>o;f--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[o-1]++;for(;r=c?j.pop():l=!1),w>=10?1:0},0);d&&(i.unshift(d),n.integerLen++)}(c,f,w);let k=c.digits,j=c.integerLen;const K=c.exponent;let ae=[];for(l=k.every(Te=>!Te);j0?ae=k.splice(j,k.length):(ae=k,k=[0]);const ce=[];for(k.length>=t.lgSize&&ce.unshift(k.splice(-t.lgSize,k.length).join(""));k.length>t.gSize;)ce.unshift(k.splice(-t.gSize,k.length).join(""));k.length&&ce.unshift(k.join("")),a=ce.join(Bi(e,i)),ae.length&&(a+=Bi(e,r)+ae.join("")),K&&(a+=Bi(e,rt.Exponential)+"+"+K)}else a=Bi(e,rt.Infinity);return a=n<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(n,function Km(n,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(";"),r=i[0],s=i[1],o=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf("#"));for(let d=0;d{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();const hE="browser";let vV=(()=>{class n{}return n.\u0275prov=Ae({token:n,providedIn:"root",factory:()=>new yV(te(lt),window)}),n})();class yV{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function bV(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(t)||s.querySelector(`[name="${t}"]`);if(o)return o}r=i.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(i-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=fE(this.window.history)||fE(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(t){return!1}}}function fE(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class pE{}class ig extends class wV extends class nB{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function tB(n){Wd||(Wd=n)}(new ig)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function CV(){return Hl=Hl||document.querySelector("base"),Hl?Hl.getAttribute("href"):null}();return null==e?null:function DV(n){ru=ru||document.createElement("a"),ru.setAttribute("href",n);const t=ru.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){Hl=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return nE(document.cookie,t)}}let ru,Hl=null;const mE=new Ce("TRANSITION_ID"),MV=[{provide:km,useFactory:function EV(n,t,e){return()=>{e.get(Hd).donePromise.then(()=>{const i=Sr(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let s=0;s{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();const su=new Ce("EventManagerPlugins");let ou=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>r.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let s=0;s{class n{constructor(){this._stylesSet=new Set}addStyles(e){const i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),jl=(()=>{class n extends _E{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(s=>{const o=this._doc.createElement("style");o.textContent=s,r.push(i.appendChild(o))})}addHost(e){const i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){const i=this._hostNodes.get(e);i&&i.forEach(vE),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(vE))}}return n.\u0275fac=function(e){return new(e||n)(te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();function vE(n){Sr().remove(n)}const rg={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},sg=/%COMP%/g;function au(n,t,e){for(let i=0;i{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let lu=(()=>{class n{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new og(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case Ki.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new PV(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case 1:case Ki.ShadowDom:return new OV(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=au(i.id,i.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(te(ou),te(jl),te(Rl))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();class og{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(rg[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(DE(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(DE(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;const s=rg[r];s?t.setAttributeNS(s,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=rg[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Ei.DashCase|Ei.Important)?t.style.setProperty(e,i,r&Ei.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Ei.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,wE(i)):this.eventManager.addEventListener(t,e,wE(i))}}function DE(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class PV extends og{constructor(t,e,i,r){super(t),this.component=i;const s=au(r+"-"+i.id,i.styles,[]);e.addStyles(s),this.contentAttr=function AV(n){return"_ngcontent-%COMP%".replace(sg,n)}(r+"-"+i.id),this.hostAttr=function IV(n){return"_nghost-%COMP%".replace(sg,n)}(r+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class OV extends og{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=au(r.id,r.styles,[]);for(let o=0;o{class n extends gE{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();const EE=["alt","control","meta","shift"],NV={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},ME={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},BV={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let VV=(()=>{class n extends gE{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Sr().onAndCancel(e,s.domEventName,o))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=n._normalizeKey(i.pop());let o="";if(EE.forEach(l=>{const c=i.indexOf(l);c>-1&&(i.splice(c,1),o+=l+".")}),o+=s,0!=i.length||0===s.length)return null;const a={};return a.domEventName=r,a.fullKey=o,a}static getEventFullKey(e){let i="",r=function HV(n){let t=n.key;if(null==t){if(t=n.keyIdentifier,null==t)return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===n.location&&ME.hasOwnProperty(t)&&(t=ME[t]))}return NV[t]||t}(e);return r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),EE.forEach(s=>{s!=r&&BV[s](e)&&(i+=s+".")}),i+=r,i}static eventCallback(e,i,r){return s=>{n.getEventFullKey(s)===e&&r.runGuarded(()=>i(s))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();const $V=MD(XN,"browser",[{provide:jd,useValue:hE},{provide:gD,useValue:function jV(){ig.makeCurrent()},multi:!0},{provide:lt,useFactory:function zV(){return function rI(n){vf=n}(document),document},deps:[]}]),SE=new Ce(""),kE=[{provide:Ud,useClass:class xV{addToWindow(t){qt.getAngularTestability=(i,r=!0)=>{const s=t.findTestabilityInTree(i,r);if(null==s)throw new Error("Could not find testability for element.");return s},qt.getAllAngularTestabilities=()=>t.getAllTestabilities(),qt.getAllAngularRootElements=()=>t.getAllRootElements(),qt.frameworkStabilizers||(qt.frameworkStabilizers=[]),qt.frameworkStabilizers.push(i=>{const r=qt.getAllAngularTestabilities();let s=r.length,o=!1;const a=function(l){o=o||l,s--,0==s&&i(o)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,e,i){if(null==e)return null;const r=t.getTestability(e);return null!=r?r:i?Sr().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}},deps:[]},{provide:bD,useClass:Om,deps:[et,Fm,Ud]},{provide:Om,useClass:Om,deps:[et,Fm,Ud]}],TE=[{provide:mp,useValue:"root"},{provide:qr,useFactory:function UV(){return new qr},deps:[]},{provide:su,useClass:FV,multi:!0,deps:[lt,et,jd]},{provide:su,useClass:VV,multi:!0,deps:[lt]},{provide:lu,useClass:lu,deps:[ou,jl,Rl]},{provide:Sl,useExisting:lu},{provide:_E,useExisting:jl},{provide:jl,useClass:jl,deps:[lt]},{provide:ou,useClass:ou,deps:[su,et]},{provide:pE,useClass:SV,deps:[]},[]];let AE=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:Rl,useValue:e.appId},{provide:mE,useExisting:Rl},MV]}}}return n.\u0275fac=function(e){return new(e||n)(te(SE,12))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[...TE,...kE],imports:[hi,JN]}),n})(),IE=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return n.\u0275fac=function(e){return new(e||n)(te(lt))},n.\u0275prov=Ae({token:n,factory:function(e){let i=null;return i=e?new e:function WV(){return new IE(te(lt))}(),i},providedIn:"root"}),n})();"undefined"!=typeof window&&window;let cg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:function(e){let i=null;return i=e?new(e||n):te(OE),i},providedIn:"root"}),n})(),OE=(()=>{class n extends cg{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Ut.NONE:return i;case Ut.HTML:return gr(i,"HTML")?Di(i):bb(this._doc,String(i)).toString();case Ut.STYLE:return gr(i,"Style")?Di(i):i;case Ut.SCRIPT:if(gr(i,"Script"))return Di(i);throw new Error("unsafe value used in a script context");case Ut.URL:return hb(i),gr(i,"URL")?Di(i):ul(String(i));case Ut.RESOURCE_URL:if(gr(i,"ResourceURL"))return Di(i);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${e} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(e){return function vR(n){return new fR(n)}(e)}bypassSecurityTrustStyle(e){return function yR(n){return new pR(n)}(e)}bypassSecurityTrustScript(e){return function bR(n){return new mR(n)}(e)}bypassSecurityTrustUrl(e){return function wR(n){return new gR(n)}(e)}bypassSecurityTrustResourceUrl(e){return function CR(n){return new _R(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(te(lt))},n.\u0275prov=Ae({token:n,factory:function(e){let i=null;return i=e?new e:function e2(n){return new OE(n.get(lt))}(te(Jt)),i},providedIn:"root"}),n})();class FE{}const rs="*";function Vn(n,t){return{type:7,name:n,definitions:t,options:{}}}function Zt(n,t=null){return{type:4,styles:t,timings:n}}function LE(n,t=null){return{type:3,steps:n,options:t}}function NE(n,t=null){return{type:2,steps:n,options:t}}function Qe(n){return{type:6,styles:n,offset:null}}function zt(n,t,e){return{type:0,name:n,styles:t,options:e}}function Wt(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function cu(n=null){return{type:9,options:n}}function du(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function BE(n){Promise.resolve(null).then(n)}class Ul{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){BE(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class VE{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const s=this.players.length;0==s?BE(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++e==s&&this._onFinish()}),o.onDestroy(()=>{++i==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const Rt=!1;function HE(n){return new Be(3e3,Rt)}function N2(){return"undefined"!=typeof window&&void 0!==window.document}function ug(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Ms(n){switch(n.length){case 0:return new Ul;case 1:return n[0];default:return new VE(n)}}function jE(n,t,e,i,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(i.forEach(d=>{const f=d.get("offset"),w=f==l,k=w&&c||new Map;d.forEach((j,K)=>{let ae=K,ce=j;if("offset"!==K)switch(ae=t.normalizePropertyName(ae,o),ce){case"!":ce=r.get(K);break;case rs:ce=s.get(K);break;default:ce=t.normalizeStyleValue(K,ae,ce,o)}k.set(ae,ce)}),w||a.push(k),c=k,l=f}),o.length)throw function M2(n){return new Be(3502,Rt)}();return a}function hg(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&fg(e,"start",n)));break;case"done":n.onDone(()=>i(e&&fg(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&fg(e,"destroy",n)))}}function fg(n,t,e){const i=e.totalTime,s=pg(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,null==i?n.totalTime:i,!!e.disabled),o=n._data;return null!=o&&(s._data=o),s}function pg(n,t,e,i,r="",s=0,o){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function xi(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function UE(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let mg=(n,t)=>!1,zE=(n,t,e)=>[],$E=null;function gg(n){const t=n.parentNode||n.host;return t===$E?null:t}(ug()||"undefined"!=typeof Element)&&(N2()?($E=(()=>document.documentElement)(),mg=(n,t)=>{for(;t;){if(t===n)return!0;t=gg(t)}return!1}):mg=(n,t)=>n.contains(t),zE=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let co=null,GE=!1;const WE=mg,qE=zE;let YE=(()=>{class n{validateStyleProperty(e){return function V2(n){co||(co=function H2(){return"undefined"!=typeof document?document.body:null}()||{},GE=!!co.style&&"WebkitAppearance"in co.style);let t=!0;return co.style&&!function B2(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in co.style,!t&&GE&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in co.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return WE(e,i)}getParentElement(e){return gg(e)}query(e,i,r){return qE(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,s,o,a=[],l){return new Ul(r,s)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),_g=(()=>{class n{}return n.NOOP=new YE,n})();const vg="ng-enter",hu="ng-leave",fu="ng-trigger",pu=".ng-trigger",QE="ng-animating",yg=".ng-animating";function xs(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:bg(parseFloat(t[1]),t[2])}function bg(n,t){return"s"===t?1e3*n:n}function mu(n,t,e){return n.hasOwnProperty("duration")?n:function z2(n,t,e){let r,s=0,o="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(HE()),{duration:0,delay:0,easing:""};r=bg(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=bg(parseFloat(l),a[4]));const c=a[5];c&&(o=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(function n2(){return new Be(3100,Rt)}()),a=!0),s<0&&(t.push(function r2(){return new Be(3101,Rt)}()),a=!0),a&&t.splice(l,0,HE())}return{duration:r,delay:s,easing:o}}(n,t,e)}function zl(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function ZE(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function Ss(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function JE(n,t,e){return e?t+":"+e+";":""}function eM(n){let t="";for(let e=0;e{const s=Cg(r);e&&!e.has(r)&&e.set(r,n.style[s]),n.style[s]=i}),ug()&&eM(n))}function uo(n,t){n.style&&(t.forEach((e,i)=>{const r=Cg(i);n.style[r]=""}),ug()&&eM(n))}function $l(n){return Array.isArray(n)?1==n.length?n[0]:NE(n):n}const wg=new RegExp("{{\\s*(.+?)\\s*}}","g");function tM(n){let t=[];if("string"==typeof n){let e;for(;e=wg.exec(n);)t.push(e[1]);wg.lastIndex=0}return t}function gu(n,t,e){const i=n.toString(),r=i.replace(wg,(s,o)=>{let a=t[o];return null==a&&(e.push(function o2(n){return new Be(3003,Rt)}()),a=""),a.toString()});return r==i?n:r}function _u(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const W2=/-+([a-z0-9])/g;function Cg(n){return n.replace(W2,(...t)=>t[1].toUpperCase())}function q2(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Si(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function a2(n){return new Be(3004,Rt)}()}}function nM(n,t){return window.getComputedStyle(n)[t]}function J2(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function eH(n,t,e){if(":"==n[0]){const l=function tH(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function b2(n){return new Be(3015,Rt)}()),t;const r=i[1],s=i[2],o=i[3];t.push(iM(r,o));"<"==s[0]&&!("*"==r&&"*"==o)&&t.push(iM(o,r))}(i,e,t)):e.push(n),e}const wu=new Set(["true","1"]),Cu=new Set(["false","0"]);function iM(n,t){const e=wu.has(n)||Cu.has(n),i=wu.has(t)||Cu.has(t);return(r,s)=>{let o="*"==n||n==r,a="*"==t||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?wu.has(n):Cu.has(n)),!a&&i&&"boolean"==typeof s&&(a=s?wu.has(t):Cu.has(t)),o&&a}}const nH=new RegExp("s*:selfs*,?","g");function Dg(n,t,e,i){return new iH(n).build(t,e,i)}class iH{constructor(t){this._driver=t}build(t,e,i){const r=new oH(e);return this._resetContextStyleTimingState(r),Si(this,$l(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const s=[],o=[];return"@"==t.name.charAt(0)&&e.errors.push(function c2(){return new Be(3006,Rt)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,s.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,o.push(l)}else e.errors.push(function d2(){return new Be(3007,Rt)}())}),{type:7,name:t.name,states:s,transitions:o,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const s=new Set,o=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{tM(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(_u(s.values()),e.errors.push(function u2(n,t){return new Be(3008,Rt)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=Si(this,$l(t.animation),e);return{type:1,matchers:J2(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:ho(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>Si(this,i,e)),options:ho(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=i;const a=Si(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:ho(t.options)}}visitAnimate(t,e){const i=function lH(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return Eg(mu(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=Eg(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=mu(e,t);return Eg(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,s=t.styles?t.styles:Qe({});if(5==s.type)r=this.visitKeyframes(s,e);else{let o=t.styles,a=!1;if(!o){a=!0;const c={};i.easing&&(c.easing=i.easing),o=Qe(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(o,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===rs?i.push(a):e.errors.push(new Be(3002,Rt)):i.push(ZE(a));let s=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!s))for(let l of a.values())if(l.toString().indexOf("{{")>=0){s=!0;break}}),{type:6,styles:i,easing:o,offset:t.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,s=e.currentTime;i&&s>0&&(s-=i.duration+i.delay),t.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),d=c.get(l);let f=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(e.errors.push(function f2(n,t,e,i,r){return new Be(3010,Rt)}()),f=!1),s=d.startTime),f&&c.set(l,{startTime:s,endTime:r}),e.options&&function G2(n,t,e){const i=t.params||{},r=tM(n);r.length&&r.forEach(s=>{i.hasOwnProperty(s)||e.push(function s2(n){return new Be(3001,Rt)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function p2(){return new Be(3011,Rt)}()),i;let s=0;const o=[];let a=!1,l=!1,c=0;const d=t.steps.map(ce=>{const Te=this._makeStyleAst(ce,e);let he=null!=Te.offset?Te.offset:function aH(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(Te.styles),Pe=0;return null!=he&&(s++,Pe=Te.offset=he),l=l||Pe<0||Pe>1,a=a||Pe0&&s{const he=w>0?Te==k?1:w*Te:o[Te],Pe=he*ae;e.currentTime=j+K.delay+Pe,K.duration=Pe,this._validateStyleAst(ce,e),ce.offset=he,i.styles.push(ce)}),i}visitReference(t,e){return{type:8,animation:Si(this,$l(t.animation),e),options:ho(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:ho(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:ho(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function rH(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(nH,"")),n=n.replace(/@\*/g,pu).replace(/@\w+/g,e=>pu+"-"+e.slice(1)).replace(/:animating/g,yg),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+s:s,xi(e.collectedStyles,e.currentQuerySelector,new Map);const a=Si(this,$l(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:a,originalSelector:t.selector,options:ho(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function v2(){return new Be(3013,Rt)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:mu(t.timings,e.errors,!0);return{type:12,animation:Si(this,$l(t.animation),e),timings:i,options:null}}}class oH{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set,this.nonAnimatableCSSPropertiesFound=new Set}}function ho(n){return n?(n=zl(n)).params&&(n.params=function sH(n){return n?zl(n):null}(n.params)):n={},n}function Eg(n,t,e){return{duration:n,delay:t,easing:e}}function Mg(n,t,e,i,r,s,o=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class Du{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const uH=new RegExp(":enter","g"),fH=new RegExp(":leave","g");function xg(n,t,e,i,r,s=new Map,o=new Map,a,l,c=[]){return(new pH).buildKeyframes(n,t,e,i,r,s,o,a,l,c)}class pH{buildKeyframes(t,e,i,r,s,o,a,l,c,d=[]){c=c||new Du;const f=new Sg(t,e,c,r,s,d,[]);f.options=l;const w=l.delay?xs(l.delay):0;f.currentTimeline.delayNextStep(w),f.currentTimeline.setStyles([o],null,f.errors,l),Si(this,i,f);const k=f.timelines.filter(j=>j.containsAnimation());if(k.length&&a.size){let j;for(let K=k.length-1;K>=0;K--){const ae=k[K];if(ae.element===e){j=ae;break}}j&&!j.allowOnlyTimelineStyles()&&j.setStyles([a],null,f.errors,l)}return k.length?k.map(j=>j.buildKeyframes()):[Mg(e,[],[],[],0,w,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),s=e.currentTimeline.currentTime,o=this._visitSubInstructions(i,r,r.options);s!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,i){let s=e.currentTimeline.currentTime;const o=null!=i.duration?xs(i.duration):null,a=null!=i.delay?xs(i.delay):null;return 0!==o&&t.forEach(l=>{const c=e.appendInstructionToTimeline(l,o,a);s=Math.max(s,c.duration+c.delay)}),s}visitReference(t,e){e.updateOptions(t.options,!0),Si(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const s=t.options;if(s&&(s.params||s.delay)&&(r=e.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Eu);const o=xs(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>Si(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?xs(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),Si(this,o,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>e.currentTimeline.mergeTimelineCollectedStyles(o)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return mu(e.params?gu(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(i.duration),this.visitStyle(s,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const s=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(s):i.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,s=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*s),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+s),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},s=r.delay?xs(r.delay):0;s&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Eu);let o=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,d)=>{e.currentQueryIndex=d;const f=e.createSubContext(t.options,c);s&&f.delayNextStep(s),c===e.element&&(l=f.currentTimeline),Si(this,t.animation,f),f.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,f.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,s=t.timings,o=Math.abs(s.duration),a=o*(e.currentQueryTotal-1);let l=o*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const d=e.currentTimeline;l&&d.delayNextStep(l);const f=d.currentTime;Si(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-f+(r.startTime-i.currentTimeline.startTime)}}const Eu={};class Sg{constructor(t,e,i,r,s,o,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Eu,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Mu(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=xs(i.duration)),null!=i.delay&&(r.delay=xs(i.delay));const s=i.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!e||!o.hasOwnProperty(a))&&(o[a]=gu(s[a],o,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,s=new Sg(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=Eu,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+t.delay,easing:""},s=new mH(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,s,o){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(uH,"."+this._enterClassName)).replace(fH,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!s&&0==a.length&&o.push(function y2(n){return new Be(3014,Rt)}()),a}}class Mu{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Mu(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||rs),this._currentKeyframe.set(e,rs);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function gH(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let s of i)e.set(s,rs)}else Ss(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=gu(l,s,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)||rs),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Ss(a,new Map,this._backFill);c.forEach((d,f)=>{"!"===d?t.add(f):d===rs&&e.add(f)}),i||c.set("offset",l/this.duration),r.push(c)});const s=t.size?_u(t.values()):[],o=e.size?_u(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return Mg(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class mH extends Mu{constructor(t,e,i,r,s,o,a=!1){super(t,e,o.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],o=i+e,a=e/o,l=Ss(t[0]);l.set("offset",0),s.push(l);const c=Ss(t[0]);c.set("offset",oM(a)),s.push(c);const d=t.length-1;for(let f=1;f<=d;f++){let w=Ss(t[f]);const k=w.get("offset");w.set("offset",oM((e+k*i)/o)),s.push(w)}i=o,e=0,r="",t=s}return Mg(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function oM(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class kg{}const _H=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class vH extends kg{normalizePropertyName(t,e){return Cg(t)}normalizeStyleValue(t,e,i,r){let s="";const o=i.toString().trim();if(_H.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)s="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function l2(n,t){return new Be(3005,Rt)}())}return o+s}}function aM(n,t,e,i,r,s,o,a,l,c,d,f,w){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:f,errors:w}}const Tg={};class lM{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function yH(n,t,e,i,r){return n.some(s=>s(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(null==t?void 0:t.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,s,o,a,l,c,d){var f;const w=[],k=this.ast.options&&this.ast.options.params||Tg,K=this.buildStyles(i,a&&a.params||Tg,w),ae=l&&l.params||Tg,ce=this.buildStyles(r,ae,w),Te=new Set,he=new Map,Pe=new Map,ht="void"===r,Nt={params:bH(ae,k),delay:null===(f=this.ast.options)||void 0===f?void 0:f.delay},pn=d?[]:xg(t,e,this.ast.animation,s,o,K,ce,Nt,c,w);let Kn=0;if(pn.forEach(ai=>{Kn=Math.max(ai.duration+ai.delay,Kn)}),w.length)return aM(e,this._triggerName,i,r,ht,K,ce,[],[],he,Pe,Kn,w);pn.forEach(ai=>{const us=ai.element,hs=xi(he,us,new Set);ai.preStyleProps.forEach(Lr=>hs.add(Lr));const fs=xi(Pe,us,new Set);ai.postStyleProps.forEach(Lr=>fs.add(Lr)),us!==e&&Te.add(us)});const Vs=_u(Te.values());return aM(e,this._triggerName,i,r,ht,K,ce,pn,Vs,he,Pe,Kn)}}function bH(n,t){const e=zl(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class wH{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=zl(this.defaultParams);return Object.keys(t).forEach(s=>{const o=t[s];null!==o&&(r[s]=o)}),this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((o,a)=>{o&&(o=gu(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),i.set(l,o)})}),i}}class DH{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new wH(r.style,r.options&&r.options.params||{},i))}),cM(this.states,"true","1"),cM(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new lM(t,r,this.states))}),this.fallbackTransition=function EH(n,t,e){return new lM(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(o=>o.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function cM(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const MH=new Du;class xH{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],s=Dg(this._driver,e,i,[]);if(i.length)throw function x2(n){return new Be(3503,Rt)}();this._animations.set(t,s)}_buildPlayer(t,e,i){const r=t.element,s=jE(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],s=this._animations.get(t);let o;const a=new Map;if(s?(o=xg(this._driver,e,s,vg,hu,new Map,new Map,i,MH,r),o.forEach(d=>{const f=xi(a,d.element,new Map);d.postStyleProps.forEach(w=>f.set(w,null))})):(r.push(function S2(){return new Be(3300,Rt)}()),o=[]),r.length)throw function k2(n){return new Be(3504,Rt)}();a.forEach((d,f)=>{d.forEach((w,k)=>{d.set(k,this._driver.computeStyle(f,k,rs))})});const c=Ms(o.map(d=>{const f=a.get(d.element);return this._buildPlayer(d,new Map,f)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function T2(n){return new Be(3301,Rt)}();return e}listen(t,e,i,r){const s=pg(e,"","","");return hg(this._getPlayer(t),i,s,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const s=this._getPlayer(t);switch(i){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const dM="ng-animate-queued",Ag="ng-animate-disabled",IH=[],uM={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},RH={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Hi="__ng_removed";class Ig{constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function LH(n){return null!=n?n:null}(i?t.value:t),i){const s=zl(t);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Gl="void",Rg=new Ig(Gl);class PH{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,ji(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function A2(n,t){return new Be(3302,Rt)}();if(null==i||0==i.length)throw function I2(n){return new Be(3303,Rt)}();if(!function NH(n){return"start"==n||"done"==n}(i))throw function R2(n,t){return new Be(3400,Rt)}();const s=xi(this._elementListeners,t,[]),o={name:e,phase:i,callback:r};s.push(o);const a=xi(this._engine.statesByElement,t,new Map);return a.has(e)||(ji(t,fu),ji(t,fu+"-"+e),a.set(e,Rg)),()=>{this._engine.afterFlush(()=>{const l=s.indexOf(o);l>=0&&s.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function P2(n){return new Be(3401,Rt)}();return e}trigger(t,e,i,r=!0){const s=this._getTrigger(e),o=new Pg(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(ji(t,fu),ji(t,fu+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new Ig(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=Rg),c.value!==Gl&&l.value===c.value){if(!function HH(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{uo(t,ae),kr(t,ce)})}return}const w=xi(this._engine.playersByElement,t,[]);w.forEach(K=>{K.namespaceId==this.id&&K.triggerName==e&&K.queued&&K.destroy()});let k=s.matchTransition(l.value,c.value,t,c.params),j=!1;if(!k){if(!r)return;k=s.fallbackTransition,j=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:k,fromState:l,toState:c,player:o,isFallbackTransition:j}),j||(ji(t,dM),o.onStart(()=>{ba(t,dM)})),o.onDone(()=>{let K=this.players.indexOf(o);K>=0&&this.players.splice(K,1);const ae=this._engine.playersByElement.get(t);if(ae){let ce=ae.indexOf(o);ce>=0&&ae.splice(ce,1)}}),this.players.push(o),w.push(o),o}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,pu,!0);i.forEach(r=>{if(r[Hi])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const s=this._engine.statesByElement.get(t),o=new Map;if(s){const a=[];if(s.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){const d=this.trigger(t,c,Gl,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),i&&Ms(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const l=this._triggers.get(o).fallbackTransition,c=i.get(o)||Rg,d=new Ig(Gl),f=new Pg(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:d,player:f,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const s=i.players.length?i.playersByQueriedElement.get(t):[];if(s&&s.length)r=!0;else{let o=t;for(;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const s=t[Hi];(!s||s===uM)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){ji(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const s=i.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==i.triggerName){const l=pg(s,i.triggerName,i.fromState.value,i.toState.value);l._data=t,hg(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const s=i.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class OH{constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new PH(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&e.add(s)}return e}trigger(t,e,i,r){if(xu(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!xu(e))return;const s=e[Hi];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(e);o>=0&&this.collectedLeaveElements.splice(o,1)}if(t){const o=this._fetchNamespace(t);o&&o.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),ji(t,Ag)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),ba(t,Ag))}removeNode(t,e,i,r){if(xu(e)){const s=t?this._fetchNamespace(t):null;if(s?s.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,s){this.collectedLeaveElements.push(e),e[Hi]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,i,r,s){return xu(e)?this._fetchNamespace(t).listen(e,i,r,s):()=>{}}_buildInstruction(t,e,i,r,s){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,s)}destroyInnerAnimations(t){let e=this.driver.query(t,pu,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,yg,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Ms(this.players).onDone(()=>t());t()})}processLeaveNode(t){var e;const i=t[Hi];if(i&&i.setForRemoval){if(t[Hi]=uM,i.namespaceId){this.destroyInnerAnimations(t);const r=this._fetchNamespace(i.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,i.setForRemoval)}!(null===(e=t.classList)||void 0===e)&&e.contains(Ag)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?Ms(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function O2(n){return new Be(3402,Rt)}()}_flushAnimations(t,e){const i=new Du,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(Ue=>{d.add(Ue);const nt=this.driver.query(Ue,".ng-animate-queued",!0);for(let st=0;st{const st=vg+K++;j.set(nt,st),Ue.forEach(kt=>ji(kt,st))});const ae=[],ce=new Set,Te=new Set;for(let Ue=0;Uece.add(kt)):Te.add(nt))}const he=new Map,Pe=pM(w,Array.from(ce));Pe.forEach((Ue,nt)=>{const st=hu+K++;he.set(nt,st),Ue.forEach(kt=>ji(kt,st))}),t.push(()=>{k.forEach((Ue,nt)=>{const st=j.get(nt);Ue.forEach(kt=>ba(kt,st))}),Pe.forEach((Ue,nt)=>{const st=he.get(nt);Ue.forEach(kt=>ba(kt,st))}),ae.forEach(Ue=>{this.processLeaveNode(Ue)})});const ht=[],Nt=[];for(let Ue=this._namespaceList.length-1;Ue>=0;Ue--)this._namespaceList[Ue].drainQueuedTransitions(e).forEach(st=>{const kt=st.player,mn=st.element;if(ht.push(kt),this.collectedEnterElements.length){const Qn=mn[Hi];if(Qn&&Qn.setForMove){if(Qn.previousTriggersValues&&Qn.previousTriggersValues.has(st.triggerName)){const ko=Qn.previousTriggersValues.get(st.triggerName),qi=this.statesByElement.get(st.element);if(qi&&qi.has(st.triggerName)){const Xh=qi.get(st.triggerName);Xh.value=ko,qi.set(st.triggerName,Xh)}}return void kt.destroy()}}const Nr=!f||!this.driver.containsElement(f,mn),Ai=he.get(mn),Hs=j.get(mn),ln=this._buildInstruction(st,i,Hs,Ai,Nr);if(ln.errors&&ln.errors.length)return void Nt.push(ln);if(Nr)return kt.onStart(()=>uo(mn,ln.fromStyles)),kt.onDestroy(()=>kr(mn,ln.toStyles)),void r.push(kt);if(st.isFallbackTransition)return kt.onStart(()=>uo(mn,ln.fromStyles)),kt.onDestroy(()=>kr(mn,ln.toStyles)),void r.push(kt);const fA=[];ln.timelines.forEach(Qn=>{Qn.stretchStartingKeyframe=!0,this.disabledNodes.has(Qn.element)||fA.push(Qn)}),ln.timelines=fA,i.append(mn,ln.timelines),o.push({instruction:ln,player:kt,element:mn}),ln.queriedElements.forEach(Qn=>xi(a,Qn,[]).push(kt)),ln.preStyleProps.forEach((Qn,ko)=>{if(Qn.size){let qi=l.get(ko);qi||l.set(ko,qi=new Set),Qn.forEach((Xh,Yv)=>qi.add(Yv))}}),ln.postStyleProps.forEach((Qn,ko)=>{let qi=c.get(ko);qi||c.set(ko,qi=new Set),Qn.forEach((Xh,Yv)=>qi.add(Yv))})});if(Nt.length){const Ue=[];Nt.forEach(nt=>{Ue.push(function F2(n,t){return new Be(3505,Rt)}())}),ht.forEach(nt=>nt.destroy()),this.reportError(Ue)}const pn=new Map,Kn=new Map;o.forEach(Ue=>{const nt=Ue.element;i.has(nt)&&(Kn.set(nt,nt),this._beforeAnimationBuild(Ue.player.namespaceId,Ue.instruction,pn))}),r.forEach(Ue=>{const nt=Ue.element;this._getPreviousPlayers(nt,!1,Ue.namespaceId,Ue.triggerName,null).forEach(kt=>{xi(pn,nt,[]).push(kt),kt.destroy()})});const Vs=ae.filter(Ue=>gM(Ue,l,c)),ai=new Map;fM(ai,this.driver,Te,c,rs).forEach(Ue=>{gM(Ue,l,c)&&Vs.push(Ue)});const hs=new Map;k.forEach((Ue,nt)=>{fM(hs,this.driver,new Set(Ue),l,"!")}),Vs.forEach(Ue=>{var nt,st;const kt=ai.get(Ue),mn=hs.get(Ue);ai.set(Ue,new Map([...Array.from(null!==(nt=null==kt?void 0:kt.entries())&&void 0!==nt?nt:[]),...Array.from(null!==(st=null==mn?void 0:mn.entries())&&void 0!==st?st:[])]))});const fs=[],Lr=[],$a={};o.forEach(Ue=>{const{element:nt,player:st,instruction:kt}=Ue;if(i.has(nt)){if(d.has(nt))return st.onDestroy(()=>kr(nt,kt.toStyles)),st.disabled=!0,st.overrideTotalTime(kt.totalTime),void r.push(st);let mn=$a;if(Kn.size>1){let Ai=nt;const Hs=[];for(;Ai=Ai.parentNode;){const ln=Kn.get(Ai);if(ln){mn=ln;break}Hs.push(Ai)}Hs.forEach(ln=>Kn.set(ln,mn))}const Nr=this._buildAnimation(st.namespaceId,kt,pn,s,hs,ai);if(st.setRealPlayer(Nr),mn===$a)fs.push(st);else{const Ai=this.playersByElement.get(mn);Ai&&Ai.length&&(st.parentPlayer=Ms(Ai)),r.push(st)}}else uo(nt,kt.fromStyles),st.onDestroy(()=>kr(nt,kt.toStyles)),Lr.push(st),d.has(nt)&&r.push(st)}),Lr.forEach(Ue=>{const nt=s.get(Ue.element);if(nt&&nt.length){const st=Ms(nt);Ue.setRealPlayer(st)}}),r.forEach(Ue=>{Ue.parentPlayer?Ue.syncPlayerEvents(Ue.parentPlayer):Ue.destroy()});for(let Ue=0;Ue!Nr.destroyed);mn.length?BH(this,nt,mn):this.processLeaveNode(nt)}return ae.length=0,fs.forEach(Ue=>{this.players.push(Ue),Ue.onDone(()=>{Ue.destroy();const nt=this.players.indexOf(Ue);this.players.splice(nt,1)}),Ue.play()}),fs}elementContainsData(t,e){let i=!1;const r=e[Hi];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,s){let o=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(o=a)}else{const a=this.playersByElement.get(t);if(a){const l=!s||s==Gl;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||o.push(c)})}}return(i||r)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),o}_beforeAnimationBuild(t,e,i){const s=e.element,o=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,d=c!==s,f=xi(i,c,[]);this._getPreviousPlayers(c,d,o,a,e.toState).forEach(k=>{const j=k.getRealPlayer();j.beforeDestroy&&j.beforeDestroy(),k.destroy(),f.push(k)})}uo(s,e.fromStyles)}_buildAnimation(t,e,i,r,s,o){const a=e.triggerName,l=e.element,c=[],d=new Set,f=new Set,w=e.timelines.map(j=>{const K=j.element;d.add(K);const ae=K[Hi];if(ae&&ae.removedBeforeQueried)return new Ul(j.duration,j.delay);const ce=K!==l,Te=function VH(n){const t=[];return mM(n,t),t}((i.get(K)||IH).map(pn=>pn.getRealPlayer())).filter(pn=>!!pn.element&&pn.element===K),he=s.get(K),Pe=o.get(K),ht=jE(0,this._normalizer,0,j.keyframes,he,Pe),Nt=this._buildPlayer(j,ht,Te);if(j.subTimeline&&r&&f.add(K),ce){const pn=new Pg(t,a,K);pn.setRealPlayer(Nt),c.push(pn)}return Nt});c.forEach(j=>{xi(this.playersByQueriedElement,j.element,[]).push(j),j.onDone(()=>function FH(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,j.element,j))}),d.forEach(j=>ji(j,QE));const k=Ms(w);return k.onDestroy(()=>{d.forEach(j=>ba(j,QE)),kr(l,e.toStyles)}),f.forEach(j=>{xi(r,j,[]).push(k)}),k}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new Ul(t.duration,t.delay)}}class Pg{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new Ul,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>hg(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){xi(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function xu(n){return n&&1===n.nodeType}function hM(n,t){const e=n.style.display;return n.style.display=null!=t?t:"none",e}function fM(n,t,e,i,r){const s=[];e.forEach(l=>s.push(hM(l)));const o=[];i.forEach((l,c)=>{const d=new Map;l.forEach(f=>{const w=t.computeStyle(c,f,r);d.set(f,w),(!w||0==w.length)&&(c[Hi]=RH,o.push(c))}),n.set(c,d)});let a=0;return e.forEach(l=>hM(l,s[a++])),o}function pM(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const r=new Set(t),s=new Map;function o(a){if(!a)return 1;let l=s.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?1:o(c),s.set(a,l),l}return t.forEach(a=>{const l=o(a);1!==l&&e.get(l).push(a)}),e}function ji(n,t){var e;null===(e=n.classList)||void 0===e||e.add(t)}function ba(n,t){var e;null===(e=n.classList)||void 0===e||e.remove(t)}function BH(n,t,e){Ms(e).onDone(()=>n.processLeaveNode(t))}function mM(n,t){for(let e=0;er.add(s)):t.set(n,i),e.delete(n),!0}class Su{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new OH(t,e,i),this._timelineEngine=new xH(t,e,i),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(t,e,i,r,s){const o=t+"-"+r;let a=this._triggerCache[o];if(!a){const l=[],d=Dg(this._driver,s,l,[]);if(l.length)throw function E2(n,t){return new Be(3404,Rt)}();a=function CH(n,t,e){return new DH(n,t,e)}(r,d,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[s,o]=UE(i);this._timelineEngine.command(s,e,o,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,s){if("@"==i.charAt(0)){const[o,a]=UE(i);return this._timelineEngine.listen(o,e,a,s)}return this._transitionEngine.listen(t,e,i,r,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let UH=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let s=n.initialStylesByElement.get(e);s||n.initialStylesByElement.set(e,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&kr(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(kr(this._element,this._initialStyles),this._endStyles&&(kr(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(uo(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(uo(this._element,this._endStyles),this._endStyles=null),kr(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function Og(n){let t=null;return n.forEach((e,i)=>{(function zH(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class _M{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:nM(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class $H{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return WE(t,e)}getParentElement(t){return gg(t)}query(t,e,i){return qE(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,s,o=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};s&&(l.easing=s);const c=new Map,d=o.filter(k=>k instanceof _M);(function Y2(n,t){return 0===n||0===t})(i,r)&&d.forEach(k=>{k.currentSnapshot.forEach((j,K)=>c.set(K,j))});let f=function $2(n){return n.length?n[0]instanceof Map?n:n.map(t=>ZE(t)):[]}(e).map(k=>Ss(k));f=function K2(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((s,o)=>{i.has(o)||r.push(o),i.set(o,s)}),r.length)for(let s=1;so.set(a,nM(n,a)))}}return t}(t,f,c);const w=function jH(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=Og(t[0]),t.length>1&&(i=Og(t[t.length-1]))):t instanceof Map&&(e=Og(t)),e||i?new UH(n,e,i):null}(t,f);return new _M(t,f,l,w)}}let GH=(()=>{class n extends FE{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:Ki.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?NE(e):e;return vM(this._renderer,null,i,"register",[r]),new WH(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(te(Sl),te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();class WH extends class t2{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new qH(this._id,t,e||{},this._renderer)}}class qH{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return vM(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){var t,e;return null!==(e=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}}function vM(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const yM="@.disabled";let YH=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(s,o)=>{const a=null==o?void 0:o.parentNode(s);a&&o.removeChild(a,s)}}createRenderer(e,i){const s=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let d=this._rendererCache.get(s);return d||(d=new bM("",s,this.engine),this._rendererCache.set(s,d)),d}const o=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(o,a,e,d.name,d)};return i.data.animation.forEach(l),new KH(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(te(Sl),te(Su),te(et))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();class bM{constructor(t,e,i){this.namespaceId=t,this.delegate=e,this.engine=i,this.destroyNode=this.delegate.destroyNode?r=>e.destroyNode(r):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==yM?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class KH extends bM{constructor(t,e,i,r){super(e,i,r),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==yM?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function QH(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let s=e.slice(1),o="";return"@"!=s.charAt(0)&&([s,o]=function ZH(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}const wM=[{provide:FE,useClass:GH},{provide:kg,useFactory:function JH(){return new vH}},{provide:Su,useClass:(()=>{class n extends Su{constructor(e,i,r){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(te(lt),te(_g),te(kg))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})()},{provide:Sl,useFactory:function ej(n,t,e){return new YH(n,t,e)},deps:[lu,Su,et]}],CM=[{provide:_g,useFactory:()=>new $H},{provide:fn,useValue:"BrowserAnimations"},...wM],tj=[{provide:_g,useClass:YE},{provide:fn,useValue:"NoopAnimations"},...wM];let nj=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?tj:CM}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:CM,imports:[AE]}),n})();const{isArray:ij}=Array,{getPrototypeOf:rj,prototype:sj,keys:oj}=Object;function DM(n){if(1===n.length){const t=n[0];if(ij(t))return{args:t,keys:null};if(function aj(n){return n&&"object"==typeof n&&rj(n)===sj}(t)){const e=oj(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}const{isArray:lj}=Array;function Fg(n){return U(t=>function cj(n,t){return lj(t)?n(...t):n(t)}(n,t))}function EM(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function MM(...n){const t=iy(n),{args:e,keys:i}=DM(n),r=new J(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let d=0;d{f||(f=!0,c--),a[d]=w},()=>l--,void 0,()=>{(!l||!f)&&(c||s.next(i?EM(i,a):a),s.complete())}))}});return t?r.pipe(Fg(t)):r}function ks(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function kM(n){return null!=n&&"number"==typeof n.length}const Ln=new Ce("NgValidators"),Ts=new Ce("NgAsyncValidators"),pj=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Ng{static min(t){return function TM(n){return t=>{if(ks(t.value)||ks(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(ks(t.value)||ks(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return function IM(n){return ks(n.value)?{required:!0}:null}(t)}static requiredTrue(t){return function RM(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function PM(n){return ks(n.value)||pj.test(n.value)?null:{email:!0}}(t)}static minLength(t){return function OM(n){return t=>ks(t.value)||!kM(t.value)?null:t.value.lengthkM(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return function LM(n){if(!n)return Tu;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(ks(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(t)}static nullValidator(t){return null}static compose(t){return UM(t)}static composeAsync(t){return zM(t)}}function Tu(n){return null}function NM(n){return null!=n}function BM(n){const t=wl(n)?gn(n):n;return Xp(t),t}function VM(n){let t={};return n.forEach(e=>{t=null!=e?Object.assign(Object.assign({},t),e):t}),0===Object.keys(t).length?null:t}function HM(n,t){return t.map(e=>e(n))}function jM(n){return n.map(t=>function mj(n){return!n.validate}(t)?t:e=>t.validate(e))}function UM(n){if(!n)return null;const t=n.filter(NM);return 0==t.length?null:function(e){return VM(HM(e,t))}}function Bg(n){return null!=n?UM(jM(n)):null}function zM(n){if(!n)return null;const t=n.filter(NM);return 0==t.length?null:function(e){return MM(HM(e,t).map(BM)).pipe(U(VM))}}function Vg(n){return null!=n?zM(jM(n)):null}function $M(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function GM(n){return n._rawValidators}function WM(n){return n._rawAsyncValidators}function Hg(n){return n?Array.isArray(n)?n:[n]:[]}function Au(n,t){return Array.isArray(n)?n.includes(t):n===t}function qM(n,t){const e=Hg(t);return Hg(n).forEach(r=>{Au(e,r)||e.push(r)}),e}function YM(n,t){return Hg(t).filter(e=>!Au(n,e))}class KM{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Bg(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Vg(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Tr extends KM{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class oi extends KM{get formDirective(){return null}get path(){return null}}const Wl="VALID",Ru="INVALID",wa="PENDING",ql="DISABLED";function $g(n){return(Pu(n)?n.validators:n)||null}function XM(n){return Array.isArray(n)?Bg(n):n||null}function Gg(n,t){return(Pu(t)?t.asyncValidators:n)||null}function JM(n){return Array.isArray(n)?Vg(n):n||null}function Pu(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}class nx{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=XM(this._rawValidators),this._composedAsyncValidatorFn=JM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Wl}get invalid(){return this.status===Ru}get pending(){return this.status==wa}get disabled(){return this.status===ql}get enabled(){return this.status!==ql}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=XM(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=JM(t)}addValidators(t){this.setValidators(qM(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(qM(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(YM(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(YM(t,this._rawAsyncValidators))}hasValidator(t){return Au(this._rawValidators,t)}hasAsyncValidator(t){return Au(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=wa,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=ql,this.errors=null,this._forEachChild(i=>{i.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Wl,this._forEachChild(i=>{i.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Wl||this.status===wa)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ql:Wl}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=wa,this._hasOwnPendingAsyncValidator=!0;const e=BM(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new je,this.statusChanges=new je}_calculateStatus(){return this._allControlsDisabled()?ql:this.errors?Ru:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(wa)?wa:this._anyControlsHaveStatus(Ru)?Ru:Wl}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Pu(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}}class Wg extends nx{constructor(t,e,i){super($g(e),Gg(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){(function tx(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new Be(1002,"")})})(this,0,t),Object.keys(t).forEach(i=>{(function ex(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new Be(1e3,"");if(!i[e])throw new Be(1001,"")})(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}function Yl(n,t){var e,i;qg(n,t),t.valueAccessor.writeValue(n.value),n.disabled&&(null===(i=(e=t.valueAccessor).setDisabledState)||void 0===i||i.call(e,!0)),function xj(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&ix(n,t)})}(n,t),function kj(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function Sj(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&ix(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function Mj(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function Fu(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Nu(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Lu(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function qg(n,t){const e=GM(n);null!==t.validator?n.setValidators($M(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=WM(n);null!==t.asyncValidator?n.setAsyncValidators($M(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();Lu(t._rawValidators,r),Lu(t._rawAsyncValidators,r)}function Nu(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=GM(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(null!==t.asyncValidator){const r=WM(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}const i=()=>{};return Lu(t._rawValidators,i),Lu(t._rawAsyncValidators,i),e}function ix(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function rx(n,t){qg(n,t)}function ox(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}const Pj={provide:oi,useExisting:Ft(()=>Ql)},Kl=(()=>Promise.resolve(null))();let Ql=(()=>{class n extends oi{constructor(e,i){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new je,this.form=new Wg({},Bg(e),Vg(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Kl.then(()=>{const i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),Yl(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Kl.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Kl.then(()=>{const i=this._findContainer(e.path),r=new Wg({});rx(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Kl.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Kl.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,ox(this.form,this._directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return n.\u0275fac=function(e){return new(e||n)(x(Ln,10),x(Ts,10))},n.\u0275dir=Ee({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&Ge("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Xe([Pj]),Le]}),n})();function ax(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function lx(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const cx=class extends nx{constructor(t=null,e,i){super($g(e),Gg(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Pu(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=lx(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){ax(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){ax(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){lx(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};let mx=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();const Qg=new Ce("NgModelWithFormControlWarning"),zj={provide:oi,useExisting:Ft(()=>Zl)};let Zl=(()=>{class n extends oi{constructor(e,i){super(),this.validators=e,this.asyncValidators=i,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new je,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Nu(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return Yl(i,e),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Fu(e.control||null,e,!1),function Rj(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,ox(this.form,this.directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(Fu(i||null,e),(n=>n instanceof cx)(r)&&(Yl(r,e),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);rx(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function Tj(n,t){return Nu(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){qg(this.form,this),this._oldForm&&Nu(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(x(Ln,10),x(Ts,10))},n.\u0275dir=Ee({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&Ge("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Xe([zj]),Le,cn]}),n})(),Rx=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[mx]}),n})(),l3=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Rx]}),n})(),c3=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Qg,useValue:e.warnOnNgModelWithFormControl}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Rx]}),n})();function tt(...n){return gn(n,Wa(n))}function Ca(n,t){return dt(t)?Pn(n,t,1):Pn(n,1)}function yn(n,t){return Re((e,i)=>{let r=0;e.subscribe(ge(i,s=>n.call(t,s,r++)&&i.next(s)))})}class Px{}class Ox{}class Ui{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),s=r.toLowerCase(),o=e.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Ui?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Ui;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Ui?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const s=t.value;if(s){let o=this.headers.get(e);if(!o)return;o=o.filter(a=>-1===s.indexOf(a)),0===o.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class h3{encodeKey(t){return Fx(t)}encodeValue(t){return Fx(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const p3=/%(\d[a-f0-9])/gi,m3={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Fx(n){return encodeURIComponent(n).replace(p3,(t,e)=>{var i;return null!==(i=m3[e])&&void 0!==i?i:t})}function Bu(n){return`${n}`}class As{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new h3,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function f3(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,a]=-1==s?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,s)),t.decodeValue(r.slice(s+1))],l=e.get(o)||[];l.push(a),e.set(o,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map(Bu):[Bu(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(s=>{e.push({param:i,value:s,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new As({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(Bu(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(Bu(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class g3{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function Lx(n){return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer}function Nx(n){return"undefined"!=typeof Blob&&n instanceof Blob}function Bx(n){return"undefined"!=typeof FormData&&n instanceof FormData}class Xl{constructor(t,e,i,r){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function _3(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params)),this.headers||(this.headers=new Ui),this.context||(this.context=new g3),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":aw.set(k,t.setHeaders[k]),c)),t.setParams&&(d=Object.keys(t.setParams).reduce((w,k)=>w.set(k,t.setParams[k]),d)),new Xl(i,r,o,{params:d,headers:c,context:f,reportProgress:l,responseType:s,withCredentials:a})}}var Mn=(()=>((Mn=Mn||{})[Mn.Sent=0]="Sent",Mn[Mn.UploadProgress=1]="UploadProgress",Mn[Mn.ResponseHeader=2]="ResponseHeader",Mn[Mn.DownloadProgress=3]="DownloadProgress",Mn[Mn.Response=4]="Response",Mn[Mn.User=5]="User",Mn))();class i_{constructor(t,e=200,i="OK"){this.headers=t.headers||new Ui,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class r_ extends i_{constructor(t={}){super(t),this.type=Mn.ResponseHeader}clone(t={}){return new r_({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Jl extends i_{constructor(t={}){super(t),this.type=Mn.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Jl({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class s_ extends i_{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function o_(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let ec=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let s;if(e instanceof Xl)s=e;else{let l,c;l=r.headers instanceof Ui?r.headers:new Ui(r.headers),r.params&&(c=r.params instanceof As?r.params:new As({fromObject:r.params})),s=new Xl(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const o=tt(s).pipe(Ca(l=>this.handler.handle(l)));if(e instanceof Xl||"events"===r.observe)return o;const a=o.pipe(yn(l=>l instanceof Jl));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(U(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(U(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(U(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(U(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new As).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,o_(r,i))}post(e,i,r={}){return this.request("POST",e,o_(r,i))}put(e,i,r={}){return this.request("PUT",e,o_(r,i))}}return n.\u0275fac=function(e){return new(e||n)(te(Px))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();class Vx{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const a_=new Ce("HTTP_INTERCEPTORS");let y3=(()=>{class n{intercept(e,i){return i.handle(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();const b3=/^\)\]\}',?\n/;let Hx=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new J(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((k,j)=>r.setRequestHeader(k,j.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const k=e.detectContentTypeHeader();null!==k&&r.setRequestHeader("Content-Type",k)}if(e.responseType){const k=e.responseType.toLowerCase();r.responseType="json"!==k?k:"text"}const s=e.serializeBody();let o=null;const a=()=>{if(null!==o)return o;const k=r.statusText||"OK",j=new Ui(r.getAllResponseHeaders()),K=function w3(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return o=new r_({headers:j,status:r.status,statusText:k,url:K}),o},l=()=>{let{headers:k,status:j,statusText:K,url:ae}=a(),ce=null;204!==j&&(ce=void 0===r.response?r.responseText:r.response),0===j&&(j=ce?200:0);let Te=j>=200&&j<300;if("json"===e.responseType&&"string"==typeof ce){const he=ce;ce=ce.replace(b3,"");try{ce=""!==ce?JSON.parse(ce):null}catch(Pe){ce=he,Te&&(Te=!1,ce={error:Pe,text:ce})}}Te?(i.next(new Jl({body:ce,headers:k,status:j,statusText:K,url:ae||void 0})),i.complete()):i.error(new s_({error:ce,headers:k,status:j,statusText:K,url:ae||void 0}))},c=k=>{const{url:j}=a(),K=new s_({error:k,status:r.status||0,statusText:r.statusText||"Unknown Error",url:j||void 0});i.error(K)};let d=!1;const f=k=>{d||(i.next(a()),d=!0);let j={type:Mn.DownloadProgress,loaded:k.loaded};k.lengthComputable&&(j.total=k.total),"text"===e.responseType&&!!r.responseText&&(j.partialText=r.responseText),i.next(j)},w=k=>{let j={type:Mn.UploadProgress,loaded:k.loaded};k.lengthComputable&&(j.total=k.total),i.next(j)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",f),null!==s&&r.upload&&r.upload.addEventListener("progress",w)),r.send(s),i.next({type:Mn.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",f),null!==s&&r.upload&&r.upload.removeEventListener("progress",w)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(te(pE))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();const l_=new Ce("XSRF_COOKIE_NAME"),c_=new Ce("XSRF_HEADER_NAME");class jx{}let u_,C3=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=nE(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(te(lt),te(jd),te(l_))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),d_=(()=>{class n{constructor(e,i){this.tokenService=e,this.headerName=i}intercept(e,i){const r=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||r.startsWith("http://")||r.startsWith("https://"))return i.handle(e);const s=this.tokenService.getToken();return null!==s&&!e.headers.has(this.headerName)&&(e=e.clone({headers:e.headers.set(this.headerName,s)})),i.handle(e)}}return n.\u0275fac=function(e){return new(e||n)(te(jx),te(c_))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),D3=(()=>{class n{constructor(e,i){this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=this.injector.get(a_,[]);this.chain=i.reduceRight((r,s)=>new Vx(r,s),this.backend)}return this.chain.handle(e)}}return n.\u0275fac=function(e){return new(e||n)(te(Ox),te(Jt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),E3=(()=>{class n{static disable(){return{ngModule:n,providers:[{provide:d_,useClass:y3}]}}static withOptions(e={}){return{ngModule:n,providers:[e.cookieName?{provide:l_,useValue:e.cookieName}:[],e.headerName?{provide:c_,useValue:e.headerName}:[]]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[d_,{provide:a_,useExisting:d_,multi:!0},{provide:jx,useClass:C3},{provide:l_,useValue:"XSRF-TOKEN"},{provide:c_,useValue:"X-XSRF-TOKEN"}]}),n})(),M3=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[ec,{provide:Px,useClass:D3},Hx,{provide:Ox,useExisting:Hx}],imports:[E3.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]}),n})();try{u_="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(n){u_=!1}let tc,mo,h_,bn=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function _V(n){return n===hE}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!u_)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(te(jd))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Ar(n){return function x3(){if(null==tc&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>tc=!0}))}finally{tc=tc||!1}return tc}()?n:!!n.capture}function S3(){if(null==mo){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return mo=!1,mo;if("scrollBehavior"in document.documentElement.style)mo=!0;else{const n=Element.prototype.scrollTo;mo=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return mo}function Hu(n){if(function k3(){if(null==h_){const n="undefined"!=typeof document?document.head:null;h_=!(!n||!n.createShadowRoot&&!n.attachShadow)}return h_}()){const t=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function f_(){let n="undefined"!=typeof document&&document?document.activeElement:null;for(;n&&n.shadowRoot;){const t=n.shadowRoot.activeElement;if(t===n)break;n=t}return n}function dr(n){return n.composedPath?n.composedPath()[0]:n.target}function p_(){return"undefined"!=typeof __karma__&&!!__karma__||"undefined"!=typeof jasmine&&!!jasmine||"undefined"!=typeof jest&&!!jest||"undefined"!=typeof Mocha&&!!Mocha}function it(n){return null!=n&&"false"!=`${n}`}function ki(n,t=0){return function T3(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}(n)?Number(n):t}function ju(n){return Array.isArray(n)?n:[n]}function xn(n){return null==n?"":"string"==typeof n?n:`${n}px`}function Rn(n){return n instanceof Je?n.nativeElement:n}class fi extends ue{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){const{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}function pi(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}function wn(n,t,e){const i=dt(n)||t||e?{next:n,error:t,complete:e}:n;return i?Re((r,s)=>{var o;null===(o=i.subscribe)||void 0===o||o.call(i);let a=!0;r.subscribe(ge(s,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),s.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),s.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),s.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):N}class j3 extends X{constructor(t,e){super()}schedule(t,e=0){return this}}const Uu={setInterval(n,t,...e){const{delegate:i}=Uu;return null!=i&&i.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){const{delegate:t}=Uu;return((null==t?void 0:t.clearInterval)||clearInterval)(n)},delegate:void 0};class b_ extends j3{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,i=0){return Uu.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;Uu.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(s){i=!0,r=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,V(i,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const w_={now:()=>(w_.delegate||Date).now(),delegate:void 0};class ic{constructor(t,e=ic.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}ic.now=w_.now;class C_ extends ic{constructor(t,e=ic.now){super(t,e),this.actions=[],this._active=!1,this._scheduled=void 0}flush(t){const{actions:e}=this;if(this._active)return void e.push(t);let i;this._active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const zu=new C_(b_),U3=zu;function D_(n,t=zu){return Re((e,i)=>{let r=null,s=null,o=null;const a=()=>{if(r){r.unsubscribe(),r=null;const c=s;s=null,i.next(c)}};function l(){const c=o+n,d=t.now();if(d{s=c,o=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{s=r=null}))})}function E_(n){return yn((t,e)=>n<=e)}function M_(n,t=N){return n=null!=n?n:z3,Re((e,i)=>{let r,s=!0;e.subscribe(ge(i,o=>{const a=t(o);(s||!n(r,a))&&(s=!1,r=a,i.next(o))}))})}function z3(n,t){return n===t}function Ot(n){return Re((t,e)=>{li(n).subscribe(ge(e,()=>e.complete(),y)),!e.closed&&t.subscribe(e)})}let Wx=(()=>{class n{create(e){return"undefined"==typeof MutationObserver?null:new MutationObserver(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),$3=(()=>{class n{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){const i=Rn(e);return new J(r=>{const o=this._observeElement(i).subscribe(r);return()=>{o.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{const i=new ue,r=this._mutationObserverFactory.create(s=>i.next(s));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:i,count:1})}return this._observedElements.get(e).stream}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){const{observer:i,stream:r}=this._observedElements.get(e);i&&i.disconnect(),r.complete(),this._observedElements.delete(e)}}}return n.\u0275fac=function(e){return new(e||n)(te(Wx))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),x_=(()=>{class n{constructor(e,i,r){this._contentObserver=e,this._elementRef=i,this._ngZone=r,this.event=new je,this._disabled=!1,this._currentSubscription=null}get disabled(){return this._disabled}set disabled(e){this._disabled=it(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=ki(e),this._subscribe()}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?e.pipe(D_(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){var e;null===(e=this._currentSubscription)||void 0===e||e.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(x($3),x(Je),x(et))},n.\u0275dir=Ee({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),$u=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[Wx]}),n})();class Kx{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new ue,this._typeaheadSubscription=X.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new ue,this.change=new ue,t instanceof pa&&t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}})}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(wn(e=>this._pressedLetters.push(e)),D_(t),yn(()=>this._pressedLetters.length>0),U(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;default:return void((r||pi(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t),r=e[i];this._activeItem=null==r?null:r,this._activeItemIndex=i}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof pa?this._items.toArray():this._items}}class q3 extends Kx{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class Gu extends Kx{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}let Wu=(()=>{class n{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function K3(n){return!!(n.offsetWidth||n.offsetHeight||"function"==typeof n.getClientRects&&n.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;const i=function Y3(n){try{return n.frameElement}catch(t){return null}}(function iU(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}(e));if(i&&(-1===Zx(i)||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),s=Zx(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function tU(n){let t=n.nodeName.toLowerCase(),e="input"===t&&n.type;return"text"===e||"password"===e||"select"===t||"textarea"===t}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}isFocusable(e,i){return function nU(n){return!function Z3(n){return function J3(n){return"input"==n.nodeName.toLowerCase()}(n)&&"hidden"==n.type}(n)&&(function Q3(n){let t=n.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(n)||function X3(n){return function eU(n){return"a"==n.nodeName.toLowerCase()}(n)&&n.hasAttribute("href")}(n)||n.hasAttribute("contenteditable")||Qx(n))}(e)&&!this.isDisabled(e)&&((null==i?void 0:i.ignoreVisibility)||this.isVisible(e))}}return n.\u0275fac=function(e){return new(e||n)(te(bn))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Qx(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let t=n.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function Zx(n){if(!Qx(n))return null;const t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class rU{constructor(t,e,i,r,s=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){const e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){const e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){const i=this._getFirstTabbableElement(e);return null==i||i.focus(t),!!i}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){const e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){const e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;const e=t.children;for(let i=0;i=0;i--){const r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(sn(1)).subscribe(t)}}let S_=(()=>{class n{constructor(e,i,r){this._checker=e,this._ngZone=i,this._document=r}create(e,i=!1){return new rU(e,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(e){return new(e||n)(te(Wu),te(et),te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function k_(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function T_(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}const sU=new Ce("cdk-input-modality-detector-options"),oU={ignoreKeys:[18,17,224,91,16]},Ma=Ar({passive:!0,capture:!0});let aU=(()=>{class n{constructor(e,i,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new fi(null),this._lastTouchMs=0,this._onKeydown=o=>{var a,l;null!==(l=null===(a=this._options)||void 0===a?void 0:a.ignoreKeys)&&void 0!==l&&l.some(c=>c===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=dr(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(k_(o)?"keyboard":"mouse"),this._mostRecentTarget=dr(o))},this._onTouchstart=o=>{T_(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=dr(o))},this._options=Object.assign(Object.assign({},oU),s),this.modalityDetected=this._modality.pipe(E_(1)),this.modalityChanged=this.modalityDetected.pipe(M_()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Ma),r.addEventListener("mousedown",this._onMousedown,Ma),r.addEventListener("touchstart",this._onTouchstart,Ma)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Ma),document.removeEventListener("mousedown",this._onMousedown,Ma),document.removeEventListener("touchstart",this._onTouchstart,Ma))}}return n.\u0275fac=function(e){return new(e||n)(te(bn),te(et),te(lt),te(sU,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const lU=new Ce("liveAnnouncerElement",{providedIn:"root",factory:function cU(){return null}}),dU=new Ce("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let A_=(()=>{class n{constructor(e,i,r,s){this._ngZone=i,this._defaultOptions=s,this._document=r,this._liveElement=e||this._createLiveElement()}announce(e,...i){const r=this._defaultOptions;let s,o;return 1===i.length&&"number"==typeof i[0]?o=i[0]:[s,o]=i,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==o&&r&&(o=r.duration),this._liveElement.setAttribute("aria-live",s),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,"number"==typeof o&&(this._previousTimeout=setTimeout(()=>this.clear(),o)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){var e,i;clearTimeout(this._previousTimeout),null===(e=this._liveElement)||void 0===e||e.remove(),this._liveElement=null,null===(i=this._currentResolve)||void 0===i||i.call(this),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const e="cdk-live-announcer-element",i=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let s=0;s{class n{constructor(e,i,r,s,o){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new ue,this._rootNodeFocusAndBlurListener=a=>{const l=dr(a),c="focus"===a.type?this._onFocus:this._onBlur;for(let d=l;d;d=d.parentElement)c.call(this,a,d)},this._document=s,this._detectionMode=(null==o?void 0:o.detectionMode)||0}monitor(e,i=!1){const r=Rn(e);if(!this._platform.isBrowser||1!==r.nodeType)return tt(null);const s=Hu(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return i&&(o.checkChildren=!0),o.subject;const a={checkChildren:i,subject:new ue,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const i=Rn(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){const s=Rn(e);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!(null==e||!e.contains(this._inputModalityDetector._mostRecentTarget))}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused","touch"===i),e.classList.toggle("cdk-keyboard-focused","keyboard"===i),e.classList.toggle("cdk-mouse-focused","mouse"===i),e.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,i){const r=this._elementInfo.get(i),s=dr(e);!r||!r.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),r)}_onBlur(e,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;const i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,qu),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,qu)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ot(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(e){const i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,qu),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,qu),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){const i=[];return this._elementInfo.forEach((r,s)=>{(s===e||r.checkChildren&&s.contains(e))&&i.push([s,r])}),i}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(bn),te(aU),te(lt,8),te(uU,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Jx="cdk-high-contrast-black-on-white",eS="cdk-high-contrast-white-on-black",I_="cdk-high-contrast-active";let tS=(()=>{class n{constructor(e,i){this._platform=e,this._document=i}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),s){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const e=this._document.body.classList;e.remove(I_,Jx,eS),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?e.add(I_,Jx):2===i&&e.add(I_,eS)}}}return n.\u0275fac=function(e){return new(e||n)(te(bn),te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Yu=(()=>{class n{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(e){return new(e||n)(te(tS))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[$u]}),n})();function R_(n=0,t,e=U3){let i=-1;return null!=t&&(ny(t)?e=t:i=t),new J(r=>{let s=function hU(n){return n instanceof Date&&!isNaN(n)}(n)?+n-e.now():n;s<0&&(s=0);let o=0;return e.schedule(function(){r.closed||(r.next(o++),0<=i?this.schedule(void 0,i):r.complete())},s)})}const rc={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:i}=rc;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);const r=t(s=>{e=void 0,n(s)});return new X(()=>null==e?void 0:e(r))},requestAnimationFrame(...n){const{delegate:t}=rc;return((null==t?void 0:t.requestAnimationFrame)||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){const{delegate:t}=rc;return((null==t?void 0:t.cancelAnimationFrame)||cancelAnimationFrame)(...n)},delegate:void 0},nS=new class mU extends C_{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;t=t||i.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}}(class pU extends b_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=rc.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(t,e,i);t.actions.some(r=>r.id===e)||(rc.cancelAnimationFrame(e),t._scheduled=void 0)}}),gU=["addListener","removeListener"],_U=["addEventListener","removeEventListener"],vU=["on","off"];function _o(n,t,e,i){if(dt(e)&&(i=e,e=void 0),i)return _o(n,t,e).pipe(Fg(i));const[r,s]=function wU(n){return dt(n.addEventListener)&&dt(n.removeEventListener)}(n)?_U.map(o=>a=>n[o](t,a,e)):function yU(n){return dt(n.addListener)&&dt(n.removeListener)}(n)?gU.map(iS(n,t)):function bU(n){return dt(n.on)&&dt(n.off)}(n)?vU.map(iS(n,t)):[];if(!r&&Ii(n))return Pn(o=>_o(o,t,e))(li(n));if(!r)throw new TypeError("Invalid event target");return new J(o=>{const a=(...l)=>o.next(1s(a)})}function iS(n,t){return e=>i=>n[e](t,i)}let P_,CU=1;const Ku={};function rS(n){return n in Ku&&(delete Ku[n],!0)}const DU={setImmediate(n){const t=CU++;return Ku[t]=!0,P_||(P_=Promise.resolve()),P_.then(()=>rS(t)&&n()),t},clearImmediate(n){rS(n)}},{setImmediate:EU,clearImmediate:MU}=DU,Qu={setImmediate(...n){const{delegate:t}=Qu;return((null==t?void 0:t.setImmediate)||EU)(...n)},clearImmediate(n){const{delegate:t}=Qu;return((null==t?void 0:t.clearImmediate)||MU)(n)},delegate:void 0};new class SU extends C_{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;t=t||i.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}}(class xU extends b_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Qu.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(t,e,i);t.actions.some(r=>r.id===e)||(Qu.clearImmediate(e),t._scheduled=void 0)}});function sS(n,t=zu){return function TU(n){return Re((t,e)=>{let i=!1,r=null,s=null,o=!1;const a=()=>{if(null==s||s.unsubscribe(),s=null,i){i=!1;const c=r;r=null,e.next(c)}o&&e.complete()},l=()=>{s=null,o&&e.complete()};t.subscribe(ge(e,c=>{i=!0,r=c,s||li(n(c)).subscribe(s=ge(e,a,l))},()=>{o=!0,(!i||!s||s.closed)&&e.complete()}))})}(()=>R_(n,t))}const AU=new Ce("cdk-dir-doc",{providedIn:"root",factory:function IU(){return sd(lt)}}),RU=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let zi=(()=>{class n{constructor(e){if(this.value="ltr",this.change=new je,e){const r=e.documentElement?e.documentElement.dir:null;this.value=function PU(n){const t=(null==n?void 0:n.toLowerCase())||"";return"auto"===t&&"undefined"!=typeof navigator&&(null==navigator?void 0:navigator.language)?RU.test(navigator.language)?"rtl":"ltr":"rtl"===t?"rtl":"ltr"}((e.body?e.body.dir:null)||r||"ltr")}}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(te(AU,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),sc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),FU=(()=>{class n{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new ue,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){const i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new J(i=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(sS(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):tt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){const r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(yn(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(e){const i=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,e)&&i.push(s)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=Rn(i),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>_o(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(bn),te(lt,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ss=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new ue,this._changeListener=s=>{this._change.next(s)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,i=this._getWindow(),r=e.documentElement,s=r.getBoundingClientRect();return{top:-s.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-s.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(sS(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(te(bn),te(et),te(lt,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),xa=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),O_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[sc,xa,sc,xa]}),n})();function F_(n,t,e){for(let i in t)if(t.hasOwnProperty(i)){const r=t[i];r?n.setProperty(i,r,null!=e&&e.has(i)?"important":""):n.removeProperty(i)}return n}function Sa(n,t){const e=t?"":"none";F_(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function oS(n,t,e){F_(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Zu(n,t){return t&&"none"!=t?n+" "+t:n}function aS(n){const t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function L_(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function N_(n){const t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function B_(n,t,e){const{top:i,bottom:r,left:s,right:o}=n;return e>=i&&e<=r&&t>=s&&t<=o}function oc(n,t,e){n.top+=t,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function lS(n,t,e,i){const{top:r,right:s,bottom:o,left:a,width:l,height:c}=n,d=l*t,f=c*t;return i>r-f&&ia-d&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:N_(e)})})}handleScroll(t){const e=dr(t),i=this.positions.get(e);if(!i)return null;const r=i.scrollPosition;let s,o;if(e===this._document){const c=this.getViewportScrollPosition();s=c.top,o=c.left}else s=e.scrollTop,o=e.scrollLeft;const a=r.top-s,l=r.left-o;return this.positions.forEach((c,d)=>{c.clientRect&&e!==d&&e.contains(d)&&oc(c.clientRect,a,l)}),r.top=s,r.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function dS(n){const t=n.cloneNode(!0),e=t.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();t.removeAttribute("id");for(let r=0;r{if(this.beforeStarted.next(),this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(l.x-this._pickupPositionOnPage.x)+Math.abs(l.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const k=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),j=this._dropContainer;if(!k)return void this._endDragSequence(a);(!j||!j.isDragging()&&!j.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();const c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{const d=this._activeTransform;d.x=c.x-this._pickupPositionOnPage.x+this._passiveTransform.x,d.y=c.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(d.x,d.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new cS(i),o.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(t){const e=it(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(i=>Sa(i,e)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>Rn(i)),this._handles.forEach(i=>Sa(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=Rn(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,Xu),e.addEventListener("touchstart",this._pointerDown,pS),e.addEventListener("dragstart",this._nativeDragStart,Xu)}),this._initialTransform=void 0,this._rootElement=e),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?Rn(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){var t,e;this._removeRootElementListeners(this._rootElement),this.isDragging()&&(null===(t=this._rootElement)||void 0===t||t.remove()),null===(e=this._anchor)||void 0===e||e.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),Sa(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),Sa(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){var t,e;null===(t=this._preview)||void 0===t||t.remove(),null===(e=this._previewRef)||void 0===e||e.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){var t,e;null===(t=this._placeholder)||void 0===t||t.remove(),null===(e=this._placeholderRef)||void 0===e||e.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){ac(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const i=this._rootElement,r=i.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();r.insertBefore(o,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),oS(i,!1,V_),this._document.body.appendChild(r.replaceChild(s,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),r=ac(e),s=!r&&0!==e.button,o=this._rootElement,a=dr(e),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=r?T_(e):k_(e);if(a&&a.draggable&&"mousedown"===e.type&&e.preventDefault(),i||s||l||c)return;if(this._handles.length){const w=o.style;this._rootElementTapHighlight=w.webkitTapHighlightColor||"",w.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(w=>this._updateOnScroll(w)),this._boundaryElement&&(this._boundaryRect=N_(this._boundaryElement));const d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);const f=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:f.x,y:f.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){oS(this._rootElement,!0,V_),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),s=this._getDragDistance(r),o=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:s,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:s,dropPoint:r,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,o,s,r),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:r}){let s=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,t,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let r;if(i&&t){const s=t.matchSize?this._rootElement.getBoundingClientRect():null,o=t.viewContainer.createEmbeddedView(i,t.context);o.detectChanges(),r=gS(o,this._document),this._previewRef=o,t.matchSize?_S(r,s):r.style.transform=Ju(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const s=this._rootElement;r=dS(s),_S(r,s.getBoundingClientRect()),this._initialTransform&&(r.style.transform=this._initialTransform)}return F_(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},V_),Sa(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>r.classList.add(s)):r.classList.add(e)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);const e=function NU(n){const t=getComputedStyle(n),e=L_(t,"transition-property"),i=e.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=e.indexOf(i),s=L_(t,"transition-duration"),o=L_(t,"transition-delay");return aS(s[r])+aS(o[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=o=>{var a;(!o||dr(o)===this._preview&&"transform"===o.propertyName)&&(null===(a=this._preview)||void 0===a||a.removeEventListener("transitionend",r),i(),clearTimeout(s))},s=setTimeout(r,1.5*e);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=gS(this._placeholderRef,this._document)):i=dS(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e){const i=this._rootElement.getBoundingClientRect(),r=t===this._rootElement?null:t,s=r?r.getBoundingClientRect():i,o=ac(e)?e.targetTouches[0]:e,a=this._getViewportScrollPosition();return{x:s.left-i.left+(o.pageX-s.left-a.left),y:s.top-i.top+(o.pageY-s.top-a.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=ac(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=i.pageX-e.left,s=i.pageY-e.top;if(this._ownerSVGElement){const o=this._ownerSVGElement.getScreenCTM();if(o){const a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=s,a.matrixTransform(o.inverse())}}return{x:r,y:s}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(t,this):t;if("x"===this.lockAxis||"x"===e?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:s,y:o}=this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+o,f=a.bottom-(c-o);i=mS(i,a.left+s,a.right-(l-s)),r=mS(r,d,f)}return{x:i,y:r}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,r=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-s.x),a=Math.abs(i-s.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=e>s.x?1:-1,s.x=e),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>s.y?1:-1,s.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,Sa(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,Xu),t.removeEventListener("touchstart",this._pointerDown,pS),t.removeEventListener("dragstart",this._nativeDragStart,Xu)}_applyRootElementTransform(t,e){const i=Ju(t,e),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=Zu(i,this._initialTransform)}_applyPreviewTransform(t,e){var i;const r=null!==(i=this._previewTemplate)&&void 0!==i&&i.template?void 0:this._initialTransform,s=Ju(t,e);this._preview.style.transform=Zu(s,r)}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._boundaryElement.getBoundingClientRect(),r=this._rootElement.getBoundingClientRect();if(0===i.width&&0===i.height||0===r.width&&0===r.height)return;const s=i.left-r.left,o=r.right-i.right,a=i.top-r.top,l=r.bottom-i.bottom;i.width>r.width?(s>0&&(t+=s),o>0&&(t-=o)):t=0,i.height>r.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:ac(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=dr(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&oc(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){var t;return(null===(t=this._parentPositions.positions.get(this._document))||void 0===t?void 0:t.scrollPosition)||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=Hu(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){const i=this._previewContainer||"global";if("parent"===i)return t;if("global"===i){const r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Rn(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()),this._previewRect}_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}}function Ju(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`}function mS(n,t,e){return Math.max(t,Math.min(e,n))}function ac(n){return"t"===n.type[0]}function gS(n,t){const e=n.rootNodes;if(1===e.length&&e[0].nodeType===t.ELEMENT_NODE)return e[0];const i=t.createElement("div");return e.forEach(r=>i.appendChild(r)),i}function _S(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=Ju(t.left,t.top)}function lc(n,t){return Math.max(0,Math.min(t,n))}class UU{constructor(t,e,i,r,s){this._dragDropRegistry=e,this._ngZone=r,this._viewportRuler=s,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new ue,this.entered=new ue,this.exited=new ue,this.dropped=new ue,this.sorted=new ue,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=X.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new ue,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function fU(n=0,t=zu){return n<0&&(n=0),R_(n,n,t)}(0,nS).pipe(Ot(this._stopScrollTimers)).subscribe(()=>{const o=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?o.scrollBy(0,-a):2===this._verticalScrollDirection&&o.scrollBy(0,a),1===this._horizontalScrollDirection?o.scrollBy(-a,0):2===this._horizontalScrollDirection&&o.scrollBy(a,0)})},this.element=Rn(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new cS(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,i,r){let s;this._draggingStarted(),null==r?(s=this.sortingDisabled?this._draggables.indexOf(t):-1,-1===s&&(s=this._getItemIndexFromPointerPosition(t,e,i))):s=r;const o=this._activeDraggables,a=o.indexOf(t),l=t.getPlaceholderElement();let c=o[s];if(c===t&&(c=o[s+1]),!c&&(null==s||-1===s||s-1&&o.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const d=c.getRootElement();d.parentElement.insertBefore(l,d),o.splice(s,0,t)}else Rn(this.element).appendChild(l),o.push(t);l.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,r,s,o,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:s,distance:o,dropPoint:a,event:l})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(r=>r.isDragging()).every(r=>-1===t.indexOf(r))?this._reset():this._cacheItems()),this}withDirection(t){return this._direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._orientation=t,this}withScrollableParents(t){const e=Rn(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,r){if(this.sortingDisabled||!this._clientRect||!lS(this._clientRect,.05,e,i))return;const s=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,r);if(-1===o&&s.length>0)return;const a="horizontal"===this._orientation,l=s.findIndex(ae=>ae.drag===t),c=s[o],f=c.clientRect,w=l>o?1:-1,k=this._getItemOffsetPx(s[l].clientRect,f,w),j=this._getSiblingOffsetPx(l,s,w),K=s.slice();(function jU(n,t,e){const i=lc(t,n.length-1),r=lc(e,n.length-1);if(i===r)return;const s=n[i],o=r{if(K[ce]===ae)return;const Te=ae.drag===t,he=Te?k:j,Pe=Te?t.getPlaceholderElement():ae.drag.getRootElement();ae.offset+=he,a?(Pe.style.transform=Zu(`translate3d(${Math.round(ae.offset)}px, 0, 0)`,ae.initialTransform),oc(ae.clientRect,0,he)):(Pe.style.transform=Zu(`translate3d(0, ${Math.round(ae.offset)}px, 0)`,ae.initialTransform),oc(ae.clientRect,he,0))}),this._previousSwap.overlaps=B_(f,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,r=0,s=0;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||lS(o.clientRect,.05,t,e)&&([r,s]=function zU(n,t,e,i){const r=bS(t,i),s=wS(t,e);let o=0,a=0;if(r){const l=n.scrollTop;1===r?l>0&&(o=1):n.scrollHeight-l>n.clientHeight&&(o=2)}if(s){const l=n.scrollLeft;1===s?l>0&&(a=1):n.scrollWidth-l>n.clientWidth&&(a=2)}return[o,a]}(a,o.clientRect,t,e),(r||s)&&(i=a))}),!r&&!s){const{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};r=bS(l,e),s=wS(l,t),i=window}i&&(r!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=s,this._scrollNode=i,(r||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const t=Rn(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=Rn(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_cacheItemPositions(){const t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:N_(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_reset(){this._isDragging=!1;const t=Rn(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(e=>{var i;const r=e.getRootElement();if(r){const s=null===(i=this._itemPositions.find(o=>o.drag===e))||void 0===i?void 0:i.initialTransform;r.style.transform=s||""}}),this._siblings.forEach(e=>e._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(t,e,i){const r="horizontal"===this._orientation,s=e[t].clientRect,o=e[t+-1*i];let a=s[r?"width":"height"]*i;if(o){const l=r?"left":"top",c=r?"right":"bottom";-1===i?a-=o.clientRect[l]-s[c]:a+=s[l]-o.clientRect[c]}return a}_getItemOffsetPx(t,e,i){const r="horizontal"===this._orientation;let s=r?e.left-t.left:e.top-t.top;return-1===i&&(s+=r?e.width-t.width:e.height-t.height),s}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,r="horizontal"===this._orientation;if(i[0].drag!==this._activeDraggables[0]){const o=i[i.length-1].clientRect;return r?t>=o.right:e>=o.bottom}{const o=i[0].clientRect;return r?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,i,r){const s="horizontal"===this._orientation,o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return!1;if(r){const c=s?r.x:r.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return s?e>=Math.floor(l.left)&&e=Math.floor(l.top)&&ir._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!B_(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const r=this._getShadowRoot().elementFromPoint(e,i);if(!r)return!1;const s=Rn(this.element);return r===s||s.contains(r)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&(this._itemPositions.forEach(({clientRect:i})=>{oc(i,e.top,e.left)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=Hu(Rn(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._activeDraggables.filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function bS(n,t){const{top:e,bottom:i,height:r}=n,s=.05*r;return t>=e-s&&t<=e+s?1:t>=i-s&&t<=i+s?2:0}function wS(n,t){const{left:e,right:i,width:r}=n,s=.05*r;return t>=e-s&&t<=e+s?1:t>=i-s&&t<=i+s?2:0}const eh=Ar({passive:!1,capture:!0});let $U=(()=>{class n{constructor(e,i){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new ue,this.pointerUp=new ue,this.scroll=new ue,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,eh)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,eh)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const r=i.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:eh}),r||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:eh}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,o)=>{this._document.addEventListener(o,s.handler,s.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new J(r=>this._ngZone.runOutsideAngular(()=>{const o=a=>{this._activeDragInstances.length&&r.next(a)};return e.addEventListener("scroll",o,!0),()=>{e.removeEventListener("scroll",o,!0)}}))),Un(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(e){return new(e||n)(te(et),te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const GU={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let WU=(()=>{class n{constructor(e,i,r,s){this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=s}createDrag(e,i=GU){return new HU(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new UU(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(e){return new(e||n)(te(lt),te(et),te(ss),te($U))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),qU=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[WU],imports:[xa]}),n})();function th(...n){return function YU(){return To(1)}()(gn(n,Wa(n)))}function Yn(...n){const t=Wa(n);return Re((e,i)=>{(t?th(n,e,t):th(n,e)).subscribe(i)})}function KU(n,t){if(1&n&&xt(0,"mat-pseudo-checkbox",4),2&n){const e=Ct();Oe("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function QU(n,t){if(1&n&&(_e(0,"span",5),We(1),De()),2&n){const e=Ct();xe(1),Bn("(",e.group.label,")")}}const ZU=["*"],tz=new Ce("mat-sanity-checks",{providedIn:"root",factory:function ez(){return!0}});let ut=(()=>{class n{constructor(e,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!p_()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return n.\u0275fac=function(e){return new(e||n)(te(tS),te(tz,8),te(lt))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[sc,sc]}),n})();function cc(n){return class extends n{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=it(t)}}}function vo(n,t){return class extends n{constructor(...e){super(...e),this.defaultColor=t,this.color=t}get color(){return this._color}set color(e){const i=e||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}}}function Rs(n){return class extends n{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=it(t)}}}function yo(n,t=0){return class extends n{constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ki(e):this.defaultTabIndex}}}function ES(n){return class extends n{constructor(...t){super(...t),this.errorState=!1}updateErrorState(){const t=this.errorState,s=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);s!==t&&(this.errorState=s,this.stateChanges.next())}}}const nz=new Ce("MAT_DATE_LOCALE",{providedIn:"root",factory:function iz(){return sd(Er)}});class Ir{constructor(){this._localeChanges=new ue,this.localeChanges=this._localeChanges}getValidDateOrNull(t){return this.isDateInstance(t)&&this.isValid(t)?t:null}deserialize(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()}setLocale(t){this.locale=t,this._localeChanges.next()}compareDate(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)}sameDate(t,e){if(t&&e){let i=this.isValid(t),r=this.isValid(e);return i&&r?!this.compareDate(t,e):i==r}return t==e}clampDate(t,e,i){return e&&this.compareDate(t,e)<0?e:i&&this.compareDate(t,i)>0?i:t}}const H_=new Ce("mat-date-formats"),rz=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function j_(n,t){const e=Array(n);for(let i=0;i{class n extends Ir{constructor(e,i){super(),this.useUtcForDisplay=!1,super.setLocale(e)}getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getMonthNames(e){const i=new Intl.DateTimeFormat(this.locale,{month:e,timeZone:"utc"});return j_(12,r=>this._format(i,new Date(2017,r,1)))}getDateNames(){const e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return j_(31,i=>this._format(e,new Date(2017,0,i+1)))}getDayOfWeekNames(e){const i=new Intl.DateTimeFormat(this.locale,{weekday:e,timeZone:"utc"});return j_(7,r=>this._format(i,new Date(2017,0,r+1)))}getYearName(e){const i=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._format(i,e)}getFirstDayOfWeek(){return 0}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))}clone(e){return new Date(e.getTime())}createDate(e,i,r){let s=this._createDateWithOverflow(e,i,r);return s.getMonth(),s}today(){return new Date}parse(e){return"number"==typeof e?new Date(e):e?new Date(Date.parse(e)):null}format(e,i){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");const r=new Intl.DateTimeFormat(this.locale,Object.assign(Object.assign({},i),{timeZone:"utc"}));return this._format(r,e)}addCalendarYears(e,i){return this.addCalendarMonths(e,12*i)}addCalendarMonths(e,i){let r=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+i,this.getDate(e));return this.getMonth(r)!=((this.getMonth(e)+i)%12+12)%12&&(r=this._createDateWithOverflow(this.getYear(r),this.getMonth(r),0)),r}addCalendarDays(e,i){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+i)}toIso8601(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")}deserialize(e){if("string"==typeof e){if(!e)return null;if(rz.test(e)){let i=new Date(e);if(this.isValid(i))return i}}return super.deserialize(e)}isDateInstance(e){return e instanceof Date}isValid(e){return!isNaN(e.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(e,i,r){const s=new Date;return s.setFullYear(e,i,r),s.setHours(0,0,0,0),s}_2digit(e){return("00"+e).slice(-2)}_format(e,i){const r=new Date;return r.setUTCFullYear(i.getFullYear(),i.getMonth(),i.getDate()),r.setUTCHours(i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()),e.format(r)}}return n.\u0275fac=function(e){return new(e||n)(te(nz,8),te(bn))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();const oz={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let az=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[{provide:Ir,useClass:sz}]}),n})(),lz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[{provide:H_,useValue:oz}],imports:[az]}),n})(),nh=(()=>{class n{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),MS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]}),n})();function dc(n,t,e){n.nativeElement.classList.toggle(t,e)}let ih=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ut,ut]}),n})();class cz{constructor(t,e,i,r=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const SS={enterDuration:225,exitDuration:150},U_=Ar({passive:!0}),kS=["mousedown","touchstart"],TS=["mouseup","mouseleave","touchend","touchcancel"];class z_{constructor(t,e,i,r){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Rn(i))}fadeInRipple(t,e,i={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s=Object.assign(Object.assign({},SS),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=i.radius||function uz(n,t,e){const i=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+r*r)}(t,e,r),a=t-r.left,l=e-r.top,c=s.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-o+"px",d.style.top=l-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",null!=i.color&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);const f=window.getComputedStyle(d),k=f.transitionDuration,j="none"===f.transitionProperty||"0s"===k||"0s, 0s"===k,K=new cz(this,d,i,j);d.style.transform="scale3d(1, 1, 1)",K.state=0,i.persistent||(this._mostRecentTransientRipple=K);let ae=null;return!j&&(c||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const ce=()=>this._finishRippleTransition(K),Te=()=>this._destroyRipple(K);d.addEventListener("transitionend",ce),d.addEventListener("transitioncancel",Te),ae={onTransitionEnd:ce,onTransitionCancel:Te}}),this._activeRipples.set(K,ae),(j||!c)&&this._finishRippleTransition(K),K}fadeOutRipple(t){if(2===t.state||3===t.state)return;const e=t.element,i=Object.assign(Object.assign({},SS),t.config.animation);e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=2,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){const e=Rn(t);!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(kS))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(TS),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){0===t.state?this._startFadeOutTransition(t):2===t.state&&this._destroyRipple(t)}_startFadeOutTransition(t){const e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=1,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){var e;const i=null!==(e=this._activeRipples.get(t))&&void 0!==e?e:null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=3,null!==i&&(t.element.removeEventListener("transitionend",i.onTransitionEnd),t.element.removeEventListener("transitioncancel",i.onTransitionCancel)),t.element.remove()}_onMousedown(t){const e=k_(t),i=this._lastTouchStartEvent&&Date.now(){!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_registerEvents(t){this._ngZone.runOutsideAngular(()=>{t.forEach(e=>{this._triggerElement.addEventListener(e,this,U_)})})}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){this._triggerElement&&(kS.forEach(t=>{this._triggerElement.removeEventListener(t,this,U_)}),this._pointerUpEventsRegistered&&TS.forEach(t=>{this._triggerElement.removeEventListener(t,this,U_)}))}}const rh=new Ce("mat-ripple-global-options");let Ps=(()=>{class n{constructor(e,i,r,s,o){this._elementRef=e,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new z_(this,i,e,r)}get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,i,Object.assign(Object.assign({},this.rippleConfig),r)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),e))}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(et),x(bn),x(rh,8),x(fn,8))},n.\u0275dir=Ee({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,i){2&e&&At("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),ka=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ut,ut]}),n})(),AS=(()=>{class n{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1}}return n.\u0275fac=function(e){return new(e||n)(x(fn,8))},n.\u0275cmp=_t({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(e,i){2&e&&At("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(e,i){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}'],encapsulation:2,changeDetection:0}),n})(),$_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ut]}),n})();const IS=new Ce("MAT_OPTION_PARENT_COMPONENT"),RS=new Ce("MatOptgroup");let hz=0;class fz{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let pz=(()=>{class n{constructor(e,i,r,s){this._element=e,this._changeDetectorRef=i,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+hz++,this.onSelectionChange=new je,this._stateChanges=new ue}get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=it(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(e,i){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!pi(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getAriaSelected(){return this.selected||!this.multiple&&null}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue=e,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new fz(this,e))}}return n.\u0275fac=function(e){bs()},n.\u0275dir=Ee({type:n,inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),PS=(()=>{class n extends pz{constructor(e,i,r,s){super(e,i,r,s)}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(en),x(IS,8),x(RS,8))},n.\u0275cmp=_t({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(e,i){1&e&&Ge("click",function(){return i._selectViaInteraction()})("keydown",function(s){return i._handleKeydown(s)}),2&e&&(Zr("id",i.id),bt("tabindex",i._getTabIndex())("aria-selected",i._getAriaSelected())("aria-disabled",i.disabled.toString()),At("mat-selected",i.selected)("mat-option-multiple",i.multiple)("mat-active",i.active)("mat-option-disabled",i.disabled))},exportAs:["matOption"],features:[Le],ngContentSelectors:ZU,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(e,i){1&e&&(Fn(),at(0,KU,1,2,"mat-pseudo-checkbox",0),_e(1,"span",1),Tt(2),De(),at(3,QU,2,1,"span",2),xt(4,"div",3)),2&e&&(Oe("ngIf",i.multiple),xe(3),Oe("ngIf",i.group&&i.group._inert),xe(1),Oe("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[Ps,lr,AS],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],encapsulation:2,changeDetection:0}),n})();function OS(n,t,e){if(e.length){let i=t.toArray(),r=e.toArray(),s=0;for(let o=0;o{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ka,hi,ut,$_]}),n})();const gz=["mat-button",""],_z=["*"],yz=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],bz=vo(cc(Rs(class{constructor(n){this._elementRef=n}})));let Ta=(()=>{class n extends bz{constructor(e,i,r){super(e),this._focusMonitor=i,this._animationMode=r,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const s of yz)this._hasHostAttributes(s)&&this._getHostElement().classList.add(s);e.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...e){return e.some(i=>this._getHostElement().hasAttribute(i))}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(ur),x(fn,8))},n.\u0275cmp=_t({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(e,i){if(1&e&&Gt(Ps,5),2&e){let r;ze(r=$e())&&(i.ripple=r.first)}},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(e,i){2&e&&(bt("disabled",i.disabled||null),At("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-button-disabled",i.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Le],attrs:gz,ngContentSelectors:_z,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(e,i){1&e&&(Fn(),_e(0,"span",0),Tt(1),De(),xt(2,"span",1)(3,"span",2)),2&e&&(xe(2),At("mat-button-ripple-round",i.isRoundButton||i.isIconButton),Oe("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i.isIconButton)("matRippleTrigger",i._getHostElement()))},dependencies:[Ps],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}"],encapsulation:2,changeDetection:0}),n})(),sh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ka,ut,ut]}),n})();const wz=["*",[["mat-card-footer"]]],Cz=["*","mat-card-footer"];let Dz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["mat-card-content"],["","mat-card-content",""],["","matCardContent",""]],hostAttrs:[1,"mat-card-content"]}),n})(),Ez=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-card-title"]}),n})(),Mz=(()=>{class n{constructor(e){this._animationMode=e}}return n.\u0275fac=function(e){return new(e||n)(x(fn,8))},n.\u0275cmp=_t({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-card","mat-focus-indicator"],hostVars:2,hostBindings:function(e,i){2&e&&At("_mat-animation-noopable","NoopAnimations"===i._animationMode)},exportAs:["matCard"],ngContentSelectors:Cz,decls:2,vars:0,template:function(e,i){1&e&&(Fn(wz),Tt(0),Tt(1,1))},styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:block;position:relative;padding:16px;border-radius:4px}.mat-card._mat-animation-noopable{transition:none !important;animation:none !important}.mat-card>.mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card>.mat-divider-horizontal{left:auto;right:0}.mat-card>.mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card>.mat-divider-horizontal.mat-divider-inset{margin-right:0}.cdk-high-contrast-active .mat-card{outline:solid 1px}.mat-card-actions,.mat-card-subtitle,.mat-card-content{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px;display:block;overflow:hidden}.mat-card-image img{width:100%}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button,.mat-card-actions .mat-stroked-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media(max-width: 599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card>:first-child,.mat-card-content>:first-child{margin-top:0}.mat-card>:last-child:not(.mat-card-footer),.mat-card-content>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions:not(.mat-card-actions-align-end) .mat-button:first-child,.mat-card-actions:not(.mat-card-actions-align-end) .mat-raised-button:first-child,.mat-card-actions:not(.mat-card-actions-align-end) .mat-stroked-button:first-child{margin-left:0;margin-right:0}.mat-card-actions-align-end .mat-button:last-child,.mat-card-actions-align-end .mat-raised-button:last-child,.mat-card-actions-align-end .mat-stroked-button:last-child{margin-left:0;margin-right:0}.mat-card-title:not(:first-child),.mat-card-subtitle:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}"],encapsulation:2,changeDetection:0}),n})(),xz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ut,ut]}),n})(),BS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),Vz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ka,ut,$u,BS,ut,BS]}),n})();class oh{constructor(t=!1,e,i=!0){this._multiple=t,this._emitChanges=i,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new ue,e&&e.length&&(t?e.forEach(r=>this._markSelected(r)):this._markSelected(e[0]),this._selectedToEmit.length=0)}get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}select(...t){this._verifyValueAssignment(t),t.forEach(e=>this._markSelected(e)),this._emitChangeEvent()}deselect(...t){this._verifyValueAssignment(t),t.forEach(e=>this._unmarkSelected(e)),this._emitChangeEvent()}toggle(t){this.isSelected(t)?this.deselect(t):this.select(t)}clear(){this._unmarkAll(),this._emitChangeEvent()}isSelected(t){return this._selection.has(t)}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}}let W_=(()=>{class n{constructor(){this._listeners=[]}notify(e,i){for(let r of this._listeners)r(e,i)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(i=>e!==i)}}ngOnDestroy(){this._listeners=[]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Hz=["connectionContainer"],jz=["inputContainer"],Uz=["label"];function zz(n,t){1&n&&(eo(0),_e(1,"div",14),xt(2,"div",15)(3,"div",16)(4,"div",17),De(),_e(5,"div",18),xt(6,"div",15)(7,"div",16)(8,"div",17),De(),to())}function $z(n,t){if(1&n){const e=wr();_e(0,"div",19),Ge("cdkObserveContent",function(){return Ji(e),er(Ct().updateOutlineGap())}),Tt(1,1),De()}2&n&&Oe("cdkObserveContentDisabled","outline"!=Ct().appearance)}function Gz(n,t){if(1&n&&(eo(0),Tt(1,2),_e(2,"span"),We(3),De(),to()),2&n){const e=Ct(2);xe(3),qn(e._control.placeholder)}}function Wz(n,t){1&n&&Tt(0,3,["*ngSwitchCase","true"])}function qz(n,t){1&n&&(_e(0,"span",23),We(1," *"),De())}function Yz(n,t){if(1&n){const e=wr();_e(0,"label",20,21),Ge("cdkObserveContent",function(){return Ji(e),er(Ct().updateOutlineGap())}),at(2,Gz,4,1,"ng-container",12),at(3,Wz,1,0,"ng-content",12),at(4,qz,2,0,"span",22),De()}if(2&n){const e=Ct();At("mat-empty",e._control.empty&&!e._shouldAlwaysFloat())("mat-form-field-empty",e._control.empty&&!e._shouldAlwaysFloat())("mat-accent","accent"==e.color)("mat-warn","warn"==e.color),Oe("cdkObserveContentDisabled","outline"!=e.appearance)("id",e._labelId)("ngSwitch",e._hasLabel()),bt("for",e._control.id)("aria-owns",e._control.id),xe(2),Oe("ngSwitchCase",!1),xe(1),Oe("ngSwitchCase",!0),xe(1),Oe("ngIf",!e.hideRequiredMarker&&e._control.required&&!e._control.disabled)}}function Kz(n,t){1&n&&(_e(0,"div",24),Tt(1,4),De())}function Qz(n,t){if(1&n&&(_e(0,"div",25),xt(1,"span",26),De()),2&n){const e=Ct();xe(1),At("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)}}function Zz(n,t){1&n&&(_e(0,"div"),Tt(1,5),De()),2&n&&Oe("@transitionMessages",Ct()._subscriptAnimationState)}function Xz(n,t){if(1&n&&(_e(0,"div",30),We(1),De()),2&n){const e=Ct(2);Oe("id",e._hintLabelId),xe(1),qn(e.hintLabel)}}function Jz(n,t){if(1&n&&(_e(0,"div",27),at(1,Xz,2,2,"div",28),Tt(2,6),xt(3,"div",29),Tt(4,7),De()),2&n){const e=Ct();Oe("@transitionMessages",e._subscriptAnimationState),xe(1),Oe("ngIf",e.hintLabel)}}const e8=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],t8=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],n8=new Ce("MatError"),i8={transitionMessages:Vn("transitionMessages",[zt("enter",Qe({opacity:1,transform:"translateY(0%)"})),Wt("void => enter",[Qe({opacity:0,transform:"translateY(-5px)"}),Zt("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let ah=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n}),n})();const r8=new Ce("MatHint");let q_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["mat-label"]]}),n})(),s8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["mat-placeholder"]]}),n})();const o8=new Ce("MatPrefix"),a8=new Ce("MatSuffix");let jS=0;const c8=vo(class{constructor(n){this._elementRef=n}},"primary"),d8=new Ce("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Y_=new Ce("MatFormField");let u8=(()=>{class n extends c8{constructor(e,i,r,s,o,a,l){super(e),this._changeDetectorRef=i,this._dir=r,this._defaults=s,this._platform=o,this._ngZone=a,this._outlineGapCalculationNeededImmediately=!1,this._outlineGapCalculationNeededOnStable=!1,this._destroyed=new ue,this._hideRequiredMarker=!1,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId="mat-hint-"+jS++,this._labelId="mat-form-field-label-"+jS++,this.floatLabel=this._getDefaultFloatLabelState(),this._animationsEnabled="NoopAnimations"!==l,this.appearance=(null==s?void 0:s.appearance)||"legacy",s&&(this._hideRequiredMarker=Boolean(s.hideRequiredMarker),s.color&&(this.color=this.defaultColor=s.color))}get appearance(){return this._appearance}set appearance(e){var i;const r=this._appearance;this._appearance=e||(null===(i=this._defaults)||void 0===i?void 0:i.appearance)||"legacy","outline"===this._appearance&&r!==e&&(this._outlineGapCalculationNeededOnStable=!0)}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=it(e)}_shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}_canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}get _control(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic}set _control(e){this._explicitFormFieldControl=e}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild();const e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add(`mat-form-field-type-${e.controlType}`),e.stateChanges.pipe(Yn(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(Ot(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Ot(this._destroyed)).subscribe(()=>{this._outlineGapCalculationNeededOnStable&&this.updateOutlineGap()})}),Un(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._outlineGapCalculationNeededOnStable=!0,this._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Yn(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Yn(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Ot(this._destroyed)).subscribe(()=>{"function"==typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this.updateOutlineGap())}):this.updateOutlineGap()})}ngAfterContentChecked(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_shouldForward(e){const i=this._control?this._control.ngControl:null;return i&&i[e]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}_shouldLabelFloat(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,_o(this._label.nativeElement,"transitionend").pipe(sn(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_getDefaultFloatLabelState(){return this._defaults&&this._defaults.floatLabel||"auto"}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&e.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const i=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;i?e.push(i.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(e)}}_validateControlChild(){}updateOutlineGap(){const e=this._label?this._label.nativeElement:null,i=this._connectionContainerRef.nativeElement,r=".mat-form-field-outline-start",s=".mat-form-field-outline-gap";if("outline"!==this.appearance||!this._platform.isBrowser)return;if(!e||!e.children.length||!e.textContent.trim()){const d=i.querySelectorAll(`${r}, ${s}`);for(let f=0;f0?.75*j+10:0}for(let d=0;d{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[hi,ut,$u,ut]}),n})();const h8=["*"],zS=new Ce("MatChipRemove"),$S=new Ce("MatChipAvatar"),GS=new Ce("MatChipTrailingIcon");class f8{constructor(t){this._elementRef=t}}const p8=yo(vo(Rs(f8),"primary"),-1);let Aa=(()=>{class n extends p8{constructor(e,i,r,s,o,a,l,c){super(e),this._ngZone=i,this._changeDetectorRef=o,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this.role="option",this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new ue,this._onBlur=new ue,this.selectionChange=new je,this.destroyed=new je,this.removed=new je,this._addHostClassName(),this._chipRippleTarget=a.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new z_(this,i,this._chipRippleTarget,r),this._chipRipple.setupTriggerEvents(e),this.rippleConfig=s||{},this._animationsDisabled="NoopAnimations"===l,this.tabIndex=null!=c&&parseInt(c)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(e){const i=it(e);i!==this._selected&&(this._selected=i,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(e){this._value=e}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=it(e)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(e){this._disabled=it(e)}get removable(){return this._removable}set removable(e){this._removable=it(e)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const e="mat-basic-chip",i=this._elementRef.nativeElement;i.hasAttribute(e)||i.tagName.toLowerCase()===e?i.classList.add(e):i.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(e=!1){return this._selected=!this.selected,this._dispatchSelectionChange(e),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(e){this.disabled&&e.preventDefault()}_handleKeydown(e){if(!this.disabled)switch(e.keyCode){case 46:case 8:this.remove(),e.preventDefault();break;case 32:this.selectable&&this.toggleSelected(!0),e.preventDefault()}}_blur(){this._ngZone.onStable.pipe(sn(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(e=!1){this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(et),x(bn),x(rh,8),x(en),x(lt),x(fn,8),ti("tabindex"))},n.\u0275dir=Ee({type:n,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,i,r){if(1&e&&(It(r,$S,5),It(r,GS,5),It(r,zS,5)),2&e){let s;ze(s=$e())&&(i.avatar=s.first),ze(s=$e())&&(i.trailingIcon=s.first),ze(s=$e())&&(i.removeIcon=s.first)}},hostAttrs:[1,"mat-chip","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&Ge("click",function(s){return i._handleClick(s)})("keydown",function(s){return i._handleKeydown(s)})("focus",function(){return i.focus()})("blur",function(){return i._blur()}),2&e&&(bt("tabindex",i.disabled?null:i.tabIndex)("role",i.role)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString())("aria-selected",i.ariaSelected),At("mat-chip-selected",i.selected)("mat-chip-with-avatar",i.avatar)("mat-chip-with-trailing-icon",i.trailingIcon||i.removeIcon)("mat-chip-disabled",i.disabled)("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",role:"role",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[Le]}),n})();const WS=new Ce("mat-chips-default-options"),b8=ES(class{constructor(n,t,e,i){this._defaultErrorStateMatcher=n,this._parentForm=t,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new ue}});let w8=0;class C8{constructor(t,e){this.source=t,this.value=e}}let ch=(()=>{class n extends b8{constructor(e,i,r,s,o,a,l){super(a,s,o,l),this._elementRef=e,this._changeDetectorRef=i,this._dir=r,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new ue,this._uid="mat-chip-list-"+w8++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(c,d)=>c===d,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new je,this.valueChange=new je,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){var e,i;return this.multiple?(null===(e=this._selectionModel)||void 0===e?void 0:e.selected)||[]:null===(i=this._selectionModel)||void 0===i?void 0:i.selected[0]}get role(){return this._explicitRole?this._explicitRole:this.empty?null:"listbox"}set role(e){this._explicitRole=e}get multiple(){return this._multiple}set multiple(e){this._multiple=it(e),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){var e,i,r,s;return null!==(s=null!==(e=this._required)&&void 0!==e?e:null===(r=null===(i=this.ngControl)||void 0===i?void 0:i.control)||void 0===r?void 0:r.hasValidator(Ng.required))&&void 0!==s&&s}set required(e){this._required=it(e),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=it(e),this._syncChipsState()}get selectable(){return this._selectable}set selectable(e){this._selectable=it(e),this.chips&&this.chips.forEach(i=>i.chipListSelectable=this._selectable)}set tabIndex(e){this._userTabIndex=e,this._tabIndex=e}get chipSelectionChanges(){return Un(...this.chips.map(e=>e.selectionChange))}get chipFocusChanges(){return Un(...this.chips.map(e=>e._onFocus))}get chipBlurChanges(){return Un(...this.chips.map(e=>e._onBlur))}get chipRemoveChanges(){return Un(...this.chips.map(e=>e.destroyed))}ngAfterContentInit(){this._keyManager=new Gu(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Ot(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.tabOut.pipe(Ot(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe(Yn(null),Ot(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new oh(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(e){this._chipInput=e,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",e.id)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}writeValue(e){this.chips&&this._setSelectionByValue(e,!1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}onContainerClick(e){this._originatesFromChip(e)||this.focus()}focus(e){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(e),this.stateChanges.next()))}_focusInput(e){this._chipInput&&this._chipInput.focus(e)}_keydown(e){const i=e.target;i&&i.classList.contains("mat-chip")&&(this._keyManager.onKeydown(e),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const e=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(e)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(e){return e>=0&&er.deselect()),Array.isArray(e))e.forEach(r=>this._selectValue(r,i)),this._sortValues();else{const r=this._selectValue(e,i);r&&i&&this._keyManager.setActiveItem(r)}}_selectValue(e,i=!0){const r=this.chips.find(s=>null!=s.value&&this._compareWith(s.value,e));return r&&(i?r.selectViaInteraction():r.select(),this._selectionModel.select(r)),r}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(e){this._selectionModel.clear(),this.chips.forEach(i=>{i!==e&&i.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(e=>{e.selected&&this._selectionModel.select(e)}),this.stateChanges.next())}_propagateChanges(e){let i=null;i=Array.isArray(this.selected)?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.change.emit(new C8(this,i)),this.valueChange.emit(i),this._onChange(i),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(e=>{e.source.selected?this._selectionModel.select(e.source):this._selectionModel.deselect(e.source),this.multiple||this.chips.forEach(i=>{!this._selectionModel.isSelected(i)&&i.selected&&i.deselect()}),e.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(e=>{let i=this.chips.toArray().indexOf(e.chip);this._isValidIndex(i)&&this._keyManager.updateActiveItem(i),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(e=>{const i=e.chip,r=this.chips.toArray().indexOf(e.chip);this._isValidIndex(r)&&i._hasFocus&&(this._lastDestroyedChipIndex=r)})}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-chip"))return!0;i=i.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(e=>e._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(e=>{e._chipListDisabled=this._disabled,e._chipListMultiple=this.multiple})}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(en),x(zi,8),x(Ql,8),x(Zl,8),x(nh),x(Tr,10))},n.\u0275cmp=_t({type:n,selectors:[["mat-chip-list"]],contentQueries:function(e,i,r){if(1&e&&It(r,Aa,5),2&e){let s;ze(s=$e())&&(i.chips=s)}},hostAttrs:[1,"mat-chip-list"],hostVars:14,hostBindings:function(e,i){1&e&&Ge("focus",function(){return i.focus()})("blur",function(){return i._blur()})("keydown",function(s){return i._keydown(s)}),2&e&&(Zr("id",i._uid),bt("tabindex",i.disabled?null:i._tabIndex)("aria-required",i.role?i.required:null)("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-multiselectable",i.multiple)("role",i.role)("aria-orientation",i.ariaOrientation),At("mat-chip-list-disabled",i.disabled)("mat-chip-list-invalid",i.errorState)("mat-chip-list-required",i.required))},inputs:{role:"role",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],errorStateMatcher:"errorStateMatcher",multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",ariaOrientation:["aria-orientation","ariaOrientation"],selectable:"selectable",tabIndex:"tabIndex"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[Xe([{provide:ah,useExisting:n}]),Le],ngContentSelectors:h8,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(e,i){1&e&&(Fn(),_e(0,"div",0),Tt(1),De())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}'],encapsulation:2,changeDetection:0}),n})(),D8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[nh,{provide:WS,useValue:{separatorKeyCodes:[13]}}],imports:[ut]}),n})();class K_{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class hc extends K_{constructor(t,e,i,r){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r}}class fc extends K_{constructor(t,e,i,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class E8 extends K_{constructor(t){super(),this.element=t instanceof Je?t.nativeElement:t}}class dh{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof hc?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof fc?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof E8?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class M8 extends dh{constructor(t,e,i,r,s){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=o=>{const a=o.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=s}attachComponentPortal(t){const i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let r;return t.viewContainerRef?(r=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(t.injector||this._defaultInjector||Jt.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=t,r}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=t,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let Ia=(()=>{class n extends dh{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new je,this.attachDomPortal=s=>{const o=s.element,a=this._document.createComment("dom-portal");s.setAttachedHost(this),o.parentNode.insertBefore(a,o),this._getRootNode().appendChild(o),this._attachedPortal=s,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(o,a)})},this._document=r}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedPortal=null,this._attachedRef=null}attachComponentPortal(e){e.setAttachedHost(this);const i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,s=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),o=i.createComponent(s,i.length,e.injector||i.injector);return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=e,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(e){e.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}}return n.\u0275fac=function(e){return new(e||n)(x(io),x(An),x(lt))},n.\u0275dir=Ee({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Le]}),n})(),Os=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();const qS=S3();class S8{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=xn(-this._previousScrollPosition.left),t.style.top=xn(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,i=t.style,r=this._document.body.style,s=i.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),qS&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),qS&&(i.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const e=this._document.body,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}}class k8{constructor(t,e,i,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class YS{enable(){}disable(){}attach(){}}function Q_(n,t){return t.some(e=>n.bottome.bottom||n.righte.right)}function KS(n,t){return t.some(e=>n.tope.bottom||n.lefte.right)}class T8{constructor(t,e,i,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();Q_(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let A8=(()=>{class n{constructor(e,i,r,s){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new YS,this.close=o=>new k8(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new S8(this._viewportRuler,this._document),this.reposition=o=>new T8(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return n.\u0275fac=function(e){return new(e||n)(te(FU),te(ss),te(et),te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class uh{constructor(t){if(this.scrollStrategy=new YS,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class I8{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}class pc{constructor(t,e,i,r,s,o,a,l,c,d=!1){this._portalOutlet=t,this._host=e,this._pane=i,this._config=r,this._ngZone=s,this._keyboardDispatcher=o,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._backdropElement=null,this._backdropClick=new ue,this._attachments=new ue,this._detachments=new ue,this._locationChanges=X.EMPTY,this._backdropClickHandler=f=>this._backdropClick.next(f),this._backdropTransitionendHandler=f=>{this._disposeBackdrop(f.target)},this._keydownEvents=new ue,this._outsidePointerEvents=new ue,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(sn(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){var t;const e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),null===(t=this._host)||void 0===t||t.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=xn(this._config.width),t.height=xn(this._config.height),t.minWidth=xn(this._config.minWidth),t.minHeight=xn(this._config.minHeight),t.maxWidth=xn(this._config.maxWidth),t.maxHeight=xn(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){const t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),this._animationsDisabled||"undefined"==typeof requestAnimationFrame?this._backdropElement.classList.add(t):this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})})}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const t=this._backdropElement;if(t){if(this._animationsDisabled)return void this._disposeBackdrop(t);t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",this._backdropTransitionendHandler)}),t.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(t)},500))}}_toggleClasses(t,e,i){const r=ju(e||[]).filter(s=>!!s);r.length&&(i?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(Ot(Un(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}_disposeBackdrop(t){t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",this._backdropTransitionendHandler),t.remove(),this._backdropElement===t&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}let hh=(()=>{class n{constructor(e,i){this._platform=i,this._document=e}ngOnDestroy(){var e;null===(e=this._containerElement)||void 0===e||e.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e="cdk-overlay-container";if(this._platform.isBrowser||p_()){const r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let s=0;s{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,s=[];let o;for(let a of this._preferredPositions){let l=this._getOriginPoint(t,r,a),c=this._getOverlayPoint(l,e,a),d=this._getOverlayFit(c,e,i,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,i)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=d,a=c)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&bo(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(QS),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,i){let r,s;if("center"==i.originX)r=t.left+t.width/2;else{const o=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r="start"==i.originX?o:a}return e.left<0&&(r-=e.left),s="center"==i.originY?t.top+t.height/2:"top"==i.originY?t.top:t.bottom,e.top<0&&(s-=e.top),{x:r,y:s}}_getOverlayPoint(t,e,i){let r,s;return r="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,s="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+r,y:t.y+s}}_getOverlayFit(t,e,i,r){const s=XS(e);let{x:o,y:a}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(o+=l),c&&(a+=c);let w=0-a,k=a+s.height-i.height,j=this._subtractOverflows(s.width,0-o,o+s.width-i.width),K=this._subtractOverflows(s.height,w,k),ae=j*K;return{visibleArea:ae,isCompletelyWithinViewport:s.width*s.height===ae,fitsInViewportVertically:K===s.height,fitsInViewportHorizontally:j==s.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const r=i.bottom-e.y,s=i.right-e.x,o=ZS(this._overlayRef.getConfig().minHeight),a=ZS(this._overlayRef.getConfig().minWidth),c=t.fitsInViewportHorizontally||null!=a&&a<=s;return(t.fitsInViewportVertically||null!=o&&o<=r)&&c}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const r=XS(e),s=this._viewportRect,o=Math.max(t.x+r.width-s.width,0),a=Math.max(t.y+r.height-s.height,0),l=Math.max(s.top-i.top-t.y,0),c=Math.max(s.left-i.left-t.x,0);let d=0,f=0;return d=r.width<=s.width?c||-o:t.xj&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-j/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)w=i.width-t.x+this._viewportMargin,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)f=t.x,d=i.right-t.x;else{const k=Math.min(i.right-t.x+i.left,t.x),j=this._lastBoundingBoxSize.width;d=2*k,f=t.x-k,d>j&&!this._isInitialRender&&!this._growAfterOpen&&(f=t.x-j/2)}return{top:o,left:f,bottom:a,right:w,width:d,height:s}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=xn(i.height),r.top=xn(i.top),r.bottom=xn(i.bottom),r.width=xn(i.width),r.left=xn(i.left),r.right=xn(i.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",s&&(r.maxHeight=xn(s)),o&&(r.maxWidth=xn(o))}this._lastBoundingBoxSize=i,bo(this._boundingBox.style,r)}_resetBoundingBoxStyles(){bo(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){bo(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){const d=this._viewportRuler.getViewportScrollPosition();bo(i,this._getExactOverlayY(e,t,d)),bo(i,this._getExactOverlayX(e,t,d))}else i.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),o.maxHeight&&(r?i.maxHeight=xn(o.maxHeight):s&&(i.maxHeight="")),o.maxWidth&&(r?i.maxWidth=xn(o.maxWidth):s&&(i.maxWidth="")),bo(this._pane.style,i)}_getExactOverlayY(t,e,i){let r={top:"",bottom:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=xn(s.y),r}_getExactOverlayX(t,e,i){let o,r={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),o=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===o?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=xn(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:KS(t,i),isOriginOutsideView:Q_(t,i),isOverlayClipped:KS(e,i),isOverlayOutsideView:Q_(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,r)=>i-Math.max(r,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&ju(t).forEach(e=>{""!==e&&-1===this._appliedPanelClasses.indexOf(e)&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof Je)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function bo(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function ZS(n){if("number"!=typeof n&&null!=n){const[t,e]=n.split(R8);return e&&"px"!==e?null:parseFloat(t)}return n||null}function XS(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}const JS="cdk-global-overlay-wrapper";class O8{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(JS),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:a}=i,l=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),c=!("100%"!==s&&"100vh"!==s||a&&"100%"!==a&&"100vh"!==a),d=this._xPosition,f=this._xOffset,w="rtl"===this._overlayRef.getConfig().direction;let k="",j="",K="";l?K="flex-start":"center"===d?(K="center",w?j=f:k=f):w?"left"===d||"end"===d?(K="flex-end",k=f):("right"===d||"start"===d)&&(K="flex-start",j=f):"left"===d||"start"===d?(K="flex-start",k=f):("right"===d||"end"===d)&&(K="flex-end",j=f),t.position=this._cssPosition,t.marginLeft=l?"0":k,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":j,e.justifyContent=K,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(JS),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let F8=(()=>{class n{constructor(e,i,r,s){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=s}global(){return new O8}flexibleConnectedTo(e){return new P8(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(e){return new(e||n)(te(ss),te(lt),te(bn),te(hh))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ek=(()=>{class n{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){const i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(e){return new(e||n)(te(lt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),L8=(()=>{class n extends ek{constructor(e,i){super(e),this._ngZone=i,this._keydownListener=r=>{const s=this._attachedOverlays;for(let o=s.length-1;o>-1;o--)if(s[o]._keydownEvents.observers.length>0){const a=s[o]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(e){return new(e||n)(te(lt),te(et,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),N8=(()=>{class n extends ek{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=dr(s)},this._clickListener=s=>{const o=dr(s),a="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;const l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){const d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(o)||d.overlayElement.contains(a))break;const f=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>f.next(s)):f.next(s)}}}add(e){if(super.add(e),!this._isAttached){const i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}}return n.\u0275fac=function(e){return new(e||n)(te(lt),te(bn),te(et,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),B8=0,$i=(()=>{class n{constructor(e,i,r,s,o,a,l,c,d,f,w,k){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=o,this._injector=a,this._ngZone=l,this._document=c,this._directionality=d,this._location=f,this._outsideClickDispatcher=w,this._animationsModuleType=k}create(e){const i=this._createHostElement(),r=this._createPaneElement(i),s=this._createPortalOutlet(r),o=new uh(e);return o.direction=o.direction||this._directionality.value,new pc(s,i,r,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(e){const i=this._document.createElement("div");return i.id="cdk-overlay-"+B8++,i.classList.add("cdk-overlay-pane"),e.appendChild(i),i}_createHostElement(){const e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(Ol)),new M8(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(e){return new(e||n)(te(A8),te(hh),te(io),te(F8),te(L8),te(Jt),te(et),te(lt),te(zi),te(Nl),te(N8),te(fn,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();const V8=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],tk=new Ce("cdk-connected-overlay-scroll-strategy");let nk=(()=>{class n{constructor(e){this.elementRef=e}}return n.\u0275fac=function(e){return new(e||n)(x(Je))},n.\u0275dir=Ee({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),n})(),ik=(()=>{class n{constructor(e,i,r,s,o){this._overlay=e,this._dir=o,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=X.EMPTY,this._attachSubscription=X.EMPTY,this._detachSubscription=X.EMPTY,this._positionSubscription=X.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new je,this.positionChange=new je,this.attach=new je,this.detach=new je,this.overlayKeydown=new je,this.overlayOutsideClick=new je,this._templatePortal=new fc(i,r),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=it(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=it(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=it(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=it(e)}get push(){return this._push}set push(e){this._push=it(e)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=V8);const e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!pi(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){const e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new uh({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){const i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const e=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(e),e}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof nk?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function x8(n,t=!1){return Re((e,i)=>{let r=0;e.subscribe(ge(i,s=>{const o=n(s,r++);(o||t)&&i.next(s),!o&&i.complete()}))})}(()=>this.positionChange.observers.length>0)).subscribe(e=>{this.positionChange.emit(e),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(x($i),x(_n),x(An),x(tk),x(zi,8))},n.\u0275dir=Ee({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[cn]}),n})();const j8={provide:tk,deps:[$i],useFactory:function H8(n){return()=>n.scrollStrategies.reposition()}};let Ra=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[$i,j8],imports:[sc,Os,O_,O_]}),n})(),rk=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),z8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[nh],imports:[rk,lh,ut,rk,lh]}),n})(),J8=(()=>{class n{constructor(){this.changes=new ue,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}formatYearRange(e,i){return`${e} \u2013 ${i}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const n$={provide:new Ce("mat-datepicker-scroll-strategy"),deps:[$i],useFactory:function t$(n){return()=>n.scrollStrategies.reposition()}};let a$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[J8,n$],imports:[hi,sh,Ra,Yu,Os,ut,xa]}),n})();function mc(n){return new J(t=>{li(n()).subscribe(t)})}function l$(n,t){}class gh{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0}}let lk=(()=>{class n extends dh{constructor(e,i,r,s,o,a,l,c){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=s,this._interactivityChecker=o,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=d=>{this._portalOutlet.hasAttached();const f=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),f},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(){const e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const e=this._config.restoreFocus;let i=null;if("string"==typeof e?i=this._document.querySelector(e):"boolean"==typeof e?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&"function"==typeof i.focus){const r=f_(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const e=this._elementRef.nativeElement,i=f_();return e===i||e.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=f_())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(S_),x(lt,8),x(gh),x(Wu),x(et),x(pc),x(ur))},n.\u0275cmp=_t({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(1&e&&Gt(Ia,7),2&e){let r;ze(r=$e())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){2&e&&bt("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[Le],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&at(0,l$,0,0,"ng-template",0)},dependencies:[Ia],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})();class Z_{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new ue,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!pi(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})})}close(t,e){if(this.containerInstance){const i=this.closed;this.containerInstance._closeInteractionType=(null==e?void 0:e.focusOrigin)||"program",this.overlayRef.dispose(),i.next(t),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}}const ck=new Ce("DialogScrollStrategy"),c$=new Ce("DialogData"),d$=new Ce("DefaultDialogConfig"),h$={provide:ck,deps:[$i],useFactory:function u$(n){return()=>n.scrollStrategies.block()}};let f$=0,dk=(()=>{class n{constructor(e,i,r,s,o,a){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=o,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ue,this._afterOpenedAtThisLevel=new ue,this._ariaHiddenElements=new Map,this.afterAllClosed=mc(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Yn(void 0))),this._scrollStrategy=a}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}open(e,i){const r=this._defaultOptions||new gh;(i=Object.assign(Object.assign({},r),i)).id=i.id||"cdk-dialog-"+f$++,i.id&&this.getDialogById(i.id);const s=this._getOverlayConfig(i),o=this._overlay.create(s),a=new Z_(o,i),l=this._attachContainer(o,a,i);return a.containerInstance=l,this._attachDialogContent(e,a,l,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){X_(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){X_(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),X_(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const i=new uh({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){var s,o;const a=null!==(s=r.injector)&&void 0!==s?s:null===(o=r.viewContainerRef)||void 0===o?void 0:o.injector,l=[{provide:gh,useValue:r},{provide:Z_,useValue:i},{provide:pc,useValue:e}];let c;r.container?"function"==typeof r.container?c=r.container:(c=r.container.type,l.push(...r.container.providers(r))):c=lk;const d=new hc(c,r.viewContainerRef,Jt.create({parent:a||this._injector,providers:l}),r.componentFactoryResolver);return e.attach(d).instance}_attachDialogContent(e,i,r,s){const o=this._createInjector(s,i,r);if(e instanceof _n){let a={$implicit:s.data,dialogRef:i};s.templateContext&&(a=Object.assign(Object.assign({},a),"function"==typeof s.templateContext?s.templateContext():s.templateContext)),r.attachTemplatePortal(new fc(e,null,a,o))}else{const a=r.attachComponentPortal(new hc(e,s.viewContainerRef,o,s.componentFactoryResolver));i.componentInstance=a.instance}}_createInjector(e,i,r){const s=e&&e.viewContainerRef&&e.viewContainerRef.injector,o=[{provide:c$,useValue:e.data},{provide:Z_,useValue:i}];return e.providers&&("function"==typeof e.providers?o.push(...e.providers(i,e,r)):o.push(...e.providers)),e.direction&&(!s||!s.get(zi,null,ot.Optional))&&o.push({provide:zi,useValue:{value:e.direction,change:tt()}}),Jt.create({parent:s||this._injector,providers:o})}_removeOpenDialog(e,i){const r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const e=this._overlayContainer.getContainerElement();if(e.parentElement){const i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){const s=i[r];s!==e&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return n.\u0275fac=function(e){return new(e||n)(te($i),te(Jt),te(d$,8),te(n,12),te(hh),te(ck))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();function X_(n,t){let e=n.length;for(;e--;)t(n[e])}let p$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[dk,h$],imports:[Ra,Os,Yu,Os]}),n})();function m$(n,t){}const Oa={params:{enterAnimationDuration:"150ms",exitAnimationDuration:"75ms"}},g$={dialogContainer:Vn("dialogContainer",[zt("void, exit",Qe({opacity:0,transform:"scale(0.7)"})),zt("enter",Qe({transform:"none"})),Wt("* => enter",LE([Zt("{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)",Qe({transform:"none",opacity:1})),du("@*",cu(),{optional:!0})]),Oa),Wt("* => void, * => exit",LE([Zt("{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)",Qe({opacity:0})),du("@*",cu(),{optional:!0})]),Oa)])};class _h{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0,this.enterAnimationDuration=Oa.params.enterAnimationDuration,this.exitAnimationDuration=Oa.params.exitAnimationDuration}}let _$=(()=>{class n extends lk{constructor(e,i,r,s,o,a,l,c){super(e,i,r,s,o,a,l,c),this._animationStateChanged=new je}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(S_),x(lt,8),x(_h),x(Wu),x(et),x(pc),x(ur))},n.\u0275cmp=_t({type:n,selectors:[["ng-component"]],features:[Le],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),v$=(()=>{class n extends _${constructor(e,i,r,s,o,a,l,c,d){super(e,i,r,s,o,a,l,d),this._changeDetectorRef=c,this._state="enter"}_onAnimationDone({toState:e,totalTime:i}){"enter"===e?this._openAnimationDone(i):"exit"===e&&this._animationStateChanged.next({state:"closed",totalTime:i})}_onAnimationStart({toState:e,totalTime:i}){"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:i}):("exit"===e||"void"===e)&&this._animationStateChanged.next({state:"closing",totalTime:i})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}_getAnimationState(){return{value:this._state,params:{enterAnimationDuration:this._config.enterAnimationDuration||Oa.params.enterAnimationDuration,exitAnimationDuration:this._config.exitAnimationDuration||Oa.params.exitAnimationDuration}}}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(S_),x(lt,8),x(_h),x(Wu),x(et),x(pc),x(en),x(ur))},n.\u0275cmp=_t({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-dialog-container"],hostVars:7,hostBindings:function(e,i){1&e&&Md("@dialogContainer.start",function(s){return i._onAnimationStart(s)})("@dialogContainer.done",function(s){return i._onAnimationDone(s)}),2&e&&(Zr("id",i._config.id),bt("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),Ad("@dialogContainer",i._getAnimationState()))},features:[Le],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&at(0,m$,0,0,"ng-template",0)},dependencies:[Ia],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,data:{animation:[g$.dialogContainer]}}),n})();class y${constructor(t,e,i){this._ref=t,this._containerInstance=i,this._afterOpened=new ue,this._beforeClosed=new ue,this._state=0,this.disableClose=e.disableClose,this.id=t.id,i._animationStateChanged.pipe(yn(r=>"opened"===r.state),sn(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(yn(r=>"closed"===r.state),sn(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Un(this.backdropClick(),this.keydownEvents().pipe(yn(r=>27===r.keyCode&&!this.disableClose&&!pi(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),function b$(n,t,e){n._closeInteractionType=t,n.close(e)}(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(yn(e=>"closing"===e.state),sn(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}const w$=new Ce("MatDialogData"),C$=new Ce("mat-dialog-default-options"),uk=new Ce("mat-dialog-scroll-strategy"),E$={provide:uk,deps:[$i],useFactory:function D$(n){return()=>n.scrollStrategies.block()}};let M$=0,x$=(()=>{class n{constructor(e,i,r,s,o,a,l,c,d,f){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ue,this._afterOpenedAtThisLevel=new ue,this._idPrefix="mat-dialog-",this.afterAllClosed=mc(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Yn(void 0))),this._scrollStrategy=a,this._dialog=i.get(dk)}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}open(e,i){let r;(i=Object.assign(Object.assign({},this._defaultOptions||new _h),i)).id=i.id||`${this._idPrefix}${M$++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(e,Object.assign(Object.assign({},i),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:_h,useValue:i},{provide:gh,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(o,a,l)=>(r=new this._dialogRefConstructor(o,i,l),r.updatePosition(null==i?void 0:i.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])}));return r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const o=this.openDialogs.indexOf(r);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}}return n.\u0275fac=function(e){bs()},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),S$=(()=>{class n extends x${constructor(e,i,r,s,o,a,l,c){super(e,i,s,a,l,o,y$,v$,w$,c)}}return n.\u0275fac=function(e){return new(e||n)(te($i),te(Jt),te(Nl,8),te(C$,8),te(uk),te(n,12),te(hh),te(fn,8))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),k$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[S$,E$],imports:[p$,Ra,Os,ut,ut]}),n})();const T$=[[["","mat-grid-avatar",""],["","matGridAvatar",""]],[["","mat-line",""],["","matLine",""]],"*"],A$=["[mat-grid-avatar], [matGridAvatar]","[mat-line], [matLine]","*"];let R$=(()=>{class n{constructor(e){this._element=e}ngAfterContentInit(){!function xS(n,t,e="mat"){n.changes.pipe(Yn(n)).subscribe(({length:i})=>{dc(t,`${e}-2-line`,!1),dc(t,`${e}-3-line`,!1),dc(t,`${e}-multi-line`,!1),2===i||3===i?dc(t,`${e}-${i}-line`,!0):i>3&&dc(t,`${e}-multi-line`,!0)})}(this._lines,this._element)}}return n.\u0275fac=function(e){return new(e||n)(x(Je))},n.\u0275cmp=_t({type:n,selectors:[["mat-grid-tile-header"],["mat-grid-tile-footer"]],contentQueries:function(e,i,r){if(1&e&&It(r,MS,5),2&e){let s;ze(s=$e())&&(i._lines=s)}},ngContentSelectors:A$,decls:4,vars:0,consts:[[1,"mat-grid-list-text"]],template:function(e,i){1&e&&(Fn(T$),Tt(0),_e(1,"div",0),Tt(2,1),De(),Tt(3,2))},encapsulation:2,changeDetection:0}),n})(),P$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["mat-grid-tile-header"]],hostAttrs:[1,"mat-grid-tile-header"]}),n})(),F$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ih,ut,ih,ut]}),n})();function Fa(n,t){const e=dt(n)?n:()=>n,i=r=>r.error(e());return new J(t?r=>t.schedule(i,0,r):i)}function os(n){return Re((t,e)=>{let s,i=null,r=!1;i=t.subscribe(ge(e,void 0,void 0,o=>{s=li(n(o,os(n)(t))),i?(i.unsubscribe(),i=null,s.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,s.subscribe(e))})}function vh(n){return Re((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}const L$=["*"];let yh;function gc(n){var t;return(null===(t=function N$(){if(void 0===yh&&(yh=null,"undefined"!=typeof window)){const n=window;void 0!==n.trustedTypes&&(yh=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return yh}())||void 0===t?void 0:t.createHTML(n))||n}function fk(n){return Error(`Unable to find icon with the name "${n}"`)}function pk(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function mk(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}class Co{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}}let bh=(()=>{class n{constructor(e,i,r,s){this._httpClient=e,this._sanitizer=i,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons"],this._document=r}addSvgIcon(e,i,r){return this.addSvgIconInNamespace("",e,i,r)}addSvgIconLiteral(e,i,r){return this.addSvgIconLiteralInNamespace("",e,i,r)}addSvgIconInNamespace(e,i,r,s){return this._addSvgIconConfig(e,i,new Co(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,s){const o=this._sanitizer.sanitize(Ut.HTML,r);if(!o)throw mk(r);const a=gc(o);return this._addSvgIconConfig(e,i,new Co("",a,s))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,r){return this._addSvgIconSetConfig(e,new Co(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){const s=this._sanitizer.sanitize(Ut.HTML,i);if(!s)throw mk(i);const o=gc(s);return this._addSvgIconSetConfig(e,new Co("",o,r))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){const i=this._sanitizer.sanitize(Ut.RESOURCE_URL,e);if(!i)throw pk(e);const r=this._cachedIconsByUrl.get(i);return r?tt(wh(r)):this._loadSvgIconFromConfig(new Co(e,null)).pipe(wn(s=>this._cachedIconsByUrl.set(i,s)),U(s=>wh(s)))}getNamedSvgIcon(e,i=""){const r=gk(i,e);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(i,e),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const o=this._iconSetConfigs.get(i);return o?this._getSvgFromIconSetConfigs(e,o):Fa(fk(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?tt(wh(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(U(i=>wh(i)))}_getSvgFromIconSetConfigs(e,i){const r=this._extractIconWithNameFromAnySet(e,i);return r?tt(r):MM(i.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(os(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Ut.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),tt(null)})))).pipe(U(()=>{const o=this._extractIconWithNameFromAnySet(e,i);if(!o)throw fk(e);return o}))}_extractIconWithNameFromAnySet(e,i){for(let r=i.length-1;r>=0;r--){const s=i[r];if(s.svgText&&s.svgText.toString().indexOf(e)>-1){const o=this._svgElementFromConfig(s),a=this._extractSvgIconFromSet(o,e,s.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(wn(i=>e.svgText=i),U(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?tt(null):this._fetchIcon(e).pipe(wn(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){const s=e.querySelector(`[id="${i}"]`);if(!s)return null;const o=s.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,r);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),r);const a=this._svgElementFromString(gc(""));return a.appendChild(o),this._setSvgAttributes(a,r)}_svgElementFromString(e){const i=this._document.createElement("DIV");i.innerHTML=e;const r=i.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(e){const i=this._svgElementFromString(gc("")),r=e.attributes;for(let s=0;sgc(d)),vh(()=>this._inProgressUrlFetches.delete(a)),ay());return this._inProgressUrlFetches.set(a,c),c}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(gk(e,i),r),this}_addSvgIconSetConfig(e,i){const r=this._iconSetConfigs.get(e);return r?r.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){const i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let r=0;rt?t.pathname+t.search:""}}}),_k=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],G$=_k.map(n=>`[${n}]`).join(", "),W$=/^url\(['"]?#(.*?)['"]?\)$/;let Ch=(()=>{class n extends j${constructor(e,i,r,s,o,a){super(e),this._iconRegistry=i,this._location=s,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=X.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),r||e.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(e){this._inline=it(e)}get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}get fontSet(){return this._fontSet}set fontSet(e){const i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){const i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}_splitIconName(e){if(!e)return["",""];const i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const e=this._elementsWithExternalReferences;if(e&&e.size){const i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){const e=this._elementRef.nativeElement;let i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){const r=e.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const e=this._elementRef.nativeElement,i=(this.fontSet?[this._iconRegistry.classNameForFontAlias(this.fontSet)]:this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),i.forEach(r=>e.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return"string"==typeof e?e.trim().split(" ")[0]:e}_prependPathToReferences(e){const i=this._elementsWithExternalReferences;i&&i.forEach((r,s)=>{r.forEach(o=>{s.setAttribute(o.name,`url('${e}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(e){const i=e.querySelectorAll(G$),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=i[s],l=a.getAttribute(o),c=l?l.match(W$):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.push({name:o,value:c[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){const[i,r]=this._splitIconName(e);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(sn(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${s.message}`))})}}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(bh),ti("aria-hidden"),x(z$),x(qr),x(U$,8))},n.\u0275cmp=_t({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(e,i){2&e&&(bt("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet),At("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[Le],ngContentSelectors:L$,decls:1,vars:0,template:function(e,i){1&e&&(Fn(),Tt(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),n})(),q$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ut,ut]}),n})(),Y$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ut,ut]}),n})(),c5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ih,ka,ut,$_,hi,ih,ut,$_,Y$]}),n})();function Rr(n,t){return Re((e,i)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&i.complete();e.subscribe(ge(i,l=>{null==r||r.unsubscribe();let c=0;const d=s++;li(n(l,d)).subscribe(r=ge(i,f=>i.next(t?t(l,f,d,c++):f),()=>{r=null,a()}))},()=>{o=!0,a()}))})}const d5=["trigger"],u5=["panel"];function h5(n,t){if(1&n&&(_e(0,"span",8),We(1),De()),2&n){const e=Ct();xe(1),qn(e.placeholder)}}function f5(n,t){if(1&n&&(_e(0,"span",12),We(1),De()),2&n){const e=Ct(2);xe(1),qn(e.triggerValue)}}function p5(n,t){1&n&&Tt(0,0,["*ngSwitchCase","true"])}function m5(n,t){1&n&&(_e(0,"span",9),at(1,f5,2,1,"span",10),at(2,p5,1,0,"ng-content",11),De()),2&n&&(Oe("ngSwitch",!!Ct().customTrigger),xe(2),Oe("ngSwitchCase",!0))}function g5(n,t){if(1&n){const e=wr();_e(0,"div",13)(1,"div",14,15),Ge("@transformPanel.done",function(r){return Ji(e),er(Ct()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return Ji(e),er(Ct()._handleKeydown(r))}),Tt(3,1),De()()}if(2&n){const e=Ct();Oe("@transformPanelWrap",void 0),xe(1),rm("mat-select-panel ",e._getPanelTheme(),""),Ni("transform-origin",e._transformOrigin)("font-size",e._triggerFontSize,"px"),Oe("ngClass",e.panelClass)("@transformPanel",e.multiple?"showing-multiple":"showing"),bt("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}const _5=[[["mat-select-trigger"]],"*"],v5=["mat-select-trigger","*"],yk={transformPanelWrap:Vn("transformPanelWrap",[Wt("* => void",du("@transformPanel",[cu()],{optional:!0}))]),transformPanel:Vn("transformPanel",[zt("void",Qe({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),zt("showing",Qe({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),zt("showing-multiple",Qe({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Wt("void => *",Zt("120ms cubic-bezier(0, 0, 0.2, 1)")),Wt("* => void",Zt("100ms 25ms linear",Qe({opacity:0})))])};let bk=0;const Ck=new Ce("mat-select-scroll-strategy"),C5=new Ce("MAT_SELECT_CONFIG"),D5={provide:Ck,deps:[$i],useFactory:function w5(n){return()=>n.scrollStrategies.reposition()}};class E5{constructor(t,e){this.source=t,this.value=e}}const M5=Rs(yo(cc(ES(class{constructor(n,t,e,i,r){this._elementRef=n,this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new ue}})))),x5=new Ce("MatSelectTrigger");let S5=(()=>{class n extends M5{constructor(e,i,r,s,o,a,l,c,d,f,w,k,j,K){var ae,ce,Te;super(o,s,l,c,f),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=a,this._parentFormField=d,this._liveAnnouncer=j,this._defaultOptions=K,this._panelOpen=!1,this._compareWith=(he,Pe)=>he===Pe,this._uid="mat-select-"+bk++,this._triggerAriaLabelledBy=null,this._destroy=new ue,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+bk++,this._panelDoneAnimatingStream=new ue,this._overlayPanelClass=(null===(ae=this._defaultOptions)||void 0===ae?void 0:ae.overlayPanelClass)||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=null!==(Te=null===(ce=this._defaultOptions)||void 0===ce?void 0:ce.disableOptionCentering)&&void 0!==Te&&Te,this.ariaLabel="",this.optionSelectionChanges=mc(()=>{const he=this.options;return he?he.changes.pipe(Yn(he),Rr(()=>Un(...he.map(Pe=>Pe.onSelectionChange)))):this._ngZone.onStable.pipe(sn(1),Rr(()=>this.optionSelectionChanges))}),this.openedChange=new je,this._openedStream=this.openedChange.pipe(yn(he=>he),U(()=>{})),this._closedStream=this.openedChange.pipe(yn(he=>!he),U(()=>{})),this.selectionChange=new je,this.valueChange=new je,this.ngControl&&(this.ngControl.valueAccessor=this),null!=(null==K?void 0:K.typeaheadDebounceInterval)&&(this._typeaheadDebounceInterval=K.typeaheadDebounceInterval),this._scrollStrategyFactory=k,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(w)||0,this.id=this.id}get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){var e,i,r,s;return null!==(s=null!==(e=this._required)&&void 0!==e?e:null===(r=null===(i=this.ngControl)||void 0===i?void 0:i.control)||void 0===r?void 0:r.hasValidator(Ng.required))&&void 0!==s&&s}set required(e){this._required=it(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=it(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=it(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=ki(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}ngOnInit(){this._selectionModel=new oh(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(M_(),Ot(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ot(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(Yn(null),Ot(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){var e,i;return this.multiple?(null===(e=this._selectionModel)||void 0===e?void 0:e.selected)||[]:null===(i=this._selectionModel)||void 0===i?void 0:i.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){const i=e.keyCode,r=40===i||38===i||37===i||39===i,s=13===i||32===i,o=this._keyManager;if(!o.isTyping()&&s&&!pi(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){const a=this.selected;o.onKeydown(e);const l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(e){const i=this._keyManager,r=e.keyCode,s=40===r||38===r,o=i.isTyping();if(s&&e.altKey)e.preventDefault(),this.close();else if(o||13!==r&&32!==r||!i.activeItem||pi(e))if(!o&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();const a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{const a=i.activeItemIndex;i.onKeydown(e),this._multiple&&s&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(sn(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this._selectionModel.selected.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){const i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,e)}catch(s){return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_initKeyManager(){this._keyManager=new q3(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Ot(this._destroy)).subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.pipe(Ot(this._destroy)).subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const e=Un(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ot(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Un(...this.options.map(i=>i._stateChanges)).pipe(Ot(e)).subscribe(()=>{this._changeDetectorRef.markForCheck(),this.stateChanges.next()})}_onSelect(e,i){const r=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const e=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,e):e.indexOf(i)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){var e;return!this._panelOpen&&!this.disabled&&(null===(e=this.options)||void 0===e?void 0:e.length)>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){var e;if(this.ariaLabel)return null;const i=null===(e=this._parentFormField)||void 0===e?void 0:e.getLabelId();return this.ariaLabelledby?(i?i+" ":"")+this.ariaLabelledby:i}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){var e;if(this.ariaLabel)return null;const i=null===(e=this._parentFormField)||void 0===e?void 0:e.getLabelId();let r=(i?i+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return n.\u0275fac=function(e){return new(e||n)(x(ss),x(en),x(et),x(nh),x(Je),x(zi,8),x(Ql,8),x(Zl,8),x(Y_,8),x(Tr,10),ti("tabindex"),x(Ck),x(A_),x(C5,8))},n.\u0275dir=Ee({type:n,viewQuery:function(e,i){if(1&e&&(Gt(d5,5),Gt(u5,5),Gt(ik,5)),2&e){let r;ze(r=$e())&&(i.trigger=r.first),ze(r=$e())&&(i.panel=r.first),ze(r=$e())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[Le,cn]}),n})(),k5=(()=>{class n extends S5{constructor(){super(...arguments),this._scrollTop=0,this._triggerFontSize=0,this._transformOrigin="top",this._offsetY=0,this._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}]}_calculateOverlayScroll(e,i,r){const s=this._getItemHeight();return Math.min(Math.max(0,s*e-i+s/2),r)}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(Ot(this._destroy)).subscribe(()=>{this.panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._changeDetectorRef.markForCheck())})}open(){super._canOpen()&&(super.open(),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe(sn(1)).subscribe(()=>{this._triggerFontSize&&this._overlayDir.overlayRef&&this._overlayDir.overlayRef.overlayElement&&(this._overlayDir.overlayRef.overlayElement.style.fontSize=`${this._triggerFontSize}px`)}))}_scrollOptionIntoView(e){const i=OS(e,this.options,this.optionGroups),r=this._getItemHeight();this.panel.nativeElement.scrollTop=0===e&&1===i?0:function mz(n,t,e,i){return ne+i?Math.max(0,n-i+t):e}((e+i)*r,r,this.panel.nativeElement.scrollTop,256)}_positioningSettled(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}_panelDoneAnimating(e){this.panelOpen?this._scrollTop=0:(this._overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),super._panelDoneAnimating(e)}_getChangeEvent(e){return new E5(this,e)}_calculateOverlayOffsetX(){const e=this._overlayDir.overlayRef.overlayElement.getBoundingClientRect(),i=this._viewportRuler.getViewportSize(),r=this._isRtl(),s=this.multiple?56:32;let o;if(this.multiple)o=40;else if(this.disableOptionCentering)o=16;else{let c=this._selectionModel.selected[0]||this.options.first;o=c&&c.group?32:16}r||(o*=-1);const a=0-(e.left+o-(r?s:0)),l=e.right+o-i.width+(r?0:s);a>0?o+=a+8:l>0&&(o-=l+8),this._overlayDir.offsetX=Math.round(o),this._overlayDir.overlayRef.updatePosition()}_calculateOverlayOffsetY(e,i,r){const s=this._getItemHeight(),o=(s-this._triggerRect.height)/2,a=Math.floor(256/s);let l;return this.disableOptionCentering?0:(l=0===this._scrollTop?e*s:this._scrollTop===r?(e-(this._getItemCount()-a))*s+(s-(this._getItemCount()*s-256)%s):i-s/2,Math.round(-1*l-o))}_checkOverlayWithinViewport(e){const i=this._getItemHeight(),r=this._viewportRuler.getViewportSize(),s=this._triggerRect.top-8,o=r.height-this._triggerRect.bottom-8,a=Math.abs(this._offsetY),c=Math.min(this._getItemCount()*i,256)-a-this._triggerRect.height;c>o?this._adjustPanelUp(c,o):a>s?this._adjustPanelDown(a,s,e):this._transformOrigin=this._getOriginBasedOnOption()}_adjustPanelUp(e,i){const r=Math.round(e-i);this._scrollTop-=r,this._offsetY-=r,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}_adjustPanelDown(e,i,r){const s=Math.round(e-i);if(this._scrollTop+=s,this._offsetY+=s,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=r)return this._scrollTop=r,this._offsetY=0,void(this._transformOrigin="50% top 0px")}_calculateOverlayPosition(){const e=this._getItemHeight(),i=this._getItemCount(),r=Math.min(i*e,256),o=i*e-r;let a;a=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),a+=OS(a,this.options,this.optionGroups);const l=r/2;this._scrollTop=this._calculateOverlayScroll(a,l,o),this._offsetY=this._calculateOverlayOffsetY(a,l,o),this._checkOverlayWithinViewport(o)}_getOriginBasedOnOption(){const e=this._getItemHeight(),i=(e-this._triggerRect.height)/2;return`50% ${Math.abs(this._offsetY)-i+e/2}px 0px`}_getItemHeight(){return 3*this._triggerFontSize}_getItemCount(){return this.options.length+this.optionGroups.length}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Mt(n)))(i||n)}}(),n.\u0275cmp=_t({type:n,selectors:[["mat-select"]],contentQueries:function(e,i,r){if(1&e&&(It(r,x5,5),It(r,PS,5),It(r,RS,5)),2&e){let s;ze(s=$e())&&(i.customTrigger=s.first),ze(s=$e())&&(i.options=s),ze(s=$e())&&(i.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:19,hostBindings:function(e,i){1&e&&Ge("keydown",function(s){return i._handleKeydown(s)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&e&&(bt("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),At("mat-select-disabled",i.disabled)("mat-select-invalid",i.errorState)("mat-select-required",i.required)("mat-select-empty",i.empty)("mat-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[Xe([{provide:ah,useExisting:n},{provide:IS,useExisting:n}]),Le],ngContentSelectors:v5,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(e,i){if(1&e&&(Fn(_5),_e(0,"div",0,1),Ge("click",function(){return i.toggle()}),_e(3,"div",2),at(4,h5,2,1,"span",3),at(5,m5,3,2,"span",4),De(),_e(6,"div",5),xt(7,"div",6),De()(),at(8,g5,4,14,"ng-template",7),Ge("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&e){const r=Js(1);bt("aria-owns",i.panelOpen?i.id+"-panel":null),xe(3),Oe("ngSwitch",i.empty),bt("id",i._valueId),xe(1),Oe("ngSwitchCase",!0),xe(1),Oe("ngSwitchCase",!1),xe(3),Oe("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayMinWidth",null==i._triggerRect?null:i._triggerRect.width)("cdkConnectedOverlayOffsetY",i._offsetY)}},dependencies:[Xm,ya,nu,oE,ik,nk],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{height:16px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;margin:0 4px}.mat-form-field.mat-focused .mat-select-arrow{transform:translateX(0)}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[yk.transformPanelWrap,yk.transformPanel]},changeDetection:0}),n})(),Dk=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[D5],imports:[hi,Ra,FS,ut,xa,lh,FS,ut]}),n})();const R5={provide:new Ce("mat-tooltip-scroll-strategy"),deps:[$i],useFactory:function I5(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}};let Ek=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[R5],imports:[Yu,hi,Ra,ut,ut,xa]}),n})(),J_=(()=>{class n{constructor(){this.changes=new ue,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,i,r)=>{if(0==r||0==i)return`0 of ${r}`;const s=e*i;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+i,r):s+i} of ${r}`}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const B5={provide:J_,deps:[[new Nn,new tr,J_]],useFactory:function N5(n){return n||new J_}};let V5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[B5],imports:[hi,sh,Dk,Ek,ut]}),n})();function H5(n,t){if(1&n&&(Xa(),xt(0,"circle",4)),2&n){const e=Ct(),i=Js(1);Ni("animation-name","mat-progress-spinner-stroke-rotate-"+e._spinnerAnimationLabel)("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%")("transform-origin",e._getCircleTransformOrigin(i)),bt("r",e._getCircleRadius())}}function j5(n,t){if(1&n&&(Xa(),xt(0,"circle",4)),2&n){const e=Ct(),i=Js(1);Ni("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%")("transform-origin",e._getCircleTransformOrigin(i)),bt("r",e._getCircleRadius())}}const z5=vo(class{constructor(n){this._elementRef=n}},"primary"),$5=new Ce("mat-progress-spinner-default-options",{providedIn:"root",factory:function G5(){return{diameter:100}}});class Fs extends z5{constructor(t,e,i,r,s,o,a,l){super(t),this._document=i,this._diameter=100,this._value=0,this._resizeSubscription=X.EMPTY,this.mode="determinate";const c=Fs._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),c.has(i.head)||c.set(i.head,new Set([100])),this._noopAnimations="NoopAnimations"===r&&!!s&&!s._forceAnimations,"mat-spinner"===t.nativeElement.nodeName.toLowerCase()&&(this.mode="indeterminate"),s&&(s.color&&(this.color=this.defaultColor=s.color),s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth)),e.isBrowser&&e.SAFARI&&a&&o&&l&&(this._resizeSubscription=a.change(150).subscribe(()=>{"indeterminate"===this.mode&&l.run(()=>o.markForCheck())}))}get diameter(){return this._diameter}set diameter(t){this._diameter=ki(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=ki(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,ki(t)))}ngOnInit(){const t=this._elementRef.nativeElement;this._styleRoot=Hu(t)||this._document.head,this._attachStyleNode(),t.classList.add("mat-progress-spinner-indeterminate-animation")}ngOnDestroy(){this._resizeSubscription.unsubscribe()}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){const t=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_getCircleTransformOrigin(t){var e;const i=50*(null!==(e=t.currentScale)&&void 0!==e?e:1);return`${i}% ${i}%`}_attachStyleNode(){const t=this._styleRoot,e=this._diameter,i=Fs._diameters;let r=i.get(t);if(!r||!r.has(e)){const s=this._document.createElement("style");s.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),s.textContent=this._getAnimationText(),t.appendChild(s),r||(r=new Set,i.set(t,r)),r.add(e)}}_getAnimationText(){const t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,""+.95*t).replace(/END_VALUE/g,""+.2*t).replace(/DIAMETER/g,`${this._spinnerAnimationLabel}`)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}}Fs._diameters=new WeakMap,Fs.\u0275fac=function(t){return new(t||Fs)(x(Je),x(bn),x(lt,8),x(fn,8),x($5),x(en),x(ss),x(et))},Fs.\u0275cmp=_t({type:Fs,selectors:[["mat-progress-spinner"],["mat-spinner"]],hostAttrs:["role","progressbar","tabindex","-1",1,"mat-progress-spinner","mat-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(bt("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),Ni("width",e.diameter,"px")("height",e.diameter,"px"),At("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",diameter:"diameter",strokeWidth:"strokeWidth",mode:"mode",value:"value"},exportAs:["matProgressSpinner"],features:[Le],decls:4,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false","aria-hidden","true",3,"ngSwitch"],["svg",""],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width","transform-origin",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width","transform-origin",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(Xa(),_e(0,"svg",0,1),at(2,H5,1,11,"circle",2),at(3,j5,1,9,"circle",3),De()),2&t&&(Ni("width",e.diameter,"px")("height",e.diameter,"px"),Oe("ngSwitch","indeterminate"===e.mode),bt("viewBox",e._getViewBox()),xe(2),Oe("ngSwitchCase",!0),xe(1),Oe("ngSwitchCase",!1))},dependencies:[ya,nu],styles:[".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:rgba(0,0,0,0);transition:stroke-dashoffset 225ms linear}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}.mat-progress-spinner[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}.mat-progress-spinner._mat-animation-noopable svg,.mat-progress-spinner._mat-animation-noopable circle{animation:none;transition:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}"],encapsulation:2,changeDetection:0});let q5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ut,hi,ut]}),n})(),a4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ka,ut,ut]}),n})(),v4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[hi,ut,ut]}),n})(),nv=(()=>{class n{constructor(){this.changes=new ue}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const b4={provide:nv,deps:[[new Nn,new tr,nv]],useFactory:function y4(n){return n||new nv}};let w4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({providers:[b4],imports:[hi,ut]}),n})(),L4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[O_]}),n})(),J4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[L4,ut,ut]}),n})();const t6=["*"],n6=["tabListContainer"],r6=["tabList"],s6=["tabListInner"],o6=["nextPaginator"],a6=["previousPaginator"],u6=["mat-tab-nav-bar",""],h6=new Ce("MatInkBarPositioner",{providedIn:"root",factory:function f6(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}});let Hk=(()=>{class n{constructor(e,i,r,s){this._elementRef=e,this._ngZone=i,this._inkBarPositioner=r,this._animationMode=s}alignToElement(e){this.show(),this._ngZone.onStable.pipe(sn(1)).subscribe(()=>{const i=this._inkBarPositioner(e),r=this._elementRef.nativeElement;r.style.left=i.left,r.style.width=i.width})}show(){this._elementRef.nativeElement.style.visibility="visible"}hide(){this._elementRef.nativeElement.style.visibility="hidden"}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(et),x(h6),x(fn,8))},n.\u0275dir=Ee({type:n,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(e,i){2&e&&At("_mat-animation-noopable","NoopAnimations"===i._animationMode)}}),n})();const jk=Ar({passive:!0});let g6=(()=>{class n{constructor(e,i,r,s,o,a,l){this._elementRef=e,this._changeDetectorRef=i,this._viewportRuler=r,this._dir=s,this._ngZone=o,this._platform=a,this._animationMode=l,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new ue,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new ue,this._disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new je,this.indexFocused=new je,o.runOutsideAngular(()=>{_o(e.nativeElement,"mouseleave").pipe(Ot(this._destroyed)).subscribe(()=>{this._stopInterval()})})}get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=it(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){e=ki(e),this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}ngAfterViewInit(){_o(this._previousPaginator.nativeElement,"touchstart",jk).pipe(Ot(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),_o(this._nextPaginator.nativeElement,"touchstart",jk).pipe(Ot(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const e=this._dir?this._dir.change:tt("ltr"),i=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Gu(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(sn(1)).subscribe(r),Un(e,i,this._items.changes,this._itemsResized()).pipe(Ot(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.pipe(Ot(this._destroyed)).subscribe(s=>{this.indexFocused.emit(s),this._setTabFocus(s)})}_itemsResized(){return"function"!=typeof ResizeObserver?Ri:this._items.changes.pipe(Yn(this._items),Rr(e=>new J(i=>this._ngZone.runOutsideAngular(()=>{const r=new ResizeObserver(()=>{i.next()});return e.forEach(s=>{r.observe(s.elementRef.nativeElement)}),()=>{r.disconnect()}}))),E_(1))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!pi(e))switch(e.keyCode){case 13:case 32:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e));break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){const e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){if(!this._items)return!0;const i=this._items?this._items.toArray()[e]:null;return!!i&&!i.disabled}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();const i=this._tabListContainer.nativeElement;i.scrollLeft="ltr"==this._getLayoutDirection()?0:i.scrollWidth-i.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const e=this.scrollDistance,i="ltr"===this._getLayoutDirection()?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){return this._scrollTo(this._scrollDistance+("before"==e?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;const i=this._items?this._items.toArray()[e]:null;if(!i)return;const r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:s,offsetWidth:o}=i.elementRef.nativeElement;let a,l;"ltr"==this._getLayoutDirection()?(a=s,l=a+o):(l=this._tabListInner.nativeElement.offsetWidth-s,a=l-o);const c=this.scrollDistance,d=this.scrollDistance+r;ad&&(this.scrollDistance+=l-d+60)}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const e=this._tabListInner.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=e}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,i=e?e.elementRef.nativeElement:null;i?this._inkBar.alignToElement(i):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,i){i&&null!=i.button&&0!==i.button||(this._stopInterval(),R_(650,100).pipe(Ot(Un(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:r,distance:s}=this._scrollHeader(e);(0===s||s>=r)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const i=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(i,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:i,distance:this._scrollDistance}}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(en),x(ss),x(zi,8),x(et),x(bn),x(fn,8))},n.\u0275dir=Ee({type:n,inputs:{disablePagination:"disablePagination"}}),n})(),_6=0,zk=(()=>{class n extends g6{constructor(e,i,r,s,o,a,l){super(e,s,o,i,r,a,l),this._disableRipple=!1,this.color="primary"}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){const i=this._elementRef.nativeElement.classList;i.remove(`mat-background-${this.backgroundColor}`),e&&i.add(`mat-background-${e}`),this._backgroundColor=e}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=it(e)}_itemSelected(){}ngAfterContentInit(){this._items.changes.pipe(Yn(null),Ot(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}updateActiveLink(){if(!this._items)return;const e=this._items.toArray();for(let i=0;i{class n extends zk{constructor(e,i,r,s,o,a,l){super(e,i,r,s,o,a,l)}}return n.\u0275fac=function(e){return new(e||n)(x(Je),x(zi,8),x(et),x(en),x(ss),x(bn),x(fn,8))},n.\u0275cmp=_t({type:n,selectors:[["","mat-tab-nav-bar",""]],contentQueries:function(e,i,r){if(1&e&&It(r,Gk,5),2&e){let s;ze(s=$e())&&(i._items=s)}},viewQuery:function(e,i){if(1&e&&(Gt(Hk,7),Gt(n6,7),Gt(r6,7),Gt(s6,7),Gt(o6,5),Gt(a6,5)),2&e){let r;ze(r=$e())&&(i._inkBar=r.first),ze(r=$e())&&(i._tabListContainer=r.first),ze(r=$e())&&(i._tabList=r.first),ze(r=$e())&&(i._tabListInner=r.first),ze(r=$e())&&(i._nextPaginator=r.first),ze(r=$e())&&(i._previousPaginator=r.first)}},hostAttrs:[1,"mat-tab-nav-bar","mat-tab-header"],hostVars:11,hostBindings:function(e,i){2&e&&(bt("role",i._getRole()),At("mat-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-tab-header-rtl","rtl"==i._getLayoutDirection())("mat-primary","warn"!==i.color&&"accent"!==i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color))},inputs:{color:"color"},exportAs:["matTabNavBar","matTabNav"],features:[Le],attrs:u6,ngContentSelectors:t6,decls:14,vars:10,consts:[["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","disabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-link-container",3,"keydown"],["tabListContainer",""],[1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-links"],["tabListInner",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","disabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(e,i){1&e&&(Fn(),_e(0,"button",0,1),Ge("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(s){return i._handlePaginatorPress("before",s)})("touchend",function(){return i._stopInterval()}),xt(2,"div",2),De(),_e(3,"div",3,4),Ge("keydown",function(s){return i._handleKeydown(s)}),_e(5,"div",5,6),Ge("cdkObserveContent",function(){return i._onContentChanges()}),_e(7,"div",7,8),Tt(9),De(),xt(10,"mat-ink-bar"),De()(),_e(11,"button",9,10),Ge("mousedown",function(s){return i._handlePaginatorPress("after",s)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),xt(13,"div",2),De()),2&e&&(At("mat-tab-header-pagination-disabled",i._disableScrollBefore),Oe("matRippleDisabled",i._disableScrollBefore||i.disableRipple)("disabled",i._disableScrollBefore||null),xe(5),At("_mat-animation-noopable","NoopAnimations"===i._animationMode),xe(6),At("mat-tab-header-pagination-disabled",i._disableScrollAfter),Oe("matRippleDisabled",i._disableScrollAfter||i.disableRipple)("disabled",i._disableScrollAfter||null))},dependencies:[Ps,x_,Hk],styles:[".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-tab-header-pagination::-moz-focus-inner{border:0}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}"],encapsulation:2}),n})();const v6=yo(Rs(cc(class{})));let y6=(()=>{class n extends v6{constructor(e,i,r,s,o,a){super(),this._tabNavBar=e,this.elementRef=i,this._focusMonitor=o,this._isActive=!1,this.id="mat-tab-link-"+_6++,this.rippleConfig=r||{},this.tabIndex=parseInt(s)||0,"NoopAnimations"===a&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0})}get active(){return this._isActive}set active(e){const i=it(e);i!==this._isActive&&(this._isActive=i,this._tabNavBar.updateActiveLink())}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.elementRef)}_handleFocus(){this._tabNavBar.focusIndex=this._tabNavBar._items.toArray().indexOf(this)}_handleKeydown(e){this._tabNavBar.tabPanel&&32===e.keyCode&&this.elementRef.nativeElement.click()}_getAriaControls(){var e;return this._tabNavBar.tabPanel?null===(e=this._tabNavBar.tabPanel)||void 0===e?void 0:e.id:this.elementRef.nativeElement.getAttribute("aria-controls")}_getAriaSelected(){return this._tabNavBar.tabPanel?this.active?"true":"false":this.elementRef.nativeElement.getAttribute("aria-selected")}_getAriaCurrent(){return this.active&&!this._tabNavBar.tabPanel?"page":null}_getRole(){return this._tabNavBar.tabPanel?"tab":this.elementRef.nativeElement.getAttribute("role")}_getTabIndex(){return this._tabNavBar.tabPanel?this._isActive&&!this.disabled?0:-1:this.tabIndex}}return n.\u0275fac=function(e){return new(e||n)(x(zk),x(Je),x(rh,8),ti("tabindex"),x(ur),x(fn,8))},n.\u0275dir=Ee({type:n,inputs:{active:"active",id:"id"},features:[Le]}),n})(),Gk=(()=>{class n extends y6{constructor(e,i,r,s,o,a,l,c){super(e,i,o,a,l,c),this._tabLinkRipple=new z_(this,r,i,s),this._tabLinkRipple.setupTriggerEvents(i.nativeElement)}ngOnDestroy(){super.ngOnDestroy(),this._tabLinkRipple._removeTriggerEvents()}}return n.\u0275fac=function(e){return new(e||n)(x($k),x(Je),x(et),x(bn),x(rh,8),ti("tabindex"),x(ur),x(fn,8))},n.\u0275dir=Ee({type:n,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mat-tab-link","mat-focus-indicator"],hostVars:11,hostBindings:function(e,i){1&e&&Ge("focus",function(){return i._handleFocus()})("keydown",function(s){return i._handleKeydown(s)}),2&e&&(bt("aria-controls",i._getAriaControls())("aria-current",i._getAriaCurrent())("aria-disabled",i.disabled)("aria-selected",i._getAriaSelected())("id",i.id)("tabIndex",i._getTabIndex())("role",i._getRole()),At("mat-tab-disabled",i.disabled)("mat-tab-label-active",i.active))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matTabLink"],features:[Le]}),n})(),b6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[hi,ut,Os,ka,$u,Yu,ut]}),n})(),w6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[ut,ut]}),n})();function fv(...n){const t=Wa(n),e=iy(n),{args:i,keys:r}=DM(n);if(0===i.length)return gn([],t);const s=new J(function C6(n,t,e=N){return i=>{Wk(t,()=>{const{length:r}=n,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=gn(n[l],t);let d=!1;c.subscribe(ge(i,f=>{s[l]=f,d||(d=!0,a--),a||i.next(e(s.slice()))},()=>{--o||i.complete()}))},i)},i)}}(i,t,r?o=>EM(r,o):N));return e?s.pipe(Fg(e)):s}function Wk(n,t,e){n?jr(e,n,t):t()}const qk=new Set;let Ha,D6=(()=>{class n{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):M6}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function E6(n){if(!qk.has(n))try{Ha||(Ha=document.createElement("style"),Ha.setAttribute("type","text/css"),document.head.appendChild(Ha)),Ha.sheet&&(Ha.sheet.insertRule(`@media ${n} {body{ }}`,0),qk.add(n))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return n.\u0275fac=function(e){return new(e||n)(te(bn))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function M6(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}let pv=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new ue}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return Yk(ju(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=fv(Yk(ju(e)).map(o=>this._registerQuery(o).observable));return s=th(s.pipe(sn(1)),s.pipe(E_(1),D_(0))),s.pipe(U(o=>{const a={matches:!1,breakpoints:{}};return o.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);const i=this._mediaMatcher.matchMedia(e),s={observable:new J(o=>{const a=l=>this._zone.run(()=>o.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(Yn(i),U(({matches:o})=>({query:e,matches:o})),Ot(this._destroySubject)),mql:i};return this._queries.set(e,s),s}}return n.\u0275fac=function(e){return new(e||n)(te(D6),te(et))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Yk(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function S6(n,t){if(1&n){const e=wr();_e(0,"div",2)(1,"button",3),Ge("click",function(){return Ji(e),er(Ct().action())}),We(2),De()()}if(2&n){const e=Ct();xe(2),qn(e.data.action)}}function k6(n,t){}const Kk=new Ce("MatSnackBarData");class Ph{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const T6=Math.pow(2,31)-1;class mv{constructor(t,e){this._overlayRef=e,this._afterDismissed=new ue,this._afterOpened=new ue,this._onAction=new ue,this._dismissedByAction=!1,this.containerInstance=t,t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,T6))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let A6=(()=>{class n{constructor(e,i){this.snackBarRef=e,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(e){return new(e||n)(x(mv),x(Kk))},n.\u0275cmp=_t({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[[1,"mat-simple-snack-bar-content"],["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(e,i){1&e&&(_e(0,"span",0),We(1),De(),at(2,S6,3,1,"div",1)),2&e&&(xe(1),qn(i.data.message),xe(1),Oe("ngIf",i.hasAction))},dependencies:[lr,Ta],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}.mat-simple-snack-bar-content{overflow:hidden;text-overflow:ellipsis}"],encapsulation:2,changeDetection:0}),n})();const I6={snackBarState:Vn("state",[zt("void, hidden",Qe({transform:"scale(0.8)",opacity:0})),zt("visible",Qe({transform:"scale(1)",opacity:1})),Wt("* => visible",Zt("150ms cubic-bezier(0, 0, 0.2, 1)")),Wt("* => void, * => hidden",Zt("75ms cubic-bezier(0.4, 0.0, 1, 1)",Qe({opacity:0})))])};let R6=(()=>{class n extends dh{constructor(e,i,r,s,o){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new ue,this._onExit=new ue,this._onEnter=new ue,this._animationState="void",this.attachDomPortal=a=>{this._assertNotAttached();const l=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),l},this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}onAnimationEnd(e){const{fromState:i,toState:r}=e;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(sn(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){const e=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>e.classList.add(r)):e.classList.add(i))}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),null==r||r.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(e){return new(e||n)(x(et),x(Je),x(en),x(bn),x(Ph))},n.\u0275dir=Ee({type:n,viewQuery:function(e,i){if(1&e&&Gt(Ia,7),2&e){let r;ze(r=$e())&&(i._portalOutlet=r.first)}},features:[Le]}),n})(),P6=(()=>{class n extends R6{_afterPortalAttached(){super._afterPortalAttached(),"center"===this.snackBarConfig.horizontalPosition&&this._elementRef.nativeElement.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&this._elementRef.nativeElement.classList.add("mat-snack-bar-top")}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Mt(n)))(i||n)}}(),n.\u0275cmp=_t({type:n,selectors:[["snack-bar-container"]],hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(e,i){1&e&&Md("@state.done",function(s){return i.onAnimationEnd(s)}),2&e&&Ad("@state",i._animationState)},features:[Le],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(_e(0,"div",0),at(1,k6,0,0,"ng-template",1),De(),xt(2,"div")),2&e&&(xe(2),bt("aria-live",i._live)("role",i._role))},dependencies:[Ia],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}"],encapsulation:2,data:{animation:[I6.snackBarState]}}),n})(),Qk=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[Ra,Os,hi,sh,ut,ut]}),n})();const Zk=new Ce("mat-snack-bar-default-options",{providedIn:"root",factory:function O6(){return new Ph}});let F6=(()=>{class n{constructor(e,i,r,s,o,a){this._overlay=e,this._live=i,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=o,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}get _openedSnackBarRef(){const e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}openFromComponent(e,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",r){const s=Object.assign(Object.assign({},this._defaultConfig),r);return s.data={message:e,action:i},s.announcementMessage===e&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,i){const s=Jt.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:Ph,useValue:i}]}),o=new hc(this.snackBarContainerComponent,i.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=i,a.instance}_attach(e,i){const r=Object.assign(Object.assign(Object.assign({},new Ph),this._defaultConfig),i),s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new mv(o,s);if(e instanceof _n){const l=new fc(e,null,{$implicit:r.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(r,a),c=new hc(e,void 0,l),d=o.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ot(s.detachments())).subscribe(l=>{s.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration))}_createOverlay(e){const i=new uh;i.direction=e.direction;let r=this._overlay.position().global();const s="rtl"===e.direction,o="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!s||"end"===e.horizontalPosition&&s,a=!o&&"center"!==e.horizontalPosition;return o?r.left("0"):a?r.right("0"):r.centerHorizontally(),"top"===e.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(e,i){return Jt.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:mv,useValue:i},{provide:Kk,useValue:e.data}]})}}return n.\u0275fac=function(e){return new(e||n)(te($i),te(A_),te(Jt),te(pv),te(n,12),te(Zk))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),L6=(()=>{class n extends F6{constructor(e,i,r,s,o,a){super(e,i,r,s,o,a),this.simpleSnackBarComponent=A6,this.snackBarContainerComponent=P6,this.handsetCssClass="mat-snack-bar-handset"}}return n.\u0275fac=function(e){return new(e||n)(te($i),te(A_),te(Jt),te(pv),te(n,12),te(Zk))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:Qk}),n})();const wc=Br(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function Oh(){return Re((n,t)=>{let e=null;n._refCount++;const i=ge(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(e=null);const r=n._connection,s=e;e=null,r&&(!s||r===s)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})}class gv extends J{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Ne(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,null==t||t.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new X;const e=this.getSubject();t.add(this.source.subscribe(ge(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=X.EMPTY)}return t}refCount(){return Oh()(this)}}function N6(n,t,e,i,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(ge(o,d=>{const f=c++;l=a?n(l,d,f):(a=!0,d),i&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}function Xk(n,t){return Re(N6(n,t,arguments.length>=2,!0))}function _v(n){return n<=0?()=>Ri:Re((t,e)=>{let i=[];t.subscribe(ge(e,r=>{i.push(r),n{for(const r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function Jk(n=B6){return Re((t,e)=>{let i=!1;t.subscribe(ge(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(n())))})}function B6(){return new wc}function vv(n){return Re((t,e)=>{let i=!1;t.subscribe(ge(e,r=>{i=!0,e.next(r)},()=>{i||e.next(n),e.complete()}))})}function Do(n,t){const e=arguments.length>=2;return i=>i.pipe(n?yn((r,s)=>n(r,s,i)):N,sn(1),e?vv(t):Jk(()=>new wc))}class cs{constructor(t,e){this.id=t,this.url=e}}class yv extends cs{constructor(t,e,i="imperative",r=null){super(t,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Cc extends cs{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class eT extends cs{constructor(t,e,i){super(t,e),this.reason=i,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class j6 extends cs{constructor(t,e,i){super(t,e),this.error=i,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class U6 extends cs{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class z6 extends cs{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class $6 extends cs{constructor(t,e,i,r,s){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class G6 extends cs{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class W6 extends cs{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class q6{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Y6{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class K6{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Q6{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Z6{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class X6{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class tT{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const Et="primary";class J6{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function ja(n){return new J6(n)}const nT="ngNavigationCancelingError";function bv(n){const t=Error("NavigationCancelingError: "+n);return t[nT]=!0,t}function tG(n,t,e){const i=e.path.split("/");if(i.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||i.lengthi[s]===r)}return n===t}function rT(n){return Array.prototype.concat.apply([],n)}function sT(n){return n.length>0?n[n.length-1]:null}function Hn(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function hr(n){return Xp(n)?n:wl(n)?gn(Promise.resolve(n)):tt(n)}const rG={exact:function lT(n,t,e){if(!Mo(n.segments,t.segments)||!Fh(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!n.children[i]||!lT(n.children[i],t.children[i],e))return!1;return!0},subset:cT},oT={exact:function sG(n,t){return Pr(n,t)},subset:function oG(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>iT(n[e],t[e]))},ignored:()=>!0};function aT(n,t,e){return rG[e.paths](n.root,t.root,e.matrixParams)&&oT[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function cT(n,t,e){return dT(n,t,t.segments,e)}function dT(n,t,e,i){if(n.segments.length>e.length){const r=n.segments.slice(0,e.length);return!(!Mo(r,e)||t.hasChildren()||!Fh(r,e,i))}if(n.segments.length===e.length){if(!Mo(n.segments,e)||!Fh(n.segments,e,i))return!1;for(const r in t.children)if(!n.children[r]||!cT(n.children[r],t.children[r],i))return!1;return!0}{const r=e.slice(0,n.segments.length),s=e.slice(n.segments.length);return!!(Mo(n.segments,r)&&Fh(n.segments,r,i)&&n.children[Et])&&dT(n.children[Et],t,s,i)}}function Fh(n,t,e){return t.every((i,r)=>oT[e](n[r].parameters,i.parameters))}class Eo{constructor(t,e,i){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ja(this.queryParams)),this._queryParamMap}toString(){return cG.serialize(this)}}class Pt{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Hn(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Lh(this)}}class Dc{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=ja(this.parameters)),this._parameterMap}toString(){return mT(this)}}function Mo(n,t){return n.length===t.length&&n.every((e,i)=>e.path===t[i].path)}class uT{}class hT{parse(t){const e=new vG(t);return new Eo(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Ec(t.root,!0)}`,i=function hG(n){const t=Object.keys(n).map(e=>{const i=n[e];return Array.isArray(i)?i.map(r=>`${Nh(e)}=${Nh(r)}`).join("&"):`${Nh(e)}=${Nh(i)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${i}${"string"==typeof t.fragment?`#${function dG(n){return encodeURI(n)}(t.fragment)}`:""}`}}const cG=new hT;function Lh(n){return n.segments.map(t=>mT(t)).join("/")}function Ec(n,t){if(!n.hasChildren())return Lh(n);if(t){const e=n.children[Et]?Ec(n.children[Et],!1):"",i=[];return Hn(n.children,(r,s)=>{s!==Et&&i.push(`${s}:${Ec(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function lG(n,t){let e=[];return Hn(n.children,(i,r)=>{r===Et&&(e=e.concat(t(i,r)))}),Hn(n.children,(i,r)=>{r!==Et&&(e=e.concat(t(i,r)))}),e}(n,(i,r)=>r===Et?[Ec(n.children[Et],!1)]:[`${r}:${Ec(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[Et]?`${Lh(n)}/${e[0]}`:`${Lh(n)}/(${e.join("//")})`}}function fT(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Nh(n){return fT(n).replace(/%3B/gi,";")}function wv(n){return fT(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Bh(n){return decodeURIComponent(n)}function pT(n){return Bh(n.replace(/\+/g,"%20"))}function mT(n){return`${wv(n.path)}${function uG(n){return Object.keys(n).map(t=>`;${wv(t)}=${wv(n[t])}`).join("")}(n.parameters)}`}const fG=/^[^\/()?;=#]+/;function Vh(n){const t=n.match(fG);return t?t[0]:""}const pG=/^[^=?&#]+/,gG=/^[^&#]+/;class vG{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Pt([],{}):new Pt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[Et]=new Pt(t,e)),i}parseSegment(){const t=Vh(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new Dc(Bh(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Vh(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Vh(this.remaining);r&&(i=r,this.capture(i))}t[Bh(e)]=Bh(i)}parseQueryParam(t){const e=function mG(n){const t=n.match(pG);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const o=function _G(n){const t=n.match(gG);return t?t[0]:""}(this.remaining);o&&(i=o,this.capture(i))}const r=pT(e),s=pT(i);if(t.hasOwnProperty(r)){let o=t[r];Array.isArray(o)||(o=[o],t[r]=o),o.push(s)}else t[r]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Vh(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=Et);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[Et]:new Pt([],o),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class gT{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Cv(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){const e=Cv(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=Dv(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return Dv(t,this._root).map(e=>e.value)}}function Cv(n,t){if(n===t.value)return t;for(const e of t.children){const i=Cv(n,e);if(i)return i}return null}function Dv(n,t){if(n===t.value)return[t];for(const e of t.children){const i=Dv(n,e);if(i.length)return i.unshift(t),i}return[]}class ds{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function Ua(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class _T extends gT{constructor(t,e){super(t),this.snapshot=e,Ev(this,t)}toString(){return this.snapshot.toString()}}function vT(n,t){const e=function yG(n,t){const o=new Hh([],{},{},"",{},Et,t,null,n.root,-1,{});return new bT("",new ds(o,[]))}(n,t),i=new fi([new Dc("",{})]),r=new fi({}),s=new fi({}),o=new fi({}),a=new fi(""),l=new za(i,r,o,a,s,Et,t,e.root);return l.snapshot=e.root,new _T(new ds(l,[]),e)}class za{constructor(t,e,i,r,s,o,a,l){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(U(t=>ja(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(U(t=>ja(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function yT(n,t="emptyOnly"){const e=n.pathFromRoot;let i=0;if("always"!==t)for(i=e.length-1;i>=1;){const r=e[i],s=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(s.component)break;i--}}return function bG(n){return n.reduce((t,e)=>{var i;return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign(Object.assign(Object.assign({},e.data),t.resolve),null===(i=e.routeConfig)||void 0===i?void 0:i.data),e._resolvedData)}},{params:{},data:{},resolve:{}})}(e.slice(i))}class Hh{constructor(t,e,i,r,s,o,a,l,c,d,f,w){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=d,this._correctedLastPathIndex=null!=w?w:d,this._resolve=f}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=ja(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ja(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class bT extends gT{constructor(t,e){super(e),this.url=t,Ev(this,e)}toString(){return wT(this._root)}}function Ev(n,t){t.value._routerState=n,t.children.forEach(e=>Ev(n,e))}function wT(n){const t=n.children.length>0?` { ${n.children.map(wT).join(", ")} } `:"";return`${n.value}${t}`}function Mv(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Pr(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Pr(t.params,e.params)||n.params.next(e.params),function nG(n,t){if(n.length!==t.length)return!1;for(let e=0;ePr(e.parameters,t[i].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||xv(n.parent,t.parent))}function Mc(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=t.value;const r=function CG(n,t,e){return t.children.map(i=>{for(const r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Mc(n,i,r);return Mc(n,i)})}(n,t,e);return new ds(i,r)}{if(n.shouldAttach(t.value)){const s=n.retrieve(t.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=t.value,o.children=t.children.map(a=>Mc(n,a)),o}}const i=function DG(n){return new za(new fi(n.url),new fi(n.params),new fi(n.queryParams),new fi(n.fragment),new fi(n.data),n.outlet,n.component,n)}(t.value),r=t.children.map(s=>Mc(n,s));return new ds(i,r)}}function jh(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function xc(n){return"object"==typeof n&&null!=n&&n.outlets}function Sv(n,t,e,i,r){let s={};if(i&&Hn(i,(a,l)=>{s[l]=Array.isArray(a)?a.map(c=>`${c}`):`${a}`}),n===t)return new Eo(e,s,r);const o=CT(n,t,e);return new Eo(o,s,r)}function CT(n,t,e){const i={};return Hn(n.children,(r,s)=>{i[s]=r===t?e:CT(r,t,e)}),new Pt(n.segments,i)}class DT{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&jh(i[0]))throw new Error("Root segment cannot have matrix parameters");const r=i.find(xc);if(r&&r!==sT(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class kv{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function ET(n,t,e){if(n||(n=new Pt([],{})),0===n.segments.length&&n.hasChildren())return Uh(n,t,e);const i=function TG(n,t,e){let i=0,r=t;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return s;const o=n.segments[r],a=e[i];if(xc(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!xT(l,c,o))return s;i+=2}else{if(!xT(l,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof s&&(s=[s]),null!==s&&(r[o]=ET(n.children[o],t,s))}),Hn(n.children,(s,o)=>{void 0===i[o]&&(r[o]=s)}),new Pt(n.segments,r)}}function Tv(n,t,e){const i=n.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[i]=Tv(new Pt([],{}),0,e))}),t}function MT(n){const t={};return Hn(n,(e,i)=>t[i]=`${e}`),t}function xT(n,t,e){return n==e.path&&Pr(t,e.parameters)}class IG{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Sc,this.attachRef=null}}class Sc{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const i=this.getOrCreateContext(t);i.outlet=e,this.contexts.set(t,i)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new IG,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}let Av=(()=>{class n{constructor(e,i,r,s,o){this.parentContexts=e,this.location=i,this.changeDetector=s,this.environmentInjector=o,this.activated=null,this._activatedRoute=null,this.activateEvents=new je,this.deactivateEvents=new je,this.attachEvents=new je,this.detachEvents=new je,this.name=r||Et,e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const r=this.location,o=e._futureSnapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new RG(e,a,r.injector);if(i&&function PG(n){return!!n.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(o);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(o,{index:r.length,injector:l,environmentInjector:null!=i?i:this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(e){return new(e||n)(x(Sc),x(An),ti("name"),x(en),x(Qs))},n.\u0275dir=Ee({type:n,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"]}),n})();class RG{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===za?this.route:t===Sc?this.childContexts:this.parent.get(t,e)}}let ST=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=_t({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,i){1&e&&xt(0,"router-outlet")},dependencies:[Av],encapsulation:2}),n})();function kT(n,t){var e;return n.providers&&!n._injector&&(n._injector=Ld(n.providers,t,`Route: ${n.path}`)),null!==(e=n._injector)&&void 0!==e?e:t}function Rv(n){const t=n.children&&n.children.map(Rv),e=t?Object.assign(Object.assign({},n),{children:t}):Object.assign({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Et&&(e.component=ST),e}function Wi(n){return n.outlet||Et}function TT(n,t){const e=n.filter(i=>Wi(i)===t);return e.push(...n.filter(i=>Wi(i)!==t)),e}function AT(n){var t;if(!n)return null;if(null!==(t=n.routeConfig)&&void 0!==t&&t._injector)return n.routeConfig._injector;for(let e=n.parent;e;e=e.parent){const i=e.routeConfig;if(null!=i&&i._loadedInjector)return i._loadedInjector;if(null!=i&&i._injector)return i._injector}return null}class BG{constructor(t,e,i,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),Mv(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const r=Ua(e);t.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),Hn(r,(s,o)=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(t,e,i){const r=t.value,s=e?e.value:null;if(r===s)if(r.component){const o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,i);else s&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=Ua(t);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);if(i&&i.outlet){const o=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:o,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=Ua(t);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(t,e,i){const r=Ua(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new X6(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Q6(t.value.snapshot))}activateRoutes(t,e,i){var r;const s=t.value,o=e?e.value:null;if(Mv(s),s===o)if(s.component){const a=i.getOrCreateContext(s.outlet);this.activateChildRoutes(t,e,a.children)}else this.activateChildRoutes(t,e,i);else if(s.component){const a=i.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const l=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),a.children.onOutletReAttached(l.contexts),a.attachRef=l.componentRef,a.route=l.route.value,a.outlet&&a.outlet.attach(l.componentRef,l.route.value),Mv(l.route.value),this.activateChildRoutes(t,null,a.children)}else{const l=AT(s.snapshot),c=null!==(r=null==l?void 0:l.get(io))&&void 0!==r?r:null;a.attachRef=null,a.route=s,a.resolver=c,a.injector=l,a.outlet&&a.outlet.activateWith(s,a.injector),this.activateChildRoutes(t,null,a.children)}}else this.activateChildRoutes(t,null,i)}}function Ns(n){return"function"==typeof n}function xo(n){return n instanceof Eo}const kc=Symbol("INITIAL_VALUE");function Tc(){return Rr(n=>fv(n.map(t=>t.pipe(sn(1),Yn(kc)))).pipe(Xk((t,e)=>{let i=!1;return e.reduce((r,s,o)=>r!==kc?r:(s===kc&&(i=!0),i||!1!==s&&o!==e.length-1&&!xo(s)?r:s),t)},kc),yn(t=>t!==kc),U(t=>xo(t)?t:!0===t),sn(1)))}const IT={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function zh(n,t,e){var i;if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?Object.assign({},IT):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const s=(t.matcher||tG)(e,n,t);if(!s)return Object.assign({},IT);const o={};Hn(s.posParams,(l,c)=>{o[c]=l.path});const a=s.consumed.length>0?Object.assign(Object.assign({},o),s.consumed[s.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:s.consumed,remainingSegments:e.slice(s.consumed.length),parameters:a,positionalParamSegments:null!==(i=s.posParams)&&void 0!==i?i:{}}}function $h(n,t,e,i,r="corrected"){if(e.length>0&&function WG(n,t,e){return e.some(i=>Gh(n,t,i)&&Wi(i)!==Et)}(n,e,i)){const o=new Pt(t,function GG(n,t,e,i){const r={};r[Et]=i,i._sourceSegment=n,i._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&Wi(s)!==Et){const o=new Pt([],{});o._sourceSegment=n,o._segmentIndexShift=t.length,r[Wi(s)]=o}return r}(n,t,i,new Pt(e,n.children)));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function qG(n,t,e){return e.some(i=>Gh(n,t,i))}(n,e,i)){const o=new Pt(n.segments,function $G(n,t,e,i,r,s){const o={};for(const a of i)if(Gh(n,e,a)&&!r[Wi(a)]){const l=new Pt([],{});l._sourceSegment=n,l._segmentIndexShift="legacy"===s?n.segments.length:t.length,o[Wi(a)]=l}return Object.assign(Object.assign({},r),o)}(n,t,e,i,n.children,r));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:e}}const s=new Pt(n.segments,n.children);return s._sourceSegment=n,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:e}}function Gh(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function RT(n,t,e,i){return!!(Wi(n)===i||i!==Et&&Gh(t,e,n))&&("**"===n.path||zh(t,n,e).matched)}function PT(n,t,e){return 0===t.length&&!n.children[e]}class Wh{constructor(t){this.segmentGroup=t||null}}class OT{constructor(t){this.urlTree=t}}function Ac(n){return Fa(new Wh(n))}function FT(n){return Fa(new OT(n))}class ZG{constructor(t,e,i,r,s){this.injector=t,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=s,this.allowRedirects=!0}apply(){const t=$h(this.urlTree.root,[],[],this.config).segmentGroup,e=new Pt(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,Et).pipe(U(s=>this.createUrlTree(Pv(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(os(s=>{if(s instanceof OT)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof Wh?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,Et).pipe(U(r=>this.createUrlTree(Pv(r),t.queryParams,t.fragment))).pipe(os(r=>{throw r instanceof Wh?this.noMatchError(r):r}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,i){const r=t.segments.length>0?new Pt([],{[Et]:t}):t;return new Eo(r,e,i)}expandSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(U(s=>new Pt([],s))):this.expandSegment(t,i,e,i.segments,r,!0)}expandChildren(t,e,i){const r=[];for(const s of Object.keys(i.children))"primary"===s?r.unshift(s):r.push(s);return gn(r).pipe(Ca(s=>{const o=i.children[s],a=TT(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(U(l=>({segment:l,outlet:s})))}),Xk((s,o)=>(s[o.outlet]=o.segment,s),{}),function V6(n,t){const e=arguments.length>=2;return i=>i.pipe(n?yn((r,s)=>n(r,s,i)):N,_v(1),e?vv(t):Jk(()=>new wc))}())}expandSegment(t,e,i,r,s,o){return gn(i).pipe(Ca(a=>this.expandSegmentAgainstRoute(t,e,i,a,r,s,o).pipe(os(c=>{if(c instanceof Wh)return tt(null);throw c}))),Do(a=>!!a),os((a,l)=>{if(a instanceof wc||"EmptyError"===a.name)return PT(e,r,s)?tt(new Pt([],{})):Ac(e);throw a}))}expandSegmentAgainstRoute(t,e,i,r,s,o,a){return RT(r,e,s,o)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,s,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o):Ac(e):Ac(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,r){const s=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?FT(s):this.lineralizeSegments(i,s).pipe(Pn(o=>{const a=new Pt(o,{});return this.expandSegment(t,a,e,o,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:d}=zh(e,r,s);if(!a)return Ac(e);const f=this.applyRedirectCommands(l,r.redirectTo,d);return r.redirectTo.startsWith("/")?FT(f):this.lineralizeSegments(r,f).pipe(Pn(w=>this.expandSegment(t,e,i,w.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,i,r,s){if("**"===i.path)return t=kT(i,t),i.loadChildren?(i._loadedRoutes?tt({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(t,i)).pipe(U(f=>(i._loadedRoutes=f.routes,i._loadedInjector=f.injector,new Pt(r,{})))):tt(new Pt(r,{}));const{matched:o,consumedSegments:a,remainingSegments:l}=zh(e,i,r);return o?(t=kT(i,t),this.getChildConfig(t,i,r).pipe(Pn(d=>{var f;const w=null!==(f=d.injector)&&void 0!==f?f:t,k=d.routes,{segmentGroup:j,slicedSegments:K}=$h(e,a,l,k),ae=new Pt(j.segments,j.children);if(0===K.length&&ae.hasChildren())return this.expandChildren(w,k,ae).pipe(U(Pe=>new Pt(a,Pe)));if(0===k.length&&0===K.length)return tt(new Pt(a,{}));const ce=Wi(i)===s;return this.expandSegment(w,ae,k,K,ce?Et:s,!0).pipe(U(he=>new Pt(a.concat(he.segments),he.children)))}))):Ac(e)}getChildConfig(t,e,i){return e.children?tt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?tt({routes:e._loadedRoutes,injector:e._loadedInjector}):this.runCanLoadGuards(t,e,i).pipe(Pn(r=>r?this.configLoader.loadChildren(t,e).pipe(wn(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function KG(n){return Fa(bv(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`))}(e))):tt({routes:[],injector:t})}runCanLoadGuards(t,e,i){const r=e.canLoad;return r&&0!==r.length?tt(r.map(o=>{const a=t.get(o);let l;if(function HG(n){return n&&Ns(n.canLoad)}(a))l=a.canLoad(e,i);else{if(!Ns(a))throw new Error("Invalid CanLoad guard");l=a(e,i)}return hr(l)})).pipe(Tc(),wn(o=>{if(!xo(o))return;const a=bv(`Redirecting to "${this.urlSerializer.serialize(o)}"`);throw a.url=o,a}),U(o=>!0===o)):tt(!0)}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return tt(i);if(r.numberOfChildren>1||!r.children[Et])return Fa(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t.redirectTo}'`));r=r.children[Et]}}applyRedirectCommands(t,e,i){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreatreUrlTree(t,e,i,r){const s=this.createSegmentGroup(t,e.root,i,r);return new Eo(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return Hn(t,(r,s)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[s]=e[a]}else i[s]=r}),i}createSegmentGroup(t,e,i,r){const s=this.createSegments(t,e.segments,i,r);let o={};return Hn(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,i,r)}),new Pt(s,o)}createSegments(t,e,i,r){return e.map(s=>s.path.startsWith(":")?this.findPosParam(t,s,r):this.findOrReturn(s,i))}findPosParam(t,e,i){const r=i[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return r}findOrReturn(t,e){let i=0;for(const r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}}function Pv(n){const t={};for(const i of Object.keys(n.children)){const s=Pv(n.children[i]);(s.segments.length>0||s.hasChildren())&&(t[i]=s)}return function XG(n){if(1===n.numberOfChildren&&n.children[Et]){const t=n.children[Et];return new Pt(n.segments.concat(t.segments),t.children)}return n}(new Pt(n.segments,t))}class LT{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class qh{constructor(t,e){this.component=t,this.route=e}}function eW(n,t,e){const i=n._root;return Ic(i,t?t._root:null,e,[i.value])}function Yh(n,t,e){const i=AT(t);return(null!=i?i:e).get(n)}function Ic(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=Ua(t);return n.children.forEach(o=>{(function nW(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=n.value,o=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function iW(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!Mo(n.url,t.url);case"pathParamsOrQueryParamsChange":return!Mo(n.url,t.url)||!Pr(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xv(n,t)||!Pr(n.queryParams,t.queryParams);default:return!xv(n,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new LT(i)):(s.data=o.data,s._resolvedData=o._resolvedData),Ic(n,t,s.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new qh(a.outlet.component,o))}else o&&Rc(t,a,r),r.canActivateChecks.push(new LT(i)),Ic(n,null,s.component?a?a.children:null:e,i,r)})(o,s[o.value.outlet],e,i.concat([o.value]),r),delete s[o.value.outlet]}),Hn(s,(o,a)=>Rc(o,e.getContext(a),r)),r}function Rc(n,t,e){const i=Ua(n),r=n.value;Hn(i,(s,o)=>{Rc(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new qh(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}class hW{}function BT(n){return new J(t=>t.error(n))}class pW{constructor(t,e,i,r,s,o){this.rootComponentType=t,this.config=e,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=s,this.relativeLinkResolution=o}recognize(){const t=$h(this.urlTree.root,[],[],this.config.filter(o=>void 0===o.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,Et);if(null===e)return null;const i=new Hh([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Et,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new ds(i,e),s=new bT(this.url,r);return this.inheritParamsAndData(s._root),s}inheritParamsAndData(t){const e=t.value,i=yT(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(t,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,i)}processChildren(t,e){const i=[];for(const s of Object.keys(e.children)){const o=e.children[s],a=TT(t,s),l=this.processSegmentGroup(a,o,s);if(null===l)return null;i.push(...l)}const r=VT(i);return function mW(n){n.sort((t,e)=>t.value.outlet===Et?-1:e.value.outlet===Et?1:t.value.outlet.localeCompare(e.value.outlet))}(r),r}processSegment(t,e,i,r){for(const s of t){const o=this.processSegmentAgainstRoute(s,e,i,r);if(null!==o)return o}return PT(e,i,r)?[]:null}processSegmentAgainstRoute(t,e,i,r){var s,o,a,l;if(t.redirectTo||!RT(t,e,i,r))return null;let c,d=[],f=[];if("**"===t.path){const ce=i.length>0?sT(i).parameters:{},Te=jT(e)+i.length;c=new Hh(i,ce,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,zT(t),Wi(t),null!==(o=null!==(s=t.component)&&void 0!==s?s:t._loadedComponent)&&void 0!==o?o:null,t,HT(e),Te,$T(t),Te)}else{const ce=zh(e,t,i);if(!ce.matched)return null;d=ce.consumedSegments,f=ce.remainingSegments;const Te=jT(e)+d.length;c=new Hh(d,ce.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,zT(t),Wi(t),null!==(l=null!==(a=t.component)&&void 0!==a?a:t._loadedComponent)&&void 0!==l?l:null,t,HT(e),Te,$T(t),Te)}const w=function gW(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(t),{segmentGroup:k,slicedSegments:j}=$h(e,d,f,w.filter(ce=>void 0===ce.redirectTo),this.relativeLinkResolution);if(0===j.length&&k.hasChildren()){const ce=this.processChildren(w,k);return null===ce?null:[new ds(c,ce)]}if(0===w.length&&0===j.length)return[new ds(c,[])];const K=Wi(t)===r,ae=this.processSegment(w,k,j,K?Et:r);return null===ae?null:[new ds(c,ae)]}}function _W(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function VT(n){const t=[],e=new Set;for(const i of n){if(!_W(i)){t.push(i);continue}const r=t.find(s=>i.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):t.push(i)}for(const i of e){const r=VT(i.children);t.push(new ds(i.value,r))}return t.filter(i=>!e.has(i))}function HT(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function jT(n){var t,e;let i=n,r=null!==(t=i._segmentIndexShift)&&void 0!==t?t:0;for(;i._sourceSegment;)i=i._sourceSegment,r+=null!==(e=i._segmentIndexShift)&&void 0!==e?e:0;return r-1}function zT(n){return n.data||{}}function $T(n){return n.resolve||{}}const Ov=Symbol("RouteTitle");function GT(n){return"string"==typeof n.title||null===n.title}function Kh(n){return Rr(t=>{const e=n(t);return e?gn(e).pipe(U(()=>t)):tt(t)})}class xW extends class MW{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const Fv=new Ce("ROUTES");let Lv=(()=>{class n{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return tt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=hr(e.loadComponent()).pipe(wn(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),vh(()=>{this.componentLoaders.delete(e)})),r=new gv(i,()=>new ue).pipe(Oh());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return tt({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const s=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(U(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,d=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=rT(l.get(Fv,[],ot.Self|ot.Optional)));return{routes:c.map(Rv),injector:l}}),vh(()=>{this.childrenLoaders.delete(i)})),o=new gv(s,()=>new ue).pipe(Oh());return this.childrenLoaders.set(i,o),o}loadModuleFactoryOrRoutes(e){return hr(e()).pipe(Pn(i=>i instanceof OC||Array.isArray(i)?tt(i):gn(this.compiler.compileModuleAsync(i))))}}return n.\u0275fac=function(e){return new(e||n)(te(Jt),te(Am))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();class kW{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function AW(n){throw n}function IW(n,t,e){return t.parse("/")}function qT(n,t){return tt(null)}const RW={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},PW={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ti=(()=>{class n{constructor(e,i,r,s,o,a,l){this.rootComponentType=e,this.urlSerializer=i,this.rootContexts=r,this.location=s,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new ue,this.errorHandler=AW,this.malformedUriErrorHandler=IW,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:qT,afterPreactivation:qT},this.urlHandlingStrategy=new kW,this.routeReuseStrategy=new xW,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.configLoader=o.get(Lv),this.configLoader.onLoadEndListener=w=>this.triggerEvent(new Y6(w)),this.configLoader.onLoadStartListener=w=>this.triggerEvent(new q6(w)),this.ngModule=o.get(Ds),this.console=o.get(vN);const f=o.get(et);this.isNgZoneEnabled=f instanceof et&&et.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=function iG(){return new Eo(new Pt([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=vT(this.currentUrlTree,this.rootComponentType),this.transitions=new fi({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var e;return null===(e=this.location.getState())||void 0===e?void 0:e.\u0275routerPageId}setupNavigations(e){const i=this.events;return e.pipe(yn(r=>0!==r.id),U(r=>Object.assign(Object.assign({},r),{extractedUrl:this.urlHandlingStrategy.extract(r.rawUrl)})),Rr(r=>{let s=!1,o=!1;return tt(r).pipe(wn(a=>{this.currentNavigation={id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Rr(a=>{const l=this.browserUrlTree.toString(),c=!this.navigated||a.extractedUrl.toString()!==l||l!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||c)&&this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return YT(a.source)&&(this.browserUrlTree=a.extractedUrl),tt(a).pipe(Rr(f=>{const w=this.transitions.getValue();return i.next(new yv(f.id,this.serializeUrl(f.extractedUrl),f.source,f.restoredState)),w!==this.transitions.getValue()?Ri:Promise.resolve(f)}),function JG(n,t,e,i){return Rr(r=>function QG(n,t,e,i,r){return new ZG(n,t,e,i,r).apply()}(n,t,e,r.extractedUrl,i).pipe(U(s=>Object.assign(Object.assign({},r),{urlAfterRedirects:s}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),wn(f=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:f.urlAfterRedirects})}),function vW(n,t,e,i,r){return Pn(s=>function fW(n,t,e,i,r="emptyOnly",s="legacy"){try{const o=new pW(n,t,e,i,r,s).recognize();return null===o?BT(new hW):tt(o)}catch(o){return BT(o)}}(n,t,s.urlAfterRedirects,e(s.urlAfterRedirects),i,r).pipe(U(o=>Object.assign(Object.assign({},s),{targetSnapshot:o}))))}(this.rootComponentType,this.config,f=>this.serializeUrl(f),this.paramsInheritanceStrategy,this.relativeLinkResolution),wn(f=>{if("eager"===this.urlUpdateStrategy){if(!f.extras.skipLocationChange){const k=this.urlHandlingStrategy.merge(f.urlAfterRedirects,f.rawUrl);this.setBrowserUrl(k,f)}this.browserUrlTree=f.urlAfterRedirects}const w=new U6(f.id,this.serializeUrl(f.extractedUrl),this.serializeUrl(f.urlAfterRedirects),f.targetSnapshot);i.next(w)}));if(c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:w,extractedUrl:k,source:j,restoredState:K,extras:ae}=a,ce=new yv(w,this.serializeUrl(k),j,K);i.next(ce);const Te=vT(k,this.rootComponentType).snapshot;return tt(Object.assign(Object.assign({},a),{targetSnapshot:Te,urlAfterRedirects:k,extras:Object.assign(Object.assign({},ae),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=a.rawUrl,a.resolve(null),Ri}),Kh(a=>{const{targetSnapshot:l,id:c,extractedUrl:d,rawUrl:f,extras:{skipLocationChange:w,replaceUrl:k}}=a;return this.hooks.beforePreactivation(l,{navigationId:c,appliedUrlTree:d,rawUrlTree:f,skipLocationChange:!!w,replaceUrl:!!k})}),wn(a=>{const l=new z6(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),U(a=>Object.assign(Object.assign({},a),{guards:eW(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function rW(n,t){return Pn(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?tt(Object.assign(Object.assign({},e),{guardsResult:!0})):function sW(n,t,e,i){return gn(n).pipe(Pn(r=>function uW(n,t,e,i,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?tt(s.map(a=>{const l=Yh(a,t,r);let c;if(function zG(n){return n&&Ns(n.canDeactivate)}(l))c=hr(l.canDeactivate(n,t,e,i));else{if(!Ns(l))throw new Error("Invalid CanDeactivate guard");c=hr(l(n,t,e,i))}return c.pipe(Do())})).pipe(Tc()):tt(!0)}(r.component,r.route,e,t,i)),Do(r=>!0!==r,!0))}(o,i,r,n).pipe(Pn(a=>a&&function VG(n){return"boolean"==typeof n}(a)?function oW(n,t,e,i){return gn(t).pipe(Ca(r=>th(function lW(n,t){return null!==n&&t&&t(new K6(n)),tt(!0)}(r.route.parent,i),function aW(n,t){return null!==n&&t&&t(new Z6(n)),tt(!0)}(r.route,i),function dW(n,t,e){const i=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function tW(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(o)).filter(o=>null!==o).map(o=>mc(()=>tt(o.guards.map(l=>{const c=Yh(l,o.node,e);let d;if(function UG(n){return n&&Ns(n.canActivateChild)}(c))d=hr(c.canActivateChild(i,n));else{if(!Ns(c))throw new Error("Invalid CanActivateChild guard");d=hr(c(i,n))}return d.pipe(Do())})).pipe(Tc())));return tt(s).pipe(Tc())}(n,r.path,e),function cW(n,t,e){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return tt(!0);const r=i.map(s=>mc(()=>{const o=Yh(s,t,e);let a;if(function jG(n){return n&&Ns(n.canActivate)}(o))a=hr(o.canActivate(t,n));else{if(!Ns(o))throw new Error("Invalid CanActivate guard");a=hr(o(t,n))}return a.pipe(Do())}));return tt(r).pipe(Tc())}(n,r.route,e))),Do(r=>!0!==r,!0))}(i,s,n,t):tt(a)),U(a=>Object.assign(Object.assign({},e),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),wn(a=>{if(xo(a.guardsResult)){const c=bv(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw c.url=a.guardsResult,c}const l=new $6(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),yn(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),Kh(a=>{if(a.guards.canActivateChecks.length)return tt(a).pipe(wn(l=>{const c=new G6(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}),Rr(l=>{let c=!1;return tt(l).pipe(function yW(n,t){return Pn(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return tt(e);let s=0;return gn(r).pipe(Ca(o=>function bW(n,t,e,i){const r=n.routeConfig,s=n._resolve;return void 0!==(null==r?void 0:r.title)&&!GT(r)&&(s[Ov]=r.title),function wW(n,t,e,i){const r=function CW(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return tt({});const s={};return gn(r).pipe(Pn(o=>function DW(n,t,e,i){const r=Yh(n,t,i);return hr(r.resolve?r.resolve(t,e):r(t,e))}(n[o],t,e,i).pipe(Do(),wn(a=>{s[o]=a}))),_v(1),function H6(n){return U(()=>n)}(s),os(o=>o instanceof wc?Ri:Fa(o)))}(s,n,t,i).pipe(U(o=>(n._resolvedData=o,n.data=yT(n,e).resolve,r&>(r)&&(n.data[Ov]=r.title),null)))}(o.route,i,n,t)),wn(()=>s++),_v(1),Pn(o=>s===r.length?tt(e):Ri))})}(this.paramsInheritanceStrategy,this.ngModule.injector),wn({next:()=>c=!0,complete:()=>{c||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),wn(l=>{const c=new W6(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}))}),Kh(a=>{const{targetSnapshot:l,id:c,extractedUrl:d,rawUrl:f,extras:{skipLocationChange:w,replaceUrl:k}}=a;return this.hooks.afterPreactivation(l,{navigationId:c,appliedUrlTree:d,rawUrlTree:f,skipLocationChange:!!w,replaceUrl:!!k})}),Kh(a=>{const l=c=>{var d;const f=[];(null===(d=c.routeConfig)||void 0===d?void 0:d.loadComponent)&&!c.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(c.routeConfig).pipe(wn(w=>{c.component=w}),U(()=>{})));for(const w of c.children)f.push(...l(w));return f};return fv(l(a.targetSnapshot.root)).pipe(vv(),sn(1))}),U(a=>{const l=function wG(n,t,e){const i=Mc(n,t._root,e?e._root:void 0);return new _T(i,t)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return Object.assign(Object.assign({},a),{targetRouterState:l})}),wn(a=>{this.currentUrlTree=a.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(a.urlAfterRedirects,a.rawUrl),this.routerState=a.targetRouterState,"deferred"===this.urlUpdateStrategy&&(a.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,a),this.browserUrlTree=a.urlAfterRedirects)}),((n,t,e)=>U(i=>(new BG(t,i.targetRouterState,i.currentRouterState,e).activate(n),i)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),wn({next(){s=!0},complete(){s=!0}}),vh(()=>{var a;s||o||this.cancelNavigationTransition(r,`Navigation ID ${r.id} is not equal to the current navigation id ${this.navigationId}`),(null===(a=this.currentNavigation)||void 0===a?void 0:a.id)===r.id&&(this.currentNavigation=null)}),os(a=>{if(o=!0,function eG(n){return n&&n[nT]}(a)){const l=xo(a.url);l||(this.navigated=!0,this.restoreHistory(r,!0));const c=new eT(r.id,this.serializeUrl(r.extractedUrl),a.message);if(i.next(c),l){const d=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),f={skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||YT(r.source)};this.scheduleNavigation(d,"imperative",null,f,{resolve:r.resolve,reject:r.reject,promise:r.promise})}else r.resolve(!1)}else{this.restoreHistory(r,!0);const l=new j6(r.id,this.serializeUrl(r.extractedUrl),a);i.next(l);try{r.resolve(this.errorHandler(a))}catch(c){r.reject(c)}}return Ri}))}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}setTransition(e){this.transitions.next(Object.assign(Object.assign({},this.transitions.value),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{var r;const s={replaceUrl:!0},o=null!==(r=e.state)&&void 0!==r&&r.navigationId?e.state:null;if(o){const l=Object.assign({},o);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(s.state=l)}const a=this.parseUrl(e.url);this.scheduleNavigation(a,i,o,s)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){this.config=e.map(Rv),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:a,preserveFragment:l}=i,c=r||this.routerState.root,d=l?this.currentUrlTree.fragment:o;let f=null;switch(a){case"merge":f=Object.assign(Object.assign({},this.currentUrlTree.queryParams),s);break;case"preserve":f=this.currentUrlTree.queryParams;break;default:f=s||null}return null!==f&&(f=this.removeEmptyProps(f)),function EG(n,t,e,i,r){var s;if(0===e.length)return Sv(t.root,t.root,t.root,i,r);const a=function MG(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new DT(!0,0,n);let t=0,e=!1;const i=n.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const a={};return Hn(s.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,s]},[]);return new DT(e,t,i)}(e);return a.toRoot()?Sv(t.root,t.root,new Pt([],{}),i,r):function l(d){var f;const w=function xG(n,t,e,i){return n.isAbsolute?new kv(t.root,!0,0):-1===i?new kv(e,e===t.root,0):function SG(n,t,e){let i=n,r=t,s=e;for(;s>r;){if(s-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new kv(i,!1,r-s)}(e,i+(jh(n.commands[0])?0:1),n.numberOfDoubleDots)}(a,t,null===(f=n.snapshot)||void 0===f?void 0:f._urlSegment,d),k=w.processChildren?Uh(w.segmentGroup,w.index,a.commands):ET(w.segmentGroup,w.index,a.commands);return Sv(t.root,w.segmentGroup,k,i,r)}(null===(s=n.snapshot)||void 0===s?void 0:s._lastPathIndex)}(c,this.currentUrlTree,e,f,null!=d?d:null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=xo(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,"imperative",null,i)}navigate(e,i={skipLocationChange:!1}){return function OW(n){for(let t=0;t{const s=e[r];return null!=s&&(i[r]=s),i},{})}processNavigations(){this.navigations.subscribe(e=>{var i;this.navigated=!0,this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId,this.events.next(new Cc(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,null===(i=this.titleStrategy)||void 0===i||i.updateTitle(this.routerState.snapshot),e.resolve(!0)},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}scheduleNavigation(e,i,r,s,o){var a,l;if(this.disposed)return Promise.resolve(!1);let c,d,f;o?(c=o.resolve,d=o.reject,f=o.promise):f=new Promise((j,K)=>{c=j,d=K});const w=++this.navigationId;let k;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(r=this.location.getState()),k=r&&r.\u0275routerPageId?r.\u0275routerPageId:s.replaceUrl||s.skipLocationChange?null!==(a=this.browserPageId)&&void 0!==a?a:0:(null!==(l=this.browserPageId)&&void 0!==l?l:0)+1):k=0,this.setTransition({id:w,targetPageId:k,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:s,resolve:c,reject:d,promise:f,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),f.catch(j=>Promise.reject(j))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),s=Object.assign(Object.assign({},i.extras.state),this.generateNgRouterState(i.id,i.targetPageId));this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",s):this.location.go(r,"",s)}restoreHistory(e,i=!1){var r,s;if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(r=this.currentNavigation)||void 0===r?void 0:r.finalUrl)||0===o?this.currentUrlTree===(null===(s=this.currentNavigation)||void 0===s?void 0:s.finalUrl)&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(o)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(e,i){const r=new eT(e.id,this.serializeUrl(e.extractedUrl),i);this.triggerEvent(r),e.resolve(!1)}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return n.\u0275fac=function(e){bs()},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();function YT(n){return"imperative"!==n}let Qh=(()=>{class n{constructor(e,i,r){this.router=e,this.route=i,this.locationStrategy=r,this.commands=null,this.href=null,this.onChanges=new ue,this.subscription=e.events.subscribe(s=>{s instanceof Cc&&this.updateTargetUrlAndHref()})}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:null}ngOnChanges(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(e,i,r,s,o){if(0!==e||i||r||s||o||"string"==typeof this.target&&"_self"!=this.target||null===this.urlTree)return!0;const a={skipLocationChange:ts(this.skipLocationChange),replaceUrl:ts(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,a),!1}updateTargetUrlAndHref(){this.href=null!==this.urlTree?this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:ts(this.preserveFragment)})}}return n.\u0275fac=function(e){return new(e||n)(x(Ti),x(za),x(va))},n.\u0275dir=Ee({type:n,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,i){1&e&&Ge("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),2&e&&bt("target",i.target)("href",i.href,qf)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[cn]}),n})();class KT{buildTitle(t){var e;let i,r=t.root;for(;void 0!==r;)i=null!==(e=this.getResolvedTitleForRoute(r))&&void 0!==e?e:i,r=r.children.find(s=>s.outlet===Et);return i}getResolvedTitleForRoute(t){return t.data[Ov]}}let NW=(()=>{class n extends KT{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(e){return new(e||n)(te(IE))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class QT{}class ZT{preload(t,e){return tt(null)}}let XT=(()=>{class n{constructor(e,i,r,s,o){this.router=e,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(yn(e=>e instanceof Cc),Ca(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){var r,s,o;const a=[];for(const l of i){l.providers&&!l._injector&&(l._injector=Ld(l.providers,e,`Route: ${l.path}`));const c=null!==(r=l._injector)&&void 0!==r?r:e,d=null!==(s=l._loadedInjector)&&void 0!==s?s:c;l.loadChildren&&!l._loadedRoutes||l.loadComponent&&!l._loadedComponent?a.push(this.preloadConfig(c,l)):(l.children||l._loadedRoutes)&&a.push(this.processRoutes(d,null!==(o=l.children)&&void 0!==o?o:l._loadedRoutes))}return gn(a).pipe(To())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):tt(null);const s=r.pipe(Pn(o=>{var a;return null===o?tt(void 0):(i._loadedRoutes=o.routes,i._loadedInjector=o.injector,this.processRoutes(null!==(a=o.injector)&&void 0!==a?a:e,o.routes))}));return i.loadComponent&&!i._loadedComponent?gn([s,this.loader.loadComponent(i)]).pipe(To()):s})}}return n.\u0275fac=function(e){return new(e||n)(te(Ti),te(Am),te(Qs),te(QT),te(Lv))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})(),Bv=(()=>{class n{constructor(e,i,r={}){this.router=e,this.viewportScroller=i,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration=r.scrollPositionRestoration||"disabled",r.anchorScrolling=r.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof yv?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Cc&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof tT&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.router.triggerEvent(new tT(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(e){bs()},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();const So=new Ce("ROUTER_CONFIGURATION"),JT=new Ce("ROUTER_FORROOT_GUARD"),VW=[Nl,{provide:uT,useClass:hT},{provide:Ti,useFactory:function $W(n,t,e,i,r,s,o={},a,l,c,d){const f=new Ti(null,n,t,e,i,r,rT(s));return c&&(f.urlHandlingStrategy=c),d&&(f.routeReuseStrategy=d),f.titleStrategy=null!=l?l:a,function GW(n,t){n.errorHandler&&(t.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(t.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(t.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(t.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(t.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(t.urlUpdateStrategy=n.urlUpdateStrategy),n.canceledNavigationResolution&&(t.canceledNavigationResolution=n.canceledNavigationResolution)}(o,f),f},deps:[uT,Sc,Nl,Jt,Am,Fv,So,NW,[KT,new Nn],[class SW{},new Nn],[class EW{},new Nn]]},Sc,{provide:za,useFactory:function WW(n){return n.routerState.root},deps:[Ti]},XT,ZT,class BW{preload(t,e){return e().pipe(os(()=>tt(null)))}},{provide:So,useValue:{enableTracing:!1}},Lv];function HW(){return new DD("Router",Ti)}let eA=(()=>{class n{constructor(e,i){}static forRoot(e,i){return{ngModule:n,providers:[VW,tA(e),{provide:JT,useFactory:zW,deps:[[Ti,new Nn,new tr]]},{provide:So,useValue:i||{}},{provide:va,useFactory:UW,deps:[Ll,[new od(Um),new Nn],So]},{provide:Bv,useFactory:jW,deps:[Ti,vV,So]},{provide:QT,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:ZT},{provide:DD,multi:!0,useFactory:HW},[Vv,{provide:km,multi:!0,useFactory:qW,deps:[Vv]},{provide:nA,useFactory:YW,deps:[Vv]},{provide:_D,multi:!0,useExisting:nA}]]}}static forChild(e){return{ngModule:n,providers:[tA(e)]}}}return n.\u0275fac=function(e){return new(e||n)(te(JT,8),te(Ti,8))},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();function jW(n,t,e){return e.scrollOffset&&t.setOffset(e.scrollOffset),new Bv(n,t,e)}function UW(n,t,e={}){return e.useHash?new aB(n,t):new WD(n,t)}function zW(n){return"guarded"}function tA(n){return[{provide:VI,multi:!0,useValue:n},{provide:Fv,multi:!0,useValue:n}]}let Vv=(()=>{class n{constructor(e){this.injector=e,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new ue}appInitializer(){return this.injector.get(rB,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let i=null;const r=new Promise(a=>i=a),s=this.injector.get(Ti),o=this.injector.get(So);return"disabled"===o.initialNavigation?(s.setUpLocationChangeListener(),i(!0)):"enabledBlocking"===o.initialNavigation?(s.hooks.afterPreactivation=()=>this.initNavigation?tt(null):(this.initNavigation=!0,i(!0),this.resultOfPreactivationDone),s.initialNavigation()):i(!0),r})}bootstrapListener(e){const i=this.injector.get(So),r=this.injector.get(XT),s=this.injector.get(Bv),o=this.injector.get(Ti),a=this.injector.get(Ol);e===a.components[0]&&(("enabledNonBlocking"===i.initialNavigation||void 0===i.initialNavigation)&&o.initialNavigation(),r.setUpPreloading(),s.init(),o.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(e){return new(e||n)(te(Jt))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac}),n})();function qW(n){return n.appInitializer.bind(n)}function YW(n){return n.bootstrapListener.bind(n)}const nA=new Ce("Router Initializer");class QW{constructor(t){this.request=t}}let Or=(()=>{class n{constructor(){this.pages=[{page:"home",caption:"Home"}],this.apiLog=new Array,this.pipelineMap=new Map}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Fr_mqtt_port=59001,Fr_mqtt_path="/mqtt",Fr_mqtt_topic="incoming/data/edge-video-analytics/inference-event";class ZW{constructor(t,e,i){this.profile_token=t,this.pipeline_name=e,this.pipeline_version=i}}const Hv="X-CameraApp-Ignore",XW={headers:new Ui({"Content-Type":"application/json; charset=utf-8"})};let Zh=(()=>{class n{constructor(e,i){this.httpClient=e,this.data=i,this.camerasUrl="/api/v2/cameras"}makeCameraUrl(e,i){return`${this.camerasUrl}/${e}${i}`}makePipelineUrl(e,i){return this.makeCameraUrl(e,`/pipeline${i}`)}makeProfileUrl(e,i,r){return this.makeCameraUrl(e,`/profiles/${i}`)+r}makePresetUrl(e,i,r){return this.makeProfileUrl(e,i,"/presets/")+r}updateCameraList(){this.data.cameras=void 0,this.httpClient.get(this.camerasUrl).subscribe({next:e=>{this.data.cameras=e,e.length>0?(this.data.selectedCamera=e[0].name,this.updateProfiles(this.data.selectedCamera),this.refreshPipelineStatus(this.data.selectedCamera,!0)):this.data.selectedCamera=void 0},error:e=>{this.data.cameras=void 0}})}updateProfiles(e){this.data.selectedProfile=void 0,this.data.profiles=void 0,this.httpClient.get(this.makeCameraUrl(e,"/profiles")).subscribe({next:i=>{this.data.profiles=i.Profiles,this.data.selectedProfile=i.Profiles.length>0?i.Profiles[0].Token:void 0,this.updatePresets(e,this.data.selectedProfile)},error:i=>{this.data.selectedProfile=void 0,this.data.profiles=void 0}})}updatePresets(e,i){this.data.presets=void 0,this.httpClient.get(this.makeProfileUrl(e,i,"/presets")).subscribe({next:r=>{this.data.presets=r.Preset},error:r=>{this.data.presets=void 0}})}gotoPreset(e,i,r){return this.httpClient.post(this.makePresetUrl(e,i,r),"").subscribe()}startPipeline(e,i,r,s){let o=this.makePipelineUrl(e,"/start"),a=new ZW(i,r,s);this.httpClient.post(o,JSON.stringify(a),XW).subscribe(l=>{this.refreshPipelineStatus(this.data.selectedCamera,!0)})}stopPipeline(e){let i=this.makePipelineUrl(e,"/stop");this.httpClient.post(i,"").subscribe(r=>{this.refreshPipelineStatus(this.data.selectedCamera,!0)})}refreshPipelineStatus(e,i){let r=this.makePipelineUrl(e,"/status"),s={};i&&(s[Hv]="true"),this.httpClient.get(r,{headers:new Ui(s)}).subscribe({next:o=>{this.data.pipelineStatus=o},error:o=>{this.data.pipelineStatus=void 0}})}refreshAllPipelineStatuses(){this.httpClient.get("/api/v2/pipelines/status/all",{headers:new Ui({"X-CameraApp-Ignore":"true"})}).subscribe({next:r=>{if(null!=r){for(const s of this.data.pipelineMap.keys())r.hasOwnProperty(s)||(console.log("deleting key:",s),this.data.pipelineMap.delete(s));for(const[s,o]of Object.entries(r)){let a=this.data.pipelineMap.get(s);void 0===a?this.data.pipelineMap.set(s,o):(a.status=o.status,a.info=o.info)}}else this.data.pipelineMap.clear()},error:r=>{this.data.pipelineMap.clear()}})}updatePipelinesList(){this.data.pipelines=void 0,this.httpClient.get("/api/v2/pipelines").subscribe({next:e=>{this.data.pipelines=e.filter(i=>!!this.shouldShowPipeline(i)&&("object_detection/person_vehicle_bike"==`${i.name}/${i.version}`&&(this.data.selectedPipeline="object_detection/person_vehicle_bike"),!0))},error:e=>{this.data.pipelines=void 0}})}shouldShowPipeline(e){return"audio_detection"!==e.name&&"video_decode"!==e.name&&"app_src_dst"!==e.version&&"object_zone_count"!==e.version&&"object_line_crossing"!==e.version}}return n.\u0275fac=function(e){return new(e||n)(te(ec),te(Or))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var JW=ps(841),iA=ps(703);class tq extends ue{constructor(t=1/0,e=1/0,i=w_){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){const{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:s,_windowTime:o}=this;e||(i.push(t),!r&&i.push(s.now()+o)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();const e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,s=r.slice();for(let o=0;onew ue};function rA(n,t=iq){const{connector:e}=t;return Re((i,r)=>{const s=e();gn(n(function nq(n){return new J(t=>n.subscribe(t))}(s))).subscribe(r),r.add(i.subscribe(s))})}function sA(n,t){const e=dt(n)?n:()=>n;return dt(t)?rA(t,{connector:e}):i=>new gv(i,e)}var Bs=(()=>{return(n=Bs||(Bs={}))[n.CLOSED=0]="CLOSED",n[n.CONNECTING=1]="CONNECTING",n[n.CONNECTED=2]="CONNECTED",Bs;var n})();const jv=new Ce("NgxMqttServiceConfig"),Uv=new Ce("NgxMqttClientService");let oq=(()=>{class n{static forRoot(e,i){return{ngModule:n,providers:[{provide:jv,useValue:e},{provide:Uv,useValue:i}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})(),aq=(()=>{class n{constructor(e,i){this.options=e,this.client=i,this.observables={},this.state=new fi(Bs.CLOSED),this.messages=new ue,this._clientId=this._generateClientId(),this._connectTimeout=1e4,this._reconnectPeriod=1e4,this._url=void 0,this._onConnect=new je,this._onReconnect=new je,this._onClose=new je,this._onOffline=new je,this._onError=new je,this._onEnd=new je,this._onMessage=new je,this._onSuback=new je,this._onPacketsend=new je,this._onPacketreceive=new je,this._handleOnConnect=r=>{!0===this.options.connectOnCreate&&Object.keys(this.observables).forEach(s=>{this.client.subscribe(s)}),this.state.next(Bs.CONNECTED),this._onConnect.emit(r)},this._handleOnReconnect=()=>{!0===this.options.connectOnCreate&&Object.keys(this.observables).forEach(r=>{this.client.subscribe(r)}),this.state.next(Bs.CONNECTING),this._onReconnect.emit()},this._handleOnClose=()=>{this.state.next(Bs.CLOSED),this._onClose.emit()},this._handleOnOffline=()=>{this._onOffline.emit()},this._handleOnError=r=>{this._onError.emit(r),console.error(r)},this._handleOnEnd=()=>{this._onEnd.emit()},this._handleOnMessage=(r,s,o)=>{this._onMessage.emit(o),"publish"===o.cmd&&this.messages.next(o)},this._handleOnPacketsend=r=>{this._onPacketsend.emit()},this._handleOnPacketreceive=r=>{this._onPacketreceive.emit()},!1!==e.connectOnCreate&&this.connect({},i),this.state.subscribe()}get clientId(){return this._clientId}get onConnect(){return this._onConnect}get onReconnect(){return this._onReconnect}get onClose(){return this._onClose}get onOffline(){return this._onOffline}get onError(){return this._onError}get onEnd(){return this._onEnd}get onMessage(){return this._onMessage}get onPacketsend(){return this._onPacketsend}get onPacketreceive(){return this._onPacketreceive}get onSuback(){return this._onSuback}static filterMatchesTopic(e,i){if("#"===e[0]&&"$"===i[0])return!1;const r=(e||"").split("/").reverse(),s=(i||"").split("/").reverse(),o=()=>{const a=r.pop(),l=s.pop();switch(a){case"#":return!0;case"+":return!!l&&o();default:return a===l&&(void 0===a||o())}};return o()}connect(e,i){const r=iA(this.options||{},e),s=r.protocol||"ws",o=r.hostname||"localhost";r.url?this._url=r.url:(this._url=`${s}://${o}`,this._url+=r.port?`:${r.port}`:"",this._url+=r.path?`${r.path}`:""),this.state.next(Bs.CONNECTING);const a=iA({clientId:this._clientId,reconnectPeriod:this._reconnectPeriod,connectTimeout:this._connectTimeout},r);this.client&&this.client.end(!0),this.client=i||(0,JW.connect)(this._url,a),this._clientId=a.clientId,this.client.on("connect",this._handleOnConnect),this.client.on("reconnect",this._handleOnReconnect),this.client.on("close",this._handleOnClose),this.client.on("offline",this._handleOnOffline),this.client.on("error",this._handleOnError),this.client.stream.on("error",this._handleOnError),this.client.on("end",this._handleOnEnd),this.client.on("message",this._handleOnMessage),this.client.on("packetsend",this._handleOnPacketsend),this.client.on("packetreceive",this._handleOnPacketreceive)}disconnect(e=!0){if(!this.client)throw new Error("mqtt client not connected");this.client.end(e)}observeRetained(e,i={qos:1}){return this._generalObserve(e,()=>function rq(n,t,e,i){e&&!dt(e)&&(i=e);const r=dt(e)?e:void 0;return s=>sA(new tq(n,t,i),r)(s)}(1),i)}observe(e,i={qos:1}){return this._generalObserve(e,()=>function sq(n){return n?t=>rA(n)(t):t=>sA(new ue)(t)}(),i)}_generalObserve(e,i,r){if(!this.client)throw new Error("mqtt client not connected");if(!this.observables[e]){const s=new ue;this.observables[e]=function eq(n,t){return new J(e=>{const i=n(),r=t(i);return(r?li(r):Ri).subscribe(e),()=>{i&&i.unsubscribe()}})}(()=>{const o=new X;return this.client.subscribe(e,r,(a,l)=>{l&&l.forEach(c=>{128===c.qos&&(delete this.observables[c.topic],this.client.unsubscribe(c.topic),s.error(`subscription for '${c.topic}' rejected!`)),this._onSuback.emit({filter:e,granted:128!==c.qos})})}),o.add(()=>{delete this.observables[e],this.client.unsubscribe(e)}),o},o=>Un(s,this.messages)).pipe(yn(o=>n.filterMatchesTopic(e,o.topic)),i(),Oh())}return this.observables[e]}publish(e,i,r={}){if(!this.client)throw new Error("mqtt client not connected");return J.create(s=>{this.client.publish(e,i,r,o=>{o?s.error(o):(s.next(null),s.complete())})})}unsafePublish(e,i,r={}){if(!this.client)throw new Error("mqtt client not connected");this.client.publish(e,i,r,s=>{if(s)throw s})}_generateClientId(){return"client-"+Math.random().toString(36).substr(2,19)}}return n.\u0275fac=function(e){return new(e||n)(te(jv),te(Uv))},n.\u0275prov=Ae({factory:function(){return new n(te(jv),te(Uv))},token:n,providedIn:"root"}),n})(),zv=(()=>{class n{constructor(e){this._mqttService=e,this.paused=!0,this.eventCount=0}isPaused(){return this.paused}pause(){this.paused||(this.paused=!0,this.unsubscribe())}resume(){this.paused&&(this.paused=!1,this.subscribe())}unsubscribe(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}subscribe(){this.subscription=this._mqttService.observe(Fr_mqtt_topic).subscribe(e=>{this.lastEvent=JSON.parse(e.payload.toString()),this.eventCount++})}}return n.\u0275fac=function(e){return new(e||n)(te(aq))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),lq=(()=>{class n{constructor(e,i){this.httpClient=e,this.data=i}makePtzUrl(e,i,r){return`/api/v2/cameras/${e}/profiles/${i}/ptz${r}`}post(e,i,r){let s=this.makePtzUrl(e,i,r);return this.httpClient.post(s,"").subscribe()}downLeft(e,i){return this.post(e,i,"/down-left")}down(e,i){return this.post(e,i,"/down")}downRight(e,i){return this.post(e,i,"/down-right")}upLeft(e,i){return this.post(e,i,"/up-left")}up(e,i){return this.post(e,i,"/up")}upRight(e,i){return this.post(e,i,"/up-right")}left(e,i){return this.post(e,i,"/left")}right(e,i){return this.post(e,i,"/right")}home(e,i){return this.post(e,i,"/home")}zoomIn(e,i){return this.post(e,i,"/zoom-in")}zoomOut(e,i){return this.post(e,i,"/zoom-out")}}return n.\u0275fac=function(e){return new(e||n)(te(ec),te(Or))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function cq(n,t){if(1&n){const e=wr();_e(0,"button",6),Ge("click",function(){const s=Ji(e).$implicit,o=Ct(2);return er(o.api.gotoPreset(o.data.selectedCamera,o.data.selectedProfile,s.Token))}),We(1),De()}if(2&n){const e=t.$implicit;xe(1),Bn(" ",void 0===e.Name||""===e.Name?e.Token:e.Name," ")}}function dq(n,t){if(1&n&&(_e(0,"div",4),at(1,cq,2,1,"button",5),De()),2&n){const e=Ct();xe(1),Oe("ngForOf",e.data.presets)}}let uq=(()=>{class n{constructor(e,i,r){this.data=e,this.ptz=i,this.api=r}ngOnInit(){}ngOnDestroy(){}isPtzDisabled(){return void 0===this.data.selectedCamera||void 0===this.data.selectedProfile}isZoomDisabled(){return!0}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(lq),x(Zh))},n.\u0275cmp=_t({type:n,selectors:[["app-ptz"]],decls:37,vars:12,consts:[["mat-icon-button","",3,"disabled","click"],["mat-icon-button","",3,"disabled"],[1,"center-button"],["class","goto-presets",4,"ngIf"],[1,"goto-presets"],["mat-raised-button","","class","preset-button","color","primary",3,"click",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary",1,"preset-button",3,"click"]],template:function(e,i){1&e&&(_e(0,"div")(1,"button",0),Ge("click",function(){return i.ptz.upLeft(i.data.selectedCamera,i.data.selectedProfile)}),_e(2,"mat-icon"),We(3,"north_west"),De()(),_e(4,"button",0),Ge("click",function(){return i.ptz.up(i.data.selectedCamera,i.data.selectedProfile)}),_e(5,"mat-icon"),We(6,"north"),De()(),_e(7,"button",0),Ge("click",function(){return i.ptz.upRight(i.data.selectedCamera,i.data.selectedProfile)}),_e(8,"mat-icon"),We(9,"north_east"),De()(),_e(10,"button",0),Ge("click",function(){return i.ptz.zoomIn(i.data.selectedCamera,i.data.selectedProfile)}),_e(11,"mat-icon"),We(12,"zoom_in"),De()()(),_e(13,"div")(14,"button",0),Ge("click",function(){return i.ptz.left(i.data.selectedCamera,i.data.selectedProfile)}),_e(15,"mat-icon"),We(16,"west"),De()(),_e(17,"button",1)(18,"mat-icon",2),We(19,"circle"),De()(),_e(20,"button",0),Ge("click",function(){return i.ptz.right(i.data.selectedCamera,i.data.selectedProfile)}),_e(21,"mat-icon"),We(22,"east"),De()(),_e(23,"button",0),Ge("click",function(){return i.ptz.zoomOut(i.data.selectedCamera,i.data.selectedProfile)}),_e(24,"mat-icon"),We(25,"zoom_out"),De()()(),_e(26,"div")(27,"button",0),Ge("click",function(){return i.ptz.downLeft(i.data.selectedCamera,i.data.selectedProfile)}),_e(28,"mat-icon"),We(29,"south_west"),De()(),_e(30,"button",0),Ge("click",function(){return i.ptz.down(i.data.selectedCamera,i.data.selectedProfile)}),_e(31,"mat-icon"),We(32,"south"),De()(),_e(33,"button",0),Ge("click",function(){return i.ptz.downRight(i.data.selectedCamera,i.data.selectedProfile)}),_e(34,"mat-icon"),We(35,"south_east"),De()()(),at(36,dq,2,1,"div",3)),2&e&&(xe(1),Oe("disabled",i.isPtzDisabled()),xe(3),Oe("disabled",i.isPtzDisabled()),xe(3),Oe("disabled",i.isPtzDisabled()),xe(3),Oe("disabled",i.isZoomDisabled()),xe(4),Oe("disabled",i.isPtzDisabled()),xe(3),Oe("disabled",!0),xe(3),Oe("disabled",i.isPtzDisabled()),xe(3),Oe("disabled",i.isZoomDisabled()),xe(4),Oe("disabled",i.isPtzDisabled()),xe(3),Oe("disabled",i.isPtzDisabled()),xe(3),Oe("disabled",i.isPtzDisabled()),xe(3),Oe("ngIf",null!=i.data.presets&&i.data.presets.length>0))},dependencies:[ao,lr,Ta,Ch],styles:[".mat-icon-button[_ngcontent-%COMP%]{width:auto;height:auto;margin:5px}.material-icons[_ngcontent-%COMP%]{zoom:2}.preset-button[_ngcontent-%COMP%]{margin:10px}.center-button[_ngcontent-%COMP%]{color:transparent;background-color:transparent}"]}),n})(),hq=0;const $v=new Ce("CdkAccordion");let fq=(()=>{class n{constructor(){this._stateChanges=new ue,this._openCloseAllActions=new ue,this.id="cdk-accordion-"+hq++,this._multi=!1}get multi(){return this._multi}set multi(e){this._multi=it(e)}openAll(){this._multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[Xe([{provide:$v,useExisting:n}]),cn]}),n})(),pq=0,mq=(()=>{class n{constructor(e,i,r){this.accordion=e,this._changeDetectorRef=i,this._expansionDispatcher=r,this._openCloseAllSubscription=X.EMPTY,this.closed=new je,this.opened=new je,this.destroyed=new je,this.expandedChange=new je,this.id="cdk-accordion-child-"+pq++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((s,o)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===o&&this.id!==s&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}get expanded(){return this._expanded}set expanded(e){e=it(e),this._expanded!==e&&(this._expanded=e,this.expandedChange.emit(e),e?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){this._disabled=it(e)}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}}return n.\u0275fac=function(e){return new(e||n)(x($v,12),x(en),x(W_))},n.\u0275dir=Ee({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Xe([{provide:$v,useValue:void 0}])]}),n})(),gq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({}),n})();const _q=["body"];function vq(n,t){}const yq=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],bq=["mat-expansion-panel-header","*","mat-action-row"];function wq(n,t){1&n&&xt(0,"span",2),2&n&&Oe("@indicatorRotate",Ct()._getExpandedState())}const Cq=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Dq=["mat-panel-title","mat-panel-description","*"],Gv=new Ce("MAT_ACCORDION"),oA="225ms cubic-bezier(0.4,0.0,0.2,1)",aA={indicatorRotate:Vn("indicatorRotate",[zt("collapsed, void",Qe({transform:"rotate(0deg)"})),zt("expanded",Qe({transform:"rotate(180deg)"})),Wt("expanded <=> collapsed, void => collapsed",Zt(oA))]),bodyExpansion:Vn("bodyExpansion",[zt("collapsed, void",Qe({height:"0px",visibility:"hidden"})),zt("expanded",Qe({height:"*",visibility:"visible"})),Wt("expanded <=> collapsed, void => collapsed",Zt(oA))])},lA=new Ce("MAT_EXPANSION_PANEL");let Eq=(()=>{class n{constructor(e,i){this._template=e,this._expansionPanel=i}}return n.\u0275fac=function(e){return new(e||n)(x(_n),x(lA,8))},n.\u0275dir=Ee({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]}),n})(),Mq=0;const cA=new Ce("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let Wv=(()=>{class n extends mq{constructor(e,i,r,s,o,a,l){super(e,i,r),this._viewContainerRef=s,this._animationMode=a,this._hideToggle=!1,this.afterExpand=new je,this.afterCollapse=new je,this._inputChanges=new ue,this._headerId="mat-expansion-panel-header-"+Mq++,this._bodyAnimationDone=new ue,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe(M_((c,d)=>c.fromState===d.fromState&&c.toState===d.toState)).subscribe(c=>{"void"!==c.fromState&&("expanded"===c.toState?this.afterExpand.emit():"collapsed"===c.toState&&this.afterCollapse.emit())}),l&&(this.hideToggle=l.hideToggle)}get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=it(e)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Yn(null),yn(()=>this.expanded&&!this._portal),sn(1)).subscribe(()=>{this._portal=new fc(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const e=this._document.activeElement,i=this._body.nativeElement;return e===i||i.contains(e)}return!1}}return n.\u0275fac=function(e){return new(e||n)(x(Gv,12),x(en),x(W_),x(An),x(lt),x(fn,8),x(cA,8))},n.\u0275cmp=_t({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(e,i,r){if(1&e&&It(r,Eq,5),2&e){let s;ze(s=$e())&&(i._lazyContent=s.first)}},viewQuery:function(e,i){if(1&e&&Gt(_q,5),2&e){let r;ze(r=$e())&&(i._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,i){2&e&&At("mat-expanded",i.expanded)("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[Xe([{provide:Gv,useValue:void 0},{provide:lA,useExisting:n}]),Le,cn],ngContentSelectors:bq,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(e,i){1&e&&(Fn(yq),Tt(0),_e(1,"div",0,1),Ge("@bodyExpansion.done",function(s){return i._bodyAnimationDone.next(s)}),_e(3,"div",2),Tt(4,1),at(5,vq,0,0,"ng-template",3),De(),Tt(6,2),De()),2&e&&(xe(1),Oe("@bodyExpansion",i._getExpandedState())("id",i.id),bt("aria-labelledby",i._headerId),xe(4),Oe("cdkPortalOutlet",i._portal))},dependencies:[Ia],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[aA.bodyExpansion]},changeDetection:0}),n})();class xq{}const Sq=yo(xq);let qv=(()=>{class n extends Sq{constructor(e,i,r,s,o,a,l){super(),this.panel=e,this._element=i,this._focusMonitor=r,this._changeDetectorRef=s,this._animationMode=a,this._parentChangeSubscription=X.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(yn(d=>!(!d.hideToggle&&!d.togglePosition))):Ri;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Un(e.opened,e.closed,c,e._inputChanges.pipe(yn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(yn(()=>e._containsFocus())).subscribe(()=>r.focusVia(i,"program")),o&&(this.expandedHeight=o.expandedHeight,this.collapsedHeight=o.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:pi(e)||(e.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e))}}focus(e,i){e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return n.\u0275fac=function(e){return new(e||n)(x(Wv,1),x(Je),x(ur),x(en),x(cA,8),x(fn,8),ti("tabindex"))},n.\u0275cmp=_t({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&Ge("click",function(){return i._toggle()})("keydown",function(s){return i._keydown(s)}),2&e&&(bt("id",i.panel._headerId)("tabindex",i.tabIndex)("aria-controls",i._getPanelId())("aria-expanded",i._isExpanded())("aria-disabled",i.panel.disabled),Ni("height",i._getHeaderHeight()),At("mat-expanded",i._isExpanded())("mat-expansion-toggle-indicator-after","after"===i._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===i._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{tabIndex:"tabIndex",expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},features:[Le],ngContentSelectors:Dq,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,i){1&e&&(Fn(Cq),_e(0,"span",0),Tt(1),Tt(2,1),Tt(3,2),De(),at(4,wq,1,1,"span",1)),2&e&&(xe(4),Oe("ngIf",i._showToggle()))},dependencies:[lr],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-program-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled=true])::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;border:3px solid;border-radius:4px;content:""}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[aA.indicatorRotate]},changeDetection:0}),n})(),dA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),n})(),uA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Ee({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),n})(),hA=(()=>{class n extends fq{constructor(){super(...arguments),this._ownHeaders=new pa,this._hideToggle=!1,this.displayMode="default",this.togglePosition="after"}get hideToggle(){return this._hideToggle}set hideToggle(e){this._hideToggle=it(e)}ngAfterContentInit(){this._headers.changes.pipe(Yn(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(i=>i.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new Gu(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(e){this._keyManager.onKeydown(e)}_handleHeaderFocus(e){this._keyManager.updateActiveItem(e)}ngOnDestroy(){super.ngOnDestroy(),this._ownHeaders.destroy()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Mt(n)))(i||n)}}(),n.\u0275dir=Ee({type:n,selectors:[["mat-accordion"]],contentQueries:function(e,i,r){if(1&e&&It(r,qv,5),2&e){let s;ze(s=$e())&&(i._headers=s)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(e,i){2&e&&At("mat-accordion-multi",i.multi)},inputs:{multi:"multi",hideToggle:"hideToggle",displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],features:[Xe([{provide:Gv,useExisting:n}]),Le]}),n})(),kq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[hi,ut,gq,Os]}),n})();function Tq(n,t){if(1&n&&(_e(0,"mat-chip-list",5)(1,"mat-chip",6),We(2),De()()),2&n){const e=Ct().$implicit;xe(1),Oe("ngClass",e.response.ok?"ok-chip":"bad-chip"),xe(1),Td("",e.response.status,": ",e.response.statusText,"")}}function Aq(n,t){if(1&n&&(_e(0,"pre"),We(1),Jr(2,"json"),De()),2&n){const e=Ct().$implicit;xe(1),qn(so(2,1,e.response.body))}}function Iq(n,t){if(1&n&&(_e(0,"pre"),We(1),Jr(2,"json"),De()),2&n){const e=Ct().$implicit;xe(1),qn(so(2,1,e.response.error))}}function Rq(n,t){if(1&n&&(_e(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-chip-list",1)(4,"mat-chip",2),We(5),De()()(),_e(6,"mat-panel-description")(7,"span"),We(8),De()(),at(9,Tq,3,3,"mat-chip-list",3),De(),at(10,Aq,3,3,"pre",4),at(11,Iq,3,3,"pre",4),De()),2&n){const e=t.$implicit;xe(4),Oe("ngClass","GET"===e.request.method?"request-get":"POST"===e.request.method?"request-post":""),xe(1),qn(e.request.method),xe(3),qn(e.request.url),xe(1),Oe("ngIf",void 0!==e.response),xe(1),Oe("ngIf",void 0!==e.response&&void 0!==e.response.body),xe(1),Oe("ngIf",void 0!==e.response&&void 0!==e.response.error)}}let Pq=(()=>{class n{constructor(e){this.data=e}ngOnInit(){}ngOnDestroy(){}}return n.\u0275fac=function(e){return new(e||n)(x(Or))},n.\u0275cmp=_t({type:n,selectors:[["app-api-log"]],decls:2,vars:1,consts:[[4,"ngFor","ngForOf"],["selectable","false"],[1,"request-method",3,"ngClass"],["class","response-chips","selectable","false",4,"ngIf"],[4,"ngIf"],["selectable","false",1,"response-chips"],[3,"ngClass"]],template:function(e,i){1&e&&(_e(0,"mat-accordion"),at(1,Rq,12,6,"mat-expansion-panel",0),De()),2&e&&(xe(1),Oe("ngForOf",i.data.apiLog))},dependencies:[Xm,ao,lr,ch,Aa,hA,Wv,qv,uA,dA,iu],styles:[".mat-expansion-panel-header-title[_ngcontent-%COMP%]{flex-grow:0}.mat-expansion-panel-header-description[_ngcontent-%COMP%]{text-align:left}.response-chips[_ngcontent-%COMP%]{margin-right:20px;flex:none}.request-method[_ngcontent-%COMP%]{width:60px;margin-right:10px;flex:none}.request-post[_ngcontent-%COMP%]{background-color:#0288d1;color:#fff}.request-get[_ngcontent-%COMP%]{background-color:#00838f;color:#fff;flex:none}.ok-chip[_ngcontent-%COMP%]{background-color:#09af00;color:#fff}.bad-chip[_ngcontent-%COMP%]{background-color:#c62828;color:#fff}pre[_ngcontent-%COMP%]{overflow-x:auto}"]}),n})();function Oq(n,t){if(1&n&&(_e(0,"mat-chip")(1,"mat-icon"),We(2),De(),_e(3,"span"),We(4),Jr(5,"number"),De()()),2&n){const e=t.$implicit,i=Ct(2);xe(2),Bn(" ",i.labelToIcon(e.detection.label)," "),xe(2),Bn("",gm(5,2,100*e.detection.confidence,"2.0-0"),"%")}}function Fq(n,t){if(1&n&&(_e(0,"div")(1,"h3"),We(2),De(),_e(3,"div")(4,"mat-chip-list",1),at(5,Oq,6,5,"mat-chip",2),De()(),_e(6,"pre"),We(7),Jr(8,"json"),De()()),2&n){const e=Ct();xe(2),Bn("",e.eventService.eventCount," Total Events"),xe(3),Oe("ngForOf",e.eventService.lastEvent.objects),xe(2),qn(so(8,3,e.eventService.lastEvent))}}let Lq=(()=>{class n{constructor(e,i){this.data=e,this.eventService=i}ngOnInit(){}ngOnDestroy(){}labelToIcon(e){switch(e){case"vehicle":return"directions_car";case"bicycle":return"pedal_bike";default:return e}}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(zv))},n.\u0275cmp=_t({type:n,selectors:[["app-inference-events"]],decls:1,vars:1,consts:[[4,"ngIf"],["selectable","false"],[4,"ngFor","ngForOf"]],template:function(e,i){1&e&&at(0,Fq,9,5,"div",0),2&e&&Oe("ngIf",void 0!==i.eventService.lastEvent)},dependencies:[ao,lr,ch,Aa,Ch,iu,eg]}),n})();function Nq(n,t){if(1&n&&(_e(0,"mat-option",5),We(1),De()),2&n){const e=t.$implicit;xd("value",e.name),xe(1),qn(e.name)}}function Bq(n,t){if(1&n&&(_e(0,"mat-option",5),We(1),De()),2&n){const e=t.$implicit;xd("value",e.Token),xe(1),im("",e.Token," (",e.VideoEncoderConfiguration.Resolution.Width,"x",e.VideoEncoderConfiguration.Resolution.Height," ",e.VideoEncoderConfiguration.Encoding," @ ",e.VideoEncoderConfiguration.RateControl.FrameRateLimit," fps)")}}function Vq(n,t){if(1&n&&(_e(0,"mat-option",5),We(1),De()),2&n){const e=t.$implicit;em("value","",e.name,"/",e.version,""),xe(1),Td(" ",e.name," - ",e.version," ")}}let Hq=(()=>{class n{constructor(e,i,r){this.data=e,this.api=i,this.eventService=r}ngOnInit(){this.api.updateCameraList(),this.api.updatePipelinesList()}ngOnDestroy(){}cameraSelectionChanged(e){this.api.updateProfiles(e),this.api.refreshPipelineStatus(e,!0)}profileSelectionChanged(e){this.api.updatePresets(this.data.selectedCamera,e)}startPipeline(){let e=this.data.selectedPipeline.split("/");this.api.startPipeline(this.data.selectedCamera,this.data.selectedProfile,e[0],e[1])}shouldDisablePipeline(){return null==this.data.selectedCamera||null==this.data.selectedProfile||this.data.pipelineMap[this.data.selectedCamera]&&"RUNNING"==this.data.pipelineMap[this.data.selectedCamera].status.state}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(Zh),x(zv))},n.\u0275cmp=_t({type:n,selectors:[["app-camera-selector"]],decls:19,vars:7,consts:[["appearance","fill"],[3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["appearance","fill",1,"pipeline-picker"],["mat-raised-button","",1,"start-button",3,"disabled","click"],[3,"value"]],template:function(e,i){1&e&&(_e(0,"mat-form-field",0)(1,"mat-label"),We(2,"Select a camera"),De(),_e(3,"mat-select",1),Ge("valueChange",function(s){return i.data.selectedCamera=s})("valueChange",function(s){return i.cameraSelectionChanged(s)}),at(4,Nq,2,2,"mat-option",2),De()(),xt(5,"br"),_e(6,"mat-form-field",0)(7,"mat-label"),We(8,"Select a video stream"),De(),_e(9,"mat-select",1),Ge("valueChange",function(s){return i.data.selectedProfile=s})("valueChange",function(s){return i.profileSelectionChanged(s)}),at(10,Bq,2,6,"mat-option",2),De()(),xt(11,"br"),_e(12,"mat-form-field",3)(13,"mat-label"),We(14,"Select a pipeline"),De(),_e(15,"mat-select",1),Ge("valueChange",function(s){return i.data.selectedPipeline=s}),at(16,Vq,2,4,"mat-option",2),De()(),_e(17,"button",4),Ge("click",function(){return i.startPipeline()}),We(18," Start Pipeline\n"),De()),2&e&&(xe(3),Oe("value",i.data.selectedCamera),xe(1),Oe("ngForOf",i.data.cameras),xe(5),Oe("value",i.data.selectedProfile),xe(1),Oe("ngForOf",i.data.profiles),xe(5),Oe("value",i.data.selectedPipeline),xe(1),Oe("ngForOf",i.data.pipelines),xe(1),Oe("disabled",i.shouldDisablePipeline()))},dependencies:[ao,Ta,u8,q_,k5,PS],styles:["button[_ngcontent-%COMP%]{width:auto;height:auto}.material-icons[_ngcontent-%COMP%]{zoom:2}mat-form-field[_ngcontent-%COMP%]{width:600px}.pipeline-picker[_ngcontent-%COMP%]{width:471px}.start-button[_ngcontent-%COMP%]{margin-left:10px;vertical-align:top;margin-top:10px}.start-button[_ngcontent-%COMP%]:enabled{background-color:#09af00;color:#fff}"]}),n})();function jq(n,t){if(1&n&&(_e(0,"mat-chip"),We(1),Jr(2,"number"),De()),2&n){const e=Ct().$implicit;xe(1),Bn(" ",gm(2,1,e.value.status.avg_fps,"2.0-0")," FPS ")}}function Uq(n,t){if(1&n){const e=wr();_e(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-chip-list",1)(4,"mat-chip"),We(5),De()()(),_e(6,"mat-panel-description")(7,"span"),We(8),De()(),_e(9,"mat-chip-list",1)(10,"mat-chip"),We(11),De(),at(12,jq,3,4,"mat-chip",2),_e(13,"button",3),Ge("click",function(){const s=Ji(e).$implicit;return er(Ct().api.stopPipeline(s.key))}),_e(14,"mat-icon"),We(15,"stop"),De()()()(),_e(16,"pre"),We(17),Jr(18,"json"),De()()}if(2&n){const e=t.$implicit;xe(5),Bn(" Pipeline ",e.value.info.id," "),xe(3),nm("",e.key," - ",e.value.info.name,"/",e.value.info.version,""),xe(2),rm("state-",e.value.status.state,""),xe(1),Bn(" ",e.value.status.state," "),xe(1),Oe("ngIf","RUNNING"===e.value.status.state),xe(5),qn(so(18,10,e.value))}}let zq=(()=>{class n{constructor(e,i,r){this.data=e,this.api=i,this.ref=r}ngOnInit(){}ngOnDestroy(){}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(Zh),x(en))},n.\u0275cmp=_t({type:n,selectors:[["app-all-pipelines"]],decls:3,vars:3,consts:[[4,"ngFor","ngForOf"],["selectable","false"],[4,"ngIf"],["mat-icon-button","","color","warn",1,"stop-button",3,"click"]],template:function(e,i){1&e&&(_e(0,"mat-accordion"),at(1,Uq,19,12,"mat-expansion-panel",0),Jr(2,"keyvalue"),De()),2&e&&(xe(1),Oe("ngForOf",so(2,1,i.data.pipelineMap)))},dependencies:[ao,lr,Ta,ch,Aa,Ch,hA,Wv,qv,uA,dA,iu,eg,dE],styles:[".state-RUNNING[_ngcontent-%COMP%]{background-color:#09af00;color:#fff}.state-QUEUED[_ngcontent-%COMP%]{background-color:#00838f;color:#fff}.state-ERROR[_ngcontent-%COMP%]{background-color:#c62828;color:#fff}button[_ngcontent-%COMP%]{width:auto;height:auto}.stop-button[_ngcontent-%COMP%]{margin-right:10px}"]}),n})();function $q(n,t){1&n&&(_e(0,"mat-card")(1,"mat-card-title"),We(2,"Running Pipelines"),De(),_e(3,"mat-card-content"),xt(4,"app-all-pipelines"),De()())}function Gq(n,t){if(1&n){const e=wr();_e(0,"button",5),Ge("click",function(){return Ji(e),er(Ct().eventService.pause())}),We(1,"Pause Events "),De()}}function Wq(n,t){if(1&n){const e=wr();_e(0,"button",6),Ge("click",function(){return Ji(e),er(Ct().eventService.resume())}),We(1,"Stream Events "),De()}}const qq=[{path:"",redirectTo:"home",pathMatch:"full"},{path:"home",component:(()=>{class n{constructor(e,i,r){this.data=e,this.api=i,this.eventService=r,this.data.currentPage="home"}ngOnInit(){this.interval=setInterval(()=>{this.api.refreshAllPipelineStatuses()},1e3)}ngOnDestroy(){clearInterval(this.interval)}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(Zh),x(zv))},n.\u0275cmp=_t({type:n,selectors:[["app-home"]],decls:29,vars:3,consts:[[1,"jumbotron","bg-image-home"],[1,"text-justify"],[4,"ngIf"],["mat-button","","class","pause-events",3,"click",4,"ngIf"],["mat-button","","class","stream-events",3,"click",4,"ngIf"],["mat-button","",1,"pause-events",3,"click"],["mat-button","",1,"stream-events",3,"click"]],template:function(e,i){1&e&&(_e(0,"mat-grid-tile-header")(1,"div",0)(2,"h1"),We(3,"Camera Management"),De(),_e(4,"p",1),We(5," This is the landing page for the Camera Management Reference Implementation. "),De()(),_e(6,"mat-card")(7,"mat-card-title"),We(8,"Camera Position"),De(),_e(9,"mat-card-content"),xt(10,"app-ptz"),De()(),_e(11,"mat-card")(12,"mat-card-title"),We(13,"Camera"),De(),_e(14,"mat-card-content"),xt(15,"app-camera-selector"),De()(),at(16,$q,5,0,"mat-card",2),_e(17,"mat-card")(18,"mat-card-title"),We(19,"API Log"),De(),_e(20,"mat-card-content"),xt(21,"app-api-log"),De()(),_e(22,"mat-card")(23,"mat-card-title"),We(24," Inference Events "),at(25,Gq,2,0,"button",3),at(26,Wq,2,0,"button",4),De(),_e(27,"mat-card-content"),xt(28,"app-inference-events"),De()()()),2&e&&(xe(16),Oe("ngIf",null!=i.data.pipelineMap&&i.data.pipelineMap.size>0),xe(9),Oe("ngIf",!i.eventService.isPaused()),xe(1),Oe("ngIf",i.eventService.isPaused()))},dependencies:[lr,Ta,Mz,Dz,Ez,R$,P$,uq,Pq,Lq,Hq,zq],styles:[".material-icons[_ngcontent-%COMP%]{font-size:32px;zoom:2}.pause-events[_ngcontent-%COMP%]{margin-left:10px;background-color:#ffbd3a}.stream-events[_ngcontent-%COMP%]{margin-left:10px;background-color:#188729;color:#fff}"]}),n})(),pathMatch:"full"},{path:"**",redirectTo:"home"}];let Yq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n}),n.\u0275inj=qe({imports:[eA.forRoot(qq,{scrollPositionRestoration:"enabled"}),eA]}),n})();function Kq(n,t){if(1&n){const e=wr();_e(0,"a",6),Ge("click",function(){const s=Ji(e).$implicit;return er(Ct().data.currentPage=s.page)}),We(1),Jr(2,"uppercase"),De()}if(2&n){const e=t.$implicit;Oe("active",Ct().data.currentPage==e.page)("routerLink",e.page),xe(1),Bn(" ",so(2,3,e.caption)," ")}}let Qq=(()=>{class n{constructor(e,i){this.data=e,this.bo=i,this.title="Camera Management UI",this.navbarCollapseShow=!1,i.observe("(prefers-color-scheme: dark)").subscribe(r=>{this.useDarkTheme=r.matches})}get useDarkTheme(){return this.darkTheme}set useDarkTheme(e){this.darkTheme=e,e?document.body.classList.add("dark-theme"):document.body.classList.remove("dark-theme")}}return n.\u0275fac=function(e){return new(e||n)(x(Or),x(pv))},n.\u0275cmp=_t({type:n,selectors:[["app-root"]],decls:8,vars:3,consts:[["mat-tab-nav-bar","","backgroundColor","primary",1,"mat-elevation-z8"],["routerLink","home",1,"mat-tab-link",3,"click"],["mat-icon-button","","type","button",3,"title","click"],["role","img","aria-hidden","true"],["mat-tab-link","",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","main"],["mat-tab-link","",3,"active","routerLink","click"]],template:function(e,i){1&e&&(_e(0,"nav",0)(1,"a",1),Ge("click",function(){return i.data.currentPage="home"}),De(),_e(2,"button",2),Ge("click",function(){return i.useDarkTheme=!i.useDarkTheme}),_e(3,"mat-icon",3),We(4),De()(),at(5,Kq,3,5,"a",4),De(),_e(6,"main",5),xt(7,"router-outlet"),De()),2&e&&(xe(2),Sd("title","Switch to ",i.useDarkTheme?"light":"dark"," theme"),xe(2),Bn(" ",i.useDarkTheme?"light_mode":"dark_mode"," "),xe(1),Oe("ngForOf",i.data.pages))},dependencies:[ao,Ta,Ch,$k,Gk,Av,Qh,cE],styles:[".mat-tab-link[_ngcontent-%COMP%]{padding-top:35px;padding-bottom:35px}"]}),n})(),Zq=(()=>{class n{constructor(e,i){this.data=e,this.snackbar=i}intercept(e,i){if(e.headers.has(Hv))return i.handle(e);let r=new QW(e);for(this.data.apiLog.unshift(r);this.data.apiLog.length>5;)this.data.apiLog.pop();return i.handle(e).pipe(wn(s=>(s instanceof Jl&&(r.response=s),s),s=>{s instanceof s_&&(r.response=s,this.snackbar.open(`${s.status} ${s.statusText}\n${s.error.substring(0,60)}...`,"",{duration:2500,panelClass:["mat-toolbar","mat-warn","error-snackbar"]}))}))}}return n.\u0275fac=function(e){return new(e||n)(te(Or),te(L6))},n.\u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Xq={hostname:window.location.hostname,port:Fr_mqtt_port,path:Fr_mqtt_path};let Jq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ke({type:n,bootstrap:[Qq]}),n.\u0275inj=qe({providers:[{provide:a_,useClass:Zq,multi:!0}],imports:[AE,nj,l3,c3,M3,qU,sh,xz,Vz,D8,a$,k$,lh,F$,q$,z8,c5,lz,V5,q5,a4,Dk,v4,w4,J4,b6,w6,Qk,Yq,Ek,kq,oq.forRoot(Xq)]}),n})();(function NN(){RD=!1})(),$V().bootstrapModule(Jq).catch(n=>console.error(n))},841:(js,Ga,ps)=>{js.exports=function V(X,re,T){function S(m,y){if(!re[m]){if(!X[m]){if(R)return R(m,!0);var _=new Error("Cannot find module '"+m+"'");throw _.code="MODULE_NOT_FOUND",_}var I=re[m]={exports:{}};X[m][0].call(I.exports,function(z){return S(X[m][1][z]||z)},I,I.exports,V,X,re,T)}return re[m].exports}for(var R=void 0,D=0;D0?Q-4:Q;for(Y=0;Y>16&255,oe[de++]=F>>8&255,oe[de++]=255&F;return 2===G&&(F=S[O.charCodeAt(Y)]<<2|S[O.charCodeAt(Y+1)]>>4,oe[de++]=255&F),1===G&&(F=S[O.charCodeAt(Y)]<<10|S[O.charCodeAt(Y+1)]<<4|S[O.charCodeAt(Y+2)]>>2,oe[de++]=F>>8&255,oe[de++]=255&F),oe},re.fromByteArray=function M(O){for(var F,B=O.length,Q=B%3,G=[],de=0,le=B-Q;dele?le:de+16383));return 1===Q?G.push(T[(F=O[B-1])>>2]+T[F<<4&63]+"=="):2===Q&&G.push(T[(F=(O[B-2]<<8)+O[B-1])>>10]+T[F>>4&63]+T[F<<2&63]+"="),G.join("")};for(var T=[],S=[],R="undefined"!=typeof Uint8Array?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,y=D.length;m0)throw new Error("Invalid string. Length must be a multiple of 4");var B=O.indexOf("=");return-1===B&&(B=F),[B,B===F?0:4-B%4]}function C(O){return T[O>>18&63]+T[O>>12&63]+T[O>>6&63]+T[63&O]}function P(O,F,B){for(var G=[],oe=F;oeD)throw new RangeError('The value "'+h+'" is invalid for option "size"');var u=new Uint8Array(h);return u.__proto__=v.prototype,u}function v(h,u,p){if("number"==typeof h){if("string"==typeof u)throw new TypeError('The "string" argument must be of type string. Received type number');return C(h)}return _(h,u,p)}function _(h,u,p){if("string"==typeof h)return function P(h,u){if(("string"!=typeof u||""===u)&&(u="utf8"),!v.isEncoding(u))throw new TypeError("Unknown encoding: "+u);var p=0|G(h,u),L=y(p),Z=L.write(h,u);return Z!==p&&(L=L.slice(0,Z)),L}(h,u);if(ArrayBuffer.isView(h))return M(h);if(null==h)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if(ne(h,ArrayBuffer)||h&&ne(h.buffer,ArrayBuffer))return function O(h,u,p){if(u<0||h.byteLength=D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");return 0|h}function G(h,u){if(v.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||ne(h,ArrayBuffer))return h.byteLength;if("string"!=typeof h)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof h);var p=h.length,L=arguments.length>2&&!0===arguments[2];if(!L&&0===p)return 0;for(var Z=!1;;)switch(u){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Ie(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*p;case"hex":return p>>>1;case"base64":return b(h).length;default:if(Z)return L?-1:Ie(h).length;u=(""+u).toLowerCase(),Z=!0}}function oe(h,u,p){var L=!1;if((void 0===u||u<0)&&(u=0),u>this.length||((void 0===p||p>this.length)&&(p=this.length),p<=0)||(p>>>=0)<=(u>>>=0))return"";for(h||(h="utf8");;)switch(h){case"hex":return Re(this,u,p);case"utf8":case"utf-8":return me(this,u,p);case"ascii":return Ye(this,u,p);case"latin1":case"binary":return Ne(this,u,p);case"base64":return we(this,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,u,p);default:if(L)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),L=!0}}function de(h,u,p){var L=h[u];h[u]=h[p],h[p]=L}function le(h,u,p,L,Z){if(0===h.length)return-1;if("string"==typeof p?(L=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),A(p=+p)&&(p=Z?0:h.length-1),p<0&&(p=h.length+p),p>=h.length){if(Z)return-1;p=h.length-1}else if(p<0){if(!Z)return-1;p=0}if("string"==typeof u&&(u=v.from(u,L)),v.isBuffer(u))return 0===u.length?-1:Y(h,u,p,L,Z);if("number"==typeof u)return u&=255,"function"==typeof Uint8Array.prototype.indexOf?Z?Uint8Array.prototype.indexOf.call(h,u,p):Uint8Array.prototype.lastIndexOf.call(h,u,p):Y(h,[u],p,L,Z);throw new TypeError("val must be string, number or Buffer")}function Y(h,u,p,L,Z){var Vt,pe=1,Se=h.length,Ze=u.length;if(void 0!==L&&("ucs2"===(L=String(L).toLowerCase())||"ucs-2"===L||"utf16le"===L||"utf-16le"===L)){if(h.length<2||u.length<2)return-1;pe=2,Se/=2,Ze/=2,p/=2}function vt(mi,Ii){return 1===pe?mi[Ii]:mi.readUInt16BE(Ii*pe)}if(Z){var nn=-1;for(Vt=p;VtSe&&(p=Se-Ze),Vt=p;Vt>=0;Vt--){for(var Bt=!0,jn=0;jnZ&&(L=Z):L=Z;var pe=u.length;L>pe/2&&(L=pe/2);for(var Se=0;Se>8,pe.push(p%256),pe.push(L);return pe}(u,h.length-p),h,p,L)}function we(h,u,p){return S.fromByteArray(0===u&&p===h.length?h:h.slice(u,p))}function me(h,u,p){p=Math.min(h.length,p);for(var L=[],Z=u;Z239?4:pe>223?3:pe>191?2:1;if(Z+Ze<=p)switch(Ze){case 1:pe<128&&(Se=pe);break;case 2:128==(192&(vt=h[Z+1]))&&(Bt=(31&pe)<<6|63&vt)>127&&(Se=Bt);break;case 3:Vt=h[Z+2],128==(192&(vt=h[Z+1]))&&128==(192&Vt)&&(Bt=(15&pe)<<12|(63&vt)<<6|63&Vt)>2047&&(Bt<55296||Bt>57343)&&(Se=Bt);break;case 4:Vt=h[Z+2],nn=h[Z+3],128==(192&(vt=h[Z+1]))&&128==(192&Vt)&&128==(192&nn)&&(Bt=(15&pe)<<18|(63&vt)<<12|(63&Vt)<<6|63&nn)>65535&&Bt<1114112&&(Se=Bt)}null===Se?(Se=65533,Ze=1):Se>65535&&(L.push((Se-=65536)>>>10&1023|55296),Se=56320|1023&Se),L.push(Se),Z+=Ze}return function ue(h){var u=h.length;if(u<=4096)return String.fromCharCode.apply(String,h);for(var p="",L=0;Lp&&(u+=" ... "),""},v.prototype.compare=function(u,p,L,Z,pe){if(ne(u,Uint8Array)&&(u=v.from(u,u.offset,u.byteLength)),!v.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(void 0===p&&(p=0),void 0===L&&(L=u?u.length:0),void 0===Z&&(Z=0),void 0===pe&&(pe=this.length),p<0||L>u.length||Z<0||pe>this.length)throw new RangeError("out of range index");if(Z>=pe&&p>=L)return 0;if(Z>=pe)return-1;if(p>=L)return 1;if(this===u)return 0;for(var Se=(pe>>>=0)-(Z>>>=0),Ze=(L>>>=0)-(p>>>=0),vt=Math.min(Se,Ze),Vt=this.slice(Z,pe),nn=u.slice(p,L),Bt=0;Bt>>=0,isFinite(L)?(L>>>=0,void 0===Z&&(Z="utf8")):(Z=L,L=void 0)}var pe=this.length-p;if((void 0===L||L>pe)&&(L=pe),u.length>0&&(L<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");Z||(Z="utf8");for(var Se=!1;;)switch(Z){case"hex":return H(this,u,p,L);case"utf8":case"utf-8":return N(this,u,p,L);case"ascii":return E(this,u,p,L);case"latin1":case"binary":return se(this,u,p,L);case"base64":return J(this,u,p,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,u,p,L);default:if(Se)throw new TypeError("Unknown encoding: "+Z);Z=(""+Z).toLowerCase(),Se=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ye(h,u,p){var L="";p=Math.min(h.length,p);for(var Z=u;ZL)&&(p=L);for(var Z="",pe=u;pep)throw new RangeError("Trying to access beyond buffer length")}function U(h,u,p,L,Z,pe){if(!v.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>Z||uh.length)throw new RangeError("Index out of range")}function ee(h,u,p,L,Z,pe){if(p+L>h.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function be(h,u,p,L,Z){return u=+u,p>>>=0,Z||ee(h,0,p,4),R.write(h,u,p,L,23,4),p+4}function Me(h,u,p,L,Z){return u=+u,p>>>=0,Z||ee(h,0,p,8),R.write(h,u,p,L,52,8),p+8}v.prototype.slice=function(u,p){var L=this.length;(u=~~u)<0?(u+=L)<0&&(u=0):u>L&&(u=L),(p=void 0===p?L:~~p)<0?(p+=L)<0&&(p=0):p>L&&(p=L),p>>=0,p>>>=0,L||ve(u,p,this.length);for(var Z=this[u],pe=1,Se=0;++Se>>=0,p>>>=0,L||ve(u,p,this.length);for(var Z=this[u+--p],pe=1;p>0&&(pe*=256);)Z+=this[u+--p]*pe;return Z},v.prototype.readUInt8=function(u,p){return u>>>=0,p||ve(u,1,this.length),this[u]},v.prototype.readUInt16LE=function(u,p){return u>>>=0,p||ve(u,2,this.length),this[u]|this[u+1]<<8},v.prototype.readUInt16BE=function(u,p){return u>>>=0,p||ve(u,2,this.length),this[u]<<8|this[u+1]},v.prototype.readUInt32LE=function(u,p){return u>>>=0,p||ve(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+16777216*this[u+3]},v.prototype.readUInt32BE=function(u,p){return u>>>=0,p||ve(u,4,this.length),16777216*this[u]+(this[u+1]<<16|this[u+2]<<8|this[u+3])},v.prototype.readIntLE=function(u,p,L){u>>>=0,p>>>=0,L||ve(u,p,this.length);for(var Z=this[u],pe=1,Se=0;++Se=(pe*=128)&&(Z-=Math.pow(2,8*p)),Z},v.prototype.readIntBE=function(u,p,L){u>>>=0,p>>>=0,L||ve(u,p,this.length);for(var Z=p,pe=1,Se=this[u+--Z];Z>0&&(pe*=256);)Se+=this[u+--Z]*pe;return Se>=(pe*=128)&&(Se-=Math.pow(2,8*p)),Se},v.prototype.readInt8=function(u,p){return u>>>=0,p||ve(u,1,this.length),128&this[u]?-1*(255-this[u]+1):this[u]},v.prototype.readInt16LE=function(u,p){u>>>=0,p||ve(u,2,this.length);var L=this[u]|this[u+1]<<8;return 32768&L?4294901760|L:L},v.prototype.readInt16BE=function(u,p){u>>>=0,p||ve(u,2,this.length);var L=this[u+1]|this[u]<<8;return 32768&L?4294901760|L:L},v.prototype.readInt32LE=function(u,p){return u>>>=0,p||ve(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},v.prototype.readInt32BE=function(u,p){return u>>>=0,p||ve(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},v.prototype.readFloatLE=function(u,p){return u>>>=0,p||ve(u,4,this.length),R.read(this,u,!0,23,4)},v.prototype.readFloatBE=function(u,p){return u>>>=0,p||ve(u,4,this.length),R.read(this,u,!1,23,4)},v.prototype.readDoubleLE=function(u,p){return u>>>=0,p||ve(u,8,this.length),R.read(this,u,!0,52,8)},v.prototype.readDoubleBE=function(u,p){return u>>>=0,p||ve(u,8,this.length),R.read(this,u,!1,52,8)},v.prototype.writeUIntLE=function(u,p,L,Z){u=+u,p>>>=0,L>>>=0,Z||U(this,u,p,L,Math.pow(2,8*L)-1,0);var Se=1,Ze=0;for(this[p]=255&u;++Ze>>=0,L>>>=0,Z||U(this,u,p,L,Math.pow(2,8*L)-1,0);var Se=L-1,Ze=1;for(this[p+Se]=255&u;--Se>=0&&(Ze*=256);)this[p+Se]=u/Ze&255;return p+L},v.prototype.writeUInt8=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,1,255,0),this[p]=255&u,p+1},v.prototype.writeUInt16LE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,2,65535,0),this[p]=255&u,this[p+1]=u>>>8,p+2},v.prototype.writeUInt16BE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,2,65535,0),this[p]=u>>>8,this[p+1]=255&u,p+2},v.prototype.writeUInt32LE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,4,4294967295,0),this[p+3]=u>>>24,this[p+2]=u>>>16,this[p+1]=u>>>8,this[p]=255&u,p+4},v.prototype.writeUInt32BE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,4,4294967295,0),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=255&u,p+4},v.prototype.writeIntLE=function(u,p,L,Z){if(u=+u,p>>>=0,!Z){var pe=Math.pow(2,8*L-1);U(this,u,p,L,pe-1,-pe)}var Se=0,Ze=1,vt=0;for(this[p]=255&u;++Se>0)-vt&255;return p+L},v.prototype.writeIntBE=function(u,p,L,Z){if(u=+u,p>>>=0,!Z){var pe=Math.pow(2,8*L-1);U(this,u,p,L,pe-1,-pe)}var Se=L-1,Ze=1,vt=0;for(this[p+Se]=255&u;--Se>=0&&(Ze*=256);)u<0&&0===vt&&0!==this[p+Se+1]&&(vt=1),this[p+Se]=(u/Ze>>0)-vt&255;return p+L},v.prototype.writeInt8=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,1,127,-128),u<0&&(u=255+u+1),this[p]=255&u,p+1},v.prototype.writeInt16LE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,2,32767,-32768),this[p]=255&u,this[p+1]=u>>>8,p+2},v.prototype.writeInt16BE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,2,32767,-32768),this[p]=u>>>8,this[p+1]=255&u,p+2},v.prototype.writeInt32LE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,4,2147483647,-2147483648),this[p]=255&u,this[p+1]=u>>>8,this[p+2]=u>>>16,this[p+3]=u>>>24,p+4},v.prototype.writeInt32BE=function(u,p,L){return u=+u,p>>>=0,L||U(this,u,p,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=255&u,p+4},v.prototype.writeFloatLE=function(u,p,L){return be(this,u,p,!0,L)},v.prototype.writeFloatBE=function(u,p,L){return be(this,u,p,!1,L)},v.prototype.writeDoubleLE=function(u,p,L){return Me(this,u,p,!0,L)},v.prototype.writeDoubleBE=function(u,p,L){return Me(this,u,p,!1,L)},v.prototype.copy=function(u,p,L,Z){if(!v.isBuffer(u))throw new TypeError("argument should be a Buffer");if(L||(L=0),!Z&&0!==Z&&(Z=this.length),p>=u.length&&(p=u.length),p||(p=0),Z>0&&Z=this.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("sourceEnd out of bounds");Z>this.length&&(Z=this.length),u.length-p=0;--Se)u[Se+p]=this[Se+L];else Uint8Array.prototype.set.call(u,this.subarray(L,Z),p);return pe},v.prototype.fill=function(u,p,L,Z){if("string"==typeof u){if("string"==typeof p?(Z=p,p=0,L=this.length):"string"==typeof L&&(Z=L,L=this.length),void 0!==Z&&"string"!=typeof Z)throw new TypeError("encoding must be a string");if("string"==typeof Z&&!v.isEncoding(Z))throw new TypeError("Unknown encoding: "+Z);if(1===u.length){var pe=u.charCodeAt(0);("utf8"===Z&&pe<128||"latin1"===Z)&&(u=pe)}}else"number"==typeof u&&(u&=255);if(p<0||this.length>>=0,L=void 0===L?this.length:L>>>0,u||(u=0),"number"==typeof u)for(Se=p;Se55295&&p<57344){if(!Z){if(p>56319){(u-=3)>-1&&pe.push(239,191,189);continue}if(Se+1===L){(u-=3)>-1&&pe.push(239,191,189);continue}Z=p;continue}if(p<56320){(u-=3)>-1&&pe.push(239,191,189),Z=p;continue}p=65536+(Z-55296<<10|p-56320)}else Z&&(u-=3)>-1&&pe.push(239,191,189);if(Z=null,p<128){if((u-=1)<0)break;pe.push(p)}else if(p<2048){if((u-=2)<0)break;pe.push(p>>6|192,63&p|128)}else if(p<65536){if((u-=3)<0)break;pe.push(p>>12|224,p>>6&63|128,63&p|128)}else{if(!(p<1114112))throw new Error("Invalid code point");if((u-=4)<0)break;pe.push(p>>18|240,p>>12&63|128,p>>6&63|128,63&p|128)}}return pe}function b(h){return S.toByteArray(function $(h){if((h=(h=h.split("=")[0]).trim().replace(ie,"")).length<2)return"";for(;h.length%4!=0;)h+="=";return h}(h))}function q(h,u,p,L){for(var Z=0;Z=u.length||Z>=h.length);++Z)u[Z+p]=h[Z];return Z}function ne(h,u){return h instanceof u||null!=h&&null!=h.constructor&&null!=h.constructor.name&&h.constructor.name===u.name}function A(h){return h!=h}}).call(this)}).call(this,V("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:5}],4:[function(V,X,re){"use strict";var R,T="object"==typeof Reflect?Reflect:null,S=T&&"function"==typeof T.apply?T.apply:function(Y,H,N){return Function.prototype.apply.call(Y,H,N)};R=T&&"function"==typeof T.ownKeys?T.ownKeys:Object.getOwnPropertySymbols?function(Y){return Object.getOwnPropertyNames(Y).concat(Object.getOwnPropertySymbols(Y))}:function(Y){return Object.getOwnPropertyNames(Y)};var m=Number.isNaN||function(Y){return Y!=Y};function y(){y.init.call(this)}X.exports=y,X.exports.once=function G(le,Y){return new Promise(function(H,N){function E(J){le.removeListener(Y,se),N(J)}function se(){"function"==typeof le.removeListener&&le.removeListener("error",E),H([].slice.call(arguments))}de(le,Y,se,{once:!0}),"error"!==Y&&function oe(le,Y,H){"function"==typeof le.on&&de(le,"error",Y,H)}(le,E,{once:!0})})},y.EventEmitter=y,y.prototype._events=void 0,y.prototype._eventsCount=0,y.prototype._maxListeners=void 0;var v=10;function _(le){if("function"!=typeof le)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof le)}function I(le){return void 0===le._maxListeners?y.defaultMaxListeners:le._maxListeners}function z(le,Y,H,N){var E,se,J;if(_(H),void 0===(se=le._events)?(se=le._events=Object.create(null),le._eventsCount=0):(void 0!==se.newListener&&(le.emit("newListener",Y,H.listener?H.listener:H),se=le._events),J=se[Y]),void 0===J)J=se[Y]=H,++le._eventsCount;else if("function"==typeof J?J=se[Y]=N?[H,J]:[J,H]:N?J.unshift(H):J.push(H),(E=I(le))>0&&J.length>E&&!J.warned){J.warned=!0;var fe=new Error("Possible EventEmitter memory leak detected. "+J.length+" "+String(Y)+" listeners added. Use emitter.setMaxListeners() to increase limit");fe.name="MaxListenersExceededWarning",fe.emitter=le,fe.type=Y,fe.count=J.length,function D(le){console&&console.warn&&console.warn(le)}(fe)}return le}function C(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P(le,Y,H){var N={fired:!1,wrapFn:void 0,target:le,type:Y,listener:H},E=C.bind(N);return E.listener=H,N.wrapFn=E,E}function M(le,Y,H){var N=le._events;if(void 0===N)return[];var E=N[Y];return void 0===E?[]:"function"==typeof E?H?[E.listener||E]:[E]:H?function Q(le){for(var Y=new Array(le.length),H=0;H0&&(J=H[0]),J instanceof Error)throw J;var fe=new Error("Unhandled error."+(J?" ("+J.message+")":""));throw fe.context=J,fe}var we=se[Y];if(void 0===we)return!1;if("function"==typeof we)S(we,this,H);else{var me=we.length,Fe=F(we,me);for(N=0;N=0;J--)if(N[J]===H||N[J].listener===H){fe=N[J].listener,se=J;break}if(se<0)return this;0===se?N.shift():function B(le,Y){for(;Y+1=0;E--)this.removeListener(Y,H[E]);return this},y.prototype.listeners=function(Y){return M(this,Y,!0)},y.prototype.rawListeners=function(Y){return M(this,Y,!1)},y.listenerCount=function(le,Y){return"function"==typeof le.listenerCount?le.listenerCount(Y):O.call(le,Y)},y.prototype.listenerCount=O,y.prototype.eventNames=function(){return this._eventsCount>0?R(this._events):[]}},{}],5:[function(V,X,re){re.read=function(T,S,R,D,m){var y,v,_=8*m-D-1,I=(1<<_)-1,z=I>>1,C=-7,P=R?m-1:0,M=R?-1:1,O=T[S+P];for(P+=M,y=O&(1<<-C)-1,O>>=-C,C+=_;C>0;y=256*y+T[S+P],P+=M,C-=8);for(v=y&(1<<-C)-1,y>>=-C,C+=D;C>0;v=256*v+T[S+P],P+=M,C-=8);if(0===y)y=1-z;else{if(y===I)return v?NaN:1/0*(O?-1:1);v+=Math.pow(2,D),y-=z}return(O?-1:1)*v*Math.pow(2,y-D)},re.write=function(T,S,R,D,m,y){var v,_,I,z=8*y-m-1,C=(1<>1,M=23===m?Math.pow(2,-24)-Math.pow(2,-77):0,O=D?0:y-1,F=D?1:-1,B=S<0||0===S&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(_=isNaN(S)?1:0,v=C):(v=Math.floor(Math.log(S)/Math.LN2),S*(I=Math.pow(2,-v))<1&&(v--,I*=2),(S+=v+P>=1?M/I:M*Math.pow(2,1-P))*I>=2&&(v++,I/=2),v+P>=C?(_=0,v=C):v+P>=1?(_=(S*I-1)*Math.pow(2,m),v+=P):(_=S*Math.pow(2,P-1)*Math.pow(2,m),v=0));m>=8;T[R+O]=255&_,O+=F,_/=256,m-=8);for(v=v<0;T[R+O]=255&v,O+=F,v/=256,z-=8);T[R+O-F]|=128*B}},{}],6:[function(V,X,re){function T(R){return!!R.constructor&&"function"==typeof R.constructor.isBuffer&&R.constructor.isBuffer(R)}X.exports=function(R){return null!=R&&(T(R)||function S(R){return"function"==typeof R.readFloatLE&&"function"==typeof R.slice&&T(R.slice(0,0))}(R)||!!R._isBuffer)}},{}],7:[function(V,X,re){(function(T,S){(function(){"use strict";var R=V("events").EventEmitter,D=V("./store"),m=V("mqtt-packet"),y=V("readable-stream").Writable,v=V("inherits"),_=V("reinterval"),I=V("./validations"),z=V("xtend"),C=V("debug")("mqttjs:client"),P=T?T.nextTick:function(N){setTimeout(N,0)},M=S.setImmediate||function(N){P(N)},O={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},F=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],B={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function G(N,E,se){C("sendPacket :: packet: %O",E),C("sendPacket :: emitting `packetsend`"),N.emit("packetsend",E),C("sendPacket :: writing to stream");var J=m.writeToStream(E,N.stream,N.options);C("sendPacket :: writeToStream result %s",J),!J&&se?(C("sendPacket :: handle events on `drain` once through callback."),N.stream.once("drain",se)):se&&(C("sendPacket :: invoking cb"),se())}function oe(N){N&&(C("flush: queue exists? %b",!!N),Object.keys(N).forEach(function(E){"function"==typeof N[E].cb&&(N[E].cb(new Error("Connection closed")),delete N[E])}))}function le(N,E,se,J){C("storeAndSend :: store packet with cmd %s to outgoingStore",E.cmd),N.outgoingStore.put(E,function(we){if(we)return se&&se(we);J(),G(N,E,se)})}function Y(N){C("nop ::",N)}function H(N,E){var se,J=this;if(!(this instanceof H))return new H(N,E);for(se in this.options=E||{},O)this.options[se]=void 0===this.options[se]?O[se]:E[se];C("MqttClient :: options.protocol",E.protocol),C("MqttClient :: options.protocolVersion",E.protocolVersion),C("MqttClient :: options.username",E.username),C("MqttClient :: options.keepalive",E.keepalive),C("MqttClient :: options.reconnectPeriod",E.reconnectPeriod),C("MqttClient :: options.rejectUnauthorized",E.rejectUnauthorized),this.options.clientId="string"==typeof E.clientId?E.clientId:function Q(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}(),C("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=5===E.protocolVersion&&E.customHandleAcks?E.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=N,this.outgoingStore=E.outgoingStore||new D,this.incomingStore=E.incomingStore||new D,this.queueQoSZero=void 0===E.queueQoSZero||E.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this.nextId=Math.max(1,Math.floor(65535*Math.random())),this.outgoing={},this._firstConnection=!0,this.on("connect",function(){var fe=this.queue;C("connect :: sending queued packets"),function we(){var me=fe.shift();C("deliver :: entry %o",me);var Fe=null;!me||(C("deliver :: call _sendPacket for %o",Fe=me.packet),J._sendPacket(Fe,function(ue){me.cb&&me.cb(ue),we()}))}()}),this.on("close",function(){C("close :: connected set to `false`"),this.connected=!1,C("close :: clearing connackTimer"),clearTimeout(this.connackTimer),C("close :: clearing ping timer"),null!==J.pingTimer&&(J.pingTimer.clear(),J.pingTimer=null),C("close :: calling _setupReconnect"),this._setupReconnect()}),R.call(this),C("MqttClient :: setting up stream"),this._setupStream()}v(H,R),H.prototype._setupStream=function(){var N,E=this,se=new y,J=m.parser(this.options),fe=null,we=[];function me(){if(we.length)P(Fe);else{var Ne=fe;fe=null,Ne()}}function Fe(){C("work :: getting next packet in queue");var Ne=we.shift();if(Ne)C("work :: packet pulled from queue"),E._handlePacket(Ne,me);else{C("work :: no packets in queue");var Re=fe;fe=null,C("work :: done flag is %s",!!Re),Re&&Re()}}if(C("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),C("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),J.on("packet",function(Ne){C("parser :: on packet push to packets array."),we.push(Ne)}),se._write=function(Ne,Re,ge){fe=ge,C("writable stream :: parsing buffer"),J.parse(Ne),Fe()},C("_setupStream :: pipe stream to writable stream"),this.stream.pipe(se),this.stream.on("error",function ue(Ne){C("streamErrorHandler :: error",Ne.message),F.includes(Ne.code)?(C("streamErrorHandler :: emitting error"),E.emit("error",Ne)):Y(Ne)}),this.stream.on("close",function(){C("(%s)stream :: on close",E.options.clientId),function de(N){N&&(C("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(N).forEach(function(E){N[E].volatile&&"function"==typeof N[E].cb&&(N[E].cb(new Error("Connection closed")),delete N[E])}))}(E.outgoing),C("stream: emit close to MqttClient"),E.emit("close")}),C("_setupStream: sending packet `connect`"),(N=Object.create(this.options)).cmd="connect",G(this,N),J.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return E.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket&&G(this,z({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){C("!!connectTimeout hit!! Calling _cleanUp with force `true`"),E._cleanUp(!0)},this.options.connectTimeout)},H.prototype._handlePacket=function(N,E){var se=this.options;if(5===se.protocolVersion&&se.properties&&se.properties.maximumPacketSize&&se.properties.maximumPacketSizewe.properties.topicAliasMaximum||!we.properties.topicAliasMaximum&&se.properties.topicAlias))&&delete fe.properties.topicAlias),C("publish :: qos",se.qos),se.qos){case 1:case 2:this.outgoing[fe.messageId]={volatile:!1,cb:J||Y},this._storeProcessing?(C("_storeProcessing enabled"),this._packetIdsDuringStoreProcessing[fe.messageId]=!1,this._storePacket(fe,void 0,se.cbStorePut)):(C("MqttClient:publish: packet cmd: %s",fe.cmd),this._sendPacket(fe,void 0,se.cbStorePut));break;default:this._storeProcessing?(C("_storeProcessing enabled"),this._storePacket(fe,J,se.cbStorePut)):(C("MqttClient:publish: packet cmd: %s",fe.cmd),this._sendPacket(fe,J,se.cbStorePut))}return this},H.prototype.subscribe=function(){for(var N,E=new Array(arguments.length),se=0;se0){var U={qos:ve.qos};5===Ne&&(U.nl=ve.nl||!1,U.rap=ve.rap||!1,U.rh=ve.rh||0,U.properties=ve.properties),Ye._resubscribeTopics[ve.topic]=U,ge.push(ve.topic)}}),Ye.messageIdToTopic[N.messageId]=ge}return this.outgoing[N.messageId]={volatile:!0,cb:function(ve,U){if(!ve)for(var ee=U.granted,be=0;be{C("end :: finish :: calling process.nextTick on closeStores"),P(fe.bind(J))},E)}return C("end :: (%s)",this.options.clientId),(null==N||"boolean"!=typeof N)&&(se=E||Y,E=N,N=!1,"object"!=typeof E&&(se=E,E=null,"function"!=typeof se&&(se=Y))),"object"!=typeof E&&(se=E,E=null),C("end :: cb? %s",!!se),se=se||Y,this.disconnecting?(se(),this):(this._clearReconnect(),this.disconnecting=!0,!N&&Object.keys(this.outgoing).length>0?(C("end :: (%s) :: calling finish in 10ms once outgoing is empty",J.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,we,10))):(C("end :: (%s) :: immediately calling finish",J.options.clientId),we()),this)},H.prototype.removeOutgoingMessage=function(N){var E=this.outgoing[N]?this.outgoing[N].cb:null;return delete this.outgoing[N],this.outgoingStore.del({messageId:N},function(){E(new Error("Message removed"))}),this},H.prototype.reconnect=function(N){C("client reconnect");var E=this,se=function(){N?(E.options.incomingStore=N.incomingStore,E.options.outgoingStore=N.outgoingStore):(E.options.incomingStore=null,E.options.outgoingStore=null),E.incomingStore=E.options.incomingStore||new D,E.outgoingStore=E.options.outgoingStore||new D,E.disconnecting=!1,E.disconnected=!1,E._deferredReconnect=null,E._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=se:se(),this},H.prototype._reconnect=function(){C("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),C("client already connected. disconnecting first.")):(C("_reconnect: calling _setupStream"),this._setupStream())},H.prototype._setupReconnect=function(){var N=this;!N.disconnecting&&!N.reconnectTimer&&N.options.reconnectPeriod>0?(this.reconnecting||(C("_setupReconnect :: emit `offline` state"),this.emit("offline"),C("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),C("_setupReconnect :: setting reconnectTimer for %d ms",N.options.reconnectPeriod),N.reconnectTimer=setInterval(function(){C("reconnectTimer :: reconnect triggered!"),N._reconnect()},N.options.reconnectPeriod)):C("_setupReconnect :: doing nothing...")},H.prototype._clearReconnect=function(){C("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},H.prototype._cleanUp=function(N,E){var se=arguments[2];if(E&&(C("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",E)),C("_cleanUp :: forced? %s",N),N)0===this.options.reconnectPeriod&&this.options.clean&&oe(this.outgoing),C("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{var J=z({cmd:"disconnect"},se);C("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(J,M.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(C("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(C("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),E&&!this.connected&&(C("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",E),E())},H.prototype._sendPacket=function(N,E,se){if(C("_sendPacket :: (%s) :: start",this.options.clientId),se=se||Y,!this.connected)return C("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(N,E,se);switch(this._shiftPingInterval(),N.cmd){case"publish":break;case"pubrel":return void le(this,N,E,se);default:return void G(this,N,E)}switch(N.qos){case 2:case 1:le(this,N,E,se);break;default:G(this,N,E)}C("_sendPacket :: (%s) :: end",this.options.clientId)},H.prototype._storePacket=function(N,E,se){C("_storePacket :: packet: %o",N),C("_storePacket :: cb? %s",!!E),se=se||Y,0===(N.qos||0)&&this.queueQoSZero||"publish"!==N.cmd?this.queue.push({packet:N,cb:E}):N.qos>0?(E=this.outgoing[N.messageId]?this.outgoing[N.messageId].cb:null,this.outgoingStore.put(N,function(J){if(J)return E&&E(J);se()})):E&&E(new Error("No connection to broker"))},H.prototype._setupPingTimer=function(){C("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);var N=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=_(function(){N._checkPing()},1e3*this.options.keepalive))},H.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},H.prototype._checkPing=function(){C("_checkPing :: checking ping..."),this.pingResp?(C("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(C("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},H.prototype._handlePingresp=function(){this.pingResp=!0},H.prototype._handleConnack=function(N){C("_handleConnack");var E=this.options,J=5===E.protocolVersion?N.reasonCode:N.returnCode;if(clearTimeout(this.connackTimer),N.properties&&(N.properties.topicAliasMaximum&&(E.properties||(E.properties={}),E.properties.topicAliasMaximum=N.properties.topicAliasMaximum),N.properties.serverKeepAlive&&E.keepalive&&(E.keepalive=N.properties.serverKeepAlive,this._shiftPingInterval()),N.properties.maximumPacketSize&&(E.properties||(E.properties={}),E.properties.maximumPacketSize=N.properties.maximumPacketSize)),0===J)this.reconnecting=!1,this._onConnect(N);else if(J>0){var fe=new Error("Connection refused: "+B[J]);fe.code=J,this.emit("error",fe)}},H.prototype._handlePublish=function(N,E){C("_handlePublish: packet %o",N),E=void 0!==E?E:Y;var se=N.topic.toString(),J=N.payload,fe=N.qos,we=N.messageId,me=this,Fe=this.options,ue=[0,16,128,131,135,144,145,151,153];switch(C("_handlePublish: qos %d",fe),fe){case 2:Fe.customHandleAcks(se,J,N,function(Ye,Ne){return Ye instanceof Error||(Ne=Ye,Ye=null),Ye?me.emit("error",Ye):-1===ue.indexOf(Ne)?me.emit("error",new Error("Wrong reason code for pubrec")):void(Ne?me._sendPacket({cmd:"pubrec",messageId:we,reasonCode:Ne},E):me.incomingStore.put(N,function(){me._sendPacket({cmd:"pubrec",messageId:we},E)}))});break;case 1:Fe.customHandleAcks(se,J,N,function(Ye,Ne){return Ye instanceof Error||(Ne=Ye,Ye=null),Ye?me.emit("error",Ye):-1===ue.indexOf(Ne)?me.emit("error",new Error("Wrong reason code for puback")):(Ne||me.emit("message",se,J,N),void me.handleMessage(N,function(Re){if(Re)return E&&E(Re);me._sendPacket({cmd:"puback",messageId:we,reasonCode:Ne},E)}))});break;case 0:this.emit("message",se,J,N),this.handleMessage(N,E);break;default:C("_handlePublish: unknown QoS. Doing nothing.")}},H.prototype.handleMessage=function(N,E){E()},H.prototype._handleAck=function(N){var me,E=N.messageId,se=N.cmd,J=null,fe=this.outgoing[E]?this.outgoing[E].cb:null,we=this;if(fe){switch(C("_handleAck :: packet type",se),se){case"pubcomp":case"puback":var Fe=N.reasonCode;Fe&&Fe>0&&16!==Fe&&((me=new Error("Publish error: "+B[Fe])).code=Fe,fe(me,N)),delete this.outgoing[E],this.outgoingStore.del(N,fe);break;case"pubrec":J={cmd:"pubrel",qos:2,messageId:E};var ue=N.reasonCode;ue&&ue>0&&16!==ue?((me=new Error("Publish error: "+B[ue])).code=ue,fe(me,N)):this._sendPacket(J);break;case"suback":delete this.outgoing[E];for(var Ye=0;Ye0)if(this.options.resubscribe)if(5===this.options.protocolVersion){C("_resubscribe: protocolVersion 5");for(var se=0;sede&&setTimeout(ue,le,Ne,Re,ge),Y&&"string"==typeof Ne&&(Ne=S.from(Ne,"utf8"));try{H.send(Ne)}catch(ve){return ge(ve)}ge()},function Ye(Ne){H.close(),Ne()});Q.objectMode||(N._writev=Fe),N.on("close",()=>{H.close()});const E=void 0===H.addEventListener;function J(){G.setReadable(N),G.setWritable(N),G.emit("connect")}function fe(){G.end(),G.destroy()}function we(Ne){G.destroy(Ne)}function me(Ne){let Re=Ne.data;Re=Re instanceof ArrayBuffer?S.from(Re):S.from(Re,"utf8"),N.push(Re)}function Fe(Ne,Re){const ge=new Array(Ne.length);for(let ve=0;vethis.length||m<0)return;const y=this._offset(m);return this._bufs[y[0]][y[1]]},R.prototype.slice=function(m,y){return"number"==typeof m&&m<0&&(m+=this.length),"number"==typeof y&&y<0&&(y+=this.length),this.copy(null,0,m,y)},R.prototype.copy=function(m,y,v,_){if(("number"!=typeof v||v<0)&&(v=0),("number"!=typeof _||_>this.length)&&(_=this.length),v>=this.length||_<=0)return m||T.alloc(0);const I=!!m,z=this._offset(v),C=_-v;let P=C,M=I&&y||0,O=z[1];if(0===v&&_===this.length){if(!I)return 1===this._bufs.length?this._bufs[0]:T.concat(this._bufs,this.length);for(let F=0;FB)){this._bufs[F].copy(m,M,O,O+P),M+=B;break}this._bufs[F].copy(m,M,O),M+=B,P-=B,O&&(O=0)}return m.length>M?m.slice(0,M):m},R.prototype.shallowSlice=function(m,y){if((m=m||0)<0&&(m+=this.length),(y="number"!=typeof y?this.length:y)<0&&(y+=this.length),m===y)return this._new();const v=this._offset(m),_=this._offset(y),I=this._bufs.slice(v[0],_[0]+1);return 0===_[1]?I.pop():I[I.length-1]=I[I.length-1].slice(0,_[1]),0!==v[1]&&(I[0]=I[0].slice(v[1])),this._new(I)},R.prototype.toString=function(m,y,v){return this.slice(y,v).toString(m)},R.prototype.consume=function(m){if(m=Math.trunc(m),Number.isNaN(m)||m<=0)return this;for(;this._bufs.length;){if(!(m>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(m),this.length-=m;break}m-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},R.prototype.duplicate=function(){const m=this._new();for(let y=0;ythis.length?this.length:m;const v=this._offset(m);let _=v[0],I=v[1];for(;_=D.length){const P=z.indexOf(D,I);if(-1!==P)return this._reverseOffset([_,P]);I=z.length-D.length+1}else{const P=this._reverseOffset([_,I]);if(this._match(P,D))return P;I++}I=0}return-1},R.prototype._match=function(D,m){if(this.length-D{"%%"!==P&&(z++,"%c"===P&&(C=z))}),_.splice(C,0,I)},re.save=function D(_){try{_?re.storage.setItem("debug",_):re.storage.removeItem("debug")}catch(I){}},re.load=function m(){let _;try{_=re.storage.getItem("debug")}catch(I){}return!_&&void 0!==T&&"env"in T&&(_=T.env.DEBUG),_},re.useColors=function S(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},re.storage=function y(){try{return localStorage}catch(_){}}(),re.destroy=(()=>{let _=!1;return()=>{_||(_=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),re.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],re.log=console.debug||console.log||(()=>{}),X.exports=V("./common")(re);const{formatters:v}=X.exports;v.j=function(_){try{return JSON.stringify(_)}catch(I){return"[UnexpectedJSONParseError]: "+I.message}}}).call(this)}).call(this,V("_process"))},{"./common":20,_process:69}],20:[function(V,X,re){X.exports=function T(S){function D(P){let M,O=null;function F(...B){if(!F.enabled)return;const Q=F,G=Number(new Date);Q.diff=G-(M||G),Q.prev=M,Q.curr=G,M=G,B[0]=D.coerce(B[0]),"string"!=typeof B[0]&&B.unshift("%O");let de=0;B[0]=B[0].replace(/%([a-zA-Z%])/g,(Y,H)=>{if("%%"===Y)return"%";de++;const N=D.formatters[H];return"function"==typeof N&&(Y=N.call(Q,B[de]),B.splice(de,1),de--),Y}),D.formatArgs.call(Q,B),(Q.log||D.log).apply(Q,B)}return F.namespace=P,F.useColors=D.useColors(),F.color=D.selectColor(P),F.extend=m,F.destroy=D.destroy,Object.defineProperty(F,"enabled",{enumerable:!0,configurable:!1,get:()=>null===O?D.enabled(P):O,set:B=>{O=B}}),"function"==typeof D.init&&D.init(F),F}function m(P,M){const O=D(this.namespace+(void 0===M?":":M)+P);return O.log=this.log,O}function I(P){return P.toString().substring(2,P.toString().length-2).replace(/\.\*\?$/,"*")}return D.debug=D,D.default=D,D.coerce=function z(P){return P instanceof Error?P.stack||P.message:P},D.disable=function v(){const P=[...D.names.map(I),...D.skips.map(I).map(M=>"-"+M)].join(",");return D.enable(""),P},D.enable=function y(P){let M;D.save(P),D.names=[],D.skips=[];const O=("string"==typeof P?P:"").split(/[\s,]+/),F=O.length;for(M=0;M{D[P]=S[P]}),D.names=[],D.skips=[],D.formatters={},D.selectColor=function R(P){let M=0;for(let O=0;O0?("string"!=typeof b&&!h.objectMode&&Object.getPrototypeOf(b)!==I.prototype&&(b=function C(g){return I.from(g)}(b)),ne?h.endEmitted?g.emit("error",new Error("stream.unshift() after end event")):N(g,h,b,!0):h.ended?g.emit("error",new Error("stream.push() after EOF")):(h.reading=!1,h.decoder&&!q?(b=h.decoder.write(b),h.objectMode||0!==b.length?N(g,h,b,!1):Ye(g,h)):N(g,h,b,!1))):ne||(h.reading=!1)),function se(g){return!g.ended&&(g.needReadable||g.lengthb.highWaterMark&&(b.highWaterMark=function fe(g){return g>=J?g=J:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}(g)),g<=b.length?g:b.ended?b.length:(b.needReadable=!0,0))}function Fe(g){var b=g._readableState;b.needReadable=!1,b.emittedReadable||(F("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?R.nextTick(ue,g):ue(g))}function ue(g){F("emit readable"),g.emit("readable"),ee(g)}function Ye(g,b){b.readingMore||(b.readingMore=!0,R.nextTick(Ne,g,b))}function Ne(g,b){for(var q=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=b.length?(q=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),b.buffer.clear()):q=function Me(g,b,q){var ne;return gh.length?h.length:g;if(A+=u===h.length?h:h.slice(0,g),0==(g-=u)){u===h.length?(++ne,b.head=q.next?q.next:b.tail=null):(b.head=q,q.data=h.slice(u));break}++ne}return b.length-=ne,A}(g,b):function $(g,b){var q=I.allocUnsafe(g),ne=b.head,A=1;for(ne.data.copy(q),g-=ne.data.length;ne=ne.next;){var h=ne.data,u=g>h.length?h.length:g;if(h.copy(q,q.length-g,0,u),0==(g-=u)){u===h.length?(++A,b.head=ne.next?ne.next:b.tail=null):(b.head=ne,ne.data=h.slice(u));break}++A}return b.length-=A,q}(g,b),ne}(g,b.buffer,b.decoder),q);var q}function ye(g){var b=g._readableState;if(b.length>0)throw new Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,R.nextTick(Ie,b,g))}function Ie(g,b){!g.endEmitted&&0===g.length&&(g.endEmitted=!0,b.readable=!1,b.emit("end"))}function W(g,b){for(var q=0,ne=g.length;q=b.highWaterMark||b.ended))return F("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?ye(this):Fe(this),null;if(0===(g=we(g,b))&&b.ended)return 0===b.length&&ye(this),null;var A,ne=b.needReadable;return F("need readable",ne),(0===b.length||b.length-g0?be(g,b):null)?(b.needReadable=!0,g=0):b.length-=g,0===b.length&&(b.ended||(b.needReadable=!0),q!==g&&b.ended&&ye(this)),null!==A&&this.emit("data",A),A},Y.prototype._read=function(g){this.emit("error",new Error("_read() is not implemented"))},Y.prototype.pipe=function(g,b){var q=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=g;break;case 1:ne.pipes=[ne.pipes,g];break;default:ne.pipes.push(g)}ne.pipesCount+=1,F("pipe count=%d opts=%j",ne.pipesCount,b);var h=b&&!1===b.end||g===T.stdout||g===T.stderr?Bt:p;function u(jn,mi){F("onunpipe"),jn===q&&mi&&!1===mi.hasUnpiped&&(mi.hasUnpiped=!0,function pe(){F("cleanup"),g.removeListener("close",Vt),g.removeListener("finish",nn),g.removeListener("drain",L),g.removeListener("error",vt),g.removeListener("unpipe",u),q.removeListener("end",p),q.removeListener("end",Bt),q.removeListener("data",Ze),Z=!0,ne.awaitDrain&&(!g._writableState||g._writableState.needDrain)&&L()}())}function p(){F("onend"),g.end()}ne.endEmitted?R.nextTick(h):q.once("end",h),g.on("unpipe",u);var L=function Re(g){return function(){var b=g._readableState;F("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&v(g,"data")&&(b.flowing=!0,ee(g))}}(q);g.on("drain",L);var Z=!1;var Se=!1;function Ze(jn){F("ondata"),Se=!1,!1===g.write(jn)&&!Se&&((1===ne.pipesCount&&ne.pipes===g||ne.pipesCount>1&&-1!==W(ne.pipes,g))&&!Z&&(F("false write response, pause",q._readableState.awaitDrain),q._readableState.awaitDrain++,Se=!0),q.pause())}function vt(jn){F("onerror",jn),Bt(),g.removeListener("error",vt),0===v(g,"error")&&g.emit("error",jn)}function Vt(){g.removeListener("finish",nn),Bt()}function nn(){F("onfinish"),g.removeListener("close",Vt),Bt()}function Bt(){F("unpipe"),q.unpipe(g)}return q.on("data",Ze),function de(g,b,q){if("function"==typeof g.prependListener)return g.prependListener(b,q);g._events&&g._events[b]?D(g._events[b])?g._events[b].unshift(q):g._events[b]=[q,g._events[b]]:g.on(b,q)}(g,"error",vt),g.once("close",Vt),g.once("finish",nn),g.emit("pipe",q),ne.flowing||(F("pipe resume"),q.resume()),g},Y.prototype.unpipe=function(g){var b=this._readableState,q={hasUnpiped:!1};if(0===b.pipesCount)return this;if(1===b.pipesCount)return g&&g!==b.pipes||(g||(g=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,g&&g.emit("unpipe",this,q)),this;if(!g){var ne=b.pipes,A=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var h=0;h-1?R:D.nextTick;de.WritableState=G;var I=Object.create(V("core-util-is"));I.inherits=V("inherits");var z={deprecate:V("util-deprecate")},C=V("./internal/streams/stream"),P=V("safe-buffer").Buffer,M=S.Uint8Array||function(){};var oe,B=V("./internal/streams/destroy");function Q(){}function G(U,ee){_=_||V("./_stream_duplex");var be=ee instanceof _;this.objectMode=!!(U=U||{}).objectMode,be&&(this.objectMode=this.objectMode||!!U.writableObjectMode);var Me=U.highWaterMark,ie=U.writableHighWaterMark;this.highWaterMark=Me||0===Me?Me:be&&(ie||0===ie)?ie:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===U.decodeStrings),this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ie){!function fe(U,ee){var be=U._writableState,Me=be.sync,ie=be.writecb;if(function J(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}(be),ee)!function se(U,ee,be,Me,ie){--ee.pendingcb,be?(D.nextTick(ie,Me),D.nextTick(Re,U,ee),U._writableState.errorEmitted=!0,U.emit("error",Me)):(ie(Me),U._writableState.errorEmitted=!0,U.emit("error",Me),Re(U,ee))}(U,be,Me,ee,ie);else{var $=ue(be);!$&&!be.corked&&!be.bufferProcessing&&be.bufferedRequest&&Fe(U,be),Me?v(we,U,be,$,ie):we(U,be,$,ie)}}(ee,Ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new y(this)}function de(U){if(_=_||V("./_stream_duplex"),!(oe.call(de,this)||this instanceof _))return new de(U);this._writableState=new G(U,this),this.writable=!0,U&&("function"==typeof U.write&&(this._write=U.write),"function"==typeof U.writev&&(this._writev=U.writev),"function"==typeof U.destroy&&(this._destroy=U.destroy),"function"==typeof U.final&&(this._final=U.final)),C.call(this)}function N(U,ee,be,Me,ie,$){if(!be){var ye=function H(U,ee,be){return!U.objectMode&&!1!==U.decodeStrings&&"string"==typeof ee&&(ee=P.from(ee,be)),ee}(ee,Me,ie);Me!==ye&&(be=!0,ie="buffer",Me=ye)}var Ie=ee.objectMode?1:Me.length;ee.length+=Ie;var W=ee.length-1))throw new TypeError("Unknown encoding: "+ee);return this._writableState.defaultEncoding=ee,this},Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),de.prototype._write=function(U,ee,be){be(new Error("_write() is not implemented"))},de.prototype._writev=null,de.prototype.end=function(U,ee,be){var Me=this._writableState;"function"==typeof U?(be=U,U=null,ee=null):"function"==typeof ee&&(be=ee,ee=null),null!=U&&this.write(U,ee),Me.corked&&(Me.corked=1,this.uncork()),!Me.ending&&!Me.finished&&function ge(U,ee,be){ee.ending=!0,Re(U,ee),be&&(ee.finished?D.nextTick(be):U.once("finish",be)),ee.ended=!0,U.writable=!1}(this,Me,be)},Object.defineProperty(de.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(U){!this._writableState||(this._writableState.destroyed=U)}}),de.prototype.destroy=B.destroy,de.prototype._undestroy=B.undestroy,de.prototype._destroy=function(U,ee){this.end(),ee(U)}}).call(this)}).call(this,V("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},V("timers").setImmediate)},{"./_stream_duplex":22,"./internal/streams/destroy":28,"./internal/streams/stream":29,_process:69,"core-util-is":18,inherits:34,"process-nextick-args":45,"safe-buffer":31,timers:74,"util-deprecate":65}],27:[function(V,X,re){"use strict";var S=V("safe-buffer").Buffer,R=V("util");function D(m,y,v){m.copy(y,v)}X.exports=function(){function m(){(function T(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")})(this,m),this.head=null,this.tail=null,this.length=0}return m.prototype.push=function(v){var _={data:v,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length},m.prototype.unshift=function(v){var _={data:v,next:this.head};0===this.length&&(this.tail=_),this.head=_,++this.length},m.prototype.shift=function(){if(0!==this.length){var v=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,v}},m.prototype.clear=function(){this.head=this.tail=null,this.length=0},m.prototype.join=function(v){if(0===this.length)return"";for(var _=this.head,I=""+_.data;_=_.next;)I+=v+_.data;return I},m.prototype.concat=function(v){if(0===this.length)return S.alloc(0);if(1===this.length)return this.head.data;for(var _=S.allocUnsafe(v>>>0),I=this.head,z=0;I;)D(I.data,_,z),z+=I.data.length,I=I.next;return _},m}(),R&&R.inspect&&R.inspect.custom&&(X.exports.prototype[R.inspect.custom]=function(){var m=R.inspect({length:this.length});return this.constructor.name+" "+m})},{"safe-buffer":31,util:2}],28:[function(V,X,re){"use strict";var T=V("process-nextick-args");function D(m,y){m.emit("error",y)}X.exports={destroy:function S(m,y){var v=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(y?y(m):m&&(!this._writableState||!this._writableState.errorEmitted)&&T.nextTick(D,this,m),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,function(z){!y&&z?(T.nextTick(D,v,z),v._writableState&&(v._writableState.errorEmitted=!0)):y&&y(z)}),this)},undestroy:function R(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":45}],29:[function(V,X,re){X.exports=V("events").EventEmitter},{events:4}],30:[function(V,X,re){(re=X.exports=V("./lib/_stream_readable.js")).Stream=re,re.Readable=re,re.Writable=V("./lib/_stream_writable.js"),re.Duplex=V("./lib/_stream_duplex.js"),re.Transform=V("./lib/_stream_transform.js"),re.PassThrough=V("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":22,"./lib/_stream_passthrough.js":23,"./lib/_stream_readable.js":24,"./lib/_stream_transform.js":25,"./lib/_stream_writable.js":26}],31:[function(V,X,re){var T=V("buffer"),S=T.Buffer;function R(m,y){for(var v in m)y[v]=m[v]}function D(m,y,v){return S(m,y,v)}S.from&&S.alloc&&S.allocUnsafe&&S.allocUnsafeSlow?X.exports=T:(R(T,re),re.Buffer=D),R(S,D),D.from=function(m,y,v){if("number"==typeof m)throw new TypeError("Argument must not be a number");return S(m,y,v)},D.alloc=function(m,y,v){if("number"!=typeof m)throw new TypeError("Argument must be a number");var _=S(m);return void 0!==y?"string"==typeof v?_.fill(y,v):_.fill(y):_.fill(0),_},D.allocUnsafe=function(m){if("number"!=typeof m)throw new TypeError("Argument must be a number");return S(m)},D.allocUnsafeSlow=function(m){if("number"!=typeof m)throw new TypeError("Argument must be a number");return T.SlowBuffer(m)}},{buffer:3}],32:[function(V,X,re){"use strict";var T=V("safe-buffer").Buffer,S=T.isEncoding||function(G){switch((G=""+G)&&G.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function m(G){var oe;switch(this.encoding=function D(G){var oe=function R(G){if(!G)return"utf8";for(var oe;;)switch(G){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return G;default:if(oe)return;G=(""+G).toLowerCase(),oe=!0}}(G);if("string"!=typeof oe&&(T.isEncoding===S||!S(G)))throw new Error("Unknown encoding: "+G);return oe||G}(G),this.encoding){case"utf16le":this.text=P,this.end=M,oe=4;break;case"utf8":this.fillLast=I,oe=4;break;case"base64":this.text=O,this.end=F,oe=3;break;default:return this.write=B,void(this.end=Q)}this.lastNeed=0,this.lastTotal=0,this.lastChar=T.allocUnsafe(oe)}function y(G){return G<=127?0:G>>5==6?2:G>>4==14?3:G>>3==30?4:G>>6==2?-1:-2}function I(G){var oe=this.lastTotal-this.lastNeed,de=function _(G,oe,de){if(128!=(192&oe[0]))return G.lastNeed=0,"\ufffd";if(G.lastNeed>1&&oe.length>1){if(128!=(192&oe[1]))return G.lastNeed=1,"\ufffd";if(G.lastNeed>2&&oe.length>2&&128!=(192&oe[2]))return G.lastNeed=2,"\ufffd"}}(this,G);return void 0!==de?de:this.lastNeed<=G.length?(G.copy(this.lastChar,oe,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(G.copy(this.lastChar,oe,0,G.length),void(this.lastNeed-=G.length))}function P(G,oe){if((G.length-oe)%2==0){var de=G.toString("utf16le",oe);if(de){var le=de.charCodeAt(de.length-1);if(le>=55296&&le<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=G[G.length-2],this.lastChar[1]=G[G.length-1],de.slice(0,-1)}return de}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=G[G.length-1],G.toString("utf16le",oe,G.length-1)}function M(G){var oe=G&&G.length?this.write(G):"";return this.lastNeed?oe+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):oe}function O(G,oe){var de=(G.length-oe)%3;return 0===de?G.toString("base64",oe):(this.lastNeed=3-de,this.lastTotal=3,1===de?this.lastChar[0]=G[G.length-1]:(this.lastChar[0]=G[G.length-2],this.lastChar[1]=G[G.length-1]),G.toString("base64",oe,G.length-de))}function F(G){var oe=G&&G.length?this.write(G):"";return this.lastNeed?oe+this.lastChar.toString("base64",0,3-this.lastNeed):oe}function B(G){return G.toString(this.encoding)}function Q(G){return G&&G.length?this.write(G):""}re.StringDecoder=m,m.prototype.write=function(G){if(0===G.length)return"";var oe,de;if(this.lastNeed){if(void 0===(oe=this.fillLast(G)))return"";de=this.lastNeed,this.lastNeed=0}else de=0;return de=0?(Y>0&&(G.lastNeed=Y-1),Y):--le=0?(Y>0&&(G.lastNeed=Y-2),Y):--le=0?(Y>0&&(2===Y?Y=0:G.lastNeed=Y-3),Y):0}(this,G,oe);if(!this.lastNeed)return G.toString("utf8",oe);this.lastTotal=de;var le=G.length-(de-this.lastNeed);return G.copy(this.lastChar,0,le),G.toString("utf8",oe,le)},m.prototype.fillLast=function(G){if(this.lastNeed<=G.length)return G.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);G.copy(this.lastChar,this.lastTotal-this.lastNeed,0,G.length),this.lastNeed-=G.length}},{"safe-buffer":31}],33:[function(V,X,re){(function(T){(function(){var S=V("once"),R=function(){},y=function(v,_,I){if("function"==typeof _)return y(v,null,_);_||(_={}),I=S(I||R);var z=v._writableState,C=v._readableState,P=_.readable||!1!==_.readable&&v.readable,M=_.writable||!1!==_.writable&&v.writable,O=!1,F=function(){v.writable||B()},B=function(){M=!1,P||I.call(v)},Q=function(){P=!1,M||I.call(v)},G=function(H){I.call(v,H?new Error("exited with error code: "+H):null)},oe=function(H){I.call(v,H)},de=function(){T.nextTick(le)},le=function(){if(!O){if(P&&(!C||!C.ended||C.destroyed))return I.call(v,new Error("premature close"));if(M&&(!z||!z.ended||z.destroyed))return I.call(v,new Error("premature close"))}},Y=function(){v.req.on("finish",B)};return function(v){return v.setHeader&&"function"==typeof v.abort}(v)?(v.on("complete",B),v.on("abort",de),v.req?Y():v.on("request",Y)):M&&!z&&(v.on("end",F),v.on("close",F)),function(v){return v.stdio&&Array.isArray(v.stdio)&&3===v.stdio.length}(v)&&v.on("exit",G),v.on("end",Q),v.on("finish",B),!1!==_.error&&v.on("error",oe),v.on("close",de),function(){O=!0,v.removeListener("complete",B),v.removeListener("abort",de),v.removeListener("request",Y),v.req&&v.req.removeListener("finish",B),v.removeListener("end",F),v.removeListener("close",F),v.removeListener("finish",B),v.removeListener("exit",G),v.removeListener("end",Q),v.removeListener("error",oe),v.removeListener("close",de)}};X.exports=y}).call(this)}).call(this,V("_process"))},{_process:69,once:44}],34:[function(V,X,re){X.exports="function"==typeof Object.create?function(S,R){R&&(S.super_=R,S.prototype=Object.create(R.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}))}:function(S,R){if(R){S.super_=R;var D=function(){};D.prototype=R.prototype,S.prototype=new D,S.prototype.constructor=S}}},{}],35:[function(V,X,re){var T={}.toString;X.exports=Array.isArray||function(S){return"[object Array]"==T.call(S)}},{}],36:[function(V,X,re){(function(T){(function(){const S=X.exports;S.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},S.codes={};for(const D in S.types)S.codes[S.types[D]]=D;S.CMD_SHIFT=4,S.CMD_MASK=240,S.DUP_MASK=8,S.QOS_MASK=3,S.QOS_SHIFT=1,S.RETAIN_MASK=1,S.VARBYTEINT_MASK=127,S.VARBYTEINT_FIN_MASK=128,S.VARBYTEINT_MAX=268435455,S.SESSIONPRESENT_MASK=1,S.SESSIONPRESENT_HEADER=T.from([S.SESSIONPRESENT_MASK]),S.CONNACK_HEADER=T.from([S.codes.connack<[0,1].map(y=>[0,1].map(v=>{const _=T.alloc(1);return _.writeUInt8(S.codes[D]<T.from([D])),S.EMPTY={pingreq:T.from([S.codes.pingreq<<4,0]),pingresp:T.from([S.codes.pingresp<<4,0]),disconnect:T.from([S.codes.disconnect<<4,0])}}).call(this)}).call(this,V("buffer").Buffer)},{buffer:3}],37:[function(V,X,re){(function(T){(function(){const S=V("./writeToStream"),R=V("events");class m extends R{constructor(){super(),this._array=new Array(20),this._i=0}write(v){return this._array[this._i++]=v,!0}concat(){let v=0;const _=new Array(this._array.length),I=this._array;let C,z=0;for(C=0;C>8,0),z.writeUInt8(255&I,1),z}X.exports={cache:R,generateCache:function y(){for(let I=0;I<65536;I++)R[I]=m(I)},generateNumber:m,genBufVariableByteInt:function v(I){let C=0,P=0;const M=T.allocUnsafe(4);do{C=I%128|0,(I=I/128|0)>0&&(C|=128),M.writeUInt8(C,P++)}while(I>0&&P<4);return I>0&&(P=0),D?M.subarray(0,P):M.slice(0,P)},generate4ByteBuffer:function _(I){const z=T.allocUnsafe(4);return z.writeUInt32BE(I,0),z}}}).call(this)}).call(this,V("buffer").Buffer)},{buffer:3}],40:[function(V,X,re){X.exports=class T{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},{}],41:[function(V,X,re){const T=V("bl"),S=V("events"),R=V("./packet"),D=V("./constants"),m=V("debug")("mqtt-packet:parser");class y extends S{constructor(){super(),this.parser=this.constructor.parser}static parser(_){return this instanceof y?(this.settings=_||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new y).parser(_)}_resetState(){m("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new R,this.error=null,this._list=T(),this._stateCounter=0}parse(_){for(this.error&&this._resetState(),this._list.append(_),m("parse: current state: %s",this._states[this._stateCounter]);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,m("parse: state complete. _stateCounter is now: %d",this._stateCounter),m("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return m("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const _=this._list.readUInt8(0);return this.packet.cmd=D.types[_>>D.CMD_SHIFT],this.packet.retain=0!=(_&D.RETAIN_MASK),this.packet.qos=_>>D.QOS_SHIFT&D.QOS_MASK,this.packet.dup=0!=(_&D.DUP_MASK),m("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const _=this._parseVarByteNum(!0);return _&&(this.packet.length=_.value,this._list.consume(_.bytes)),m("_parseLength %d",_.value),!!_}_parsePayload(){m("_parsePayload: payload %O",this._list);let _=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}_=!0}return m("_parsePayload complete result: %s",_),_}_parseConnect(){let _,I,z,C;m("_parseConnect");const P={},M=this.packet,O=this._parseString();if(null===O)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==O&&"MQIsdp"!==O)return this._emitError(new Error("Invalid protocolId"));if(M.protocolId=O,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(M.protocolVersion=this._list.readUInt8(this._pos),M.protocolVersion>=128&&(M.bridgeMode=!0,M.protocolVersion=M.protocolVersion-128),3!==M.protocolVersion&&4!==M.protocolVersion&&5!==M.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(P.username=this._list.readUInt8(this._pos)&D.USERNAME_MASK,P.password=this._list.readUInt8(this._pos)&D.PASSWORD_MASK,P.will=this._list.readUInt8(this._pos)&D.WILL_FLAG_MASK,P.will&&(M.will={},M.will.retain=0!=(this._list.readUInt8(this._pos)&D.WILL_RETAIN_MASK),M.will.qos=(this._list.readUInt8(this._pos)&D.WILL_QOS_MASK)>>D.WILL_QOS_SHIFT),M.clean=0!=(this._list.readUInt8(this._pos)&D.CLEAN_SESSION_MASK),this._pos++,M.keepalive=this._parseNum(),-1===M.keepalive)return this._emitError(new Error("Packet too short"));if(5===M.protocolVersion){const B=this._parseProperties();Object.getOwnPropertyNames(B).length&&(M.properties=B)}const F=this._parseString();if(null===F)return this._emitError(new Error("Packet too short"));if(M.clientId=F,m("_parseConnect: packet.clientId: %s",M.clientId),P.will){if(5===M.protocolVersion){const B=this._parseProperties();Object.getOwnPropertyNames(B).length&&(M.will.properties=B)}if(_=this._parseString(),null===_)return this._emitError(new Error("Cannot parse will topic"));if(M.will.topic=_,m("_parseConnect: packet.will.topic: %s",M.will.topic),I=this._parseBuffer(),null===I)return this._emitError(new Error("Cannot parse will payload"));M.will.payload=I,m("_parseConnect: packet.will.paylaod: %s",M.will.payload)}if(P.username){if(C=this._parseString(),null===C)return this._emitError(new Error("Cannot parse username"));M.username=C,m("_parseConnect: packet.username: %s",M.username)}if(P.password){if(z=this._parseBuffer(),null===z)return this._emitError(new Error("Cannot parse password"));M.password=z}return this.settings=M,m("_parseConnect: complete"),M}_parseConnack(){m("_parseConnack");const _=this.packet;if(this._list.length<1)return null;if(_.sessionPresent=!!(this._list.readUInt8(this._pos++)&D.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)_.reasonCode=this._list.length>=2?this._list.readUInt8(this._pos++):0;else{if(this._list.length<2)return null;_.returnCode=this._list.readUInt8(this._pos++)}if(-1===_.returnCode||-1===_.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}m("_parseConnack: complete")}_parsePublish(){m("_parsePublish");const _=this.packet;if(_.topic=this._parseString(),null===_.topic)return this._emitError(new Error("Cannot parse topic"));if(!(_.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}_.payload=this._list.slice(this._pos,_.length),m("_parsePublish: payload from buffer list: %o",_.payload)}}_parseSubscribe(){m("_parseSubscribe");const _=this.packet;let I,z,C,P,M,O,F;if(1!==_.qos)return this._emitError(new Error("Wrong subscribe header"));if(_.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const B=this._parseProperties();Object.getOwnPropertyNames(B).length&&(_.properties=B)}for(;this._pos<_.length;){if(I=this._parseString(),null===I)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=_.length)return this._emitError(new Error("Malformed Subscribe Payload"));z=this._parseByte(),C=z&D.SUBSCRIBE_OPTIONS_QOS_MASK,O=0!=(z>>D.SUBSCRIBE_OPTIONS_NL_SHIFT&D.SUBSCRIBE_OPTIONS_NL_MASK),M=0!=(z>>D.SUBSCRIBE_OPTIONS_RAP_SHIFT&D.SUBSCRIBE_OPTIONS_RAP_MASK),P=z>>D.SUBSCRIBE_OPTIONS_RH_SHIFT&D.SUBSCRIBE_OPTIONS_RH_MASK,F={topic:I,qos:C},5===this.settings.protocolVersion?(F.nl=O,F.rap=M,F.rh=P):this.settings.bridgeMode&&(F.rh=0,F.rap=!0,F.nl=!0),m("_parseSubscribe: push subscription `%s` to subscription",F),_.subscriptions.push(F)}}}_parseSuback(){m("_parseSuback");const _=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}for(;this._pos2?(_.reasonCode=this._parseByte(),m("_parseConfirmation: packet.reasonCode `%d`",_.reasonCode)):_.reasonCode=0,_.length>3)){const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}return!0}_parseDisconnect(){const _=this.packet;if(m("_parseDisconnect"),5===this.settings.protocolVersion){_.reasonCode=this._list.length>0?this._parseByte():0;const I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(_.properties=I)}return m("_parseDisconnect result: true"),!0}_parseAuth(){m("_parseAuth");const _=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));_.reasonCode=this._parseByte();const I=this._parseProperties();return Object.getOwnPropertyNames(I).length&&(_.properties=I),m("_parseAuth: result: true"),!0}_parseMessageId(){const _=this.packet;return _.messageId=this._parseNum(),null===_.messageId?(this._emitError(new Error("Cannot parse messageId")),!1):(m("_parseMessageId: packet.messageId %d",_.messageId),!0)}_parseString(_){const I=this._parseNum(),z=I+this._pos;if(-1===I||z>this._list.length||z>this.packet.length)return null;const C=this._list.toString("utf8",this._pos,z);return this._pos+=I,m("_parseString: result: %s",C),C}_parseStringPair(){return m("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const _=this._parseNum(),I=_+this._pos;if(-1===_||I>this._list.length||I>this.packet.length)return null;const z=this._list.slice(this._pos,I);return this._pos+=_,m("_parseBuffer: result: %o",z),z}_parseNum(){if(this._list.length-this._pos<2)return-1;const _=this._list.readUInt16BE(this._pos);return this._pos+=2,m("_parseNum: result: %s",_),_}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const _=this._list.readUInt32BE(this._pos);return this._pos+=4,m("_parse4ByteNum: result: %s",_),_}_parseVarByteNum(_){m("_parseVarByteNum");let O,z=0,C=1,P=0,M=!1;const F=this._pos?this._pos:0;for(;z<4&&F+z=z&&this._emitError(new Error("Invalid variable byte integer")),F&&(this._pos+=z),M=!!M&&(_?{bytes:z,value:P}:P),m("_parseVarByteNum: result: %o",M),M}_parseByte(){let _;return this._pos=4)&&(A||q))L+=T.byteLength(A)+2;else{if(g<4)return $.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*q==0)return $.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!=typeof ne||ne<0||ne>65535||ne%1!=0)return $.emit("error",new Error("Invalid keepalive")),!1;if(L+=2,L+=1,5===g){var Z=ge($,p);if(!Z)return!1;L+=Z.length}if(b){if("object"!=typeof b)return $.emit("error",new Error("Invalid will")),!1;if(!b.topic||"string"!=typeof b.topic)return $.emit("error",new Error("Invalid will topic")),!1;if(L+=T.byteLength(b.topic)+2,L+=2,b.payload){if(!(b.payload.length>=0))return $.emit("error",new Error("Invalid will payload")),!1;L+="string"==typeof b.payload?T.byteLength(b.payload):b.payload.length}var pe={};if(5===g){if(!(pe=ge($,b.properties)))return!1;L+=pe.length}}let Se=!1;if(null!=h){if(!Me(h))return $.emit("error",new Error("Invalid username")),!1;Se=!0,L+=T.byteLength(h)+2}if(null!=u){if(!Se)return $.emit("error",new Error("Username is required to use password")),!1;if(!Me(u))return $.emit("error",new Error("Invalid password")),!1;L+=be(u)+2}$.write(S.CONNECT_HEADER),we($,L),Re($,W),Ie.bridgeMode&&(g+=128),$.write(131===g?S.VERSION131:132===g?S.VERSION132:4===g?S.VERSION4:5===g?S.VERSION5:S.VERSION3);let Ze=0;return Ze|=null!=h?S.USERNAME_MASK:0,Ze|=null!=u?S.PASSWORD_MASK:0,Ze|=b&&b.retain?S.WILL_RETAIN_MASK:0,Ze|=b&&b.qos?b.qos<0&&M($,A),null!=p&&p.write(),v("publish: payload: %o",ne),$.write(ne)}(ie,$,ye);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function de(ie,$,ye){const Ie=ye?ye.protocolVersion:4,W=ie||{},g=W.cmd||"puback",b=W.messageId,q=W.dup&&"pubrel"===g?S.DUP_MASK:0;let ne=0;const A=W.reasonCode,h=W.properties;let u=5===Ie?3:2;if("pubrel"===g&&(ne=1),"number"!=typeof b)return $.emit("error",new Error("Invalid messageId")),!1;let p=null;if(5===Ie&&"object"==typeof h){if(p=ve($,h,ye,u),!p)return!1;u+=p.length}return $.write(S.ACKS[g][ne][q][0]),we($,u),M($,b),5===Ie&&$.write(T.from([A])),null!==p&&p.write(),!0}(ie,$,ye);case"subscribe":return function le(ie,$,ye){v("subscribe: packet: ");const Ie=ye?ye.protocolVersion:4,W=ie||{},g=W.dup?S.DUP_MASK:0,b=W.messageId,q=W.subscriptions,ne=W.properties;let A=0;if("number"!=typeof b)return $.emit("error",new Error("Invalid messageId")),!1;A+=2;let h=null;if(5===Ie){if(h=ge($,ne),!h)return!1;A+=h.length}if("object"!=typeof q||!q.length)return $.emit("error",new Error("Invalid subscriptions")),!1;for(let p=0;p2)return $.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}A+=T.byteLength(L)+2+1}v("subscribe: writing to stream: %o",S.SUBSCRIBE_HEADER),$.write(S.SUBSCRIBE_HEADER[1][g?1:0][0]),we($,A),M($,b),null!==h&&h.write();let u=!0;for(const p of q){const Z=p.qos,pe=+p.nl,Se=+p.rap,Ze=p.rh;let vt;me($,p.topic),vt=S.SUBSCRIBE_OPTIONS_QOS[Z],5===Ie&&(vt|=pe?S.SUBSCRIBE_OPTIONS_NL:0,vt|=Se?S.SUBSCRIBE_OPTIONS_RAP:0,vt|=Ze?S.SUBSCRIBE_OPTIONS_RH[Ze]:0),u=$.write(T.from([vt]))}return u}(ie,$,ye);case"suback":return function Y(ie,$,ye){const Ie=ye?ye.protocolVersion:4,W=ie||{},g=W.messageId,b=W.granted,q=W.properties;let ne=0;if("number"!=typeof g)return $.emit("error",new Error("Invalid messageId")),!1;if(ne+=2,"object"!=typeof b||!b.length)return $.emit("error",new Error("Invalid qos vector")),!1;for(let h=0;hM===ue,set(ie){ie?((!_||0===Object.keys(_).length)&&(O=!0),M=ue):(O=!1,M=Ye)}});const fe={};function we(ie,$){if($>S.VARBYTEINT_MAX)return ie.emit("error",new Error(`Invalid variable byte integer: ${$}`)),!1;let ye=fe[$];return ye||(ye=C($),$<16384&&(fe[$]=ye)),v("writeVarByteInt: writing to stream: %o",ye),ie.write(ye)}function me(ie,$){const ye=T.byteLength($);return M(ie,ye),v("writeString: %s",$),ie.write($,"utf8")}function Fe(ie,$,ye){me(ie,$),me(ie,ye)}function ue(ie,$){return v("writeNumberCached: number: %d",$),v("writeNumberCached: %o",_[$]),ie.write(_[$])}function Ye(ie,$){const ye=I($);return v("writeNumberGenerated: %o",ye),ie.write(ye)}function Re(ie,$){"string"==typeof $?me(ie,$):$?(M(ie,$.length),ie.write($)):M(ie,0)}function ge(ie,$){if("object"!=typeof $||null!=$.length)return{length:1,write(){ee(ie,{},0)}};let ye=0;function Ie(g,b){let ne=0;switch(S.propertiesTypes[g]){case"byte":if("boolean"!=typeof b)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=2;break;case"int8":if("number"!=typeof b||b<0||b>255)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=2;break;case"binary":if(b&&null===b)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=1+T.byteLength(b)+2;break;case"int16":if("number"!=typeof b||b<0||b>65535)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=3;break;case"int32":if("number"!=typeof b||b<0||b>4294967295)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=5;break;case"var":if("number"!=typeof b||b<0||b>268435455)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=1+T.byteLength(C(b));break;case"string":if("string"!=typeof b)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=3+T.byteLength(b.toString());break;case"pair":if("object"!=typeof b)return ie.emit("error",new Error(`Invalid ${g}: ${b}`)),!1;ne+=Object.getOwnPropertyNames(b).reduce((A,h)=>{const u=b[h];return Array.isArray(u)?A+=u.reduce((p,L)=>p+(3+T.byteLength(h.toString())+2+T.byteLength(L.toString())),0):A+=3+T.byteLength(h.toString())+2+T.byteLength(b[h].toString()),A},0);break;default:return ie.emit("error",new Error(`Invalid property ${g}: ${b}`)),!1}return ne}if($)for(const g in $){let b=0,q=0;const ne=$[g];if(Array.isArray(ne))for(let A=0;Ag;){const q=W.shift();if(!q||!$[q])return!1;delete $[q],b=ge(ie,$)}return b}function U(ie,$,ye){switch(S.propertiesTypes[$]){case"byte":ie.write(T.from([S.properties[$]])),ie.write(T.from([+ye]));break;case"int8":ie.write(T.from([S.properties[$]])),ie.write(T.from([ye]));break;case"binary":ie.write(T.from([S.properties[$]])),Re(ie,ye);break;case"int16":ie.write(T.from([S.properties[$]])),M(ie,ye);break;case"int32":ie.write(T.from([S.properties[$]])),function Ne(ie,$){const ye=P($);return v("write4ByteNumber: %o",ye),ie.write(ye)}(ie,ye);break;case"var":ie.write(T.from([S.properties[$]])),we(ie,ye);break;case"string":ie.write(T.from([S.properties[$]])),me(ie,ye);break;case"pair":Object.getOwnPropertyNames(ye).forEach(W=>{const g=ye[W];Array.isArray(g)?g.forEach(b=>{ie.write(T.from([S.properties[$]])),Fe(ie,W.toString(),b.toString())}):(ie.write(T.from([S.properties[$]])),Fe(ie,W.toString(),g.toString()))});break;default:return ie.emit("error",new Error(`Invalid property ${$} value: ${ye}`)),!1}}function ee(ie,$,ye){we(ie,ye);for(const Ie in $)if(Object.prototype.hasOwnProperty.call($,Ie)&&null!==$[Ie]){const W=$[Ie];if(Array.isArray(W))for(let g=0;g=1.5*M;return Math.round(C/M)+" "+O+(F?"s":"")}X.exports=function(C,P){P=P||{};var M=typeof C;if("string"===M&&C.length>0)return function v(C){if(!((C=String(C)).length>100)){var P=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(C);if(P){var M=parseFloat(P[1]);switch((P[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*M;case"weeks":case"week":case"w":return 6048e5*M;case"days":case"day":case"d":return M*D;case"hours":case"hour":case"hrs":case"hr":case"h":return M*R;case"minutes":case"minute":case"mins":case"min":case"m":return M*S;case"seconds":case"second":case"secs":case"sec":case"s":return M*T;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return M;default:return}}}}(C);if("number"===M&&isFinite(C))return P.long?function I(C){var P=Math.abs(C);return P>=D?z(C,P,D,"day"):P>=R?z(C,P,R,"hour"):P>=S?z(C,P,S,"minute"):P>=T?z(C,P,T,"second"):C+" ms"}(C):function _(C){var P=Math.abs(C);return P>=D?Math.round(C/D)+"d":P>=R?Math.round(C/R)+"h":P>=S?Math.round(C/S)+"m":P>=T?Math.round(C/T)+"s":C+"ms"}(C);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(C))}},{}],44:[function(V,X,re){var T=V("wrappy");function S(D){var m=function(){return m.called?m.value:(m.called=!0,m.value=D.apply(this,arguments))};return m.called=!1,m}function R(D){var m=function(){if(m.called)throw new Error(m.onceError);return m.called=!0,m.value=D.apply(this,arguments)};return m.onceError=(D.name||"Function wrapped with `once`")+" shouldn't be called more than once",m.called=!1,m}X.exports=T(S),X.exports.strict=T(R),S.proto=S(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return S(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return R(this)},configurable:!0})})},{wrappy:66}],45:[function(V,X,re){(function(T){(function(){"use strict";X.exports=void 0===T||!T.version||0===T.version.indexOf("v0.")||0===T.version.indexOf("v1.")&&0!==T.version.indexOf("v1.8.")?{nextTick:function S(R,D,m,y){if("function"!=typeof R)throw new TypeError('"callback" argument must be a function');var _,I,v=arguments.length;switch(v){case 0:case 1:return T.nextTick(R);case 2:return T.nextTick(function(){R.call(null,D)});case 3:return T.nextTick(function(){R.call(null,D,m)});case 4:return T.nextTick(function(){R.call(null,D,m,y)});default:for(_=new Array(v-1),I=0;I<_.length;)_[I++]=arguments[I];return T.nextTick(function(){R.apply(null,_)})}}}:T}).call(this)}).call(this,V("_process"))},{_process:69}],46:[function(V,X,re){"use strict";var S={};function R(_,I,z){z||(z=Error);var P=function(M){function O(F,B,Q){return M.call(this,function C(M,O,F){return"string"==typeof I?I:I(M,O,F)}(F,B,Q))||this}return function T(_,I){_.prototype=Object.create(I.prototype),_.prototype.constructor=_,_.__proto__=I}(O,M),O}(z);P.prototype.name=z.name,P.prototype.code=_,S[_]=P}function D(_,I){if(Array.isArray(_)){var z=_.length;return _=_.map(function(C){return String(C)}),z>2?"one of ".concat(I," ").concat(_.slice(0,z-1).join(", "),", or ")+_[z-1]:2===z?"one of ".concat(I," ").concat(_[0]," or ").concat(_[1]):"of ".concat(I," ").concat(_[0])}return"of ".concat(I," ").concat(String(_))}R("ERR_INVALID_OPT_VALUE",function(_,I){return'The value "'+I+'" is invalid for option "'+_+'"'},TypeError),R("ERR_INVALID_ARG_TYPE",function(_,I,z){var C,P;if("string"==typeof I&&function m(_,I,z){return _.substr(!z||z<0?0:+z,I.length)===I}(I,"not ")?(C="must not be",I=I.replace(/^not /,"")):C="must be",function y(_,I,z){return(void 0===z||z>_.length)&&(z=_.length),_.substring(z-I.length,z)===I}(_," argument"))P="The ".concat(_," ").concat(C," ").concat(D(I,"type"));else{var M=function v(_,I,z){return"number"!=typeof z&&(z=0),!(z+I.length>_.length)&&-1!==_.indexOf(I,z)}(_,".")?"property":"argument";P='The "'.concat(_,'" ').concat(M," ").concat(C," ").concat(D(I,"type"))}return P+". Received type ".concat(typeof z)},TypeError),R("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),R("ERR_METHOD_NOT_IMPLEMENTED",function(_){return"The "+_+" method is not implemented"}),R("ERR_STREAM_PREMATURE_CLOSE","Premature close"),R("ERR_STREAM_DESTROYED",function(_){return"Cannot call "+_+" after a stream was destroyed"}),R("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),R("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),R("ERR_STREAM_WRITE_AFTER_END","write after end"),R("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),R("ERR_UNKNOWN_ENCODING",function(_){return"Unknown encoding: "+_},TypeError),R("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),X.exports.codes=S},{}],47:[function(V,X,re){(function(T){(function(){"use strict";var S=Object.keys||function(C){var P=[];for(var M in C)P.push(M);return P};X.exports=_;var R=V("./_stream_readable"),D=V("./_stream_writable");V("inherits")(_,R);for(var m=S(D.prototype),y=0;y0)if("string"!=typeof h&&!Z.objectMode&&Object.getPrototypeOf(h)!==v.prototype&&(h=function I(A){return v.from(A)}(h)),p)Z.endEmitted?E(A,new le):Fe(A,Z,h,!0);else if(Z.ended)E(A,new oe);else{if(Z.destroyed)return!1;Z.reading=!1,Z.decoder&&!u?(h=Z.decoder.write(h),Z.objectMode||0!==h.length?Fe(A,Z,h,!1):ee(A,Z)):Fe(A,Z,h,!1)}else p||(Z.reading=!1,ee(A,Z));return!Z.ended&&(Z.lengthh.highWaterMark&&(h.highWaterMark=function Ne(A){return A>=Ye?A=Ye:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}(A)),A<=h.length?A:h.ended?h.length:(h.needReadable=!0,0))}function ve(A){var h=A._readableState;P("emitReadable",h.needReadable,h.emittedReadable),h.needReadable=!1,h.emittedReadable||(P("emitReadable",h.flowing),h.emittedReadable=!0,T.nextTick(U,A))}function U(A){var h=A._readableState;P("emitReadable_",h.destroyed,h.length,h.ended),!h.destroyed&&(h.length||h.ended)&&(A.emit("readable"),h.emittedReadable=!1),h.needReadable=!h.flowing&&!h.ended&&h.length<=h.highWaterMark,W(A)}function ee(A,h){h.readingMore||(h.readingMore=!0,T.nextTick(be,A,h))}function be(A,h){for(;!h.reading&&!h.ended&&(h.length0,h.resumeScheduled&&!h.paused?h.flowing=!0:A.listenerCount("data")>0&&A.resume()}function $(A){P("readable nexttick read 0"),A.read(0)}function Ie(A,h){P("resume",h.reading),h.reading||A.read(0),h.resumeScheduled=!1,A.emit("resume"),W(A),h.flowing&&!h.reading&&A.read(0)}function W(A){var h=A._readableState;for(P("flow",h.flowing);h.flowing&&null!==A.read(););}function g(A,h){return 0===h.length?null:(h.objectMode?u=h.buffer.shift():!A||A>=h.length?(u=h.decoder?h.buffer.join(""):1===h.buffer.length?h.buffer.first():h.buffer.concat(h.length),h.buffer.clear()):u=h.buffer.consume(A,h.decoder),u);var u}function b(A){var h=A._readableState;P("endReadable",h.endEmitted),h.endEmitted||(h.ended=!0,T.nextTick(q,h,A))}function q(A,h){if(P("endReadableNT",A.endEmitted,A.length),!A.endEmitted&&0===A.length&&(A.endEmitted=!0,h.readable=!1,h.emit("end"),A.autoDestroy)){var u=h._writableState;(!u||u.autoDestroy&&u.finished)&&h.destroy()}}function ne(A,h){for(var u=0,p=A.length;u=h.highWaterMark:h.length>0)||h.ended))return P("read: emitReadable",h.length,h.ended),0===h.length&&h.ended?b(this):ve(this),null;if(0===(A=Re(A,h))&&h.ended)return 0===h.length&&b(this),null;var L,p=h.needReadable;return P("need readable",p),(0===h.length||h.length-A0?g(A,h):null)?(h.needReadable=h.length<=h.highWaterMark,A=0):(h.length-=A,h.awaitDrain=0),0===h.length&&(h.ended||(h.needReadable=!0),u!==A&&h.ended&&b(this)),null!==L&&this.emit("data",L),L},we.prototype._read=function(A){E(this,new de("_read()"))},we.prototype.pipe=function(A,h){var u=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=A;break;case 1:p.pipes=[p.pipes,A];break;default:p.pipes.push(A)}p.pipesCount+=1,P("pipe count=%d opts=%j",p.pipesCount,h);var Z=h&&!1===h.end||A===T.stdout||A===T.stderr?Ii:Se;function pe(Vr,Hr){P("onunpipe"),Vr===u&&Hr&&!1===Hr.hasUnpiped&&(Hr.hasUnpiped=!0,function Vt(){P("cleanup"),A.removeListener("close",jn),A.removeListener("finish",mi),A.removeListener("drain",Ze),A.removeListener("error",Bt),A.removeListener("unpipe",pe),u.removeListener("end",Se),u.removeListener("end",Ii),u.removeListener("data",nn),vt=!0,p.awaitDrain&&(!A._writableState||A._writableState.needDrain)&&Ze()}())}function Se(){P("onend"),A.end()}p.endEmitted?T.nextTick(Z):u.once("end",Z),A.on("unpipe",pe);var Ze=function Me(A){return function(){var u=A._readableState;P("pipeOnDrain",u.awaitDrain),u.awaitDrain&&u.awaitDrain--,0===u.awaitDrain&&m(A,"data")&&(u.flowing=!0,W(A))}}(u);A.on("drain",Ze);var vt=!1;function nn(Vr){P("ondata");var Hr=A.write(Vr);P("dest.write",Hr),!1===Hr&&((1===p.pipesCount&&p.pipes===A||p.pipesCount>1&&-1!==ne(p.pipes,A))&&!vt&&(P("false write response, pause",p.awaitDrain),p.awaitDrain++),u.pause())}function Bt(Vr){P("onerror",Vr),Ii(),A.removeListener("error",Bt),0===m(A,"error")&&E(A,Vr)}function jn(){A.removeListener("finish",mi),Ii()}function mi(){P("onfinish"),A.removeListener("close",jn),Ii()}function Ii(){P("unpipe"),u.unpipe(A)}return u.on("data",nn),function J(A,h,u){if("function"==typeof A.prependListener)return A.prependListener(h,u);A._events&&A._events[h]?Array.isArray(A._events[h])?A._events[h].unshift(u):A._events[h]=[u,A._events[h]]:A.on(h,u)}(A,"error",Bt),A.once("close",jn),A.once("finish",mi),A.emit("pipe",u),p.flowing||(P("pipe resume"),u.resume()),A},we.prototype.unpipe=function(A){var h=this._readableState,u={hasUnpiped:!1};if(0===h.pipesCount)return this;if(1===h.pipesCount)return A&&A!==h.pipes||(A||(A=h.pipes),h.pipes=null,h.pipesCount=0,h.flowing=!1,A&&A.emit("unpipe",this,u)),this;if(!A){var p=h.pipes,L=h.pipesCount;h.pipes=null,h.pipesCount=0,h.flowing=!1;for(var Z=0;Z0,!1!==p.flowing&&this.resume()):"readable"===A&&!p.endEmitted&&!p.readableListening&&(p.readableListening=p.needReadable=!0,p.flowing=!1,p.emittedReadable=!1,P("on readable",p.length,p.reading),p.length?ve(this):p.reading||T.nextTick($,this)),u},we.prototype.removeListener=function(A,h){var u=y.prototype.removeListener.call(this,A,h);return"readable"===A&&T.nextTick(ie,this),u},we.prototype.removeAllListeners=function(A){var h=y.prototype.removeAllListeners.apply(this,arguments);return("readable"===A||void 0===A)&&T.nextTick(ie,this),h},we.prototype.resume=function(){var A=this._readableState;return A.flowing||(P("resume"),A.flowing=!A.readableListening,function ye(A,h){h.resumeScheduled||(h.resumeScheduled=!0,T.nextTick(Ie,A,h))}(this,A)),A.paused=!1,this},we.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},we.prototype.wrap=function(A){var h=this,u=this._readableState,p=!1;for(var L in A.on("end",function(){if(P("wrapped end"),u.decoder&&!u.ended){var pe=u.decoder.end();pe&&pe.length&&h.push(pe)}h.push(null)}),A.on("data",function(pe){P("wrapped data"),u.decoder&&(pe=u.decoder.write(pe)),u.objectMode&&null==pe||!(u.objectMode||pe&&pe.length)||h.push(pe)||(p=!0,A.pause())}),A)void 0===this[L]&&"function"==typeof A[L]&&(this[L]=function(Se){return function(){return A[Se].apply(A,arguments)}}(L));for(var Z=0;Z-1))throw new H(g);return this._writableState.defaultEncoding=g,this},Object.defineProperty(fe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),fe.prototype._write=function(W,g,b){b(new Q("_write()"))},fe.prototype._writev=null,fe.prototype.end=function(W,g,b){var q=this._writableState;return"function"==typeof W?(b=W,W=null,g=null):"function"==typeof g&&(b=g,g=null),null!=W&&this.write(W,g),q.corked&&(q.corked=1,this.uncork()),q.ending||function ye(W,g,b){g.ending=!0,$(W,g),b&&(g.finished?T.nextTick(b):W.once("finish",b)),g.ended=!0,W.writable=!1}(this,q,b),this},Object.defineProperty(fe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(fe.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(g){!this._writableState||(this._writableState.destroyed=g)}}),fe.prototype.destroy=P.destroy,fe.prototype._undestroy=P.undestroy,fe.prototype._destroy=function(W,g){g(W)}}).call(this)}).call(this,V("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":46,"./_stream_duplex":47,"./internal/streams/destroy":54,"./internal/streams/state":58,"./internal/streams/stream":59,_process:69,buffer:3,inherits:34,"util-deprecate":65}],52:[function(V,X,re){(function(T){(function(){"use strict";var S;function R(oe,de,le){return de in oe?Object.defineProperty(oe,de,{value:le,enumerable:!0,configurable:!0,writable:!0}):oe[de]=le,oe}var D=V("./end-of-stream"),m=Symbol("lastResolve"),y=Symbol("lastReject"),v=Symbol("error"),_=Symbol("ended"),I=Symbol("lastPromise"),z=Symbol("handlePromise"),C=Symbol("stream");function P(oe,de){return{value:oe,done:de}}function M(oe){var de=oe[m];if(null!==de){var le=oe[C].read();null!==le&&(oe[I]=null,oe[m]=null,oe[y]=null,de(P(le,!1)))}}function O(oe){T.nextTick(M,oe)}var B=Object.getPrototypeOf(function(){}),Q=Object.setPrototypeOf((R(S={get stream(){return this[C]},next:function(){var de=this,le=this[v];if(null!==le)return Promise.reject(le);if(this[_])return Promise.resolve(P(void 0,!0));if(this[C].destroyed)return new Promise(function(E,se){T.nextTick(function(){de[v]?se(de[v]):E(P(void 0,!0))})});var H,Y=this[I];if(Y)H=new Promise(function F(oe,de){return function(le,Y){oe.then(function(){de[_]?le(P(void 0,!0)):de[z](le,Y)},Y)}}(Y,this));else{var N=this[C].read();if(null!==N)return Promise.resolve(P(N,!1));H=new Promise(this[z])}return this[I]=H,H}},Symbol.asyncIterator,function(){return this}),R(S,"return",function(){var de=this;return new Promise(function(le,Y){de[C].destroy(null,function(H){H?Y(H):le(P(void 0,!0))})})}),S),B);X.exports=function(de){var le,Y=Object.create(Q,(R(le={},C,{value:de,writable:!0}),R(le,m,{value:null,writable:!0}),R(le,y,{value:null,writable:!0}),R(le,v,{value:null,writable:!0}),R(le,_,{value:de._readableState.endEmitted,writable:!0}),R(le,z,{value:function(N,E){var se=Y[C].read();se?(Y[I]=null,Y[m]=null,Y[y]=null,N(P(se,!1))):(Y[m]=N,Y[y]=E)},writable:!0}),le));return Y[I]=null,D(de,function(H){if(H&&"ERR_STREAM_PREMATURE_CLOSE"!==H.code){var N=Y[y];return null!==N&&(Y[I]=null,Y[m]=null,Y[y]=null,N(H)),void(Y[v]=H)}var E=Y[m];null!==E&&(Y[I]=null,Y[m]=null,Y[y]=null,E(P(void 0,!0))),Y[_]=!0}),de.on("readable",O.bind(null,Y)),Y}}).call(this)}).call(this,V("_process"))},{"./end-of-stream":55,_process:69}],53:[function(V,X,re){"use strict";function T(M,O){var F=Object.keys(M);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(M);O&&(B=B.filter(function(Q){return Object.getOwnPropertyDescriptor(M,Q).enumerable})),F.push.apply(F,B)}return F}function R(M,O,F){return O in M?Object.defineProperty(M,O,{value:F,enumerable:!0,configurable:!0,writable:!0}):M[O]=F,M}function m(M,O){for(var F=0;F0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(F){var B={data:F,next:this.head};0===this.length&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(0!==this.length){var F=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,F}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(F){if(0===this.length)return"";for(var B=this.head,Q=""+B.data;B=B.next;)Q+=F+B.data;return Q}},{key:"concat",value:function(F){if(0===this.length)return _.alloc(0);for(var B=_.allocUnsafe(F>>>0),Q=this.head,G=0;Q;)P(Q.data,B,G),G+=Q.data.length,Q=Q.next;return B}},{key:"consume",value:function(F,B){var Q;return Foe.length?oe.length:F;if(G+=de===oe.length?oe:oe.slice(0,F),0==(F-=de)){de===oe.length?(++Q,this.head=B.next?B.next:this.tail=null):(this.head=B,B.data=oe.slice(de));break}++Q}return this.length-=Q,G}},{key:"_getBuffer",value:function(F){var B=_.allocUnsafe(F),Q=this.head,G=1;for(Q.data.copy(B),F-=Q.data.length;Q=Q.next;){var oe=Q.data,de=F>oe.length?oe.length:F;if(oe.copy(B,B.length-F,0,de),0==(F-=de)){de===oe.length?(++G,this.head=Q.next?Q.next:this.tail=null):(this.head=Q,Q.data=oe.slice(de));break}++G}return this.length-=G,B}},{key:C,value:function(F,B){return z(this,function S(M){for(var O=1;O0,function(H){Q||(Q=H),H&&G.forEach(I),!le&&(G.forEach(I),B(Q))})});return O.reduce(z)}},{"../../../errors":46,"./end-of-stream":55}],58:[function(V,X,re){"use strict";var T=V("../../../errors").codes.ERR_INVALID_OPT_VALUE;X.exports={getHighWaterMark:function R(D,m,y,v){var _=function S(D,m,y){return null!=D.highWaterMark?D.highWaterMark:m?D[y]:null}(m,v,y);if(null!=_){if(!isFinite(_)||Math.floor(_)!==_||_<0)throw new T(v?y:"highWaterMark",_);return Math.floor(_)}return D.objectMode?16:16384}}},{"../../../errors":46}],59:[function(V,X,re){arguments[4][29][0].apply(re,arguments)},{dup:29,events:4}],60:[function(V,X,re){(re=X.exports=V("./lib/_stream_readable.js")).Stream=re,re.Readable=re,re.Writable=V("./lib/_stream_writable.js"),re.Duplex=V("./lib/_stream_duplex.js"),re.Transform=V("./lib/_stream_transform.js"),re.PassThrough=V("./lib/_stream_passthrough.js"),re.finished=V("./lib/internal/streams/end-of-stream.js"),re.pipeline=V("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":47,"./lib/_stream_passthrough.js":48,"./lib/_stream_readable.js":49,"./lib/_stream_transform.js":50,"./lib/_stream_writable.js":51,"./lib/internal/streams/end-of-stream.js":55,"./lib/internal/streams/pipeline.js":57}],61:[function(V,X,re){"use strict";function T(R,D,m){var y=this;this._callback=R,this._args=m,this._interval=setInterval(R,D,this._args),this.reschedule=function(v){v||(v=y._interval),y._interval&&clearInterval(y._interval),y._interval=setInterval(y._callback,v,y._args)},this.clear=function(){y._interval&&(clearInterval(y._interval),y._interval=void 0)},this.destroy=function(){y._interval&&clearInterval(y._interval),y._callback=void 0,y._interval=void 0,y._args=void 0}}X.exports=function S(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var R;if(arguments.length>0){R=new Array(arguments.length-2);for(var D=0;D1)for(var G=1;G= 0x80 (not a basic code point)","invalid-input":"Invalid input"},le=Math.floor,Y=String.fromCharCode;function N(ge){throw new RangeError(oe[ge])}function E(ge,ve){for(var U=ge.length,ee=[];U--;)ee[U]=ve(ge[U]);return ee}function se(ge,ve){var U=ge.split("@"),ee="";return U.length>1&&(ee=U[0]+"@",ge=U[1]),ee+E((ge=ge.replace(G,".")).split("."),ve).join(".")}function J(ge){for(var be,Me,ve=[],U=0,ee=ge.length;U=55296&&be<=56319&&U65535&&(U+=Y((ve-=65536)>>>10&1023|55296),ve=56320|1023&ve),U+Y(ve)}).join("")}function we(ge){return ge-48<10?ge-22:ge-65<26?ge-65:ge-97<26?ge-97:_}function me(ge,ve){return ge+22+75*(ge<26)-((0!=ve)<<5)}function Fe(ge,ve,U){var ee=0;for(ge=U?le(ge/700):ge>>1,ge+=le(ge/ve);ge>455;ee+=_)ge=le(ge/35);return le(ee+36*ge/(ge+38))}function ue(ge){var ee,$,ye,Ie,W,g,b,q,ne,A,ve=[],U=ge.length,be=0,Me=128,ie=72;for(($=ge.lastIndexOf("-"))<0&&($=0),ye=0;ye<$;++ye)ge.charCodeAt(ye)>=128&&N("not-basic"),ve.push(ge.charCodeAt(ye));for(Ie=$>0?$+1:0;Ie=U&&N("invalid-input"),((q=we(ge.charCodeAt(Ie++)))>=_||q>le((v-be)/g))&&N("overflow"),be+=q*g,!(q<(ne=b<=ie?1:b>=ie+26?26:b-ie));b+=_)g>le(v/(A=_-ne))&&N("overflow"),g*=A;ie=Fe(be-W,ee=ve.length+1,0==W),le(be/ee)>v-Me&&N("overflow"),Me+=le(be/ee),be%=ee,ve.splice(be++,0,Me)}return fe(ve)}function Ye(ge){var ve,U,ee,be,Me,ie,$,ye,Ie,W,g,q,ne,A,h,b=[];for(q=(ge=J(ge)).length,ve=128,U=0,Me=72,ie=0;ie=ve&&g<$&&($=g);for($-ve>le((v-U)/(ne=ee+1))&&N("overflow"),U+=($-ve)*ne,ve=$,ie=0;iev&&N("overflow"),g==ve){for(ye=U,Ie=_;!(ye<(W=Ie<=Me?1:Ie>=Me+26?26:Ie-Me));Ie+=_)b.push(Y(me(W+(h=ye-W)%(A=_-W),0))),ye=le(h/A);b.push(Y(me(ye,0))),Me=Fe(U,ne,ee==be),U=0,++ee}++U,++ve}return b.join("")}if(y={version:"1.4.1",ucs2:{decode:J,encode:fe},decode:ue,encode:Ye,toASCII:function Re(ge){return se(ge,function(ve){return Q.test(ve)?"xn--"+Ye(ve):ve})},toUnicode:function Ne(ge){return se(ge,function(ve){return B.test(ve)?ue(ve.slice(4).toLowerCase()):ve})}},R&&D)if(X.exports==R)D.exports=y;else for(H in y)y.hasOwnProperty(H)&&(R[H]=y[H]);else S.punycode=y}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],71:[function(V,X,re){"use strict";function T(R,D){return Object.prototype.hasOwnProperty.call(R,D)}X.exports=function(R,D,m,y){m=m||"=";var v={};if("string"!=typeof R||0===R.length)return v;var _=/\+/g;R=R.split(D=D||"&");var I=1e3;y&&"number"==typeof y.maxKeys&&(I=y.maxKeys);var z=R.length;I>0&&z>I&&(z=I);for(var C=0;C=0?(O=P.substr(0,M),F=P.substr(M+1)):(O=P,F=""),B=decodeURIComponent(O),Q=decodeURIComponent(F),T(v,B)?S(v[B])?v[B].push(Q):v[B]=[v[B],Q]:v[B]=Q}return v};var S=Array.isArray||function(R){return"[object Array]"===Object.prototype.toString.call(R)}},{}],72:[function(V,X,re){"use strict";var T=function(m){switch(typeof m){case"string":return m;case"boolean":return m?"true":"false";case"number":return isFinite(m)?m:"";default:return""}};X.exports=function(m,y,v,_){return y=y||"&",v=v||"=",null===m&&(m=void 0),"object"==typeof m?R(D(m),function(I){var z=encodeURIComponent(T(I))+v;return S(m[I])?R(m[I],function(C){return z+encodeURIComponent(T(C))}).join(y):z+encodeURIComponent(T(m[I]))}).join(y):_?encodeURIComponent(T(_))+v+encodeURIComponent(T(m)):""};var S=Array.isArray||function(m){return"[object Array]"===Object.prototype.toString.call(m)};function R(m,y){if(m.map)return m.map(y);for(var v=[],_=0;_=0&&(I._idleTimeoutId=setTimeout(function(){I._onTimeout&&I._onTimeout()},z))},re.setImmediate="function"==typeof T?T:function(I){var z=v++,C=!(arguments.length<2)&&m.call(arguments,1);return y[z]=!0,R(function(){y[z]&&(C?I.apply(null,C):I.call(null),re.clearImmediate(z))}),z},re.clearImmediate="function"==typeof S?S:function(I){delete y[I]}}).call(this)}).call(this,V("timers").setImmediate,V("timers").clearImmediate)},{"process/browser.js":69,timers:74}],75:[function(V,X,re){"use strict";var T=V("punycode"),S=V("./util");function R(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}re.parse=oe,re.resolve=function le(H,N){return oe(H,!1,!0).resolve(N)},re.resolveObject=function Y(H,N){return H?oe(H,!1,!0).resolveObject(N):N},re.format=function de(H){return S.isString(H)&&(H=oe(H)),H instanceof R?H.format():R.prototype.format.call(H)},re.Url=R;var D=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,y=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,_=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),I=["'"].concat(_),z=["%","/","?",";","#"].concat(I),C=["/","?","#"],M=/^[+a-z0-9A-Z_-]{0,63}$/,O=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,F={javascript:!0,"javascript:":!0},B={javascript:!0,"javascript:":!0},Q={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},G=V("querystring");function oe(H,N,E){if(H&&S.isObject(H)&&H instanceof R)return H;var se=new R;return se.parse(H,N,E),se}R.prototype.parse=function(H,N,E){if(!S.isString(H))throw new TypeError("Parameter 'url' must be a string, not "+typeof H);var se=H.indexOf("?"),J=-1!==se&&se127?ye+="x":ye+=$[Ie];if(!ye.match(M)){var g=Me.slice(0,ge),b=Me.slice(ge+1),q=$.match(O);q&&(g.push(q[1]),b.unshift(q[2])),b.length&&(me="/"+b.join(".")+me),this.hostname=g.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),be||(this.hostname=T.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,be&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==me[0]&&(me="/"+me))}if(!F[Ye])for(ge=0,ie=I.length;ge0)&&E.host.split("@"))&&(E.auth=ye.shift(),E.host=E.hostname=ye.shift())),E.search=H.search,E.query=H.query,(!S.isNull(E.pathname)||!S.isNull(E.search))&&(E.path=(E.pathname?E.pathname:"")+(E.search?E.search:"")),E.href=E.format(),E;if(!Me.length)return E.pathname=null,E.path=E.search?"/"+E.search:null,E.href=E.format(),E;for(var Ie=Me.slice(-1)[0],W=(E.host||H.host||Me.length>1)&&("."===Ie||".."===Ie)||""===Ie,g=0,b=Me.length;b>=0;b--)"."===(Ie=Me[b])?Me.splice(b,1):".."===Ie?(Me.splice(b,1),g++):g&&(Me.splice(b,1),g--);if(!ee&&!be)for(;g--;g)Me.unshift("..");ee&&""!==Me[0]&&(!Me[0]||"/"!==Me[0].charAt(0))&&Me.unshift(""),W&&"/"!==Me.join("/").substr(-1)&&Me.push("");var ye,q=""===Me[0]||Me[0]&&"/"===Me[0].charAt(0);return $&&(E.hostname=E.host=q?"":Me.length?Me.shift():"",(ye=!!(E.host&&E.host.indexOf("@")>0)&&E.host.split("@"))&&(E.auth=ye.shift(),E.host=E.hostname=ye.shift())),(ee=ee||E.host&&Me.length)&&!q&&Me.unshift(""),Me.length?E.pathname=Me.join("/"):(E.pathname=null,E.path=null),(!S.isNull(E.pathname)||!S.isNull(E.search))&&(E.path=(E.pathname?E.pathname:"")+(E.search?E.search:"")),E.auth=H.auth||E.auth,E.slashes=E.slashes||H.slashes,E.href=E.format(),E},R.prototype.parseHost=function(){var H=this.host,N=m.exec(H);N&&(":"!==(N=N[0])&&(this.port=N.substr(1)),H=H.substr(0,H.length-N.length)),H&&(this.hostname=H)}},{"./util":76,punycode:70,querystring:73}],76:[function(V,X,re){"use strict";X.exports={isString:function(T){return"string"==typeof T},isObject:function(T){return"object"==typeof T&&null!==T},isNull:function(T){return null===T},isNullOrUndefined:function(T){return null==T}}},{}]},{},[15])(15)},703:js=>{js.exports=function ps(){for(var dt={},Br=0;Br{js(js.s=736)}]); \ No newline at end of file diff --git a/application-services/custom/camera-management/web-ui/src/app/all-pipelines/all-pipelines.component.html b/application-services/custom/camera-management/web-ui/src/app/all-pipelines/all-pipelines.component.html index 58b3f699..c619feba 100644 --- a/application-services/custom/camera-management/web-ui/src/app/all-pipelines/all-pipelines.component.html +++ b/application-services/custom/camera-management/web-ui/src/app/all-pipelines/all-pipelines.component.html @@ -1,4 +1,4 @@ - @@ -11,7 +11,7 @@ - {{item.key}} - {{item.value.info.name}}/{{item.value.info.version}} + {{item.value.camera}} - {{item.value.info.name}}/{{item.value.info.version}} {{item.value.status.state}} @@ -21,7 +21,7 @@ diff --git a/application-services/custom/camera-management/web-ui/src/app/camera-selector/camera-selector.component.html b/application-services/custom/camera-management/web-ui/src/app/camera-selector/camera-selector.component.html index 4ee75c10..761c14e1 100644 --- a/application-services/custom/camera-management/web-ui/src/app/camera-selector/camera-selector.component.html +++ b/application-services/custom/camera-management/web-ui/src/app/camera-selector/camera-selector.component.html @@ -1,35 +1,61 @@ - - - Select a camera - - {{camera.name}} - - +
+ + Select a camera + + + {{camera.name}} + + + +
-
+
+ + Select a video stream + + + {{profile.Token}} ({{profile.VideoEncoderConfiguration.Resolution.Width}}x{{profile.VideoEncoderConfiguration.Resolution.Height}} {{profile.VideoEncoderConfiguration.Encoding}} @ {{profile.VideoEncoderConfiguration.RateControl.FrameRateLimit}} fps) + + + +
- - Select a video stream - - {{profile.Token}} ({{profile.VideoEncoderConfiguration.Resolution.Width}}x{{profile.VideoEncoderConfiguration.Resolution.Height}} {{profile.VideoEncoderConfiguration.Encoding}} @ {{profile.VideoEncoderConfiguration.RateControl.FrameRateLimit}} fps) - - +
+ + Select image format (optional) + + {{fmt.PixelFormat}} + + +
-
+
+ + Select image resolution (optional) + + + {{sz.Size.MaxWidth}}x{{sz.Size.MaxHeight}} + + + +
- - Select a pipeline - - - {{pipeline.name}} - {{pipeline.version}} - - - - +
+ + Select a pipeline + + + {{pipeline.name}} - {{pipeline.version}} + + + + +
diff --git a/application-services/custom/camera-management/web-ui/src/app/camera-selector/camera-selector.component.ts b/application-services/custom/camera-management/web-ui/src/app/camera-selector/camera-selector.component.ts index 3040f9e3..b7f02cc2 100644 --- a/application-services/custom/camera-management/web-ui/src/app/camera-selector/camera-selector.component.ts +++ b/application-services/custom/camera-management/web-ui/src/app/camera-selector/camera-selector.component.ts @@ -1,10 +1,10 @@ -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 import { Component, OnDestroy, OnInit } from '@angular/core'; -import { DataService } from "../services/data.service"; -import { CameraApiService } from "../services/camera-api.service"; -import { EventMqttService } from "../services/event-mqtt.service"; +import { DataService } from '../services/data.service'; +import { CameraApiService } from '../services/camera-api.service'; +import { EventMqttService } from '../services/event-mqtt.service'; @Component({ selector: 'app-camera-selector', @@ -24,24 +24,32 @@ export class CameraSelectorComponent implements OnInit, OnDestroy { ngOnDestroy(): void { } - cameraSelectionChanged(value) { - this.api.updateProfiles(value); + cameraSelectionChanged(value): void { + this.api.updateCameraChanged(value); this.api.refreshPipelineStatus(value, true); } - profileSelectionChanged(value) { + pixelSelectionChanged(value): void { + this.data.imageSizes = this.data.imageFormats[value].FrameSizes; + } + + profileSelectionChanged(value): void { this.api.updatePresets(this.data.selectedCamera, value); } - startPipeline() { - let tokens = this.data.selectedPipeline.split('/') - this.api.startPipeline(this.data.selectedCamera, this.data.selectedProfile, tokens[0], tokens[1]); + startPipeline(): void { + const tokens = this.data.selectedPipeline.split('/'); + if (this.data.cameraIsOnvif()) { + this.api.startOnvifPipeline(this.data.selectedCamera, tokens[0], tokens[1], this.data.selectedProfile); + } else { + this.api.startUSBPipeline(this.data.selectedCamera, tokens[0], tokens[1], this.data.getUSBConfig()); + } } - shouldDisablePipeline() { - return this.data.selectedCamera == undefined - || this.data.selectedProfile == undefined - || (this.data.pipelineMap[this.data.selectedCamera] - && this.data.pipelineMap[this.data.selectedCamera].status.state == 'RUNNING') + shouldDisablePipeline(): boolean { + return this.data.selectedCamera === undefined + || (this.data.selectedProfile === undefined && this.data.cameraIsOnvif()) + || (this.data.pipelineMap[this.data.selectedCamera] !== undefined + && this.data.pipelineMap[this.data.selectedCamera].status.state === 'RUNNING'); } } diff --git a/application-services/custom/camera-management/web-ui/src/app/ptz/ptz.component.html b/application-services/custom/camera-management/web-ui/src/app/ptz/ptz.component.html index fd811053..869acc8e 100644 --- a/application-services/custom/camera-management/web-ui/src/app/ptz/ptz.component.html +++ b/application-services/custom/camera-management/web-ui/src/app/ptz/ptz.component.html @@ -1,4 +1,4 @@ -
@@ -42,8 +42,18 @@
-
diff --git a/application-services/custom/camera-management/web-ui/src/app/ptz/ptz.component.ts b/application-services/custom/camera-management/web-ui/src/app/ptz/ptz.component.ts index b215708e..21a904e0 100644 --- a/application-services/custom/camera-management/web-ui/src/app/ptz/ptz.component.ts +++ b/application-services/custom/camera-management/web-ui/src/app/ptz/ptz.component.ts @@ -1,10 +1,10 @@ -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 import { Component, OnDestroy, OnInit } from '@angular/core'; -import { DataService } from "../services/data.service"; -import { PtzService } from "../services/ptz.service"; -import { CameraApiService } from "../services/camera-api.service"; +import { DataService } from '../services/data.service'; +import { PtzService } from '../services/ptz.service'; +import { CameraApiService } from '../services/camera-api.service'; @Component({ selector: 'app-ptz', @@ -23,11 +23,10 @@ export class PtzComponent implements OnInit, OnDestroy { } isPtzDisabled(): boolean { - return this.data.selectedCamera === undefined || this.data.selectedProfile === undefined; + return this.data.cameraFeatures === undefined || this.data.cameraFeatures.PTZ === false; } isZoomDisabled(): boolean { - // for now, always disable zoom buttons - return true; + return this.data.cameraFeatures === undefined || this.data.cameraFeatures.Zoom === false; } } diff --git a/application-services/custom/camera-management/web-ui/src/app/services/camera-api.service.ts b/application-services/custom/camera-management/web-ui/src/app/services/camera-api.service.ts index 0f3debfa..a856f0ad 100644 --- a/application-services/custom/camera-management/web-ui/src/app/services/camera-api.service.ts +++ b/application-services/custom/camera-management/web-ui/src/app/services/camera-api.service.ts @@ -1,13 +1,19 @@ -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { environment } from '../../environments/environment'; -import { Device, GetPresetsResponse, GetProfilesResponse } from "./camera-api.types"; +import { + CameraFeatures, + Device, + GetImageFormatsResponse, + GetPresetsResponse, + GetProfilesResponse +} from "./camera-api.types"; import { DataService } from "./data.service"; -import { Pipeline, PipelineInfoStatus, PipelineStatus, StartPipelineRequest } from "./pipeline-api.types"; +import { Pipeline, PipelineInfoStatus, PipelineStatus, StartPipelineRequest, USBConfig } from "./pipeline-api.types"; import { ApiLogIgnoreHeader, JsonHeaders } from "../constants"; @Injectable({ @@ -37,28 +43,65 @@ export class CameraApiService { updateCameraList() { this.data.cameras = undefined; + this.data.cameraMap = undefined; this.httpClient .get(this.camerasUrl) .subscribe({ next: data => { this.data.cameras = data; + this.data.cameraMap = new Map(); + for (let camera of data) { + this.data.cameraMap.set(camera.name, camera); + } if (data.length > 0) { this.data.selectedCamera = data[0].name; - this.updateProfiles(this.data.selectedCamera); + this.updateCameraChanged(this.data.selectedCamera); this.refreshPipelineStatus(this.data.selectedCamera, true); } else { this.data.selectedCamera = undefined; } }, error: _ => { this.data.cameras = undefined; + this.data.cameraMap = undefined; } }); } - updateProfiles(cameraName: string) { + clearCameraInfo() { this.data.selectedProfile = undefined; this.data.profiles = undefined; + this.data.selectedPreset = undefined; + this.data.presets = undefined; + this.data.imageFormats = undefined; + this.data.inputPixelFormat = undefined; + this.data.inputImageSize = undefined; + this.data.cameraFeatures = undefined; + } + + updateCameraChanged(cameraName: string) { + this.clearCameraInfo(); + this.updateCameraFeatures(cameraName); + } + + updateCameraFeatures(cameraName: string) { + this.httpClient.get( + this.makeCameraUrl(cameraName, '/features')) + .subscribe({ + next: data => { + this.data.cameraFeatures = data; + if (this.data.cameraIsOnvif()) { + this.updateProfiles(cameraName); + } else if (this.data.cameraIsUSB()) { + this.updateImageFormats(cameraName); + } else { + console.log('error, invalid camera type: ' + data.CameraType) + } + }, error: _ => { + } + }); + } + updateProfiles(cameraName: string) { this.httpClient.get( this.makeCameraUrl(cameraName, '/profiles')) .subscribe({ @@ -74,35 +117,57 @@ export class CameraApiService { } updatePresets(cameraName: string, profileToken: string) { - this.data.presets = undefined; this.httpClient.get( this.makeProfileUrl(cameraName, profileToken, '/presets')) .subscribe({ next: data => { this.data.presets = data.Preset; + this.data.selectedPreset = data.Preset.length > 0 ? data.Preset[0].Token: undefined; }, error: _ => { this.data.presets = undefined; } }); } + updateImageFormats(cameraName: string) { + this.data.imageFormats = undefined; + this.httpClient.get( + this.makeCameraUrl(cameraName, '/imageformats')) + .subscribe({ + next: data => { + this.data.imageFormats = data.ImageFormats; + }, error: _ => { + this.data.imageFormats = undefined; + } + }); + } + gotoPreset(cameraName: string, profileToken: string, presetToken: string) { return this.httpClient.post( this.makePresetUrl(cameraName, profileToken, presetToken), '') .subscribe(); } - startPipeline(cameraName: string, profileToken: string, name: string, version: string) { + startOnvifPipeline(cameraName: string, name: string, version: string, profileToken: string) { + let url = this.makePipelineUrl(cameraName, '/start'); + let req = StartPipelineRequest.forOnvif(name, version, {profile_token: profileToken}); + this.httpClient.post(url, JSON.stringify(req), JsonHeaders).subscribe(_ => { + // todo: do at an interval? + this.refreshPipelineStatus(this.data.selectedCamera, true); + }); + } + + startUSBPipeline(cameraName: string, name: string, version: string, usb: USBConfig) { let url = this.makePipelineUrl(cameraName, '/start'); - let req = new StartPipelineRequest(profileToken, name, version); + let req = StartPipelineRequest.forUSB(name, version, usb); this.httpClient.post(url, JSON.stringify(req), JsonHeaders).subscribe(_ => { // todo: do at an interval? this.refreshPipelineStatus(this.data.selectedCamera, true); }); } - stopPipeline(cameraName: string) { - let url = this.makePipelineUrl(cameraName, '/stop'); + stopPipeline(cameraName: string, id: string) { + let url = this.makePipelineUrl(cameraName, `/stop/${id}`); this.httpClient.post(url, '').subscribe(_ => { this.refreshPipelineStatus(this.data.selectedCamera, true); }); diff --git a/application-services/custom/camera-management/web-ui/src/app/services/camera-api.types.ts b/application-services/custom/camera-management/web-ui/src/app/services/camera-api.types.ts index 74b40587..f67073e5 100644 --- a/application-services/custom/camera-management/web-ui/src/app/services/camera-api.types.ts +++ b/application-services/custom/camera-management/web-ui/src/app/services/camera-api.types.ts @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 export interface GetProfilesResponse { @@ -162,6 +162,11 @@ export interface GetPresetsResponse { Preset: Preset[]; } +export interface GetImageFormatsResponse { + ImageFormats: ImageFormat[]; +} + + export interface AutoEvent { interval: string; onChange: boolean; @@ -200,3 +205,35 @@ export interface Device { autoEvents: AutoEvent[]; protocols: Protocols; } + +export interface Size { + MaxHeight: number; + MaxWidth: number; + MinHeight: number; + MinWidth: number; + StepHeight: number; + StepWidth: number; +} + +export interface FrameSize { + Index: number; + PixelFormat: number; + Size: Size; + Type: number; +} + +export interface ImageFormat { + BufType: number; + Description: string; + Flags: number; + FrameSizes: FrameSize[]; + Index: number; + MbusCode: number; + PixelFormat: string; +} + +export interface CameraFeatures { + PTZ: boolean; + Zoom: boolean; + CameraType: string; +} diff --git a/application-services/custom/camera-management/web-ui/src/app/services/data.service.ts b/application-services/custom/camera-management/web-ui/src/app/services/data.service.ts index 69df3ced..633e94f5 100644 --- a/application-services/custom/camera-management/web-ui/src/app/services/data.service.ts +++ b/application-services/custom/camera-management/web-ui/src/app/services/data.service.ts @@ -2,9 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import { Injectable } from '@angular/core'; -import { HttpRequest, HttpResponseBase } from "@angular/common/http"; -import { Device, Preset, ProfilesEntity } from "./camera-api.types"; -import { Pipeline, PipelineInfoStatus, PipelineStatus } from "./pipeline-api.types"; +import { HttpRequest, HttpResponseBase } from '@angular/common/http'; +import { CameraFeatures, Device, FrameSize, ImageFormat, Preset, ProfilesEntity } from './camera-api.types'; +import { Pipeline, PipelineInfoStatus, PipelineStatus, USBConfig } from './pipeline-api.types'; + +const onvifServiceName = 'device-onvif-camera'; +const usbServiceName = 'device-usb-camera'; /** * Represents a page that users can navigate to, either via @@ -30,10 +33,19 @@ export class APILogItem { }) export class DataService { public cameras: Device[]; + public cameraMap: Map; public selectedCamera: string; + public cameraFeatures: CameraFeatures; public profiles: ProfilesEntity[]; public selectedProfile: string; + public selectedPreset: string; + + // usb config options + public outputVideoQuality: string; + public inputImageSize: number; + public inputPixelFormat: number; + public inputFps: string; public pipelineStatus: PipelineStatus; @@ -43,6 +55,8 @@ export class DataService { public selectedPipeline: string; public presets: Preset[]; + public imageFormats: ImageFormat[]; + public imageSizes: FrameSize[]; public apiLog: APILogItem[]; @@ -61,4 +75,25 @@ export class DataService { this.apiLog = new Array(); this.pipelineMap = new Map(); } + + cameraIsOnvif(): boolean { + if (this.cameraFeatures === undefined) { return false; } + return this.cameraFeatures.CameraType === 'Onvif'; + } + + cameraIsUSB(): boolean { + if (this.cameraFeatures === undefined) { return false; } + return this.cameraFeatures.CameraType === 'USB'; + } + + getUSBConfig(): USBConfig { + const fmt = this.inputPixelFormat ? this.imageFormats[this.inputPixelFormat] : undefined; + const sz = fmt && this.inputImageSize ? fmt.FrameSizes[this.inputImageSize].Size : undefined; + return { + InputFps: this.inputFps, + InputImageSize: sz ? sz.MaxWidth + 'x' + sz.MaxHeight : undefined, + InputPixelFormat: fmt ? fmt.PixelFormat : undefined, + OutputVideoQuality: this.outputVideoQuality + }; + } } diff --git a/application-services/custom/camera-management/web-ui/src/app/services/pipeline-api.types.ts b/application-services/custom/camera-management/web-ui/src/app/services/pipeline-api.types.ts index 8c303993..f26002ef 100644 --- a/application-services/custom/camera-management/web-ui/src/app/services/pipeline-api.types.ts +++ b/application-services/custom/camera-management/web-ui/src/app/services/pipeline-api.types.ts @@ -1,10 +1,10 @@ -// Copyright (C) 2022 Intel Corporation +// Copyright (C) 2022-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 export interface PipelineStatus { avg_fps: number; elapsed_time: number; - id: number; + id: string; start_time: number; state: string; } @@ -24,8 +24,8 @@ export interface PipelineInfo { export interface PipelineInfoStatus { camera: string; - info: PipelineInfo - status: PipelineStatus + info: PipelineInfo; + status: PipelineStatus; } export interface Pipeline { @@ -35,14 +35,41 @@ export interface Pipeline { version: string; } +export interface OnvifConfig { + profile_token: string; +} + +export interface USBConfig { + InputFps?: string; + InputImageSize?: string; + InputPixelFormat?: string; + OutputFrames?: string; + OutputFps?: string; + OutputImageSize?: string; + OutputAspect?: string; + OutputVideoCodec?: string; + OutputVideoQuality?: string; +} + export class StartPipelineRequest { - profile_token: string - pipeline_name: string - pipeline_version: string - - constructor(profile_token: string, pipeline_name: string, pipeline_version: string) { - this.profile_token = profile_token; - this.pipeline_name = pipeline_name; - this.pipeline_version = pipeline_version; + onvif?: OnvifConfig; + usb?: USBConfig; + pipeline_name: string; + pipeline_version: string; + + static forUSB(pipeline_name: string, pipeline_version: string, usb: USBConfig): StartPipelineRequest { + const req = new StartPipelineRequest(); + req.usb = usb; + req.pipeline_name = pipeline_name; + req.pipeline_version = pipeline_version; + return req; + } + + static forOnvif(pipeline_name: string, pipeline_version: string, onvif: OnvifConfig): StartPipelineRequest { + const req = new StartPipelineRequest(); + req.onvif = onvif; + req.pipeline_name = pipeline_name; + req.pipeline_version = pipeline_version; + return req; } } diff --git a/deployment/helm/Makefile b/deployment/helm/Makefile index 033f0e86..9216f47c 100644 --- a/deployment/helm/Makefile +++ b/deployment/helm/Makefile @@ -8,9 +8,29 @@ all: test -checkov: - which checkov > /dev/null 2>&1 || pip3 install checkov +checkov-install: + pip3 install checkov + +trivy-install: + sudo apt-get install wget apt-transport-https gnupg lsb-release + wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add - + echo "deb https://aquasecurity.github.io/trivy-repo/deb $$(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list + sudo apt-get update + sudo apt-get install trivy -test: checkov +checkov: + which checkov > /dev/null 2>&1 || $(MAKE) checkov-install checkov --framework helm -d . +snyk: + helm template . --output dir out + snyk iac test out/ + @rm -fr out/ + +trivy: + which trivy > /dev/null 2>&1 || $(MAKE) trivy-install + trivy config -s CRITICAL,HIGH,MEDIUM . + +test: + echo "Please run $(MAKE) checkov|snyk|trivy" + diff --git a/deployment/helm/README.md b/deployment/helm/README.md index a88682cd..ed5ca8a3 100644 --- a/deployment/helm/README.md +++ b/deployment/helm/README.md @@ -115,7 +115,6 @@ you can implement your customized version based on this. | edgex-device-rest | 59986 | edgex-device-virtual | 59900 | edgex-ui | 4000 -| edgex-sys-mgmt-agent | 58890 | edgex-redis | Not Exposed | edgex-core-consul | 8500 diff --git a/deployment/helm/templates/configmaps/as-common-configmap.yaml b/deployment/helm/templates/configmaps/as-common-configmap.yaml new file mode 100644 index 00000000..7b38ab60 --- /dev/null +++ b/deployment/helm/templates/configmaps/as-common-configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: as-common-variables +data: + DATABASE_HOST: edgex-redis + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST: edgex-redis + TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redis + {{- end}} diff --git a/deployment/helm/templates/configmaps/device-common-configmap.yaml b/deployment/helm/templates/configmaps/device-common-configmap.yaml new file mode 100644 index 00000000..8448593a --- /dev/null +++ b/deployment/helm/templates/configmaps/device-common-configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: device-common-variables +data: + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + MESSAGEQUEUE_HOST: edgex-redis + {{- end}} diff --git a/deployment/helm/templates/edgex-configmap.yaml b/deployment/helm/templates/configmaps/edgex-configmap.yaml similarity index 96% rename from deployment/helm/templates/edgex-configmap.yaml rename to deployment/helm/templates/configmaps/edgex-configmap.yaml index 6ea2c32a..2281aa02 100644 --- a/deployment/helm/templates/edgex-configmap.yaml +++ b/deployment/helm/templates/configmaps/edgex-configmap.yaml @@ -12,9 +12,11 @@ data: CLIENTS_CORE_COMMAND_HOST: {{.Values.edgex.app.core.command}} CLIENTS_SUPPORT_NOTIFICATIONS_HOST: {{.Values.edgex.app.support.notifications}} CLIENTS_SUPPORT_SCHEDULER_HOST: {{.Values.edgex.app.support.scheduler}} - MESSAGEQUEUE_HOST: {{.Values.edgex.app.redis}} REGISTRY_HOST: {{.Values.edgex.app.consul}} DATABASES_PRIMARY_HOST: {{.Values.edgex.app.redis}} +{{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + MESSAGEQUEUE_HOST: {{.Values.edgex.app.redis}} +{{- end}} {{- if .Values.edgex.security.enabled }} EDGEX_SECURITY_SECRET_STORE: "true" SECRETSTORE_HOST: edgex-vault diff --git a/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml new file mode 100644 index 00000000..5afc7965 --- /dev/null +++ b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml @@ -0,0 +1,118 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + name: {{.Values.edgex.app.appservice.externalmqtttrigger}} +spec: + replicas: {{.Values.edgex.replicas.appservice.externalmqtttrigger}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.externalmqtttrigger}} + image: {{.Values.edgex.image.appservice.externalmqtttrigger.repository}}:{{.Values.edgex.image.appservice.externalmqtttrigger.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.externalmqtttrigger.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.externalmqtttrigger}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.appservice.externalmqtttrigger}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + env: + - name: EDGEX_PROFILE + value: "external-mqtt-trigger" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.externalmqtttrigger}} + - name: WRITABLE_LOGLEVEL + value: INFO + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "mqtt") }} + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS + value: "{{.Values.edgex.features.mqttBrokerAddress}}" + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC + value: edgex-export + - name: TRIGGER_EXTERNALMQTT_URL + value: "{{.Values.edgex.features.mqttBrokerAddress}}" + {{- end}} + + + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.externalmqtttrigger}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.externalmqtttrigger}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.externalmqtttrigger.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.externalmqtttrigger.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.externalmqtttrigger.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.externalmqtttrigger.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.externalmqtttrigger.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.externalmqtttrigger}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml new file mode 100644 index 00000000..85874277 --- /dev/null +++ b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + name: {{.Values.edgex.app.appservice.externalmqtttrigger}} +spec: + ports: + - name: "app-mqtt-trigger-http" + port: {{.Values.edgex.port.appservice.externalmqtttrigger}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + type: {{.Values.expose.type.appservice.externalmqtttrigger}} diff --git a/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml new file mode 100644 index 00000000..eae3a2c8 --- /dev/null +++ b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml @@ -0,0 +1,115 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + name: {{.Values.edgex.app.appservice.httpexport}} +spec: + replicas: {{.Values.edgex.replicas.appservice.httpexport}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.httpexport}} + image: {{.Values.edgex.image.appservice.httpexport.repository}}:{{.Values.edgex.image.appservice.httpexport.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.httpexport.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.httpexport}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.appservice.httpexport}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + env: + - name: EDGEX_PROFILE + value: "http-export" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.httpexport}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: WRITABLE_PIPELINE_FUNCTIONS_HTTPEXPORT_PARAMETERS_URL + value: "{{.Values.edgex.features.httpExportURL}}" + - name: WRITABLE_LOGLEVEL + value: INFO + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: as-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.httpexport}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.httpexport}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.httpexport.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.httpexport.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.httpexport.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.httpexport.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.httpexport.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.httpexport}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-service.yaml b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-service.yaml new file mode 100644 index 00000000..695ecf97 --- /dev/null +++ b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + name: {{.Values.edgex.app.appservice.httpexport}} +spec: + ports: + - name: "app-http-export-http" + port: {{.Values.edgex.port.appservice.httpexport}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + type: {{.Values.expose.type.appservice.httpexport}} + diff --git a/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml new file mode 100644 index 00000000..00a84a58 --- /dev/null +++ b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml @@ -0,0 +1,108 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rules}} + name: {{.Values.edgex.app.appservice.metricsinfluxdb}} +spec: + replicas: {{.Values.edgex.replicas.appservice.metricsinfluxdb}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.metricsinfluxdb}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.metricsinfluxdb}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.metricsinfluxdb}} + image: {{.Values.edgex.image.appservice.metricsinfluxdb.repository}}:{{.Values.edgex.image.appservice.metricsinfluxdb.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.metricsinfluxdb.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.metricsinfluxdb}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.appservice.metricsinfluxdb}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: as-common-variables + env: + - name: EDGEX_PROFILE + value: "metrics-influxdb" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.metricsinfluxdb}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + {{end}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.metricsinfluxdb}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.metricsinfluxdb}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.metricsinfluxdb.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.metricsinfluxdb.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.metricsinfluxdb.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.metricsinfluxdb.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.metricsinfluxdb.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.metricsinfluxdb}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-service.yaml b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-service.yaml new file mode 100644 index 00000000..70bfd4cd --- /dev/null +++ b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.metricsinfluxdb}} + name: {{.Values.edgex.app.appservice.metricsinfluxdb}} +spec: + ports: + - name: "app-metrics-influxdb-http" + port: {{.Values.edgex.port.appservice.metricsinfluxdb}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.metricsinfluxdb}} + type: {{.Values.expose.type.appservice.metricsinfluxdb}} diff --git a/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml new file mode 100644 index 00000000..0d0ab636 --- /dev/null +++ b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml @@ -0,0 +1,120 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + name: {{.Values.edgex.app.appservice.mqttexport}} +spec: + replicas: {{.Values.edgex.replicas.appservice.mqttexport}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.mqttexport}} + image: {{.Values.edgex.image.appservice.mqttexport.repository}}:{{.Values.edgex.image.appservice.mqttexport.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.mqttexport.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.mqttexport}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.appservice.mqttexport}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: as-common-variables + env: + - name: EDGEX_PROFILE + value: "mqtt-export" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.mqttexport}} + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS + value: "{{.Values.edgex.features.mqttBrokerAddress}}" + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC + value: edgex-events + - name: WRITABLE_LOGLEVEL + value: INFO + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS + value: {{.Values.edgex.app.redis}} + {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: "{{.Values.edgex.features.mqttBrokerAddress}}" + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC + value: edgex-events + {{- end}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.mqttexport}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.mqttexport}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.mqttexport.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.mqttexport.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.mqttexport.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.mqttexport.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.mqttexport.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.mqttexport}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-service.yaml b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-service.yaml new file mode 100644 index 00000000..ce75c4e3 --- /dev/null +++ b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + name: {{.Values.edgex.app.appservice.mqttexport}} +spec: + ports: + - name: "app-mqtt-export-http" + port: {{.Values.edgex.port.appservice.mqttexport}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + type: {{.Values.expose.type.appservice.mqttexport}} diff --git a/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml new file mode 100644 index 00000000..5b93c86a --- /dev/null +++ b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml @@ -0,0 +1,111 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + name: {{.Values.edgex.app.appservice.rfidllrpinventory}} +spec: + replicas: {{.Values.edgex.replicas.appservice.rfidllrpinventory}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.rfidllrpinventory}} + image: {{.Values.edgex.image.appservice.rfidllrpinventory.repository}}:{{.Values.edgex.image.appservice.rfidllrpinventory.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.rfidllrpinventory.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-rfid-llrp-inventory", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.rfidllrpinventory}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.appservice.rfidllrpinventory}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: as-common-variables + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.rfidllrpinventory}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + {{end}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.rfidllrpinventory}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.rfidllrpinventory}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + - mountPath: /tmp/edgex/edgex-app-rfid-llrp-inventory + name: edgex-app-rfid-llrp-inventory + {{- end }} + {{- if .Values.edgex.resources.appservice.rfidllrpinventory.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.rfidllrpinventory.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.rfidllrpinventory.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.rfidllrpinventory.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.rfidllrpinventory.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.rfidllrpinventory}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + - name: edgex-app-rfid-llrp-inventory + persistentVolumeClaim: + claimName: app-rfid-llrp-inventory + {{- end}} diff --git a/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-service.yaml b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-service.yaml new file mode 100644 index 00000000..d6ff967d --- /dev/null +++ b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + name: {{.Values.edgex.app.appservice.rfidllrpinventory}} +spec: + ports: + - name: "app-rfid-llrp-inventory-http" + port: {{.Values.edgex.port.appservice.rfidllrpinventory}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + type: {{.Values.expose.type.appservice.rfidllrpinventory}} diff --git a/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml new file mode 100644 index 00000000..05b06aec --- /dev/null +++ b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml @@ -0,0 +1,108 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + name: {{.Values.edgex.app.appservice.appsample}} +spec: + replicas: {{.Values.edgex.replicas.appservice.appsample}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.appsample}} + image: {{.Values.edgex.image.appservice.appsample.repository}}:{{.Values.edgex.image.appservice.appsample.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.appsample.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.appsample}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.appservice.appsample}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: as-common-variables + env: + - name: EDGEX_PROFILE + value: "sample" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.appsample}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + {{end}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.appsample}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.appsample}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.appsample.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.appsample.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.appsample.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.appsample.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.appsample.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.appsample}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-sample/edgex-app-sample-service.yaml b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-service.yaml new file mode 100644 index 00000000..966c10af --- /dev/null +++ b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + name: {{.Values.edgex.app.appservice.appsample}} +spec: + ports: + - name: "app-sample-http" + port: {{.Values.edgex.port.appservice.appsample}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + type: {{.Values.expose.type.appservice.appsample}} diff --git a/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml b/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml index 0f8f7802..7381a6de 100644 --- a/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml +++ b/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml @@ -19,7 +19,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.appservice.rules}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -39,9 +39,12 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.appservice.rules}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.appservice.rules}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} envFrom: - configMapRef: @@ -51,10 +54,33 @@ spec: value: "rules-engine" - name: SERVICE_HOST value: {{.Values.edgex.app.appservice.rules}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST value: {{.Values.edgex.app.redis}} - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST value: {{.Values.edgex.app.redis}} + {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: TRIGGER_EDGEXMESSAGEBUS_OPTIONAL_AUTHMODE + value: none + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: edgex-nats-server + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_PORT + value: "4222" + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_PROTOCOL + value: tcp + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_PUBLISHTOPIC + value: edgex/rules-events + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: edgex-nats-server + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_PORT + value: "4222" + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_PROTOCOL + value: tcp + - name: TRIGGER_EDGEXMESSAGEBUS_TYPE + value: nats-jetstream + {{- end}} + securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true @@ -74,6 +100,10 @@ spec: name: edgex-init - mountPath: /tmp/edgex/secrets name: edgex-secrets + - mountPath: /kuiper/etc/sources + name: kuiper-sources + - mountPath: /kuiper/etc/connections + name: kuiper-connections {{- end }} {{- if .Values.edgex.resources.appservice.rules.enforceLimits }} resources: @@ -98,4 +128,10 @@ spec: - name: edgex-secrets persistentVolumeClaim: claimName: edgex-secrets + - name: kuiper-sources + persistentVolumeClaim: + claimName: kuiper-sources + - name: kuiper-connections + persistentVolumeClaim: + claimName: kuiper-connections {{- end}} diff --git a/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-service.yaml b/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-service.yaml index ce08c132..72dab723 100644 --- a/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-service.yaml +++ b/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-service.yaml @@ -10,8 +10,8 @@ metadata: name: {{.Values.edgex.app.appservice.rules}} spec: ports: - - name: "http" + - name: "app-rules-engine-http" port: {{.Values.edgex.port.appservice.rules}} selector: org.edgexfoundry.service: {{.Values.edgex.app.appservice.rules}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.appservice.rules}} diff --git a/deployment/helm/templates/edgex-consul/edgex-consul-deployment.yaml b/deployment/helm/templates/edgex-consul/edgex-consul-deployment.yaml index 75b5833b..097980ec 100644 --- a/deployment/helm/templates/edgex-consul/edgex-consul-deployment.yaml +++ b/deployment/helm/templates/edgex-consul/edgex-consul-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.consul}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -40,8 +40,11 @@ spec: args: ["agent", "-ui", "-bootstrap", "-server", "-client", "0.0.0.0"] ports: - containerPort: {{.Values.edgex.port.consul}} + name: "http" + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.consul}} hostIP: {{.Values.edgex.hostPortExternalBind}} + {{- end}} {{- if .Values.edgex.security.enabled }} env: - name: EDGEX_USER @@ -55,6 +58,8 @@ spec: value: /consul/config/consul_acl_done - name: STAGEGATE_REGISTRY_ACL_BOOTSTRAPTOKENPATH value: /tmp/edgex/secrets/consul-acl-token/bootstrap_token.json + - name: ADD_REGISTRY_ACL_ROLES + value: {{.Values.edgex.security.addConsulRoles}} {{- end }} envFrom: - configMapRef: diff --git a/deployment/helm/templates/edgex-consul/edgex-consul-service.yaml b/deployment/helm/templates/edgex-consul/edgex-consul-service.yaml index b463c037..c3a5d799 100644 --- a/deployment/helm/templates/edgex-consul/edgex-consul-service.yaml +++ b/deployment/helm/templates/edgex-consul/edgex-consul-service.yaml @@ -10,7 +10,7 @@ metadata: name: {{.Values.edgex.app.consul}} spec: ports: - - name: "http" + - name: "consul-http" port: {{.Values.edgex.port.consul}} {{- if .Values.edgex.security.enabled }} - name: "ready" @@ -18,4 +18,4 @@ spec: {{- end }} selector: org.edgexfoundry.service: {{.Values.edgex.app.consul}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.consul}} diff --git a/deployment/helm/templates/edgex-core-command/edgex-core-command-deployment.yaml b/deployment/helm/templates/edgex-core-command/edgex-core-command-deployment.yaml index 3832a757..ce15ea81 100644 --- a/deployment/helm/templates/edgex-core-command/edgex-core-command-deployment.yaml +++ b/deployment/helm/templates/edgex-core-command/edgex-core-command-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.core.command}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -40,13 +40,28 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.core.command}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.core.command}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} env: - name: SERVICE_HOST value: {{.Values.edgex.app.core.command}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_INTERNAL_AUTHMODE + value: none + - name: MESSAGEQUEUE_INTERNAL_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_INTERNAL_PORT + value: "4222" + - name: MESSAGEQUEUE_INTERNAL_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_INTERNAL_TYPE + value: nats-jetstream + {{end}} envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-core-command/edgex-core-command-service.yaml b/deployment/helm/templates/edgex-core-command/edgex-core-command-service.yaml index 8a302472..4b388b31 100644 --- a/deployment/helm/templates/edgex-core-command/edgex-core-command-service.yaml +++ b/deployment/helm/templates/edgex-core-command/edgex-core-command-service.yaml @@ -10,8 +10,8 @@ metadata: name: {{.Values.edgex.app.core.command}} spec: ports: - - name: "http" + - name: "core-command-http" port: {{.Values.edgex.port.core.command}} selector: org.edgexfoundry.service: {{.Values.edgex.app.core.command}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.core.command}} diff --git a/deployment/helm/templates/edgex-core-data/edgex-core-data-deployment.yaml b/deployment/helm/templates/edgex-core-data/edgex-core-data-deployment.yaml index 09e6c8f6..94310cd8 100644 --- a/deployment/helm/templates/edgex-core-data/edgex-core-data-deployment.yaml +++ b/deployment/helm/templates/edgex-core-data/edgex-core-data-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.core.data}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -40,9 +40,12 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.core.data}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.core.data}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} env: - name: SERVICE_HOST @@ -51,6 +54,20 @@ spec: - name: SECRETSTORE_TOKENFILE value: /tmp/edgex/secrets/core-data/secrets-token.json {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_AUTHMODE + value: none + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: core-data + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + {{end}} envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-core-data/edgex-core-data-service.yaml b/deployment/helm/templates/edgex-core-data/edgex-core-data-service.yaml index c4293012..f4a7c1bc 100644 --- a/deployment/helm/templates/edgex-core-data/edgex-core-data-service.yaml +++ b/deployment/helm/templates/edgex-core-data/edgex-core-data-service.yaml @@ -10,8 +10,8 @@ metadata: name: {{.Values.edgex.app.core.data}} spec: ports: - - name: "http" + - name: "core-data-http" port: {{.Values.edgex.port.core.data}} selector: org.edgexfoundry.service: {{.Values.edgex.app.core.data}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.core.data}} diff --git a/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml b/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml new file mode 100644 index 00000000..cb7b3f02 --- /dev/null +++ b/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml @@ -0,0 +1,101 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.bacnet}} + name: {{.Values.edgex.app.device.bacnet}} +spec: + replicas: {{.Values.edgex.replicas.device.bacnet}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.device.bacnet}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.bacnet}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.device.bacnet}} + image: {{.Values.edgex.image.device.bacnet.repository}}:{{.Values.edgex.image.device.bacnet.tag}} + imagePullPolicy: {{.Values.edgex.image.device.bacnet.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: [ "/bin/sh", "/edgex-init/ready_to_run_wait_install.sh"] + args: ["/startup.sh"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.device.bacnet}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.device.bacnet}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.bacnet}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: device-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.bacnet}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.bacnet}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.device.bacnet.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.device.bacnet.limits.memory }} + cpu: {{ .Values.edgex.resources.device.bacnet.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.device.bacnet.requests.memory }} + cpu: {{ .Values.edgex.resources.device.bacnet.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.device.bacnet}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-service.yaml b/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-service.yaml new file mode 100644 index 00000000..3a0e8354 --- /dev/null +++ b/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.bacnet}} + name: {{.Values.edgex.app.device.bacnet}} +spec: + ports: + - name: "device-bacnet-http" + port: {{.Values.edgex.port.device.bacnet}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.bacnet}} + type: {{.Values.expose.type.device.bacnet}} + diff --git a/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml new file mode 100644 index 00000000..bc639ffe --- /dev/null +++ b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml @@ -0,0 +1,103 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + name: {{.Values.edgex.app.device.gpio}} +spec: + replicas: {{.Values.edgex.replicas.device.gpio}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.device.gpio}} + image: {{.Values.edgex.image.device.gpio.repository}}:{{.Values.edgex.image.device.gpio.tag}} + imagePullPolicy: {{.Values.edgex.image.device.gpio.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/bin/sh","/edgex-init/ready_to_run_wait_install.sh"] + args: ["/device-gpio", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.device.gpio}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.device.gpio}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.gpio}} + - name: SERVICE_PORT + value: "59994" + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: device-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.gpio}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.gpio}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.device.gpio.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.device.gpio.limits.memory }} + cpu: {{ .Values.edgex.resources.device.gpio.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.device.gpio.requests.memory }} + cpu: {{ .Values.edgex.resources.device.gpio.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.device.gpio}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-service.yaml b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-service.yaml new file mode 100644 index 00000000..a3e9304d --- /dev/null +++ b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + name: {{.Values.edgex.app.device.gpio}} +spec: + ports: + - name: "device-gpio-http" + port: {{.Values.edgex.port.device.gpio}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + type: {{.Values.expose.type.device.gpio}} + diff --git a/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml b/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml new file mode 100644 index 00000000..f9b883bd --- /dev/null +++ b/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml @@ -0,0 +1,101 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.modbus}} + name: {{.Values.edgex.app.device.modbus}} +spec: + replicas: {{.Values.edgex.replicas.device.modbus}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.device.modbus}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.modbus}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.device.modbus}} + image: {{.Values.edgex.image.device.modbus.repository}}:{{.Values.edgex.image.device.modbus.tag}} + imagePullPolicy: {{.Values.edgex.image.device.modbus.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/device-modbus", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.device.modbus}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.device.modbus}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.modbus}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: device-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.modbus}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.modbus}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.device.modbus.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.device.modbus.limits.memory }} + cpu: {{ .Values.edgex.resources.device.modbus.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.device.modbus.requests.memory }} + cpu: {{ .Values.edgex.resources.device.modbus.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.device.modbus}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-service.yaml b/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-service.yaml new file mode 100644 index 00000000..c7a57a94 --- /dev/null +++ b/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.modbus}} + name: {{.Values.edgex.app.device.modbus}} +spec: + ports: + - name: "device-modbus-http" + port: {{.Values.edgex.port.device.modbus}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.modbus}} + type: {{.Values.expose.type.device.modbus}} + diff --git a/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml b/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml new file mode 100644 index 00000000..8893331d --- /dev/null +++ b/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml @@ -0,0 +1,103 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.mqtt}} + name: {{.Values.edgex.app.device.mqtt}} +spec: + replicas: {{.Values.edgex.replicas.device.mqtt}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.device.mqtt}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.mqtt}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.device.mqtt}} + image: {{.Values.edgex.image.device.mqtt.repository}}:{{.Values.edgex.image.device.mqtt.tag}} + imagePullPolicy: {{.Values.edgex.image.device.mqtt.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/device-mqtt", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.device.mqtt}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.device.mqtt}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.mqtt}} + - name: MQTTBROKERINFO_HOST + value: {{.Values.edgex.app.mqttbroker}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: device-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.mqtt}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.mqtt}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.device.usbcamera.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.device.mqtt.limits.memory }} + cpu: {{ .Values.edgex.resources.device.mqtt.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.device.mqtt.requests.memory }} + cpu: {{ .Values.edgex.resources.device.mqtt.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.device.mqtt}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-service.yaml b/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-service.yaml new file mode 100644 index 00000000..cc00ca23 --- /dev/null +++ b/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.mqtt}} + name: {{.Values.edgex.app.device.mqtt}} +spec: + ports: + - name: "device-mqtt-htpp" + port: {{.Values.edgex.port.device.mqtt}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.mqtt}} + type: {{.Values.expose.type.device.mqtt}} + diff --git a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml new file mode 100644 index 00000000..bc7d27fb --- /dev/null +++ b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml @@ -0,0 +1,106 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.onvifcamera}} + name: {{.Values.edgex.app.device.onvifcamera}} +spec: + replicas: {{.Values.edgex.replicas.device.onvifcamera}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.device.onvifcamera}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.onvifcamera}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.device.onvifcamera}} + image: {{.Values.edgex.image.device.onvifcamera.repository}}:{{.Values.edgex.image.device.onvifcamera.tag}} + imagePullPolicy: {{.Values.edgex.image.device.onvifcamera.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/device-onvif-camera", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.device.onvifcamera}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.device.onvifcamera}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.onvifcamera}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: device-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.onvifcamera}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.onvifcamera}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + - mountPath: /mnt/edgex-device-onvif-camera + name: device-onvif-camera + {{- end }} + {{- if .Values.edgex.resources.device.onvifcamera.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.device.onvifcamera.limits.memory }} + cpu: {{ .Values.edgex.resources.device.onvifcamera.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.device.onvifcamera.requests.memory }} + cpu: {{ .Values.edgex.resources.device.onvifcamera.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.device.onvifcamera}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + - name: device-onvif-camera + persistentVolumeClaim: + claimName: device-onvif-camera + {{- end}} diff --git a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-service.yaml b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-service.yaml new file mode 100644 index 00000000..c8b89113 --- /dev/null +++ b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.onvifcamera}} + name: {{.Values.edgex.app.device.onvifcamera}} +spec: + ports: + - name: "device-onvif-camera-http" + port: {{.Values.edgex.port.device.onvifcamera}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.onvifcamera}} + type: {{.Values.expose.type.device.onvifcamera}} + diff --git a/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml b/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml index 388b07b3..cca6896c 100644 --- a/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml +++ b/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.device.rest}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -40,9 +40,12 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.device.rest}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.device.rest}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} env: - name: SERVICE_HOST @@ -50,16 +53,20 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.rest}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.rest}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-rest/edgex-device-rest-service.yaml b/deployment/helm/templates/edgex-device-rest/edgex-device-rest-service.yaml index 7442d818..573da7e0 100644 --- a/deployment/helm/templates/edgex-device-rest/edgex-device-rest-service.yaml +++ b/deployment/helm/templates/edgex-device-rest/edgex-device-rest-service.yaml @@ -10,8 +10,8 @@ metadata: name: {{.Values.edgex.app.device.rest}} spec: ports: - - name: "http" + - name: "device-rest-http" port: {{.Values.edgex.port.device.rest}} selector: org.edgexfoundry.service: {{.Values.edgex.app.device.rest}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.device.rest}} diff --git a/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml b/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml new file mode 100644 index 00000000..654d26a6 --- /dev/null +++ b/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml @@ -0,0 +1,101 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.rfidllrp}} + name: {{.Values.edgex.app.device.rfidllrp}} +spec: + replicas: {{.Values.edgex.replicas.device.rfidllrp}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.device.rfidllrp}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.rfidllrp}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.device.rfidllrp}} + image: {{.Values.edgex.image.device.rfidllrp.repository}}:{{.Values.edgex.image.device.rfidllrp.tag}} + imagePullPolicy: {{.Values.edgex.image.device.rfidllrp.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/device-rfid-llrp", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.device.rfidllrp}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.device.rfidllrp}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.rfidllrp}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: device-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.rfidllrp}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.rfidllrp}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.device.rfidllrp.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.device.rfidllrp.limits.memory }} + cpu: {{ .Values.edgex.resources.device.rfidllrp.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.device.rfidllrp.requests.memory }} + cpu: {{ .Values.edgex.resources.device.rfidllrp.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.device.rfidllrp}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-service.yaml b/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-service.yaml new file mode 100644 index 00000000..20d0ee40 --- /dev/null +++ b/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.rfidllrp}} + name: {{.Values.edgex.app.device.rfidllrp}} +spec: + ports: + - name: "device-rfid-llrp-http" + port: {{.Values.edgex.port.device.rfidllrp}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.rfidllrp}} + type: {{.Values.expose.type.device.rfidllrp}} + diff --git a/deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-deployment.yaml b/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml similarity index 50% rename from deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-deployment.yaml rename to deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml index 1975ab33..20f71f77 100644 --- a/deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-deployment.yaml +++ b/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml @@ -6,21 +6,21 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - org.edgexfoundry.service: {{.Values.edgex.app.system}} - name: {{.Values.edgex.app.system}} + org.edgexfoundry.service: {{.Values.edgex.app.device.snmp}} + name: {{.Values.edgex.app.device.snmp}} spec: - replicas: {{.Values.edgex.replicas.system}} + replicas: {{.Values.edgex.replicas.device.snmp}} selector: matchLabels: - org.edgexfoundry.service: {{.Values.edgex.app.system}} + org.edgexfoundry.service: {{.Values.edgex.app.device.snmp}} strategy: type: Recreate template: metadata: labels: - org.edgexfoundry.service: {{.Values.edgex.app.system}} + org.edgexfoundry.service: {{.Values.edgex.app.device.snmp}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -31,42 +31,43 @@ spec: {{- end}} automountServiceAccountToken: false containers: - - name: {{.Values.edgex.app.system}} - image: {{.Values.edgex.image.system.repository}}:{{.Values.edgex.image.system.tag}} - imagePullPolicy: {{.Values.edgex.image.system.pullPolicy}} + - name: {{.Values.edgex.app.device.snmp}} + image: {{.Values.edgex.image.device.snmp.repository}}:{{.Values.edgex.image.device.snmp.tag}} + imagePullPolicy: {{.Values.edgex.image.device.snmp.pullPolicy}} {{- if .Values.edgex.security.enabled }} command: ["/edgex-init/ready_to_run_wait_install.sh"] - args: ["/sys-mgmt-agent", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + args: ["/device-snmp", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] {{- end}} ports: - - containerPort: {{.Values.edgex.port.system}} + - containerPort: {{.Values.edgex.port.device.snmp}} + name: "http" {{- if not .Values.edgex.security.enabled }} - hostPort: {{.Values.edgex.port.system}} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.device.snmp}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.snmp}} envFrom: - configMapRef: name: edgex-common-variables - env: - - name: SERVICE_HOST - value: {{.Values.edgex.app.system}} - - name: EXECUTORPATH - value: "/sys-mgmt-executor" - - name: METRICSMECHANISM - value: "executor" + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: httpGet: path: /api/v2/ping - port: {{.Values.edgex.port.system}} + port: {{.Values.edgex.port.device.snmp}} periodSeconds: 1 failureThreshold: 120 livenessProbe: httpGet: path: /api/v2/ping - port: {{.Values.edgex.port.system}} + port: {{.Values.edgex.port.device.snmp}} {{- if .Values.edgex.security.enabled }} volumeMounts: - mountPath: /edgex-init @@ -74,25 +75,21 @@ spec: - mountPath: /tmp/edgex/secrets name: edgex-secrets {{- end }} - {{- if .Values.edgex.resources.system.enforceLimits }} + {{- if .Values.edgex.resources.device.snmp.enforceLimits }} resources: limits: - memory: {{ .Values.edgex.resources.system.limits.memory }} - cpu: {{ .Values.edgex.resources.system.limits.cpu }} + memory: {{ .Values.edgex.resources.device.snmp.limits.memory }} + cpu: {{ .Values.edgex.resources.device.snmp.limits.cpu }} requests: - memory: {{ .Values.edgex.resources.system.requests.memory }} - cpu: {{ .Values.edgex.resources.system.requests.cpu }} + memory: {{ .Values.edgex.resources.device.snmp.requests.memory }} + cpu: {{ .Values.edgex.resources.device.snmp.requests.cpu }} {{- end}} - hostname: {{.Values.edgex.app.system}} + hostname: {{.Values.edgex.app.device.snmp}} restartPolicy: Always securityContext: - runAsUser: 0 - runAsGroup: 0 - seLinuxOptions: - # needed for CentOS to provide docker access (note: Kubernetes on docker is deprecated) - level: "s0-s0:c0.c1023" - user: "unconfined_u" - role: "unconfined_r" + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} {{- if .Values.edgex.security.enabled }} volumes: - name: edgex-init @@ -101,4 +98,4 @@ spec: - name: edgex-secrets persistentVolumeClaim: claimName: edgex-secrets - {{- end}} \ No newline at end of file + {{- end}} diff --git a/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-service.yaml b/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-service.yaml new file mode 100644 index 00000000..3b807c27 --- /dev/null +++ b/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.snmp}} + name: {{.Values.edgex.app.device.snmp}} +spec: + ports: + - name: "device-snmp-http" + port: {{.Values.edgex.port.device.snmp}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.snmp}} + type: {{.Values.expose.type.device.snmp}} + diff --git a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml new file mode 100644 index 00000000..60ec1c65 --- /dev/null +++ b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml @@ -0,0 +1,106 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.usbcamera}} + name: {{.Values.edgex.app.device.usbcamera}} +spec: + replicas: {{.Values.edgex.replicas.device.usbcamera}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.device.usbcamera}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.usbcamera}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.device.usbcamera}} + image: {{.Values.edgex.image.device.usbcamera.repository}}:{{.Values.edgex.image.device.usbcamera.tag}} + imagePullPolicy: {{.Values.edgex.image.device.usbcamera.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/device-usb-camera", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.device.usbcamera}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.device.usbcamera}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.usbcamera}} + envFrom: + - configMapRef: + name: edgex-common-variables + - configMapRef: + name: device-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.usbcamera}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.device.usbcamera}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + - mountPath: /mnt/edgex-device-usb-camera + name: device-usb-camera + {{- end }} + {{- if .Values.edgex.resources.device.usbcamera.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.device.usbcamera.limits.memory }} + cpu: {{ .Values.edgex.resources.device.usbcamera.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.device.usbcamera.requests.memory }} + cpu: {{ .Values.edgex.resources.device.usbcamera.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.device.usbcamera}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + - name: device-usb-camera + persistentVolumeClaim: + claimName: device-usb-camera + {{- end}} diff --git a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-service.yaml b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-service.yaml new file mode 100644 index 00000000..93f67dd3 --- /dev/null +++ b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.usbcamera}} + name: {{.Values.edgex.app.device.usbcamera}} +spec: + ports: + - name: "device-usb-camera-http" + port: {{.Values.edgex.port.device.onvifcamera}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.usbcamera}} + type: {{.Values.expose.type.device.usbcamera}} + diff --git a/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml b/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml index 6ab50d67..c49e7309 100644 --- a/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml +++ b/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.device.virtual}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -40,9 +40,12 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.device.virtual}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.device.virtual}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} env: - name: SERVICE_HOST @@ -50,16 +53,20 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.virtual}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.virtual}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-service.yaml b/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-service.yaml index 42e794e6..de54fb7b 100644 --- a/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-service.yaml +++ b/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-service.yaml @@ -10,9 +10,9 @@ metadata: name: {{.Values.edgex.app.device.virtual}} spec: ports: - - name: "{{.Values.edgex.port.device.virtual}}" + - name: "device-virtual-name" port: {{.Values.edgex.port.device.virtual}} selector: org.edgexfoundry.service: {{.Values.edgex.app.device.virtual}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.device.virtual}} diff --git a/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-deployment.yaml b/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-deployment.yaml index d65b784e..a8559fe9 100644 --- a/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-deployment.yaml +++ b/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-deployment.yaml @@ -19,7 +19,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.ekuiper}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -27,7 +27,7 @@ spec: matchLabels: org.edgexfoundry.service: {{ .Values.edgex.app.bootstrapper}} topologyKey: "kubernetes.io/hostname" - {{- end}} + {{- end}} automountServiceAccountToken: false initContainers: - name: prep-volumes @@ -49,9 +49,12 @@ spec: imagePullPolicy: {{.Values.edgex.image.ekuiper.pullPolicy}} ports: - containerPort: {{.Values.edgex.port.ekuiper}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.ekuiper}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} env: # - name: KUIPER__BASIC__DEBUG @@ -60,6 +63,7 @@ spec: value: "true" - name: KUIPER__BASIC__RESTPORT value: "{{.Values.edgex.port.ekuiper}}" + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: EDGEX__DEFAULT__SERVER value: {{.Values.edgex.app.redis}} - name: EDGEX__DEFAULT__PROTOCOL @@ -68,6 +72,31 @@ spec: value: "{{.Values.edgex.port.redis}}" - name: EDGEX__DEFAULT__TOPIC value: "rules-events" + {{end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: kuiper-rules-engine + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + - name: EDGEX__DEFAULT__OPTIONAL__CLIENTID + value: kuiper-rules-engine + - name: EDGEX__DEFAULT__PORT + value: '4222' + - name: EDGEX__DEFAULT__PROTOCOL + value: tcp + - name: EDGEX__DEFAULT__SERVER + value: edgex-nats-server + - name: EDGEX__DEFAULT__TOPIC + value: edgex/rules-events + - name: EDGEX__DEFAULT__TYPE + value: nats-jetstream + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: false diff --git a/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-service.yaml b/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-service.yaml index 10611be4..d3b56d40 100644 --- a/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-service.yaml +++ b/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-service.yaml @@ -10,8 +10,8 @@ metadata: name: {{.Values.edgex.app.ekuiper}} spec: ports: - - name: "http" + - name: "ekuiper-http" port: {{.Values.edgex.port.ekuiper}} selector: org.edgexfoundry.service: {{.Values.edgex.app.ekuiper}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.ekuiper}} diff --git a/deployment/helm/templates/edgex-metadata/edgex-core-metadata-deployment.yaml b/deployment/helm/templates/edgex-metadata/edgex-core-metadata-deployment.yaml index ba508454..3572bc33 100644 --- a/deployment/helm/templates/edgex-metadata/edgex-core-metadata-deployment.yaml +++ b/deployment/helm/templates/edgex-metadata/edgex-core-metadata-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.core.metadata}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -40,9 +40,12 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.core.metadata}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.core.metadata}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} envFrom: - configMapRef: @@ -52,6 +55,20 @@ spec: value: {{.Values.edgex.app.core.metadata}} - name: NOTIFICATIONS_SENDER value: {{.Values.edgex.app.core.metadata}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_AUTHMODE + value: none + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: core-metadata + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-metadata/edgex-core-metadata-service.yaml b/deployment/helm/templates/edgex-metadata/edgex-core-metadata-service.yaml index ff84b72b..2061846f 100644 --- a/deployment/helm/templates/edgex-metadata/edgex-core-metadata-service.yaml +++ b/deployment/helm/templates/edgex-metadata/edgex-core-metadata-service.yaml @@ -10,9 +10,9 @@ metadata: name: {{.Values.edgex.app.core.metadata}} spec: ports: - - name: "http" + - name: "core-metadata-http" port: {{.Values.edgex.port.core.metadata}} selector: org.edgexfoundry.service: {{.Values.edgex.app.core.metadata}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.core.metadata}} diff --git a/deployment/helm/templates/edgex-modbus-simulator/edgex-modbus-simulator-deployment.yaml b/deployment/helm/templates/edgex-modbus-simulator/edgex-modbus-simulator-deployment.yaml new file mode 100644 index 00000000..c32a10c6 --- /dev/null +++ b/deployment/helm/templates/edgex-modbus-simulator/edgex-modbus-simulator-deployment.yaml @@ -0,0 +1,62 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.modbussimulator}} + name: {{.Values.edgex.app.modbussimulator}} +spec: + replicas: {{.Values.edgex.replicas.modbussimulator}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.modbussimulator}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.modbussimulator}} + spec: + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.modbussimulator}} + image: {{.Values.edgex.image.modbussimulator.repository}}:{{.Values.edgex.image.modbussimulator.tag}} + imagePullPolicy: {{.Values.edgex.image.modbussimulator.pullPolicy}} + ports: + - containerPort: {{.Values.edgex.port.modbussimulator}} + name: "mbap" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.modbussimulator}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + tcpSocket: + port: {{.Values.edgex.port.modbussimulator}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.port.modbussimulator}} + {{- if .Values.edgex.resources.modbussimulator.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.modbussimulator.limits.memory }} + cpu: {{ .Values.edgex.resources.modbussimulator.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.modbussimulator.requests.memory }} + cpu: {{ .Values.edgex.resources.modbussimulator.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.modbussimulator}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} diff --git a/deployment/helm/templates/edgex-modbus-simulator/edgex-modbus-simulator-service.yaml b/deployment/helm/templates/edgex-modbus-simulator/edgex-modbus-simulator-service.yaml new file mode 100644 index 00000000..d315a315 --- /dev/null +++ b/deployment/helm/templates/edgex-modbus-simulator/edgex-modbus-simulator-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.modbussimulator}} + name: {{.Values.edgex.app.modbussimulator}} +spec: + ports: + - name: "modbus-simulator-mbap" + port: {{.Values.edgex.port.modbussimulator}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.modbussimulator}} + type: {{.Values.expose.type.modbussimulator}} + diff --git a/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-deployment.yaml b/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-deployment.yaml new file mode 100644 index 00000000..1a0f3e9b --- /dev/null +++ b/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-deployment.yaml @@ -0,0 +1,66 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.mqttbroker}} + name: {{.Values.edgex.app.mqttbroker}} +spec: + replicas: {{.Values.edgex.replicas.mqttbroker}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.mqttbroker}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.mqttbroker}} + spec: + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.mqttbroker}} + image: {{.Values.edgex.image.mqttbroker.repository}}:{{.Values.edgex.image.mqttbroker.tag}} + imagePullPolicy: {{.Values.edgex.image.mqttbroker.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/usr/sbin/mosquitto", "-c", "/mosquitto-no-auth.conf"] + args: [] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.mqttbroker}} + name: "mqtt" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.mqttbroker}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + tcpSocket: + port: {{.Values.edgex.port.mqttbroker}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.port.mqttbroker}} + {{- if .Values.edgex.resources.mqttbroker.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.mqttbroker.limits.memory }} + cpu: {{ .Values.edgex.resources.mqttbroker.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.mqttbroker.requests.memory }} + cpu: {{ .Values.edgex.resources.mqttbroker.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.mqttbroker}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} diff --git a/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-service.yaml b/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-service.yaml new file mode 100644 index 00000000..037a71ad --- /dev/null +++ b/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.mqttbroker}} + name: {{.Values.edgex.app.mqttbroker}} +spec: + ports: + - name: "mqtt-broker-mqtt" + port: {{.Values.edgex.port.mqttbroker}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.mqttbroker}} + type: {{.Values.expose.type.mqttbroker}} + diff --git a/deployment/helm/templates/edgex-nats-server/edgex-nats-server-deployment.yaml b/deployment/helm/templates/edgex-nats-server/edgex-nats-server-deployment.yaml new file mode 100644 index 00000000..30390a82 --- /dev/null +++ b/deployment/helm/templates/edgex-nats-server/edgex-nats-server-deployment.yaml @@ -0,0 +1,62 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + name: {{.Values.edgex.app.natsserver}} +spec: + replicas: {{.Values.edgex.replicas.natsserver}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + spec: + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.natsserver}} + image: {{.Values.edgex.image.natsserver.repository}}:{{.Values.edgex.image.natsserver.tag}} + imagePullPolicy: {{.Values.edgex.image.natsserver.pullPolicy}} + ports: + - containerPort: {{.Values.edgex.port.natsserver}} + name: "http" + {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} + hostPort: {{.Values.edgex.port.natsserver}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + {{- end}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + tcpSocket: + port: {{.Values.edgex.port.natsserver}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.port.natsserver}} + {{- if .Values.edgex.resources.natsserver.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.natsserver.limits.memory }} + cpu: {{ .Values.edgex.resources.natsserver.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.natsserver.requests.memory }} + cpu: {{ .Values.edgex.resources.natsserver.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.natsserver}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} diff --git a/deployment/helm/templates/edgex-nats-server/edgex-nats-server-service.yaml b/deployment/helm/templates/edgex-nats-server/edgex-nats-server-service.yaml new file mode 100644 index 00000000..ffeb60c5 --- /dev/null +++ b/deployment/helm/templates/edgex-nats-server/edgex-nats-server-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + name: {{.Values.edgex.app.natsserver}} +spec: + ports: + - name: "nats-server-http" + port: {{.Values.edgex.port.natsserver}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + type: {{.Values.expose.type.natsserver}} + diff --git a/deployment/helm/templates/edgex-pv.yaml b/deployment/helm/templates/edgex-pv.yaml index a1e68358..84a9e155 100644 --- a/deployment/helm/templates/edgex-pv.yaml +++ b/deployment/helm/templates/edgex-pv.yaml @@ -2,20 +2,20 @@ # # SPDX-License-Identifier: Apache-2.0 # - {{- if .Values.edgex.storage.useHostPath }} +{{- if .Values.edgex.storage.useHostPath }} apiVersion: v1 kind: PersistentVolume metadata: name: edgex-consul-config-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: consul-config namespace: {{ .Release.Namespace }} capacity: storage: 500Mi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-consul-config" {{- end}} @@ -26,14 +26,14 @@ kind: PersistentVolume metadata: name: edgex-consul-data-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: consul-data namespace: {{ .Release.Namespace }} capacity: storage: 500Mi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-consul-data" {{- end }} @@ -44,14 +44,14 @@ kind: PersistentVolume metadata: name: edgex-db-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: db-data namespace: {{ .Release.Namespace }} capacity: storage: 1Gi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-db" {{- end }} @@ -62,18 +62,17 @@ kind: PersistentVolume metadata: name: edgex-kuiper-data spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: kuiper-data namespace: {{ .Release.Namespace }} capacity: storage: 128Mi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-kuiper-data" {{- end }} -{{- if .Values.edgex.security.enabled }} --- {{- if .Values.edgex.storage.useHostPath }} apiVersion: v1 @@ -81,14 +80,14 @@ kind: PersistentVolume metadata: name: edgex-secrets-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: edgex-secrets namespace: {{ .Release.Namespace }} capacity: storage: 8Mi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.sharedVolumesAccessMode}} hostPath: path: "/tmp/edgex/secrets" {{- end }} @@ -99,14 +98,14 @@ kind: PersistentVolume metadata: name: edgex-init-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: edgex-init namespace: {{ .Release.Namespace }} capacity: storage: 128Mi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.sharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-init-volume" {{- end }} @@ -117,14 +116,14 @@ kind: PersistentVolume metadata: name: edgex-vault-data-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: vault-file namespace: {{ .Release.Namespace }} capacity: storage: 1Gi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-vault-data" {{- end }} @@ -135,14 +134,14 @@ kind: PersistentVolume metadata: name: edgex-vault-logs-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: vault-logs namespace: {{ .Release.Namespace }} capacity: storage: 1Gi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-vault-logs" {{- end }} @@ -153,14 +152,14 @@ kind: PersistentVolume metadata: name: edgex-vault-config-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: vault-config namespace: {{ .Release.Namespace }} capacity: storage: 8Mi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-vault-config" {{- end }} @@ -171,14 +170,14 @@ kind: PersistentVolume metadata: name: edgex-redis-config-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: redis-config namespace: {{ .Release.Namespace }} capacity: storage: 8Mi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-redis-config" {{- end }} @@ -189,15 +188,122 @@ kind: PersistentVolume metadata: name: edgex-consul-acl-token-volume spec: - storageClassName: "{{.Values.edgex.storage.className}}" + storageClassName: "" claimRef: name: consul-acl-token namespace: {{ .Release.Namespace }} capacity: storage: 8Mi accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-consul-acl-token" {{- end }} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: edgex-device-onvif-camera +spec: + storageClassName: "" + claimRef: + name: device-onvif-camera + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/mnt/edgex-device-onvif-camera" +{{- end}} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: edgex-device-usb-camera +spec: + storageClassName: "" + claimRef: + name: device-usb-camera + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/mnt/edgex-device-usb-camera" +{{- end}} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: edgex-app-rfid-llrp-inventory +spec: + storageClassName: "" + claimRef: + name: app-rfid-llrp-inventory + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/mnt/edgex-app-rfid-llrp-inventory" +{{- end}} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: edgex-nats-server +spec: + storageClassName: "" + claimRef: + name: nats-server + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/tmp/nats" +{{- end}} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: kuiper-sources +spec: + storageClassName: "" + claimRef: + name: kuiper-sources + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/mnt/kuiper-sources" +{{- end }} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: kuiper-connections +spec: + storageClassName: "" + claimRef: + name: kuiper-connections + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/mnt/kuiper-connections" {{- end }} diff --git a/deployment/helm/templates/edgex-pvc.yaml b/deployment/helm/templates/edgex-pvc.yaml index 17d2cc4c..c478aad0 100644 --- a/deployment/helm/templates/edgex-pvc.yaml +++ b/deployment/helm/templates/edgex-pvc.yaml @@ -7,9 +7,13 @@ kind: PersistentVolumeClaim metadata: name: consul-config spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 128Mi @@ -19,9 +23,13 @@ kind: PersistentVolumeClaim metadata: name: consul-data spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 128Mi @@ -31,9 +39,13 @@ kind: PersistentVolumeClaim metadata: name: db-data spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 512Mi @@ -43,9 +55,13 @@ kind: PersistentVolumeClaim metadata: name: kuiper-data spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 128Mi @@ -56,9 +72,13 @@ kind: PersistentVolumeClaim metadata: name: edgex-secrets spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.sharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.sharedVolumesAccessMode}} resources: requests: storage: 8Mi @@ -68,9 +88,13 @@ kind: PersistentVolumeClaim metadata: name: edgex-init spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.sharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.sharedVolumesAccessMode}} resources: requests: storage: 128Mi @@ -80,9 +104,13 @@ kind: PersistentVolumeClaim metadata: name: vault-file spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 128Mi @@ -92,9 +120,13 @@ kind: PersistentVolumeClaim metadata: name: vault-logs spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 128Mi @@ -104,9 +136,13 @@ kind: PersistentVolumeClaim metadata: name: vault-config spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 8Mi @@ -116,9 +152,13 @@ kind: PersistentVolumeClaim metadata: name: redis-config spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 8Mi @@ -128,10 +168,110 @@ kind: PersistentVolumeClaim metadata: name: consul-acl-token spec: - storageClassName: "{{.Values.edgex.storage.className}}" + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} accessModes: - - ReadWriteOnce + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} resources: requests: storage: 8Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: device-onvif-camera +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: device-usb-camera +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: app-rfid-llrp-inventory +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: nats-server +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: kuiper-sources +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: kuiper-connections +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi {{- end }} diff --git a/deployment/helm/templates/edgex-redis/edgex-redis-deployment.yaml b/deployment/helm/templates/edgex-redis/edgex-redis-deployment.yaml index 7aa6b018..873390b7 100644 --- a/deployment/helm/templates/edgex-redis/edgex-redis-deployment.yaml +++ b/deployment/helm/templates/edgex-redis/edgex-redis-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.redis}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -39,6 +39,7 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.redis}} + name: "redis" envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-redis/edgex-redis-service.yaml b/deployment/helm/templates/edgex-redis/edgex-redis-service.yaml index 9e97d621..dcbd9b1c 100644 --- a/deployment/helm/templates/edgex-redis/edgex-redis-service.yaml +++ b/deployment/helm/templates/edgex-redis/edgex-redis-service.yaml @@ -10,10 +10,8 @@ metadata: name: {{.Values.edgex.app.redis}} spec: ports: - - name: "http" + - name: "redis-redis" port: {{.Values.edgex.port.redis}} selector: org.edgexfoundry.service: {{.Values.edgex.app.redis}} - type: {{.Values.expose.type}} -status: - loadBalancer: {} \ No newline at end of file + type: {{.Values.expose.type.redis}} diff --git a/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-deployment.yaml b/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-deployment.yaml index 07ad0065..16dc7c47 100644 --- a/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-deployment.yaml +++ b/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-deployment.yaml @@ -49,6 +49,14 @@ spec: memory: {{ .Values.edgex.resources.vault.requests.memory }} cpu: {{ .Values.edgex.resources.vault.requests.cpu }} {{- end}} + startupProbe: + tcpSocket: + port: {{.Values.edgex.bootstrap.port.start}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.bootstrap.port.start}} hostname: {{.Values.edgex.app.bootstrapper}} restartPolicy: Always securityContext: diff --git a/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-service.yaml b/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-service.yaml index 027c48bd..852eb8b2 100644 --- a/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-service.yaml +++ b/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-service.yaml @@ -11,11 +11,11 @@ metadata: name: {{.Values.edgex.app.bootstrapper}} spec: ports: - - name: "start" + - name: "bootstrapper-http" port: {{ .Values.edgex.bootstrap.port.start }} selector: org.edgexfoundry.service: {{.Values.edgex.app.bootstrapper}} - type: ClusterIP + type: {{.Values.expose.type.bootstrapper}} # Do not allocate cluster IP - point DNS directly at the Pod IP - ignore targetPort's clusterIP: None {{- end}} diff --git a/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-deployment.yaml b/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-deployment.yaml index 0040ca31..4ec9c9bd 100644 --- a/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-deployment.yaml +++ b/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-deployment.yaml @@ -21,7 +21,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.secretstoresetup}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -29,7 +29,7 @@ spec: matchLabels: org.edgexfoundry.service: {{ .Values.edgex.app.bootstrapper}} topologyKey: "kubernetes.io/hostname" - {{- end}} + {{- end}} automountServiceAccountToken: false containers: - name: {{.Values.edgex.app.secretstoresetup}} @@ -40,13 +40,14 @@ spec: value: "{{ .Values.edgex.security.runAsUser }}" - name: EDGEX_GROUP value: "{{ .Values.edgex.security.runAsGroup }}" - # Remove SECRETSTORE_REVOKEROOTTOKENS later - - name: SECRETSTORE_REVOKEROOTTOKENS - value: "false" - name: ADD_SECRETSTORE_TOKENS - value: "device-rest, device-virtual" + value: {{.Values.edgex.security.addServiceTokens}} - name: ADD_KNOWN_SECRETS - value: "redisdb[app-rules-engine],redisdb[device-rest],redisdb[device-virtual]" + value: {{.Values.edgex.security.addKnownSecrets}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: SECUREMESSAGEBUS_TYPE + value: redis + {{- end}} envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-service.yaml b/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-service.yaml index b7d7a320..8f7322cf 100644 --- a/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-service.yaml +++ b/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-service.yaml @@ -11,7 +11,7 @@ metadata: name: {{.Values.edgex.app.secretstoresetup}} spec: ports: - - name: "start" + - name: "secret-storesetup-http" port: {{ .Values.edgex.bootstrap.port.secretstoretokensready }} selector: org.edgexfoundry.service: {{.Values.edgex.app.secretstoresetup}} diff --git a/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-deployment.yaml b/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-deployment.yaml index fb35d3e4..99bdc5f3 100644 --- a/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-deployment.yaml +++ b/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.support.notifications}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -40,13 +40,30 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.support.notifications}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.support.notifications}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} env: - name: SERVICE_HOST value: {{.Values.edgex.app.support.notifications}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_AUTHMODE + value: none + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: support-notifications + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + {{end}} envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-service.yaml b/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-service.yaml index ee1ddd11..41b61aa4 100644 --- a/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-service.yaml +++ b/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-service.yaml @@ -10,8 +10,8 @@ metadata: name: {{.Values.edgex.app.support.notifications}} spec: ports: - - name: "http" + - name: "support-notifications-http" port: {{.Values.edgex.port.support.notifications}} selector: org.edgexfoundry.service: {{.Values.edgex.app.support.notifications}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.support.notifications}} diff --git a/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-deployment.yaml b/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-deployment.yaml index f0e554dd..ba21fe10 100644 --- a/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-deployment.yaml +++ b/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-deployment.yaml @@ -20,7 +20,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.support.scheduler}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -40,9 +40,12 @@ spec: {{- end}} ports: - containerPort: {{.Values.edgex.port.support.scheduler}} + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.support.scheduler}} hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} {{- end}} envFrom: - configMapRef: @@ -54,6 +57,20 @@ spec: value: {{.Values.edgex.app.core.data}} - name: INTERVALACTIONS_SCRUBAGED_HOST value: {{.Values.edgex.app.core.data}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_AUTHMODE + value: none + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: support-scheduler + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-service.yaml b/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-service.yaml index 554d0652..deca79bd 100644 --- a/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-service.yaml +++ b/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-service.yaml @@ -10,8 +10,8 @@ metadata: name: {{.Values.edgex.app.support.scheduler}} spec: ports: - - name: "http" + - name: "support-scheduler-http" port: {{.Values.edgex.port.support.scheduler}} selector: org.edgexfoundry.service: {{.Values.edgex.app.support.scheduler}} - type: {{.Values.expose.type}} + type: {{.Values.expose.type.support.scheduler}} diff --git a/deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-ingress.yaml b/deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-ingress.yaml deleted file mode 100644 index 8fb49af5..00000000 --- a/deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-ingress.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2022 Intel Corporation -# -# SPDX-License-Identifier: Apache-2.0 -# -{{- if .Values.edgex.security.enabled }} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - labels: - org.edgexfoundry.service: {{.Values.edgex.app.system}} - name: {{.Values.edgex.app.system}} - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$1 - nginx.ingress.kubernetes.io/auth-tls-verify-client: "on" - nginx.ingress.kubernetes.io/auth-tls-secret: "edgex/edgex-client-ca" - nginx.ingress.kubernetes.io/auth-tls-verify-depth: "1" -spec: - ingressClassName: nginx - rules: - - host: "{{.Values.edgex.security.tlsHost}}" - http: - paths: - - path: /sys-mgmt-agent/(.*) - pathType: Prefix - backend: - service: - name: {{.Values.edgex.app.system}} - port: - name: http - tls: - - secretName: edgex-tls - hosts: - - "{{.Values.edgex.security.tlsHost}}" -{{- end}} diff --git a/deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-service.yaml b/deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-service.yaml deleted file mode 100644 index 13890cdd..00000000 --- a/deployment/helm/templates/edgex-system/edgex-sys-mgmt-agent-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2022 Intel Corporation -# -# SPDX-License-Identifier: Apache-2.0 -# -apiVersion: v1 -kind: Service -metadata: - labels: - org.edgexfoundry.service: {{.Values.edgex.app.system}} - name: {{.Values.edgex.app.system}} -spec: - ports: - - name: "http" - port: {{.Values.edgex.port.system}} - selector: - org.edgexfoundry.service: {{.Values.edgex.app.system}} - type: {{.Values.expose.type}} diff --git a/deployment/helm/templates/edgex-ui/edgex-ui-deployment.yaml b/deployment/helm/templates/edgex-ui/edgex-ui-deployment.yaml index 1c16c0d3..419ce08a 100644 --- a/deployment/helm/templates/edgex-ui/edgex-ui-deployment.yaml +++ b/deployment/helm/templates/edgex-ui/edgex-ui-deployment.yaml @@ -27,8 +27,11 @@ spec: imagePullPolicy: {{.Values.edgex.image.ui.pullPolicy}} ports: - containerPort: {{.Values.edgex.port.ui}} + name: "http" + {{- if .Values.edgex.features.enableHostPort}} hostPort: {{.Values.edgex.port.ui}} hostIP: {{.Values.edgex.hostPortExternalBind}} + {{- end}} env: - name: EDGEX_SECURITY_SECRET_STORE {{- if .Values.edgex.security.enabled }} @@ -36,6 +39,8 @@ spec: {{- else }} value: "false" {{- end }} + - name: SERVICE_SERVERBINDADDR + value: "0.0.0.0" securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml b/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml new file mode 100644 index 00000000..47bb1f74 --- /dev/null +++ b/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.ui}} + name: {{.Values.edgex.app.ui}} +spec: + ports: + - name: "ui-http" + port: {{.Values.edgex.port.ui}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.ui}} + type: {{.Values.expose.type.ui}} diff --git a/deployment/helm/templates/edgex-vault/edgex-vault-deployment.yaml b/deployment/helm/templates/edgex-vault/edgex-vault-deployment.yaml index 8db673c9..fd7576db 100644 --- a/deployment/helm/templates/edgex-vault/edgex-vault-deployment.yaml +++ b/deployment/helm/templates/edgex-vault/edgex-vault-deployment.yaml @@ -21,7 +21,7 @@ spec: labels: org.edgexfoundry.service: {{.Values.edgex.app.vault}} spec: - {{- if and (eq .Values.edgex.security.enabled true) (eq .Values.edgex.storage.isLocal true)}} + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -55,9 +55,12 @@ spec: args: [ "server" ] ports: - containerPort: 8200 + name: "http" {{- if not .Values.edgex.security.enabled }} + {{- if .Values.edgex.features.enableHostPort}} hostPort: 8200 hostIP: 0.0.0.0 + {{- end}} {{- end}} env: - name: VAULT_ADDR @@ -98,6 +101,14 @@ spec: memory: {{ .Values.edgex.resources.vault.requests.memory }} cpu: {{ .Values.edgex.resources.vault.requests.cpu }} {{- end}} + startupProbe: + tcpSocket: + port: {{.Values.edgex.port.vault}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.port.vault}} hostname: {{.Values.edgex.app.vault}} restartPolicy: Always securityContext: diff --git a/deployment/helm/templates/edgex-vault/edgex-vault-service.yaml b/deployment/helm/templates/edgex-vault/edgex-vault-service.yaml index 65400530..9ec878c9 100644 --- a/deployment/helm/templates/edgex-vault/edgex-vault-service.yaml +++ b/deployment/helm/templates/edgex-vault/edgex-vault-service.yaml @@ -11,9 +11,9 @@ metadata: name: {{.Values.edgex.app.vault}} spec: ports: - - name: "http" + - name: "vault-http" port: 8200 selector: org.edgexfoundry.service: {{.Values.edgex.app.vault}} - type: ClusterIP + type: {{.Values.expose.type.vault}} {{- end}} diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml index cadd2d77..6a3d86ad 100644 --- a/deployment/helm/values.yaml +++ b/deployment/helm/values.yaml @@ -7,8 +7,44 @@ # Declare variables to be passed into your templates. expose: - # Option value: ClusterIP/NodePort/LoadBalancer - type: ClusterIP + type: + # Option value: ClusterIP/NodePort/LoadBalancer + core: + command: ClusterIP + data: ClusterIP + metadata: ClusterIP + support: + notifications: ClusterIP + scheduler: ClusterIP + appservice: + rules: ClusterIP + mqttexport: ClusterIP + httpexport: ClusterIP + appsample: ClusterIP + metricsinfluxdb: ClusterIP + rfidllrpinventory: ClusterIP + externalmqtttrigger: ClusterIP + device: + virtual: ClusterIP + rest: ClusterIP + usbcamera: ClusterIP + onvifcamera: ClusterIP + mqtt: ClusterIP + modbus: ClusterIP + bacnet: ClusterIP + snmp: ClusterIP + rfidllrp: ClusterIP + gpio: ClusterIP + ui: NodePort + system: ClusterIP + consul: NodePort + redis: ClusterIP + ekuiper: ClusterIP + modbussimulator: ClusterIP + mqttbroker: ClusterIP + natsserver: ClusterIP + bootstrapper: ClusterIP + vault: ClusterIP # edgex defines a set of configuration properties for application-level concerns edgex: @@ -25,89 +61,168 @@ edgex: scheduler: edgex-support-scheduler appservice: rules: edgex-app-rules-engine + mqttexport: edgex-app-mqtt-export + httpexport: edgex-app-http-export + appsample: edgex-app-sample + metricsinfluxdb: edgex-app-metrics-influxdb + rfidllrpinventory: edgex-app-rfid-llrp-inventory + externalmqtttrigger: edgex-app-external-mqtt-trigger device: virtual: edgex-device-virtual rest: edgex-device-rest + onvifcamera: edgex-device-onvif-camera + usbcamera: edgex-device-usb-camera + mqtt: edgex-device-mqtt + modbus: edgex-device-modbus + bacnet: edgex-device-bacnet + snmp: edgex-device-snmp + rfidllrp: edgex-device-rfid-llrp + gpio: edgex-device-gpio ui: edgex-ui - system: edgex-sys-mgmt-agent consul: edgex-core-consul redis: edgex-redis ekuiper: edgex-kuiper vault: edgex-vault bootstrapper: edgex-security-bootstrapper secretstoresetup: edgex-security-secretstore-setup + modbussimulator: edgex-modbus-simulator + mqttbroker: edgex-mqtt-broker + natsserver: edgex-nats-server # image defines configuration properties for docker-image-level concerns image: core: command: repository: edgexfoundry/core-command - tag: "2.2.0" + tag: "2.3.0" pullPolicy: IfNotPresent data: repository: edgexfoundry/core-data - tag: "2.2.0" + tag: "2.3.0" pullPolicy: IfNotPresent metadata: repository: edgexfoundry/core-metadata - tag: "2.2.0" + tag: "2.3.0" pullPolicy: IfNotPresent support: notifications: repository: edgexfoundry/support-notifications - tag: "2.2.0" + tag: "2.3.0" pullPolicy: IfNotPresent scheduler: repository: edgexfoundry/support-scheduler - tag: "2.2.0" + tag: "2.3.0" pullPolicy: IfNotPresent appservice: rules: repository: edgexfoundry/app-service-configurable - tag: "2.2.0" + tag: "2.3.0" + pullPolicy: IfNotPresent + appsample: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" + pullPolicy: IfNotPresent + metricsinfluxdb: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" + pullPolicy: IfNotPresent + rfidllrpinventory: + repository: edgexfoundry/app-rfid-llrp-inventory + tag: "2.3.0" + pullPolicy: IfNotPresent + mqttexport: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" + pullPolicy: IfNotPresent + httpexport: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" + pullPolicy: IfNotPresent + externalmqtttrigger: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" pullPolicy: IfNotPresent device: virtual: repository: edgexfoundry/device-virtual - tag: "2.2.0" + tag: "2.3.0" pullPolicy: IfNotPresent rest: repository: edgexfoundry/device-rest - tag: "2.2.0" + tag: "2.3.0" + pullPolicy: IfNotPresent + onvifcamera: + repository: edgexfoundry/device-onvif-camera + tag: "2.3.0" + pullPolicy: IfNotPresent + usbcamera: + repository: nexus3.edgexfoundry.org:10004/device-usb-camera + tag: "latest" + pullPolicy: IfNotPresent + mqtt: + repository: edgexfoundry/device-mqtt + tag: "2.3.0" + pullPolicy: IfNotPresent + modbus: + repository: edgexfoundry/device-modbus + tag: "2.3.0" + pullPolicy: IfNotPresent + bacnet: + repository: edgexfoundry/device-bacnet + tag: "2.3.0" + pullPolicy: IfNotPresent + snmp: + repository: edgexfoundry/device-snmp + tag: "2.3.0" + pullPolicy: IfNotPresent + rfidllrp: + repository: edgexfoundry/device-rfid-llrp + tag: "2.3.0" + pullPolicy: IfNotPresent + gpio: + repository: edgexfoundry/device-gpio + tag: "2.3.0" pullPolicy: IfNotPresent ui: repository: edgexfoundry/edgex-ui - tag: "2.2.0" - pullPolicy: IfNotPresent - system: - repository: edgexfoundry/sys-mgmt-agent - tag: "2.2.0" + tag: "2.3.0" pullPolicy: IfNotPresent consul: repository: consul - tag: "1.10.10" + tag: "1.13.2" pullPolicy: IfNotPresent redis: repository: redis - tag: "6.2.6-alpine" + tag: "7.0.5-alpine" pullPolicy: IfNotPresent ekuiper: repository: lfedge/ekuiper - tag: "1.4.4-alpine" + tag: "1.7.1-alpine" pullPolicy: IfNotPresent vault: repository: vault - tag: "1.8.9" + tag: "1.11.4" pullPolicy: IfNotPresent bootstrapper: - repository: nexus3.edgexfoundry.org:10004/security-bootstrapper - tag: "latest" + repository: edgexfoundry/security-bootstrapper + tag: "2.3.0" pullPolicy: IfNotPresent secretstoresetup: - repository: nexus3.edgexfoundry.org:10004/security-secretstore-setup + repository: edgexfoundry/security-secretstore-setup + tag: "2.3.0" + pullPolicy: IfNotPresent + modbussimulator: + repository: nexus3.edgexfoundry.org:10003/edgex-devops/edgex-modbus-simulator tag: "latest" pullPolicy: IfNotPresent - + mqttbroker: + repository: eclipse-mosquitto + tag: "2.0" + pullPolicy: IfNotPresent + natsserver: + repository: nats + tag: "2.9.3-alpine" + pullPolicy: IfNotPresent # port defines configuration properties for container, target and host ports port: core: @@ -119,14 +234,32 @@ edgex: scheduler: 59861 appservice: rules: 59701 + mqttexport: 59703 + httpexport: 59704 + appsample: 59700 + metricsinfluxdb: 59707 + rfidllrpinventory: 59711 + externalmqtttrigger: 59706 device: virtual: 59900 rest: 59986 + usbcamera: 59983 + onvifcamera: 59984 + bacnet: 59980 + mqtt: 59982 + modbus: 59901 + snmp: 59993 + rfidllrp: 59989 + gpio: 59994 system: 58890 ui: 4000 consul: 8500 redis: 6379 ekuiper: 59720 + modbussimulator: 1502 + mqttbroker: 1883 + natsserver: 4222 + vault: 8200 # ports used by security bootstrapping for stage gating edgex init bootstrap: @@ -153,14 +286,31 @@ edgex: scheduler: 1 appservice: rules: 1 + mqttexport: 0 + httpexport: 0 + appsample: 0 + metricsinfluxdb: 0 + rfidllrpinventory: 0 + externalmqtttrigger: 0 device: virtual: 1 rest: 1 + usbcamera: 0 + onvifcamera: 0 + mqtt: 0 + modbus: 0 + bacnet: 0 + snmp: 0 + rfidllrp: 0 + gpio: 0 ui: 1 system: 1 consul: 1 redis: 1 ekuiper: 1 + modbussimulator: 0 + mqttbroker: 0 + natsserver: 0 # UID/GID for container user security: @@ -168,6 +318,9 @@ edgex: runAsUser: 2002 runAsGroup: 2001 tlsHost: edgex + addConsulRoles: "app-external-mqtt-trigger,app-http-export,app-metrics-influxdb,app-mqtt-export,app-rfid-llrp-inventory,app-sample,device-bacnet,device-gpio,device-modbus,device-mqtt,device-onvif-camera,device-rfid-llrp,device-snmp,device-usb-camera" + addServiceTokens: "app-external-mqtt-trigger, app-http-export, app-metrics-influxdb, app-mqtt-export, app-rfid-llrp-inventory, app-sample, device-bacnet, device-gpio, device-modbus, device-mqtt, device-onvif-camera, device-rest, device-rfid-llrp, device-snmp, device-usb-camera, device-virtual" + addKnownSecrets: "message-bus[app-mqtt-export],message-bus[app-http-export],redisdb[app-external-mqtt-trigger],redisdb[app-http-export],redisdb[app-metrics-influxdb], redisdb[app-metrics-influxdb],redisdb[app-mqtt-export],redisdb[app-rfid-llrp-inventory],redisdb[app-sample],redisdb[device-bacnet],redisdb[device-gpio],redisdb[device-modbus],redisdb[device-mqtt],redisdb[device-onvif-camera],redisdb[device-rest],redisdb[device-rfid-llrp],redisdb[device-snmp], redisdb[device-usb-camera],redisdb[device-virtual]" # resources defines the cpu and memory limits and requests for the respective application resources: @@ -222,6 +375,54 @@ edgex: requests: cpu: 0.5 memory: 256Mi + mqttexport: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + httpexport: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + appsample: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + metricsinfluxdb: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + rfidllrpinventory: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + externalmqtttrigger: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi device: virtual: enforceLimits: false @@ -239,6 +440,70 @@ edgex: requests: cpu: 0.5 memory: 256Mi + usbcamera: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + onvifcamera: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + mqtt: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + modbus: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + bacnet: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + snmp: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + rfidllrp: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + gpio: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi ui: enforceLimits: false limits: @@ -303,11 +568,47 @@ edgex: requests: cpu: 0.5 memory: 256Mi - + modbussimulator: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + mqttbroker: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + natsserver: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi storage: - className: "" - # Set "isLocal" to true when volumes storage is local, where volume mount is not accessible to remote host. - # This value is used to configure pod affinity. - isLocal: true useHostPath: true + # nonSharedVolumesClassName used for services that does not share a storage volume with other services. + nonSharedVolumesClassName: "rook-ceph-block" + nonSharedVolumesAccessMode: "ReadWriteOnce" + + # sharedVolumesClassName used for services that share a storage volume + sharedVolumesClassName: "rook-cephfs" + # If this value is set to "ReadWriteOnce" it will trigger pod affinity rules. + sharedVolumesAccessMode: "ReadWriteMany" + + features: + # Available messagebus options: redis|mqtt|nats + messagebusbackend: redis + # MQTT broker address + mqttBrokerAddress: "" + # Writable pipeline functions HTTP export parameter URL + httpExportURL: "" + enableHostPort: false diff --git a/device-services/device-random/.gitignore b/device-services/device-random/.gitignore index 66af8cac..915ba325 100644 --- a/device-services/device-random/.gitignore +++ b/device-services/device-random/.gitignore @@ -17,6 +17,5 @@ vendor/ cmd/device-random glide.lock -go.sum coverage.out VERSION diff --git a/device-services/device-random/Dockerfile b/device-services/device-random/Dockerfile index 501a83dd..04dce143 100644 --- a/device-services/device-random/Dockerfile +++ b/device-services/device-random/Dockerfile @@ -14,14 +14,11 @@ # limitations under the License. # -ARG BASE=golang:1.16-alpine3.12 +ARG BASE=golang:1.18-alpine3.16 FROM ${BASE} AS builder ARG ALPINE_PKG_BASE="make git openssh-client gcc libc-dev zeromq-dev libsodium-dev" ARG ALPINE_PKG_EXTRA="" -# Replicate the APK repository override. -# If it is no longer necessary to avoid the CDN mirros we should consider dropping this as it is brittle. -RUN sed -e 's/dl-cdn[.]alpinelinux.org/nl.alpinelinux.org/g' -i~ /etc/apk/repositories # Install our build time packages. RUN apk add --update --no-cache ${ALPINE_PKG_BASE} ${ALPINE_PKG_EXTRA} @@ -29,7 +26,6 @@ WORKDIR /device-random COPY . . -RUN go mod tidy RUN go mod download # To run tests in the build container: @@ -38,7 +34,7 @@ RUN go mod download ARG MAKE='make build' RUN $MAKE -FROM alpine:3.12 +FROM alpine:3.16 # dumb-init needed for injected secure bootstrapping entrypoint script when run in secure mode. RUN apk add --update --no-cache zeromq dumb-init diff --git a/device-services/device-random/Makefile b/device-services/device-random/Makefile index 2efab580..18ad3812 100644 --- a/device-services/device-random/Makefile +++ b/device-services/device-random/Makefile @@ -16,8 +16,10 @@ GOFLAGS=-ldflags "-X github.com/edgexfoundry/device-random.Version=$(VERSION)" build: $(MICROSERVICES) -cmd/device-random: +tidy: go mod tidy + +cmd/device-random: $(GOCGO) build $(GOFLAGS) -o $@ ./cmd test: diff --git a/device-services/device-random/README.md b/device-services/device-random/README.md index 47653e95..108efe6d 100644 --- a/device-services/device-random/README.md +++ b/device-services/device-random/README.md @@ -1,5 +1,4 @@ # Random Integer Device Service -[![Build Status](https://jenkins.edgexfoundry.org/view/EdgeX%20Foundry%20Project/job/edgexfoundry/job/device-random/job/master/badge/icon)](https://jenkins.edgexfoundry.org/view/EdgeX%20Foundry%20Project/job/edgexfoundry/job/device-random/job/master/) [![Code Coverage](https://codecov.io/gh/edgexfoundry/device-random/branch/master/graph/badge.svg?token=tYEN8Kf8HF)](https://codecov.io/gh/edgexfoundry/device-random) [![Go Report Card](https://goreportcard.com/badge/github.com/edgexfoundry/device-random)](https://goreportcard.com/report/github.com/edgexfoundry/device-random) [![GitHub Latest Dev Tag)](https://img.shields.io/github/v/tag/edgexfoundry/device-random?include_prereleases&sort=semver&label=latest-dev)](https://github.com/edgexfoundry/device-random/tags) ![GitHub Latest Stable Tag)](https://img.shields.io/github/v/tag/edgexfoundry/device-random?sort=semver&label=latest-stable) [![GitHub License](https://img.shields.io/github/license/edgexfoundry/device-random)](https://choosealicense.com/licenses/apache-2.0/) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/edgexfoundry/device-random) [![GitHub Pull Requests](https://img.shields.io/github/issues-pr-raw/edgexfoundry/device-random)](https://github.com/edgexfoundry/device-random/pulls) [![GitHub Contributors](https://img.shields.io/github/contributors/edgexfoundry/device-random)](https://github.com/edgexfoundry/device-random/contributors) [![GitHub Committers](https://img.shields.io/badge/team-committers-green)](https://github.com/orgs/edgexfoundry/teams/device-random-committers/members) [![GitHub Commit Activity](https://img.shields.io/github/commit-activity/m/edgexfoundry/device-random)](https://github.com/edgexfoundry/device-random/commits) ## Overview This Device Service is a reference example of a Device Service developed with **[Go Device Service SDK](https://github.com/edgexfoundry/device-sdk-go)**. diff --git a/device-services/device-random/cmd/res/configuration.toml b/device-services/device-random/cmd/res/configuration.toml index 96149bc5..055087da 100644 --- a/device-services/device-random/cmd/res/configuration.toml +++ b/device-services/device-random/cmd/res/configuration.toml @@ -7,6 +7,22 @@ LogLevel = 'INFO' [Writable.InsecureSecrets.DB.Secrets] username = "" password = "" + [Writable.Reading] + ReadingUnits = true + [Writable.Telemetry] + Interval = "30s" + PublishTopicPrefix = "edgex/telemetry" # // will be added to this Publish Topic prefix + [Writable.Telemetry.Metrics] # All service's metric names must be present in this list. + # Device SDK provided Metrics + EventsSent = false + ReadingsSent = false + # Common Security Service Metrics + SecuritySecretsRequested = false + SecuritySecretsStored = false + SecurityConsulTokensRequested = false + SecurityConsulTokenDuration = false + [Writable.Telemetry.Tags] # Contains the service level tags to be attached to all the service's metrics + #Gateway="my-iot-gateway" # Tag must be added here since Env Override can only change existing value, not added new ones. [Service] HealthCheckInterval = '10s' @@ -17,6 +33,14 @@ StartupMsg = 'device random started' # MaxRequestSize limit the request body size in byte of put command MaxRequestSize = 0 # value 0 unlimit the request size. RequestTimeout = '5s' + [Service.CORSConfiguration] + EnableCORS = false + CORSAllowCredentials = false + CORSAllowedOrigin = "https://localhost" + CORSAllowedMethods = "GET, POST, PUT, PATCH, DELETE" + CORSAllowedHeaders = "Authorization, Accept, Accept-Language, Content-Language, Content-Type, X-Correlation-ID" + CORSExposeHeaders = "Cache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified, Pragma, X-Correlation-ID" + CORSMaxAge = 3600 [Registry] Host = 'localhost' @@ -42,17 +66,27 @@ Type = 'redis' AuthMode = 'usernamepassword' # required for redis messagebus (secure or insecure). SecretName = "redisdb" PublishTopicPrefix = 'edgex/events/device' # /// will be added to this Publish Topic prefix + [MessageQueue.Topics] + CommandRequestTopic = "edgex/device/command/request/device-random/#" # subscribing for inbound command requests + CommandResponseTopicPrefix = "edgex/device/command/response" # publishing outbound command responses; /// will be added to this publish topic prefix [MessageQueue.Optional] - # Default MQTT Specific options that need to be here to enable environment variable overrides of them - # Client Identifiers + # Default MQTT & NATS Specific options that need to be here to enable environment variable overrides of them ClientId = "device-random" - # Connection information - Qos = "0" # Quality of Sevice values are 0 (At most once), 1 (At least once) or 2 (Exactly once) - KeepAlive = "10" # Seconds (must be 2 or greater) + Qos = "0" # Quality of Service values are 0 (At most once), 1 (At least once) or 2 (Exactly once) + KeepAlive = "10" # Seconds (must be 2 or greater) Retained = "false" AutoReconnect = "true" ConnectTimeout = "5" # Seconds - SkipCertVerify = "false" # Only used if Cert/Key file or Cert/Key PEMblock are specified [MessageQueue.Optional] + SkipCertVerify = "false" + # Default NATS Specific options that need to be here to enable environment variable overrides of them + Format = "nats" + RetryOnFailedConnect = "true" + QueueGroup = "" + Durable = "" + AutoProvision = "true" + Deliver = "new" + DefaultPubRetryAttempts = "2" + Subject = "edgex/#" # Required for NATS JetStream only for stream auto provisioning # Example SecretStore configuration. # Only used when EDGEX_SECURITY_SECRET_STORE=true diff --git a/device-services/device-random/go.mod b/device-services/device-random/go.mod index b668948a..d3357e1d 100644 --- a/device-services/device-random/go.mod +++ b/device-services/device-random/go.mod @@ -1,10 +1,70 @@ module github.com/edgexfoundry/device-random +go 1.18 + require ( - github.com/edgexfoundry/device-sdk-go/v2 v2.0.0 - github.com/edgexfoundry/go-mod-core-contracts/v2 v2.0.0 - github.com/hashicorp/go-sockaddr v1.0.1 // indirect - github.com/hashicorp/golang-lru v0.5.1 // indirect + github.com/edgexfoundry/device-sdk-go/v2 v2.3.0 + github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0 ) -go 1.16 +require ( + bitbucket.org/bertimus9/systemstat v0.5.0 // indirect + github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/OneOfOne/xxhash v1.2.8 // indirect + github.com/armon/go-metrics v0.3.10 // indirect + github.com/cenkalti/backoff v2.2.1+incompatible // indirect + github.com/eclipse/paho.mqtt.golang v1.4.1 // indirect + github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0 // indirect + github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0 // indirect + github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0 // indirect + github.com/edgexfoundry/go-mod-registry/v2 v2.3.0 // indirect + github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0 // indirect + github.com/fatih/color v1.9.0 // indirect + github.com/fxamacker/cbor/v2 v2.4.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-playground/locales v0.14.0 // indirect + github.com/go-playground/universal-translator v0.18.0 // indirect + github.com/go-playground/validator/v10 v10.11.1 // indirect + github.com/go-redis/redis/v7 v7.3.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/hashicorp/consul/api v1.15.3 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.1 // indirect + github.com/hashicorp/go-hclog v0.14.1 // indirect + github.com/hashicorp/go-immutable-radix v1.3.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/serf v0.9.7 // indirect + github.com/leodido/go-urn v1.2.1 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mitchellh/consulstructure v0.0.0-20190329231841-56fdc4d2da54 // indirect + github.com/mitchellh/copystructure v1.0.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.0 // indirect + github.com/nats-io/nats.go v1.18.0 // indirect + github.com/nats-io/nkeys v0.3.0 // indirect + github.com/nats-io/nuid v1.0.1 // indirect + github.com/pebbe/zmq4 v1.2.7 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/spiffe/go-spiffe/v2 v2.1.1 // indirect + github.com/x448/float16 v0.8.4 // indirect + github.com/zeebo/errs v1.2.2 // indirect + golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect + golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + golang.org/x/sys v0.0.0-20221010170243-090e33056c14 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect + google.golang.org/grpc v1.46.0 // indirect + google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/square/go-jose.v2 v2.4.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/device-services/device-random/go.sum b/device-services/device-random/go.sum new file mode 100644 index 00000000..1fe9e16e --- /dev/null +++ b/device-services/device-random/go.sum @@ -0,0 +1,460 @@ +bitbucket.org/bertimus9/systemstat v0.5.0 h1:n0aLnh2Jo4nBUBym9cE5PJDG8GT6g+4VuS2Ya2jYYpA= +bitbucket.org/bertimus9/systemstat v0.5.0/go.mod h1:EkUWPp8lKFPMXP8vnbpT5JDI0W/sTiLZAvN8ONWErHY= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= +github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfENpMvdbAXAI= +github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= +github.com/edgexfoundry/device-sdk-go/v2 v2.3.0 h1:ahmx62BcfbatEOVKbu/6nRFZDsrJgzfv4lUIqdFFJuI= +github.com/edgexfoundry/device-sdk-go/v2 v2.3.0/go.mod h1:QbA/sWfx6LoyWn/K992LdcB7tnktlPNHK3PtCORlyxI= +github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0 h1:NCOc5bOz6oX+KuOcv0Rt6BTSDShbg4VmCapXO19IoCM= +github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0/go.mod h1:jWZjsy0BaO6+S+Tq111mcrkGKpg6bhTyqngyYcl+70E= +github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0 h1:VeK7VBiNc/RIR7HXC0ya3fWCmcFQzrSLITPYn87cQsA= +github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0/go.mod h1:1tKJhcPEWftFy+I4n7+sNIBOo7H5ys/QaPvyXl0tMtc= +github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0 h1:8Svk1HTehXEgwxgyA4muVhSkP3D9n1q+oSHI3B1Ac90= +github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0/go.mod h1:4/e61acxVkhQWCTjQ4XcHVJDnrMDloFsZZB1B6STCRw= +github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0 h1:aZfDYjj6n2Lo1P1t6NKuShhHjzFk9/mQV9nuJS3ioZ4= +github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0/go.mod h1:5pFRG0iJ64ulFdvwYMbnyD94ciS+Va4h3bpK2P4CBk0= +github.com/edgexfoundry/go-mod-registry/v2 v2.3.0 h1:QEZvYSDkQKAo6WVFrjBkQjjfpbn045Lsv4gNdgATgeM= +github.com/edgexfoundry/go-mod-registry/v2 v2.3.0/go.mod h1:Gyx8a+7jfzy53ljq9kgiz553xhgYYKNNWhnaTn76i+g= +github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0 h1:MRehbe0ZdIP2jx3Nv18LktENlWdXSmw0E6x6VKvFOfo= +github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0/go.mod h1:y9l/5p0EEA2IBf2ctvJ0PtjTN/XPab5BWnfIi3Sy6C4= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= +github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-redis/redis/v7 v7.3.0 h1:3oHqd0W7f/VLKBxeYTEpqdMUsmMectngjM9OtoRoIgg= +github.com/go-redis/redis/v7 v7.3.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.15.3 h1:WYONYL2rxTXtlekAqblR2SCdJsizMDIj/uXb5wNy9zU= +github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY= +github.com/hashicorp/consul/sdk v0.11.0 h1:HRzj8YSCln2yGgCumN5CL8lYlD3gBurnervJRJAZyC4= +github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= +github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.0 h1:8exGP7ego3OmkfksihtSouGMZ+hQrhxx+FVELeXpVPE= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.1 h1:MXgUXLqva1QvpVEDQW1IQLG0wivQAtmFlHRQ+1vWZfM= +github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.7 h1:hkdgbqizGQHuU5IPqYM1JdSMV8nKfpuOnZYXssk9muY= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/consulstructure v0.0.0-20190329231841-56fdc4d2da54 h1:DcITQwl3ymmg7i1XfwpZFs/TPv2PuTwxE8bnuKVtKlk= +github.com/mitchellh/consulstructure v0.0.0-20190329231841-56fdc4d2da54/go.mod h1:dIfpPVUR+ZfkzkDcKnn+oPW1jKeXe4WlNWc7rIXOVxM= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt/v2 v2.3.0 h1:z2mA1a7tIf5ShggOFlR1oBPgd6hGqcDYsISxZByUzdI= +github.com/nats-io/nats-server/v2 v2.9.3 h1:HrfzA7G9LNetKkm1z+jU/e9kuAe+E6uaBuuq9EB5sQQ= +github.com/nats-io/nats.go v1.18.0 h1:o480Ao6kuSSFyJO75rGTXCEPj7LGkY84C1Ye+Uhm4c0= +github.com/nats-io/nats.go v1.18.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pebbe/zmq4 v1.2.7 h1:6EaX83hdFSRUEhgzSW1E/SPoTS3JeYZgYkBvwdcrA9A= +github.com/pebbe/zmq4 v1.2.7/go.mod h1:nqnPueOapVhE2wItZ0uOErngczsJdLOGkebMxaO8r48= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spiffe/go-spiffe/v2 v2.1.1 h1:RT9kM8MZLZIsPTH+HKQEP5yaAk3yd/VBzlINaRjXs8k= +github.com/spiffe/go-spiffe/v2 v2.1.1/go.mod h1:5qg6rpqlwIub0JAiF1UK9IMD6BpPTmvG6yfSgDBs5lg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/zeebo/errs v1.2.2 h1:5NFypMTuSdoySVTqlNs1dEoU21QVamMQJxW/Fii5O7g= +github.com/zeebo/errs v1.2.2/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 h1:x8vtB3zMecnlqZIwJNUUpwYKYSqCz5jXbiyv0ZJJZeI= +golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211216030914-fe4d6282115f h1:hEYJvxw1lSnWIl8X9ofsYMklzaDs90JI2az5YMd4fPM= +golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14 h1:k5II8e6QD8mITdi+okbbmR/cIyEbeXLBhy5Ha4nevyc= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/examples v0.0.0-20201130180447-c456688b1860/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= +gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=