From 9f462f951322852a2aa87b81a93773561a297331 Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Tue, 15 Feb 2022 15:12:04 +0100 Subject: [PATCH 01/10] ISSUE #92 --- minos/api_gateway/rest/database/models.py | 48 +++++++++++ minos/api_gateway/rest/database/repository.py | 33 +++++-- minos/api_gateway/rest/handler.py | 85 +++++++++++++++++-- minos/api_gateway/rest/service.py | 6 ++ 4 files changed, 162 insertions(+), 10 deletions(-) diff --git a/minos/api_gateway/rest/database/models.py b/minos/api_gateway/rest/database/models.py index 650c0c1..709ef00 100644 --- a/minos/api_gateway/rest/database/models.py +++ b/minos/api_gateway/rest/database/models.py @@ -56,3 +56,51 @@ def __init__(self, model: AuthRule): self.methods = model.methods self.created_at = str(model.created_at) self.updated_at = str(model.updated_at) + + +class AutzRule(Base): + __tablename__ = "autz_rules" + id = Column(Integer, Sequence("item_id_seq"), nullable=False, primary_key=True) + service = Column(String, primary_key=True, nullable=False) + rule = Column(String, primary_key=True, nullable=False) + roles = Column(JSON) + methods = Column(JSON) + created_at = Column(TIMESTAMP) + updated_at = Column(TIMESTAMP) + + def __repr__(self): + return ( + "".format( # pragma: no cover + self.id, self.service, self.roles, self.methods, self.created_at, self.updated_at + ) + ) + + def to_serializable_dict(self): + return { + "id": self.id, + "service": self.service, + "roles": self.roles, + "methods": self.methods, + "created_at": str(self.created_at), + "updated_at": str(self.updated_at), + } + + +class AutzRuleDTO: + id: int + service: str + rule: str + roles: list + methods: list + created_at: str + updated_at: str + + def __init__(self, model: AutzRule): + self.id = model.id + self.rule = model.rule + self.service = model.service + self.roles = model.roles + self.methods = model.methods + self.created_at = str(model.created_at) + self.updated_at = str(model.updated_at) diff --git a/minos/api_gateway/rest/database/repository.py b/minos/api_gateway/rest/database/repository.py index bb783c1..c8e3b3b 100644 --- a/minos/api_gateway/rest/database/repository.py +++ b/minos/api_gateway/rest/database/repository.py @@ -8,6 +8,8 @@ from .models import ( AuthRule, AuthRuleDTO, + AutzRule, + AutzRuleDTO, ) @@ -17,12 +19,17 @@ def __init__(self, engine): self.s = sessionmaker(bind=engine) self.session = self.s() - def create(self, record: AuthRule): + def create_auth_rule(self, record: AuthRule): self.session.add(record) self.session.commit() return record.to_serializable_dict() - def get_all(self): + def create_autz_rule(self, record: AutzRule): + self.session.add(record) + self.session.commit() + return record.to_serializable_dict() + + def get_auth_rules(self): r = self.session.query(AuthRule).all() records = list() @@ -30,15 +37,31 @@ def get_all(self): records.append(AuthRuleDTO(record).__dict__) return records - def update(self, id: int, **kwargs): + def get_autz_rules(self): + r = self.session.query(AutzRule).all() + + records = list() + for record in r: + records.append(AutzRuleDTO(record).__dict__) + return records + + def update_auth_rule(self, id: int, **kwargs): self.session.query(AuthRule).filter(AuthRule.id == id).update(kwargs) self.session.commit() - def delete(self, id: int): + def update_autz_rule(self, id: int, **kwargs): + self.session.query(AutzRule).filter(AutzRule.id == id).update(kwargs) + self.session.commit() + + def delete_auth_rule(self, id: int): self.session.query(AuthRule).filter(AuthRule.id == id).delete() self.session.commit() - def get_by_service(self, service: str): + def delete_autz_rule(self, id: int): + self.session.query(AutzRule).filter(AutzRule.id == id).delete() + self.session.commit() + + def get_auth_rule_by_service(self, service: str): r = self.session.query(AuthRule).filter(or_(AuthRule.service == service, AuthRule.service == "*")).all() records = list() diff --git a/minos/api_gateway/rest/handler.py b/minos/api_gateway/rest/handler.py index d2c1a86..b99bb1a 100644 --- a/minos/api_gateway/rest/handler.py +++ b/minos/api_gateway/rest/handler.py @@ -21,6 +21,7 @@ from minos.api_gateway.rest.database.models import ( AuthRule, + AutzRule, ) from minos.api_gateway.rest.urlmatch.authmatch import ( AuthMatch, @@ -56,7 +57,7 @@ async def orchestrate(request: web.Request) -> web.Response: async def check_auth(request: web.Request, service: str, url: str, method: str) -> bool: - records = Repository(request.app["db_engine"]).get_by_service(service) + records = Repository(request.app["db_engine"]).get_auth_rule_by_service(service) return AuthMatch.match(url=url, method=method, records=records) @@ -239,9 +240,26 @@ async def get_endpoints(request: web.Request) -> web.Response: {"error": "The requested endpoint is not available."}, status=web.HTTPServiceUnavailable.status_code ) + @staticmethod + async def get_roles(request: web.Request) -> web.Response: + auth_host = request.app["config"].rest.auth.host + auth_port = request.app["config"].rest.auth.port + auth_path = request.app["config"].rest.auth.path + + url = URL.build(scheme="http", host=auth_host, port=auth_port, path=f"{auth_path}/roles") + + try: + async with ClientSession() as session: + async with session.get(url=url) as response: + return await _clone_response(response) + except ClientConnectorError: + return web.json_response( + {"error": "The requested endpoint is not available."}, status=web.HTTPServiceUnavailable.status_code + ) + @staticmethod async def get_rules(request: web.Request) -> web.Response: - records = Repository(request.app["db_engine"]).get_all() + records = Repository(request.app["db_engine"]).get_auth_rules() return web.json_response(records) @staticmethod @@ -265,7 +283,7 @@ async def create_rule(request: web.Request) -> web.Response: updated_at=now, ) - record = Repository(request.app["db_engine"]).create(rule) + record = Repository(request.app["db_engine"]).create_auth_rule(rule) return web.json_response(record) except Exception as e: @@ -276,7 +294,17 @@ async def update_rule(request: web.Request) -> web.Response: try: id = int(request.url.name) content = await request.json() - Repository(request.app["db_engine"]).update(id=id, **content) + Repository(request.app["db_engine"]).update_auth_rule(id=id, **content) + return web.json_response(status=web.HTTPOk.status_code) + except Exception as e: + return web.json_response({"error": str(e)}, status=web.HTTPBadRequest.status_code) + + @staticmethod + async def update_autz_rule(request: web.Request) -> web.Response: + try: + id = int(request.url.name) + content = await request.json() + Repository(request.app["db_engine"]).update_autz_rule(id=id, **content) return web.json_response(status=web.HTTPOk.status_code) except Exception as e: return web.json_response({"error": str(e)}, status=web.HTTPBadRequest.status_code) @@ -285,7 +313,54 @@ async def update_rule(request: web.Request) -> web.Response: async def delete_rule(request: web.Request) -> web.Response: try: id = int(request.url.name) - Repository(request.app["db_engine"]).delete(id) + Repository(request.app["db_engine"]).delete_auth_rule(id) + return web.json_response(status=web.HTTPOk.status_code) + except Exception as e: + return web.json_response({"error": str(e)}, status=web.HTTPBadRequest.status_code) + + @staticmethod + async def delete_autz_rule(request: web.Request) -> web.Response: + try: + id = int(request.url.name) + Repository(request.app["db_engine"]).delete_autz_rule(id) return web.json_response(status=web.HTTPOk.status_code) except Exception as e: return web.json_response({"error": str(e)}, status=web.HTTPBadRequest.status_code) + + @staticmethod + async def create_autz_rule(request: web.Request) -> web.Response: + try: + content = await request.json() + + if ( + "service" not in content + and "rule" not in content + and "roles" not in content + and "methods" not in content + ): + return web.json_response( + {"error": "Wrong data. Provide 'service', 'rule', 'roles' and 'methods' parameters."}, + status=web.HTTPBadRequest.status_code, + ) + + now = datetime.now() + + rule = AutzRule( + service=content["service"], + rule=content["rule"], + roles=content["roles"], + methods=content["methods"], + created_at=now, + updated_at=now, + ) + + record = Repository(request.app["db_engine"]).create_autz_rule(rule) + + return web.json_response(record) + except Exception as e: + return web.json_response({"error": str(e)}, status=web.HTTPBadRequest.status_code) + + @staticmethod + async def get_autz_rules(request: web.Request) -> web.Response: + records = Repository(request.app["db_engine"]).get_autz_rules() + return web.json_response(records) diff --git a/minos/api_gateway/rest/service.py b/minos/api_gateway/rest/service.py index c8a474e..9f0b3bc 100644 --- a/minos/api_gateway/rest/service.py +++ b/minos/api_gateway/rest/service.py @@ -70,6 +70,12 @@ async def create_application(self) -> web.Application: app.router.add_route("PATCH", "/admin/rules/{id}", AdminHandler.update_rule) app.router.add_route("DELETE", "/admin/rules/{id}", AdminHandler.delete_rule) + app.router.add_route("GET", "/admin/roles", AdminHandler.get_roles) + app.router.add_route("POST", "/admin/autz-rules", AdminHandler.create_autz_rule) + app.router.add_route("GET", "/admin/autz-rules", AdminHandler.get_autz_rules) + app.router.add_route("PATCH", "/admin/autz-rules/{id}", AdminHandler.update_autz_rule) + app.router.add_route("DELETE", "/admin/autz-rules/{id}", AdminHandler.delete_autz_rule) + # Administration routes path = Path(Path.cwd()) aiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader(f"{path}/minos/api_gateway/rest/backend/templates")) From b362193b4101e6e73bc79f2fe145ba32ee4b7e59 Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Tue, 15 Feb 2022 19:58:20 +0100 Subject: [PATCH 02/10] ISSUE #92 --- minos/api_gateway/rest/database/repository.py | 8 +++++ minos/api_gateway/rest/handler.py | 31 +++++++++++++++++-- minos/api_gateway/rest/urlmatch/autzmatch.py | 21 +++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 minos/api_gateway/rest/urlmatch/autzmatch.py diff --git a/minos/api_gateway/rest/database/repository.py b/minos/api_gateway/rest/database/repository.py index c8e3b3b..f8fa70c 100644 --- a/minos/api_gateway/rest/database/repository.py +++ b/minos/api_gateway/rest/database/repository.py @@ -68,3 +68,11 @@ def get_auth_rule_by_service(self, service: str): for record in r: records.append(AuthRuleDTO(record)) return records + + def get_autz_rule_by_service(self, service: str): + r = self.session.query(AutzRule).filter(or_(AutzRule.service == service, AutzRule.service == "*")).all() + + records = list() + for record in r: + records.append(AutzRuleDTO(record)) + return records diff --git a/minos/api_gateway/rest/handler.py b/minos/api_gateway/rest/handler.py index b99bb1a..da5a2c4 100644 --- a/minos/api_gateway/rest/handler.py +++ b/minos/api_gateway/rest/handler.py @@ -30,6 +30,9 @@ from .database.repository import ( Repository, ) +from .urlmatch.autzmatch import ( + AutzMatch, +) logger = logging.getLogger(__name__) @@ -47,20 +50,44 @@ async def orchestrate(request: web.Request) -> web.Response: auth = request.app["config"].rest.auth user = None if auth is not None and auth.enabled: - if await check_auth(request=request, service=request.url.parts[1], url=str(request.url), method=request.method): + if await check_authentication( + request=request, service=request.url.parts[1], url=str(request.url), method=request.method + ): response = await validate_token(request) user = json.loads(response) user = user["uuid"] + if await check_authorization( + request=request, service=request.url.parts[1], url=str(request.url), method=request.method + ): + response = await validate_token(request) + data = json.loads(response) + user = data["uuid"] + role = data["role"] + if not await is_authorized_role( + request=request, role=role, service=request.url.parts[1], url=str(request.url), method=request.method + ): + return web.HTTPUnauthorized() + microservice_response = await call(**discovery_data, original_req=request, user=user) return microservice_response -async def check_auth(request: web.Request, service: str, url: str, method: str) -> bool: +async def check_authentication(request: web.Request, service: str, url: str, method: str) -> bool: records = Repository(request.app["db_engine"]).get_auth_rule_by_service(service) return AuthMatch.match(url=url, method=method, records=records) +async def check_authorization(request: web.Request, service: str, url: str, method: str) -> bool: + records = Repository(request.app["db_engine"]).get_autz_rule_by_service(service) + return AuthMatch.match(url=url, method=method, records=records) + + +async def is_authorized_role(request: web.Request, role: int, service: str, url: str, method: str) -> bool: + records = Repository(request.app["db_engine"]).get_autz_rule_by_service(service) + return AutzMatch.match(url=url, role=role, method=method, records=records) + + async def authentication_default(request: web.Request) -> web.Response: """ Orchestrate discovery and microservice call """ auth_host = request.app["config"].rest.auth.host diff --git a/minos/api_gateway/rest/urlmatch/autzmatch.py b/minos/api_gateway/rest/urlmatch/autzmatch.py new file mode 100644 index 0000000..33f2fd1 --- /dev/null +++ b/minos/api_gateway/rest/urlmatch/autzmatch.py @@ -0,0 +1,21 @@ +from ..database.models import ( + AuthRuleDTO, + AutzRuleDTO, +) +from .urlmatch import ( + UrlMatch, +) + + +class AutzMatch(UrlMatch): + @staticmethod + def match(url: str, role: int, method: str, records: list[AutzRuleDTO]) -> bool: + for record in records: + if AutzMatch.urlmatch(record.rule, url): + if record.roles is None: # pragma: no cover + return True + else: + if role in record.roles or "*" in record.roles: + return True + + return False From 5f5cfdd6abbb2c2cb8ef92bc992d80724deead85 Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Wed, 16 Feb 2022 10:37:23 +0100 Subject: [PATCH 03/10] ISSUE #92 --- minos/api_gateway/rest/urlmatch/autzmatch.py | 1 - 1 file changed, 1 deletion(-) diff --git a/minos/api_gateway/rest/urlmatch/autzmatch.py b/minos/api_gateway/rest/urlmatch/autzmatch.py index 33f2fd1..2b7a85e 100644 --- a/minos/api_gateway/rest/urlmatch/autzmatch.py +++ b/minos/api_gateway/rest/urlmatch/autzmatch.py @@ -1,5 +1,4 @@ from ..database.models import ( - AuthRuleDTO, AutzRuleDTO, ) from .urlmatch import ( From 8ad997eef42336fdda77003f1f2ed7e29387c8de Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Wed, 16 Feb 2022 10:45:44 +0100 Subject: [PATCH 04/10] ISSUE #92 - Remove unittest_run_loop --- tests/test_api_gateway/test_rest/test_admin.py | 10 ---------- .../test_rest/test_authentication.py | 12 ------------ tests/test_api_gateway/test_rest/test_cors.py | 2 -- tests/test_api_gateway/test_rest/test_service.py | 10 ---------- 4 files changed, 34 deletions(-) diff --git a/tests/test_api_gateway/test_rest/test_admin.py b/tests/test_api_gateway/test_rest/test_admin.py index c8d97a8..17a33c2 100644 --- a/tests/test_api_gateway/test_rest/test_admin.py +++ b/tests/test_api_gateway/test_rest/test_admin.py @@ -7,7 +7,6 @@ from aiohttp.test_utils import ( AioHTTPTestCase, - unittest_run_loop, ) from minos.api_gateway.rest import ( @@ -43,7 +42,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_admin_login(self): url = "/admin/login" @@ -57,7 +55,6 @@ async def test_admin_login(self): self.assertIn("id", await response.text()) self.assertIn("token", await response.text()) - @unittest_run_loop async def test_admin_login_no_data(self): url = "/admin/login" @@ -66,7 +63,6 @@ async def test_admin_login_no_data(self): self.assertEqual(401, response.status) self.assertDictEqual({"error": "Something went wrong!."}, json.loads(await response.text())) - @unittest_run_loop async def test_admin_login_wrong_data(self): url = "/admin/login" @@ -105,7 +101,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_admin_get_endpoints(self): url = "/admin/endpoints" @@ -137,7 +132,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_admin_get_endpoints(self): url = "/admin/endpoints" @@ -168,7 +162,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_admin_get_rules(self): url = "/admin/rules" @@ -176,7 +169,6 @@ async def test_admin_get_rules(self): self.assertEqual(200, response.status) - @unittest_run_loop async def test_admin_create_rule(self): url = "/admin/rules" @@ -188,7 +180,6 @@ async def test_admin_create_rule(self): self.assertEqual(200, response.status) - @unittest_run_loop async def test_admin_update_rule(self): url = "/admin/rules" @@ -212,7 +203,6 @@ async def test_admin_update_rule(self): self.assertEqual(200, response.status) - @unittest_run_loop async def test_admin_delete_rule(self): url = "/admin/rules" diff --git a/tests/test_api_gateway/test_rest/test_authentication.py b/tests/test_api_gateway/test_rest/test_authentication.py index ae06c55..601ef96 100644 --- a/tests/test_api_gateway/test_rest/test_authentication.py +++ b/tests/test_api_gateway/test_rest/test_authentication.py @@ -10,7 +10,6 @@ from aiohttp.test_utils import ( AioHTTPTestCase, - unittest_run_loop, ) from werkzeug.exceptions import ( abort, @@ -88,7 +87,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_auth_headers_1(self): url = "/order" headers = {"Authorization": "Bearer credential-token-test"} @@ -98,7 +96,6 @@ async def test_auth_headers_1(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) - @unittest_run_loop async def test_auth_headers_2(self): url = "/merchants/5" headers = {"Authorization": "Bearer credential-token-test"} @@ -108,7 +105,6 @@ async def test_auth_headers_2(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) - @unittest_run_loop async def test_auth_headers_3(self): url = "/categories/5" headers = {"Authorization": "Bearer credential-token-test"} @@ -118,7 +114,6 @@ async def test_auth_headers_3(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) - @unittest_run_loop async def test_default_auth_headers(self): url = "/auth/token" headers = {"Authorization": "Bearer credential-token-test"} @@ -128,7 +123,6 @@ async def test_default_auth_headers(self): self.assertEqual(200, response.status) self.assertIn("token", await response.text()) - @unittest_run_loop async def test_auth(self): url = "/auth/credentials" headers = {"Authorization": "Bearer credential-token-test"} @@ -138,7 +132,6 @@ async def test_auth(self): self.assertEqual(200, response.status) self.assertIn("uuid", await response.text()) - @unittest_run_loop async def test_wrong_auth_headers(self): url = "/order" headers = {"Authorization": "Bearer"} # Missing token @@ -147,7 +140,6 @@ async def test_wrong_auth_headers(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) - @unittest_run_loop async def test_request_has_token(self): url = "/order" headers = {"Authorization": "Bearer"} # Missing token @@ -193,7 +185,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_auth_disabled(self): url = "/order" headers = {"Authorization": "Bearer test_token"} @@ -245,7 +236,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_auth_unauthorized(self): await self.client.post( "/admin/rules", @@ -296,7 +286,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_auth_unreachable(self): url = "/merchants/iweuwieuwe" headers = {"Authorization": "Bearer test_token"} @@ -305,7 +294,6 @@ async def test_auth_unreachable(self): self.assertEqual(503, response.status) self.assertEqual("The requested endpoint is not available.", await response.text()) - @unittest_run_loop async def test_auth(self): url = "/auth/credentials" headers = {"Authorization": "Bearer credential-token-test"} diff --git a/tests/test_api_gateway/test_rest/test_cors.py b/tests/test_api_gateway/test_rest/test_cors.py index 7072927..31264f2 100644 --- a/tests/test_api_gateway/test_rest/test_cors.py +++ b/tests/test_api_gateway/test_rest/test_cors.py @@ -6,7 +6,6 @@ import attr from aiohttp.test_utils import ( AioHTTPTestCase, - unittest_run_loop, ) from aiohttp_middlewares.cors import ( ACCESS_CONTROL_ALLOW_HEADERS, @@ -77,7 +76,6 @@ def check_allow_origin( if allow_methods: assert response.headers[ACCESS_CONTROL_ALLOW_METHODS] == ", ".join(allow_methods) - @unittest_run_loop async def test_cors_enabled(self): method = "GET" extra_headers = {} diff --git a/tests/test_api_gateway/test_rest/test_service.py b/tests/test_api_gateway/test_rest/test_service.py index 49f383c..32628f8 100644 --- a/tests/test_api_gateway/test_rest/test_service.py +++ b/tests/test_api_gateway/test_rest/test_service.py @@ -5,7 +5,6 @@ from aiohttp.test_utils import ( AioHTTPTestCase, - unittest_run_loop, ) from werkzeug.exceptions import ( abort, @@ -60,7 +59,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) @@ -68,7 +66,6 @@ async def test_get(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) - @unittest_run_loop async def test_post(self): url = "/order" response = await self.client.request("POST", url) @@ -76,7 +73,6 @@ async def test_post(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) - @unittest_run_loop async def test_put(self): url = "/order/5" response = await self.client.request("PUT", url) @@ -84,7 +80,6 @@ async def test_put(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) - @unittest_run_loop async def test_patch(self): url = "/order/5" response = await self.client.request("PATCH", url) @@ -92,7 +87,6 @@ async def test_patch(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) - @unittest_run_loop async def test_delete(self): url = "/order/5" response = await self.client.request("DELETE", url) @@ -125,7 +119,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) @@ -160,7 +153,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) @@ -187,7 +179,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) @@ -224,7 +215,6 @@ async def get_application(self): return await rest_service.create_application() - @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) From bd9a6c1bb8ca01af6e67a4c73ce71e7ef39606a0 Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Wed, 16 Feb 2022 12:51:55 +0100 Subject: [PATCH 05/10] Revert "ISSUE #92 - Remove unittest_run_loop" This reverts commit 8ad997ee --- tests/test_api_gateway/test_rest/test_admin.py | 10 ++++++++++ .../test_rest/test_authentication.py | 12 ++++++++++++ tests/test_api_gateway/test_rest/test_cors.py | 2 ++ tests/test_api_gateway/test_rest/test_service.py | 10 ++++++++++ 4 files changed, 34 insertions(+) diff --git a/tests/test_api_gateway/test_rest/test_admin.py b/tests/test_api_gateway/test_rest/test_admin.py index 17a33c2..c8d97a8 100644 --- a/tests/test_api_gateway/test_rest/test_admin.py +++ b/tests/test_api_gateway/test_rest/test_admin.py @@ -7,6 +7,7 @@ from aiohttp.test_utils import ( AioHTTPTestCase, + unittest_run_loop, ) from minos.api_gateway.rest import ( @@ -42,6 +43,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_admin_login(self): url = "/admin/login" @@ -55,6 +57,7 @@ async def test_admin_login(self): self.assertIn("id", await response.text()) self.assertIn("token", await response.text()) + @unittest_run_loop async def test_admin_login_no_data(self): url = "/admin/login" @@ -63,6 +66,7 @@ async def test_admin_login_no_data(self): self.assertEqual(401, response.status) self.assertDictEqual({"error": "Something went wrong!."}, json.loads(await response.text())) + @unittest_run_loop async def test_admin_login_wrong_data(self): url = "/admin/login" @@ -101,6 +105,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_admin_get_endpoints(self): url = "/admin/endpoints" @@ -132,6 +137,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_admin_get_endpoints(self): url = "/admin/endpoints" @@ -162,6 +168,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_admin_get_rules(self): url = "/admin/rules" @@ -169,6 +176,7 @@ async def test_admin_get_rules(self): self.assertEqual(200, response.status) + @unittest_run_loop async def test_admin_create_rule(self): url = "/admin/rules" @@ -180,6 +188,7 @@ async def test_admin_create_rule(self): self.assertEqual(200, response.status) + @unittest_run_loop async def test_admin_update_rule(self): url = "/admin/rules" @@ -203,6 +212,7 @@ async def test_admin_update_rule(self): self.assertEqual(200, response.status) + @unittest_run_loop async def test_admin_delete_rule(self): url = "/admin/rules" diff --git a/tests/test_api_gateway/test_rest/test_authentication.py b/tests/test_api_gateway/test_rest/test_authentication.py index 601ef96..ae06c55 100644 --- a/tests/test_api_gateway/test_rest/test_authentication.py +++ b/tests/test_api_gateway/test_rest/test_authentication.py @@ -10,6 +10,7 @@ from aiohttp.test_utils import ( AioHTTPTestCase, + unittest_run_loop, ) from werkzeug.exceptions import ( abort, @@ -87,6 +88,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_auth_headers_1(self): url = "/order" headers = {"Authorization": "Bearer credential-token-test"} @@ -96,6 +98,7 @@ async def test_auth_headers_1(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) + @unittest_run_loop async def test_auth_headers_2(self): url = "/merchants/5" headers = {"Authorization": "Bearer credential-token-test"} @@ -105,6 +108,7 @@ async def test_auth_headers_2(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) + @unittest_run_loop async def test_auth_headers_3(self): url = "/categories/5" headers = {"Authorization": "Bearer credential-token-test"} @@ -114,6 +118,7 @@ async def test_auth_headers_3(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) + @unittest_run_loop async def test_default_auth_headers(self): url = "/auth/token" headers = {"Authorization": "Bearer credential-token-test"} @@ -123,6 +128,7 @@ async def test_default_auth_headers(self): self.assertEqual(200, response.status) self.assertIn("token", await response.text()) + @unittest_run_loop async def test_auth(self): url = "/auth/credentials" headers = {"Authorization": "Bearer credential-token-test"} @@ -132,6 +138,7 @@ async def test_auth(self): self.assertEqual(200, response.status) self.assertIn("uuid", await response.text()) + @unittest_run_loop async def test_wrong_auth_headers(self): url = "/order" headers = {"Authorization": "Bearer"} # Missing token @@ -140,6 +147,7 @@ async def test_wrong_auth_headers(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) + @unittest_run_loop async def test_request_has_token(self): url = "/order" headers = {"Authorization": "Bearer"} # Missing token @@ -185,6 +193,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_auth_disabled(self): url = "/order" headers = {"Authorization": "Bearer test_token"} @@ -236,6 +245,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_auth_unauthorized(self): await self.client.post( "/admin/rules", @@ -286,6 +296,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_auth_unreachable(self): url = "/merchants/iweuwieuwe" headers = {"Authorization": "Bearer test_token"} @@ -294,6 +305,7 @@ async def test_auth_unreachable(self): self.assertEqual(503, response.status) self.assertEqual("The requested endpoint is not available.", await response.text()) + @unittest_run_loop async def test_auth(self): url = "/auth/credentials" headers = {"Authorization": "Bearer credential-token-test"} diff --git a/tests/test_api_gateway/test_rest/test_cors.py b/tests/test_api_gateway/test_rest/test_cors.py index 31264f2..7072927 100644 --- a/tests/test_api_gateway/test_rest/test_cors.py +++ b/tests/test_api_gateway/test_rest/test_cors.py @@ -6,6 +6,7 @@ import attr from aiohttp.test_utils import ( AioHTTPTestCase, + unittest_run_loop, ) from aiohttp_middlewares.cors import ( ACCESS_CONTROL_ALLOW_HEADERS, @@ -76,6 +77,7 @@ def check_allow_origin( if allow_methods: assert response.headers[ACCESS_CONTROL_ALLOW_METHODS] == ", ".join(allow_methods) + @unittest_run_loop async def test_cors_enabled(self): method = "GET" extra_headers = {} diff --git a/tests/test_api_gateway/test_rest/test_service.py b/tests/test_api_gateway/test_rest/test_service.py index 32628f8..49f383c 100644 --- a/tests/test_api_gateway/test_rest/test_service.py +++ b/tests/test_api_gateway/test_rest/test_service.py @@ -5,6 +5,7 @@ from aiohttp.test_utils import ( AioHTTPTestCase, + unittest_run_loop, ) from werkzeug.exceptions import ( abort, @@ -59,6 +60,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) @@ -66,6 +68,7 @@ async def test_get(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) + @unittest_run_loop async def test_post(self): url = "/order" response = await self.client.request("POST", url) @@ -73,6 +76,7 @@ async def test_post(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) + @unittest_run_loop async def test_put(self): url = "/order/5" response = await self.client.request("PUT", url) @@ -80,6 +84,7 @@ async def test_put(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) + @unittest_run_loop async def test_patch(self): url = "/order/5" response = await self.client.request("PATCH", url) @@ -87,6 +92,7 @@ async def test_patch(self): self.assertEqual(200, response.status) self.assertIn("Microservice call correct!!!", await response.text()) + @unittest_run_loop async def test_delete(self): url = "/order/5" response = await self.client.request("DELETE", url) @@ -119,6 +125,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) @@ -153,6 +160,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) @@ -179,6 +187,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) @@ -215,6 +224,7 @@ async def get_application(self): return await rest_service.create_application() + @unittest_run_loop async def test_get(self): url = "/order/5?verb=GET&path=12324" response = await self.client.request("GET", url) From d0ecc7a48ea6b3b2f233a5c5253804e6011cd249 Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Wed, 16 Feb 2022 13:17:53 +0100 Subject: [PATCH 06/10] ISSUE #92 --- .../test_rest/test_authorization.py | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 tests/test_api_gateway/test_rest/test_authorization.py diff --git a/tests/test_api_gateway/test_rest/test_authorization.py b/tests/test_api_gateway/test_rest/test_authorization.py new file mode 100644 index 0000000..bde510b --- /dev/null +++ b/tests/test_api_gateway/test_rest/test_authorization.py @@ -0,0 +1,174 @@ +import json +import os +import unittest +from unittest import ( + mock, +) +from uuid import ( + uuid4, +) + +from aiohttp.test_utils import ( + AioHTTPTestCase, + unittest_run_loop, +) +from werkzeug.exceptions import ( + abort, +) + +from minos.api_gateway.rest import ( + ApiGatewayConfig, + ApiGatewayRestService, +) +from tests.mock_servers.server import ( + MockServer, +) +from tests.utils import ( + BASE_PATH, +) + + +class TestApiGatewayAuthorization(AioHTTPTestCase): + CONFIG_FILE_PATH = BASE_PATH / "config.yml" + + @mock.patch.dict(os.environ, {"API_GATEWAY_REST_CORS_ENABLED": "true"}) + def setUp(self) -> None: + self.config = ApiGatewayConfig(self.CONFIG_FILE_PATH) + + self.discovery = MockServer(host=self.config.discovery.host, port=self.config.discovery.port,) + self.discovery.add_json_response( + "/microservices", {"address": "localhost", "port": "5568", "status": True}, + ) + + self.microservice = MockServer(host="localhost", port=5568) + self.microservice.add_json_response( + "/order/5", "Microservice call correct!!!", methods=("GET", "PUT", "PATCH", "DELETE",) + ) + self.microservice.add_json_response( + "/merchants/5", "Microservice call correct!!!", methods=("GET", "PUT", "PATCH", "DELETE",) + ) + self.microservice.add_json_response("/categories/5", "Microservice call correct!!!", methods=("GET",)) + self.microservice.add_json_response("/order", "Microservice call correct!!!", methods=("POST",)) + + self.authentication_service = MockServer(host=self.config.rest.auth.host, port=self.config.rest.auth.port) + + self.authentication_service.add_json_response("/auth/credentials", {"uuid": uuid4()}, methods=("POST",)) + self.authentication_service.add_json_response( + "/auth/credentials/login", {"token": "credential-token-test"}, methods=("POST",) + ) + self.authentication_service.add_json_response("/auth/credentials", {"uuid": uuid4()}, methods=("GET",)) + self.authentication_service.add_json_response( + "/auth/token", {"uuid": uuid4(), "token": "token-test"}, methods=("POST",) + ) + self.authentication_service.add_json_response("/auth/token/login", {"token": "token-test"}, methods=("POST",)) + self.authentication_service.add_json_response("/auth/token", {"uuid": uuid4()}, methods=("GET",)) + + self.authentication_service.add_json_response( + "/auth/validate-token", {"uuid": uuid4(), "role": 3}, methods=("POST",) + ) + + self.authentication_service.add_json_response("/auth", {"uuid": uuid4()}, methods=("POST", "GET",)) + + self.discovery.start() + self.microservice.start() + self.authentication_service.start() + super().setUp() + + def tearDown(self) -> None: + self.discovery.shutdown_server() + self.microservice.shutdown_server() + self.authentication_service.shutdown_server() + super().tearDown() + + async def get_application(self): + """ + Override the get_app method to return your application. + """ + rest_service = ApiGatewayRestService( + address=self.config.rest.host, port=self.config.rest.port, config=self.config + ) + + return await rest_service.create_application() + + @unittest_run_loop + async def test_auth_unauthorized(self): + await self.client.post( + "/admin/rules", + data=json.dumps({"service": "merchants", "rule": "*://*/merchants/*", "methods": ["GET", "POST"]}), + ) + await self.client.post( + "/admin/autz-rules", + data=json.dumps( + {"service": "merchants", "roles": ["2"], "rule": "*://*/merchants/*", "methods": ["GET", "POST"]} + ), + ) + url = "/merchants/5" + headers = {"Authorization": "Bearer credential-token-test"} + + response = await self.client.request("POST", url, headers=headers) + + self.assertEqual(401, response.status) + self.assertIn("401: Unauthorized", await response.text()) + + +class TestAutzFailed(AioHTTPTestCase): + CONFIG_FILE_PATH = BASE_PATH / "config.yml" + + @mock.patch.dict(os.environ, {"API_GATEWAY_REST_CORS_ENABLED": "true"}) + def setUp(self) -> None: + self.config = ApiGatewayConfig(self.CONFIG_FILE_PATH) + + self.discovery = MockServer(host=self.config.discovery.host, port=self.config.discovery.port,) + self.discovery.add_json_response( + "/microservices", {"address": "localhost", "port": "5568", "status": True}, + ) + + self.microservice = MockServer(host="localhost", port=5568) + self.microservice.add_json_response( + "/order/5", "Microservice call correct!!!", methods=("GET", "PUT", "PATCH", "DELETE",) + ) + self.microservice.add_json_response("/order", "Microservice call correct!!!", methods=("POST",)) + + self.authentication_service = MockServer(host=self.config.rest.auth.host, port=self.config.rest.auth.port) + self.authentication_service.add_json_response("/auth/validate-token", lambda: abort(400), methods=("POST",)) + + self.discovery.start() + self.microservice.start() + self.authentication_service.start() + super().setUp() + + def tearDown(self) -> None: + self.discovery.shutdown_server() + self.microservice.shutdown_server() + self.authentication_service.shutdown_server() + super().tearDown() + + async def get_application(self): + """ + Override the get_app method to return your application. + """ + rest_service = ApiGatewayRestService( + address=self.config.rest.host, port=self.config.rest.port, config=self.config + ) + + return await rest_service.create_application() + + @unittest_run_loop + async def test_auth_unauthorized(self): + await self.client.post( + "/admin/autz-rules", + data=json.dumps( + {"service": "merchants", "roles": ["Customer"], "rule": "*://*/merchants/*", "methods": ["GET", "POST"]} + ), + ) + url = "/merchants/jksdksdjskd" + headers = {"Authorization": "Bearer credential-token-test_01"} + + response = await self.client.request("POST", url, headers=headers) + + self.assertEqual(401, response.status) + self.assertIn("The given request does not have authorization to be forwarded", await response.text()) + + +if __name__ == "__main__": + unittest.main() From 2d3385f0925b4fe3b3cf4712ebe9d78ed9b3037e Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Wed, 16 Feb 2022 13:42:22 +0100 Subject: [PATCH 07/10] ISSUE #92 --- minos/api_gateway/rest/backend/admin/main.0d2304017c562996.js | 1 - minos/api_gateway/rest/backend/admin/main.33051811e0a291cf.js | 1 + minos/api_gateway/rest/backend/templates/index.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 minos/api_gateway/rest/backend/admin/main.0d2304017c562996.js create mode 100644 minos/api_gateway/rest/backend/admin/main.33051811e0a291cf.js diff --git a/minos/api_gateway/rest/backend/admin/main.0d2304017c562996.js b/minos/api_gateway/rest/backend/admin/main.0d2304017c562996.js deleted file mode 100644 index d75fbb1..0000000 --- a/minos/api_gateway/rest/backend/admin/main.0d2304017c562996.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var H$=Object.defineProperty,U$=Object.defineProperties,j$=Object.getOwnPropertyDescriptors,wD=Object.getOwnPropertySymbols,$$=Object.prototype.hasOwnProperty,G$=Object.prototype.propertyIsEnumerable,CD=(J,yt,At)=>yt in J?H$(J,yt,{enumerable:!0,configurable:!0,writable:!0,value:At}):J[yt]=At,V=(J,yt)=>{for(var At in yt||(yt={}))$$.call(yt,At)&&CD(J,At,yt[At]);if(wD)for(var At of wD(yt))G$.call(yt,At)&&CD(J,At,yt[At]);return J},rt=(J,yt)=>U$(J,j$(yt));(self.webpackChunkminos_api_gateway_front=self.webpackChunkminos_api_gateway_front||[]).push([[179],{676:()=>{function J(t){return"function"==typeof t}function yt(t){const e=t(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const At=yt(t=>function(e){t(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 vr(t,n){if(t){const e=t.indexOf(n);0<=e&&t.splice(e,1)}}class Ft{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._teardowns=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const o of e)o.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(J(i))try{i()}catch(o){n=o instanceof At?o.errors:[o]}const{_teardowns:r}=this;if(r){this._teardowns=null;for(const o of r)try{Af(o)}catch(s){n=null!=n?n:[],s instanceof At?n=[...n,...s.errors]:n.push(s)}}if(n)throw new At(n)}}add(n){var e;if(n&&n!==this)if(this.closed)Af(n);else{if(n instanceof Ft){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._teardowns=null!==(e=this._teardowns)&&void 0!==e?e:[]).push(n)}}_hasParent(n){const{_parentage:e}=this;return e===n||Array.isArray(e)&&e.includes(n)}_addParent(n){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n}_removeParent(n){const{_parentage:e}=this;e===n?this._parentage=null:Array.isArray(e)&&vr(e,n)}remove(n){const{_teardowns:e}=this;e&&vr(e,n),n instanceof Ft&&n._removeParent(this)}}Ft.EMPTY=(()=>{const t=new Ft;return t.closed=!0,t})();const Rf=Ft.EMPTY;function Of(t){return t instanceof Ft||t&&"closed"in t&&J(t.remove)&&J(t.add)&&J(t.unsubscribe)}function Af(t){J(t)?t():t.unsubscribe()}const ji={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},da={setTimeout(...t){const{delegate:n}=da;return((null==n?void 0:n.setTimeout)||setTimeout)(...t)},clearTimeout(t){const{delegate:n}=da;return((null==n?void 0:n.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Ff(t){da.setTimeout(()=>{const{onUnhandledError:n}=ji;if(!n)throw t;n(t)})}function yi(){}const DD=Uc("C",void 0,void 0);function Uc(t,n,e){return{kind:t,value:n,error:e}}let $i=null;function ha(t){if(ji.useDeprecatedSynchronousErrorHandling){const n=!$i;if(n&&($i={errorThrown:!1,error:null}),t(),n){const{errorThrown:e,error:i}=$i;if($i=null,e)throw i}}else t()}class jc extends Ft{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,Of(n)&&n.add(this)):this.destination=xD}static create(n,e,i){return new $c(n,e,i)}next(n){this.isStopped?zc(Uc("N",n,void 0),this):this._next(n)}error(n){this.isStopped?zc(Uc("E",void 0,n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?zc(DD,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}class $c extends jc{constructor(n,e,i){let r;if(super(),J(n))r=n;else if(n){let o;({next:r,error:e,complete:i}=n),this&&ji.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=()=>this.unsubscribe()):o=n,r=null==r?void 0:r.bind(o),e=null==e?void 0:e.bind(o),i=null==i?void 0:i.bind(o)}this.destination={next:r?Gc(r):yi,error:Gc(null!=e?e:Pf),complete:i?Gc(i):yi}}}function Gc(t,n){return(...e)=>{try{t(...e)}catch(i){ji.useDeprecatedSynchronousErrorHandling?function(t){ji.useDeprecatedSynchronousErrorHandling&&$i&&($i.errorThrown=!0,$i.error=t)}(i):Ff(i)}}}function Pf(t){throw t}function zc(t,n){const{onStoppedNotification:e}=ji;e&&da.setTimeout(()=>e(t,n))}const xD={closed:!0,next:yi,error:Pf,complete:yi},Wc="function"==typeof Symbol&&Symbol.observable||"@@observable";function ni(t){return t}let we=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const o=function(t){return t&&t instanceof jc||function(t){return t&&J(t.next)&&J(t.error)&&J(t.complete)}(t)&&Of(t)}(e)?e:new $c(e,i,r);return ha(()=>{const{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return new(i=Vf(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),null==s||s.unsubscribe()}},o,r)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[Wc](){return this}pipe(...e){return function(t){return 0===t.length?ni:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}(e)(this)}toPromise(e){return new(e=Vf(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function Vf(t){var n;return null!==(n=null!=t?t:ji.Promise)&&void 0!==n?n:Promise}const ND=yt(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let se=(()=>{class t extends we{constructor(){super(),this.closed=!1,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const i=new Bf(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new ND}next(e){ha(()=>{if(this._throwIfClosed(),!this.isStopped){const i=this.observers.slice();for(const r of i)r.next(e)}})}error(e){ha(()=>{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(){ha(()=>{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=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:o}=this;return i||r?Rf:(o.push(e),new Ft(()=>vr(o,e)))}_checkFinalizedStatuses(e){const{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){const e=new we;return e.source=this,e}}return t.create=(n,e)=>new Bf(n,e),t})();class Bf extends se{constructor(n,e){super(),this.destination=n,this.source=e}next(n){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,n)}error(n){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,n)}complete(){var n,e;null===(e=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===e||e.call(n)}_subscribe(n){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(n))&&void 0!==i?i:Rf}}function Hf(t){return J(null==t?void 0:t.lift)}function je(t){return n=>{if(Hf(n))return n.lift(function(e){try{return t(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}class Te extends jc{constructor(n,e,i,r,o){super(n),this.onFinalize=o,this._next=e?function(s){try{e(s)}catch(a){n.error(a)}}:super._next,this._error=r?function(s){try{r(s)}catch(a){n.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(s){n.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;const{closed:e}=this;super.unsubscribe(),!e&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}function ie(t,n){return je((e,i)=>{let r=0;e.subscribe(new Te(i,o=>{i.next(t.call(n,o,r++))}))})}function Gi(t){return this instanceof Gi?(this.v=t,this):new Gi(t)}function OD(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e.apply(t,n||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(h){i[h]&&(r[h]=function(p){return new Promise(function(b,C){o.push([h,p,b,C])>1||a(h,p)})})}function a(h,p){try{!function(h){h.value instanceof Gi?Promise.resolve(h.value.v).then(c,u):d(o[0][2],h)}(i[h](p))}catch(b){d(o[0][3],b)}}function c(h){a("next",h)}function u(h){a("throw",h)}function d(h,p){h(p),o.shift(),o.length&&a(o[0][0],o[0][1])}}function AD(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=function(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],i=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(o){e[o]=t[o]&&function(s){return new Promise(function(a,l){!function(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}(a,l,(s=t[o](s)).done,s.value)})}}}const Yc=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function Gf(t){return J(null==t?void 0:t.then)}function zf(t){return J(t[Wc])}function Wf(t){return Symbol.asyncIterator&&J(null==t?void 0:t[Symbol.asyncIterator])}function Kf(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Yf="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function qf(t){return J(null==t?void 0:t[Yf])}function Zf(t){return OD(this,arguments,function*(){const e=t.getReader();try{for(;;){const{value:i,done:r}=yield Gi(e.read());if(r)return yield Gi(void 0);yield yield Gi(i)}}finally{e.releaseLock()}})}function Jf(t){return J(null==t?void 0:t.getReader)}function Dt(t){if(t instanceof we)return t;if(null!=t){if(zf(t))return function(t){return new we(n=>{const e=t[Wc]();if(J(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(Yc(t))return function(t){return new we(n=>{for(let e=0;e{t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Ff)})}(t);if(Wf(t))return Qf(t);if(qf(t))return function(t){return new we(n=>{for(const e of t)if(n.next(e),n.closed)return;n.complete()})}(t);if(Jf(t))return function(t){return Qf(Zf(t))}(t)}throw Kf(t)}function Qf(t){return new we(n=>{(function(t,n){var e,i,r,o;return function(t,n,e,i){return new(e||(e=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):function(o){return o instanceof e?o:new e(function(s){s(o)})}(u.value).then(a,l)}c((i=i.apply(t,n||[])).next())})}(this,void 0,void 0,function*(){try{for(e=AD(t);!(i=yield e.next()).done;)if(n.next(i.value),n.closed)return}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}n.complete()})})(t,n).catch(e=>n.error(e))})}function ii(t,n,e,i=0,r=!1){const o=n.schedule(function(){e(),r?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(o),!r)return o}function ot(t,n,e=1/0){return J(n)?ot((i,r)=>ie((o,s)=>n(i,o,r,s))(Dt(t(i,r))),e):("number"==typeof n&&(e=n),je((i,r)=>function(t,n,e,i,r,o,s,a){const l=[];let c=0,u=0,d=!1;const h=()=>{d&&!l.length&&!c&&n.complete()},p=C=>c{c++;let S=!1;Dt(e(C,u++)).subscribe(new Te(n,x=>{n.next(x)},()=>{S=!0},void 0,()=>{if(S)try{for(c--;l.length&&c{d=!0,h()})),()=>{}}(i,r,t,e)))}function Oo(t=1/0){return ot(ni,t)}const Tn=new we(t=>t.complete());function Xf(t){return t&&J(t.schedule)}function qc(t){return t[t.length-1]}function pa(t){return J(qc(t))?t.pop():void 0}function Ao(t){return Xf(qc(t))?t.pop():void 0}function eg(t,n=0){return je((e,i)=>{e.subscribe(new Te(i,r=>ii(i,t,()=>i.next(r),n),()=>ii(i,t,()=>i.complete(),n),r=>ii(i,t,()=>i.error(r),n)))})}function tg(t,n=0){return je((e,i)=>{i.add(t.schedule(()=>e.subscribe(i),n))})}function ng(t,n){if(!t)throw new Error("Iterable cannot be null");return new we(e=>{ii(e,n,()=>{const i=t[Symbol.asyncIterator]();ii(e,n,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function wt(t,n){return n?function(t,n){if(null!=t){if(zf(t))return function(t,n){return Dt(t).pipe(tg(n),eg(n))}(t,n);if(Yc(t))return function(t,n){return new we(e=>{let i=0;return n.schedule(function(){i===t.length?e.complete():(e.next(t[i++]),e.closed||this.schedule())})})}(t,n);if(Gf(t))return function(t,n){return Dt(t).pipe(tg(n),eg(n))}(t,n);if(Wf(t))return ng(t,n);if(qf(t))return function(t,n){return new we(e=>{let i;return ii(e,n,()=>{i=t[Yf](),ii(e,n,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){return void e.error(s)}o?e.complete():e.next(r)},0,!0)}),()=>J(null==i?void 0:i.return)&&i.return()})}(t,n);if(Jf(t))return function(t,n){return ng(Zf(t),n)}(t,n)}throw Kf(t)}(t,n):Dt(t)}function Pt(t){return t<=0?()=>Tn:je((n,e)=>{let i=0;n.subscribe(new Te(e,r=>{++i<=t&&(e.next(r),t<=i&&e.complete())}))})}function ig(t={}){const{connector:n=(()=>new se),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=t;return o=>{let s=null,a=null,l=null,c=0,u=!1,d=!1;const h=()=>{null==a||a.unsubscribe(),a=null},p=()=>{h(),s=l=null,u=d=!1},b=()=>{const C=s;p(),null==C||C.unsubscribe()};return je((C,S)=>{c++,!d&&!u&&h();const x=l=null!=l?l:n();S.add(()=>{c--,0===c&&!d&&!u&&(a=Zc(b,r))}),x.subscribe(S),s||(s=new $c({next:D=>x.next(D),error:D=>{d=!0,h(),a=Zc(p,e,D),x.error(D)},complete:()=>{u=!0,h(),a=Zc(p,i),x.complete()}}),wt(C).subscribe(s))})(o)}}function Zc(t,n,...e){return!0===n?(t(),null):!1===n?null:n(...e).pipe(Pt(1)).subscribe(()=>t())}function Ne(t){for(let n in t)if(t[n]===Ne)return n;throw Error("Could not find renamed property on target object.")}function Jc(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Ce(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Ce).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function Qc(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const XD=Ne({__forward_ref__:Ne});function pe(t){return t.__forward_ref__=pe,t.toString=function(){return Ce(this())},t}function ue(t){return rg(t)?t():t}function rg(t){return"function"==typeof t&&t.hasOwnProperty(XD)&&t.__forward_ref__===pe}class en extends Error{constructor(n,e){super(function(t,n){return`${t?`NG0${t}: `:""}${n}`}(n,e)),this.code=n}}function re(t){return"string"==typeof t?t:null==t?"":String(t)}function Lt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():re(t)}function fa(t,n){const e=n?` in ${n}`:"";throw new en("201",`No provider for ${Lt(t)} found${e}`)}function nn(t,n){null==t&&function(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}(n,t,null,"!=")}function L(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function G(t){return{providers:t.providers||[],imports:t.imports||[]}}function eu(t){return og(t,ga)||og(t,ag)}function og(t,n){return t.hasOwnProperty(n)?t[n]:null}function sg(t){return t&&(t.hasOwnProperty(tu)||t.hasOwnProperty(sS))?t[tu]:null}const ga=Ne({\u0275prov:Ne}),tu=Ne({\u0275inj:Ne}),ag=Ne({ngInjectableDef:Ne}),sS=Ne({ngInjectorDef:Ne});var ae=(()=>((ae=ae||{})[ae.Default=0]="Default",ae[ae.Host=1]="Host",ae[ae.Self=2]="Self",ae[ae.SkipSelf=4]="SkipSelf",ae[ae.Optional=8]="Optional",ae))();let nu;function wi(t){const n=nu;return nu=t,n}function lg(t,n,e){const i=eu(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&ae.Optional?null:void 0!==n?n:void fa(Ce(t),"Injector")}function Ci(t){return{toString:t}.toString()}var hn=(()=>((hn=hn||{})[hn.OnPush=0]="OnPush",hn[hn.Default=1]="Default",hn))(),Bn=(()=>{return(t=Bn||(Bn={}))[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",Bn;var t})();const lS="undefined"!=typeof globalThis&&globalThis,cS="undefined"!=typeof window&&window,uS="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Ee=lS||"undefined"!=typeof global&&global||cS||uS,br={},ke=[],ma=Ne({\u0275cmp:Ne}),iu=Ne({\u0275dir:Ne}),ru=Ne({\u0275pipe:Ne}),cg=Ne({\u0275mod:Ne}),oi=Ne({\u0275fac:Ne}),Fo=Ne({__NG_ELEMENT_ID__:Ne});let dS=0;function xe(t){return Ci(()=>{const e={},i={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===hn.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||ke,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Bn.Emulated,id:"c",styles:t.styles||ke,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,o=t.features,s=t.pipes;return i.id+=dS++,i.inputs=pg(t.inputs,e),i.outputs=pg(t.outputs),o&&o.forEach(a=>a(i)),i.directiveDefs=r?()=>("function"==typeof r?r():r).map(ug):null,i.pipeDefs=s?()=>("function"==typeof s?s():s).map(dg):null,i})}function ug(t){return It(t)||function(t){return t[iu]||null}(t)}function dg(t){return function(t){return t[ru]||null}(t)}const hg={};function Y(t){return Ci(()=>{const n={type:t.type,bootstrap:t.bootstrap||ke,declarations:t.declarations||ke,imports:t.imports||ke,exports:t.exports||ke,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&(hg[t.id]=t.type),n})}function pg(t,n){if(null==t)return br;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}const O=xe;function Zt(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function It(t){return t[ma]||null}function pn(t,n){const e=t[cg]||null;if(!e&&!0===n)throw new Error(`Type ${Ce(t)} does not have '\u0275mod' property.`);return e}function Hn(t){return Array.isArray(t)&&"object"==typeof t[1]}function xn(t){return Array.isArray(t)&&!0===t[1]}function au(t){return 0!=(8&t.flags)}function ya(t){return 2==(2&t.flags)}function wa(t){return 1==(1&t.flags)}function In(t){return null!==t.template}function _S(t){return 0!=(512&t[2])}function qi(t,n){return t.hasOwnProperty(oi)?t[oi]:null}class yS{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Qe(){return gg}function gg(t){return t.type.prototype.ngOnChanges&&(t.setInput=CS),wS}function wS(){const t=_g(this),n=null==t?void 0:t.current;if(n){const e=t.previous;if(e===br)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function CS(t,n,e,i){const r=_g(t)||function(t,n){return t[mg]=n}(t,{previous:br,current:null}),o=r.current||(r.current={}),s=r.previous,a=this.declaredInputs[e],l=s[a];o[a]=new yS(l&&l.currentValue,n,s===br),t[i]=n}Qe.ngInherit=!0;const mg="__ngSimpleChanges__";function _g(t){return t[mg]||null}let uu;function Ge(t){return!!t.listen}const yg={createRenderer:(t,n)=>void 0!==uu?uu:"undefined"!=typeof document?document:void 0};function st(t){for(;Array.isArray(t);)t=t[0];return t}function Ca(t,n){return st(n[t])}function mn(t,n){return st(n[t.index])}function hu(t,n){return t.data[n]}function Sr(t,n){return t[n]}function on(t,n){const e=n[t];return Hn(e)?e:e[0]}function wg(t){return 4==(4&t[2])}function pu(t){return 128==(128&t[2])}function Si(t,n){return null==n?null:t[n]}function Cg(t){t[18]=0}function fu(t,n){t[5]+=n;let e=t,i=t[3];for(;null!==i&&(1===n&&1===e[5]||-1===n&&0===e[5]);)i[5]+=n,e=i,i=i[3]}const Z={lFrame:Ng(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Dg(){return Z.bindingsEnabled}function M(){return Z.lFrame.lView}function De(){return Z.lFrame.tView}function T(t){return Z.lFrame.contextLView=t,t[8]}function pt(){let t=Sg();for(;null!==t&&64===t.type;)t=t.parent;return t}function Sg(){return Z.lFrame.currentTNode}function Un(t,n){const e=Z.lFrame;e.currentTNode=t,e.isParent=n}function gu(){return Z.lFrame.isParent}function mu(){Z.lFrame.isParent=!1}function Da(){return Z.isInCheckNoChangesMode}function Sa(t){Z.isInCheckNoChangesMode=t}function Vt(){const t=Z.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function Tr(){return Z.lFrame.bindingIndex++}function ai(t){const n=Z.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function LS(t,n){const e=Z.lFrame;e.bindingIndex=e.bindingRootIndex=t,_u(n)}function _u(t){Z.lFrame.currentDirectiveIndex=t}function xg(){return Z.lFrame.currentQueryIndex}function bu(t){Z.lFrame.currentQueryIndex=t}function BS(t){const n=t[1];return 2===n.type?n.declTNode:1===n.type?t[6]:null}function Ig(t,n,e){if(e&ae.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&ae.Host||(r=BS(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;n=r,t=o}const i=Z.lFrame=Mg();return i.currentTNode=n,i.lView=t,!0}function Ta(t){const n=Mg(),e=t[1];Z.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function Mg(){const t=Z.lFrame,n=null===t?null:t.child;return null===n?Ng(t):n}function Ng(t){const n={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:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function kg(){const t=Z.lFrame;return Z.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Rg=kg;function Ea(){const t=kg();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Bt(){return Z.lFrame.selectedIndex}function Ti(t){Z.lFrame.selectedIndex=t}function ze(){const t=Z.lFrame;return hu(t.tView,t.selectedIndex)}function xa(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[18]+=65536),(a>11>16&&(3&t[2])===n){t[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class Ho{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Na(t,n,e){const i=Ge(t);let r=0;for(;rn){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[15],e--;return i}let Du=!0;function Ra(t){const n=Du;return Du=t,n}let eT=0;function jo(t,n){const e=Tu(t,n);if(-1!==e)return e;const i=n[1];i.firstCreatePass&&(t.injectorIndex=n.length,Su(i.data,t),Su(n,null),Su(i.blueprint,null));const r=Oa(t,n),o=t.injectorIndex;if(Pg(r)){const s=Er(r),a=xr(r,n),l=a[1].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function Su(t,n){t.push(0,0,0,0,0,0,0,0,n)}function Tu(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function Oa(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){const o=r[1],s=o.type;if(i=2===s?o.declTNode:1===s?r[6]:null,null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function Aa(t,n,e){!function(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Fo)&&(i=e[Fo]),null==i&&(i=e[Fo]=eT++);const r=255&i;n.data[t+(r>>5)]|=1<=0?255&n:iT:n}(e);if("function"==typeof o){if(!Ig(n,t,i))return i&ae.Host?Bg(r,e,i):Hg(n,e,i,r);try{const s=o(i);if(null!=s||i&ae.Optional)return s;fa(e)}finally{Rg()}}else if("number"==typeof o){let s=null,a=Tu(t,n),l=-1,c=i&ae.Host?n[16][6]:null;for((-1===a||i&ae.SkipSelf)&&(l=-1===a?Oa(t,n):n[a+8],-1!==l&&Gg(i,!1)?(s=n[1],a=Er(l),n=xr(l,n)):a=-1);-1!==a;){const u=n[1];if($g(o,a,u.data)){const d=rT(a,n,e,s,i,c);if(d!==jg)return d}l=n[a+8],-1!==l&&Gg(i,n[1].data[a+8]===c)&&$g(o,a,n)?(s=u,a=Er(l),n=xr(l,n)):a=-1}}}return Hg(n,e,i,r)}const jg={};function iT(){return new Ir(pt(),M())}function rT(t,n,e,i,r,o){const s=n[1],a=s.data[t+8],u=Fa(a,s,e,null==i?ya(a)&&Du:i!=s&&0!=(3&a.type),r&ae.Host&&o===a);return null!==u?$o(n,s,u,a):jg}function Fa(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let p=i?a:a+u;p=l&&b.type===e)return p}if(r){const p=s[l];if(p&&In(p)&&p.type===e)return l}return null}function $o(t,n,e,i){let r=t[e];const o=n.data;if(function(t){return t instanceof Ho}(r)){const s=r;s.resolving&&function(t,n){throw new en("200",`Circular dependency in DI detected for ${t}`)}(Lt(o[e]));const a=Ra(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?wi(s.injectImpl):null;Ig(t,i,ae.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=gg(n);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&wi(l),Ra(a),s.resolving=!1,Rg()}}return r}function $g(t,n,e){return!!(e[n+(t>>5)]&1<{const n=t.prototype.constructor,e=n[oi]||Eu(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[oi]||Eu(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function Eu(t){return rg(t)?()=>{const n=Eu(ue(t));return n&&n()}:qi(t)}function Zi(t){return function(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(Nr)?l[Nr]:Object.defineProperty(l,Nr,{value:[]})[Nr];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class Q{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=L({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const aT=new Q("AnalyzeForEntryComponents");function _n(t,n){void 0===n&&(n=t);for(let e=0;eArray.isArray(e)?jn(e,n):n(e))}function zg(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function Pa(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function Ko(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function Mu(t,n){const e=Or(t,n);if(e>=0)return t[1|e]}function Or(t,n){return function(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<({token:t})),-1),$n=Zo(Rr("Optional"),8),Ar=Zo(Rr("SkipSelf"),4);class sm{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function xi(t){return t instanceof sm?t.changingThisBreaksApplicationSecurity:t}const GT=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,zT=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;var at=(()=>((at=at||{})[at.NONE=0]="NONE",at[at.HTML=1]="HTML",at[at.STYLE=2]="STYLE",at[at.SCRIPT=3]="SCRIPT",at[at.URL=4]="URL",at[at.RESOURCE_URL=5]="RESOURCE_URL",at))();function Hu(t){const n=function(){const t=M();return t&&t[12]}();return n?n.sanitize(at.URL,t)||"":function(t,n){const e=function(t){return t instanceof sm&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see https://g.co/ng/security#xss)`)}return e===n}(t,"URL")?xi(t):function(t){return(t=String(t)).match(GT)||t.match(zT)?t:"unsafe:"+t}(re(t))}const mm="__ngContext__";function Nt(t,n){t[mm]=n}function ju(t){const n=function(t){return t[mm]||null}(t);return n?Array.isArray(n)?n:n.lView:null}function Gu(t){return t.ngOriginalError}function gE(t,...n){t.error(...n)}class Lr{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n),i=(t=n)&&t.ngErrorLogger||gE;var t;i(this._console,"ERROR",n),e&&i(this._console,"ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&Gu(n);for(;e&&Gu(e);)e=Gu(e);return e||null}}const wm=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Ee))();function zn(t){return t instanceof Function?t():t}var ln=(()=>((ln=ln||{})[ln.Important=1]="Important",ln[ln.DashCase=2]="DashCase",ln))();function Wu(t,n){return undefined(t,n)}function is(t){const n=t[3];return xn(n)?n[3]:n}function Ku(t){return Em(t[13])}function Yu(t){return Em(t[4])}function Em(t){for(;null!==t&&!xn(t);)t=t[4];return t}function Br(t,n,e,i,r){if(null!=i){let o,s=!1;xn(i)?o=i:Hn(i)&&(s=!0,i=i[0]);const a=st(i);0===t&&null!==e?null==r?Rm(n,e,a):Ji(n,e,a,r||null,!0):1===t&&null!==e?Ji(n,e,a,r||null,!0):2===t?function(t,n,e){const i=Ga(t,n);i&&function(t,n,e,i){Ge(t)?t.removeChild(n,e,i):n.removeChild(e)}(t,i,n,e)}(n,a,s):3===t&&n.destroyNode(a),null!=o&&function(t,n,e,i,r){const o=e[7];o!==st(e)&&Br(n,t,i,o,r);for(let a=10;a0&&(t[e-1][4]=i[4]);const o=Pa(t,10+n);!function(t,n){rs(t,n,n[11],2,null,null),n[0]=null,n[6]=null}(i[1],i);const s=o[19];null!==s&&s.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function Mm(t,n){if(!(256&n[2])){const e=n[11];Ge(e)&&e.destroyNode&&rs(t,n,e,3,null,null),function(t){let n=t[13];if(!n)return Qu(t[1],t);for(;n;){let e=null;if(Hn(n))e=n[13];else{const i=n[10];i&&(e=i)}if(!e){for(;n&&!n[4]&&n!==t;)Hn(n)&&Qu(n[1],n),n=n[3];null===n&&(n=t),Hn(n)&&Qu(n[1],n),e=n&&n[4]}n=e}}(n)}}function Qu(t,n){if(!(256&n[2])){n[2]&=-129,n[2]|=256,function(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=c]():i[r=-c].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;oo?"":r[d+1].toLowerCase();const p=8&i?h:null;if(p&&-1!==jm(p,c,0)||2&i&&c!==h){if(Mn(i))return!1;s=!0}}}}else{if(!s&&!Mn(i)&&!Mn(l))return!1;if(s&&Mn(l))continue;s=!1,i=l|1&i}}return Mn(i)||s}function Mn(t){return 0==(1&t)}function WE(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!Mn(s)&&(n+=Wm(o,r),r=""),i=s,o=o||!Mn(i);e++}return""!==r&&(n+=Wm(o,r)),n}const oe={};function v(t){Km(De(),M(),Bt()+t,Da())}function Km(t,n,e,i){if(!i)if(3==(3&n[2])){const o=t.preOrderCheckHooks;null!==o&&Ia(n,o,e)}else{const o=t.preOrderHooks;null!==o&&Ma(n,o,0,e)}Ti(e)}function Ka(t,n){return t<<17|n<<2}function Nn(t){return t>>17&32767}function id(t){return 2|t}function li(t){return(131068&t)>>2}function rd(t,n){return-131069&t|n<<2}function od(t){return 1|t}function r_(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;i20&&Km(t,n,20,Da()),e(i,r)}finally{Ti(o)}}function s_(t,n,e){if(au(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(a)!=l&&a.push(l),a.push(i,r,s)}}function f_(t,n){null!==t.hostBindings&&t.hostBindings(1,n)}function g_(t,n){n.flags|=2,(t.components||(t.components=[])).push(n.index)}function Ex(t,n,e){if(e){if(n.exportAs)for(let i=0;i0&&bd(e)}}function bd(t){for(let i=Ku(t);null!==i;i=Yu(i))for(let r=10;r0&&bd(o)}const e=t[1].components;if(null!==e)for(let i=0;i0&&bd(r)}}function Ox(t,n){const e=on(n,t),i=e[1];(function(t,n){for(let e=n.length;ePromise.resolve(null))();function y_(t){return t[7]||(t[7]=[])}function w_(t){return t.cleanup||(t.cleanup=[])}function D_(t,n){const e=t[9],i=e?e.get(Lr,null):null;i&&i.handleError(n)}function S_(t,n,e,i,r){for(let o=0;othis.processProvider(a,n,e)),jn([n],a=>this.processInjectorType(a,[],o)),this.records.set(Sd,$r(void 0,this));const s=this.records.get(Td);this.scope=null!=s?s.value:null,this.source=r||("object"==typeof n?null:Ce(n))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(n=>n.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(n,e=Yo,i=ae.Default){this.assertNotDestroyed();const r=Jg(this),o=wi(void 0);try{if(!(i&ae.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=("function"==typeof(t=n)||"object"==typeof t&&t instanceof Q)&&eu(n);a=l&&this.injectableDefInScope(l)?$r(xd(n),as):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&ae.Self?E_():this.parent).get(n,e=i&ae.Optional&&e===Yo?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Va]=s[Va]||[]).unshift(Ce(n)),r)throw s;return function(t,n,e,i){const r=t[Va];throw n[Zg]&&r.unshift(n[Zg]),t.message=function(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let r=Ce(n);if(Array.isArray(n))r=n.map(Ce).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Ce(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(_T,"\n ")}`}("\n"+t.message,r,e,i),t.ngTokenPath=r,t[Va]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{wi(o),Jg(r)}var t}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(n=>this.get(n))}toString(){const n=[];return this.records.forEach((i,r)=>n.push(Ce(r))),`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(n,e,i){if(!(n=ue(n)))return!1;let r=sg(n);const o=null==r&&n.ngModule||void 0,s=void 0===o?n:o,a=-1!==i.indexOf(s);if(void 0!==o&&(r=sg(o)),null==r)return!1;if(null!=r.imports&&!a){let u;i.push(s);try{jn(r.imports,d=>{this.processInjectorType(d,e,i)&&(void 0===u&&(u=[]),u.push(d))})}finally{}if(void 0!==u)for(let d=0;dthis.processProvider(b,h,p||ke))}}this.injectorDefTypes.add(s);const l=qi(s)||(()=>new s);this.records.set(s,$r(l,as));const c=r.providers;if(null!=c&&!a){const u=n;jn(c,d=>this.processProvider(d,u,c))}return void 0!==o&&void 0!==n.providers}processProvider(n,e,i){let r=Gr(n=ue(n))?n:ue(n&&n.provide);const o=(t=n,N_(t)?$r(void 0,t.useValue):$r(M_(t),as));var t;if(Gr(n)||!0!==n.multi)this.records.get(r);else{let s=this.records.get(r);s||(s=$r(void 0,as,!0),s.factory=()=>Ru(s.multi),this.records.set(r,s)),r=n,s.multi.push(n)}this.records.set(r,o)}hydrate(n,e){return e.value===as&&(e.value=Ux,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(t=e.value)&&"object"==typeof t&&"function"==typeof t.ngOnDestroy&&this.onDestroy.add(e.value),e.value;var t}injectableDefInScope(n){if(!n.providedIn)return!1;const e=ue(n.providedIn);return"string"==typeof e?"any"===e||e===this.scope:this.injectorDefTypes.has(e)}}function xd(t){const n=eu(t),e=null!==n?n.factory:qi(t);if(null!==e)return e;if(t instanceof Q)throw new Error(`Token ${Ce(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const n=t.length;if(n>0){const i=Ko(n,"?");throw new Error(`Can't resolve all parameters for ${Ce(t)}: (${i.join(", ")}).`)}const e=function(t){const n=t&&(t[ga]||t[ag]);if(n){const e=function(t){if(t.hasOwnProperty("name"))return t.name;const n=(""+t).match(/^function\s*([^\s(]+)/);return null===n?"":n[1]}(t);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.`),n}return null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new Error("unreachable")}function M_(t,n,e){let i;if(Gr(t)){const r=ue(t);return qi(r)||xd(r)}if(N_(t))i=()=>ue(t.useValue);else if(function(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...Ru(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))i=()=>R(ue(t.useExisting));else{const r=ue(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return qi(r)||xd(r);i=()=>new r(...Ru(t.deps))}return i}function $r(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function N_(t){return null!==t&&"object"==typeof t&&bT in t}function Gr(t){return"function"==typeof t}let lt=(()=>{class t{static create(e,i){var r;if(Array.isArray(e))return x_({name:""},i,e,"");{const o=null!=(r=e.name)?r:"";return x_({name:o},e.parent,e.providers,o)}}}return t.THROW_IF_NOT_FOUND=Yo,t.NULL=new T_,t.\u0275prov=L({token:t,providedIn:"any",factory:()=>R(Sd)}),t.__NG_ELEMENT_ID__=-1,t})();function rI(t,n){xa(ju(t)[1],pt())}function Ie(t){let n=function(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),e=!0;const i=[t];for(;n;){let r;if(In(t))r=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new Error("Directives cannot inherit Components");r=n.\u0275dir}if(r){if(e){i.push(r);const s=t;s.inputs=Nd(t.inputs),s.declaredInputs=Nd(t.declaredInputs),s.outputs=Nd(t.outputs);const a=r.hostBindings;a&&lI(t,a);const l=r.viewQuery,c=r.contentQueries;if(l&&sI(t,l),c&&aI(t,c),Jc(t.inputs,r.inputs),Jc(t.declaredInputs,r.declaredInputs),Jc(t.outputs,r.outputs),In(r)&&r.data.animation){const u=t.data;u.animation=(u.animation||[]).concat(r.data.animation)}}const o=r.features;if(o)for(let s=0;s=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=ka(r.hostAttrs,e=ka(e,r.hostAttrs))}}(i)}function Nd(t){return t===br?{}:t===ke?[]:t}function sI(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function aI(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function lI(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}let Xa=null;function zr(){if(!Xa){const t=Ee.Symbol;if(t&&t.iterator)Xa=t.iterator;else{const n=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ea(st(H[i.index])):i.index;if(Ge(e)){let H=null;if(!a&&l&&(H=function(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==H)(H.__ngLastListenerFn__||H).__ngNextListenerFn__=o,H.__ngLastListenerFn__=o,p=!1;else{o=Bd(i,n,d,o,!1);const ne=e.listen(x,r,o);h.push(o,ne),u&&u.push(r,A,D,D+1)}}else o=Bd(i,n,d,o,!0),x.addEventListener(r,o,s),h.push(o),u&&u.push(r,A,D,s)}else o=Bd(i,n,d,o,!1);const b=i.outputs;let C;if(p&&null!==b&&(C=b[r])){const S=C.length;if(S)for(let x=0;x0;)n=n[15],t--;return n}(t,Z.lFrame.contextLView))[8]}(t)}function BI(t,n){let e=null;const i=function(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(0==(1&e))return n[e+1]}return null}(t);for(let r=0;r=0}const gt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function wv(t){return t.substring(gt.key,gt.keyEnd)}function Cv(t,n){const e=gt.textEnd;return e===n?-1:(n=gt.keyEnd=function(t,n,e){for(;n32;)n++;return n}(t,gt.key=n,e),no(t,n,e))}function no(t,n,e){for(;n=0;e=Cv(n,e))an(t,wv(n),!0)}function Rn(t,n,e,i){const r=M(),o=De(),s=ai(2);o.firstUpdatePass&&Iv(o,t,s,i),n!==oe&&kt(r,s,n)&&Nv(o,o.data[Bt()],r,r[11],t,r[s+1]=function(t,n){return null==t||("string"==typeof n?t+=n:"object"==typeof t&&(t=Ce(xi(t)))),t}(n,e),i,s)}function xv(t,n){return n>=t.expandoStartIndex}function Iv(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[Bt()],s=xv(t,e);Rv(o,i)&&null===n&&!s&&(n=!1),n=function(t,n,e,i){const r=function(t){const n=Z.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=hs(e=Ud(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=Ud(r,t,n,e,i),null===o){let l=function(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==li(i))return t[Nn(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=Ud(null,t,n,l[1],i),l=hs(l,n.attrs,i),function(t,n,e,i){t[Nn(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)}else u=e;if(r)if(0!==l){const h=Nn(t[a+1]);t[i+1]=Ka(h,a),0!==h&&(t[h+1]=rd(t[h+1],i)),t[a+1]=function(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=Ka(a,0),0!==a&&(t[a+1]=rd(t[a+1],i)),a=i;else t[i+1]=Ka(l,0),0===a?a=i:t[l+1]=rd(t[l+1],i),l=i;c&&(t[i+1]=id(t[i+1])),yv(t,u,i,!0),yv(t,u,i,!1),function(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&Or(o,n)>=0&&(e[i+1]=od(e[i+1]))}(n,u,t,i,o),s=Ka(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function Ud(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===oe&&(h=d?ke:void 0);let p=d?Mu(h,i):u===i?h:void 0;if(c&&!rl(p)&&(p=Mu(l,i)),rl(p)&&(a=p,s))return a;const b=t[r+1];r=s?Nn(b):li(b)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=Mu(l,i))}return a}function rl(t){return void 0!==t}function Rv(t,n){return 0!=(t.flags&(n?16:32))}function I(t,n=""){const e=M(),i=De(),r=t+20,o=i.firstCreatePass?Hr(i,r,1,n,null):i.data[r],s=e[r]=function(t,n){return Ge(t)?t.createText(n):t.createTextNode(n)}(e[11],n);za(i,e,s,o),Un(o,!1)}function Se(t){return mt("",t,""),Se}function mt(t,n,e){const i=M(),r=function(t,n,e,i){return kt(t,Tr(),e)?n+re(e)+i:oe}(i,t,n,e);return r!==oe&&ci(i,Bt(),r),mt}function jd(t,n,e,i,r){const o=M(),s=Yr(o,t,n,e,i,r);return s!==oe&&ci(o,Bt(),s),jd}const tr=void 0;var CM=["en",[["a","p"],["AM","PM"],tr],[["AM","PM"],tr,tr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],tr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],tr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",tr,"{1} 'at' {0}",tr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){const e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let io={};function Jv(t){return t in io||(io[t]=Ee.ng&&Ee.ng.common&&Ee.ng.common.locales&&Ee.ng.common.locales[t]),io[t]}var P=(()=>((P=P||{})[P.LocaleId=0]="LocaleId",P[P.DayPeriodsFormat=1]="DayPeriodsFormat",P[P.DayPeriodsStandalone=2]="DayPeriodsStandalone",P[P.DaysFormat=3]="DaysFormat",P[P.DaysStandalone=4]="DaysStandalone",P[P.MonthsFormat=5]="MonthsFormat",P[P.MonthsStandalone=6]="MonthsStandalone",P[P.Eras=7]="Eras",P[P.FirstDayOfWeek=8]="FirstDayOfWeek",P[P.WeekendRange=9]="WeekendRange",P[P.DateFormat=10]="DateFormat",P[P.TimeFormat=11]="TimeFormat",P[P.DateTimeFormat=12]="DateTimeFormat",P[P.NumberSymbols=13]="NumberSymbols",P[P.NumberFormats=14]="NumberFormats",P[P.CurrencyCode=15]="CurrencyCode",P[P.CurrencySymbol=16]="CurrencySymbol",P[P.CurrencyName=17]="CurrencyName",P[P.Currencies=18]="Currencies",P[P.Directionality=19]="Directionality",P[P.PluralCase=20]="PluralCase",P[P.ExtraData=21]="ExtraData",P))();const ol="en-US";let Qv=ol;function Wd(t,n,e,i,r){if(t=ue(t),Array.isArray(t))for(let o=0;o>20;if(Gr(t)||!t.multi){const p=new Ho(l,r,y),b=Yd(a,n,r?u:u+h,d);-1===b?(Aa(jo(c,s),o,a),Kd(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(p),s.push(p)):(e[b]=p,s[b]=p)}else{const p=Yd(a,n,u+h,d),b=Yd(a,n,u,u+h),C=p>=0&&e[p],S=b>=0&&e[b];if(r&&!S||!r&&!C){Aa(jo(c,s),o,a);const x=function(t,n,e,i,r){const o=new Ho(t,e,y);return o.multi=[],o.index=n,o.componentProviders=0,Cb(o,r,i&&!e),o}(r?vN:_N,e.length,r,i,l);!r&&S&&(e[b].providerFactory=x),Kd(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(x),s.push(x)}else Kd(o,t,p>-1?p:b,Cb(e[r?b:p],l,!r&&i));!r&&i&&S&&e[b].componentProviders++}}}function Kd(t,n,e,i){const r=Gr(n),o=function(t){return!!t.useClass}(n);if(r||o){const l=(o?ue(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function Cb(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function Yd(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function(t,n,e){const i=De();if(i.firstCreatePass){const r=In(t);Wd(e,i.data,i.blueprint,r,!0),Wd(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class Db{}class CN{resolveComponentFactory(n){throw function(t){const n=Error(`No component factory found for ${Ce(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let nr=(()=>{class t{}return t.NULL=new CN,t})();function DN(){return oo(pt(),M())}function oo(t,n){return new ge(mn(t,n))}let ge=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=DN,t})();function SN(t){return t instanceof ge?t.nativeElement:t}class Zd{}let un=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function(){const t=M(),e=on(pt().index,t);return function(t){return t[11]}(Hn(e)?e:t)}(),t})(),xN=(()=>{class t{}return t.\u0275prov=L({token:t,providedIn:"root",factory:()=>null}),t})();class _s{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const IN=new _s("13.0.3"),Jd={};function ul(t,n,e,i,r=!1){for(;null!==e;){const o=n[e.index];if(null!==o&&i.push(st(o)),xn(o))for(let a=10;a-1&&(Ju(n,i),Pa(e,i))}this._attachedToViewContainer=!1}Mm(this._lView[1],this._lView)}onDestroy(n){u_(this._lView[1],this._lView,null,n)}markForCheck(){yd(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Cd(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,n,e){Sa(!0);try{Cd(t,n,e)}finally{Sa(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){var n;this._appRef=null,rs(this._lView[1],n=this._lView,n[11],2,null,null)}attachToAppRef(n){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=n}}class MN extends vs{constructor(n){super(n),this._view=n}detectChanges(){b_(this._view)}checkNoChanges(){!function(t){Sa(!0);try{b_(t)}finally{Sa(!1)}}(this._view)}get context(){return null}}class Tb extends nr{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=It(n);return new Qd(e,this.ngModule)}}function Eb(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}const kN=new Q("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>wm});class Qd extends Db{constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=n.selectors.map(JE).join(","),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Eb(this.componentDef.inputs)}get outputs(){return Eb(this.componentDef.outputs)}create(n,e,i,r){const o=(r=r||this.ngModule)?function(t,n){return{get:(e,i,r)=>{const o=t.get(e,Jd,r);return o!==Jd||i===Jd?o:n.get(e,i,r)}}}(n,r.injector):n,s=o.get(Zd,yg),a=o.get(xN,null),l=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=i?function(t,n,e){if(Ge(t))return t.selectRootElement(n,e===Bn.ShadowDom);let i="string"==typeof n?t.querySelector(n):n;return i.textContent="",i}(l,i,this.componentDef.encapsulation):Zu(s.createRenderer(null,this.componentDef),c,function(t){const n=t.toLowerCase();return"svg"===n?"http://www.w3.org/2000/svg":"math"===n?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,h=function(t,n){return{components:[],scheduler:t||wm,clean:Vx,playerHandler:n||null,flags:0}}(),p=Za(0,null,null,1,0,null,null,null,null,null),b=os(null,p,h,d,null,null,s,l,a,o);let C,S;Ta(b);try{const x=function(t,n,e,i,r,o){const s=e[1];e[20]=t;const l=Hr(s,20,2,"#host",null),c=l.mergedAttrs=n.hostAttrs;null!==c&&(Qa(l,c,!0),null!==t&&(Na(r,t,c),null!==l.classes&&nd(r,t,l.classes),null!==l.styles&&Um(r,t,l.styles)));const u=i.createRenderer(t,n),d=os(e,a_(n),null,n.onPush?64:16,e[20],l,i,u,o||null,null);return s.firstCreatePass&&(Aa(jo(l,e),s,n.type),g_(s,l),m_(l,e.length,1)),Ja(e,d),e[20]=d}(u,this.componentDef,b,s,l);if(u)if(i)Na(l,u,["ng-version",IN.full]);else{const{attrs:D,classes:A}=function(t){const n=[],e=[];let i=1,r=2;for(;i0&&nd(l,u,A.join(" "))}if(S=hu(p,20),void 0!==e){const D=S.projection=[];for(let A=0;Al(s,n)),n.contentQueries){const l=pt();n.contentQueries(1,s,l.directiveStart)}const a=pt();return!o.firstCreatePass||null===n.hostBindings&&null===n.hostAttrs||(Ti(a.index),p_(e[1],a,0,a.directiveStart,a.directiveEnd,n),f_(n,s)),s}(x,this.componentDef,b,h,[rI]),ss(p,b,null)}finally{Ea()}return new AN(this.componentType,C,oo(S,b),b,S)}}class AN extends class{}{constructor(n,e,i,r,o){super(),this.location=i,this._rootLView=r,this._tNode=o,this.instance=e,this.hostView=this.changeDetectorRef=new MN(r),this.componentType=n}get injector(){return new Ir(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}}class ui{}class xb{}const so=new Map;class Nb extends ui{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Tb(this);const i=pn(n);this._bootstrapComponents=zn(i.bootstrap),this._r3Injector=I_(n,e,[{provide:ui,useValue:this},{provide:nr,useValue:this.componentFactoryResolver}],Ce(n)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(n)}get(n,e=lt.THROW_IF_NOT_FOUND,i=ae.Default){return n===lt||n===ui||n===Sd?this:this._r3Injector.get(n,e,i)}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class Xd extends xb{constructor(n){super(),this.moduleType=n,null!==pn(n)&&function(t){const n=new Set;!function e(i){const r=pn(i,!0),o=r.id;null!==o&&(function(t,n,e){if(n&&n!==e)throw new Error(`Duplicate module registered for ${t} - ${Ce(n)} vs ${Ce(n.name)}`)}(o,so.get(o),i),so.set(o,i));const s=zn(r.imports);for(const a of s)n.has(a)||(n.add(a),e(a))}(t)}(n)}create(n){return new Nb(this.moduleType,n)}}function bs(t,n,e){const i=Vt()+t,r=M();return r[i]===oe?Kn(r,i,e?n.call(e):n()):cs(r,i)}function q(t,n,e,i){return Ob(M(),Vt(),t,n,e,i)}function He(t,n,e,i,r){return function(t,n,e,i,r,o,s){const a=n+e;return Qi(t,a,r,o)?Kn(t,a+2,s?i.call(s,r,o):i(r,o)):Cs(t,a+2)}(M(),Vt(),t,n,e,i,r)}function ir(t,n,e,i,r,o){return function(t,n,e,i,r,o,s,a){const l=n+e;return el(t,l,r,o,s)?Kn(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):Cs(t,l+3)}(M(),Vt(),t,n,e,i,r,o)}function ys(t,n,e,i,r,o,s){return function(t,n,e,i,r,o,s,a,l){const c=n+e;return vn(t,c,r,o,s,a)?Kn(t,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):Cs(t,c+4)}(M(),Vt(),t,n,e,i,r,o,s)}function ws(t,n,e,i,r,o,s,a){const l=Vt()+t,c=M(),u=vn(c,l,e,i,r,o);return kt(c,l+4,s)||u?Kn(c,l+5,a?n.call(a,e,i,r,o,s):n(e,i,r,o,s)):cs(c,l+5)}function ao(t,n,e,i,r,o,s,a,l){const c=Vt()+t,u=M(),d=vn(u,c,e,i,r,o);return Qi(u,c+4,s,a)||d?Kn(u,c+6,l?n.call(l,e,i,r,o,s,a):n(e,i,r,o,s,a)):cs(u,c+6)}function Rb(t,n,e,i){return function(t,n,e,i,r,o){let s=n+e,a=!1;for(let l=0;l=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=qi(i.type)),s=wi(y);try{const a=Ra(!1),l=o();return Ra(a),function(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,M(),r,l),l}finally{wi(s)}}function th(t,n,e){const i=t+20,r=M(),o=Sr(r,i);return function(t,n){return t[1].data[n].pure}(r,i)?Ob(r,Vt(),n,o.transform,e,o):o.transform(e)}function nh(t){return n=>{setTimeout(t,void 0,n)}}const N=class extends se{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){var l,c,u;let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const d=n;r=null==(l=d.next)?void 0:l.bind(d),o=null==(c=d.error)?void 0:c.bind(d),s=null==(u=d.complete)?void 0:u.bind(d)}this.__isAsync&&(o=nh(o),r&&(r=nh(r)),s&&(s=nh(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof Ft&&n.add(a),a}};function GN(){return this._results[zr()]()}class ih{constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=zr(),i=ih.prototype;i[e]||(i[e]=GN)}get changes(){return this._changes||(this._changes=new N)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=_n(n);(this._changesDetected=!function(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=KN,t})();const zN=Le,WN=class extends zN{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n){const e=this._declarationTContainer.tViews,i=os(this._declarationLView,e,n,16,null,e.declTNode,null,null,null,null);i[17]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[19];return null!==o&&(i[19]=o.createEmbeddedView(e)),ss(e,i,n),new vs(i)}};function KN(){return dl(pt(),M())}function dl(t,n){return 4&t.type?new WN(n,t,oo(t,n)):null}let bn=(()=>{class t{}return t.__NG_ELEMENT_ID__=YN,t})();function YN(){return Hb(pt(),M())}const qN=bn,Vb=class extends qN{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return oo(this._hostTNode,this._hostLView)}get injector(){return new Ir(this._hostTNode,this._hostLView)}get parentInjector(){const n=Oa(this._hostTNode,this._hostLView);if(Pg(n)){const e=xr(n,this._hostLView),i=Er(n);return new Ir(e[1].data[i+8],e)}return new Ir(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=Bb(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-10}createEmbeddedView(n,e,i){const r=n.createEmbeddedView(e||{});return this.insert(r,i),r}createComponent(n,e,i,r,o){const s=n&&!("function"==typeof n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.ngModuleRef}const l=s?n:new Qd(It(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule&&c){const d=c.get(ui,null);d&&(o=d)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[1];if(xn(i[3])){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[3],h=new Vb(d,d[6],d[3]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function(t,n,e,i){const r=10+i,o=e.length;i>0&&(e[r-1][4]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=10;d{class t{constructor(e){this.appInits=e,this.resolve=fl,this.reject=fl,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{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(R(gl,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const Ts=new Q("AppId"),Ck={provide:Ts,useFactory:function(){return`${gh()}${gh()}${gh()}`},deps:[]};function gh(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const cy=new Q("Platform Initializer"),uo=new Q("Platform ID"),uy=new Q("appBootstrapListener");let dy=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const ki=new Q("LocaleId"),hy=new Q("DefaultCurrencyCode");class Dk{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let ml=(()=>{class t{compileModuleSync(e){return new Xd(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=zn(pn(e).declarations).reduce((s,a)=>{const l=It(a);return l&&s.push(new Qd(l)),s},[]);return new Dk(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const Tk=(()=>Promise.resolve(0))();function mh(t){"undefined"==typeof Zone?Tk.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class be{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new N(!1),this.onMicrotaskEmpty=new N(!1),this.onStable=new N(!1),this.onError=new N(!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)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function(){let t=Ee.requestAnimationFrame,n=Ee.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function(t){const n=()=>{!function(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Ee,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,vh(t),t.isCheckStableRunning=!0,_h(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),vh(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return py(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),fy(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return py(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),fy(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,vh(t),_h(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!be.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(be.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,xk,fl,fl);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const xk={};function _h(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function vh(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function py(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function fy(t){t._nesting--,_h(t)}class Nk{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new N,this.onMicrotaskEmpty=new N,this.onStable=new N,this.onError=new N}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}let bh=(()=>{class t{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,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:()=>{be.assertNotInAngularZone(),mh(()=>{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())mh(()=>{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 o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,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}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(R(be))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),gy=(()=>{class t{constructor(){this._applications=new Map,yh.addToWindow(this)}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){return yh.findTestabilityInTree(this,e,i)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();class kk{addToWindow(n){}findTestabilityInTree(n,e,i){return null}}let An,yh=new kk;const my=new Q("AllowMultipleToken");class _y{constructor(n,e){this.name=n,this.token=e}}function vy(t,n,e=[]){const i=`Platform: ${n}`,r=new Q(i);return(o=[])=>{let s=by();if(!s||s.injector.get(my,!1))if(t)t(e.concat(o).concat({provide:r,useValue:!0}));else{const a=e.concat(o).concat({provide:r,useValue:!0},{provide:Td,useValue:"platform"});!function(t){if(An&&!An.destroyed&&!An.injector.get(my,!1))throw new en("400","");An=t.get(yy);const n=t.get(cy,null);n&&n.forEach(e=>e())}(lt.create({providers:a,name:i}))}return function(t){const n=by();if(!n)throw new en("401","");return n}()}}function by(){return An&&!An.destroyed?An:null}let yy=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const a=function(t,n){let e;return e="noop"===t?new Nk:("zone.js"===t?void 0:t)||new be({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==n?void 0:n.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==n?void 0:n.ngZoneRunCoalescing)}),e}(i?i.ngZone:void 0,{ngZoneEventCoalescing:i&&i.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:i&&i.ngZoneRunCoalescing||!1}),l=[{provide:be,useValue:a}];return a.run(()=>{const c=lt.create({providers:l,parent:this.injector,name:e.moduleType.name}),u=e.create(c),d=u.injector.get(Lr,null);if(!d)throw new en("402","");return a.runOutsideAngular(()=>{const h=a.onError.subscribe({next:p=>{d.handleError(p)}});u.onDestroy(()=>{wh(this._modules,u),h.unsubscribe()})}),function(t,n,e){try{const i=e();return us(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(d,a,()=>{const h=u.injector.get(co);return h.runInitializers(),h.donePromise.then(()=>(function(t){nn(t,"Expected localeId to be defined"),"string"==typeof t&&(Qv=t.toLowerCase().replace(/_/g,"-"))}(u.injector.get(ki,ol)||ol),this._moduleDoBootstrap(u),u))})})}bootstrapModule(e,i=[]){const r=wy({},i);return function(t,n,e){const i=new Xd(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(ho);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new en("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 en("404","");this._modules.slice().forEach(e=>e.destroy()),this._destroyListeners.forEach(e=>e()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(R(lt))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function wy(t,n){return Array.isArray(n)?n.reduce(wy,t):V(V({},t),n)}let ho=(()=>{class t{constructor(e,i,r,o,s){this._zone=e,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=o,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new we(c=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{c.next(this._stable),c.complete()})}),l=new we(c=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{be.assertNotInAngularZone(),mh(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,c.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{be.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{c.next(!1)}))});return()=>{u.unsubscribe(),d.unsubscribe()}});this.isStable=function(...t){const n=Ao(t),e=function(t,n){return"number"==typeof qc(t)?t.pop():1/0}(t),i=t;return i.length?1===i.length?Dt(i[0]):Oo(e)(wt(i,n)):Tn}(a,l.pipe(ig()))}bootstrap(e,i){if(!this._initStatus.done)throw new en("405","");let r;r=e instanceof Db?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(r.componentType);const o=function(t){return t.isBoundToModule}(r)?void 0:this._injector.get(ui),a=r.create(lt.NULL,[],i||r.selector,o),l=a.location.nativeElement,c=a.injector.get(bh,null),u=c&&a.injector.get(gy);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),wh(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new en("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;wh(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(uy,[]).concat(this._bootstrapListeners).forEach(r=>r(e))}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(R(be),R(lt),R(Lr),R(nr),R(co))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function wh(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let Dy=!0,ct=(()=>{class t{}return t.__NG_ELEMENT_ID__=jk,t})();function jk(t){return function(t,n,e){if(ya(t)&&!e){const i=on(t.index,n);return new vs(i,i)}return 47&t.type?new vs(n[16],n):null}(pt(),M(),16==(16&t))}class Ny{constructor(){}supports(n){return ls(n)}create(n){return new qk(n)}}const Yk=(t,n)=>n;class qk{constructor(n){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=n||Yk}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new Zk(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=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(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new ky),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ky),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class Zk{constructor(n,e){this.item=n,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 Jk{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class ky{constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new Jk,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Ry(t,n,e){const i=t.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 o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),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(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Xk(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class Xk{constructor(n){this.key=n,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 Ay(){return new po([new Ny])}let po=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||Ay()),deps:[[t,new Ar,new $n]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(t){return t.name||typeof t}(e)}'`)}}return t.\u0275prov=L({token:t,providedIn:"root",factory:Ay}),t})();function Fy(){return new fo([new Oy])}let fo=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||Fy()),deps:[[t,new Ar,new $n]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Error(`Cannot find a differ supporting object '${e}'`)}}return t.\u0275prov=L({token:t,providedIn:"root",factory:Fy}),t})();const tR=[new Oy],iR=new po([new Ny]),rR=new fo(tR),oR=vy(null,"core",[{provide:uo,useValue:"unknown"},{provide:yy,deps:[lt]},{provide:gy,deps:[]},{provide:dy,deps:[]}]),uR=[{provide:ho,useClass:ho,deps:[be,lt,Lr,nr,co]},{provide:kN,deps:[be],useFactory:function(t){let n=[];return t.onStable.subscribe(()=>{for(;n.length;)n.pop()()}),function(e){n.push(e)}}},{provide:co,useClass:co,deps:[[new $n,gl]]},{provide:ml,useClass:ml,deps:[]},Ck,{provide:po,useFactory:function(){return iR},deps:[]},{provide:fo,useFactory:function(){return rR},deps:[]},{provide:ki,useFactory:function(t){return t||"undefined"!=typeof $localize&&$localize.locale||ol},deps:[[new Jo(ki),new $n,new Ar]]},{provide:hy,useValue:"USD"}];let hR=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(R(ho))},t.\u0275mod=Y({type:t}),t.\u0275inj=G({providers:uR}),t})(),vl=null;function Zn(){return vl}const et=new Q("DocumentToken");let or=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:function(){return R(Py)},providedIn:"platform"}),t})();const _R=new Q("Location Initialized");let Py=(()=>{class t extends or{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Zn().getBaseHref(this._doc)}onPopState(e){const i=Zn().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Zn().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){Ly()?this._history.pushState(e,i,r):this.location.hash=r}replaceState(e,i,r){Ly()?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 t.\u0275fac=function(e){return new(e||t)(R(et))},t.\u0275prov=L({token:t,factory:function(){return new Py(R(et))},providedIn:"platform"}),t})();function Ly(){return!!window.history.pushState}function Eh(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function Vy(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function di(t){return t&&"?"!==t[0]?"?"+t:t}let go=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:function(){return function(t){const n=R(et).location;return new By(R(or),n&&n.origin||"")}()},providedIn:"root"}),t})();const xh=new Q("appBaseHref");let By=(()=>{class t extends go{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 Eh(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+di(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+di(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+di(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var i,r;null==(r=(i=this._platformLocation).historyGo)||r.call(i,e)}}return t.\u0275fac=function(e){return new(e||t)(R(or),R(xh,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),yR=(()=>{class t extends go{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=Eh(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+di(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+di(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var i,r;null==(r=(i=this._platformLocation).historyGo)||r.call(i,e)}}return t.\u0275fac=function(e){return new(e||t)(R(or),R(xh,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Ih=(()=>{class t{constructor(e,i){this._subject=new N,this._urlChangeListeners=[],this._platformStrategy=e;const r=this._platformStrategy.getBaseHref();this._platformLocation=i,this._baseHref=Vy(Hy(r)),this._platformStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+di(i))}normalize(e){return t.stripTrailingSlash(function(t,n){return t&&n.startsWith(t)?n.substring(t.length):n}(this._baseHref,Hy(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._platformStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+di(i)),r)}replaceState(e,i="",r=null){this._platformStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+di(i)),r)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(e=0){var i,r;null==(r=(i=this._platformStrategy).historyGo)||r.call(i,e)}onUrlChange(e){this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}))}_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 t.normalizeQueryParams=di,t.joinWithSlash=Eh,t.stripTrailingSlash=Vy,t.\u0275fac=function(e){return new(e||t)(R(go),R(or))},t.\u0275prov=L({token:t,factory:function(){return new Ih(R(go),R(or))},providedIn:"root"}),t})();function Hy(t){return t.replace(/\/index.html$/,"")}var ut=(()=>((ut=ut||{})[ut.Zero=0]="Zero",ut[ut.One=1]="One",ut[ut.Two=2]="Two",ut[ut.Few=3]="Few",ut[ut.Many=4]="Many",ut[ut.Other=5]="Other",ut))();const MR=function(t){return function(t){const n=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=Jv(n);if(e)return e;const i=n.split("-")[0];if(e=Jv(i),e)return e;if("en"===i)return CM;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[P.PluralCase]};class Il{}let rO=(()=>{class t extends Il{constructor(e){super(),this.locale=e}getPluralCategory(e,i){switch(MR(i||this.locale)(e)){case ut.Zero:return"zero";case ut.One:return"one";case ut.Two:return"two";case ut.Few:return"few";case ut.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(R(ki))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function qy(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}let dn=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,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&&(ls(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 ${Ce(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 t.\u0275fac=function(e){return new(e||t)(y(po),y(fo),y(ge),y(un))},t.\u0275dir=O({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class sO{constructor(n,e,i,r){this.$implicit=n,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 Cn=(()=>{class t{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;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(i){throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(t){return t.name||typeof t}(e)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=[];e.forEachOperation((r,o,s)=>{if(null==r.previousIndex){const a=this._viewContainer.createEmbeddedView(this._template,new sO(null,this._ngForOf,-1,-1),null===s?void 0:s),l=new Zy(r,a);i.push(l)}else if(null==s)this._viewContainer.remove(null===o?void 0:o);else if(null!==o){const a=this._viewContainer.get(o);this._viewContainer.move(a,s);const l=new Zy(r,a);i.push(l)}});for(let r=0;r{this._viewContainer.get(r.currentIndex).context.$implicit=r.item})}_perViewChange(e,i){e.context.$implicit=i.item}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(y(bn),y(Le),y(po))},t.\u0275dir=O({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class Zy{constructor(n,e){this.record=n,this.view=e}}let nt=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new lO,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){Jy("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){Jy("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 t.\u0275fac=function(e){return new(e||t)(y(bn),y(Le))},t.\u0275dir=O({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class lO{constructor(){this.$implicit=null,this.ngIf=null}}function Jy(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Ce(n)}'.`)}let pi=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split(".");null!=(i=null!=i&&o?`${i}${o}`:i)?this._renderer.setStyle(this._ngEl.nativeElement,r,i):this._renderer.removeStyle(this._ngEl.nativeElement,r)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(fo),y(un))},t.\u0275dir=O({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),$t=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(e){if(e.ngTemplateOutlet){const i=this._viewContainerRef;this._viewRef&&i.remove(i.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?i.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(y(bn))},t.\u0275dir=O({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[Qe]}),t})();class hO{createSubscription(n,e){return n.subscribe({next:e,error:i=>{throw i}})}dispose(n){n.unsubscribe()}onDestroy(n){n.unsubscribe()}}class pO{createSubscription(n,e){return n.then(e,i=>{throw i})}dispose(n){}onDestroy(n){}}const fO=new pO,gO=new hO;let Bh=(()=>{class t{constructor(e){this._ref=e,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(us(e))return fO;if(lv(e))return gO;throw function(t,n){return Error(`InvalidPipeArgument: '${n}' for pipe '${Ce(t)}'`)}(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(y(ct,16))},t.\u0275pipe=Zt({name:"async",type:t,pure:!1}),t})(),Re=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({providers:[{provide:Il,useClass:rO}]}),t})();const e0="browser";let FO=(()=>{class t{}return t.\u0275prov=L({token:t,providedIn:"root",factory:()=>new PO(R(et),window)}),t})();class PO{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),this.attemptFocus(e))}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}attemptFocus(n){return n.focus(),this.document.activeElement===n}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=n0(this.window.history)||n0(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch(n){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(n){return!1}}}function n0(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class r0{}class jh extends class extends class{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){var t;t=new jh,vl||(vl=t)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=(Is=Is||document.querySelector("base"),Is?Is.getAttribute("href"):null);return null==e?null:function(t){Ml=Ml||document.createElement("a"),Ml.setAttribute("href",t);const n=Ml.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){Is=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return qy(document.cookie,n)}}let Ml,Is=null;const o0=new Q("TRANSITION_ID"),jO=[{provide:gl,useFactory:function(t,n,e){return()=>{e.get(co).donePromise.then(()=>{const i=Zn(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},Ee.getAllAngularTestabilities=()=>n.getAllTestabilities(),Ee.getAllAngularRootElements=()=>n.getAllRootElements(),Ee.frameworkStabilizers||(Ee.frameworkStabilizers=[]),Ee.frameworkStabilizers.push(i=>{const r=Ee.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){if(null==e)return null;const r=n.getTestability(e);return null!=r?r:i?Zn().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null}}let $O=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const Nl=new Q("EventManagerPlugins");let kl=(()=>{class t{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 o=0;o{class t{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 t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Ms=(()=>{class t extends a0{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}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(l0),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(l0))}}return t.\u0275fac=function(e){return new(e||t)(R(et))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function l0(t){Zn().remove(t)}const Gh={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/"},zh=/%COMP%/g;function Rl(t,n,e){for(let i=0;i{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let Wh=(()=>{class t{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new Kh(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case Bn.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new qO(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case 1:case Bn.ShadowDom:return new ZO(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=Rl(i.id,i.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(R(kl),R(Ms),R(Ts))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();class Kh{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(Gh[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){n.appendChild(e)}insertBefore(n,e,i){n&&n.insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=Gh[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=Gh[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(ln.DashCase|ln.Important)?n.style.setProperty(e,i,r&ln.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&ln.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,d0(i)):this.eventManager.addEventListener(n,e,d0(i))}}class qO extends Kh{constructor(n,e,i,r){super(n),this.component=i;const o=Rl(r+"-"+i.id,i.styles,[]);e.addStyles(o),this.contentAttr="_ngcontent-%COMP%".replace(zh,r+"-"+i.id),this.hostAttr="_nghost-%COMP%".replace(zh,r+"-"+i.id)}applyToHost(n){super.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}class ZO extends Kh{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=Rl(r.id,r.styles,[]);for(let s=0;s{class t extends s0{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 t.\u0275fac=function(e){return new(e||t)(R(et))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const p0=["alt","control","meta","shift"],XO={"\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"},f0={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"},eA={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let tA=(()=>{class t extends s0{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Zn().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="";if(p0.forEach(l=>{const c=i.indexOf(l);c>-1&&(i.splice(c,1),s+=l+".")}),s+=o,0!=i.length||0===o.length)return null;const a={};return a.domEventName=r,a.fullKey=s,a}static getEventFullKey(e){let i="",r=function(t){let n=t.key;if(null==n){if(n=t.keyIdentifier,null==n)return"Unidentified";n.startsWith("U+")&&(n=String.fromCharCode(parseInt(n.substring(2),16)),3===t.location&&f0.hasOwnProperty(n)&&(n=f0[n]))}return XO[n]||n}(e);return r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),p0.forEach(o=>{o!=r&&eA[o](e)&&(i+=o+".")}),i+=r,i}static eventCallback(e,i,r){return o=>{t.getEventFullKey(o)===e&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(R(et))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const sA=vy(oR,"browser",[{provide:uo,useValue:e0},{provide:cy,useValue:function(){jh.makeCurrent(),$h.init()},multi:!0},{provide:et,useFactory:function(){return t=document,uu=t,document;var t},deps:[]}]),aA=[{provide:Td,useValue:"root"},{provide:Lr,useFactory:function(){return new Lr},deps:[]},{provide:Nl,useClass:JO,multi:!0,deps:[et,be,uo]},{provide:Nl,useClass:tA,multi:!0,deps:[et]},{provide:Wh,useClass:Wh,deps:[kl,Ms,Ts]},{provide:Zd,useExisting:Wh},{provide:a0,useExisting:Ms},{provide:Ms,useClass:Ms,deps:[et]},{provide:bh,useClass:bh,deps:[be]},{provide:kl,useClass:kl,deps:[Nl,be]},{provide:r0,useClass:$O,deps:[]}];let lA=(()=>{class t{constructor(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:Ts,useValue:e.appId},{provide:o0,useExisting:Ts},jO]}}}return t.\u0275fac=function(e){return new(e||t)(R(t,12))},t.\u0275mod=Y({type:t}),t.\u0275inj=G({providers:aA,imports:[Re,hR]}),t})();"undefined"!=typeof window&&window;const{isArray:bA}=Array,{getPrototypeOf:yA,prototype:wA,keys:CA}=Object;function _0(t){if(1===t.length){const n=t[0];if(bA(n))return{args:n,keys:null};if(function(t){return t&&"object"==typeof t&&yA(t)===wA}(n)){const e=CA(n);return{args:e.map(i=>n[i]),keys:e}}}return{args:t,keys:null}}const{isArray:SA}=Array;function qh(t){return ie(n=>function(t,n){return SA(n)?t(...n):t(n)}(t,n))}function v0(t,n){return t.reduce((e,i,r)=>(e[i]=n[r],e),{})}let b0=(()=>{class t{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 t.\u0275fac=function(e){return new(e||t)(y(un),y(ge))},t.\u0275dir=O({type:t}),t})(),sr=(()=>{class t extends b0{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=sn(t)))(i||t)}}(),t.\u0275dir=O({type:t,features:[Ie]}),t})();const St=new Q("NgValueAccessor"),IA={provide:St,useExisting:pe(()=>mo),multi:!0},NA=new Q("CompositionEventMode");let mo=(()=>{class t extends b0{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Zn()?Zn().getUserAgent():"";return/android (\d+)/.test(t.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 t.\u0275fac=function(e){return new(e||t)(y(un),y(ge),y(NA,8))},t.\u0275dir=O({type:t,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&&k("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[_e([IA]),Ie]}),t})();function Oi(t){return null==t||0===t.length}function w0(t){return null!=t&&"number"==typeof t.length}const Ot=new Q("NgValidators"),Ai=new Q("NgAsyncValidators"),kA=/^(?=.{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 Xt{static min(n){return t=n,n=>{if(Oi(n.value)||Oi(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{if(Oi(n.value)||Oi(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null};var t}static required(n){return Oi(n.value)?{required:!0}:null}static requiredTrue(n){return!0===n.value?null:{required:!0}}static email(n){return Oi((t=n).value)||kA.test(t.value)?null:{email:!0};var t}static minLength(n){return t=n,n=>Oi(n.value)||!w0(n.value)?null:n.value.lengthw0(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null;var t}static pattern(n){return function(t){if(!t)return Ns;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if(Oi(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return F0(n)}static composeAsync(n){return P0(n)}}function Ns(t){return null}function N0(t){return null!=t}function k0(t){const n=us(t)?wt(t):t;return Vd(n),n}function R0(t){let n={};return t.forEach(e=>{n=null!=e?V(V({},n),e):n}),0===Object.keys(n).length?null:n}function O0(t,n){return n.map(e=>e(t))}function A0(t){return t.map(n=>function(t){return!t.validate}(n)?n:e=>n.validate(e))}function F0(t){if(!t)return null;const n=t.filter(N0);return 0==n.length?null:function(e){return R0(O0(e,n))}}function Zh(t){return null!=t?F0(A0(t)):null}function P0(t){if(!t)return null;const n=t.filter(N0);return 0==n.length?null:function(e){return function(...t){const n=pa(t),{args:e,keys:i}=_0(t),r=new we(o=>{const{length:s}=e;if(!s)return void o.complete();const a=new Array(s);let l=s,c=s;for(let u=0;u{d||(d=!0,c--),a[u]=h},()=>l--,void 0,()=>{(!l||!d)&&(c||o.next(i?v0(i,a):a),o.complete())}))}});return n?r.pipe(qh(n)):r}(O0(e,n).map(k0)).pipe(ie(R0))}}function Jh(t){return null!=t?P0(A0(t)):null}function L0(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function V0(t){return t._rawValidators}function B0(t){return t._rawAsyncValidators}function Qh(t){return t?Array.isArray(t)?t:[t]:[]}function Ol(t,n){return Array.isArray(t)?t.includes(n):t===n}function H0(t,n){const e=Qh(n);return Qh(t).forEach(r=>{Ol(e,r)||e.push(r)}),e}function U0(t,n){return Qh(n).filter(e=>!Ol(t,e))}class j0{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(n){this._rawValidators=n||[],this._composedValidatorFn=Zh(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=Jh(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class Gt extends j0{get formDirective(){return null}get path(){return null}}class Fi extends j0{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class $0{constructor(n){this._cd=n}is(n){var e,i,r;return"submitted"===n?!!(null==(e=this._cd)?void 0:e.submitted):!!(null==(r=null==(i=this._cd)?void 0:i.control)?void 0:r[n])}}let ks=(()=>{class t extends $0{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(y(Fi,2))},t.\u0275dir=O({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Me("ng-untouched",i.is("untouched"))("ng-touched",i.is("touched"))("ng-pristine",i.is("pristine"))("ng-dirty",i.is("dirty"))("ng-valid",i.is("valid"))("ng-invalid",i.is("invalid"))("ng-pending",i.is("pending"))},features:[Ie]}),t})(),Al=(()=>{class t extends $0{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(y(Gt,10))},t.\u0275dir=O({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Me("ng-untouched",i.is("untouched"))("ng-touched",i.is("touched"))("ng-pristine",i.is("pristine"))("ng-dirty",i.is("dirty"))("ng-valid",i.is("valid"))("ng-invalid",i.is("invalid"))("ng-pending",i.is("pending"))("ng-submitted",i.is("submitted"))},features:[Ie]}),t})();function Pl(t,n){return[...n.path,t]}function Rs(t,n){tp(t,n),n.valueAccessor.writeValue(t.value),function(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&G0(t,n)})}(t,n),function(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&G0(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function Ll(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),Bl(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Vl(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function tp(t,n){const e=V0(t);null!==n.validator?t.setValidators(L0(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=B0(t);null!==n.asyncValidator?t.setAsyncValidators(L0(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();Vl(n._rawValidators,r),Vl(n._rawAsyncValidators,r)}function Bl(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=V0(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=B0(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return Vl(n._rawValidators,i),Vl(n._rawAsyncValidators,i),e}function G0(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function np(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}function ip(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===mo?e=o:function(t){return Object.getPrototypeOf(t.constructor)===sr}(o)?i=o:r=o}),r||i||e||null}function Hl(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}const Os="VALID",Ul="INVALID",_o="PENDING",As="DISABLED";function rp(t){return(sp(t)?t.validators:t)||null}function K0(t){return Array.isArray(t)?Zh(t):t||null}function op(t,n){return(sp(n)?n.asyncValidators:t)||null}function Y0(t){return Array.isArray(t)?Jh(t):t||null}function sp(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class ap{constructor(n,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=n,this._rawAsyncValidators=e,this._composedValidatorFn=K0(this._rawValidators),this._composedAsyncValidatorFn=Y0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===Os}get invalid(){return this.status===Ul}get pending(){return this.status==_o}get disabled(){return this.status===As}get enabled(){return this.status!==As}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._rawValidators=n,this._composedValidatorFn=K0(n)}setAsyncValidators(n){this._rawAsyncValidators=n,this._composedAsyncValidatorFn=Y0(n)}addValidators(n){this.setValidators(H0(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(H0(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(U0(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(U0(n,this._rawAsyncValidators))}hasValidator(n){return Ol(this._rawValidators,n)}hasAsyncValidator(n){return Ol(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=_o,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=As,this.errors=null,this._forEachChild(i=>{i.disable(rt(V({},n),{onlySelf:!0}))}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(rt(V({},n),{skipPristineCheck:e})),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=Os,this._forEachChild(i=>{i.enable(rt(V({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(rt(V({},n),{skipPristineCheck:e})),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Os||this.status===_o)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?As:Os}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=_o,this._hasOwnPendingAsyncValidator=!0;const e=k0(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){return function(t,n,e){if(null==n||(Array.isArray(n)||(n=n.split(".")),Array.isArray(n)&&0===n.length))return null;let i=t;return n.forEach(r=>{i=i instanceof Fs?i.controls.hasOwnProperty(r)?i.controls[r]:null:i instanceof lp&&i.at(r)||null}),i}(this,n)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new N,this.statusChanges=new N}_calculateStatus(){return this._allControlsDisabled()?As:this.errors?Ul:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(_o)?_o:this._anyControlsHaveStatus(Ul)?Ul:Os}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_isBoxedValue(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){sp(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class vo extends ap{constructor(n=null,e,i){super(rp(e),op(i,e)),this._onChange=[],this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=null,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){Hl(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){Hl(this._onDisabledChange,n)}_forEachChild(n){}_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(n){this._isBoxedValue(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}}class Fs extends ap{constructor(n,e,i){super(rp(e),op(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){this._checkAllValuesPresent(n),Object.keys(n).forEach(i=>{this._throwIfControlMissing(i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e instanceof vo?e.value:e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_throwIfControlMissing(n){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[n])throw new Error(`Cannot find form control with name: ${n}.`)}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const e of Object.keys(this.controls)){const i=this.controls[e];if(this.contains(e)&&n(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(n,e,i)=>((e.enabled||this.disabled)&&(n[i]=e.value),n))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(n){this._forEachChild((e,i)=>{if(void 0===n[i])throw new Error(`Must supply a value for form control with name: '${i}'.`)})}}class lp extends ap{constructor(n,e,i){super(rp(e),op(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[n]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){this._checkAllValuesPresent(n),n.forEach((i,r)=>{this._throwIfControlMissing(r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n instanceof vo?n.value:n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_throwIfControlMissing(n){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(n))throw new Error(`Cannot find form control at index ${n}`)}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_checkAllValuesPresent(n){this._forEachChild((e,i)=>{if(void 0===n[i])throw new Error(`Must supply a value for form control at index: ${i}.`)})}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}}const WA={provide:Fi,useExisting:pe(()=>jl)},J0=(()=>Promise.resolve(null))();let jl=(()=>{class t extends Fi{constructor(e,i,r,o){super(),this.control=new vo,this._registered=!1,this.update=new N,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ip(0,o)}ngOnChanges(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),np(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?Pl(this.name,this._parent):[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(){Rs(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){J0.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1})})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=""===i||i&&"false"!==i;J0.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(y(Gt,9),y(Ot,10),y(Ai,10),y(St,10))},t.\u0275dir=O({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[_e([WA]),Ie,Qe]}),t})(),$l=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=O({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})(),X0=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})();const up=new Q("NgModelWithFormControlWarning"),QA={provide:Gt,useExisting:pe(()=>bo)};let bo=(()=>{class t extends Gt{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 N,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&&(Bl(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 Rs(i,e),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Ll(e.control||null,e,!1),Hl(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,function(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(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&&(Ll(i||null,e),r instanceof vo&&(Rs(r,e),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function(t,n){tp(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function(t,n){return Bl(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){tp(this.form,this),this._oldForm&&Bl(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(y(Ot,10),y(Ai,10))},t.\u0275dir=O({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&k("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[_e([QA]),Ie,Qe]}),t})();const tF={provide:Fi,useExisting:pe(()=>Ls)};let Ls=(()=>{class t extends Fi{constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new N,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ip(0,o)}set isDisabled(e){}ngOnChanges(e){this._added||this._setUpControl(),np(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Pl(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(y(Gt,13),y(Ot,10),y(Ai,10),y(St,10),y(up,8))},t.\u0275dir=O({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[_e([tF]),Ie,Qe]}),t})();const nF={provide:St,useExisting:pe(()=>Gl),multi:!0};function o1(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let Gl=(()=>{class t extends sr{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const i=this._getOptionId(e);null==i&&this.setProperty("selectedIndex",-1);const r=o1(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=sn(t)))(i||t)}}(),t.\u0275dir=O({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&k("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[_e([nF]),Ie]}),t})(),pp=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(o1(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(un),y(Gl,9))},t.\u0275dir=O({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const rF={provide:St,useExisting:pe(()=>Vs),multi:!0};function s1(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let Vs=(()=>{class t extends sr{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(s1(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(s1(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(un),y(Vs,9))},t.\u0275dir=O({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})(),m1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[X0]]}),t})(),Wl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[m1]}),t})(),_1=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:up,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[m1]}),t})(),mp=(()=>{class t{group(e,i=null){const r=this._reduceControls(e);let a,o=null,s=null;return null!=i&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(i)?(o=null!=i.validators?i.validators:null,s=null!=i.asyncValidators?i.asyncValidators:null,a=null!=i.updateOn?i.updateOn:void 0):(o=null!=i.validator?i.validator:null,s=null!=i.asyncValidator?i.asyncValidator:null)),new Fs(r,{asyncValidators:s,updateOn:a,validators:o})}control(e,i,r){return new vo(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new lp(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof vo||e instanceof Fs||e instanceof lp?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:_1}),t})();function K(...t){return wt(t,Ao(t))}function yo(t,n){return J(n)?ot(t,n,1):ot(t,1)}function zt(t,n){return je((e,i)=>{let r=0;e.subscribe(new Te(i,o=>t.call(n,o,r++)&&i.next(o)))})}class v1{}class b1{}class fi{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(n).forEach(e=>{let i=n[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(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof fi?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new fi;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof fi?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class gF{encodeKey(n){return y1(n)}encodeValue(n){return y1(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const _F=/%(\d[a-f0-9])/gi,vF={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function y1(t){return encodeURIComponent(t).replace(_F,(n,e)=>{var i;return null!=(i=vF[e])?i:n})}function w1(t){return`${t}`}class Pi{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new gF,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e];this.map.set(e,Array.isArray(i)?i:[i])})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new Pi({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(w1(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(w1(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class bF{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}keys(){return this.map.keys()}}function C1(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function D1(t){return"undefined"!=typeof Blob&&t instanceof Blob}function S1(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Bs{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function(t){switch(t){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,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new fi),this.context||(this.context=new bF),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ah.set(p,n.setHeaders[p]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((h,p)=>h.set(p,n.setParams[p]),c)),new Bs(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var ht=(()=>((ht=ht||{})[ht.Sent=0]="Sent",ht[ht.UploadProgress=1]="UploadProgress",ht[ht.ResponseHeader=2]="ResponseHeader",ht[ht.DownloadProgress=3]="DownloadProgress",ht[ht.Response=4]="Response",ht[ht.User=5]="User",ht))();class _p{constructor(n,e=200,i="OK"){this.headers=n.headers||new fi,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class vp extends _p{constructor(n={}){super(n),this.type=ht.ResponseHeader}clone(n={}){return new vp({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class Kl extends _p{constructor(n={}){super(n),this.type=ht.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new Kl({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class T1 extends _p{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function bp(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Yl=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Bs)o=e;else{let l,c;l=r.headers instanceof fi?r.headers:new fi(r.headers),r.params&&(c=r.params instanceof Pi?r.params:new Pi({fromObject:r.params})),o=new Bs(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 s=K(o).pipe(yo(l=>this.handler.handle(l)));if(e instanceof Bs||"events"===r.observe)return s;const a=s.pipe(zt(l=>l instanceof Kl));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(ie(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(ie(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(ie(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(ie(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 Pi).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,bp(r,i))}post(e,i,r={}){return this.request("POST",e,bp(r,i))}put(e,i,r={}){return this.request("PUT",e,bp(r,i))}}return t.\u0275fac=function(e){return new(e||t)(R(v1))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();class E1{constructor(n,e){this.next=n,this.interceptor=e}handle(n){return this.interceptor.intercept(n,this.next)}}const ql=new Q("HTTP_INTERCEPTORS");let CF=(()=>{class t{intercept(e,i){return i.handle(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const DF=/^\)\]\}',?\n/;let x1=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new we(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((p,b)=>r.setRequestHeader(p,b.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const p=e.detectContentTypeHeader();null!==p&&r.setRequestHeader("Content-Type",p)}if(e.responseType){const p=e.responseType.toLowerCase();r.responseType="json"!==p?p:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const p=1223===r.status?204:r.status,b=r.statusText||"OK",C=new fi(r.getAllResponseHeaders()),S=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new vp({headers:C,status:p,statusText:b,url:S}),s},l=()=>{let{headers:p,status:b,statusText:C,url:S}=a(),x=null;204!==b&&(x=void 0===r.response?r.responseText:r.response),0===b&&(b=x?200:0);let D=b>=200&&b<300;if("json"===e.responseType&&"string"==typeof x){const A=x;x=x.replace(DF,"");try{x=""!==x?JSON.parse(x):null}catch(H){x=A,D&&(D=!1,x={error:H,text:x})}}D?(i.next(new Kl({body:x,headers:p,status:b,statusText:C,url:S||void 0})),i.complete()):i.error(new T1({error:x,headers:p,status:b,statusText:C,url:S||void 0}))},c=p=>{const{url:b}=a(),C=new T1({error:p,status:r.status||0,statusText:r.statusText||"Unknown Error",url:b||void 0});i.error(C)};let u=!1;const d=p=>{u||(i.next(a()),u=!0);let b={type:ht.DownloadProgress,loaded:p.loaded};p.lengthComputable&&(b.total=p.total),"text"===e.responseType&&!!r.responseText&&(b.partialText=r.responseText),i.next(b)},h=p=>{let b={type:ht.UploadProgress,loaded:p.loaded};p.lengthComputable&&(b.total=p.total),i.next(b)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:ht.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(R(r0))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const yp=new Q("XSRF_COOKIE_NAME"),wp=new Q("XSRF_HEADER_NAME");class I1{}let TF=(()=>{class t{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=qy(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(R(et),R(uo),R(yp))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Cp=(()=>{class t{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 o=this.tokenService.getToken();return null!==o&&!e.headers.has(this.headerName)&&(e=e.clone({headers:e.headers.set(this.headerName,o)})),i.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(R(I1),R(wp))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),EF=(()=>{class t{constructor(e,i){this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=this.injector.get(ql,[]);this.chain=i.reduceRight((r,o)=>new E1(r,o),this.backend)}return this.chain.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(R(b1),R(lt))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),xF=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Cp,useClass:CF}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:yp,useValue:e.cookieName}:[],e.headerName?{provide:wp,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({providers:[Cp,{provide:ql,useExisting:Cp,multi:!0},{provide:I1,useClass:TF},{provide:yp,useValue:"XSRF-TOKEN"},{provide:wp,useValue:"X-XSRF-TOKEN"}]}),t})(),IF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({providers:[Yl,{provide:v1,useClass:EF},x1,{provide:b1,useExisting:x1}],imports:[[xF.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();class vt extends se{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return!e.closed&&n.next(this._value),e}getValue(){const{hasError:n,thrownError:e,_value:i}=this;if(n)throw e;return this._throwIfClosed(),i}next(n){super.next(this._value=n)}}function M1(t,n,e){t?ii(e,t,n):n()}const Zl=yt(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Hs(...t){return Oo(1)(wt(t,Ao(t)))}function N1(t){return new we(n=>{Dt(t()).subscribe(n)})}function k1(){return je((t,n)=>{let e=null;t._refCount++;const i=new Te(n,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount)return void(e=null);const r=t._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),n.unsubscribe()});t.subscribe(i),i.closed||(e=t.connect())})}class kF extends we{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Hf(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:n}=this;this._subject=this._connection=null,null==n||n.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new Ft;const e=this.getSubject();n.add(this.source.subscribe(new Te(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),n.closed&&(this._connection=null,n=Ft.EMPTY)}return n}refCount(){return k1()(this)}}function Jn(t,n){return je((e,i)=>{let r=null,o=0,s=!1;const a=()=>s&&!r&&i.complete();e.subscribe(new Te(i,l=>{null==r||r.unsubscribe();let c=0;const u=o++;Dt(t(l,u)).subscribe(r=new Te(i,d=>i.next(n?n(l,d,u,c++):d),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function wo(...t){const n=Ao(t);return je((e,i)=>{(n?Hs(t,e,n):Hs(t,e)).subscribe(i)})}function RF(t,n,e,i,r){return(o,s)=>{let a=e,l=n,c=0;o.subscribe(new Te(s,u=>{const d=c++;l=a?t(l,u,d):(a=!0,u),i&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}function R1(t,n){return je(RF(t,n,arguments.length>=2,!0))}function Ln(t){return je((n,e)=>{let o,i=null,r=!1;i=n.subscribe(new Te(e,void 0,void 0,s=>{o=Dt(t(s,Ln(t)(n))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function Sp(t){return t<=0?()=>Tn:je((n,e)=>{let i=[];n.subscribe(new Te(e,r=>{i.push(r),t{for(const r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function O1(t=OF){return je((n,e)=>{let i=!1;n.subscribe(new Te(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(t())))})}function OF(){return new Zl}function A1(t){return je((n,e)=>{let i=!1;n.subscribe(new Te(e,r=>{i=!0,e.next(r)},()=>{i||e.next(t),e.complete()}))})}function gi(t,n){const e=arguments.length>=2;return i=>i.pipe(t?zt((r,o)=>t(r,o,i)):ni,Pt(1),e?A1(n):O1(()=>new Zl))}function Wt(t,n,e){const i=J(t)||n||e?{next:t,error:n,complete:e}:t;return i?je((r,o)=>{var s;null===(s=i.subscribe)||void 0===s||s.call(i);let a=!0;r.subscribe(new Te(o,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),o.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),o.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)}))}):ni}class mi{constructor(n,e){this.id=n,this.url=e}}class Jl extends mi{constructor(n,e,i="imperative",r=null){super(n,e),this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Us extends mi{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class F1 extends mi{constructor(n,e,i){super(n,e),this.reason=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class PF extends mi{constructor(n,e,i){super(n,e),this.error=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class LF extends mi{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class VF extends mi{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class BF extends mi{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class HF extends mi{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class UF extends mi{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class P1{constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class L1{constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class jF{constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $F{constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class GF{constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class zF{constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class V1{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const me="primary";class WF{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Co(t){return new WF(t)}const B1="ngNavigationCancelingError";function Tp(t){const n=Error("NavigationCancelingError: "+t);return n[B1]=!0,n}function YF(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function U1(t){return Array.prototype.concat.apply([],t)}function j1(t){return t.length>0?t[t.length-1]:null}function Tt(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Xn(t){return Vd(t)?t:us(t)?wt(Promise.resolve(t)):K(t)}const JF={exact:function z1(t,n,e){if(!lr(t.segments,n.segments)||!Ql(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!z1(t.children[i],n.children[i],e))return!1;return!0},subset:W1},$1={exact:function(t,n){return Qn(t,n)},subset:function(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>H1(t[e],n[e]))},ignored:()=>!0};function G1(t,n,e){return JF[e.paths](t.root,n.root,e.matrixParams)&&$1[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function W1(t,n,e){return K1(t,n,n.segments,e)}function K1(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!lr(r,e)||n.hasChildren()||!Ql(r,e,i))}if(t.segments.length===e.length){if(!lr(t.segments,e)||!Ql(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!W1(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(lr(t.segments,r)&&Ql(t.segments,r,i)&&t.children[me])&&K1(t.children[me],n,o,i)}}function Ql(t,n,e){return n.every((i,r)=>$1[e](t[r].parameters,i.parameters))}class ar{constructor(n,e,i){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Co(this.queryParams)),this._queryParamMap}toString(){return nP.serialize(this)}}class ye{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Tt(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Xl(this)}}class js{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Co(this.parameters)),this._parameterMap}toString(){return Q1(this)}}function lr(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}class Y1{}class q1{parse(n){const e=new dP(n);return new ar(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${$s(n.root,!0)}`,i=function(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${ec(e)}=${ec(r)}`).join("&"):`${ec(e)}=${ec(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams);var t;return`${e}${i}${"string"==typeof n.fragment?`#${t=n.fragment,encodeURI(t)}`:""}`}}const nP=new q1;function Xl(t){return t.segments.map(n=>Q1(n)).join("/")}function $s(t,n){if(!t.hasChildren())return Xl(t);if(n){const e=t.children[me]?$s(t.children[me],!1):"",i=[];return Tt(t.children,(r,o)=>{o!==me&&i.push(`${o}:${$s(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function(t,n){let e=[];return Tt(t.children,(i,r)=>{r===me&&(e=e.concat(n(i,r)))}),Tt(t.children,(i,r)=>{r!==me&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===me?[$s(t.children[me],!1)]:[`${r}:${$s(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[me]?`${Xl(t)}/${e[0]}`:`${Xl(t)}/(${e.join("//")})`}}function Z1(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ec(t){return Z1(t).replace(/%3B/gi,";")}function Ep(t){return Z1(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function tc(t){return decodeURIComponent(t)}function J1(t){return tc(t.replace(/\+/g,"%20"))}function Q1(t){return`${Ep(t.path)}${function(t){return Object.keys(t).map(n=>`;${Ep(n)}=${Ep(t[n])}`).join("")}(t.parameters)}`}const sP=/^[^\/()?;=#]+/;function nc(t){const n=t.match(sP);return n?n[0]:""}const aP=/^[^=?&#]+/,cP=/^[^&#]+/;class dP{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new ye([],{}):new ye([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[me]=new ye(n,e)),i}parseSegment(){const n=nc(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(n),new js(tc(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=nc(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=nc(this.remaining);r&&(i=r,this.capture(i))}n[tc(e)]=tc(i)}parseQueryParam(n){const e=function(t){const n=t.match(aP);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function(t){const n=t.match(cP);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=J1(e),o=J1(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=nc(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let o;i.indexOf(":")>-1?(o=i.substr(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=me);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[me]:new ye([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new Error(`Expected "${n}".`)}}class X1{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=xp(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=xp(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=Ip(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return Ip(n,this._root).map(e=>e.value)}}function xp(t,n){if(t===n.value)return n;for(const e of n.children){const i=xp(t,e);if(i)return i}return null}function Ip(t,n){if(t===n.value)return[n];for(const e of n.children){const i=Ip(t,e);if(i.length)return i.unshift(n),i}return[]}class _i{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Do(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class ew extends X1{constructor(n,e){super(n),this.snapshot=e,Mp(this,n)}toString(){return this.snapshot.toString()}}function tw(t,n){const e=function(t,n){const s=new ic([],{},{},"",{},me,n,null,t.root,-1,{});return new iw("",new _i(s,[]))}(t,n),i=new vt([new js("",{})]),r=new vt({}),o=new vt({}),s=new vt({}),a=new vt(""),l=new cr(i,r,s,a,o,me,n,e.root);return l.snapshot=e.root,new ew(new _i(l,[]),e)}class cr{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,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(ie(n=>Co(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(ie(n=>Co(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function nw(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function(t){return t.reduce((n,e)=>({params:V(V({},n.params),e.params),data:V(V({},n.data),e.data),resolve:V(V({},n.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(e.slice(i))}class ic{constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}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=Co(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Co(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class iw extends X1{constructor(n,e){super(e),this.url=n,Mp(this,e)}toString(){return rw(this._root)}}function Mp(t,n){n.value._routerState=t,n.children.forEach(e=>Mp(t,e))}function rw(t){const n=t.children.length>0?` { ${t.children.map(rw).join(", ")} } `:"";return`${t.value}${n}`}function Np(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,Qn(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),Qn(n.params,e.params)||t.params.next(e.params),function(t,n){if(t.length!==n.length)return!1;for(let e=0;eQn(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||kp(t.parent,n.parent))}function Gs(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return Gs(t,i,r);return Gs(t,i)})}(t,n,e);return new _i(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Gs(t,a)),s}}const i=function(t){return new cr(new vt(t.url),new vt(t.params),new vt(t.queryParams),new vt(t.fragment),new vt(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>Gs(t,o));return new _i(i,r)}}function rc(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function zs(t){return"object"==typeof t&&null!=t&&t.outlets}function Rp(t,n,e,i,r){let o={};return i&&Tt(i,(s,a)=>{o[a]=Array.isArray(s)?s.map(l=>`${l}`):`${s}`}),new ar(e.root===t?n:ow(e.root,t,n),o,r)}function ow(t,n,e){const i={};return Tt(t.children,(r,o)=>{i[o]=r===n?e:ow(r,n,e)}),new ye(t.segments,i)}class sw{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&rc(i[0]))throw new Error("Root segment cannot have matrix parameters");const r=i.find(zs);if(r&&r!==j1(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Op{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function aw(t,n,e){if(t||(t=new ye([],{})),0===t.segments.length&&t.hasChildren())return oc(t,n,e);const i=function(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(zs(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!cw(l,c,s))return o;i+=2}else{if(!cw(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=aw(t.children[s],n,o))}),Tt(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new ye(t.segments,r)}}function Ap(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=Ap(new ye([],{}),0,e))}),n}function lw(t){const n={};return Tt(t,(e,i)=>n[i]=`${e}`),n}function cw(t,n,e){return t==e.path&&Qn(n,e.parameters)}class TP{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),Np(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Do(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Tt(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Do(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Do(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Do(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new zF(o.value.snapshot))}),n.children.length&&this.forwardEvent(new $F(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(Np(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Np(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=function(t){for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(r.snapshot),l=a?a.module.componentFactoryResolver:null;s.attachRef=null,s.route=r,s.resolver=l,s.outlet&&s.outlet.activateWith(r,l),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class Fp{constructor(n,e){this.routes=n,this.module=e}}function Li(t){return"function"==typeof t}function ur(t){return t instanceof ar}const Ws=Symbol("INITIAL_VALUE");function Ks(){return Jn(t=>function(...t){const n=Ao(t),e=pa(t),{args:i,keys:r}=_0(t);if(0===i.length)return wt([],n);const o=new we(function(t,n,e=ni){return i=>{M1(n,()=>{const{length:r}=t,o=new Array(r);let s=r,a=r;for(let l=0;l{const c=wt(t[l],n);let u=!1;c.subscribe(new Te(i,d=>{o[l]=d,u||(u=!0,a--),a||i.next(e(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}(i,n,r?s=>v0(r,s):ni));return e?o.pipe(qh(e)):o}(t.map(n=>n.pipe(Pt(1),wo(Ws)))).pipe(R1((n,e)=>{let i=!1;return e.reduce((r,o,s)=>r!==Ws?r:(o===Ws&&(i=!0),i||!1!==o&&s!==e.length-1&&!ur(o)?r:o),n)},Ws),zt(n=>n!==Ws),ie(n=>ur(n)?n:!0===n),Pt(1)))}class RP{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ys,this.attachRef=null}}class Ys{constructor(){this.contexts=new Map}onChildOutletCreated(n,e){const i=this.getOrCreateContext(n);i.outlet=e,this.contexts.set(n,i)}onChildOutletDestroyed(n){const e=this.getContext(n);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let e=this.getContext(n);return e||(e=new RP,this.contexts.set(n,e)),e}getContext(n){return this.contexts.get(n)||null}}let Pp=(()=>{class t{constructor(e,i,r,o,s){this.parentContexts=e,this.location=i,this.resolver=r,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new N,this.deactivateEvents=new N,this.attachEvents=new N,this.detachEvents=new N,this.name=o||me,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.resolver||null))}}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 s=(i=i||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),a=this.parentContexts.getOrCreateContext(this.name).children,l=new OP(e,a,this.location.injector);this.activated=this.location.createComponent(s,this.location.length,l),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(y(Ys),y(bn),y(nr),Zi("name"),y(ct))},t.\u0275dir=O({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"]}),t})();class OP{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===cr?this.route:n===Ys?this.childContexts:this.parent.get(n,e)}}let uw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=xe({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,i){1&e&&z(0,"router-outlet")},directives:[Pp],encapsulation:2}),t})();function dw(t,n=""){for(let e=0;eDn(i)===n);return e.push(...t.filter(i=>Dn(i)!==n)),e}const pw={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function sc(t,n,e){var a;if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?V({},pw):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const r=(n.matcher||YF)(e,t,n);if(!r)return V({},pw);const o={};Tt(r.posParams,(l,c)=>{o[c]=l.path});const s=r.consumed.length>0?V(V({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:s,positionalParamSegments:null!=(a=r.posParams)?a:{}}}function ac(t,n,e,i,r="corrected"){if(e.length>0&&function(t,n,e){return e.some(i=>lc(t,n,i)&&Dn(i)!==me)}(t,e,i)){const s=new ye(n,function(t,n,e,i){const r={};r[me]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&Dn(o)!==me){const s=new ye([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[Dn(o)]=s}return r}(t,n,i,new ye(e,t.children)));return s._sourceSegment=t,s._segmentIndexShift=n.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function(t,n,e){return e.some(i=>lc(t,n,i))}(t,e,i)){const s=new ye(t.segments,function(t,n,e,i,r,o){const s={};for(const a of i)if(lc(t,e,a)&&!r[Dn(a)]){const l=new ye([],{});l._sourceSegment=t,l._segmentIndexShift="legacy"===o?t.segments.length:n.length,s[Dn(a)]=l}return V(V({},r),s)}(t,n,e,i,t.children,r));return s._sourceSegment=t,s._segmentIndexShift=n.length,{segmentGroup:s,slicedSegments:e}}const o=new ye(t.segments,t.children);return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}function lc(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function fw(t,n,e,i){return!!(Dn(t)===i||i!==me&&lc(n,e,t))&&("**"===t.path||sc(n,t,e).matched)}function gw(t,n,e){return 0===n.length&&!t.children[e]}class qs{constructor(n){this.segmentGroup=n||null}}class mw{constructor(n){this.urlTree=n}}function cc(t){return new we(n=>n.error(new qs(t)))}function _w(t){return new we(n=>n.error(new mw(t)))}function HP(t){return new we(n=>n.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class $P{constructor(n,e,i,r,o){this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0,this.ngModule=n.get(ui)}apply(){const n=ac(this.urlTree.root,[],[],this.config).segmentGroup,e=new ye(n.segments,n.children);return this.expandSegmentGroup(this.ngModule,this.config,e,me).pipe(ie(o=>this.createUrlTree(Vp(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ln(o=>{if(o instanceof mw)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof qs?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.ngModule,this.config,n.root,me).pipe(ie(r=>this.createUrlTree(Vp(r),n.queryParams,n.fragment))).pipe(Ln(r=>{throw r instanceof qs?this.noMatchError(r):r}))}noMatchError(n){return new Error(`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=n.segments.length>0?new ye([],{[me]:n}):n;return new ar(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(ie(o=>new ye([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return wt(r).pipe(yo(o=>{const s=i.children[o],a=hw(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(ie(l=>({segment:l,outlet:o})))}),R1((o,s)=>(o[s.outlet]=s.segment,o),{}),function(t,n){const e=arguments.length>=2;return i=>i.pipe(t?zt((r,o)=>t(r,o,i)):ni,Sp(1),e?A1(n):O1(()=>new Zl))}())}expandSegment(n,e,i,r,o,s){return wt(i).pipe(yo(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Ln(c=>{if(c instanceof qs)return K(null);throw c}))),gi(a=>!!a),Ln((a,l)=>{if(a instanceof Zl||"EmptyError"===a.name){if(gw(e,r,o))return K(new ye([],{}));throw new qs(e)}throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return fw(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):cc(e):cc(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?_w(o):this.lineralizeSegments(i,o).pipe(ot(s=>{const a=new ye(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,lastChild:c,positionalParamSegments:u}=sc(e,r,o);if(!a)return cc(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?_w(d):this.lineralizeSegments(r,d).pipe(ot(h=>this.expandSegment(n,e,i,h.concat(o.slice(c)),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){if("**"===i.path)return i.loadChildren?(i._loadedConfig?K(i._loadedConfig):this.configLoader.load(n.injector,i)).pipe(ie(h=>(i._loadedConfig=h,new ye(r,{})))):K(new ye(r,{}));const{matched:s,consumedSegments:a,lastChild:l}=sc(e,i,r);if(!s)return cc(e);const c=r.slice(l);return this.getChildConfig(n,i,r).pipe(ot(d=>{const h=d.module,p=d.routes,{segmentGroup:b,slicedSegments:C}=ac(e,a,c,p),S=new ye(b.segments,b.children);if(0===C.length&&S.hasChildren())return this.expandChildren(h,p,S).pipe(ie(H=>new ye(a,H)));if(0===p.length&&0===C.length)return K(new ye(a,{}));const x=Dn(i)===o;return this.expandSegment(h,S,p,C,x?me:o,!0).pipe(ie(A=>new ye(a.concat(A.segments),A.children)))}))}getChildConfig(n,e,i){return e.children?K(new Fp(e.children,n)):e.loadChildren?void 0!==e._loadedConfig?K(e._loadedConfig):this.runCanLoadGuards(n.injector,e,i).pipe(ot(r=>{return r?this.configLoader.load(n.injector,e).pipe(ie(o=>(e._loadedConfig=o,o))):(t=e,new we(n=>n.error(Tp(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`))));var t})):K(new Fp([],n))}runCanLoadGuards(n,e,i){const r=e.canLoad;return r&&0!==r.length?K(r.map(s=>{const a=n.get(s);let l;if((t=a)&&Li(t.canLoad))l=a.canLoad(e,i);else{if(!Li(a))throw new Error("Invalid CanLoad guard");l=a(e,i)}var t;return Xn(l)})).pipe(Ks(),Wt(s=>{if(!ur(s))return;const a=Tp(`Redirecting to "${this.urlSerializer.serialize(s)}"`);throw a.url=s,a}),ie(s=>!0===s)):K(!0)}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return K(i);if(r.numberOfChildren>1||!r.children[me])return HP(n.redirectTo);r=r.children[me]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreatreUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new ar(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Tt(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Tt(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new ye(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}function Vp(t){const n={};for(const i of Object.keys(t.children)){const o=Vp(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function(t){if(1===t.numberOfChildren&&t.children[me]){const n=t.children[me];return new ye(t.segments.concat(n.segments),n.children)}return t}(new ye(t.segments,n))}class vw{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class uc{constructor(n,e){this.component=n,this.route=e}}function WP(t,n,e){const i=t._root;return Zs(i,n?n._root:null,e,[i.value])}function dc(t,n,e){const i=function(t){if(!t)return null;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(n);return(i?i.module.injector:e).get(t)}function Zs(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Do(n);return t.children.forEach(s=>{(function(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!lr(t.url,n.url);case"pathParamsOrQueryParamsChange":return!lr(t.url,n.url)||!Qn(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!kp(t,n)||!Qn(t.queryParams,n.queryParams);default:return!kp(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new vw(i)):(o.data=s.data,o._resolvedData=s._resolvedData),Zs(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new uc(a.outlet.component,s))}else s&&Js(n,a,r),r.canActivateChecks.push(new vw(i)),Zs(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Tt(o,(s,a)=>Js(s,e.getContext(a),r)),r}function Js(t,n,e){const i=Do(t),r=t.value;Tt(i,(o,s)=>{Js(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new uc(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}class s2{}function bw(t){return new we(n=>n.error(t))}class l2{constructor(n,e,i,r,o,s){this.rootComponentType=n,this.config=e,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=s}recognize(){const n=ac(this.urlTree.root,[],[],this.config.filter(s=>void 0===s.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,n,me);if(null===e)return null;const i=new ic([],Object.freeze({}),Object.freeze(V({},this.urlTree.queryParams)),this.urlTree.fragment,{},me,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new _i(i,e),o=new iw(this.url,r);return this.inheritParamsAndData(o._root),o}inheritParamsAndData(n){const e=n.value,i=nw(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(n,e):this.processSegment(n,e,e.segments,i)}processChildren(n,e){const i=[];for(const o of Object.keys(e.children)){const s=e.children[o],a=hw(n,o),l=this.processSegmentGroup(a,s,o);if(null===l)return null;i.push(...l)}const r=yw(i);return r.sort((n,e)=>n.value.outlet===me?-1:e.value.outlet===me?1:n.value.outlet.localeCompare(e.value.outlet)),r}processSegment(n,e,i,r){for(const o of n){const s=this.processSegmentAgainstRoute(o,e,i,r);if(null!==s)return s}return gw(e,i,r)?[]:null}processSegmentAgainstRoute(n,e,i,r){if(n.redirectTo||!fw(n,e,i,r))return null;let o,s=[],a=[];if("**"===n.path){const p=i.length>0?j1(i).parameters:{};o=new ic(i,p,Object.freeze(V({},this.urlTree.queryParams)),this.urlTree.fragment,Dw(n),Dn(n),n.component,n,ww(e),Cw(e)+i.length,Sw(n))}else{const p=sc(e,n,i);if(!p.matched)return null;s=p.consumedSegments,a=i.slice(p.lastChild),o=new ic(s,p.parameters,Object.freeze(V({},this.urlTree.queryParams)),this.urlTree.fragment,Dw(n),Dn(n),n.component,n,ww(e),Cw(e)+s.length,Sw(n))}const l=(t=n).children?t.children:t.loadChildren?t._loadedConfig.routes:[],{segmentGroup:c,slicedSegments:u}=ac(e,s,a,l.filter(p=>void 0===p.redirectTo),this.relativeLinkResolution);var t;if(0===u.length&&c.hasChildren()){const p=this.processChildren(l,c);return null===p?null:[new _i(o,p)]}if(0===l.length&&0===u.length)return[new _i(o,[])];const d=Dn(n)===r,h=this.processSegment(l,c,u,d?me:r);return null===h?null:[new _i(o,h)]}}function d2(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function yw(t){const n=[],e=new Set;for(const i of t){if(!d2(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=yw(i.children);n.push(new _i(i.value,r))}return n.filter(i=>!e.has(i))}function ww(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function Cw(t){let n=t,e=n._segmentIndexShift?n._segmentIndexShift:0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift?n._segmentIndexShift:0;return e-1}function Dw(t){return t.data||{}}function Sw(t){return t.resolve||{}}function Bp(t){return Jn(n=>{const e=t(n);return e?wt(e).pipe(ie(()=>n)):K(n)})}class b2 extends class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}{}const Hp=new Q("ROUTES");class Tw{constructor(n,e,i,r){this.injector=n,this.compiler=e,this.onLoadStartListener=i,this.onLoadEndListener=r}load(n,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const r=this.loadModuleFactory(e.loadChildren).pipe(ie(o=>{this.onLoadEndListener&&this.onLoadEndListener(e);const s=o.create(n);return new Fp(U1(s.injector.get(Hp,void 0,ae.Self|ae.Optional)).map(Lp),s)}),Ln(o=>{throw e._loader$=void 0,o}));return e._loader$=new kF(r,()=>new se).pipe(k1()),e._loader$}loadModuleFactory(n){return Xn(n()).pipe(ot(e=>e instanceof xb?K(e):wt(this.compiler.compileModuleAsync(e))))}}class w2{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,e){return n}}function C2(t){throw t}function D2(t,n,e){return n.parse("/")}function Ew(t,n){return K(null)}const S2={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},T2={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let it=(()=>{class t{constructor(e,i,r,o,s,a,l){this.rootComponentType=e,this.urlSerializer=i,this.rootContexts=r,this.location=o,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new se,this.errorHandler=C2,this.malformedUriErrorHandler=D2,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Ew,afterPreactivation:Ew},this.urlHandlingStrategy=new w2,this.routeReuseStrategy=new b2,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=s.get(ui),this.console=s.get(dy);const d=s.get(be);this.isNgZoneEnabled=d instanceof be&&be.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=new ar(new ye([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Tw(s,a,h=>this.triggerEvent(new P1(h)),h=>this.triggerEvent(new L1(h))),this.routerState=tw(this.currentUrlTree,this.rootComponentType),this.transitions=new vt({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.\u0275routerPageId}setupNavigations(e){const i=this.events;return e.pipe(zt(r=>0!==r.id),ie(r=>rt(V({},r),{extractedUrl:this.urlHandlingStrategy.extract(r.rawUrl)})),Jn(r=>{let o=!1,s=!1;return K(r).pipe(Wt(a=>{this.currentNavigation={id:a.id,initialUrl:a.currentRawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?rt(V({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Jn(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 hc(a.source)&&(this.browserUrlTree=a.extractedUrl),K(a).pipe(Jn(d=>{const h=this.transitions.getValue();return i.next(new Jl(d.id,this.serializeUrl(d.extractedUrl),d.source,d.restoredState)),h!==this.transitions.getValue()?Tn:Promise.resolve(d)}),function(t,n,e,i){return Jn(r=>function(t,n,e,i,r){return new $P(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(ie(o=>rt(V({},r),{urlAfterRedirects:o}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),Wt(d=>{this.currentNavigation=rt(V({},this.currentNavigation),{finalUrl:d.urlAfterRedirects})}),function(t,n,e,i,r){return ot(o=>function(t,n,e,i,r="emptyOnly",o="legacy"){try{const s=new l2(t,n,e,i,r,o).recognize();return null===s?bw(new s2):K(s)}catch(s){return bw(s)}}(t,n,o.urlAfterRedirects,e(o.urlAfterRedirects),i,r).pipe(ie(s=>rt(V({},o),{targetSnapshot:s}))))}(this.rootComponentType,this.config,d=>this.serializeUrl(d),this.paramsInheritanceStrategy,this.relativeLinkResolution),Wt(d=>{if("eager"===this.urlUpdateStrategy){if(!d.extras.skipLocationChange){const p=this.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);this.setBrowserUrl(p,d)}this.browserUrlTree=d.urlAfterRedirects}const h=new LF(d.id,this.serializeUrl(d.extractedUrl),this.serializeUrl(d.urlAfterRedirects),d.targetSnapshot);i.next(h)}));if(c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:h,extractedUrl:p,source:b,restoredState:C,extras:S}=a,x=new Jl(h,this.serializeUrl(p),b,C);i.next(x);const D=tw(p,this.rootComponentType).snapshot;return K(rt(V({},a),{targetSnapshot:D,urlAfterRedirects:p,extras:rt(V({},S),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=a.rawUrl,a.resolve(null),Tn}),Bp(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:h,replaceUrl:p}}=a;return this.hooks.beforePreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!h,replaceUrl:!!p})}),Wt(a=>{const l=new VF(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),ie(a=>rt(V({},a),{guards:WP(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function(t,n){return ot(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?K(rt(V({},e),{guardsResult:!0})):function(t,n,e,i){return wt(t).pipe(ot(r=>function(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?K(o.map(a=>{const l=dc(a,n,r);let c;if(function(t){return t&&Li(t.canDeactivate)}(l))c=Xn(l.canDeactivate(t,n,e,i));else{if(!Li(l))throw new Error("Invalid CanDeactivate guard");c=Xn(l(t,n,e,i))}return c.pipe(gi())})).pipe(Ks()):K(!0)}(r.component,r.route,e,n,i)),gi(r=>!0!==r,!0))}(s,i,r,t).pipe(ot(a=>a&&function(t){return"boolean"==typeof t}(a)?function(t,n,e,i){return wt(n).pipe(yo(r=>Hs(function(t,n){return null!==t&&n&&n(new jF(t)),K(!0)}(r.route.parent,i),function(t,n){return null!==t&&n&&n(new GF(t)),K(!0)}(r.route,i),function(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>N1(()=>K(s.guards.map(l=>{const c=dc(l,s.node,e);let u;if(function(t){return t&&Li(t.canActivateChild)}(c))u=Xn(c.canActivateChild(i,t));else{if(!Li(c))throw new Error("Invalid CanActivateChild guard");u=Xn(c(i,t))}return u.pipe(gi())})).pipe(Ks())));return K(o).pipe(Ks())}(t,r.path,e),function(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return K(!0);const r=i.map(o=>N1(()=>{const s=dc(o,n,e);let a;if(function(t){return t&&Li(t.canActivate)}(s))a=Xn(s.canActivate(n,t));else{if(!Li(s))throw new Error("Invalid CanActivate guard");a=Xn(s(n,t))}return a.pipe(gi())}));return K(r).pipe(Ks())}(t,r.route,e))),gi(r=>!0!==r,!0))}(i,o,t,n):K(a)),ie(a=>rt(V({},e),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),Wt(a=>{if(ur(a.guardsResult)){const c=Tp(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw c.url=a.guardsResult,c}const l=new BF(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),zt(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),Bp(a=>{if(a.guards.canActivateChecks.length)return K(a).pipe(Wt(l=>{const c=new HF(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}),Jn(l=>{let c=!1;return K(l).pipe(function(t,n){return ot(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return K(e);let o=0;return wt(r).pipe(yo(s=>function(t,n,e,i){return function(t,n,e,i){const r=Object.keys(t);if(0===r.length)return K({});const o={};return wt(r).pipe(ot(s=>function(t,n,e,i){const r=dc(t,n,i);return Xn(r.resolve?r.resolve(n,e):r(n,e))}(t[s],n,e,i).pipe(Wt(a=>{o[s]=a}))),Sp(1),ot(()=>Object.keys(o).length===r.length?K(o):Tn))}(t._resolve,t,n,i).pipe(ie(o=>(t._resolvedData=o,t.data=V(V({},t.data),nw(t,e).resolve),null)))}(s.route,i,t,n)),Wt(()=>o++),Sp(1),ot(s=>o===r.length?K(e):Tn))})}(this.paramsInheritanceStrategy,this.ngModule.injector),Wt({next:()=>c=!0,complete:()=>{c||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),Wt(l=>{const c=new UF(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}))}),Bp(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:h,replaceUrl:p}}=a;return this.hooks.afterPreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!h,replaceUrl:!!p})}),ie(a=>{const l=function(t,n,e){const i=Gs(t,n._root,e?e._root:void 0);return new ew(i,n)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return rt(V({},a),{targetRouterState:l})}),Wt(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)}),((t,n,e)=>ie(i=>(new TP(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),Wt({next(){o=!0},complete(){o=!0}}),function(t){return je((n,e)=>{try{n.subscribe(e)}finally{e.add(t)}})}(()=>{var a;o||s||this.cancelNavigationTransition(r,`Navigation ID ${r.id} is not equal to the current navigation id ${this.navigationId}`),(null==(a=this.currentNavigation)?void 0:a.id)===r.id&&(this.currentNavigation=null)}),Ln(a=>{if(s=!0,function(t){return t&&t[B1]}(a)){const l=ur(a.url);l||(this.navigated=!0,this.restoreHistory(r,!0));const c=new F1(r.id,this.serializeUrl(r.extractedUrl),a.message);i.next(c),l?setTimeout(()=>{const u=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),d={skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||hc(r.source)};this.scheduleNavigation(u,"imperative",null,d,{resolve:r.resolve,reject:r.reject,promise:r.promise})},0):r.resolve(!1)}else{this.restoreHistory(r,!0);const l=new PF(r.id,this.serializeUrl(r.extractedUrl),a);i.next(l);try{r.resolve(this.errorHandler(a))}catch(c){r.reject(c)}}return Tn}))}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}setTransition(e){this.transitions.next(V(V({},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 a;const r={replaceUrl:!0},o=(null==(a=e.state)?void 0:a.navigationId)?e.state:null;if(o){const l=V({},o);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(r.state=l)}const s=this.parseUrl(e.url);this.scheduleNavigation(s,i,o,r)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){dw(e),this.config=e.map(Lp),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:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=r||this.routerState.root,u=l?this.currentUrlTree.fragment:s;let d=null;switch(a){case"merge":d=V(V({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}return null!==d&&(d=this.removeEmptyProps(d)),function(t,n,e,i,r){if(0===e.length)return Rp(n.root,n.root,n,i,r);const o=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new sw(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Tt(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new sw(e,n,i)}(e);if(o.toRoot())return Rp(n.root,new ye([],{}),n,i,r);const s=function(t,n,e){if(t.isAbsolute)return new Op(n.root,!0,0);if(-1===e.snapshot._lastPathIndex){const o=e.snapshot._urlSegment;return new Op(o,o===n.root,0)}const i=rc(t.commands[0])?0:1;return function(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new Op(i,!1,r-o)}(e.snapshot._urlSegment,e.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(o,n,t),a=s.processChildren?oc(s.segmentGroup,s.index,o.commands):aw(s.segmentGroup,s.index,o.commands);return Rp(s.segmentGroup,a,n,i,r)}(c,this.currentUrlTree,e,d,null!=u?u:null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=ur(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,i)}navigate(e,i={skipLocationChange:!1}){return function(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId,this.events.next(new Us(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,e.resolve(!0)},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}scheduleNavigation(e,i,r,o,s){var x,D,A;if(this.disposed)return Promise.resolve(!1);const a=this.transitions.value,l=hc(i)&&a&&!hc(a.source),c=a.rawUrl.toString()===e.toString(),u=a.id===(null==(x=this.currentNavigation)?void 0:x.id);if(l&&c&&u)return Promise.resolve(!0);let h,p,b;s?(h=s.resolve,p=s.reject,b=s.promise):b=new Promise((H,ne)=>{h=H,p=ne});const C=++this.navigationId;let S;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(r=this.location.getState()),S=r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?null!=(D=this.browserPageId)?D:0:(null!=(A=this.browserPageId)?A:0)+1):S=0,this.setTransition({id:C,targetPageId:S,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:o,resolve:h,reject:p,promise:b,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),b.catch(H=>Promise.reject(H))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),o=V(V({},i.extras.state),this.generateNgRouterState(i.id,i.targetPageId));this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(e,i=!1){var r,o;if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null==(r=this.currentNavigation)?void 0:r.finalUrl)||0===s?this.currentUrlTree===(null==(o=this.currentNavigation)?void 0:o.finalUrl)&&0===s&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(s)}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 F1(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 t.\u0275fac=function(e){Pd()},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function hc(t){return"imperative"!==t}let pc=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.commands=null,this.onChanges=new se,this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){if(null!=this.tabIndexAttribute)return;const i=this.renderer,r=this.el.nativeElement;null!==e?i.setAttribute(r,"tabindex",e):i.removeAttribute(r,"tabindex")}ngOnChanges(e){this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(){if(null===this.urlTree)return!0;const e={skipLocationChange:So(this.skipLocationChange),replaceUrl:So(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,e),!0}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:So(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(y(it),y(cr),Zi("tabindex"),y(un),y(ge))},t.\u0275dir=O({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(e,i){1&e&&k("click",function(){return i.onClick()})},inputs:{queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[Qe]}),t})(),fc=(()=>{class t{constructor(e,i,r){this.router=e,this.route=i,this.locationStrategy=r,this.commands=null,this.href=null,this.onChanges=new se,this.subscription=e.events.subscribe(o=>{o instanceof Us&&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,o,s){if(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target||null===this.urlTree)return!0;const a={skipLocationChange:So(this.skipLocationChange),replaceUrl:So(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:So(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(y(it),y(cr),y(go))},t.\u0275dir=O({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,i){1&e&&k("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&X("target",i.target)("href",i.href,Hu)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[Qe]}),t})();function So(t){return""===t||!!t}class xw{}class Iw{preload(n,e){return K(null)}}let Mw=(()=>{class t{constructor(e,i,r,o){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=new Tw(r,i,l=>e.triggerEvent(new P1(l)),l=>e.triggerEvent(new L1(l)))}setUpPreloading(){this.subscription=this.router.events.pipe(zt(e=>e instanceof Us),yo(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(ui);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i)if(o.loadChildren&&!o.canLoad&&o._loadedConfig){const s=o._loadedConfig;r.push(this.processRoutes(s.module,s.routes))}else o.loadChildren&&!o.canLoad?r.push(this.preloadConfig(e,o)):o.children&&r.push(this.processRoutes(e,o.children));return wt(r).pipe(Oo(),ie(o=>{}))}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>(i._loadedConfig?K(i._loadedConfig):this.loader.load(e.injector,i)).pipe(ot(o=>(i._loadedConfig=o,this.processRoutes(o.module,o.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(R(it),R(ml),R(lt),R(xw))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Up=(()=>{class t{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 Jl?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Us&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof V1&&(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 V1(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){Pd()},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const dr=new Q("ROUTER_CONFIGURATION"),Nw=new Q("ROUTER_FORROOT_GUARD"),N2=[Ih,{provide:Y1,useClass:q1},{provide:it,useFactory:function(t,n,e,i,r,o,s={},a,l){const c=new it(null,t,n,e,i,r,U1(o));return a&&(c.urlHandlingStrategy=a),l&&(c.routeReuseStrategy=l),function(t,n){t.errorHandler&&(n.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(n.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(n.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(n.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(n.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(n.urlUpdateStrategy=t.urlUpdateStrategy),t.canceledNavigationResolution&&(n.canceledNavigationResolution=t.canceledNavigationResolution)}(s,c),s.enableTracing&&c.events.subscribe(u=>{var d,h;null==(d=console.group)||d.call(console,`Router Event: ${u.constructor.name}`),console.log(u.toString()),console.log(u),null==(h=console.groupEnd)||h.call(console)}),c},deps:[Y1,Ys,Ih,lt,ml,Hp,dr,[class{},new $n],[class{},new $n]]},Ys,{provide:cr,useFactory:function(t){return t.routerState.root},deps:[it]},Mw,Iw,class{preload(n,e){return e().pipe(Ln(()=>K(null)))}},{provide:dr,useValue:{enableTracing:!1}}];function k2(){return new _y("Router",it)}let jp=(()=>{class t{constructor(e,i){}static forRoot(e,i){return{ngModule:t,providers:[N2,kw(e),{provide:Nw,useFactory:A2,deps:[[it,new $n,new Ar]]},{provide:dr,useValue:i||{}},{provide:go,useFactory:O2,deps:[or,[new Jo(xh),new $n],dr]},{provide:Up,useFactory:R2,deps:[it,FO,dr]},{provide:xw,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:Iw},{provide:_y,multi:!0,useFactory:k2},[$p,{provide:gl,multi:!0,useFactory:V2,deps:[$p]},{provide:Rw,useFactory:B2,deps:[$p]},{provide:uy,multi:!0,useExisting:Rw}]]}}static forChild(e){return{ngModule:t,providers:[kw(e)]}}}return t.\u0275fac=function(e){return new(e||t)(R(Nw,8),R(it,8))},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})();function R2(t,n,e){return e.scrollOffset&&n.setOffset(e.scrollOffset),new Up(t,n,e)}function O2(t,n,e={}){return e.useHash?new yR(t,n):new By(t,n)}function A2(t){return"guarded"}function kw(t){return[{provide:aT,multi:!0,useValue:t},{provide:Hp,multi:!0,useValue:t}]}let $p=(()=>{class t{constructor(e){this.injector=e,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new se}appInitializer(){return this.injector.get(_R,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let i=null;const r=new Promise(a=>i=a),o=this.injector.get(it),s=this.injector.get(dr);return"disabled"===s.initialNavigation?(o.setUpLocationChangeListener(),i(!0)):"enabled"===s.initialNavigation||"enabledBlocking"===s.initialNavigation?(o.hooks.afterPreactivation=()=>this.initNavigation?K(null):(this.initNavigation=!0,i(!0),this.resultOfPreactivationDone),o.initialNavigation()):i(!0),r})}bootstrapListener(e){const i=this.injector.get(dr),r=this.injector.get(Mw),o=this.injector.get(Up),s=this.injector.get(it),a=this.injector.get(ho);e===a.components[0]&&(("enabledNonBlocking"===i.initialNavigation||void 0===i.initialNavigation)&&s.initialNavigation(),r.setUpPreloading(),o.init(),s.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return t.\u0275fac=function(e){return new(e||t)(R(lt))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function V2(t){return t.appInitializer.bind(t)}function B2(t){return t.bootstrapListener.bind(t)}const Rw=new Q("Router Initializer"),gc_apiUrl="http://localhost:5566";class U2{}let To=(()=>{class t{constructor(e){this.http=e,this.currentUserSubject=new vt(JSON.parse(localStorage.getItem("currentUser"))),this.currentUser=this.currentUserSubject.asObservable()}get currentUserValue(){return this.currentUserSubject.value}login(e,i){return this.http.post(`${gc_apiUrl}/admin/login`,{username:e,password:i}).pipe(ie(r=>(localStorage.setItem("currentUser",JSON.stringify(r)),this.currentUserSubject.next(r),r)))}logout(){localStorage.removeItem("currentUser"),this.currentUserSubject.next(new U2)}}return t.\u0275fac=function(e){return new(e||t)(R(Yl))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ow=(()=>{class t{constructor(e){this.router=e,this.subject=new se,this.keepAfterRouteChange=!1,this.router.events.subscribe(i=>{i instanceof Jl&&(this.keepAfterRouteChange?this.keepAfterRouteChange=!1:this.clear())})}getAlert(){return this.subject.asObservable()}success(e,i=!1){this.keepAfterRouteChange=i,this.subject.next({type:"success",text:e})}error(e,i=!1){this.keepAfterRouteChange=i,this.subject.next({type:"error",text:e})}clear(){this.subject.next(new se)}}return t.\u0275fac=function(e){return new(e||t)(R(it))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function j2(t,n){if(1&t&&(f(0,"div",1),I(1),g()),2&t){const e=m();_("ngClass",e.message.cssClass),v(1),Se(e.message.text)}}let $2=(()=>{class t{constructor(e){this.alertService=e}ngOnInit(){this.subscription=this.alertService.getAlert().subscribe(e=>{switch(e&&e.type){case"success":e.cssClass="alert alert-success";break;case"error":e.cssClass="alert alert-danger"}this.message=e})}ngOnDestroy(){this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(y(Ow))},t.\u0275cmp=xe({type:t,selectors:[["alert"]],decls:1,vars:1,consts:[[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,i){1&e&&w(0,j2,2,2,"div",0),2&e&&_("ngIf",i.message)},directives:[nt,dn],encapsulation:2}),t})();const G2=["addListener","removeListener"],z2=["addEventListener","removeEventListener"],W2=["on","off"];function Et(t,n,e,i){if(J(e)&&(i=e,e=void 0),i)return Et(t,n,e).pipe(qh(i));const[r,o]=function(t){return J(t.addEventListener)&&J(t.removeEventListener)}(t)?z2.map(s=>a=>t[s](n,a,e)):function(t){return J(t.addListener)&&J(t.removeListener)}(t)?G2.map(Aw(t,n)):function(t){return J(t.on)&&J(t.off)}(t)?W2.map(Aw(t,n)):[];if(!r&&Yc(t))return ot(s=>Et(s,n,e))(Dt(t));if(!r)throw new TypeError("Invalid event target");return new we(s=>{const a=(...l)=>s.next(1o(a)})}function Aw(t,n){return e=>i=>t[e](n,i)}class Z2 extends Ft{constructor(n,e){super()}schedule(n,e=0){return this}}const mc={setInterval(...t){const{delegate:n}=mc;return((null==n?void 0:n.setInterval)||setInterval)(...t)},clearInterval(t){const{delegate:n}=mc;return((null==n?void 0:n.clearInterval)||clearInterval)(t)},delegate:void 0};class Gp extends Z2{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;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(n,e,i=0){return mc.setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;mc.clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:n,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,vr(i,this),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null,super.unsubscribe()}}}const zp={now:()=>(zp.delegate||Date).now(),delegate:void 0};class Qs{constructor(n,e=Qs.now){this.schedulerActionCtor=n,this.now=e}schedule(n,e=0,i){return new this.schedulerActionCtor(this,n).schedule(i,e)}}Qs.now=zp.now;class Wp extends Qs{constructor(n,e=Qs.now){super(n,e),this.actions=[],this._active=!1,this._scheduled=void 0}flush(n){const{actions:e}=this;if(this._active)return void e.push(n);let i;this._active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this._active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const Pw=new Wp(Gp);function _c(t=0,n,e=Pw){let i=-1;return null!=n&&(Xf(n)?e=n:i=n),new we(r=>{let o=function(t){return t instanceof Date&&!isNaN(t)}(t)?+t-e.now():t;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}const{isArray:Q2}=Array;function Lw(t){return 1===t.length&&Q2(t[0])?t[0]:t}function vc(...t){const n=pa(t),e=Lw(t);return e.length?new we(i=>{let r=e.map(()=>[]),o=e.map(()=>!1);i.add(()=>{r=o=null});for(let s=0;!i.closed&&s{if(r[s].push(a),r.every(l=>l.length)){const l=r.map(c=>c.shift());i.next(n?n(...l):l),r.some((c,u)=>!c.length&&o[u])&&i.complete()}},()=>{o[s]=!0,!r[s].length&&i.complete()}));return()=>{r=o=null}}):Tn}function Ye(t){return je((n,e)=>{Dt(t).subscribe(new Te(e,()=>e.complete(),yi)),!e.closed&&n.subscribe(e)})}function tL(t,n){return t===n}function Kp(...t){const n=pa(t);return je((e,i)=>{const r=t.length,o=new Array(r);let s=t.map(()=>!1),a=!1;for(let l=0;l{o[l]=c,!a&&!s[l]&&(s[l]=!0,(a=s.every(ni))&&(s=null))},yi));e.subscribe(new Te(i,l=>{if(a){const c=[l,...o];i.next(n?n(...c):c)}}))})}new we(yi);const pL=["*"],kL=["dialog"];function hr(t){return null!=t}function Eo(t){return(t||document.body).getBoundingClientRect()}"undefined"!=typeof Element&&!Element.prototype.closest&&(Element.prototype.closest=function(t){let n=this;if(!document.documentElement.contains(n))return null;do{if(n.matches(t))return n;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null});const jw={animation:!0,transitionTimerDelayMs:5},EV=()=>{},{transitionTimerDelayMs:xV}=jw,Xs=new Map,Kt=(t,n,e,i)=>{let r=i.context||{};const o=Xs.get(n);if(o)switch(i.runningTransition){case"continue":return Tn;case"stop":t.run(()=>o.transition$.complete()),r=Object.assign(o.context,r),Xs.delete(n)}const s=e(n,i.animation,r)||EV;if(!i.animation||"none"===window.getComputedStyle(n).transitionProperty)return t.run(()=>s()),K(void 0).pipe(function(t){return n=>new we(e=>n.subscribe({next:s=>t.run(()=>e.next(s)),error:s=>t.run(()=>e.error(s)),complete:()=>t.run(()=>e.complete())}))}(t));const a=new se,l=new se,c=a.pipe(function(...t){return n=>Hs(n,K(...t))}(!0));Xs.set(n,{transition$:a,complete:()=>{l.next(),l.complete()},context:r});const u=function(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(n);return t.runOutsideAngular(()=>{const d=Et(n,"transitionend").pipe(Ye(c),zt(({target:p})=>p===n));(function(...t){return 1===(t=Lw(t)).length?Dt(t[0]):new we(function(t){return n=>{let e=[];for(let i=0;e&&!n.closed&&i{if(e){for(let o=0;o{Xs.delete(n),t.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()};let wc=(()=>{class t{constructor(){this.animation=jw.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Yw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),qw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),Jw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})(),eC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),tC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})();var bt=(()=>{return(t=bt||(bt={}))[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",bt;var t})();"undefined"!=typeof navigator&&navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const iC=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function rC(t){const n=Array.from(t.querySelectorAll(iC)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}new class{getAllStyles(n){return window.getComputedStyle(n)}getStyle(n,e){return this.getAllStyles(n)[e]}isStaticPositioned(n){return"static"===(this.getStyle(n,"position")||"static")}offsetParent(n){let e=n.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(n,e=!0){let i,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(n,"position"))i=n.getBoundingClientRect(),i={top:i.top,bottom:i.bottom,left:i.left,right:i.right,height:i.height,width:i.width};else{const o=this.offsetParent(n);i=this.offset(n,!1),o!==document.documentElement&&(r=this.offset(o,!1)),r.top+=o.clientTop,r.left+=o.clientLeft}return i.top-=r.top,i.bottom-=r.top,i.left-=r.left,i.right-=r.left,e&&(i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}offset(n,e=!0){const i=n.getBoundingClientRect(),r_top=window.scrollY-document.documentElement.clientTop,r_left=window.scrollX-document.documentElement.clientLeft;let o={height:i.height||n.offsetHeight,width:i.width||n.offsetWidth,top:i.top+r_top,bottom:i.bottom+r_top,left:i.left+r_left,right:i.right+r_left};return e&&(o.height=Math.round(o.height),o.width=Math.round(o.width),o.top=Math.round(o.top),o.bottom=Math.round(o.bottom),o.left=Math.round(o.left),o.right=Math.round(o.right)),o}positionElements(n,e,i,r){const[o="top",s="center"]=i.split("-"),a=r?this.offset(n,!1):this.position(n,!1),l=this.getAllStyles(e),c=parseFloat(l.marginTop),u=parseFloat(l.marginBottom),d=parseFloat(l.marginLeft),h=parseFloat(l.marginRight);let p=0,b=0;switch(o){case"top":p=a.top-(e.offsetHeight+c+u);break;case"bottom":p=a.top+a.height;break;case"left":b=a.left-(e.offsetWidth+d+h);break;case"right":b=a.left+a.width}switch(s){case"top":p=a.top;break;case"bottom":p=a.top+a.height-e.offsetHeight;break;case"left":b=a.left;break;case"right":b=a.left+a.width-e.offsetWidth;break;case"center":"top"===o||"bottom"===o?b=a.left+a.width/2-e.offsetWidth/2:p=a.top+a.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(b)}px, ${Math.round(p)}px)`;const C=e.getBoundingClientRect(),S=document.documentElement,x=window.innerHeight||S.clientHeight,D=window.innerWidth||S.clientWidth;return C.left>=0&&C.top>=0&&C.right<=D&&C.bottom<=x}},new Date(1882,10,12),new Date(2174,10,25);let dC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,Wl]]}),t})(),nf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=O({type:t,selectors:[["",8,"navbar"]]}),t})(),fC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})();class mr{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}let cB=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(Pt(1)).subscribe(()=>{Kt(this._zone,this._el.nativeElement,(e,i)=>{i&&Eo(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Kt(this._zone,this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(be))},t.\u0275cmp=xe({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(e,i){2&e&&(Pe("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),Me("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class ia{close(n){}dismiss(n){}}class uB{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new se,this._dismissed=new se,this._hidden=new se,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Ye(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Ye(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();(t=e)&&t.then?e.then(i=>{!1!==i&&this._dismiss(n)},()=>{}):!1!==e&&this._dismiss(n)}else this._dismiss(n);var t}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():K(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),vc(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var ra=(()=>{return(t=ra||(ra={}))[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",ra;var t})();let dB=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new se,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new N,this.shown=new se,this.hidden=new se}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(Pt(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=vc(Kt(this._zone,e,()=>e.classList.remove("show"),i),Kt(this._zone,this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const e={animation:this.animation,runningTransition:"continue"};vc(Kt(this._zone,this._elRef.nativeElement,(o,s)=>{s&&Eo(o),o.classList.add("show")},e),Kt(this._zone,this._dialogEl.nativeElement,()=>{},e)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Et(e,"keydown").pipe(Ye(this._closed$),zt(r=>r.which===bt.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(ra.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Et(this._dialogEl.nativeElement,"mousedown").pipe(Ye(this._closed$),Wt(()=>i=!1),Jn(()=>Et(e,"mouseup").pipe(Ye(this._closed$),Pt(1))),zt(({target:r})=>e===r)).subscribe(()=>{i=!0}),Et(e,"click").pipe(Ye(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(ra.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=rC(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Kt(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(y(et),y(ge),y(be))},t.\u0275cmp=xe({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&Xe(kL,7),2&e){let r;ee(r=te())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(X("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Pe("modal d-block"+(i.windowClass?" "+i.windowClass:"")),Me("fade",i.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:pL,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(nl(),f(0,"div",0,1),f(2,"div",2),ds(3),g(),g()),2&e&&Pe("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+(i.scrollable?" modal-dialog-scrollable":"")+(i.modalDialogClass?" "+i.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:2}),t})();const hB=()=>{};let pB=(()=>{class t{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):hB}_adjustBody(e){const i=this._document.body,r=i.style.paddingRight,o=parseFloat(window.getComputedStyle(i)["padding-right"]);return i.style["padding-right"]=`${o+e}px`,()=>i.style["padding-right"]=r}_isPresent(e){const i=this._document.body.getBoundingClientRect();return window.innerWidth-(i.left+i.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const i=this._document.body;i.appendChild(e);const r=e.getBoundingClientRect().width-e.clientWidth;return i.removeChild(e),r}}return t.\u0275fac=function(e){return new(e||t)(R(et))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),fB=(()=>{class t{constructor(e,i,r,o,s,a){this._applicationRef=e,this._injector=i,this._document=r,this._scrollBar=o,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new se,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass","modalDialogClass"],this._windowCmpts=[],this._activeInstances=new N,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const l=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{this._ngZone.runOutsideAngular(()=>{const r=Et(n,"focusin").pipe(Ye(e),ie(o=>o.target));Et(n,"keydown").pipe(Ye(e),zt(o=>o.which===bt.Tab),Kp(r)).subscribe(([o,s])=>{const[a,l]=rC(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Et(n,"click").pipe(Ye(e),Kp(r),ie(o=>o[1])).subscribe(o=>o.focus())})})(0,l.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(l.location.nativeElement)}})}open(e,i,r,o){const s=o.container instanceof HTMLElement?o.container:hr(o.container)?this._document.querySelector(o.container):this._document.body,a=this._rendererFactory.createRenderer(null,null),l=this._scrollBar.compensate(),c=()=>{this._modalRefs.length||(a.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);const u=new ia,d=this._getContentRef(e,o.injector||i,r,u,o);let h=!1!==o.backdrop?this._attachBackdrop(e,s):void 0,p=this._attachWindowComponent(e,s,d),b=new uB(p,d,h,o.beforeDismiss);return this._registerModalRef(b),this._registerWindowCmpt(p),b.result.then(l,l),b.result.then(c,c),u.close=C=>{b.close(C)},u.dismiss=C=>{b.dismiss(C)},this._applyWindowOptions(p.instance,o),1===this._modalRefs.length&&a.addClass(this._document.body,"modal-open"),h&&h.instance&&(this._applyBackdropOptions(h.instance,o),h.changeDetectorRef.detectChanges()),p.changeDetectorRef.detectChanges(),b}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,i){let o=e.resolveComponentFactory(cB).create(this._injector);return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_attachWindowComponent(e,i,r){let s=e.resolveComponentFactory(dB).create(this._injector,r.nodes);return this._applicationRef.attachView(s.hostView),i.appendChild(s.location.nativeElement),s}_applyWindowOptions(e,i){this._windowAttributes.forEach(r=>{hr(i[r])&&(e[r]=i[r])})}_applyBackdropOptions(e,i){this._backdropAttributes.forEach(r=>{hr(i[r])&&(e[r]=i[r])})}_getContentRef(e,i,r,o,s){return r?r instanceof Le?this._createFromTemplateRef(r,o):function(t){return"string"==typeof t}(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new mr([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new mr([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new mr([[i]])}_createFromComponent(e,i,r,o,s){const a=e.resolveComponentFactory(r),l=lt.create({providers:[{provide:ia,useValue:o}],parent:i}),c=a.create(l),u=c.location.nativeElement;return s.scrollable&&u.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new mr([[u]],c.hostView,c)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(R(ho),R(lt),R(et),R(pB),R(Zd),R(be))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),gB=(()=>{class t{constructor(e){this._ngbConfig=e,this.backdrop=!0,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(R(wc))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),rf=(()=>{class t{constructor(e,i,r,o){this._moduleCFR=e,this._injector=i,this._modalStack=r,this._config=o}open(e,i={}){const r=V(rt(V({},this._config),{animation:this._config.animation}),i);return this._modalStack.open(this._moduleCFR,this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(R(nr),R(lt),R(fB),R(gB))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),gC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({providers:[rf]}),t})(),bC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),xC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),MC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),NC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),kC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),RC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),OC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),AC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})();new Q("live announcer delay",{providedIn:"root",factory:function(){return 100}});let FC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})();const kB=[Yw,qw,Jw,eC,tC,dC,fC,gC,bC,xC,MC,NC,kC,RC,OC,AC,FC];let RB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[kB,Yw,qw,Jw,eC,tC,dC,fC,gC,bC,xC,MC,NC,kC,RC,OC,AC,FC]}),t})(),E=(()=>{class t{static addClass(e,i){e.classList?e.classList.add(i):e.className+=" "+i}static addMultipleClasses(e,i){if(e.classList){let r=i.trim().split(" ");for(let o=0;oa.height?(l=-1*r.height,e.style.transformOrigin="bottom",s.top+l<0&&(l=-1*s.top)):(l=o,e.style.transformOrigin="top"),c=r.width>a.width?-1*s.left:s.left+r.width>a.width?-1*(s.left+r.width-a.width):0,e.style.top=l+"px",e.style.left=c+"px"}static absolutePosition(e,i){let p,b,r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=r.height,s=r.width,a=i.offsetHeight,l=i.offsetWidth,c=i.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),h=this.getViewport();c.top+a+o>h.height?(p=c.top+u-o,e.style.transformOrigin="bottom",p<0&&(p=u)):(p=a+c.top+u,e.style.transformOrigin="top"),b=c.left+s>h.width?Math.max(0,c.left+d+l-s):c.left+d,e.style.top=p+"px",e.style.left=b+"px"}static getParents(e,i=[]){return null===e.parentNode?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let r=this.getParents(e);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of r){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&i.push(d)}}9!==a.nodeType&&s(a)&&i.push(a)}}return i}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=e.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=e.scrollTop,h=e.clientHeight,p=this.getOuterHeight(i);u<0?e.scrollTop=d+u:u+p>h&&(e.scrollTop=d+u-h+p)}static fadeIn(e,i){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),e.style.opacity=r},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,i){var r=Element.prototype;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(e,i)}static getOuterWidth(e,i){let r=e.offsetWidth;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(e,i){let r=e.offsetHeight;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let e=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:e.innerWidth||r.clientWidth||o.clientWidth,height:e.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(e){var i=e.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,i){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,i){if(this.isElement(i))i.appendChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+e;i.el.nativeElement.appendChild(e)}}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+e+" from "+i;i.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let r=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,r){e[i].apply(e,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return null===e.offsetParent}static getFocusableElements(e){let i=t.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),r=[];for(let o of i)"none"!=getComputedStyle(o).display&&"hidden"!=getComputedStyle(o).visibility&&r.push(o);return r}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}}return t.zindex=1e3,t.calculatedScrollbarWidth=null,t.calculatedScrollbarHeight=null,t})();class cf{constructor(n,e=(()=>{})){this.element=n,this.listener=e}bindScrollListener(){this.scrollableParents=E.getScrollableParents(this.element);for(let n=0;n=n.length&&(i%=n.length,e%=n.length),n.splice(i,0,n.splice(e,1)[0]))}static insertIntoOrderedArray(n,e,i,r){if(i.length>0){let o=!1;for(let s=0;se){i.splice(s,0,n),o=!0;break}o||i.push(n)}else i.push(n)}static findIndexInList(n,e){let i=-1;if(e)for(let r=0;r-1&&(n=n.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),n}static isEmpty(n){return null==n||""===n||Array.isArray(n)&&0===n.length||!(n instanceof Date)&&"object"==typeof n&&0===Object.keys(n).length}static isNotEmpty(n){return!this.isEmpty(n)}}var PC=0;function uf(){return"pr_id_"+ ++PC}var ti=function(){let t=[];const r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(((o,s)=>{let a=t.length>0?t[t.length-1]:{key:o,value:s},l=a.value+(a.key===o?0:s)+1;return t.push({key:o,value:l}),l})(o,a)))},clear:o=>{o&&((o=>{t=t.filter(s=>s.value!==o)})(r(o)),o.style.zIndex="")},getCurrent:()=>t.length>0?t[t.length-1].value:0}}();let xt=(()=>{class t{}return t.STARTS_WITH="startsWith",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.ENDS_WITH="endsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.IN="in",t.LESS_THAN="lt",t.LESS_THAN_OR_EQUAL_TO="lte",t.GREATER_THAN="gt",t.GREATER_THAN_OR_EQUAL_TO="gte",t.BETWEEN="between",t.IS="is",t.IS_NOT="isNot",t.BEFORE="before",t.AFTER="after",t.DATE_IS="dateIs",t.DATE_IS_NOT="dateIsNot",t.DATE_BEFORE="dateBefore",t.DATE_AFTER="dateAfter",t})(),Mc=(()=>{class t{constructor(){this.ripple=!1,this.filterMatchModeOptions={text:[xt.STARTS_WITH,xt.CONTAINS,xt.NOT_CONTAINS,xt.ENDS_WITH,xt.EQUALS,xt.NOT_EQUALS],numeric:[xt.EQUALS,xt.NOT_EQUALS,xt.LESS_THAN,xt.LESS_THAN_OR_EQUAL_TO,xt.GREATER_THAN,xt.GREATER_THAN_OR_EQUAL_TO],date:[xt.DATE_IS,xt.DATE_IS_NOT,xt.DATE_BEFORE,xt.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new se,this.translationObserver=this.translationSource.asObservable()}getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=V(V({},this.translation),e),this.translationSource.next(this.translation)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Sn=(()=>{class t{}return t.STARTS_WITH="startsWith",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.ENDS_WITH="endsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.NO_FILTER="noFilter",t.LT="lt",t.LTE="lte",t.GT="gt",t.GTE="gte",t.IS="is",t.IS_NOT="isNot",t.BEFORE="before",t.AFTER="after",t.CLEAR="clear",t.APPLY="apply",t.MATCH_ALL="matchAll",t.MATCH_ANY="matchAny",t.ADD_RULE="addRule",t.REMOVE_RULE="removeRule",t.ACCEPT="accept",t.REJECT="reject",t.CHOOSE="choose",t.UPLOAD="upload",t.CANCEL="cancel",t.DAY_NAMES="dayNames",t.DAY_NAMES_SHORT="dayNamesShort",t.DAY_NAMES_MIN="dayNamesMin",t.MONTH_NAMES="monthNames",t.MONTH_NAMES_SHORT="monthNamesShort",t.FIRST_DAY_OF_WEEK="firstDayOfWeek",t.TODAY="today",t.WEEK_HEADER="weekHeader",t.WEAK="weak",t.MEDIUM="medium",t.STRONG="strong",t.PASSWORD_PROMPT="passwordPrompt",t.EMPTY_MESSAGE="emptyMessage",t.EMPTY_FILTER_MESSAGE="emptyFilterMessage",t})(),LC=(()=>{class t{constructor(){this.filters={startsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=B.removeAccents(i.toString()).toLocaleLowerCase(r);return B.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=B.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==B.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=B.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===B.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=B.removeAccents(i.toString()).toLocaleLowerCase(r),s=B.removeAccents(e.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(e,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():B.removeAccents(e.toString()).toLocaleLowerCase(r)==B.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(e,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():B.removeAccents(e.toString()).toLocaleLowerCase(r)==B.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(e,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=e&&(e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1]),lt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i),gt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>i.getTime():e>i),gte:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i),is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>null==i||null!=e&&e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>null==i||null!=e&&e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>null==i||null!=e&&e.getTime()null==i||null!=e&&e.getTime()>i.getTime()}}filter(e,i,r,o,s){let a=[];if(e)for(let l of e)for(let c of i){let u=B.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(e,i){this.filters[e]=i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),df=(()=>{class t{constructor(){this.clickSource=new se,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),VC=(()=>{class t{}return t.AND="and",t.OR="or",t})(),Io=(()=>{class t{constructor(e){this.template=e}getType(){return this.name}}return t.\u0275fac=function(e){return new(e||t)(y(Le))},t.\u0275dir=O({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),t})(),Bi=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),Nc=(()=>{class t{constructor(e,i,r){this.el=e,this.zone=i,this.config=r}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(e){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(E.removeClass(i,"p-ink-active"),!E.getHeight(i)&&!E.getWidth(i)){let a=Math.max(E.getOuterWidth(this.el.nativeElement),E.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=E.getOffset(this.el.nativeElement),o=e.pageX-r.left+document.body.scrollTop-E.getWidth(i)/2,s=e.pageY-r.top+document.body.scrollLeft-E.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",E.addClass(i,"p-ink-active")}getInk(){for(let e=0;e{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})(),oa=(()=>{class t{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1}ngAfterViewInit(){this._initialStyleClass=this.el.nativeElement.className,E.addMultipleClasses(this.el.nativeElement,this.getStyleClass()),(this.icon||this.loading)&&this.createIconEl();let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",this.label?e.appendChild(document.createTextNode(this.label)):e.innerHTML=" ",this.el.nativeElement.appendChild(e),this.initialized=!0}getStyleClass(){let e="p-button p-component";return this.icon&&!this.label&&(e+=" p-button-icon-only"),this.loading&&(e+=" p-disabled p-button-loading",!this.icon&&this.label&&(e+=" p-button-loading-label-only")),e}setStyleClass(){let e=this.getStyleClass();this.el.nativeElement.className=e+" "+this._initialStyleClass}createIconEl(){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&E.addClass(e,i);let r=this.getIconClass();r&&E.addMultipleClasses(e,r);let o=E.findSingle(this.el.nativeElement,".p-button-label");o?this.el.nativeElement.insertBefore(e,o):this.el.nativeElement.appendChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}setIconClass(){let e=E.findSingle(this.el.nativeElement,".p-button-icon");e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIconEl()}removeIconElement(){let e=E.findSingle(this.el.nativeElement,".p-button-icon");this.el.nativeElement.removeChild(e)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(E.findSingle(this.el.nativeElement,".p-button-label").textContent=this._label||" ",(this.loading||this.icon)&&this.setIconClass(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.setIconClass(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.loading||this.icon?this.setIconClass():this.removeIconElement(),this.setStyleClass())}ngOnDestroy(){this.initialized=!1}}return t.\u0275fac=function(e){return new(e||t)(y(ge))},t.\u0275dir=O({type:t,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),t})(),sa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,Mo]]}),t})(),FB=(()=>{class t{constructor(e){this.router=e}ngOnInit(){this.items=[{label:"Home",icon:"pi pi-fw pi-home",url:"/"},{label:"Endpoints",icon:"pi pi-fw pi-link",url:"endpoints"},{label:"Auth Rules",icon:"pi pi-fw pi-directions",url:"rules"}]}logoutRedirect(){this.router.navigate(["logout"])}}return t.\u0275fac=function(e){return new(e||t)(y(it))},t.\u0275cmp=xe({type:t,selectors:[["app-menu"]],decls:12,vars:0,consts:[[1,"navbar","navbar-expand-sm","navbar-light","bg-light"],["href","#",1,"navbar-brand"],["src","assets/images/minos_color@2x.png","height","30","alt","logo"],[1,"navbar-nav","mr-auto"],[1,"nav-item"],["routerLink","/endpoints",1,"nav-link"],["routerLink","/rules",1,"nav-link"],[1,"navbar-text"],["type","button","pButton","","label","Logout","icon","pi pi-power-off","routerLink","/logout",1,"my-2","my-sm-0",2,"margin-left",".25em"]],template:function(e,i){1&e&&(f(0,"nav",0),f(1,"a",1),z(2,"img",2),g(),f(3,"ul",3),f(4,"li",4),f(5,"a",5),I(6,"Endpoints"),g(),g(),f(7,"li",4),f(8,"a",6),I(9,"Auth Rules"),g(),g(),g(),f(10,"span",7),z(11,"button",8),g(),g())},directives:[nf,fc,oa,pc],styles:[""]}),t})();function PB(t,n){1&t&&(le(0),z(1,"app-menu"),ce())}let LB=(()=>{class t{constructor(e,i){this.router=e,this.authenticationService=i,this.authenticationService.currentUser.subscribe(r=>this.currentUser=r)}}return t.\u0275fac=function(e){return new(e||t)(y(it),y(To))},t.\u0275cmp=xe({type:t,selectors:[["app-root"]],decls:4,vars:1,consts:[[4,"ngIf"],[1,"container-fluid"]],template:function(e,i){1&e&&(w(0,PB,2,0,"ng-container",0),f(1,"div",1),z(2,"alert"),z(3,"router-outlet"),g()),2&e&&_("ngIf",i.currentUser)},directives:[nt,$2,Pp,FB],styles:[""]}),t})(),BC=(()=>{class t{constructor(e,i,r){this.el=e,this.ngModel=i,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(e){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(jl,8),y(ct))},t.\u0275dir=O({type:t,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(e,i){1&e&&k("input",function(o){return i.onInput(o)}),2&e&&Me("p-filled",i.filled)}}),t})(),hf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})();function VB(t,n){if(1&t&&(le(0),f(1,"div",16),f(2,"span",17),I(3),g(),g(),ce()),2&t){const e=m().message;v(3),mt(" ",e," ")}}function BB(t,n){if(1&t&&w(0,VB,4,1,"ng-container",15),2&t){const e=n.control,i=n.validation;_("ngIf",e&&e.hasError(i)&&(e.dirty||e.touched))}}function HB(t,n){1&t&&z(0,"span",18)}const HC=function(t){return{"is-invalid":t}},UC=function(t){return{validation:"required",message:"Password is required",control:t}};let UB=(()=>{class t{constructor(e,i,r,o,s){this.formBuilder=e,this.route=i,this.router=r,this.authenticationService=o,this.alertService=s,this.loading=!1,this.submitted=!1,this.authenticationService.currentUserValue&&this.router.navigate(["/"])}ngOnInit(){this.loginForm=this.formBuilder.group({username:["",Xt.required],password:["",Xt.required]}),this.returnUrl=this.route.snapshot.queryParams.returnUrl||"/"}get f(){return this.loginForm.controls}onSubmit(){this.submitted=!0,this.alertService.clear(),!this.loginForm.invalid&&(this.loading=!0,this.authenticationService.login(this.f.username.value,this.f.password.value).pipe(gi()).subscribe(e=>{this.router.navigate([this.returnUrl])},e=>{this.alertService.error(e),this.loading=!1}))}}return t.\u0275fac=function(e){return new(e||t)(y(mp),y(cr),y(it),y(To),y(Ow))},t.\u0275cmp=xe({type:t,selectors:[["ng-component"]],decls:25,vars:17,consts:[[1,"card"],[1,"flex","justify-content-center","flex-wrap","card-container","blue-container","text-center"],[1,"grid","p-fluid"],[3,"formGroup","ngSubmit"],[1,"col-12"],[1,"p-inputgroup"],[1,"p-inputgroup-addon"],[1,"pi","pi-user"],["type","text","pInputText","","placeholder","Username","formControlName","username",1,"form-control",3,"ngClass"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","password","pInputText","","placeholder","Password","formControlName","password",1,"form-control",3,"ngClass"],["formError",""],[1,"form-group"],["pButton","",1,"btn","btn-primary",3,"disabled"],["class","spinner-border spinner-border-sm mr-1",4,"ngIf"],[4,"ngIf"],[1,"fv-plugins-message-container"],["role","alert"],[1,"spinner-border","spinner-border-sm","mr-1"]],template:function(e,i){if(1&e&&(f(0,"div",0),f(1,"div",1),f(2,"h2"),I(3,"Login"),g(),g(),f(4,"div",1),f(5,"div",2),f(6,"form",3),k("ngSubmit",function(){return i.onSubmit()}),f(7,"div",4),f(8,"div",5),f(9,"span",6),z(10,"i",7),g(),z(11,"input",8),W(12,9),g(),g(),f(13,"div",4),f(14,"div",5),f(15,"span",6),I(16,"$"),g(),z(17,"input",10),W(18,9),g(),g(),w(19,BB,1,1,"ng-template",null,11,Rt),f(21,"div",12),f(22,"button",13),w(23,HB,1,0,"span",14),I(24," Login "),g(),g(),g(),g(),g(),g()),2&e){const r=We(20);v(6),_("formGroup",i.loginForm),v(5),_("ngClass",q(9,HC,i.submitted&&i.loginForm.controls.username.invalid)),v(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",q(11,UC,i.loginForm.controls.username)),v(5),_("ngClass",q(13,HC,i.submitted&&i.loginForm.controls.password.invalid)),v(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",q(15,UC,i.loginForm.controls.password)),v(4),_("disabled",i.loading),v(1),_("ngIf",i.loading)}},directives:[$l,Al,bo,mo,BC,ks,Ls,dn,$t,oa,nt],encapsulation:2}),t})(),jC=(()=>{class t{constructor(e,i){this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentUserValue||(this.router.navigate(["/login"],{queryParams:{returnUrl:i.url}}),!1)}}return t.\u0275fac=function(e){return new(e||t)(R(it),R(To))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),jB=(()=>{class t{constructor(e,i){this.router=e,this.authenticationService=i,this.authenticationService.currentUser.subscribe(r=>this.currentUser=r)}ngOnInit(){this.authenticationService.logout(),this.router.navigate(["/login"]),window.location.replace("/login")}}return t.\u0275fac=function(e){return new(e||t)(y(it),y(To))},t.\u0275cmp=xe({type:t,selectors:[["app-logout"]],decls:2,vars:0,template:function(e,i){1&e&&(f(0,"p"),I(1,"logout works!"),g())},styles:[""]}),t})();class $C{setRule(n){const e=n;this.service=e.service||"",this.rule=e.rule||"",this.methods=e.methods||[]}}function GC(t,n){const e=J(t)?t:()=>t,i=r=>r.error(e());return new we(n?r=>n.schedule(i,0,r):i)}const kc=`${gc_apiUrl}/admin/rules`;let pf=(()=>{class t{constructor(e){this.http=e}getRules(){return this.http.get(`${kc}`).pipe(ie(e=>(e=e.map(i=>i))||[]))}addRule(e){return this.http.post(`${kc}`,e).pipe(ie(i=>i||{}),Ln(this.handleError))}deleteRule(e){return this.http.delete(`${kc}/${e}`).pipe()}updateRule(e,i){return this.http.patch(`${kc}/${i}`,e).pipe(ie(r=>r||{}),Ln(this.handleError))}handleError(e){let i="";return i=e.error instanceof ErrorEvent?e.error.message:`Error Code: ${e.status}\nMessage: ${e.message}`,GC(i)}}return t.\u0275fac=function(e){return new(e||t)(R(Yl))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function $B(t,n){1&t&&(le(0),f(1,"div",26),f(2,"div",27),I(3," Rule details are incorrect "),g(),g(),ce())}const Rc=function(t,n){return{"is-invalid":t,"is-valid":n}},GB=function(t){return{validation:"required",message:"service is required",control:t}};function zB(t,n){if(1&t&&(le(0),z(1,"input",28),f(2,"small",29),I(3,"'*' means all endpoints"),g(),W(4,10),ce()),2&t){const e=m(),i=We(50);v(1),_("ngClass",He(3,Rc,e.ruleForm.controls.service.invalid,e.ruleForm.controls.service.valid)),v(3),_("ngTemplateOutlet",i)("ngTemplateOutletContext",q(6,GB,e.ruleForm.controls.service))}}const WB=function(t){return{validation:"required",message:"Service is required",control:t}};function KB(t,n){if(1&t&&(le(0),f(1,"select",30),f(2,"option",31),I(3),g(),f(4,"option",14),I(5,"ALL"),g(),g(),W(6,10),ce()),2&t){const e=m(),i=We(50);v(1),_("ngClass",He(5,Rc,e.ruleForm.controls.service.invalid,e.ruleForm.controls.service.valid)),v(1),_("ngValue",e.name),v(1),Se(e.name),v(3),_("ngTemplateOutlet",i)("ngTemplateOutletContext",q(8,WB,e.ruleForm.controls.service))}}function YB(t,n){if(1&t&&(le(0),f(1,"div",32),f(2,"span",33),I(3),g(),g(),ce()),2&t){const e=m().message;v(3),mt(" ",e," ")}}function qB(t,n){if(1&t&&w(0,YB,4,1,"ng-container",6),2&t){const e=n.control,i=n.validation;_("ngIf",e&&e.hasError(i)&&(e.dirty||e.touched))}}const ZB=function(t){return{validation:"required",message:"rule is required",control:t}},JB=function(t){return{validation:"required",message:"Method is required",control:t}};let QB=(()=>{class t{constructor(e,i,r,o){this.fb=e,this.activeModal=i,this.ruleService=r,this.router=o,this.unsubscribe=[],this.codeExample="\n := ://\n := '*' | 'http' | 'https'\n := '*' | '*.' +\n := '/' "}ngOnInit(){this.initForm()}get f(){return this.ruleForm.controls}initForm(){let e=`${this.name}s`;"*"==this.name?e=this.name:this.name=e,this.ruleForm=this.fb.group({service:[e,Xt.compose([Xt.required])],rule:[`*://*/${e}/*`,Xt.compose([Xt.required])],methods:[["*"],Xt.compose([Xt.required])]})}submit(){this.hasError=!1;const e={};Object.keys(this.f).forEach(o=>{e[o]=this.f[o].value});const i=new $C;i.setRule(e);const r=this.ruleService.addRule(i).pipe(gi()).subscribe(o=>{console.log(o)},o=>{this.hasError=!0,this.errorMessage=o},()=>{this.activeModal.close(),this.router.navigate(["/rules"])});this.unsubscribe.push(r)}ngOnDestroy(){this.unsubscribe.forEach(e=>e.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(y(mp),y(ia),y(pf),y(it))},t.\u0275cmp=xe({type:t,selectors:[["app-rule-add"]],inputs:{name:"name"},decls:51,vars:22,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["novalidate","novalidate","id","kt_login_signin_form",1,"form","w-100",3,"formGroup","ngSubmit"],[4,"ngIf"],[1,"fv-row","mb-3"],[1,"form-label","fs-6","fw-bolder","text-dark"],["type","text","name","rule","formControlName","rule","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["role","alert",1,"alert","alert-success"],[1,"alert-heading"],["formControlName","methods","multiple","",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",2,"height","210px",3,"ngClass"],["value","*"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["value","HEAD"],["value","OPTIONS"],[1,"text-center"],["type","submit","id","kt_sign_up_submit",1,"btn","btn-lg","btn-primary","w-100","mb-5",3,"disabled"],[1,"indicator-label"],["formError",""],[1,"mb-lg-15","alert","alert-danger"],[1,"alert-text","font-weight-bold"],["type","text","name","service","formControlName","service","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["id","emailHelp",1,"form-text","text-muted"],["formControlName","service",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",3,"ngClass"],["selected","selected",3,"ngValue"],[1,"fv-plugins-message-container"],["role","alert"]],template:function(e,i){if(1&e&&(f(0,"div",0),f(1,"h4",1),I(2,"New Rule"),g(),f(3,"button",2),k("click",function(){return i.activeModal.dismiss("close")}),f(4,"span",3),I(5,"\xd7"),g(),g(),g(),f(6,"div",4),f(7,"form",5),k("ngSubmit",function(){return i.submit()}),w(8,$B,4,0,"ng-container",6),f(9,"div",7),f(10,"label",8),I(11,"Service name"),g(),w(12,zB,5,8,"ng-container",6),w(13,KB,7,10,"ng-container",6),g(),f(14,"div",7),f(15,"label",8),I(16,"Rule"),g(),z(17,"input",9),W(18,10),g(),f(19,"div",11),f(20,"h4",12),I(21,"How to correctly define routes!"),g(),f(22,"pre"),I(23),g(),g(),f(24,"div",7),f(25,"label",8),I(26,"Methods"),g(),f(27,"select",13),f(28,"option",14),I(29,"ALL"),g(),f(30,"option",15),I(31,"GET"),g(),f(32,"option",16),I(33,"POST"),g(),f(34,"option",17),I(35,"PUT"),g(),f(36,"option",18),I(37,"OPTIONS"),g(),f(38,"option",19),I(39,"DELETE"),g(),f(40,"option",20),I(41,"HEAD"),g(),f(42,"option",21),I(43,"OPTIONS"),g(),g(),W(44,10),g(),f(45,"div",22),f(46,"button",23),f(47,"span",24),I(48,"Submit"),g(),g(),g(),g(),w(49,qB,1,1,"ng-template",null,25,Rt),g()),2&e){const r=We(50);v(7),_("formGroup",i.ruleForm),v(1),_("ngIf",i.hasError),v(4),_("ngIf","*"==i.name),v(1),_("ngIf","*"!=i.name),v(4),_("ngClass",He(12,Rc,i.ruleForm.controls.rule.invalid,i.ruleForm.controls.rule.valid)),v(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",q(15,ZB,i.ruleForm.controls.rule)),v(5),mt(" ",i.codeExample,"\n "),v(4),_("ngClass",He(17,Rc,i.ruleForm.controls.methods.invalid,i.ruleForm.controls.methods.valid)),v(17),_("ngTemplateOutlet",r)("ngTemplateOutletContext",q(20,JB,i.ruleForm.controls.methods)),v(2),_("disabled",i.ruleForm.invalid)}},directives:[$l,Al,bo,nt,mo,ks,Ls,dn,$t,Vs,pp,fp,Gl],styles:[""]}),t})();const XB=`${gc_apiUrl}/admin/endpoints`;let e3=(()=>{class t{constructor(e){this.http=e}getEndpoints(){return this.http.get(`${XB}`).pipe(ie(e=>(e=e.map(i=>i))||[]))}}return t.\u0275fac=function(e){return new(e||t)(R(Yl))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Oc(t,n=0){return function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):n}const aa={schedule(t){let n=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:i}=aa;i&&(n=i.requestAnimationFrame,e=i.cancelAnimationFrame);const r=n(o=>{e=void 0,t(o)});return new Ft(()=>null==e?void 0:e(r))},requestAnimationFrame(...t){const{delegate:n}=aa;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){const{delegate:n}=aa;return((null==n?void 0:n.cancelAnimationFrame)||cancelAnimationFrame)(...t)},delegate:void 0},a3=new class extends Wp{flush(n){this._active=!0,this._scheduled=void 0;const{actions:e}=this;let i,r=-1;n=n||e.shift();const o=e.length;do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n._scheduled||(n._scheduled=aa.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,e,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(aa.cancelAnimationFrame(e),n._scheduled=void 0)}});let ff,l3=1;const Ac={};function zC(t){return t in Ac&&(delete Ac[t],!0)}const c3={setImmediate(t){const n=l3++;return Ac[n]=!0,ff||(ff=Promise.resolve()),ff.then(()=>zC(n)&&t()),n},clearImmediate(t){zC(t)}},{setImmediate:u3,clearImmediate:d3}=c3,Fc={setImmediate(...t){const{delegate:n}=Fc;return((null==n?void 0:n.setImmediate)||u3)(...t)},clearImmediate(t){const{delegate:n}=Fc;return((null==n?void 0:n.clearImmediate)||d3)(t)},delegate:void 0},f3=new class extends Wp{flush(n){this._active=!0,this._scheduled=void 0;const{actions:e}=this;let i,r=-1;n=n||e.shift();const o=e.length;do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n._scheduled||(n._scheduled=Fc.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,e,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(Fc.clearImmediate(e),n._scheduled=void 0)}});function WC(t){return!!t&&(t instanceof we||J(t.lift)&&J(t.subscribe))}function gf(t,n=Pw){return function(t){return je((n,e)=>{let i=!1,r=null,o=null,s=!1;const a=()=>{if(null==o||o.unsubscribe(),o=null,i){i=!1;const c=r;r=null,e.next(c)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};n.subscribe(new Te(e,c=>{i=!0,r=c,o||Dt(t()).subscribe(o=new Te(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}(()=>_c(t,n))}class _3 extends se{constructor(n=1/0,e=1/0,i=zp){super(),this._bufferSize=n,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,e)}next(n){const{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;e||(i.push(n),!r&&i.push(o.now()+s)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();const e=this._innerSubscribe(n),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s{class t{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function(t){return t===e0}(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&&!mf)&&"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 t.\u0275fac=function(e){return new(e||t)(R(uo))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),b3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})();function ca(){if("object"!=typeof document||!document)return 0;if(null==Pc){const t=document.createElement("div"),n=t.style;t.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";const e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",t.appendChild(e),document.body.appendChild(t),Pc=0,0===t.scrollLeft&&(t.scrollLeft=1,Pc=0===t.scrollLeft?1:2),t.remove()}return Pc}const D3=new Q("cdk-dir-doc",{providedIn:"root",factory:function(){return wT(et)}}),T3=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let qC=(()=>{class t{constructor(e){if(this.value="ltr",this.change=new N,e){const r=e.documentElement?e.documentElement.dir:null;this.value=function(t){const n=(null==t?void 0:t.toLowerCase())||"";return"auto"===n&&"undefined"!=typeof navigator&&(null==navigator?void 0:navigator.language)?T3.test(navigator.language)?"rtl":"ltr":"rtl"===n?"rtl":"ltr"}((e.body?e.body.dir:null)||r||"ltr")}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(R(D3,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})();class M3 extends class{}{constructor(n){super(),this._data=n}connect(){return WC(this._data)?this._data:K(this._data)}disconnect(){}}class N3{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(n,e,i,r,o){n.forEachOperation((s,a,l)=>{let c,u;null==s.previousIndex?(c=this._insertView(()=>i(s,a,l),l,e,r(s)),u=c?1:0):null==l?(this._detachAndCacheView(a,e),u=3):(c=this._moveView(a,l,e,r(s)),u=2),o&&o({context:null==c?void 0:c.context,operation:u,record:s})})}detach(){for(const n of this._viewCache)n.destroy();this._viewCache=[]}_insertView(n,e,i,r){const o=this._insertViewFromCache(e,i);if(o)return void(o.context.$implicit=r);const s=n();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(n,e){const i=e.detach(n);this._maybeCacheView(i,e)}_moveView(n,e,i,r){const o=i.get(n);return i.move(o,e),o.context.$implicit=r,o}_maybeCacheView(n,e){if(this._viewCache.length{let r,o=!0;e.subscribe(new Te(i,s=>{const a=n(s);(o||!t(r,a))&&(o=!1,r=a,i.next(s))}))})}()),this._viewport=null,this._itemSize=n,this._minBufferPx=e,this._maxBufferPx=i}attach(n){this._viewport=n,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(n,e,i){this._itemSize=n,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(n,e){this._viewport&&this._viewport.scrollToOffset(n*this._itemSize,e)}_updateTotalContentSize(){!this._viewport||this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;const n=this._viewport.getRenderedRange(),e={start:n.start,end:n.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength();let o=this._viewport.measureScrollOffset(),s=this._itemSize>0?o/this._itemSize:0;if(e.end>r){const l=Math.ceil(i/this._itemSize),c=Math.max(0,Math.min(s,r-l));s!=c&&(s=c,o=c*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(r,e.start+l))}const a=o-e.start*this._itemSize;if(a0&&(e.end=Math.min(r,e.end+c),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(s))}}function A3(t){return t._scrollStrategy}let XC=(()=>{class t{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new O3(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=Oc(e)}get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=Oc(e)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=Oc(e)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=O({type:t,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[_e([{provide:QC,useFactory:A3,deps:[pe(()=>t)]}]),Qe]}),t})(),eD=(()=>{class t{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new se,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 we(i=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(gf(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):K()}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(zt(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){const i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=function(t){return t instanceof ge?t.nativeElement:t}(i),o=e.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Et(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(R(be),R(KC),R(et,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),tD=(()=>{class t{constructor(e,i,r,o){this.elementRef=e,this.scrollDispatcher=i,this.ngZone=r,this.dir=o,this._destroyed=new se,this._elementScrolled=new we(s=>this.ngZone.runOutsideAngular(()=>Et(this.elementRef.nativeElement,"scroll").pipe(Ye(this._destroyed)).subscribe(s)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){const i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=r?e.end:e.start),null==e.right&&(e.right=r?e.start:e.end),null!=e.bottom&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&0!=ca()?(null!=e.left&&(e.right=i.scrollWidth-i.clientWidth-e.left),2==ca()?e.left=e.right:1==ca()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){const i=this.elementRef.nativeElement;!function(){if(null==_r){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return _r=!1,_r;if("scrollBehavior"in document.documentElement.style)_r=!0;else{const t=Element.prototype.scrollTo;_r=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return _r}()?(null!=e.top&&(i.scrollTop=e.top),null!=e.left&&(i.scrollLeft=e.left)):i.scrollTo(e)}measureScrollOffset(e){const i="left",r="right",o=this.elementRef.nativeElement;if("top"==e)return o.scrollTop;if("bottom"==e)return o.scrollHeight-o.clientHeight-o.scrollTop;const s=this.dir&&"rtl"==this.dir.value;return"start"==e?e=s?r:i:"end"==e&&(e=s?i:r),s&&2==ca()?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&1==ca()?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(eD),y(be),y(qC,8))},t.\u0275dir=O({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t})(),L3=(()=>{class t{constructor(e,i,r){this._platform=e,this._change=new se,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.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,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(gf(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 t.\u0275fac=function(e){return new(e||t)(R(KC),R(be),R(et,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const B3="undefined"!=typeof requestAnimationFrame?a3:f3;let ua=(()=>{class t extends tD{constructor(e,i,r,o,s,a,l){super(e,a,r,s),this.elementRef=e,this._changeDetectorRef=i,this._scrollStrategy=o,this._detachedSubject=new se,this._renderedRangeSubject=new se,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new we(c=>this._scrollStrategy.scrolledIndexChange.subscribe(u=>Promise.resolve().then(()=>this.ngZone.run(()=>c.next(u))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=Ft.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()})}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=function(t){return null!=t&&"false"!=`${t}`}(e)}ngOnInit(){super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.elementScrolled().pipe(wo(null),gf(0,B3)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()}))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(Ye(this._detachedSubject)).subscribe(i=>{const r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){(function(t,n){return t.start==n.start&&t.end==n.end})(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,i="to-start"){const o="horizontal"==this.orientation,s=o?"X":"Y";let l=`translate${s}(${Number((o&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===i&&(l+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){const r={behavior:i};"horizontal"===this.orientation?r.start=e:r.top=e,this.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){return super.measureScrollOffset(e||("horizontal"===this.orientation?"start":"top"))}measureRenderedContentSize(){const e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){const e=this.elementRef.nativeElement;this._viewportSize="horizontal"===this.orientation?e.clientWidth:e.clientHeight}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const i of e)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(ct),y(be),y(QC,8),y(qC,8),y(eD),y(L3))},t.\u0275cmp=xe({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(1&e&&Xe(k3,7),2&e){let r;ee(r=te())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){2&e&&Me("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[_e([{provide:tD,useExisting:t}]),Ie],ngContentSelectors:R3,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){1&e&&(nl(),f(0,"div",0,1),ds(2),g(),z(3,"div",2)),2&e&&(v(3),Xi("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"],encapsulation:2,changeDetection:0}),t})();function nD(t,n,e){if(!e.getBoundingClientRect)return 0;const r=e.getBoundingClientRect();return"horizontal"===t?"start"===n?r.left:r.right:"start"===n?r.top:r.bottom}let iD=(()=>{class t{constructor(e,i,r,o,s,a){this._viewContainerRef=e,this._template=i,this._differs=r,this._viewRepeater=o,this._viewport=s,this.viewChange=new se,this._dataSourceChanges=new se,this.dataStream=this._dataSourceChanges.pipe(wo(null),je((t,n)=>{let e,i=!1;t.subscribe(new Te(n,r=>{const o=e;e=r,i&&n.next([o,r]),i=!0}))}),Jn(([l,c])=>this._changeDataSource(l,c)),function(t,n,e){let o,s=!1;return o=1,ig({connector:()=>new _3(o,n,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}()),this._differ=null,this._needsUpdate=!1,this._destroyed=new se,this.dataStream.subscribe(l=>{this._data=l,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(Ye(this._destroyed)).subscribe(l=>{this._renderedRange=l,a.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,function(t){return t&&"function"==typeof t.connect}(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new M3(WC(e)?e:Array.from(e||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(i,r)=>e(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=Oc(e)}measureRangeSize(e,i){if(e.start>=e.end)return 0;const r=e.start-this._renderedRange.start,o=e.end-e.start;let s,a;for(let l=0;l-1;l--){const c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){a=c.rootNodes[c.rootNodes.length-1];break}}return s&&a?nD(i,"end",a)-nD(i,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){const e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){!this._renderedRange||(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,i):i)),this._needsUpdate=!0)}_changeDataSource(e,i){return e&&e.disconnect(this),this._needsUpdate=!0,i?i.connect(this):K()}_updateContext(){const e=this._data.length;let i=this._viewContainerRef.length;for(;i--;){const r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=e,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(o,s,a)=>this._getEmbeddedViewArgs(o,a),o=>o.item),e.forEachIdentityChange(o=>{this._viewContainerRef.get(o.currentIndex).context.$implicit=o.item});const i=this._data.length;let r=this._viewContainerRef.length;for(;r--;){const o=this._viewContainerRef.get(r);o.context.index=this._renderedRange.start+r,o.context.count=i,this._updateComputedContextProperties(o.context)}}_updateComputedContextProperties(e){e.first=0===e.index,e.last=e.index===e.count-1,e.even=e.index%2==0,e.odd=!e.even}_getEmbeddedViewArgs(e,i){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}}return t.\u0275fac=function(e){return new(e||t)(y(bn),y(Le),y(po),y(JC),y(ua,4),y(be))},t.\u0275dir=O({type:t,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[_e([{provide:JC,useClass:N3}])]}),t})(),rD=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({}),t})(),Lc=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[ZC,b3,rD],ZC,rD]}),t})();function oD(t,n){return{type:7,name:t,definitions:n,options:{}}}function ko(t,n=null){return{type:4,styles:n,timings:t}}function Hi(t){return{type:6,styles:t,offset:null}}function H3(t,n,e){return{type:0,name:t,styles:n,options:e}}function Ro(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}let U3=(()=>{class t{constructor(e,i,r){this.el=e,this.zone=i,this.config=r,this.escape=!0,this._tooltipOptions={tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",tooltipZIndex:"auto",escape:!1,positionTop:0,positionLeft:0}}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{"hover"===this.getOption("tooltipEvent")?(this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.addEventListener("click",this.clickListener)):"focus"===this.getOption("tooltipEvent")&&(this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this),this.el.nativeElement.addEventListener("focus",this.focusListener),this.el.nativeElement.addEventListener("blur",this.blurListener))})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.text&&(this.setOption({tooltipLabel:e.text.currentValue}),this.active&&(e.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.tooltipOptions&&(this._tooltipOptions=V(V({},this._tooltipOptions),e.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onClick(e){this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div");let e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),"body"===this.getOption("appendTo")?document.body.appendChild(this.container):"target"===this.getOption("appendTo")?E.appendChild(this.container,this.el.nativeElement):E.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block"}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),E.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?ti.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&&ti.clear(this.container),this.remove()}updateText(){this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(this.getOption("tooltipLabel")))):this.tooltipText.innerHTML=this.getOption("tooltipLabel")}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()))}}getHostOffset(){if("body"===this.getOption("appendTo")||"target"===this.getOption("appendTo")){let e=this.el.nativeElement.getBoundingClientRect();return{left:e.left+E.getWindowScrollLeft(),top:e.top+E.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),i=e.left+E.getOuterWidth(this.el.nativeElement),r=e.top+(E.getOuterHeight(this.el.nativeElement)-E.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let e=this.getHostOffset(),i=e.left-E.getOuterWidth(this.container),r=e.top+(E.getOuterHeight(this.el.nativeElement)-E.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let e=this.getHostOffset(),i=e.left+(E.getOuterWidth(this.el.nativeElement)-E.getOuterWidth(this.container))/2,r=e.top-E.getOuterHeight(this.container);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let e=this.getHostOffset(),i=e.left+(E.getOuterWidth(this.el.nativeElement)-E.getOuterWidth(this.container))/2,r=e.top+E.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=V(V({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let e=this.container.getBoundingClientRect(),i=e.top,r=e.left,o=E.getOuterWidth(this.container),s=E.getOuterHeight(this.container),a=E.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new cf(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){"hover"===this.getOption("tooltipEvent")?(this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener)):"focus"===this.getOption("tooltipEvent")&&(this.el.nativeElement.removeEventListener("focus",this.focusListener),this.el.nativeElement.removeEventListener("blur",this.blurListener)),this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&("body"===this.getOption("appendTo")?document.body.removeChild(this.container):"target"===this.getOption("appendTo")?this.el.nativeElement.removeChild(this.container):E.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&ti.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(be),y(Mc))},t.\u0275dir=O({type:t,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",text:["pTooltip","text"],disabled:["tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[Qe]}),t})(),vf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})();function j3(t,n){if(1&t&&(f(0,"span"),I(1),g()),2&t){const e=m();v(1),Se(e.label||"empty")}}function $3(t,n){1&t&&W(0)}const aD=function(t){return{height:t}},G3=function(t,n){return{"p-dropdown-item":!0,"p-highlight":t,"p-disabled":n}},bf=function(t){return{$implicit:t}},z3=["container"],W3=["filter"],K3=["in"],Y3=["editableInput"];function q3(t,n){if(1&t&&(le(0),I(1),ce()),2&t){const e=m(2);v(1),Se(e.label||"empty")}}function Z3(t,n){1&t&&W(0)}const J3=function(t){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":t}};function Q3(t,n){if(1&t&&(f(0,"span",12),w(1,q3,2,1,"ng-container",13),w(2,Z3,1,0,"ng-container",14),g()),2&t){const e=m();_("ngClass",q(9,J3,null==e.label||0===e.label.length))("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),X("id",e.labelId),v(1),_("ngIf",!e.selectedItemTemplate),v(1),_("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",q(11,bf,e.selectedOption))}}const X3=function(t){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":t}};function eH(t,n){if(1&t&&(f(0,"span",15),I(1),g()),2&t){const e=m();_("ngClass",q(2,X3,null==e.placeholder||0===e.placeholder.length)),v(1),Se(e.placeholder||"empty")}}function tH(t,n){if(1&t){const e=j();f(0,"input",16,17),k("click",function(){return T(e),m().onEditableInputClick()})("input",function(r){return T(e),m().onEditableInputChange(r)})("focus",function(r){return T(e),m().onEditableInputFocus(r)})("blur",function(r){return T(e),m().onInputBlur(r)}),g()}if(2&t){const e=m();_("disabled",e.disabled),X("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function nH(t,n){if(1&t){const e=j();f(0,"i",18),k("click",function(r){return T(e),m().clear(r)}),g()}}function iH(t,n){1&t&&W(0)}function rH(t,n){if(1&t){const e=j();f(0,"div",26),f(1,"div",27),k("click",function(r){return r.stopPropagation()}),f(2,"input",28,29),k("keydown.enter",function(r){return r.preventDefault()})("keydown",function(r){return T(e),m(2).onKeydown(r,!1)})("input",function(r){return T(e),m(2).onFilterInputChange(r)}),g(),z(4,"span",30),g(),g()}if(2&t){const e=m(2);v(2),_("value",e.filterValue||""),X("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.overlayVisible?"p-highlighted-option":e.labelId)}}function oH(t,n){if(1&t&&(f(0,"span"),I(1),g()),2&t){const e=m().$implicit,i=m(3);v(1),Se(i.getOptionGroupLabel(e)||"empty")}}function sH(t,n){1&t&&W(0)}function aH(t,n){1&t&&W(0)}const lD=function(t,n){return{$implicit:t,selectedOption:n}};function lH(t,n){if(1&t&&(f(0,"li",32),w(1,oH,2,1,"span",13),w(2,sH,1,0,"ng-container",14),g(),w(3,aH,1,0,"ng-container",14)),2&t){const e=n.$implicit;m(2);const i=We(8),r=m();v(1),_("ngIf",!r.groupTemplate),v(1),_("ngTemplateOutlet",r.groupTemplate)("ngTemplateOutletContext",q(5,bf,e)),v(1),_("ngTemplateOutlet",i)("ngTemplateOutletContext",He(7,lD,r.getOptionGroupChildren(e),r.selectedOption))}}function cH(t,n){if(1&t&&(le(0),w(1,lH,4,10,"ng-template",31),ce()),2&t){const e=m(2);v(1),_("ngForOf",e.optionsToDisplay)}}function uH(t,n){1&t&&W(0)}function dH(t,n){if(1&t&&(le(0),w(1,uH,1,0,"ng-container",14),ce()),2&t){m();const e=We(8),i=m();v(1),_("ngTemplateOutlet",e)("ngTemplateOutletContext",He(2,lD,i.optionsToDisplay,i.selectedOption))}}function hH(t,n){if(1&t){const e=j();f(0,"p-dropdownItem",35),k("onClick",function(r){return T(e),m(4).onItemClick(r)}),g()}if(2&t){const e=n.$implicit,i=m(2).selectedOption,r=m(2);_("option",e)("selected",i==e)("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)}}function pH(t,n){if(1&t&&(le(0),w(1,hH,1,5,"ng-template",31),ce()),2&t){const e=m().$implicit;v(1),_("ngForOf",e)}}function fH(t,n){if(1&t){const e=j();le(0),f(1,"p-dropdownItem",35),k("onClick",function(r){return T(e),m(5).onItemClick(r)}),g(),ce()}if(2&t){const e=n.$implicit,i=m(3).selectedOption,r=m(2);v(1),_("option",e)("selected",i==e)("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)}}function gH(t,n){if(1&t){const e=j();f(0,"cdk-virtual-scroll-viewport",37,38),k("scrolledIndexChange",function(){return T(e),m(4).scrollToSelectedVirtualScrollElement()}),w(2,fH,2,5,"ng-container",39),g()}if(2&t){const e=m(2).$implicit,i=m(2);_("ngStyle",q(3,aD,i.scrollHeight))("itemSize",i.itemSize),v(2),_("cdkVirtualForOf",e)}}function mH(t,n){if(1&t&&w(0,gH,3,5,"cdk-virtual-scroll-viewport",36),2&t){const e=m(3);_("ngIf",e.virtualScroll&&e.optionsToDisplay&&e.optionsToDisplay.length)}}function _H(t,n){if(1&t&&(w(0,pH,2,1,"ng-container",33),w(1,mH,1,1,"ng-template",null,34,Rt)),2&t){const e=We(2);_("ngIf",!m(2).virtualScroll)("ngIfElse",e)}}function vH(t,n){if(1&t&&(le(0),I(1),ce()),2&t){const e=m(3);v(1),mt(" ",e.emptyFilterMessageLabel," ")}}function bH(t,n){1&t&&W(0,null,41)}function yH(t,n){if(1&t&&(f(0,"li",40),w(1,vH,2,1,"ng-container",33),w(2,bH,2,0,"ng-container",20),g()),2&t){const e=m(2);v(1),_("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),v(1),_("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function wH(t,n){if(1&t&&(le(0),I(1),ce()),2&t){const e=m(3);v(1),mt(" ",e.emptyMessageLabel," ")}}function CH(t,n){1&t&&W(0,null,42)}function DH(t,n){if(1&t&&(f(0,"li",40),w(1,wH,2,1,"ng-container",33),w(2,CH,2,0,"ng-container",20),g()),2&t){const e=m(2);v(1),_("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),v(1),_("ngTemplateOutlet",e.emptyTemplate)}}function SH(t,n){1&t&&W(0)}const TH=function(t,n){return{showTransitionParams:t,hideTransitionParams:n}},EH=function(t){return{value:"visible",params:t}},xH=function(t){return{"p-dropdown-virtualscroll":t}};function IH(t,n){if(1&t){const e=j();f(0,"div",19),k("click",function(r){return T(e),m().onOverlayClick(r)})("@overlayAnimation.start",function(r){return T(e),m().onOverlayAnimationStart(r)})("@overlayAnimation.start",function(r){return T(e),m().onOverlayAnimationEnd(r)}),w(1,iH,1,0,"ng-container",20),w(2,rH,5,4,"div",21),f(3,"div",22),f(4,"ul",23),w(5,cH,2,1,"ng-container",13),w(6,dH,2,5,"ng-container",13),w(7,_H,3,2,"ng-template",null,24,Rt),w(9,yH,3,3,"li",25),w(10,DH,3,3,"li",25),g(),g(),w(11,SH,1,0,"ng-container",20),g()}if(2&t){const e=m();Pe(e.panelStyleClass),_("ngClass","p-dropdown-panel p-component")("@overlayAnimation",q(19,EH,He(16,TH,e.showTransitionOptions,e.hideTransitionOptions)))("ngStyle",e.panelStyle),v(1),_("ngTemplateOutlet",e.headerTemplate),v(1),_("ngIf",e.filter),v(1),Xi("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),v(1),_("ngClass",q(21,xH,e.virtualScroll)),X("id",e.listId),v(1),_("ngIf",e.group),v(1),_("ngIf",!e.group),v(3),_("ngIf",e.filterValue&&e.isEmpty()),v(1),_("ngIf",!e.filterValue&&e.isEmpty()),v(1),_("ngTemplateOutlet",e.footerTemplate)}}const MH=function(t,n,e,i){return{"p-dropdown p-component":!0,"p-disabled":t,"p-dropdown-open":n,"p-focus":e,"p-dropdown-clearable":i}},NH={provide:St,useExisting:pe(()=>cD),multi:!0};let kH=(()=>{class t{constructor(){this.onClick=new N}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=xe({type:t,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick"},decls:3,vars:15,consts:[["role","option","pRipple","",3,"ngStyle","id","ngClass","click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(f(0,"li",0),k("click",function(o){return i.onOptionClick(o)}),w(1,j3,2,1,"span",1),w(2,$3,1,0,"ng-container",2),g()),2&e&&(_("ngStyle",q(8,aD,i.itemSize+"px"))("id",i.selected?"p-highlighted-option":"")("ngClass",He(10,G3,i.selected,i.disabled)),X("aria-label",i.label)("aria-selected",i.selected),v(1),_("ngIf",!i.template),v(1),_("ngTemplateOutlet",i.template)("ngTemplateOutletContext",q(13,bf,i.option)))},directives:[Nc,pi,dn,nt,$t],encapsulation:2}),t})(),cD=(()=>{class t{constructor(e,i,r,o,s,a,l){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.overlayService=l,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.onChange=new N,this.onFilter=new N,this.onFocus=new N,this.onBlur=new N,this.onClick=new N,this.onShow=new N,this.onHide=new N,this.onClear=new N,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.viewPortOffsetTop=0,this.id=uf()}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){default:this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list"}get options(){return this._options}set options(e){this._options=e,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.optionsChanged=!0,this._filterValue&&this._filterValue.length&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Sn.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Sn.EMPTY_FILTER_MESSAGE)}get filled(){return this.value||null!=this.value||null!=this.value}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(e){return this.optionLabel?B.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?B.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?B.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?B.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?B.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const i=e.option;this.isOptionDisabled(i)||(this.selectItem(e.originalEvent,i),this.accessibleViewChild.nativeElement.focus()),setTimeout(()=>{this.hide()},150)}selectItem(e,i){this.selectedOption!=i&&(this.selectedOption=i,this.value=this.getOptionValue(i),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e,value:this.value}),this.virtualScroll&&setTimeout(()=>{this.viewPortOffsetTop=this.viewPort?this.viewPort.measureScrollOffset():0},1))}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.virtualScroll&&this.updateVirtualScrollSelectedIndex(!0),this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){if(this.virtualScroll&&this.viewPort){let i=this.viewPort.getRenderedRange();this.updateVirtualScrollSelectedIndex(!1),(i.start>this.virtualScrollSelectedIndex||i.end-1&&this.viewPort.scrollToIndex(this.virtualScrollSelectedIndex)),this.virtualAutoScrolled=!0}updateVirtualScrollSelectedIndex(e){this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&(e&&(this.viewPortOffsetTop=0),this.virtualScrollSelectedIndex=this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay))}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):E.appendChild(this.overlay,this.appendTo),this.overlay.style.minWidth||(this.overlay.style.minWidth=E.getWidth(this.containerViewChild.nativeElement)+"px"))}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.virtualScroll&&(this.virtualAutoScrolled=!1),this.cd.markForCheck()}alignOverlay(){this.overlay&&(this.appendTo?E.absolutePosition(this.overlay,this.containerViewChild.nativeElement):E.relativePosition(this.overlay,this.containerViewChild.nativeElement))}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e-1;0<=r;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}if(!i)for(let r=this.optionsToDisplay.length-1;r>=e;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}}return i}findNextEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e+1;r0&&this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findNextEnabledOption(r);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 38:if(this.group){let r=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==r){let o=r.itemIndex-1;if(o>=0)this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[r.groupIndex])[o]),this.selectedOptionUpdated=!0;else if(o<0){let s=this.optionsToDisplay[r.groupIndex-1];s&&(this.selectItem(e,this.getOptionGroupChildren(s)[this.getOptionGroupChildren(s).length-1]),this.selectedOptionUpdated=!0)}}}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findPrevEnabledOption(r);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:i&&(this.overlayVisible?this.hide():this.show(),e.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),e.preventDefault();break;case 27:case 9:this.hide();break;default:i&&!e.metaKey&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const i=e.key;let r;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=i,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+i:i,this.group){let o=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};r=this.searchOptionWithinGroup(o)}else{let o=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;r=this.searchOption(++o)}r&&!this.isOptionDisabled(r)&&(this.selectItem(e,r),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let i;return this.searchValue&&(i=this.searchOptionInRange(e,this.optionsToDisplay.length),i||(i=this.searchOptionInRange(0,e))),i}searchOptionInRange(e,i){for(let r=e;r{!this.preventDocumentDefault&&this.isOutsideClicked(i)&&(this.hide(),this.unbindDocumentClickListener()),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}onWindowResize(){this.overlayVisible&&!E.isTouchDevice()&&this.hide()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new cf(this.containerViewChild.nativeElement,e=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}clear(e){this.value=null,this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.updateSelectedOption(this.value),this.updateEditableLabel(),this.onClear.emit(e)}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null,this.itemsWrapper=null,this.onModelTouched()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&ti.clear(this.overlay),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(un),y(ct),y(be),y(LC),y(Mc),y(df))},t.\u0275cmp=xe({type:t,selectors:[["p-dropdown"]],contentQueries:function(e,i,r){if(1&e&&Ve(r,Io,4),2&e){let o;ee(o=te())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Xe(z3,5),Xe(W3,5),Xe(K3,5),Xe(ua,5),Xe(Y3,5)),2&e){let r;ee(r=te())&&(i.containerViewChild=r.first),ee(r=te())&&(i.filterViewChild=r.first),ee(r=te())&&(i.accessibleViewChild=r.first),ee(r=te())&&(i.viewPort=r.first),ee(r=te())&&(i.editableInputViewChild=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(e,i){2&e&&Me("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focused||i.overlayVisible)},inputs:{scrollHeight:"scrollHeight",filter:"filter",name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:"readonly",required:"required",editable:"editable",appendTo:"appendTo",tabindex:"tabindex",placeholder:"placeholder",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",selectId:"selectId",dataKey:"dataKey",filterBy:"filterBy",autofocus:"autofocus",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:"autoDisplayFirst",group:"group",showClear:"showClear",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",virtualScroll:"virtualScroll",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:"maxlength",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",disabled:"disabled",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear"},features:[_e([NH])],decls:12,vars:24,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["type","text","readonly","","aria-haspopup","listbox","aria-haspopup","listbox","role","listbox",3,"disabled","focus","blur","keydown"],["in",""],[3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass",4,"ngIf"],[3,"ngClass",4,"ngIf"],["type","text","class","p-dropdown-label p-inputtext","aria-haspopup","listbox",3,"disabled","click","input","focus","blur",4,"ngIf"],["class","p-dropdown-clear-icon pi pi-times",3,"click",4,"ngIf"],["role","button","aria-haspopup","listbox",1,"p-dropdown-trigger"],[1,"p-dropdown-trigger-icon",3,"ngClass"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","class","click",4,"ngIf"],[3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],["type","text","aria-haspopup","listbox",1,"p-dropdown-label","p-inputtext",3,"disabled","click","input","focus","blur"],["editableInput",""],[1,"p-dropdown-clear-icon","pi","pi-times",3,"click"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","click"],[4,"ngTemplateOutlet"],["class","p-dropdown-header",4,"ngIf"],[1,"p-dropdown-items-wrapper"],["role","listbox",1,"p-dropdown-items",3,"ngClass"],["itemslist",""],["class","p-dropdown-empty-message",4,"ngIf"],[1,"p-dropdown-header"],[1,"p-dropdown-filter-container",3,"click"],["type","text","autocomplete","off",1,"p-dropdown-filter","p-inputtext","p-component",3,"value","keydown.enter","keydown","input"],["filter",""],[1,"p-dropdown-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-dropdown-item-group"],[4,"ngIf","ngIfElse"],["virtualScrollList",""],[3,"option","selected","label","disabled","template","onClick"],[3,"ngStyle","itemSize","scrolledIndexChange",4,"ngIf"],[3,"ngStyle","itemSize","scrolledIndexChange"],["viewport",""],[4,"cdkVirtualFor","cdkVirtualForOf"],[1,"p-dropdown-empty-message"],["emptyFilter",""],["empty",""]],template:function(e,i){1&e&&(f(0,"div",0,1),k("click",function(o){return i.onMouseclick(o)}),f(2,"div",2),f(3,"input",3,4),k("focus",function(o){return i.onInputFocus(o)})("blur",function(o){return i.onInputBlur(o)})("keydown",function(o){return i.onKeydown(o,!0)}),g(),g(),w(5,Q3,3,13,"span",5),w(6,eH,2,4,"span",6),w(7,tH,2,4,"input",7),w(8,nH,1,0,"i",8),f(9,"div",9),z(10,"span",10),g(),w(11,IH,12,23,"div",11),g()),2&e&&(Pe(i.styleClass),_("ngClass",ys(19,MH,i.disabled,i.overlayVisible,i.focused,i.showClear&&!i.disabled))("ngStyle",i.style),v(3),_("disabled",i.disabled),X("id",i.inputId)("placeholder",i.placeholder)("aria-expanded",i.overlayVisible)("aria-labelledby",i.ariaLabelledBy)("tabindex",i.tabindex)("autofocus",i.autofocus)("aria-activedescendant",i.overlayVisible?"p-highlighted-option":i.labelId),v(2),_("ngIf",!i.editable&&null!=i.label),v(1),_("ngIf",!i.editable&&null==i.label),v(1),_("ngIf",i.editable),v(1),_("ngIf",null!=i.value&&i.showClear&&!i.disabled),v(1),X("aria-expanded",i.overlayVisible),v(1),_("ngClass",i.dropdownIcon),v(1),_("ngIf",i.overlayVisible))},directives:[dn,pi,nt,U3,$t,Cn,kH,ua,XC,iD],styles:[".p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;visibility:hidden}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-panel{position:absolute;top:0;left:0}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:normal;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}\n"],encapsulation:2,data:{animation:[oD("overlayAnimation",[Ro(":enter",[Hi({opacity:0,transform:"scaleY(0.8)"}),ko("{{showTransitionParams}}")]),Ro(":leave",[ko("{{hideTransitionParams}}",Hi({opacity:0}))])])]},changeDetection:0}),t})(),yf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,Bi,Lc,vf,Mo],Bi,Lc]}),t})();const RH=["input"],uD=function(){return{"p-inputnumber-button p-inputnumber-button-up":!0}},dD=function(){return{"p-inputnumber-button p-inputnumber-button-down":!0}};function OH(t,n){if(1&t){const e=j();f(0,"span",5),f(1,"button",6),k("mousedown",function(r){return T(e),m().onUpButtonMouseDown(r)})("mouseup",function(){return T(e),m().onUpButtonMouseUp()})("mouseleave",function(){return T(e),m().onUpButtonMouseLeave()})("keydown",function(r){return T(e),m().onUpButtonKeyDown(r)})("keyup",function(){return T(e),m().onUpButtonKeyUp()}),g(),f(2,"button",6),k("mousedown",function(r){return T(e),m().onDownButtonMouseDown(r)})("mouseup",function(){return T(e),m().onDownButtonMouseUp()})("mouseleave",function(){return T(e),m().onDownButtonMouseLeave()})("keydown",function(r){return T(e),m().onDownButtonKeyDown(r)})("keyup",function(){return T(e),m().onDownButtonKeyUp()}),g(),g()}if(2&t){const e=m();v(1),Pe(e.incrementButtonClass),_("ngClass",bs(10,uD))("icon",e.incrementButtonIcon)("disabled",e.disabled),v(1),Pe(e.decrementButtonClass),_("ngClass",bs(11,dD))("icon",e.decrementButtonIcon)("disabled",e.disabled)}}function AH(t,n){if(1&t){const e=j();f(0,"button",6),k("mousedown",function(r){return T(e),m().onUpButtonMouseDown(r)})("mouseup",function(){return T(e),m().onUpButtonMouseUp()})("mouseleave",function(){return T(e),m().onUpButtonMouseLeave()})("keydown",function(r){return T(e),m().onUpButtonKeyDown(r)})("keyup",function(){return T(e),m().onUpButtonKeyUp()}),g()}if(2&t){const e=m();Pe(e.incrementButtonClass),_("ngClass",bs(5,uD))("icon",e.incrementButtonIcon)("disabled",e.disabled)}}function FH(t,n){if(1&t){const e=j();f(0,"button",6),k("mousedown",function(r){return T(e),m().onDownButtonMouseDown(r)})("mouseup",function(){return T(e),m().onDownButtonMouseUp()})("mouseleave",function(){return T(e),m().onDownButtonMouseLeave()})("keydown",function(r){return T(e),m().onDownButtonKeyDown(r)})("keyup",function(){return T(e),m().onDownButtonKeyUp()}),g()}if(2&t){const e=m();Pe(e.decrementButtonClass),_("ngClass",bs(5,dD))("icon",e.decrementButtonIcon)("disabled",e.disabled)}}const PH=function(t,n,e){return{"p-inputnumber p-component":!0,"p-inputnumber-buttons-stacked":t,"p-inputnumber-buttons-horizontal":n,"p-inputnumber-buttons-vertical":e}},LH={provide:St,useExisting:pe(()=>hD),multi:!0};let hD=(()=>{class t{constructor(e,i){this.el=e,this.cd=i,this.showButtons=!1,this.format=!0,this.buttonLayout="stacked",this.incrementButtonIcon="pi pi-angle-up",this.decrementButtonIcon="pi pi-angle-down",this.readonly=!1,this.step=1,this.allowEmpty=!0,this.mode="decimal",this.useGrouping=!0,this.onInput=new N,this.onFocus=new N,this.onBlur=new N,this.onKeyDown=new N,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.groupChar="",this.prefixChar="",this.suffixChar=""}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1),this._disabled=e,this.timer&&this.clearTimer()}ngOnChanges(e){["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(r=>!!e[r])&&this.updateConstructParser()}ngOnInit(){this.constructParser(),this.initialized=!0}getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits}}constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());const e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),i=new Map(e.map((r,o)=>[r,o]));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=r=>i.get(r)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){const e=new Intl.NumberFormat(this.locale,rt(V({},this.getOptions()),{useGrouping:!1}));return new RegExp(`[${e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}]`,"g")}getGroupingExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){const e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}formatValue(e){if(null!=e){if("-"===e)return e;if(this.format){let r=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(r=this.prefix+r),this.suffix&&(r+=this.suffix),r}return e.toString()}return""}parseValue(e){let i=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(i){if("-"===i)return i;let r=+i;return isNaN(r)?null:r}return null}repeat(e,i,r){if(this.readonly)return;let o=i||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,r)},o),this.spin(e,r)}spin(e,i){let r=this.step*i,o=this.parseValue(this.input.nativeElement.value)||0,s=this.validateValue(o+r);this.maxlength&&this.maxlength0&&i>l){const d=this.isDecimalMode()&&(this.minFractionDigits||0)0?s:""):s=o.slice(0,i-1)+o.slice(i)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(o,i,r),this.updateValue(e,s,null,"delete-range");break;case 46:if(e.preventDefault(),i===r){const a=o.charAt(i),{decimalCharIndex:l,decimalCharIndexWithoutPrefix:c}=this.getDecimalCharIndexes(o);if(this.isNumeralChar(a)){const u=this.getDecimalLength(o);if(this._group.test(a))this._group.lastIndex=0,s=o.slice(0,i)+o.slice(i+2);else if(this._decimal.test(a))this._decimal.lastIndex=0,u?this.input.nativeElement.setSelectionRange(i+1,i+1):s=o.slice(0,i)+o.slice(i+1);else if(l>0&&i>l){const d=this.isDecimalMode()&&(this.minFractionDigits||0)0?s:""):s=o.slice(0,i)+o.slice(i+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(o,i,r),this.updateValue(e,s,null,"delete-range")}this.onKeyDown.emit(e)}onInputKeyPress(e){if(this.readonly)return;e.preventDefault();let i=e.which||e.keyCode,r=String.fromCharCode(i);const o=this.isDecimalSign(r),s=this.isMinusSign(r);(48<=i&&i<=57||s||o)&&this.insert(e,r,{isDecimalSign:o,isMinusSign:s})}onPaste(e){if(!this.disabled&&!this.readonly){e.preventDefault();let i=(e.clipboardData||window.clipboardData).getData("Text");if(i){let r=this.parseValue(i);null!=r&&this.insert(e,r.toString())}}}allowMinusSign(){return null==this.min||this.min<0}isMinusSign(e){return!(!this._minusSign.test(e)&&"-"!==e||(this._minusSign.lastIndex=0,0))}isDecimalSign(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)}isDecimalMode(){return"decimal"===this.mode}getDecimalCharIndexes(e){let i=e.search(this._decimal);this._decimal.lastIndex=0;const o=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:i,decimalCharIndexWithoutPrefix:o}}getCharIndexes(e){const i=e.search(this._decimal);this._decimal.lastIndex=0;const r=e.search(this._minusSign);this._minusSign.lastIndex=0;const o=e.search(this._suffix);this._suffix.lastIndex=0;const s=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:i,minusCharIndex:r,suffixCharIndex:o,currencyCharIndex:s}}insert(e,i,r={isDecimalSign:!1,isMinusSign:!1}){const o=i.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&-1!==o)return;let s=this.input.nativeElement.selectionStart,a=this.input.nativeElement.selectionEnd,l=this.input.nativeElement.value.trim();const{decimalCharIndex:c,minusCharIndex:u,suffixCharIndex:d,currencyCharIndex:h}=this.getCharIndexes(l);let p;if(r.isMinusSign)0===s&&(p=l,(-1===u||0!==a)&&(p=this.insertText(l,i,0,a)),this.updateValue(e,p,i,"insert"));else if(r.isDecimalSign)c>0&&s===c?this.updateValue(e,l,i,"insert"):(c>s&&c0&&s>c){if(s+i.length-(c+1)<=b){const S=h>=s?h-1:d>=s?d:l.length;p=l.slice(0,s)+i+l.slice(s+i.length,S)+l.slice(S),this.updateValue(e,p,i,C)}}else p=this.insertText(l,i,s,a),this.updateValue(e,p,i,C)}}insertText(e,i,r,o){if(2===("."===i?i:i.split(".")).length){const a=e.slice(r,o).search(this._decimal);return this._decimal.lastIndex=0,a>0?e.slice(0,r)+this.formatValue(i)+e.slice(o):e||this.formatValue(i)}return o-r===e.length?this.formatValue(i):0===r?i+e.slice(o):o===e.length?e.slice(0,r)+i:e.slice(0,r)+i+e.slice(o)}deleteRange(e,i,r){let o;return o=r-i===e.length?"":0===i?e.slice(r):r===e.length?e.slice(0,i):e.slice(0,i)+e.slice(r),o}initCursor(){let e=this.input.nativeElement.selectionStart,i=this.input.nativeElement.value,r=i.length,o=null,s=(this.prefixChar||"").length;i=i.replace(this._prefix,""),e-=s;let a=i.charAt(e);if(this.isNumeralChar(a))return e+s;let l=e-1;for(;l>=0;){if(a=i.charAt(l),this.isNumeralChar(a)){o=l+s;break}l--}if(null!==o)this.input.nativeElement.setSelectionRange(o+1,o+1);else{for(l=e;lthis.max?this.max:e}updateInput(e,i,r,o){i=i||"";let s=this.input.nativeElement.value,a=this.formatValue(e),l=s.length;if(a!==o&&(a=this.concatValues(a,o)),0===l){this.input.nativeElement.value=a,this.input.nativeElement.setSelectionRange(0,0);const u=this.initCursor()+i.length;this.input.nativeElement.setSelectionRange(u,u)}else{let c=this.input.nativeElement.selectionStart,u=this.input.nativeElement.selectionEnd;if(this.maxlength&&this.maxlength0}clearTimer(){this.timer&&clearInterval(this.timer)}getFormatter(){return this.numberFormat}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(ct))},t.\u0275cmp=xe({type:t,selectors:[["p-inputNumber"]],viewQuery:function(e,i){if(1&e&&Xe(RH,5),2&e){let r;ee(r=te())&&(i.input=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(e,i){2&e&&Me("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focused)},inputs:{showButtons:"showButtons",format:"format",buttonLayout:"buttonLayout",inputId:"inputId",styleClass:"styleClass",style:"style",placeholder:"placeholder",size:"size",maxlength:"maxlength",tabindex:"tabindex",title:"title",ariaLabel:"ariaLabel",ariaRequired:"ariaRequired",name:"name",required:"required",autocomplete:"autocomplete",min:"min",max:"max",incrementButtonClass:"incrementButtonClass",decrementButtonClass:"decrementButtonClass",incrementButtonIcon:"incrementButtonIcon",decrementButtonIcon:"decrementButtonIcon",readonly:"readonly",step:"step",allowEmpty:"allowEmpty",locale:"locale",localeMatcher:"localeMatcher",mode:"mode",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:"useGrouping",minFractionDigits:"minFractionDigits",maxFractionDigits:"maxFractionDigits",prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",disabled:"disabled"},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown"},features:[_e([LH]),Qe],decls:6,vars:31,consts:[[3,"ngClass","ngStyle"],["pInputText","","inputmode","decimal",3,"ngClass","ngStyle","value","disabled","readonly","input","keydown","keypress","paste","click","focus","blur"],["input",""],["class","p-inputnumber-button-group",4,"ngIf"],["type","button","pButton","",3,"ngClass","class","icon","disabled","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],[1,"p-inputnumber-button-group"],["type","button","pButton","",3,"ngClass","icon","disabled","mousedown","mouseup","mouseleave","keydown","keyup"]],template:function(e,i){1&e&&(f(0,"span",0),f(1,"input",1,2),k("input",function(o){return i.onUserInput(o)})("keydown",function(o){return i.onInputKeyDown(o)})("keypress",function(o){return i.onInputKeyPress(o)})("paste",function(o){return i.onPaste(o)})("click",function(){return i.onInputClick()})("focus",function(o){return i.onInputFocus(o)})("blur",function(o){return i.onInputBlur(o)}),g(),w(3,OH,3,12,"span",3),w(4,AH,1,6,"button",4),w(5,FH,1,6,"button",4),g()),2&e&&(Pe(i.styleClass),_("ngClass",ir(27,PH,i.showButtons&&"stacked"===i.buttonLayout,i.showButtons&&"horizontal"===i.buttonLayout,i.showButtons&&"vertical"===i.buttonLayout))("ngStyle",i.style),v(1),Pe(i.inputStyleClass),_("ngClass","p-inputnumber-input")("ngStyle",i.inputStyle)("value",i.formattedValue())("disabled",i.disabled)("readonly",i.readonly),X("placeholder",i.placeholder)("title",i.title)("id",i.inputId)("size",i.size)("name",i.name)("autocomplete",i.autocomplete)("maxlength",i.maxlength)("tabindex",i.tabindex)("aria-label",i.ariaLabel)("aria-required",i.ariaRequired)("required",i.required)("aria-valuemin",i.min)("aria-valuemax",i.max),v(2),_("ngIf",i.showButtons&&"stacked"===i.buttonLayout),v(1),_("ngIf",i.showButtons&&"stacked"!==i.buttonLayout),v(1),_("ngIf",i.showButtons&&"stacked"!==i.buttonLayout))},directives:[dn,pi,BC,nt,oa],styles:["p-inputnumber,.p-inputnumber{display:inline-flex}.p-inputnumber-button{display:flex;align-items:center;justify-content:center;flex:0 0 auto}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label{display:none}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up{border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-input{border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-button-group{display:flex;flex-direction:column}.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button{flex:1 1 auto}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up{order:3;border-top-left-radius:0;border-bottom-left-radius:0}.p-inputnumber-buttons-horizontal .p-inputnumber-input{order:2;border-radius:0}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down{order:1;border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-vertical{flex-direction:column}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up{order:1;border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.p-inputnumber-buttons-vertical .p-inputnumber-input{order:2;border-radius:0;text-align:center}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down{order:3;border-top-left-radius:0;border-top-right-radius:0;width:100%}.p-inputnumber-input{flex:1 1 auto}.p-fluid p-inputnumber,.p-fluid .p-inputnumber{width:100%}.p-fluid .p-inputnumber .p-inputnumber-input{width:1%}.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input{width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),wf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,hf,sa]]}),t})();function VH(t,n){1&t&&W(0)}const Cf=function(t){return{$implicit:t}};function BH(t,n){if(1&t&&(f(0,"div",15),w(1,VH,1,0,"ng-container",16),g()),2&t){const e=m(2);v(1),_("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",q(2,Cf,e.paginatorState))}}function HH(t,n){if(1&t&&(f(0,"span",17),I(1),g()),2&t){const e=m(2);v(1),Se(e.currentPageReport)}}const Vc=function(t){return{"p-disabled":t}};function UH(t,n){if(1&t){const e=j();f(0,"button",18),k("click",function(r){return T(e),m(2).changePageToFirst(r)}),z(1,"span",19),g()}if(2&t){const e=m(2);_("disabled",e.isFirstPage()||e.empty())("ngClass",q(2,Vc,e.isFirstPage()||e.empty()))}}const jH=function(t){return{"p-highlight":t}};function $H(t,n){if(1&t){const e=j();f(0,"button",22),k("click",function(r){const s=T(e).$implicit;return m(3).onPageLinkClick(r,s-1)}),I(1),g()}if(2&t){const e=n.$implicit,i=m(3);_("ngClass",q(2,jH,e-1==i.getPage())),v(1),Se(e)}}function GH(t,n){if(1&t&&(f(0,"span",20),w(1,$H,2,4,"button",21),g()),2&t){const e=m(2);v(1),_("ngForOf",e.pageLinks)}}function zH(t,n){1&t&&I(0),2&t&&Se(m(3).currentPageReport)}function WH(t,n){if(1&t){const e=j();f(0,"p-dropdown",23),k("onChange",function(r){return T(e),m(2).onPageDropdownChange(r)}),w(1,zH,1,1,"ng-template",24),g()}if(2&t){const e=m(2);_("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("appendTo",e.dropdownAppendTo)("scrollHeight",e.dropdownScrollHeight)}}function KH(t,n){if(1&t){const e=j();f(0,"button",25),k("click",function(r){return T(e),m(2).changePageToLast(r)}),z(1,"span",26),g()}if(2&t){const e=m(2);_("disabled",e.isLastPage()||e.empty())("ngClass",q(2,Vc,e.isLastPage()||e.empty()))}}function YH(t,n){if(1&t){const e=j();f(0,"p-inputNumber",27),k("ngModelChange",function(r){return T(e),m(2).changePage(r-1)}),g()}if(2&t){const e=m(2);_("ngModel",e.currentPage())("disabled",e.empty())}}function qH(t,n){1&t&&W(0)}function ZH(t,n){if(1&t&&w(0,qH,1,0,"ng-container",16),2&t){const e=n.$implicit;_("ngTemplateOutlet",m(4).dropdownItemTemplate)("ngTemplateOutletContext",q(2,Cf,e))}}function JH(t,n){1&t&&(le(0),w(1,ZH,1,4,"ng-template",30),ce())}function QH(t,n){if(1&t){const e=j();f(0,"p-dropdown",28),k("ngModelChange",function(r){return T(e),m(2).rows=r})("onChange",function(r){return T(e),m(2).onRppChange(r)}),w(1,JH,2,0,"ng-container",29),g()}if(2&t){const e=m(2);_("options",e.rowsPerPageItems)("ngModel",e.rows)("disabled",e.empty())("appendTo",e.dropdownAppendTo)("scrollHeight",e.dropdownScrollHeight),v(1),_("ngIf",e.dropdownItemTemplate)}}function XH(t,n){1&t&&W(0)}function eU(t,n){if(1&t&&(f(0,"div",31),w(1,XH,1,0,"ng-container",16),g()),2&t){const e=m(2);v(1),_("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",q(2,Cf,e.paginatorState))}}function tU(t,n){if(1&t){const e=j();f(0,"div",1),w(1,BH,2,4,"div",2),w(2,HH,2,1,"span",3),w(3,UH,2,4,"button",4),f(4,"button",5),k("click",function(r){return T(e),m().changePageToPrev(r)}),z(5,"span",6),g(),w(6,GH,2,1,"span",7),w(7,WH,2,5,"p-dropdown",8),f(8,"button",9),k("click",function(r){return T(e),m().changePageToNext(r)}),z(9,"span",10),g(),w(10,KH,2,4,"button",11),w(11,YH,1,2,"p-inputNumber",12),w(12,QH,2,6,"p-dropdown",13),w(13,eU,2,4,"div",14),g()}if(2&t){const e=m();Pe(e.styleClass),_("ngStyle",e.style)("ngClass","p-paginator p-component"),v(1),_("ngIf",e.templateLeft),v(1),_("ngIf",e.showCurrentPageReport),v(1),_("ngIf",e.showFirstLastIcon),v(1),_("disabled",e.isFirstPage()||e.empty())("ngClass",q(17,Vc,e.isFirstPage()||e.empty())),v(2),_("ngIf",e.showPageLinks),v(1),_("ngIf",e.showJumpToPageDropdown),v(1),_("disabled",e.isLastPage()||e.empty())("ngClass",q(19,Vc,e.isLastPage()||e.empty())),v(2),_("ngIf",e.showFirstLastIcon),v(1),_("ngIf",e.showJumpToPageInput),v(1),_("ngIf",e.rowsPerPageOptions),v(1),_("ngIf",e.templateRight)}}let nU=(()=>{class t{constructor(e){this.cd=e,this.pageLinkSize=5,this.onPageChange=new N,this.alwaysShow=!0,this.dropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.totalRecords=0,this.rows=0,this.showPageLinks=!0,this._first=0,this._page=0}ngOnInit(){this.updatePaginatorState()}ngOnChanges(e){e.totalRecords&&(this.updatePageLinks(),this.updatePaginatorState(),this.updateFirst(),this.updateRowsPerPageOptions()),e.first&&(this._first=e.first.currentValue,this.updatePageLinks(),this.updatePaginatorState()),e.rows&&(this.updatePageLinks(),this.updatePaginatorState()),e.rowsPerPageOptions&&this.updateRowsPerPageOptions()}get first(){return this._first}set first(e){this._first=e}updateRowsPerPageOptions(){if(this.rowsPerPageOptions){this.rowsPerPageItems=[];for(let e of this.rowsPerPageOptions)"object"==typeof e&&e.showAll?this.rowsPerPageItems.unshift({label:e.showAll,value:this.totalRecords}):this.rowsPerPageItems.push({label:String(e),value:e})}}isFirstPage(){return 0===this.getPage()}isLastPage(){return this.getPage()===this.getPageCount()-1}getPageCount(){return Math.ceil(this.totalRecords/this.rows)}calculatePageLinkBoundaries(){let e=this.getPageCount(),i=Math.min(this.pageLinkSize,e),r=Math.max(0,Math.ceil(this.getPage()-i/2)),o=Math.min(e-1,r+i-1);return r=Math.max(0,r-(this.pageLinkSize-(o-r+1))),[r,o]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),r=e[1];for(let o=e[0];o<=r;o++)this.pageLinks.push(o+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let o=0;o=0&&e0&&this.totalRecords&&this.first>=this.totalRecords&&Promise.resolve(null).then(()=>this.changePage(e-1))}getPage(){return Math.floor(this.first/this.rows)}changePageToFirst(e){this.isFirstPage()||this.changePage(0),e.preventDefault()}changePageToPrev(e){this.changePage(this.getPage()-1),e.preventDefault()}changePageToNext(e){this.changePage(this.getPage()+1),e.preventDefault()}changePageToLast(e){this.isLastPage()||this.changePage(this.getPageCount()-1),e.preventDefault()}onPageLinkClick(e,i){this.changePage(i),e.preventDefault()}onRppChange(e){this.changePage(this.getPage())}onPageDropdownChange(e){this.changePage(e.value)}updatePaginatorState(){this.paginatorState={page:this.getPage(),pageCount:this.getPageCount(),rows:this.rows,first:this.first,totalRecords:this.totalRecords}}empty(){return 0===this.getPageCount()}currentPage(){return this.getPageCount()>0?this.getPage()+1:0}get currentPageReport(){return this.currentPageReportTemplate.replace("{currentPage}",String(this.currentPage())).replace("{totalPages}",String(this.getPageCount())).replace("{first}",String(this.totalRecords>0?this._first+1:0)).replace("{last}",String(Math.min(this._first+this.rows,this.totalRecords))).replace("{rows}",String(this.rows)).replace("{totalRecords}",String(this.totalRecords))}}return t.\u0275fac=function(e){return new(e||t)(y(ct))},t.\u0275cmp=xe({type:t,selectors:[["p-paginator"]],hostAttrs:[1,"p-element"],inputs:{pageLinkSize:"pageLinkSize",style:"style",styleClass:"styleClass",alwaysShow:"alwaysShow",templateLeft:"templateLeft",templateRight:"templateRight",dropdownAppendTo:"dropdownAppendTo",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showFirstLastIcon:"showFirstLastIcon",totalRecords:"totalRecords",rows:"rows",rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:"showJumpToPageDropdown",showJumpToPageInput:"showJumpToPageInput",showPageLinks:"showPageLinks",dropdownItemTemplate:"dropdownItemTemplate",first:"first"},outputs:{onPageChange:"onPageChange"},features:[Qe],decls:1,vars:1,consts:[[3,"class","ngStyle","ngClass",4,"ngIf"],[3,"ngStyle","ngClass"],["class","p-paginator-left-content",4,"ngIf"],["class","p-paginator-current",4,"ngIf"],["type","button","pRipple","","class","p-paginator-first p-paginator-element p-link",3,"disabled","ngClass","click",4,"ngIf"],["type","button","pRipple","",1,"p-paginator-prev","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-left"],["class","p-paginator-pages",4,"ngIf"],["styleClass","p-paginator-page-options",3,"options","ngModel","disabled","appendTo","scrollHeight","onChange",4,"ngIf"],["type","button","pRipple","",1,"p-paginator-next","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-right"],["type","button","pRipple","","class","p-paginator-last p-paginator-element p-link",3,"disabled","ngClass","click",4,"ngIf"],["class","p-paginator-page-input",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["styleClass","p-paginator-rpp-options",3,"options","ngModel","disabled","appendTo","scrollHeight","ngModelChange","onChange",4,"ngIf"],["class","p-paginator-right-content",4,"ngIf"],[1,"p-paginator-left-content"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-paginator-current"],["type","button","pRipple","",1,"p-paginator-first","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-double-left"],[1,"p-paginator-pages"],["type","button","class","p-paginator-page p-paginator-element p-link","pRipple","",3,"ngClass","click",4,"ngFor","ngForOf"],["type","button","pRipple","",1,"p-paginator-page","p-paginator-element","p-link",3,"ngClass","click"],["styleClass","p-paginator-page-options",3,"options","ngModel","disabled","appendTo","scrollHeight","onChange"],["pTemplate","selectedItem"],["type","button","pRipple","",1,"p-paginator-last","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-double-right"],[1,"p-paginator-page-input",3,"ngModel","disabled","ngModelChange"],["styleClass","p-paginator-rpp-options",3,"options","ngModel","disabled","appendTo","scrollHeight","ngModelChange","onChange"],[4,"ngIf"],["pTemplate","item"],[1,"p-paginator-right-content"]],template:function(e,i){1&e&&w(0,tU,14,21,"div",0),2&e&&_("ngIf",!!i.alwaysShow||i.pageLinks&&i.pageLinks.length>1)},directives:[nt,pi,dn,Nc,$t,Cn,cD,ks,jl,Io,hD],styles:[".p-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.p-paginator-left-content{margin-right:auto}.p-paginator-right-content{margin-left:auto}.p-paginator-page,.p-paginator-next,.p-paginator-last,.p-paginator-first,.p-paginator-prev,.p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}.p-paginator-element:focus{z-index:1;position:relative}\n"],encapsulation:2,changeDetection:0}),t})(),iU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,yf,wf,Wl,Bi,Mo],yf,wf,Wl,Bi]}),t})();function rU(t,n){1&t&&z(0,"span",8),2&t&&(Pe(m(2).$implicit.icon),_("ngClass","p-button-icon p-button-icon-left"))}function oU(t,n){if(1&t&&(le(0),w(1,rU,1,3,"span",6),f(2,"span",7),I(3),g(),ce()),2&t){const e=m().$implicit,i=m();v(1),_("ngIf",e.icon),v(2),Se(i.getOptionLabel(e))}}function sU(t,n){1&t&&W(0)}const aU=function(t,n){return{$implicit:t,index:n}};function lU(t,n){if(1&t&&w(0,sU,1,0,"ng-container",9),2&t){const e=m(),i=e.$implicit,r=e.index;_("ngTemplateOutlet",m().itemTemplate)("ngTemplateOutletContext",He(2,aU,i,r))}}const cU=function(t,n,e){return{"p-highlight":t,"p-disabled":n,"p-button-icon-only":e}};function uU(t,n){if(1&t){const e=j();f(0,"div",2,3),k("click",function(r){const o=T(e),s=o.$implicit,a=o.index;return m().onItemClick(r,s,a)})("keydown.enter",function(r){const o=T(e),s=o.$implicit,a=o.index;return m().onItemClick(r,s,a)})("blur",function(){return T(e),m().onBlur()}),w(2,oU,4,2,"ng-container",4),w(3,lU,1,5,"ng-template",null,5,Rt),g()}if(2&t){const e=n.$implicit,i=We(4),r=m();Pe(e.styleClass),_("ngClass",ir(10,cU,r.isSelected(e),r.disabled||r.isOptionDisabled(e),e.icon&&!r.getOptionLabel(e))),X("aria-pressed",r.isSelected(e))("title",e.title)("aria-label",e.label)("tabindex",r.disabled?null:r.tabindex)("aria-labelledby",r.getOptionLabel(e)),v(2),_("ngIf",!r.itemTemplate)("ngIfElse",i)}}const dU={provide:St,useExisting:pe(()=>hU),multi:!0};let hU=(()=>{class t{constructor(e){this.cd=e,this.tabindex=0,this.onOptionClick=new N,this.onChange=new N,this.onModelChange=()=>{},this.onModelTouched=()=>{}}getOptionLabel(e){return this.optionLabel?B.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?B.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?B.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onItemClick(e,i,r){this.disabled||this.isOptionDisabled(i)||(this.multiple?this.isSelected(i)?this.removeOption(i):this.value=[...this.value||[],this.getOptionValue(i)]:this.value=this.getOptionValue(i),this.onOptionClick.emit({originalEvent:e,option:i,index:r}),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onBlur(){this.onModelTouched()}removeOption(e){this.value=this.value.filter(i=>!B.equals(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,r=this.getOptionValue(e);if(this.multiple){if(this.value)for(let o of this.value)if(B.equals(o,r,this.dataKey)){i=!0;break}}else i=B.equals(this.getOptionValue(e),this.value,this.dataKey);return i}}return t.\u0275fac=function(e){return new(e||t)(y(ct))},t.\u0275cmp=xe({type:t,selectors:[["p-selectButton"]],contentQueries:function(e,i,r){if(1&e&&Ve(r,Le,5),2&e){let o;ee(o=te())&&(i.itemTemplate=o.first)}},hostAttrs:[1,"p-element"],inputs:{options:"options",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",tabindex:"tabindex",multiple:"multiple",style:"style",styleClass:"styleClass",ariaLabelledBy:"ariaLabelledBy",disabled:"disabled",dataKey:"dataKey"},outputs:{onOptionClick:"onOptionClick",onChange:"onChange"},features:[_e([dU])],decls:2,vars:5,consts:[["role","group",3,"ngClass","ngStyle"],["class","p-button p-component","role","button","pRipple","",3,"class","ngClass","click","keydown.enter","blur",4,"ngFor","ngForOf"],["role","button","pRipple","",1,"p-button","p-component",3,"ngClass","click","keydown.enter","blur"],["btn",""],[4,"ngIf","ngIfElse"],["customcontent",""],[3,"ngClass","class",4,"ngIf"],[1,"p-button-label"],[3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(f(0,"div",0),w(1,uU,5,14,"div",1),g()),2&e&&(Pe(i.styleClass),_("ngClass","p-selectbutton p-buttonset p-component")("ngStyle",i.style),v(1),_("ngForOf",i.options))},directives:[dn,pi,Cn,Nc,nt,$t],styles:[".p-button{margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative}.p-button-label{flex:1 1 auto}.p-button-icon-right{order:1}.p-button:disabled{cursor:default}.p-button-icon-only{justify-content:center}.p-button-icon-only .p-button-label{visibility:hidden;width:0;flex:0 0 auto}.p-button-vertical{flex-direction:column}.p-button-icon-bottom{order:2}.p-buttonset .p-button{margin:0}.p-buttonset .p-button:not(:last-child){border-right:0 none}.p-buttonset .p-button:not(:first-of-type):not(:last-of-type){border-radius:0}.p-buttonset .p-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0}.p-buttonset .p-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0}.p-buttonset .p-button:focus{position:relative;z-index:1}.p-button-label{transition:all .2s}\n"],encapsulation:2,changeDetection:0}),t})(),pU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,Mo]]}),t})();const fU=function(t,n,e){return{"p-checkbox-label-active":t,"p-disabled":n,"p-checkbox-label-focus":e}};function gU(t,n){if(1&t){const e=j();f(0,"label",7),k("click",function(r){T(e);const o=m(),s=We(3);return o.onClick(r,s)}),I(1),g()}if(2&t){const e=m();_("ngClass",ir(3,fU,null!=e.value,e.disabled,e.focused)),X("for",e.inputId),v(1),Se(e.label)}}const mU=function(t,n){return{"p-checkbox p-component":!0,"p-checkbox-disabled":t,"p-checkbox-focused":n}},_U=function(t,n,e){return{"p-highlight":t,"p-disabled":n,"p-focus":e}},vU={provide:St,useExisting:pe(()=>bU),multi:!0};let bU=(()=>{class t{constructor(e){this.cd=e,this.checkboxTrueIcon="pi pi-check",this.checkboxFalseIcon="pi pi-times",this.onChange=new N,this.onModelChange=()=>{},this.onModelTouched=()=>{}}onClick(e,i){!this.disabled&&!this.readonly&&(this.toggle(e),this.focused=!0,i.focus())}onKeydown(e){32==e.keyCode&&e.preventDefault()}onKeyup(e){32==e.keyCode&&!this.readonly&&(this.toggle(e),e.preventDefault())}toggle(e){null==this.value||null==this.value?this.value=!0:1==this.value?this.value=!1:0==this.value&&(this.value=null),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}writeValue(e){this.value=e,this.cd.markForCheck()}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(y(ct))},t.\u0275cmp=xe({type:t,selectors:[["p-triStateCheckbox"]],hostAttrs:[1,"p-element"],inputs:{disabled:"disabled",name:"name",ariaLabelledBy:"ariaLabelledBy",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",label:"label",readonly:"readonly",checkboxTrueIcon:"checkboxTrueIcon",checkboxFalseIcon:"checkboxFalseIcon"},outputs:{onChange:"onChange"},features:[_e([vU])],decls:7,vars:21,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","text","inputmode","none",3,"name","readonly","disabled","keyup","keydown","focus","blur"],["input",""],["role","checkbox",1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],["class","p-checkbox-label",3,"ngClass","click",4,"ngIf"],[1,"p-checkbox-label",3,"ngClass","click"]],template:function(e,i){if(1&e){const r=j();f(0,"div",0),f(1,"div",1),f(2,"input",2,3),k("keyup",function(s){return i.onKeyup(s)})("keydown",function(s){return i.onKeydown(s)})("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()}),g(),g(),f(4,"div",4),k("click",function(s){T(r);const a=We(3);return i.onClick(s,a)}),z(5,"span",5),g(),g(),w(6,gU,2,7,"label",6)}2&e&&(Pe(i.styleClass),_("ngStyle",i.style)("ngClass",He(14,mU,i.disabled,i.focused)),v(2),_("name",i.name)("readonly",i.readonly)("disabled",i.disabled),X("id",i.inputId)("tabindex",i.tabindex)("aria-labelledby",i.ariaLabelledBy),v(2),_("ngClass",ir(17,_U,null!=i.value,i.disabled,i.focused)),X("aria-checked",!0===i.value),v(1),_("ngClass",!0===i.value?i.checkboxTrueIcon:!1===i.value?i.checkboxFalseIcon:""),v(1),_("ngIf",i.label))},directives:[pi,dn,nt],encapsulation:2,changeDetection:0}),t})(),yU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re]]}),t})();const wU=["container"],CU=["inputfield"],DU=["contentWrapper"];function SU(t,n){if(1&t){const e=j();f(0,"button",7),k("click",function(r){T(e),m();const o=We(1);return m().onButtonClick(r,o)}),g()}if(2&t){const e=m(2);_("icon",e.icon)("disabled",e.disabled),X("aria-label",e.iconAriaLabel)}}function TU(t,n){if(1&t){const e=j();f(0,"input",4,5),k("focus",function(r){return T(e),m().onInputFocus(r)})("keydown",function(r){return T(e),m().onInputKeydown(r)})("click",function(){return T(e),m().onInputClick()})("blur",function(r){return T(e),m().onInputBlur(r)})("input",function(r){return T(e),m().onUserInput(r)}),g(),w(2,SU,1,3,"button",6)}if(2&t){const e=m();Pe(e.inputStyleClass),_("value",e.inputFieldValue)("readonly",e.readonlyInput)("ngStyle",e.inputStyle)("placeholder",e.placeholder||"")("disabled",e.disabled)("ngClass","p-inputtext p-component"),X("id",e.inputId)("name",e.name)("required",e.required)("aria-required",e.required)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null)("aria-labelledby",e.ariaLabelledBy),v(2),_("ngIf",e.showIcon)}}function EU(t,n){1&t&&W(0)}function xU(t,n){if(1&t){const e=j();f(0,"button",28),k("keydown",function(r){return T(e),m(4).onContainerButtonKeydown(r)})("click",function(r){return T(e),m(4).onPrevButtonClick(r)}),z(1,"span",29),g()}}function IU(t,n){if(1&t){const e=j();f(0,"button",30),k("click",function(r){return T(e),m(4).switchToMonthView(r)})("keydown",function(r){return T(e),m(4).onContainerButtonKeydown(r)}),I(1),g()}if(2&t){const e=m().$implicit,i=m(3);_("disabled",i.switchViewButtonDisabled()),v(1),mt(" ",i.getMonthName(e.month)," ")}}function MU(t,n){if(1&t){const e=j();f(0,"button",31),k("click",function(r){return T(e),m(4).switchToYearView(r)})("keydown",function(r){return T(e),m(4).onContainerButtonKeydown(r)}),I(1),g()}if(2&t){const e=m().$implicit,i=m(3);_("disabled",i.switchViewButtonDisabled()),v(1),mt(" ",i.getYear(e)," ")}}function NU(t,n){if(1&t&&(le(0),I(1),ce()),2&t){const e=m(5);v(1),jd("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1],"")}}function kU(t,n){1&t&&W(0)}const pD=function(t){return{$implicit:t}};function RU(t,n){if(1&t&&(f(0,"span",32),w(1,NU,2,2,"ng-container",11),w(2,kU,1,0,"ng-container",33),g()),2&t){const e=m(4);v(1),_("ngIf",!e.decadeTemplate),v(1),_("ngTemplateOutlet",e.decadeTemplate)("ngTemplateOutletContext",q(3,pD,e.yearPickerValues))}}function OU(t,n){if(1&t&&(f(0,"th",39),f(1,"span"),I(2),g(),g()),2&t){const e=m(5);v(2),Se(e.getTranslation("weekHeader"))}}function AU(t,n){if(1&t&&(f(0,"th",40),f(1,"span"),I(2),g(),g()),2&t){const e=n.$implicit;v(2),Se(e)}}function FU(t,n){if(1&t&&(f(0,"td",43),f(1,"span",44),I(2),g(),g()),2&t){const e=m().index,i=m(2).$implicit;v(2),mt(" ",i.weekNumbers[e]," ")}}function PU(t,n){if(1&t&&(le(0),I(1),ce()),2&t){const e=m(2).$implicit;v(1),Se(e.day)}}function LU(t,n){1&t&&W(0)}const VU=function(t,n){return{"p-highlight":t,"p-disabled":n}};function BU(t,n){if(1&t){const e=j();le(0),f(1,"span",46),k("click",function(r){T(e);const o=m().$implicit;return m(6).onDateSelect(r,o)})("keydown",function(r){T(e);const o=m().$implicit,s=m(3).index;return m(3).onDateCellKeydown(r,o,s)}),w(2,PU,2,1,"ng-container",11),w(3,LU,1,0,"ng-container",33),g(),ce()}if(2&t){const e=m().$implicit,i=m(6);v(1),_("ngClass",He(4,VU,i.isSelected(e),!e.selectable)),v(1),_("ngIf",!i.dateTemplate),v(1),_("ngTemplateOutlet",i.dateTemplate)("ngTemplateOutletContext",q(7,pD,e))}}const HU=function(t,n){return{"p-datepicker-other-month":t,"p-datepicker-today":n}};function UU(t,n){if(1&t&&(f(0,"td",45),w(1,BU,4,9,"ng-container",11),g()),2&t){const e=n.$implicit,i=m(6);_("ngClass",He(2,HU,e.otherMonth,e.today)),v(1),_("ngIf",!e.otherMonth||i.showOtherMonths)}}function jU(t,n){if(1&t&&(f(0,"tr"),w(1,FU,3,1,"td",41),w(2,UU,2,5,"td",42),g()),2&t){const e=n.$implicit,i=m(5);v(1),_("ngIf",i.showWeek),v(1),_("ngForOf",e)}}function $U(t,n){if(1&t&&(f(0,"div",34),f(1,"table",35),f(2,"thead"),f(3,"tr"),w(4,OU,3,1,"th",36),w(5,AU,3,1,"th",37),g(),g(),f(6,"tbody"),w(7,jU,3,2,"tr",38),g(),g(),g()),2&t){const e=m().$implicit,i=m(3);v(4),_("ngIf",i.showWeek),v(1),_("ngForOf",i.weekDays),v(2),_("ngForOf",e.dates)}}function GU(t,n){if(1&t){const e=j();f(0,"div",18),f(1,"div",19),w(2,xU,2,0,"button",20),f(3,"div",21),w(4,IU,2,2,"button",22),w(5,MU,2,2,"button",23),w(6,RU,3,5,"span",24),g(),f(7,"button",25),k("keydown",function(r){return T(e),m(3).onContainerButtonKeydown(r)})("click",function(r){return T(e),m(3).onNextButtonClick(r)}),z(8,"span",26),g(),g(),w(9,$U,8,3,"div",27),g()}if(2&t){const e=n.index,i=m(3);v(2),_("ngIf",0===e),v(2),_("ngIf","date"===i.currentView),v(1),_("ngIf","year"!==i.currentView),v(1),_("ngIf","year"===i.currentView),v(1),Xi("display",1===i.numberOfMonths||e===i.numberOfMonths-1?"inline-flex":"none"),v(2),_("ngIf","date"===i.currentView)}}const fD=function(t){return{"p-highlight":t}};function zU(t,n){if(1&t){const e=j();f(0,"span",49),k("click",function(r){const s=T(e).index;return m(4).onMonthSelect(r,s)})("keydown",function(r){const s=T(e).index;return m(4).onMonthCellKeydown(r,s)}),I(1),g()}if(2&t){const e=n.$implicit,i=n.index,r=m(4);_("ngClass",q(2,fD,r.isMonthSelected(i))),v(1),mt(" ",e," ")}}function WU(t,n){if(1&t&&(f(0,"div",47),w(1,zU,2,4,"span",48),g()),2&t){const e=m(3);v(1),_("ngForOf",e.monthPickerValues())}}function KU(t,n){if(1&t){const e=j();f(0,"span",52),k("click",function(r){const s=T(e).$implicit;return m(4).onYearSelect(r,s)})("keydown",function(r){const s=T(e).$implicit;return m(4).onYearCellKeydown(r,s)}),I(1),g()}if(2&t){const e=n.$implicit,i=m(4);_("ngClass",q(2,fD,i.isYearSelected(e))),v(1),mt(" ",e," ")}}function YU(t,n){if(1&t&&(f(0,"div",50),w(1,KU,2,4,"span",51),g()),2&t){const e=m(3);v(1),_("ngForOf",e.yearPickerValues())}}function qU(t,n){if(1&t&&(le(0),f(1,"div",14),w(2,GU,10,7,"div",15),g(),w(3,WU,2,1,"div",16),w(4,YU,2,1,"div",17),ce()),2&t){const e=m(2);v(2),_("ngForOf",e.months),v(1),_("ngIf","month"===e.currentView),v(1),_("ngIf","year"===e.currentView)}}function ZU(t,n){1&t&&(le(0),I(1,"0"),ce())}function JU(t,n){1&t&&(le(0),I(1,"0"),ce())}function QU(t,n){if(1&t&&(f(0,"div",58),f(1,"span"),I(2),g(),g()),2&t){const e=m(3);v(2),Se(e.timeSeparator)}}function XU(t,n){1&t&&(le(0),I(1,"0"),ce())}function e4(t,n){if(1&t){const e=j();f(0,"div",63),f(1,"button",55),k("keydown",function(r){return T(e),m(3).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),m(3).incrementSecond(r)})("keydown.space",function(r){return T(e),m(3).incrementSecond(r)})("mousedown",function(r){return T(e),m(3).onTimePickerElementMouseDown(r,2,1)})("mouseup",function(r){return T(e),m(3).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),m(3).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),m(3).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),m(3).onTimePickerElementMouseLeave()}),z(2,"span",56),g(),f(3,"span"),w(4,XU,2,0,"ng-container",11),I(5),g(),f(6,"button",55),k("keydown",function(r){return T(e),m(3).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),m(3).decrementSecond(r)})("keydown.space",function(r){return T(e),m(3).decrementSecond(r)})("mousedown",function(r){return T(e),m(3).onTimePickerElementMouseDown(r,2,-1)})("mouseup",function(r){return T(e),m(3).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),m(3).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),m(3).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),m(3).onTimePickerElementMouseLeave()}),z(7,"span",57),g(),g()}if(2&t){const e=m(3);v(4),_("ngIf",e.currentSecond<10),v(1),Se(e.currentSecond)}}function t4(t,n){if(1&t){const e=j();f(0,"div",64),f(1,"button",65),k("keydown",function(r){return T(e),m(3).onContainerButtonKeydown(r)})("click",function(r){return T(e),m(3).toggleAMPM(r)})("keydown.enter",function(r){return T(e),m(3).toggleAMPM(r)}),z(2,"span",56),g(),f(3,"span"),I(4),g(),f(5,"button",65),k("keydown",function(r){return T(e),m(3).onContainerButtonKeydown(r)})("click",function(r){return T(e),m(3).toggleAMPM(r)})("keydown.enter",function(r){return T(e),m(3).toggleAMPM(r)}),z(6,"span",57),g(),g()}if(2&t){const e=m(3);v(4),Se(e.pm?"PM":"AM")}}function n4(t,n){if(1&t){const e=j();f(0,"div",53),f(1,"div",54),f(2,"button",55),k("keydown",function(r){return T(e),m(2).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),m(2).incrementHour(r)})("keydown.space",function(r){return T(e),m(2).incrementHour(r)})("mousedown",function(r){return T(e),m(2).onTimePickerElementMouseDown(r,0,1)})("mouseup",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),m(2).onTimePickerElementMouseLeave()}),z(3,"span",56),g(),f(4,"span"),w(5,ZU,2,0,"ng-container",11),I(6),g(),f(7,"button",55),k("keydown",function(r){return T(e),m(2).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),m(2).decrementHour(r)})("keydown.space",function(r){return T(e),m(2).decrementHour(r)})("mousedown",function(r){return T(e),m(2).onTimePickerElementMouseDown(r,0,-1)})("mouseup",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),m(2).onTimePickerElementMouseLeave()}),z(8,"span",57),g(),g(),f(9,"div",58),f(10,"span"),I(11),g(),g(),f(12,"div",59),f(13,"button",55),k("keydown",function(r){return T(e),m(2).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),m(2).incrementMinute(r)})("keydown.space",function(r){return T(e),m(2).incrementMinute(r)})("mousedown",function(r){return T(e),m(2).onTimePickerElementMouseDown(r,1,1)})("mouseup",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),m(2).onTimePickerElementMouseLeave()}),z(14,"span",56),g(),f(15,"span"),w(16,JU,2,0,"ng-container",11),I(17),g(),f(18,"button",55),k("keydown",function(r){return T(e),m(2).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),m(2).decrementMinute(r)})("keydown.space",function(r){return T(e),m(2).decrementMinute(r)})("mousedown",function(r){return T(e),m(2).onTimePickerElementMouseDown(r,1,-1)})("mouseup",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),m(2).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),m(2).onTimePickerElementMouseLeave()}),z(19,"span",57),g(),g(),w(20,QU,3,1,"div",60),w(21,e4,8,2,"div",61),w(22,t4,7,1,"div",62),g()}if(2&t){const e=m(2);v(5),_("ngIf",e.currentHour<10),v(1),Se(e.currentHour),v(5),Se(e.timeSeparator),v(5),_("ngIf",e.currentMinute<10),v(1),Se(e.currentMinute),v(3),_("ngIf",e.showSeconds),v(1),_("ngIf",e.showSeconds),v(1),_("ngIf","12"==e.hourFormat)}}const gD=function(t){return[t]};function r4(t,n){if(1&t){const e=j();f(0,"div",66),f(1,"button",67),k("keydown",function(r){return T(e),m(2).onContainerButtonKeydown(r)})("click",function(r){return T(e),m(2).onTodayButtonClick(r)}),g(),f(2,"button",67),k("keydown",function(r){return T(e),m(2).onContainerButtonKeydown(r)})("click",function(r){return T(e),m(2).onClearButtonClick(r)}),g(),g()}if(2&t){const e=m(2);v(1),_("label",e.getTranslation("today"))("ngClass",q(4,gD,e.todayButtonStyleClass)),v(1),_("label",e.getTranslation("clear"))("ngClass",q(6,gD,e.clearButtonStyleClass))}}function o4(t,n){1&t&&W(0)}const s4=function(t,n,e,i,r,o){return{"p-datepicker p-component":!0,"p-datepicker-inline":t,"p-disabled":n,"p-datepicker-timeonly":e,"p-datepicker-multiple-month":i,"p-datepicker-monthpicker":r,"p-datepicker-touch-ui":o}},mD=function(t,n){return{showTransitionParams:t,hideTransitionParams:n}},a4=function(t){return{value:"visibleTouchUI",params:t}},l4=function(t){return{value:"visible",params:t}};function c4(t,n){if(1&t){const e=j();f(0,"div",8,9),k("@overlayAnimation.start",function(r){return T(e),m().onOverlayAnimationStart(r)})("@overlayAnimation.done",function(r){return T(e),m().onOverlayAnimationDone(r)})("click",function(r){return T(e),m().onOverlayClick(r)}),ds(2),w(3,EU,1,0,"ng-container",10),w(4,qU,5,3,"ng-container",11),w(5,n4,23,8,"div",12),w(6,r4,3,8,"div",13),ds(7,1),w(8,o4,1,0,"ng-container",10),g()}if(2&t){const e=m();Pe(e.panelStyleClass),_("ngStyle",e.panelStyle)("ngClass",ao(11,s4,e.inline,e.disabled,e.timeOnly,e.numberOfMonths>1,"month"===e.view,e.touchUI))("@overlayAnimation",e.touchUI?q(21,a4,He(18,mD,e.showTransitionOptions,e.hideTransitionOptions)):q(26,l4,He(23,mD,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0===e.inline),v(3),_("ngTemplateOutlet",e.headerTemplate),v(1),_("ngIf",!e.timeOnly),v(1),_("ngIf",e.showTime||e.timeOnly),v(1),_("ngIf",e.showButtonBar),v(2),_("ngTemplateOutlet",e.footerTemplate)}}const u4=[[["p-header"]],[["p-footer"]]],d4=function(t,n,e,i){return{"p-calendar":!0,"p-calendar-w-btn":t,"p-calendar-timeonly":n,"p-calendar-disabled":e,"p-focus":i}},h4=["p-header","p-footer"],p4={provide:St,useExisting:pe(()=>f4),multi:!0};let f4=(()=>{class t{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.config=s,this.overlayService=a,this.multipleSeparator=",",this.rangeSeparator="-",this.inline=!1,this.showOtherMonths=!0,this.icon="pi pi-calendar",this.shortYearCutoff="+10",this.hourFormat="24",this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.showOnFocus=!0,this.showWeek=!1,this.dataType="date",this.selectionMode="single",this.todayButtonStyleClass="p-button-text",this.clearButtonStyleClass="p-button-text",this.autoZIndex=!0,this.baseZIndex=0,this.keepInvalid=!1,this.hideOnDateTimeSelect=!0,this.timeSeparator=":",this.focusTrap=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onFocus=new N,this.onBlur=new N,this.onClose=new N,this.onSelect=new N,this.onInput=new N,this.onTodayClick=new N,this.onClearClick=new N,this.onMonthChange=new N,this.onYearChange=new N,this.onClickOutside=new N,this.onShow=new N,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.inputFieldValue=null,this.navigationState=null,this._numberOfMonths=1,this._view="date",this.convertTo24Hour=function(l,c){return"12"==this.hourFormat?12===l?c?12:0:c?l+12:l:l}}set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):this.focus||this.initFocusableCell())}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){const i=e||new Date;this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.initTime(i),this.createMonths(this.currentMonth,this.currentYear)}}get minDate(){return this._minDate}set minDate(e){this._minDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(e){if(this._yearRange=e,e){const i=e.split(":"),r=parseInt(i[0]),o=parseInt(i[1]);this.populateYearOptions(r,o)}}get showTime(){return this._showTime}set showTime(e){this._showTime=e,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()}get locale(){return this._locale}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}set locale(e){console.warn("Locale property has no effect, use new i18n API instead.")}ngOnInit(){this.attributeSelector=uf();const e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.currentView=this.view,"date"===this.view&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays()}),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){default:this.dateTemplate=e.template;break;case"decade":this.decadeTemplate=e.template;break;case"disabledDate":this.disabledDateTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),this.disabled||(this.initFocusableCell(),1===this.numberOfMonths&&(this.contentViewChild.nativeElement.style.width=E.getOuterWidth(this.containerViewChild.nativeElement)+"px")))}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,i){this.yearOptions=[];for(let r=e;r<=i;r++)this.yearOptions.push(r)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),i=this.getTranslation(Sn.DAY_NAMES_MIN);for(let r=0;r<7;r++)this.weekDays.push(i[e]),e=6==e?0:++e}monthPickerValues(){let e=[];for(let i=0;i<=11;i++)e.push(this.config.getTranslation("monthNamesShort")[i]);return e}yearPickerValues(){let e=[],i=this.currentYear-this.currentYear%10;for(let r=0;r<10;r++)e.push(i+r);return e}createMonths(e,i){this.months=this.months=[];for(let r=0;r11&&(o=o%11-1,s=i+1),this.months.push(this.createMonth(o,s))}}getWeekNumber(e){let i=new Date(e.getTime());i.setDate(i.getDate()+4-(i.getDay()||7));let r=i.getTime();return i.setMonth(0),i.setDate(1),Math.floor(Math.round((r-i.getTime())/864e5)/7)+1}createMonth(e,i){let r=[],o=this.getFirstDayOfMonthIndex(e,i),s=this.getDaysCountInMonth(e,i),a=this.getDaysCountInPrevMonth(e,i),l=1,c=new Date,u=[],d=Math.ceil((s+o)/7);for(let h=0;hs){let C=this.getNextMonthAndYear(e,i);p.push({day:l-s,month:C.month,year:C.year,otherMonth:!0,today:this.isToday(c,l-s,C.month,C.year),selectable:this.isSelectable(l-s,C.month,C.year,!0)})}else p.push({day:l,month:e,year:i,today:this.isToday(c,l,e,i),selectable:this.isSelectable(l,e,i,!1)});l++}this.showWeek&&u.push(this.getWeekNumber(new Date(p[0].year,p[0].month,p[0].day))),r.push(p)}return{month:e,year:i,dates:r,weekNumbers:u}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(0===this.currentMonth?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}navForward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(11===this.currentMonth?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}decrementYear(){if(this.currentYear--,this.yearNavigator&&this.currentYearthis.yearOptions[this.yearOptions.length-1]){let e=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+e,this.yearOptions[this.yearOptions.length-1]+e)}}switchToMonthView(e){this.currentView="month",e.preventDefault()}switchToYearView(e){this.currentView="year",e.preventDefault()}onDateSelect(e,i){!this.disabled&&i.selectable?(this.isMultipleSelection()&&this.isSelected(i)?(this.value=this.value.filter((r,o)=>!this.isDateEquals(r,i)),0===this.value.length&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(i)&&this.selectDate(i),this.isSingleSelection()&&this.hideOnDateTimeSelect&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()):e.preventDefault()}shouldSelectDate(e){return!this.isMultipleSelection()||null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0)}onMonthSelect(e,i){"month"===this.view?this.onDateSelect(e,{year:this.currentYear,month:i,day:1,selectable:!0}):(this.currentMonth=i,this.currentView="date",this.createMonths(this.currentMonth,this.currentYear),this.cd.markForCheck(),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,i){"year"===this.view?this.onDateSelect(e,{year:i,month:0,day:1,selectable:!0}):(this.currentYear=i,this.currentView="month",this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value)if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let i=0;i11,this.currentHour=e>=12?12==e?12:e-12:0==e?12:e):this.currentHour=e}selectDate(e){let i=new Date(e.year,e.month,e.day);if(this.showTime&&(i.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),i.setMinutes(this.currentMinute),i.setSeconds(this.currentSecond)),this.minDate&&this.minDate>i&&(i=this.minDate,this.setCurrentHourPM(i.getHours()),this.currentMinute=i.getMinutes(),this.currentSecond=i.getSeconds()),this.maxDate&&this.maxDate=r.getTime()?o=i:(r=i,o=null),this.updateModel([r,o])}else this.updateModel([i,null]);this.onSelect.emit(i)}updateModel(e){if(this.value=e,"date"==this.dataType)this.onModelChange(this.value);else if("string"==this.dataType)if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let i=null;this.value&&(i=this.value.map(r=>this.formatDateTime(r))),this.onModelChange(i)}}getFirstDayOfMonthIndex(e,i){let r=new Date;r.setDate(1),r.setMonth(e),r.setFullYear(i);let o=r.getDay()+this.getSundayIndex();return o>=7?o-7:o}getDaysCountInMonth(e,i){return 32-this.daylightSavingAdjust(new Date(i,e,32)).getDate()}getDaysCountInPrevMonth(e,i){let r=this.getPreviousMonthAndYear(e,i);return this.getDaysCountInMonth(r.month,r.year)}getPreviousMonthAndYear(e,i){let r,o;return 0===e?(r=11,o=i-1):(r=e-1,o=i),{month:r,year:o}}getNextMonthAndYear(e,i){let r,o;return 11===e?(r=0,o=i+1):(r=e+1,o=i),{month:r,year:o}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let i=!1;for(let r of this.value)if(i=this.isDateEquals(r,e),i)break;return i}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e):void 0}isComparable(){return null!=this.value&&"string"!=typeof this.value}isMonthSelected(e){if(this.isComparable()){let i=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&i.getMonth()===e&&i.getFullYear()===this.currentYear}return!1}isYearSelected(e){if(this.isComparable()){let i=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&i.getFullYear()===e}return!1}isDateEquals(e,i){return!!(e&&e instanceof Date)&&e.getDate()===i.day&&e.getMonth()===i.month&&e.getFullYear()===i.year}isDateBetween(e,i,r){if(e&&i){let s=new Date(r.year,r.month,r.day);return e.getTime()<=s.getTime()&&i.getTime()>=s.getTime()}return!1}isSingleSelection(){return"single"===this.selectionMode}isRangeSelection(){return"range"===this.selectionMode}isMultipleSelection(){return"multiple"===this.selectionMode}isToday(e,i,r,o){return e.getDate()===i&&e.getMonth()===r&&e.getFullYear()===o}isSelectable(e,i,r,o){let s=!0,a=!0,l=!0,c=!0;return!(o&&!this.selectOtherMonths)&&(this.minDate&&(this.minDate.getFullYear()>r||this.minDate.getFullYear()===r&&(this.minDate.getMonth()>i||this.minDate.getMonth()===i&&this.minDate.getDate()>e))&&(s=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.disabled}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:this.inline||this.trapFocus(e);break;case 27:this.overlayVisible=!1,e.preventDefault()}}onInputKeydown(e){this.isKeydown=!0,40===e.keyCode&&this.contentViewChild?this.trapFocus(e):27===e.keyCode||13===e.keyCode?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):9===e.keyCode&&this.contentViewChild&&(E.getFocusableElements(this.contentViewChild.nativeElement).forEach(i=>i.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,i,r){const o=e.currentTarget,s=o.parentElement;switch(e.which){case 40:{o.tabIndex="-1";let a=E.index(s),l=s.parentElement.nextElementSibling;l?E.hasClass(l.children[a].children[0],"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(l.children[a].children[0].tabIndex="0",l.children[a].children[0].focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 38:{o.tabIndex="-1";let a=E.index(s),l=s.parentElement.previousElementSibling;if(l){let c=l.children[a].children[0];E.hasClass(c,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(c.tabIndex="0",c.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{o.tabIndex="-1";let a=s.previousElementSibling;if(a){let l=a.children[0];E.hasClass(l,"p-disabled")||E.hasClass(l.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,r):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!0,r);e.preventDefault();break}case 39:{o.tabIndex="-1";let a=s.nextElementSibling;if(a){let l=a.children[0];E.hasClass(l,"p-disabled")?this.navigateToMonth(!1,r):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!1,r);e.preventDefault();break}case 13:case 32:this.onDateSelect(e,i),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onMonthCellKeydown(e,i){const r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=E.index(r);let a=o[40===e.which?s+3:s-3];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:this.onMonthSelect(e,i),e.preventDefault();break;case 13:case 32:case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onYearCellKeydown(e,i){const r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=E.index(r);let a=o[40===e.which?s+2:s-2];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:this.onYearSelect(e,i),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.trapFocus(e)}}navigateToMonth(e,i){if(e)if(1===this.numberOfMonths||0===i)this.navigationState={backward:!0},this.navBackward(event);else{let o=E.find(this.contentViewChild.nativeElement.children[i-1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),s=o[o.length-1];s.tabIndex="0",s.focus()}else if(1===this.numberOfMonths||i===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let o=E.findSingle(this.contentViewChild.nativeElement.children[i+1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");o.tabIndex="0",o.focus()}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?E.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():E.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let i;i=E.find(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),i&&i.length>0&&(e=i[i.length-1])}else e=E.findSingle(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){let e;if("month"===this.currentView){let i=E.find(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),r=E.findSingle(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month.p-highlight");i.forEach(o=>o.tabIndex=-1),e=r||i[0],0===i.length&&E.find(this.contentViewChild.nativeElement,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if("year"===this.currentView){let i=E.find(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),r=E.findSingle(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year.p-highlight");i.forEach(o=>o.tabIndex=-1),e=r||i[0],0===i.length&&E.find(this.contentViewChild.nativeElement,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(e=E.findSingle(this.contentViewChild.nativeElement,"span.p-highlight"),!e){let i=E.findSingle(this.contentViewChild.nativeElement,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");e=i||E.findSingle(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}e&&(e.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{e.focus()},1),this.preventFocus=!1)}trapFocus(e){let i=E.getFocusableElements(this.contentViewChild.nativeElement);if(i&&i.length>0)if(i[0].ownerDocument.activeElement){let r=i.indexOf(i[0].ownerDocument.activeElement);if(e.shiftKey)if(-1==r||0===r)if(this.focusTrap)i[i.length-1].focus();else{if(-1===r)return this.hideOverlay();if(0===r)return}else i[r-1].focus();else if(-1==r||r===i.length-1){if(!this.focusTrap&&-1!=r)return this.hideOverlay();i[0].focus()}else i[r+1].focus()}else i[0].focus();e.preventDefault()}onMonthDropdownChange(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}validateTime(e,i,r,o){let s=this.value;const a=this.convertTo24Hour(e,o);this.isRangeSelection()&&(s=this.value[1]||this.value[0]),this.isMultipleSelection()&&(s=this.value[this.value.length-1]);const l=s?s.toDateString():null;return!(this.minDate&&l&&this.minDate.toDateString()===l&&(this.minDate.getHours()>a||this.minDate.getHours()===a&&(this.minDate.getMinutes()>i||this.minDate.getMinutes()===i&&this.minDate.getSeconds()>r))||this.maxDate&&l&&this.maxDate.toDateString()===l&&(this.maxDate.getHours()=24?r-24:r:"12"==this.hourFormat&&(this.currentHour<12&&r>11&&(o=!this.pm),r=r>=13?r-12:r),this.validateTime(r,this.currentMinute,this.currentSecond,o)&&(this.currentHour=r,this.pm=o),e.preventDefault()}onTimePickerElementMouseDown(e,i,r){this.disabled||(this.repeat(e,null,i,r),e.preventDefault())}onTimePickerElementMouseUp(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,i,r,o){let s=i||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,r,o),this.cd.markForCheck()},s),r){case 0:1===o?this.incrementHour(e):this.decrementHour(e);break;case 1:1===o?this.incrementMinute(e):this.decrementMinute(e);break;case 2:1===o?this.incrementSecond(e):this.decrementSecond(e)}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let i=this.currentHour-this.stepHour,r=this.pm;"24"==this.hourFormat?i=i<0?24+i:i:"12"==this.hourFormat&&(12===this.currentHour&&(r=!this.pm),i=i<=0?12+i:i),this.validateTime(i,this.currentMinute,this.currentSecond,r)&&(this.currentHour=i,this.pm=r),e.preventDefault()}incrementMinute(e){let i=this.currentMinute+this.stepMinute;i=i>59?i-60:i,this.validateTime(this.currentHour,i,this.currentSecond,this.pm)&&(this.currentMinute=i),e.preventDefault()}decrementMinute(e){let i=this.currentMinute-this.stepMinute;i=i<0?60+i:i,this.validateTime(this.currentHour,i,this.currentSecond,this.pm)&&(this.currentMinute=i),e.preventDefault()}incrementSecond(e){let i=this.currentSecond+this.stepSecond;i=i>59?i-60:i,this.validateTime(this.currentHour,this.currentMinute,i,this.pm)&&(this.currentSecond=i),e.preventDefault()}decrementSecond(e){let i=this.currentSecond-this.stepSecond;i=i<0?60+i:i,this.validateTime(this.currentHour,this.currentMinute,i,this.pm)&&(this.currentSecond=i),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,e.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(e=this.value[1]?[this.value[0],e]:[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){const i=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,i)&&(this.pm=i,this.updateTime()),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let i=e.target.value;try{let r=this.parseValueFromString(i);this.isValidSelection(r)&&(this.updateModel(r),this.updateUI())}catch(r){this.updateModel(this.keepInvalid?i:null)}this.filled=null!=i&&i.length,this.onInput.emit(e)}isValidSelection(e){let i=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(i=!1):e.every(r=>this.isSelectable(r.getDate(),r.getMonth(),r.getFullYear(),!1))&&this.isRangeSelection()&&(i=e.length>1&&e[1]>e[0]),i}parseValueFromString(e){if(!e||0===e.trim().length)return null;let i;if(this.isSingleSelection())i=this.parseDateTime(e);else if(this.isMultipleSelection()){let r=e.split(this.multipleSeparator);i=[];for(let o of r)i.push(this.parseDateTime(o.trim()))}else if(this.isRangeSelection()){let r=e.split(" "+this.rangeSeparator+" ");i=[];for(let o=0;o{this.disableModality()}),document.body.appendChild(this.mask),E.addClass(document.body,"p-overflow-hidden"))}disableModality(){this.mask&&(E.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener=this.destroyMask.bind(this),this.mask.addEventListener("animationend",this.animationEndListener))}destroyMask(){document.body.removeChild(this.mask);let i,e=document.body.children;for(let r=0;r{const d=r+1{let p=""+d;if(o(u))for(;p.lengtho(u)?p[d]:h[d];let l="",c=!1;if(e)for(r=0;r11&&12!=r&&(r-=12),i+="12"==this.hourFormat&&0===r?12:r<10?"0"+r:r,i+=":",i+=o<10?"0"+o:o,this.showSeconds&&(i+=":",i+=s<10?"0"+s:s),"12"==this.hourFormat&&(i+=e.getHours()>11?" PM":" AM"),i}parseTime(e){let i=e.split(":");if(i.length!==(this.showSeconds?3:2))throw"Invalid time";let o=parseInt(i[0]),s=parseInt(i[1]),a=this.showSeconds?parseInt(i[2]):null;if(isNaN(o)||isNaN(s)||o>23||s>59||"12"==this.hourFormat&&o>12||this.showSeconds&&(isNaN(a)||a>59))throw"Invalid time";return"12"==this.hourFormat&&(12!==o&&this.pm?o+=12:!this.pm&&12===o&&(o-=12)),{hour:o,minute:s,second:a}}parseDate(e,i){if(null==i||null==e)throw"Invalid arguments";if(""===(e="object"==typeof e?e.toString():e+""))return null;let r,o,s,b,a=0,l="string"!=typeof this.shortYearCutoff?this.shortYearCutoff:(new Date).getFullYear()%100+parseInt(this.shortYearCutoff,10),c=-1,u=-1,d=-1,h=-1,p=!1,C=A=>{let H=r+1{let H=C(A),ne="@"===A?14:"!"===A?20:"y"===A&&H?4:"o"===A?3:2,Yt=new RegExp("^\\d{"+("y"===A?ne:1)+","+ne+"}"),Ze=e.substring(a).match(Yt);if(!Ze)throw"Missing number at position "+a;return a+=Ze[0].length,parseInt(Ze[0],10)},x=(A,H,ne)=>{let qe=-1,Yt=C(A)?ne:H,Ze=[];for(let qt=0;qt-(qt[1].length-bi[1].length));for(let qt=0;qt{if(e.charAt(a)!==i.charAt(r))throw"Unexpected literal at position "+a;a++};for("month"===this.view&&(d=1),r=0;r-1)for(u=1,d=h;o=this.getDaysCountInMonth(c,u-1),!(d<=o);)u++,d-=o;if(b=this.daylightSavingAdjust(new Date(c,u-1,d)),b.getFullYear()!==c||b.getMonth()+1!==u||b.getDate()!==d)throw"Invalid date";return b}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}updateFilledState(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue}onTodayButtonClick(e){let i=new Date,r={day:i.getDate(),month:i.getMonth(),year:i.getFullYear(),otherMonth:i.getMonth()!==this.currentMonth||i.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(e,r),this.onTodayClick.emit(e)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.body.appendChild(this.responsiveStyleElement));let e="";if(this.responsiveOptions){let i=[...this.responsiveOptions].filter(r=>!(!r.breakpoint||!r.numMonths)).sort((r,o)=>-1*r.breakpoint.localeCompare(o.breakpoint,void 0,{numeric:!0}));for(let r=0;r{this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","mousedown",i=>{this.isOutsideClicked(i)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(i),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new cf(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return E.hasClass(e.target,"p-datepicker-prev")||E.hasClass(e.target,"p-datepicker-prev-icon")||E.hasClass(e.target,"p-datepicker-next")||E.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!E.isAndroid()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&ti.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(un),y(ct),y(be),y(Mc),y(df))},t.\u0275cmp=xe({type:t,selectors:[["p-calendar"]],contentQueries:function(e,i,r){if(1&e&&Ve(r,Io,4),2&e){let o;ee(o=te())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Xe(wU,5),Xe(CU,5),Xe(DU,5)),2&e){let r;ee(r=te())&&(i.containerViewChild=r.first),ee(r=te())&&(i.inputfieldViewChild=r.first),ee(r=te())&&(i.content=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(e,i){2&e&&Me("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focus)},inputs:{style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",view:"view",defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[_e([p4])],ngContentSelectors:h4,decls:4,vars:11,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],["type","button","pButton","","pRipple","","class","p-datepicker-trigger","tabindex","0",3,"icon","disabled","click",4,"ngIf"],["type","button","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger",3,"icon","disabled","click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[1,"p-datepicker-next-icon","pi","pi-chevron-right"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],[1,"p-datepicker-prev-icon","pi","pi-chevron-left"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datepicker-calendar-container"],[1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],[3,"ngClass"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"pi","pi-chevron-up"],[1,"pi","pi-chevron-down"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(e,i){1&e&&(nl(u4),f(0,"span",0,1),w(2,TU,3,16,"ng-template",2),w(3,c4,9,28,"div",3),g()),2&e&&(Pe(i.styleClass),_("ngClass",ys(6,d4,i.showIcon,i.timeOnly,i.disabled,i.focus))("ngStyle",i.style),v(2),_("ngIf",!i.inline),v(1),_("ngIf",i.inline||i.overlayVisible))},directives:[dn,pi,nt,oa,Nc,$t,Cn],styles:[".p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}\n"],encapsulation:2,data:{animation:[oD("overlayAnimation",[H3("visibleTouchUI",Hi({transform:"translate(-50%,-50%)",opacity:1})),Ro("void => visible",[Hi({opacity:0,transform:"scaleY(0.8)"}),ko("{{showTransitionParams}}",Hi({opacity:1,transform:"*"}))]),Ro("visible => void",[ko("{{hideTransitionParams}}",Hi({opacity:0}))]),Ro("void => visibleTouchUI",[Hi({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),ko("{{showTransitionParams}}")]),Ro("visibleTouchUI => void",[ko("{{hideTransitionParams}}",Hi({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0}),t})(),g4=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,sa,Bi,Mo],sa,Bi]}),t})();const m4=["container"],_4=["resizeHelper"],v4=["reorderIndicatorUp"],b4=["reorderIndicatorDown"],y4=["wrapper"],w4=["table"],C4=["tableHeader"];function D4(t,n){if(1&t&&(f(0,"div",14),z(1,"i"),g()),2&t){const e=m();v(1),Pe("p-datatable-loading-icon pi-spin "+e.loadingIcon)}}function S4(t,n){1&t&&W(0)}function T4(t,n){if(1&t&&(f(0,"div",15),w(1,S4,1,0,"ng-container",16),g()),2&t){const e=m();v(1),_("ngTemplateOutlet",e.captionTemplate)}}function E4(t,n){if(1&t){const e=j();f(0,"p-paginator",17),k("onPageChange",function(r){return T(e),m().onPageChange(r)}),g()}if(2&t){const e=m();_("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)}}function x4(t,n){1&t&&W(0)}function I4(t,n){1&t&&W(0)}function M4(t,n){if(1&t&&z(0,"tbody",25),2&t){const e=m(2);_("value",e.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",e.frozenBodyTemplate)("frozen",!0)}}function N4(t,n){1&t&&W(0)}const Ui=function(t){return{$implicit:t}};function k4(t,n){if(1&t&&(f(0,"tfoot",26),w(1,N4,1,0,"ng-container",20),g()),2&t){const e=m(2);v(1),_("ngTemplateOutlet",e.footerGroupedTemplate||e.footerTemplate)("ngTemplateOutletContext",q(2,Ui,e.columns))}}function R4(t,n){if(1&t&&(f(0,"table",18,19),w(2,x4,1,0,"ng-container",20),f(3,"thead",21),w(4,I4,1,0,"ng-container",20),g(),w(5,M4,1,5,"tbody",22),z(6,"tbody",23),w(7,k4,2,4,"tfoot",24),g()),2&t){const e=m();_("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),X("id",e.id+"-table"),v(2),_("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",q(12,Ui,e.columns)),v(2),_("ngTemplateOutlet",e.headerGroupedTemplate||e.headerTemplate)("ngTemplateOutletContext",q(14,Ui,e.columns)),v(1),_("ngIf",e.frozenValue||e.frozenBodyTemplate),v(1),_("value",e.dataToRender)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate),v(1),_("ngIf",e.footerGroupedTemplate||e.footerTemplate)}}function O4(t,n){1&t&&W(0)}function A4(t,n){1&t&&W(0)}function F4(t,n){if(1&t&&z(0,"tbody",25),2&t){const e=m(2);_("value",e.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate)("frozen",!0)}}function P4(t,n){1&t&&W(0)}function L4(t,n){if(1&t&&(f(0,"tfoot",26),w(1,P4,1,0,"ng-container",20),g()),2&t){const e=m(2);v(1),_("ngTemplateOutlet",e.footerGroupedTemplate||e.footerTemplate)("ngTemplateOutletContext",q(2,Ui,e.columns))}}function V4(t,n){if(1&t){const e=j();f(0,"cdk-virtual-scroll-viewport",27),k("scrolledIndexChange",function(r){return T(e),m().onScrollIndexChange(r)}),f(1,"table",18,19),w(3,O4,1,0,"ng-container",20),f(4,"thead",21,28),w(6,A4,1,0,"ng-container",20),g(),w(7,F4,1,5,"tbody",22),z(8,"tbody",23),w(9,L4,2,4,"tfoot",24),g(),g()}if(2&t){const e=m();Xi("height","flex"!==e.scrollHeight?e.scrollHeight:void 0),_("itemSize",e.virtualRowHeight)("minBufferPx",e.minBufferPx)("maxBufferPx",e.maxBufferPx),v(1),_("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),X("id",e.id+"-table"),v(2),_("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",q(17,Ui,e.columns)),v(3),_("ngTemplateOutlet",e.headerGroupedTemplate||e.headerTemplate)("ngTemplateOutletContext",q(19,Ui,e.columns)),v(1),_("ngIf",e.frozenValue||e.frozenBodyTemplate),v(1),_("value",e.dataToRender)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate),v(1),_("ngIf",e.footerGroupedTemplate||e.footerTemplate)}}function B4(t,n){if(1&t){const e=j();f(0,"p-paginator",29),k("onPageChange",function(r){return T(e),m().onPageChange(r)}),g()}if(2&t){const e=m();_("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)}}function H4(t,n){1&t&&W(0)}function U4(t,n){if(1&t&&(f(0,"div",30),w(1,H4,1,0,"ng-container",16),g()),2&t){const e=m();v(1),_("ngTemplateOutlet",e.summaryTemplate)}}function j4(t,n){1&t&&z(0,"div",31,32)}function $4(t,n){1&t&&z(0,"span",33,34)}function G4(t,n){1&t&&z(0,"span",35,36)}const z4=function(t,n,e,i,r,o,s,a,l,c,u,d,h,p){return{"p-datatable p-component":!0,"p-datatable-hoverable-rows":t,"p-datatable-auto-layout":n,"p-datatable-resizable":e,"p-datatable-resizable-fit":i,"p-datatable-scrollable":r,"p-datatable-scrollable-vertical":o,"p-datatable-scrollable-horizontal":s,"p-datatable-scrollable-both":a,"p-datatable-flex-scrollable":l,"p-datatable-responsive-stack":c,"p-datatable-responsive-scroll":u,"p-datatable-responsive":d,"p-datatable-grouped-header":h,"p-datatable-grouped-footer":p}},W4=function(t){return{height:t}},K4=["pTableBody",""];function Y4(t,n){1&t&&W(0)}const Bc=function(t,n,e,i,r){return{$implicit:t,rowIndex:n,columns:e,editing:i,frozen:r}};function q4(t,n){if(1&t&&(le(0,3),w(1,Y4,1,0,"ng-container",4),ce()),2&t){const e=m(),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.dt.groupHeaderTemplate)("ngTemplateOutletContext",ws(2,Bc,i,o.dt.paginator?o.dt.first+r:r,o.columns,"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function Z4(t,n){1&t&&W(0)}function J4(t,n){if(1&t&&(le(0),w(1,Z4,1,0,"ng-container",4),ce()),2&t){const e=m(),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",ws(2,Bc,i,o.dt.paginator?o.dt.first+r:r,o.columns,"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function Q4(t,n){1&t&&W(0)}const X4=function(t,n,e,i,r,o,s){return{$implicit:t,rowIndex:n,columns:e,editing:i,frozen:r,rowgroup:o,rowspan:s}};function ej(t,n){if(1&t&&(le(0),w(1,Q4,1,0,"ng-container",4),ce()),2&t){const e=m(),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",function(t,n,e,i,r,o,s,a,l,c){const u=Vt()+t,d=M();let h=vn(d,u,e,i,r,o);return el(d,u+4,s,a,l)||h?Kn(d,u+7,c?n.call(c,e,i,r,o,s,a,l):n(e,i,r,o,s,a,l)):cs(d,u+7)}(2,X4,i,o.dt.paginator?o.dt.first+r:r,o.columns,"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen,o.shouldRenderRowspan(o.value,i,r),o.calculateRowGroupSize(o.value,i,r)))}}function tj(t,n){1&t&&W(0)}function nj(t,n){if(1&t&&(le(0,3),w(1,tj,1,0,"ng-container",4),ce()),2&t){const e=m(),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.dt.groupFooterTemplate)("ngTemplateOutletContext",ws(2,Bc,i,o.dt.paginator?o.dt.first+r:r,o.columns,"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function ij(t,n){if(1&t&&(w(0,q4,2,8,"ng-container",2),w(1,J4,2,8,"ng-container",0),w(2,ej,2,10,"ng-container",0),w(3,nj,2,8,"ng-container",2)),2&t){const e=n.$implicit,i=n.index,r=m(2);_("ngIf",r.dt.groupHeaderTemplate&&"subheader"===r.dt.rowGroupMode&&r.shouldRenderRowGroupHeader(r.value,e,i)),v(1),_("ngIf","rowspan"!==r.dt.rowGroupMode),v(1),_("ngIf","rowspan"===r.dt.rowGroupMode),v(1),_("ngIf",r.dt.groupFooterTemplate&&"subheader"===r.dt.rowGroupMode&&r.shouldRenderRowGroupFooter(r.value,e,i))}}function rj(t,n){if(1&t&&(le(0),w(1,ij,4,4,"ng-template",1),ce()),2&t){const e=m();v(1),_("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function oj(t,n){1&t&&W(0)}function sj(t,n){if(1&t&&w(0,oj,1,0,"ng-container",4),2&t){const e=n.$implicit,i=n.index,r=m(2);_("ngTemplateOutlet",e?r.template:r.dt.loadingBodyTemplate)("ngTemplateOutletContext",ws(2,Bc,e,r.dt.paginator?r.dt.first+i:i,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(e),r.frozen))}}function aj(t,n){if(1&t&&(le(0),w(1,sj,1,8,"ng-template",5),ce()),2&t){const e=m();v(1),_("cdkVirtualForOf",e.dt.filteredValue||e.dt.value)("cdkVirtualForTrackBy",e.dt.rowTrackBy)("cdkVirtualForTemplateCacheSize",0)}}function lj(t,n){1&t&&W(0)}const Hc=function(t,n,e,i,r,o){return{$implicit:t,rowIndex:n,columns:e,expanded:i,editing:r,frozen:o}};function cj(t,n){if(1&t&&(le(0),w(1,lj,1,0,"ng-container",4),ce()),2&t){const e=m(),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",ao(2,Hc,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.dt.isRowExpanded(i),"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function uj(t,n){1&t&&W(0)}function dj(t,n){if(1&t&&(le(0,3),w(1,uj,1,0,"ng-container",4),ce()),2&t){const e=m(),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.dt.groupHeaderTemplate)("ngTemplateOutletContext",ao(2,Hc,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.dt.isRowExpanded(i),"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function hj(t,n){1&t&&W(0)}function pj(t,n){1&t&&W(0)}function fj(t,n){if(1&t&&(le(0,3),w(1,pj,1,0,"ng-container",4),ce()),2&t){const e=m(2),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.dt.groupFooterTemplate)("ngTemplateOutletContext",ao(2,Hc,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.dt.isRowExpanded(i),"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}const _D=function(t,n,e,i){return{$implicit:t,rowIndex:n,columns:e,frozen:i}};function gj(t,n){if(1&t&&(le(0),w(1,hj,1,0,"ng-container",4),w(2,fj,2,9,"ng-container",2),ce()),2&t){const e=m(),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.dt.expandedRowTemplate)("ngTemplateOutletContext",ys(3,_D,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.frozen)),v(1),_("ngIf",o.dt.groupFooterTemplate&&"subheader"===o.dt.rowGroupMode&&o.shouldRenderRowGroupFooter(o.value,i,r))}}function mj(t,n){if(1&t&&(w(0,cj,2,9,"ng-container",0),w(1,dj,2,9,"ng-container",2),w(2,gj,3,8,"ng-container",0)),2&t){const e=n.$implicit,i=n.index,r=m(2);_("ngIf",!r.dt.groupHeaderTemplate),v(1),_("ngIf",r.dt.groupHeaderTemplate&&"subheader"===r.dt.rowGroupMode&&r.shouldRenderRowGroupHeader(r.value,e,i)),v(1),_("ngIf",r.dt.isRowExpanded(e))}}function _j(t,n){if(1&t&&(le(0),w(1,mj,3,3,"ng-template",1),ce()),2&t){const e=m();v(1),_("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function vj(t,n){1&t&&W(0)}function bj(t,n){1&t&&W(0)}function yj(t,n){if(1&t&&(le(0),w(1,bj,1,0,"ng-container",4),ce()),2&t){const e=m(),i=e.$implicit,r=e.index,o=m(2);v(1),_("ngTemplateOutlet",o.dt.frozenExpandedRowTemplate)("ngTemplateOutletContext",ys(2,_D,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.frozen))}}function wj(t,n){if(1&t&&(w(0,vj,1,0,"ng-container",4),w(1,yj,2,7,"ng-container",0)),2&t){const e=n.$implicit,i=n.index,r=m(2);_("ngTemplateOutlet",r.template)("ngTemplateOutletContext",ao(3,Hc,e,r.dt.paginator?r.dt.first+i:i,r.columns,r.dt.isRowExpanded(e),"row"===r.dt.editMode&&r.dt.isRowEditing(e),r.frozen)),v(1),_("ngIf",r.dt.isRowExpanded(e))}}function Cj(t,n){if(1&t&&(le(0),w(1,wj,2,10,"ng-template",1),ce()),2&t){const e=m();v(1),_("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function Dj(t,n){1&t&&W(0)}const vD=function(t,n){return{$implicit:t,frozen:n}};function Sj(t,n){if(1&t&&(le(0),w(1,Dj,1,0,"ng-container",4),ce()),2&t){const e=m();v(1),_("ngTemplateOutlet",e.dt.loadingBodyTemplate)("ngTemplateOutletContext",He(2,vD,e.columns,e.frozen))}}function Tj(t,n){1&t&&W(0)}function Ej(t,n){if(1&t&&(le(0),w(1,Tj,1,0,"ng-container",4),ce()),2&t){const e=m();v(1),_("ngTemplateOutlet",e.dt.emptyMessageTemplate)("ngTemplateOutletContext",He(2,vD,e.columns,e.frozen))}}let Df=(()=>{class t{constructor(){this.sortSource=new se,this.selectionSource=new se,this.contextMenuSource=new se,this.valueSource=new se,this.totalRecordsSource=new se,this.columnsSource=new se,this.resetSource=new se,this.sortSource$=this.sortSource.asObservable(),this.selectionSource$=this.selectionSource.asObservable(),this.contextMenuSource$=this.contextMenuSource.asObservable(),this.valueSource$=this.valueSource.asObservable(),this.totalRecordsSource$=this.totalRecordsSource.asObservable(),this.columnsSource$=this.columnsSource.asObservable(),this.resetSource$=this.resetSource.asObservable()}onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onResetChange(){this.resetSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onValueChange(e){this.valueSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}onColumnsChange(e){this.columnsSource.next(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Sf=(()=>{class t{constructor(e,i,r,o,s,a){this.el=e,this.zone=i,this.tableService=r,this.cd=o,this.filterService=s,this.overlayService=a,this.pageLinks=5,this.alwaysShowPaginator=!0,this.paginatorPosition="bottom",this.paginatorDropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.showPageLinks=!0,this.defaultSortOrder=1,this.sortMode="single",this.resetPageOnSort=!0,this.selectAllChange=new N,this.selectionChange=new N,this.contextMenuSelectionChange=new N,this.contextMenuSelectionMode="separate",this.rowTrackBy=(l,c)=>c,this.lazy=!1,this.lazyLoadOnInit=!0,this.compareSelectionBy="deepEquals",this.csvSeparator=",",this.exportFilename="download",this.filters={},this.filterDelay=300,this.expandedRowKeys={},this.editingRowKeys={},this.rowExpandMode="multiple",this.scrollDirection="vertical",this.virtualScrollDelay=250,this.virtualRowHeight=28,this.columnResizeMode="fit",this.loadingIcon="pi pi-spinner",this.showLoader=!0,this.showInitialSortBadge=!0,this.stateStorage="session",this.editMode="cell",this.groupRowsByOrder=1,this.responsiveLayout="stack",this.breakpoint="960px",this.onRowSelect=new N,this.onRowUnselect=new N,this.onPage=new N,this.onSort=new N,this.onFilter=new N,this.onLazyLoad=new N,this.onRowExpand=new N,this.onRowCollapse=new N,this.onContextMenuSelect=new N,this.onColResize=new N,this.onColReorder=new N,this.onRowReorder=new N,this.onEditInit=new N,this.onEditComplete=new N,this.onEditCancel=new N,this.onHeaderCheckboxToggle=new N,this.sortFunction=new N,this.firstChange=new N,this.rowsChange=new N,this.onStateSave=new N,this.onStateRestore=new N,this._value=[],this._totalRecords=0,this._first=0,this.selectionKeys={},this._sortOrder=1,this._selectAll=null,this.columnResizing=!1,this.rowGroupHeaderStyleObject={},this.id=uf()}ngOnInit(){this.lazy&&this.lazyLoadOnInit&&(this.virtualScroll||this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.restoringFilter&&(this.restoringFilter=!1)),"stack"===this.responsiveLayout&&!this.scrollable&&this.createResponsiveStyle(),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"headergrouped":this.headerGroupedTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"loadingbody":this.loadingBodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"footergrouped":this.footerGroupedTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"rowexpansion":this.expandedRowTemplate=e.template;break;case"groupheader":this.groupHeaderTemplate=e.template;break;case"rowspan":this.rowspanTemplate=e.template;break;case"groupfooter":this.groupFooterTemplate=e.template;break;case"frozenrows":this.frozenRowsTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"frozenrowexpansion":this.frozenExpandedRowTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template}})}ngAfterViewInit(){this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths(),this.scrollable&&this.virtualScroll&&(this.virtualScrollSubscription=this.virtualScrollBody.renderedRangeStream.subscribe(e=>{this.tableHeaderViewChild.nativeElement.style.top=e.start*this.virtualRowHeight*-1+"px"}))}ngOnChanges(e){e.value&&(this.isStateful()&&!this.stateRestored&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,"single"==this.sortMode&&(this.sortField||this.groupRowsBy)?this.sortSingle():"multiple"==this.sortMode&&(this.multiSortMeta||this.groupRowsBy)?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&this.restoreColumnOrder()),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle()),e.groupRowsBy&&(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle(),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle()),e.groupRowsByOrder&&(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle(),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,"multiple"===this.sortMode&&(this.initialized||!this.lazy&&!this.virtualScroll)&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1),e.selectAll&&(this._selectAll=e.selectAll.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()),this.preventSelectionSetterPropagation=!1)}get value(){return this._value}set value(e){this._value=e}get columns(){return this._columns}set columns(e){this._columns=e}get first(){return this._first}set first(e){this._first=e}get rows(){return this._rows}set rows(e){this._rows=e}get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get selectAll(){return this._selection}set selectAll(e){this._selection=e}get dataToRender(){let e=this.filteredValue||this.value;return e?this.paginator&&!this.lazy?e.slice(this.first,this.first+this.rows):e:[]}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(B.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(B.resolveFieldData(this._selection,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.onPage.emit({first:this.first,rows:this.rows}),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()}sort(e){let i=e.originalEvent;if("single"===this.sortMode&&(this._sortOrder=this.sortField===e.field?-1*this.sortOrder:this.defaultSortOrder,this._sortField=e.field,this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop()),this.sortSingle()),"multiple"===this.sortMode){let r=i.metaKey||i.ctrlKey,o=this.getSortMeta(e.field);o?r?o.order=-1*o.order:(this._multiSortMeta=[{field:e.field,order:-1*o.order}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!r||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null}sortSingle(){let e=this.sortField||this.groupRowsBy,i=this.sortField?this.sortOrder:this.groupRowsByOrder;if(this.groupRowsBy&&this.sortField&&this.groupRowsBy!==this.sortField)return this._multiSortMeta=[this.getGroupRowsMeta(),{field:this.sortField,order:this.sortOrder}],void this.sortMultiple();if(e&&i){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:e,order:i}):(this.value.sort((o,s)=>{let a=B.resolveFieldData(o,e),l=B.resolveFieldData(s,e),c=null;return c=null==a&&null!=l?-1:null!=a&&null==l?1:null==a&&null==l?0:"string"==typeof a&&"string"==typeof l?a.localeCompare(l):al?1:0,i*c}),this._value=[...this.value]),this.hasFilter()&&this._filter());let r={field:e,order:i};this.onSort.emit(r),this.tableService.onSort(r)}}sortMultiple(){this.groupRowsBy&&(this._multiSortMeta?this.multiSortMeta[0].field!==this.groupRowsBy&&(this._multiSortMeta=[this.getGroupRowsMeta(),...this._multiSortMeta]):this._multiSortMeta=[this.getGroupRowsMeta()]),this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((e,i)=>this.multisortField(e,i,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,i,r,o){let s=B.resolveFieldData(e,r[o].field),a=B.resolveFieldData(i,r[o].field),l=null;if(null==s&&null!=a)l=-1;else if(null!=s&&null==a)l=1;else if(null==s&&null==a)l=0;else if("string"==typeof s||s instanceof String){if(s.localeCompare&&s!=a)return r[o].order*s.localeCompare(a)}else l=so?this.multisortField(e,i,r,o+1):0:r[o].order*l}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length)for(let i=0;ib!=h),this.selectionChange.emit(this.selection),u&&delete this.selectionKeys[u]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row"})}else this.isSingleSelectionMode()?(this._selection=s,this.selectionChange.emit(s),u&&(this.selectionKeys={},this.selectionKeys[u]=1)):this.isMultipleSelectionMode()&&(d?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,s],this.selectionChange.emit(this.selection),u&&(this.selectionKeys[u]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a})}else if("single"===this.selectionMode)l?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a})):(this._selection=s,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a}),u&&(this.selectionKeys={},this.selectionKeys[u]=1));else if("multiple"===this.selectionMode)if(l){let d=this.findIndexInSelection(s);this._selection=this.selection.filter((h,p)=>p!=d),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a}),u&&delete this.selectionKeys[u]}else this._selection=this.selection?[...this.selection,s]:[s],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a}),u&&(this.selectionKeys[u]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){const i=e.rowData,r=e.rowIndex;if("separate"===this.contextMenuSelectionMode)this.contextMenuSelection=i,this.contextMenuSelectionChange.emit(i),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:i,index:e.rowIndex}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(i);else if("joint"===this.contextMenuSelectionMode){this.preventSelectionSetterPropagation=!0;let o=this.isSelected(i),s=this.dataKey?String(B.resolveFieldData(i,this.dataKey)):null;if(!o){if(!this.isRowSelectable(i,r))return;this.isSingleSelectionMode()?(this.selection=i,this.selectionChange.emit(i),s&&(this.selectionKeys={},this.selectionKeys[s]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,i]:[i],this.selectionChange.emit(this.selection),s&&(this.selectionKeys[s]=1))}this.tableService.onSelectionChange(),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e,data:i,index:e.rowIndex})}}}selectRange(e,i){let r,o;this.anchorRowIndex>i?(r=i,o=this.anchorRowIndex):this.anchorRowIndexthis.anchorRowIndex?(i=this.anchorRowIndex,r=this.rangeRowIndex):this.rangeRowIndexu!=a);let l=this.dataKey?String(B.resolveFieldData(s,this.dataKey)):null;l&&delete this.selectionKeys[l],this.onRowUnselect.emit({originalEvent:e,data:s,type:"row"})}}isSelected(e){return!(!e||!this.selection)&&(this.dataKey?void 0!==this.selectionKeys[B.resolveFieldData(e,this.dataKey)]:this.selection instanceof Array?this.findIndexInSelection(e)>-1:this.equals(e,this.selection))}findIndexInSelection(e){let i=-1;if(this.selection&&this.selection.length)for(let r=0;rl!=s),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:i,type:"checkbox"}),o&&delete this.selectionKeys[o]}else{if(!this.isRowSelectable(i,e.rowIndex))return;this._selection=this.selection?[...this.selection,i]:[i],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:i,type:"checkbox"}),o&&(this.selectionKeys[o]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox(e,i){if(null!==this._selectAll)this.selectAllChange.emit({originalEvent:e,checked:i});else{const r=this.selectionPageOnly?this.dataToRender:this.filteredValue||this.value||[];let o=this.selectionPageOnly&&this._selection?this._selection.filter(s=>!r.some(a=>this.equals(s,a))):[];i&&(o=this.frozenValue?[...o,...this.frozenValue,...r]:[...o,...r],o=this.rowSelectable?o.filter((s,a)=>this.rowSelectable({data:s,index:a})):o),this._selection=o,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:i}),this.isStateful()&&this.saveState()}}equals(e,i){return"equals"===this.compareSelectionBy?e===i:B.equals(e,i,this.dataKey)}filter(e,i,r){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[i]&&delete this.filters[i]:this.filters[i]={value:e,matchMode:r},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,i){this.filter(e,"global",i)}isFilterBlank(e){return null==e||"string"==typeof e&&0==e.trim().length||e instanceof Array&&0==e.length}_filter(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(this.hasFilter()){let e;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(let i=0;i{r+="\n";for(let u=0;u{let i=Math.floor(e/this.rows),r=0===i?0:(i-1)*this.rows,o=0===i?2*this.rows:3*this.rows;i!==this.virtualPage&&(this.virtualPage=i,this.onLazyLoad.emit({first:r,rows:o,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta}))},this.virtualScrollDelay))}scrollTo(e){this.virtualScrollBody?this.virtualScrollBody.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}updateEditingCell(e,i,r,o){this.editingCell=e,this.editingCellData=i,this.editingCellField=r,this.editingCellRowIndex=o,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&0===E.find(this.editingCell,".ng-invalid.ng-dirty").length}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=e=>{this.editingCell&&!this.selfClick&&this.isEditingCellValid()&&(E.removeClass(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData,originalEvent:e,index:this.editingCellRowIndex}),this.editingCellField=null,this.editingCellData=null,this.editingCellRowIndex=null,this.unbindDocumentEditListener(),this.cd.markForCheck(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()),this.selfClick=!1},document.addEventListener("click",this.documentEditListener))}unbindDocumentEditListener(){this.documentEditListener&&(document.removeEventListener("click",this.documentEditListener),this.documentEditListener=null)}initRowEdit(e){let i=String(B.resolveFieldData(e,this.dataKey));this.editingRowKeys[i]=!0}saveRowEdit(e,i){if(0===E.find(i,".ng-invalid.ng-dirty").length){let r=String(B.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[r]}}cancelRowEdit(e){let i=String(B.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[i]}toggleRow(e,i){if(!this.dataKey)throw new Error("dataKey must be defined to use row expansion");let r=String(B.resolveFieldData(e,this.dataKey));null!=this.expandedRowKeys[r]?(delete this.expandedRowKeys[r],this.onRowCollapse.emit({originalEvent:i,data:e})):("single"===this.rowExpandMode&&(this.expandedRowKeys={}),this.expandedRowKeys[r]=!0,this.onRowExpand.emit({originalEvent:i,data:e})),i&&i.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return!0===this.expandedRowKeys[String(B.resolveFieldData(e,this.dataKey))]}isRowEditing(e){return!0===this.editingRowKeys[String(B.resolveFieldData(e,this.dataKey))]}isSingleSelectionMode(){return"single"===this.selectionMode}isMultipleSelectionMode(){return"multiple"===this.selectionMode}onColumnResizeBegin(e){let i=E.getOffset(this.containerViewChild.nativeElement).left;this.resizeColumnElement=e.target.parentElement,this.columnResizing=!0,this.lastResizerHelperX=e.pageX-i+this.containerViewChild.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let i=E.getOffset(this.containerViewChild.nativeElement).left;E.addClass(this.containerViewChild.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-i+this.containerViewChild.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,r=this.resizeColumnElement.offsetWidth+e;if(r>=(this.resizeColumnElement.style.minWidth||15)){if("fit"===this.columnResizeMode){let a=this.resizeColumnElement.nextElementSibling.offsetWidth-e;r>15&&a>15&&this.resizeTableCells(r,a)}else if("expand"===this.columnResizeMode){let s=this.tableViewChild.nativeElement.offsetWidth+e;this.tableViewChild.nativeElement.style.width=s+"px",this.tableViewChild.nativeElement.style.minWidth=s+"px",this.resizeTableCells(r,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:e}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",E.removeClass(this.containerViewChild.nativeElement,"p-unselectable-text")}resizeTableCells(e,i){let r=E.index(this.resizeColumnElement),o=[];const s=E.findSingle(this.containerViewChild.nativeElement,".p-datatable-thead");E.find(s,"tr > th").forEach(c=>o.push(E.getOuterWidth(c))),this.destroyStyleElement(),this.createStyleElement();let l="";o.forEach((c,u)=>{let d=u===r?e:i&&u===r+1?i:c;l+=`\n #${this.id} .p-datatable-thead > tr > th:nth-child(${u+1}),\n #${this.id} .p-datatable-tbody > tr > td:nth-child(${u+1}),\n #${this.id} .p-datatable-tfoot > tr > td:nth-child(${u+1}) {\n ${this.scrollable?`flex: 1 1 ${d}px !important`:`width: ${d}px !important`}\n }\n `}),this.styleElement.innerHTML=l}onColumnDragStart(e,i){this.reorderIconWidth=E.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild.nativeElement),this.reorderIconHeight=E.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild.nativeElement),this.draggedColumn=i,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,i){if(this.reorderableColumns&&this.draggedColumn&&i){e.preventDefault();let r=E.getOffset(this.containerViewChild.nativeElement),o=E.getOffset(i);if(this.draggedColumn!=i){let s=E.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),a=E.indexWithinGroup(i,"preorderablecolumn"),l=o.left-r.left,u=o.left+i.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=o.top-r.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=o.top-r.top+i.offsetHeight+"px",e.pageX>u?(this.reorderIndicatorUpViewChild.nativeElement.style.left=l+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=l+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=l-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=l-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),a-s==1&&-1===this.dropPosition||a-s==-1&&1===this.dropPosition?(this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none"):(this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block")}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,i){if(e.preventDefault(),this.draggedColumn){let r=E.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),o=E.indexWithinGroup(i,"preorderablecolumn"),s=r!=o;s&&(o-r==1&&-1===this.dropPosition||r-o==1&&1===this.dropPosition)&&(s=!1),s&&or&&-1===this.dropPosition&&(o-=1),s&&(B.reorderArray(this.columns,r,o),this.onColReorder.emit({dragIndex:r,dropIndex:o,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}onRowDragStart(e,i){this.rowDragging=!0,this.draggedRowIndex=i,e.dataTransfer.setData("text","b")}onRowDragOver(e,i,r){if(this.rowDragging&&this.draggedRowIndex!==i){let o=E.getOffset(r).top+E.getWindowScrollTop(),s=e.pageY,a=o+E.getOuterHeight(r)/2,l=r.previousElementSibling;sthis.droppedRowIndex?this.droppedRowIndex:0===this.droppedRowIndex?0:this.droppedRowIndex-1;B.reorderArray(this.value,this.draggedRowIndex,r),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:r})}this.onRowDragLeave(e,i),this.onRowDragEnd(e)}isEmpty(){let e=this.filteredValue||this.value;return null==e||0==e.length}getBlockableElement(){return this.el.nativeElement.children[0]}getStorage(){switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}}isStateful(){return null!=this.stateKey}saveState(){const e=this.getStorage();let i={};this.paginator&&(i.first=this.first,i.rows=this.rows),this.sortField&&(i.sortField=this.sortField,i.sortOrder=this.sortOrder),this.multiSortMeta&&(i.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(i.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(i),this.reorderableColumns&&this.saveColumnOrder(i),this.selection&&(i.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(i.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(i)),this.onStateSave.emit(i)}clearState(){const e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){const i=this.getStorage().getItem(this.stateKey),r=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;if(i){let s=JSON.parse(i,function(s,a){return"string"==typeof a&&r.test(a)?new Date(a):a});this.paginator&&(void 0!==this.first&&(this.first=s.first,this.firstChange.emit(this.first)),void 0!==this.rows&&(this.rows=s.rows,this.rowsChange.emit(this.rows))),s.sortField&&(this.restoringSort=!0,this._sortField=s.sortField,this._sortOrder=s.sortOrder),s.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=s.multiSortMeta),s.filters&&(this.restoringFilter=!0,this.filters=s.filters),this.resizableColumns&&(this.columnWidthsState=s.columnWidths,this.tableWidthState=s.tableWidth),s.expandedRowKeys&&(this.expandedRowKeys=s.expandedRowKeys),s.selection&&Promise.resolve(null).then(()=>this.selectionChange.emit(s.selection)),this.stateRestored=!0,this.onStateRestore.emit(s)}}saveColumnWidths(e){let i=[];E.find(this.containerViewChild.nativeElement,".p-datatable-thead > tr > th").forEach(o=>i.push(E.getOuterWidth(o))),e.columnWidths=i.join(","),"expand"===this.columnResizeMode&&(e.tableWidth=E.getOuterWidth(this.tableViewChild.nativeElement)+"px")}restoreColumnWidths(){if(this.columnWidthsState){let e=this.columnWidthsState.split(",");if("expand"===this.columnResizeMode&&this.tableWidthState&&(this.tableViewChild.nativeElement.style.width=this.tableWidthState,this.tableViewChild.nativeElement.style.minWidth=this.tableWidthState,this.containerViewChild.nativeElement.style.width=this.tableWidthState),B.isNotEmpty(e)){this.createStyleElement();let i="";e.forEach((r,o)=>{i+=`\n #${this.id} .p-datatable-thead > tr > th:nth-child(${o+1}),\n #${this.id} .p-datatable-tbody > tr > td:nth-child(${o+1}),\n #${this.id} .p-datatable-tfoot > tr > td:nth-child(${o+1}) {\n ${this.scrollable?`flex: 1 1 ${r}px !important`:`width: ${r}px !important`}\n }\n `}),this.styleElement.innerHTML=i}}}saveColumnOrder(e){if(this.columns){let i=[];this.columns.map(r=>{i.push(r.field||r.key)}),e.columnOrder=i}}restoreColumnOrder(){const i=this.getStorage().getItem(this.stateKey);if(i){let o=JSON.parse(i).columnOrder;if(o){let s=[];o.map(a=>{let l=this.findColumnByKey(a);l&&s.push(l)}),this.columnOrderStateRestored=!0,this.columns=s}}}findColumnByKey(e){if(!this.columns)return null;for(let i of this.columns)if(i.key===e||i.field===e)return i}createStyleElement(){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.head.appendChild(this.responsiveStyleElement),this.responsiveStyleElement.innerHTML=`\n@media screen and (max-width: ${this.breakpoint}) {\n #${this.id} .p-datatable-thead > tr > th,\n #${this.id} .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n #${this.id} .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n #${this.id} .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n #${this.id}.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n #${this.id} .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n`)}destroyResponsiveStyle(){this.responsiveStyleElement&&(document.head.removeChild(this.responsiveStyleElement),this.responsiveStyleElement=null)}destroyStyleElement(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null,this.virtualScrollSubscription&&this.virtualScrollSubscription.unsubscribe(),this.destroyStyleElement(),this.destroyResponsiveStyle()}}return t.\u0275fac=function(e){return new(e||t)(y(ge),y(be),y(Df),y(ct),y(LC),y(df))},t.\u0275cmp=xe({type:t,selectors:[["p-table"]],contentQueries:function(e,i,r){if(1&e&&Ve(r,Io,4),2&e){let o;ee(o=te())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Xe(m4,5),Xe(_4,5),Xe(v4,5),Xe(b4,5),Xe(y4,5),Xe(w4,5),Xe(C4,5),Xe(ua,5)),2&e){let r;ee(r=te())&&(i.containerViewChild=r.first),ee(r=te())&&(i.resizeHelperViewChild=r.first),ee(r=te())&&(i.reorderIndicatorUpViewChild=r.first),ee(r=te())&&(i.reorderIndicatorDownViewChild=r.first),ee(r=te())&&(i.wrapperViewChild=r.first),ee(r=te())&&(i.tableViewChild=r.first),ee(r=te())&&(i.tableHeaderViewChild=r.first),ee(r=te())&&(i.virtualScrollBody=r.first)}},hostAttrs:[1,"p-element"],inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",style:"style",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:"paginator",pageLinks:"pageLinks",rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:"alwaysShowPaginator",paginatorPosition:"paginatorPosition",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showJumpToPageDropdown:"showJumpToPageDropdown",showJumpToPageInput:"showJumpToPageInput",showFirstLastIcon:"showFirstLastIcon",showPageLinks:"showPageLinks",defaultSortOrder:"defaultSortOrder",sortMode:"sortMode",resetPageOnSort:"resetPageOnSort",selectionMode:"selectionMode",selectionPageOnly:"selectionPageOnly",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:"metaKeySelection",rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:"lazy",lazyLoadOnInit:"lazyLoadOnInit",compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:"filterDelay",filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:"scrollable",scrollDirection:"scrollDirection",rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:"virtualScroll",virtualScrollDelay:"virtualScrollDelay",virtualRowHeight:"virtualRowHeight",frozenWidth:"frozenWidth",responsive:"responsive",contextMenu:"contextMenu",resizableColumns:"resizableColumns",columnResizeMode:"columnResizeMode",reorderableColumns:"reorderableColumns",loading:"loading",loadingIcon:"loadingIcon",showLoader:"showLoader",rowHover:"rowHover",customSort:"customSort",showInitialSortBadge:"showInitialSortBadge",autoLayout:"autoLayout",exportFunction:"exportFunction",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",groupRowsByOrder:"groupRowsByOrder",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx",responsiveLayout:"responsiveLayout",breakpoint:"breakpoint",value:"value",columns:"columns",first:"first",rows:"rows",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",selectAll:"selectAll"},outputs:{selectAllChange:"selectAllChange",selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onRowSelect:"onRowSelect",onRowUnselect:"onRowUnselect",onPage:"onPage",onSort:"onSort",onFilter:"onFilter",onLazyLoad:"onLazyLoad",onRowExpand:"onRowExpand",onRowCollapse:"onRowCollapse",onContextMenuSelect:"onContextMenuSelect",onColResize:"onColResize",onColReorder:"onColReorder",onRowReorder:"onRowReorder",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",sortFunction:"sortFunction",firstChange:"firstChange",rowsChange:"rowsChange",onStateSave:"onStateSave",onStateRestore:"onStateRestore"},features:[_e([Df]),Qe],decls:14,vars:33,consts:[[3,"ngStyle","ngClass"],["container",""],["class","p-datatable-loading-overlay p-component-overlay",4,"ngIf"],["class","p-datatable-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange",4,"ngIf"],[1,"p-datatable-wrapper",3,"ngStyle"],["wrapper",""],["role","table","class","p-datatable-table",3,"ngClass","ngStyle",4,"ngIf"],["tabindex","0","class","p-datatable-virtual-scrollable-body",3,"itemSize","height","minBufferPx","maxBufferPx","scrolledIndexChange",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange",4,"ngIf"],["class","p-datatable-footer",4,"ngIf"],["class","p-column-resizer-helper","style","display:none",4,"ngIf"],["class","pi pi-arrow-down p-datatable-reorder-indicator-up","style","display:none",4,"ngIf"],["class","pi pi-arrow-up p-datatable-reorder-indicator-down","style","display:none",4,"ngIf"],[1,"p-datatable-loading-overlay","p-component-overlay"],[1,"p-datatable-header"],[4,"ngTemplateOutlet"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange"],["role","table",1,"p-datatable-table",3,"ngClass","ngStyle"],["table",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datatable-thead"],["class","p-datatable-tbody p-datatable-frozen-tbody",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen",4,"ngIf"],[1,"p-datatable-tbody",3,"value","pTableBody","pTableBodyTemplate"],["class","p-datatable-tfoot",4,"ngIf"],[1,"p-datatable-tbody","p-datatable-frozen-tbody",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen"],[1,"p-datatable-tfoot"],["tabindex","0",1,"p-datatable-virtual-scrollable-body",3,"itemSize","minBufferPx","maxBufferPx","scrolledIndexChange"],["tableHeader",""],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange"],[1,"p-datatable-footer"],[1,"p-column-resizer-helper",2,"display","none"],["resizeHelper",""],[1,"pi","pi-arrow-down","p-datatable-reorder-indicator-up",2,"display","none"],["reorderIndicatorUp",""],[1,"pi","pi-arrow-up","p-datatable-reorder-indicator-down",2,"display","none"],["reorderIndicatorDown",""]],template:function(e,i){1&e&&(f(0,"div",0,1),w(2,D4,2,2,"div",2),w(3,T4,2,1,"div",3),w(4,E4,1,17,"p-paginator",4),f(5,"div",5,6),w(7,R4,8,16,"table",7),w(8,V4,10,21,"cdk-virtual-scroll-viewport",8),g(),w(9,B4,1,17,"p-paginator",9),w(10,U4,2,1,"div",10),w(11,j4,2,0,"div",11),w(12,$4,2,0,"span",12),w(13,G4,2,0,"span",13),g()),2&e&&(Pe(i.styleClass),_("ngStyle",i.style)("ngClass",Rb(16,z4,[i.rowHover||i.selectionMode,i.autoLayout,i.resizableColumns,i.resizableColumns&&"fit"===i.columnResizeMode,i.scrollable,i.scrollable&&"vertical"===i.scrollDirection,i.scrollable&&"horizontal"===i.scrollDirection,i.scrollable&&"both"===i.scrollDirection,i.scrollable&&"flex"===i.scrollHeight,"stack"===i.responsiveLayout,"scroll"===i.responsiveLayout,i.responsive,null!=i.headerGroupedTemplate,null!=i.footerGroupedTemplate])),X("id",i.id),v(2),_("ngIf",i.loading&&i.showLoader),v(1),_("ngIf",i.captionTemplate),v(1),_("ngIf",i.paginator&&("top"===i.paginatorPosition||"both"==i.paginatorPosition)),v(1),_("ngStyle",q(31,W4,i.scrollHeight)),v(2),_("ngIf",!i.virtualScroll),v(1),_("ngIf",i.virtualScroll),v(1),_("ngIf",i.paginator&&("bottom"===i.paginatorPosition||"both"==i.paginatorPosition)),v(1),_("ngIf",i.summaryTemplate),v(1),_("ngIf",i.resizableColumns),v(1),_("ngIf",i.reorderableColumns),v(1),_("ngIf",i.reorderableColumns))},directives:function(){return[pi,dn,nt,$t,nU,Jj,ua,XC]},styles:[".p-datatable{position:relative}.p-datatable table{border-collapse:collapse;min-width:100%;table-layout:fixed}.p-datatable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}.p-datatable .p-sortable-column .p-column-title,.p-datatable .p-sortable-column .p-sortable-column-icon,.p-datatable .p-sortable-column .p-sortable-column-badge{vertical-align:middle}.p-datatable .p-sortable-column .p-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.p-datatable-auto-layout>.p-datatable-wrapper{overflow-x:auto}.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-responsive-scroll>.p-datatable-wrapper{overflow-x:auto}.p-datatable-responsive-scroll>.p-datatable-wrapper>table,.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-hoverable-rows .p-selectable-row{cursor:pointer}.p-datatable-scrollable .p-datatable-wrapper{position:relative;overflow:auto}.p-datatable-scrollable .p-datatable-thead,.p-datatable-scrollable .p-datatable-tbody,.p-datatable-scrollable .p-datatable-tfoot{display:block}.p-datatable-scrollable .p-datatable-thead>tr,.p-datatable-scrollable .p-datatable-tbody>tr,.p-datatable-scrollable .p-datatable-tfoot>tr{display:flex;flex-wrap:nowrap;width:100%}.p-datatable-scrollable .p-datatable-thead>tr>th,.p-datatable-scrollable .p-datatable-tbody>tr>td,.p-datatable-scrollable .p-datatable-tfoot>tr>td{display:flex;flex:1 1 0;align-items:center}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-thead,.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-virtual-scrollable-body>.cdk-virtual-scroll-content-wrapper>.p-datatable-table>.p-datatable-thead{position:sticky;top:0;z-index:1}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-frozen-tbody{position:sticky;z-index:1}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-tfoot{position:sticky;bottom:0;z-index:1}.p-datatable-scrollable .p-frozen-column{position:sticky;background:inherit}.p-datatable-scrollable th.p-frozen-column{z-index:1}.p-datatable-scrollable-both .p-datatable-thead>tr>th,.p-datatable-scrollable-both .p-datatable-tbody>tr>td,.p-datatable-scrollable-both .p-datatable-tfoot>tr>td,.p-datatable-scrollable-horizontal .p-datatable-thead>tr>th .p-datatable-scrollable-horizontal .p-datatable-tbody>tr>td,.p-datatable-scrollable-horizontal .p-datatable-tfoot>tr>td{flex:0 0 auto}.p-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}.p-datatable-flex-scrollable .p-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}.p-datatable-scrollable .p-rowgroup-header{position:sticky;z-index:1}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot{display:table;border-collapse:collapse;width:100%;table-layout:fixed}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead>tr,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot>tr{display:table-row}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead>tr>th,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot>tr>td{display:table-cell}.p-datatable-flex-scrollable{display:flex;flex-direction:column;flex:1;height:100%}.p-datatable-flex-scrollable .p-datatable-virtual-scrollable-body{flex:1}.p-datatable-resizable>.p-datatable-wrapper{overflow-x:auto}.p-datatable-resizable .p-datatable-thead>tr>th,.p-datatable-resizable .p-datatable-tfoot>tr>td,.p-datatable-resizable .p-datatable-tbody>tr>td{overflow:hidden;white-space:nowrap}.p-datatable-resizable .p-resizable-column:not(.p-frozen-column){background-clip:padding-box;position:relative}.p-datatable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-datatable .p-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.p-datatable .p-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.p-datatable .p-row-editor-init,.p-datatable .p-row-editor-save,.p-datatable .p-row-editor-cancel{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-datatable .p-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-datatable-reorder-indicator-up,.p-datatable-reorder-indicator-down{position:absolute;display:none}.p-datatable-reorderablerow-handle{cursor:move}[pReorderableColumn]{cursor:move}.p-datatable .p-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}.p-column-filter-row{display:flex;align-items:center;width:100%}.p-column-filter-menu{display:inline-flex}.p-column-filter-row p-columnfilterformelement{flex:1 1 auto;width:1%}.p-column-filter-menu-button,.p-column-filter-clear-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}.p-column-filter-overlay{position:absolute;top:0;left:0}.p-column-filter-row-items{margin:0;padding:0;list-style:none}.p-column-filter-row-item{cursor:pointer}.p-column-filter-add-button,.p-column-filter-remove-button{justify-content:center}.p-column-filter-add-button .p-button-label,.p-column-filter-remove-button .p-button-label{flex-grow:0}.p-column-filter-buttonbar{display:flex;align-items:center;justify-content:space-between}.p-column-filter-buttonbar .p-button{width:auto}.p-datatable .p-datatable-tbody>tr>td>.p-column-title{display:none}cdk-virtual-scroll-viewport{outline:0 none}\n"],encapsulation:2}),t})(),Jj=(()=>{class t{constructor(e,i,r,o){this.dt=e,this.tableService=i,this.cd=r,this.el=o,this.subscription=this.dt.tableService.valueSource$.subscribe(()=>{this.dt.virtualScroll&&this.cd.detectChanges()})}get value(){return this._value}set value(e){this._value=e,this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&"subheader"===this.dt.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()}ngAfterViewInit(){this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&"subheader"===this.dt.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()}shouldRenderRowGroupHeader(e,i,r){let o=B.resolveFieldData(i,this.dt.groupRowsBy),s=e[r-1];return!s||o!==B.resolveFieldData(s,this.dt.groupRowsBy)}shouldRenderRowGroupFooter(e,i,r){let o=B.resolveFieldData(i,this.dt.groupRowsBy),s=e[r+1];return!s||o!==B.resolveFieldData(s,this.dt.groupRowsBy)}shouldRenderRowspan(e,i,r){let o=B.resolveFieldData(i,this.dt.groupRowsBy),s=e[r-1];return!s||o!==B.resolveFieldData(s,this.dt.groupRowsBy)}calculateRowGroupSize(e,i,r){let o=B.resolveFieldData(i,this.dt.groupRowsBy),s=o,a=0;for(;o===s;){a++;let l=e[++r];if(!l)break;s=B.resolveFieldData(l,this.dt.groupRowsBy)}return 1===a?null:a}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=E.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=E.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dt.rowGroupHeaderStyleObject.top=e+"px"}}}return t.\u0275fac=function(e){return new(e||t)(y(Sf),y(Df),y(ct),y(ge))},t.\u0275cmp=xe({type:t,selectors:[["","pTableBody",""]],hostAttrs:[1,"p-element"],inputs:{columns:["pTableBody","columns"],template:["pTableBodyTemplate","template"],value:"value",frozen:"frozen",frozenRows:"frozenRows"},attrs:K4,decls:6,vars:6,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["cdkVirtualFor","",3,"cdkVirtualForOf","cdkVirtualForTrackBy","cdkVirtualForTemplateCacheSize"]],template:function(e,i){1&e&&(w(0,rj,2,2,"ng-container",0),w(1,aj,2,3,"ng-container",0),w(2,_j,2,2,"ng-container",0),w(3,Cj,2,2,"ng-container",0),w(4,Sj,2,5,"ng-container",0),w(5,Ej,2,5,"ng-container",0)),2&e&&(_("ngIf",!i.dt.expandedRowTemplate&&!i.dt.virtualScroll),v(1),_("ngIf",!i.dt.expandedRowTemplate&&i.dt.virtualScroll),v(1),_("ngIf",i.dt.expandedRowTemplate&&!(i.frozen&&i.dt.frozenExpandedRowTemplate)),v(1),_("ngIf",i.dt.frozenExpandedRowTemplate&&i.frozen),v(1),_("ngIf",i.dt.loading),v(1),_("ngIf",i.dt.isEmpty()&&!i.dt.loading))},directives:[nt,Cn,$t,iD],encapsulation:2}),t})(),Qj=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,iU,hf,yf,Lc,Wl,sa,pU,g4,wf,yU],Bi,Lc]}),t})();function Xj(t,n){1&t&&(f(0,"tr"),f(1,"th"),I(2,"Name"),g(),f(3,"th"),I(4,"Address"),g(),f(5,"th"),I(6,"Port"),g(),f(7,"th"),I(8,"Status"),g(),f(9,"th"),I(10,"Endpoints"),g(),f(11,"th"),I(12,"Add Rule"),g(),g())}function e$(t,n){if(1&t&&(f(0,"div"),I(1),g()),2&t){const e=n.$implicit;v(1),mt(" ",e.replace("endpoint:","")," ")}}function t$(t,n){if(1&t){const e=j();f(0,"tr"),f(1,"td"),I(2),g(),f(3,"td"),I(4),g(),f(5,"td"),I(6),g(),f(7,"td"),I(8),g(),f(9,"td"),w(10,e$,2,1,"div",10),g(),f(11,"td"),f(12,"button",4),k("click",function(){const o=T(e).$implicit;return m(2).open(o.name)}),I(13," Add rule "),z(14,"i",5),g(),g(),g()}if(2&t){const e=n.$implicit;v(2),Se(e.name),v(2),Se(e.address),v(2),Se(e.port),v(2),Se(e.status),v(2),_("ngForOf",e.endpoints)}}function n$(t,n){if(1&t&&(le(0),f(1,"p-table",7),w(2,Xj,13,0,"ng-template",8),w(3,t$,15,5,"ng-template",9),g(),ce()),2&t){const e=n.ngIf;v(1),_("value",e)}}let i$=(()=>{class t{constructor(e,i){this.endpointService=e,this.modalService=i}ngOnInit(){this.initTable()}open(e){this.modalService.open(QB).componentInstance.name=e}initTable(){this.endpoints=this.endpointService.getEndpoints()}}return t.\u0275fac=function(e){return new(e||t)(y(e3),y(rf))},t.\u0275cmp=xe({type:t,selectors:[["app-endpoint"]],decls:11,vars:3,consts:[[1,"container-fluid"],[1,"row","mt-3","mb-3"],[1,"col-auto","mr-auto"],[1,"col-auto"],["pButton","",1,"btn","btn-primary",3,"click"],[1,"pi","pi-plus","ml-2"],[4,"ngIf"],["responsiveLayout","scroll",3,"value"],["pTemplate","header"],["pTemplate","body"],[4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(f(0,"div",0),f(1,"div",1),f(2,"div",2),f(3,"h2"),I(4,"Listing endpoints"),g(),g(),f(5,"div",3),f(6,"button",4),k("click",function(){return i.open("*")}),I(7," Add new rule"),z(8,"i",5),g(),g(),g(),g(),w(9,n$,4,1,"ng-container",6),eh(10,"async")),2&e&&(v(9),_("ngIf",th(10,1,i.endpoints)))},directives:[oa,nt,Sf,Io,Cn],pipes:[Bh],styles:[""]}),t})();function r$(t,n){1&t&&(le(0),f(1,"div",28),f(2,"div",29),I(3," Room details are incorrect "),g(),g(),ce())}function o$(t,n){if(1&t&&(le(0),f(1,"div",30),f(2,"span",31),I(3),g(),g(),ce()),2&t){const e=m().message;v(3),mt(" ",e," ")}}function s$(t,n){if(1&t&&w(0,o$,4,1,"ng-container",6),2&t){const e=n.control,i=n.validation;_("ngIf",e&&e.hasError(i)&&(e.dirty||e.touched))}}const Tf=function(t,n){return{"is-invalid":t,"is-valid":n}},a$=function(t){return{validation:"required",message:"Service name is required",control:t}},l$=function(t){return{validation:"required",message:"rule is required",control:t}},c$=function(t){return{validation:"required",message:"Method is required",control:t}};let u$=(()=>{class t{constructor(e,i,r,o){this.fb=e,this.activeModal=i,this.ruleService=r,this.router=o,this.editModalEvent=new N,this.unsubscribe=[],this.codeExample="\n := ://\n := '*' | 'http' | 'https'\n := '*' | '*.' +\n := '/' ",this.router.routeReuseStrategy.shouldReuseRoute=()=>!1}ngOnInit(){this.initForm()}get f(){return this.ruleForm.controls}initForm(){this.ruleForm=this.fb.group({service:[this.service,Xt.compose([Xt.required])],rule:[this.rule,Xt.compose([Xt.required])],methods:[this.methods,Xt.compose([Xt.required])]})}submit(){this.hasError=!1;const e={};Object.keys(this.f).forEach(o=>{e[o]=this.f[o].value});const i=new $C;i.setRule(e);const r=this.ruleService.updateRule(i,this.ruleId).pipe(gi()).subscribe(o=>{o?(this.editModalEvent.emit("closeModal"),this.router.navigate(["rules"])):this.hasError=!0});this.unsubscribe.push(r)}ngOnDestroy(){this.unsubscribe.forEach(e=>e.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(y(mp),y(ia),y(pf),y(it))},t.\u0275cmp=xe({type:t,selectors:[["app-rule-edit"]],inputs:{service:"service",rule:"rule",methods:"methods",ruleId:"ruleId"},outputs:{editModalEvent:"editModalEvent"},features:[_e([ia])],decls:53,vars:28,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["novalidate","novalidate","id","kt_login_signin_form",1,"form","w-100",3,"formGroup","ngSubmit"],[4,"ngIf"],[1,"fv-row","mb-3"],[1,"form-label","fs-6","fw-bolder","text-dark"],["type","text","name","service","formControlName","service","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["id","emailHelp",1,"form-text","text-muted"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","name","rule","formControlName","rule","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["role","alert",1,"alert","alert-success"],[1,"alert-heading"],["formControlName","methods","multiple","",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",2,"height","210px",3,"ngClass"],["value","*"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["value","HEAD"],["value","OPTIONS"],[1,"text-center"],["type","submit","id","kt_sign_up_submit",1,"btn","btn-lg","btn-primary","w-100","mb-5",3,"disabled"],[1,"indicator-label"],["formError",""],[1,"mb-lg-15","alert","alert-danger"],[1,"alert-text","font-weight-bold"],[1,"fv-plugins-message-container"],["role","alert"]],template:function(e,i){if(1&e&&(f(0,"div",0),f(1,"h4",1),I(2,"Edit Rule"),g(),f(3,"button",2),k("click",function(){return i.activeModal.dismiss("close")}),f(4,"span",3),I(5,"\xd7"),g(),g(),g(),f(6,"div",4),f(7,"form",5),k("ngSubmit",function(){return i.submit()}),w(8,r$,4,0,"ng-container",6),f(9,"div",7),f(10,"label",8),I(11,"Service name"),g(),z(12,"input",9),f(13,"small",10),I(14,"'*' means all endpoints"),g(),W(15,11),g(),f(16,"div",7),f(17,"label",8),I(18,"Rule"),g(),z(19,"input",12),W(20,11),g(),f(21,"div",13),f(22,"h4",14),I(23,"How to correctly define routes!"),g(),f(24,"pre"),I(25),g(),g(),f(26,"div",7),f(27,"label",8),I(28,"Methods"),g(),f(29,"select",15),f(30,"option",16),I(31,"ALL"),g(),f(32,"option",17),I(33,"GET"),g(),f(34,"option",18),I(35,"POST"),g(),f(36,"option",19),I(37,"PUT"),g(),f(38,"option",20),I(39,"OPTIONS"),g(),f(40,"option",21),I(41,"DELETE"),g(),f(42,"option",22),I(43,"HEAD"),g(),f(44,"option",23),I(45,"OPTIONS"),g(),g(),W(46,11),g(),f(47,"div",24),f(48,"button",25),f(49,"span",26),I(50,"Submit"),g(),g(),g(),g(),w(51,s$,1,1,"ng-template",null,27,Rt),g()),2&e){const r=We(52);v(7),_("formGroup",i.ruleForm),v(1),_("ngIf",i.hasError),v(4),_("ngClass",He(13,Tf,i.ruleForm.controls.service.invalid,i.ruleForm.controls.service.valid)),v(3),_("ngTemplateOutlet",r)("ngTemplateOutletContext",q(16,a$,i.ruleForm.controls.service)),v(4),_("ngClass",He(18,Tf,i.ruleForm.controls.rule.invalid,i.ruleForm.controls.rule.valid)),v(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",q(21,l$,i.ruleForm.controls.rule)),v(5),mt(" ",i.codeExample,"\n "),v(4),_("ngClass",He(23,Tf,i.ruleForm.controls.methods.invalid,i.ruleForm.controls.methods.valid)),v(17),_("ngTemplateOutlet",r)("ngTemplateOutletContext",q(26,c$,i.ruleForm.controls.methods)),v(2),_("disabled",i.ruleForm.invalid)}},directives:[$l,Al,bo,nt,mo,ks,Ls,dn,$t,Vs,pp,fp],styles:[""]}),t})();function d$(t,n){1&t&&(f(0,"tr"),f(1,"th"),I(2,"Id"),g(),f(3,"th"),I(4,"Service"),g(),f(5,"th"),I(6,"Rule"),g(),f(7,"th"),I(8,"Methods"),g(),f(9,"th"),I(10,"Created"),g(),f(11,"th"),I(12,"Updated"),g(),f(13,"th"),I(14,"Options"),g(),g())}function h$(t,n){if(1&t&&(f(0,"div"),I(1),g()),2&t){const e=n.$implicit;v(1),mt(" ",e," ")}}function p$(t,n){if(1&t){const e=j();f(0,"app-rule-edit",10),k("editModalEvent",function(){return T(e).$implicit.dismiss("close")}),g()}if(2&t){const e=m().$implicit;_("service",e.service)("rule",e.rule)("methods",e.methods)("ruleId",e.id)}}function f$(t,n){if(1&t){const e=j();f(0,"tr"),f(1,"td"),I(2),g(),f(3,"td"),I(4),g(),f(5,"td"),I(6),g(),f(7,"td"),w(8,h$,2,1,"div",4),g(),f(9,"td"),I(10),g(),f(11,"td"),I(12),g(),f(13,"td"),f(14,"button",5),k("click",function(){T(e);const r=We(19);return m(2).open(r)}),z(15,"i",6),g(),f(16,"button",7),k("click",function(){const o=T(e).$implicit;return m(2).deleteRule(o.id)}),z(17,"i",8),g(),w(18,p$,1,4,"ng-template",null,9,Rt),g(),g()}if(2&t){const e=n.$implicit;v(2),Se(e.id),v(2),Se(e.service),v(2),Se(e.rule),v(2),_("ngForOf",e.methods),v(2),Se(e.created_at),v(2),Se(e.updated_at)}}function g$(t,n){if(1&t&&(le(0),f(1,"p-table",1),w(2,d$,15,0,"ng-template",2),w(3,f$,20,6,"ng-template",3),g(),ce()),2&t){const e=n.ngIf;v(1),_("value",e)}}const _$=jp.forRoot([{path:"",component:i$,canActivate:[jC]},{path:"rules",component:(()=>{class t{constructor(e,i){this.ruleService=e,this.modalService=i}ngOnInit(){this.initTable()}initTable(){this.rules=this.ruleService.getRules()}open(e){this.modalService.open(e)}deleteRule(e){this.ruleService.deleteRule(e).subscribe(()=>{this.initTable()}),this.initTable()}}return t.\u0275fac=function(e){return new(e||t)(y(pf),y(rf))},t.\u0275cmp=xe({type:t,selectors:[["app-rules"]],decls:4,vars:3,consts:[[4,"ngIf"],["responsiveLayout","scroll",3,"value"],["pTemplate","header"],["pTemplate","body"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-primary","mr-2",3,"click"],[1,"pi","pi-pencil"],[1,"btn","btn-outline-danger",3,"click"],[1,"pi","pi-trash"],["editRule",""],[3,"service","rule","methods","ruleId","editModalEvent"]],template:function(e,i){1&e&&(f(0,"h2"),I(1,"Listing endpoints"),g(),w(2,g$,4,1,"ng-container",0),eh(3,"async")),2&e&&(v(2),_("ngIf",th(3,1,i.rules)))},directives:[nt,Sf,Io,Cn,u$],pipes:[Bh],styles:[""]}),t})(),canActivate:[jC]},{path:"login",component:UB},{path:"logout",component:jB},{path:"**",redirectTo:""}],{useHash:!0,onSameUrlNavigation:"reload"});let v$=(()=>{class t{constructor(e){this.authenticationService=e}intercept(e,i){return i.handle(e).pipe(Ln(r=>(401===r.status&&(this.authenticationService.logout(),location.reload()),GC(r.error.message||r.statusText))))}}return t.\u0275fac=function(e){return new(e||t)(R(To))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),b$=(()=>{class t{constructor(e){this.authenticationService=e}intercept(e,i){let r=this.authenticationService.currentUserValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(R(To))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),V$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t}),t.\u0275inj=G({imports:[[Re,jp,Mo,vf],jp,vf]}),t})(),B$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Y({type:t,bootstrap:[LB]}),t.\u0275inj=G({providers:[{provide:ql,useClass:b$,multi:!0},{provide:ql,useClass:v$,multi:!0}],imports:[[lA,_1,IF,_$,Re,V$,hf,sa,Bi,Qj,RB]]}),t})();Dy=!1,sA().bootstrapModule(B$).catch(t=>console.error(t))}},J=>{J(J.s=676)}]); \ No newline at end of file diff --git a/minos/api_gateway/rest/backend/admin/main.33051811e0a291cf.js b/minos/api_gateway/rest/backend/admin/main.33051811e0a291cf.js new file mode 100644 index 0000000..5799412 --- /dev/null +++ b/minos/api_gateway/rest/backend/admin/main.33051811e0a291cf.js @@ -0,0 +1 @@ +"use strict";var f8=Object.defineProperty,g8=Object.defineProperties,m8=Object.getOwnPropertyDescriptors,MD=Object.getOwnPropertySymbols,_8=Object.prototype.hasOwnProperty,v8=Object.prototype.propertyIsEnumerable,ND=(ee,Ct,Pt)=>Ct in ee?f8(ee,Ct,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):ee[Ct]=Pt,V=(ee,Ct)=>{for(var Pt in Ct||(Ct={}))_8.call(Ct,Pt)&&ND(ee,Pt,Ct[Pt]);if(MD)for(var Pt of MD(Ct))v8.call(Ct,Pt)&&ND(ee,Pt,Ct[Pt]);return ee},st=(ee,Ct)=>g8(ee,m8(Ct));(self.webpackChunkminos_api_gateway_front=self.webpackChunkminos_api_gateway_front||[]).push([[179],{816:()=>{function ee(t){return"function"==typeof t}function Ct(t){const e=t(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const Pt=Ct(t=>function(e){t(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 Tr(t,n){if(t){const e=t.indexOf(n);0<=e&&t.splice(e,1)}}class Lt{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._teardowns=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const o of e)o.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(ee(i))try{i()}catch(o){n=o instanceof Pt?o.errors:[o]}const{_teardowns:r}=this;if(r){this._teardowns=null;for(const o of r)try{Uf(o)}catch(s){n=null!=n?n:[],s instanceof Pt?n=[...n,...s.errors]:n.push(s)}}if(n)throw new Pt(n)}}add(n){var e;if(n&&n!==this)if(this.closed)Uf(n);else{if(n instanceof Lt){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._teardowns=null!==(e=this._teardowns)&&void 0!==e?e:[]).push(n)}}_hasParent(n){const{_parentage:e}=this;return e===n||Array.isArray(e)&&e.includes(n)}_addParent(n){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n}_removeParent(n){const{_parentage:e}=this;e===n?this._parentage=null:Array.isArray(e)&&Tr(e,n)}remove(n){const{_teardowns:e}=this;e&&Tr(e,n),n instanceof Lt&&n._removeParent(this)}}Lt.EMPTY=(()=>{const t=new Lt;return t.closed=!0,t})();const Bf=Lt.EMPTY;function Hf(t){return t instanceof Lt||t&&"closed"in t&&ee(t.remove)&&ee(t.add)&&ee(t.unsubscribe)}function Uf(t){ee(t)?t():t.unsubscribe()}const zi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},wa={setTimeout(...t){const{delegate:n}=wa;return((null==n?void 0:n.setTimeout)||setTimeout)(...t)},clearTimeout(t){const{delegate:n}=wa;return((null==n?void 0:n.clearTimeout)||clearTimeout)(t)},delegate:void 0};function $f(t){wa.setTimeout(()=>{const{onUnhandledError:n}=zi;if(!n)throw t;n(t)})}function yi(){}const kD=Zc("C",void 0,void 0);function Zc(t,n,e){return{kind:t,value:n,error:e}}let Wi=null;function Ca(t){if(zi.useDeprecatedSynchronousErrorHandling){const n=!Wi;if(n&&(Wi={errorThrown:!1,error:null}),t(),n){const{errorThrown:e,error:i}=Wi;if(Wi=null,e)throw i}}else t()}class Jc extends Lt{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,Hf(n)&&n.add(this)):this.destination=FD}static create(n,e,i){return new Qc(n,e,i)}next(n){this.isStopped?eu(Zc("N",n,void 0),this):this._next(n)}error(n){this.isStopped?eu(Zc("E",void 0,n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?eu(kD,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}class Qc extends Jc{constructor(n,e,i){let r;if(super(),ee(n))r=n;else if(n){let o;({next:r,error:e,complete:i}=n),this&&zi.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=()=>this.unsubscribe()):o=n,r=null==r?void 0:r.bind(o),e=null==e?void 0:e.bind(o),i=null==i?void 0:i.bind(o)}this.destination={next:r?Xc(r):yi,error:Xc(null!=e?e:jf),complete:i?Xc(i):yi}}}function Xc(t,n){return(...e)=>{try{t(...e)}catch(i){zi.useDeprecatedSynchronousErrorHandling?function(t){zi.useDeprecatedSynchronousErrorHandling&&Wi&&(Wi.errorThrown=!0,Wi.error=t)}(i):$f(i)}}}function jf(t){throw t}function eu(t,n){const{onStoppedNotification:e}=zi;e&&wa.setTimeout(()=>e(t,n))}const FD={closed:!0,next:yi,error:jf,complete:yi},tu="function"==typeof Symbol&&Symbol.observable||"@@observable";function ii(t){return t}let Ce=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const o=function(t){return t&&t instanceof Jc||function(t){return t&&ee(t.next)&&ee(t.error)&&ee(t.complete)}(t)&&Hf(t)}(e)?e:new Qc(e,i,r);return Ca(()=>{const{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return new(i=zf(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),null==s||s.unsubscribe()}},o,r)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[tu](){return this}pipe(...e){return function(t){return 0===t.length?ii:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}(e)(this)}toPromise(e){return new(e=zf(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function zf(t){var n;return null!==(n=null!=t?t:zi.Promise)&&void 0!==n?n:Promise}const VD=Ct(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let le=(()=>{class t extends Ce{constructor(){super(),this.closed=!1,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const i=new Wf(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new VD}next(e){Ca(()=>{if(this._throwIfClosed(),!this.isStopped){const i=this.observers.slice();for(const r of i)r.next(e)}})}error(e){Ca(()=>{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(){Ca(()=>{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=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:o}=this;return i||r?Bf:(o.push(e),new Lt(()=>Tr(o,e)))}_checkFinalizedStatuses(e){const{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){const e=new Ce;return e.source=this,e}}return t.create=(n,e)=>new Wf(n,e),t})();class Wf extends le{constructor(n,e){super(),this.destination=n,this.source=e}next(n){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,n)}error(n){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,n)}complete(){var n,e;null===(e=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===e||e.call(n)}_subscribe(n){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(n))&&void 0!==i?i:Bf}}function qf(t){return ee(null==t?void 0:t.lift)}function ze(t){return n=>{if(qf(n))return n.lift(function(e){try{return t(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}class Ie extends Jc{constructor(n,e,i,r,o){super(n),this.onFinalize=o,this._next=e?function(s){try{e(s)}catch(a){n.error(a)}}:super._next,this._error=r?function(s){try{r(s)}catch(a){n.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(s){n.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;const{closed:e}=this;super.unsubscribe(),!e&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}function q(t,n){return ze((e,i)=>{let r=0;e.subscribe(new Ie(i,o=>{i.next(t.call(n,o,r++))}))})}function qi(t){return this instanceof qi?(this.v=t,this):new qi(t)}function UD(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e.apply(t,n||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(f){i[f]&&(r[f]=function(g){return new Promise(function(y,C){o.push([f,g,y,C])>1||a(f,g)})})}function a(f,g){try{!function(f){f.value instanceof qi?Promise.resolve(f.value.v).then(c,u):d(o[0][2],f)}(i[f](g))}catch(y){d(o[0][3],y)}}function c(f){a("next",f)}function u(f){a("throw",f)}function d(f,g){f(g),o.shift(),o.length&&a(o[0][0],o[0][1])}}function $D(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=function(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],i=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(o){e[o]=t[o]&&function(s){return new Promise(function(a,l){!function(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}(a,l,(s=t[o](s)).done,s.value)})}}}const iu=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function Jf(t){return ee(null==t?void 0:t.then)}function Qf(t){return ee(t[tu])}function Xf(t){return Symbol.asyncIterator&&ee(null==t?void 0:t[Symbol.asyncIterator])}function eg(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const tg="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function ng(t){return ee(null==t?void 0:t[tg])}function ig(t){return UD(this,arguments,function*(){const e=t.getReader();try{for(;;){const{value:i,done:r}=yield qi(e.read());if(r)return yield qi(void 0);yield yield qi(i)}}finally{e.releaseLock()}})}function rg(t){return ee(null==t?void 0:t.getReader)}function Tt(t){if(t instanceof Ce)return t;if(null!=t){if(Qf(t))return function(t){return new Ce(n=>{const e=t[tu]();if(ee(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(iu(t))return function(t){return new Ce(n=>{for(let e=0;e{t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,$f)})}(t);if(Xf(t))return og(t);if(ng(t))return function(t){return new Ce(n=>{for(const e of t)if(n.next(e),n.closed)return;n.complete()})}(t);if(rg(t))return function(t){return og(ig(t))}(t)}throw eg(t)}function og(t){return new Ce(n=>{(function(t,n){var e,i,r,o;return function(t,n,e,i){return new(e||(e=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):function(o){return o instanceof e?o:new e(function(s){s(o)})}(u.value).then(a,l)}c((i=i.apply(t,n||[])).next())})}(this,void 0,void 0,function*(){try{for(e=$D(t);!(i=yield e.next()).done;)if(n.next(i.value),n.closed)return}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}n.complete()})})(t,n).catch(e=>n.error(e))})}function ri(t,n,e,i=0,r=!1){const o=n.schedule(function(){e(),r?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(o),!r)return o}function at(t,n,e=1/0){return ee(n)?at((i,r)=>q((o,s)=>n(i,o,r,s))(Tt(t(i,r))),e):("number"==typeof n&&(e=n),ze((i,r)=>function(t,n,e,i,r,o,s,a){const l=[];let c=0,u=0,d=!1;const f=()=>{d&&!l.length&&!c&&n.complete()},g=C=>c{c++;let E=!1;Tt(e(C,u++)).subscribe(new Ie(n,I=>{n.next(I)},()=>{E=!0},void 0,()=>{if(E)try{for(c--;l.length&&c{d=!0,f()})),()=>{}}(i,r,t,e)))}function Go(t=1/0){return at(ii,t)}const En=new Ce(t=>t.complete());function sg(t){return t&&ee(t.schedule)}function ru(t){return t[t.length-1]}function Da(t){return ee(ru(t))?t.pop():void 0}function zo(t){return sg(ru(t))?t.pop():void 0}function ag(t,n=0){return ze((e,i)=>{e.subscribe(new Ie(i,r=>ri(i,t,()=>i.next(r),n),()=>ri(i,t,()=>i.complete(),n),r=>ri(i,t,()=>i.error(r),n)))})}function lg(t,n=0){return ze((e,i)=>{i.add(t.schedule(()=>e.subscribe(i),n))})}function cg(t,n){if(!t)throw new Error("Iterable cannot be null");return new Ce(e=>{ri(e,n,()=>{const i=t[Symbol.asyncIterator]();ri(e,n,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Dt(t,n){return n?function(t,n){if(null!=t){if(Qf(t))return function(t,n){return Tt(t).pipe(lg(n),ag(n))}(t,n);if(iu(t))return function(t,n){return new Ce(e=>{let i=0;return n.schedule(function(){i===t.length?e.complete():(e.next(t[i++]),e.closed||this.schedule())})})}(t,n);if(Jf(t))return function(t,n){return Tt(t).pipe(lg(n),ag(n))}(t,n);if(Xf(t))return cg(t,n);if(ng(t))return function(t,n){return new Ce(e=>{let i;return ri(e,n,()=>{i=t[tg](),ri(e,n,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){return void e.error(s)}o?e.complete():e.next(r)},0,!0)}),()=>ee(null==i?void 0:i.return)&&i.return()})}(t,n);if(rg(t))return function(t,n){return cg(ig(t),n)}(t,n)}throw eg(t)}(t,n):Tt(t)}function Vt(t){return t<=0?()=>En:ze((n,e)=>{let i=0;n.subscribe(new Ie(e,r=>{++i<=t&&(e.next(r),t<=i&&e.complete())}))})}function ug(t={}){const{connector:n=(()=>new le),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=t;return o=>{let s=null,a=null,l=null,c=0,u=!1,d=!1;const f=()=>{null==a||a.unsubscribe(),a=null},g=()=>{f(),s=l=null,u=d=!1},y=()=>{const C=s;g(),null==C||C.unsubscribe()};return ze((C,E)=>{c++,!d&&!u&&f();const I=l=null!=l?l:n();E.add(()=>{c--,0===c&&!d&&!u&&(a=ou(y,r))}),I.subscribe(E),s||(s=new Qc({next:S=>I.next(S),error:S=>{d=!0,f(),a=ou(g,e,S),I.error(S)},complete:()=>{u=!0,f(),a=ou(g,i),I.complete()}}),Dt(C).subscribe(s))})(o)}}function ou(t,n,...e){return!0===n?(t(),null):!1===n?null:n(...e).pipe(Vt(1)).subscribe(()=>t())}function Re(t){for(let n in t)if(t[n]===Re)return n;throw Error("Could not find renamed property on target object.")}function su(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function De(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(De).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function au(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const aS=Re({__forward_ref__:Re});function pe(t){return t.__forward_ref__=pe,t.toString=function(){return De(this())},t}function ue(t){return dg(t)?t():t}function dg(t){return"function"==typeof t&&t.hasOwnProperty(aS)&&t.__forward_ref__===pe}class nn extends Error{constructor(n,e){super(function(t,n){return`${t?`NG0${t}: `:""}${n}`}(n,e)),this.code=n}}function se(t){return"string"==typeof t?t:null==t?"":String(t)}function Bt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():se(t)}function Sa(t,n){const e=n?` in ${n}`:"";throw new nn("201",`No provider for ${Bt(t)} found${e}`)}function on(t,n){null==t&&function(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}(n,t,null,"!=")}function L(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function K(t){return{providers:t.providers||[],imports:t.imports||[]}}function cu(t){return hg(t,Ta)||hg(t,fg)}function hg(t,n){return t.hasOwnProperty(n)?t[n]:null}function pg(t){return t&&(t.hasOwnProperty(uu)||t.hasOwnProperty(fS))?t[uu]:null}const Ta=Re({\u0275prov:Re}),uu=Re({\u0275inj:Re}),fg=Re({ngInjectableDef:Re}),fS=Re({ngInjectorDef:Re});var ce=(()=>((ce=ce||{})[ce.Default=0]="Default",ce[ce.Host=1]="Host",ce[ce.Self=2]="Self",ce[ce.SkipSelf=4]="SkipSelf",ce[ce.Optional=8]="Optional",ce))();let du;function wi(t){const n=du;return du=t,n}function gg(t,n,e){const i=cu(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&ce.Optional?null:void 0!==n?n:void Sa(De(t),"Injector")}function Ci(t){return{toString:t}.toString()}var fn=(()=>((fn=fn||{})[fn.OnPush=0]="OnPush",fn[fn.Default=1]="Default",fn))(),Hn=(()=>{return(t=Hn||(Hn={}))[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",Hn;var t})();const mS="undefined"!=typeof globalThis&&globalThis,_S="undefined"!=typeof window&&window,vS="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Me=mS||"undefined"!=typeof global&&global||_S||vS,Er={},Oe=[],Ea=Re({\u0275cmp:Re}),hu=Re({\u0275dir:Re}),pu=Re({\u0275pipe:Re}),mg=Re({\u0275mod:Re}),si=Re({\u0275fac:Re}),Wo=Re({__NG_ELEMENT_ID__:Re});let bS=0;function Te(t){return Ci(()=>{const e={},i={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===fn.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Oe,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Hn.Emulated,id:"c",styles:t.styles||Oe,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,o=t.features,s=t.pipes;return i.id+=bS++,i.inputs=yg(t.inputs,e),i.outputs=yg(t.outputs),o&&o.forEach(a=>a(i)),i.directiveDefs=r?()=>("function"==typeof r?r():r).map(_g):null,i.pipeDefs=s?()=>("function"==typeof s?s():s).map(vg):null,i})}function _g(t){return kt(t)||function(t){return t[hu]||null}(t)}function vg(t){return function(t){return t[pu]||null}(t)}const bg={};function Z(t){return Ci(()=>{const n={type:t.type,bootstrap:t.bootstrap||Oe,declarations:t.declarations||Oe,imports:t.imports||Oe,exports:t.exports||Oe,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&(bg[t.id]=t.type),n})}function yg(t,n){if(null==t)return Er;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}const O=Te;function Xt(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function kt(t){return t[Ea]||null}function gn(t,n){const e=t[mg]||null;if(!e&&!0===n)throw new Error(`Type ${De(t)} does not have '\u0275mod' property.`);return e}function Un(t){return Array.isArray(t)&&"object"==typeof t[1]}function In(t){return Array.isArray(t)&&!0===t[1]}function mu(t){return 0!=(8&t.flags)}function Na(t){return 2==(2&t.flags)}function ka(t){return 1==(1&t.flags)}function Mn(t){return null!==t.template}function TS(t){return 0!=(512&t[2])}function Qi(t,n){return t.hasOwnProperty(si)?t[si]:null}class IS{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function nt(){return Cg}function Cg(t){return t.type.prototype.ngOnChanges&&(t.setInput=NS),MS}function MS(){const t=Sg(this),n=null==t?void 0:t.current;if(n){const e=t.previous;if(e===Er)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function NS(t,n,e,i){const r=Sg(t)||function(t,n){return t[Dg]=n}(t,{previous:Er,current:null}),o=r.current||(r.current={}),s=r.previous,a=this.declaredInputs[e],l=s[a];o[a]=new IS(l&&l.currentValue,n,s===Er),t[i]=n}nt.ngInherit=!0;const Dg="__ngSimpleChanges__";function Sg(t){return t[Dg]||null}let bu;function Ye(t){return!!t.listen}const xg={createRenderer:(t,n)=>void 0!==bu?bu:"undefined"!=typeof document?document:void 0};function lt(t){for(;Array.isArray(t);)t=t[0];return t}function Ra(t,n){return lt(n[t])}function vn(t,n){return lt(n[t.index])}function wu(t,n){return t.data[n]}function kr(t,n){return t[n]}function an(t,n){const e=n[t];return Un(e)?e:e[0]}function Ig(t){return 4==(4&t[2])}function Cu(t){return 128==(128&t[2])}function Si(t,n){return null==n?null:t[n]}function Mg(t){t[18]=0}function Du(t,n){t[5]+=n;let e=t,i=t[3];for(;null!==i&&(1===n&&1===e[5]||-1===n&&0===e[5]);)i[5]+=n,e=i,i=i[3]}const J={lFrame:Lg(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Ng(){return J.bindingsEnabled}function M(){return J.lFrame.lView}function Se(){return J.lFrame.tView}function T(t){return J.lFrame.contextLView=t,t[8]}function gt(){let t=kg();for(;null!==t&&64===t.type;)t=t.parent;return t}function kg(){return J.lFrame.currentTNode}function $n(t,n){const e=J.lFrame;e.currentTNode=t,e.isParent=n}function Su(){return J.lFrame.isParent}function Tu(){J.lFrame.isParent=!1}function Oa(){return J.isInCheckNoChangesMode}function Aa(t){J.isInCheckNoChangesMode=t}function Ht(){const t=J.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function Rr(){return J.lFrame.bindingIndex++}function li(t){const n=J.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function zS(t,n){const e=J.lFrame;e.bindingIndex=e.bindingRootIndex=t,Eu(n)}function Eu(t){J.lFrame.currentDirectiveIndex=t}function Ag(){return J.lFrame.currentQueryIndex}function Iu(t){J.lFrame.currentQueryIndex=t}function qS(t){const n=t[1];return 2===n.type?n.declTNode:1===n.type?t[6]:null}function Fg(t,n,e){if(e&ce.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&ce.Host||(r=qS(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;n=r,t=o}const i=J.lFrame=Pg();return i.currentTNode=n,i.lView=t,!0}function Fa(t){const n=Pg(),e=t[1];J.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function Pg(){const t=J.lFrame,n=null===t?null:t.child;return null===n?Lg(t):n}function Lg(t){const n={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:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function Vg(){const t=J.lFrame;return J.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Bg=Vg;function Pa(){const t=Vg();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Ut(){return J.lFrame.selectedIndex}function Ti(t){J.lFrame.selectedIndex=t}function Ze(){const t=J.lFrame;return wu(t.tView,t.selectedIndex)}function La(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[18]+=65536),(a>11>16&&(3&t[2])===n){t[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class Jo{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Ha(t,n,e){const i=Ye(t);let r=0;for(;rn){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[15],e--;return i}let Ru=!0;function $a(t){const n=Ru;return Ru=t,n}let lT=0;function Xo(t,n){const e=Au(t,n);if(-1!==e)return e;const i=n[1];i.firstCreatePass&&(t.injectorIndex=n.length,Ou(i.data,t),Ou(n,null),Ou(i.blueprint,null));const r=ja(t,n),o=t.injectorIndex;if(jg(r)){const s=Or(r),a=Ar(r,n),l=a[1].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function Ou(t,n){t.push(0,0,0,0,0,0,0,0,n)}function Au(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function ja(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){const o=r[1],s=o.type;if(i=2===s?o.declTNode:1===s?r[6]:null,null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function Ga(t,n,e){!function(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Wo)&&(i=e[Wo]),null==i&&(i=e[Wo]=lT++);const r=255&i;n.data[t+(r>>5)]|=1<=0?255&n:dT:n}(e);if("function"==typeof o){if(!Fg(n,t,i))return i&ce.Host?Wg(r,e,i):qg(n,e,i,r);try{const s=o(i);if(null!=s||i&ce.Optional)return s;Sa(e)}finally{Bg()}}else if("number"==typeof o){let s=null,a=Au(t,n),l=-1,c=i&ce.Host?n[16][6]:null;for((-1===a||i&ce.SkipSelf)&&(l=-1===a?ja(t,n):n[a+8],-1!==l&&Jg(i,!1)?(s=n[1],a=Or(l),n=Ar(l,n)):a=-1);-1!==a;){const u=n[1];if(Zg(o,a,u.data)){const d=hT(a,n,e,s,i,c);if(d!==Yg)return d}l=n[a+8],-1!==l&&Jg(i,n[1].data[a+8]===c)&&Zg(o,a,n)?(s=u,a=Or(l),n=Ar(l,n)):a=-1}}}return qg(n,e,i,r)}const Yg={};function dT(){return new Fr(gt(),M())}function hT(t,n,e,i,r,o){const s=n[1],a=s.data[t+8],u=za(a,s,e,null==i?Na(a)&&Ru:i!=s&&0!=(3&a.type),r&ce.Host&&o===a);return null!==u?es(n,s,u,a):Yg}function za(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,f=r?a+u:t.directiveEnd;for(let g=i?a:a+u;g=l&&y.type===e)return g}if(r){const g=s[l];if(g&&Mn(g)&&g.type===e)return l}return null}function es(t,n,e,i){let r=t[e];const o=n.data;if(function(t){return t instanceof Jo}(r)){const s=r;s.resolving&&function(t,n){throw new nn("200",`Circular dependency in DI detected for ${t}`)}(Bt(o[e]));const a=$a(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?wi(s.injectImpl):null;Fg(t,i,ce.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=Cg(n);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&wi(l),$a(a),s.resolving=!1,Bg()}}return r}function Zg(t,n,e){return!!(e[n+(t>>5)]&1<{const n=t.prototype.constructor,e=n[si]||Fu(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[si]||Fu(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function Fu(t){return dg(t)?()=>{const n=Fu(ue(t));return n&&n()}:Qi(t)}function Xi(t){return function(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(Lr)?l[Lr]:Object.defineProperty(l,Lr,{value:[]})[Lr];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class te{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=L({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const gT=new te("AnalyzeForEntryComponents");function bn(t,n){void 0===n&&(n=t);for(let e=0;eArray.isArray(e)?jn(e,n):n(e))}function Qg(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function Wa(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function rs(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function Vu(t,n){const e=Hr(t,n);if(e>=0)return t[1|e]}function Hr(t,n){return function(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<({token:t})),-1),Gn=as(Br("Optional"),8),Ur=as(Br("SkipSelf"),4);class pm{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function xi(t){return t instanceof pm?t.changingThisBreaksApplicationSecurity:t}const QT=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,XT=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;var ct=(()=>((ct=ct||{})[ct.NONE=0]="NONE",ct[ct.HTML=1]="HTML",ct[ct.STYLE=2]="STYLE",ct[ct.SCRIPT=3]="SCRIPT",ct[ct.URL=4]="URL",ct[ct.RESOURCE_URL=5]="RESOURCE_URL",ct))();function Yu(t){const n=function(){const t=M();return t&&t[12]}();return n?n.sanitize(ct.URL,t)||"":function(t,n){const e=function(t){return t instanceof pm&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see https://g.co/ng/security#xss)`)}return e===n}(t,"URL")?xi(t):function(t){return(t=String(t)).match(QT)||t.match(XT)?t:"unsafe:"+t}(se(t))}const Dm="__ngContext__";function Ot(t,n){t[Dm]=n}function Ju(t){const n=function(t){return t[Dm]||null}(t);return n?Array.isArray(n)?n:n.lView:null}function Xu(t){return t.ngOriginalError}function DE(t,...n){t.error(...n)}class Gr{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n),i=(t=n)&&t.ngErrorLogger||DE;var t;i(this._console,"ERROR",n),e&&i(this._console,"ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&Xu(n);for(;e&&Xu(e);)e=Xu(e);return e||null}}const Im=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Me))();function Wn(t){return t instanceof Function?t():t}var un=(()=>((un=un||{})[un.Important=1]="Important",un[un.DashCase=2]="DashCase",un))();function td(t,n){return undefined(t,n)}function fs(t){const n=t[3];return In(n)?n[3]:n}function nd(t){return Om(t[13])}function id(t){return Om(t[4])}function Om(t){for(;null!==t&&!In(t);)t=t[4];return t}function Wr(t,n,e,i,r){if(null!=i){let o,s=!1;In(i)?o=i:Un(i)&&(s=!0,i=i[0]);const a=lt(i);0===t&&null!==e?null==r?Bm(n,e,a):er(n,e,a,r||null,!0):1===t&&null!==e?er(n,e,a,r||null,!0):2===t?function(t,n,e){const i=el(t,n);i&&function(t,n,e,i){Ye(t)?t.removeChild(n,e,i):n.removeChild(e)}(t,i,n,e)}(n,a,s):3===t&&n.destroyNode(a),null!=o&&function(t,n,e,i,r){const o=e[7];o!==lt(e)&&Wr(n,t,i,o,r);for(let a=10;a0&&(t[e-1][4]=i[4]);const o=Wa(t,10+n);!function(t,n){gs(t,n,n[11],2,null,null),n[0]=null,n[6]=null}(i[1],i);const s=o[19];null!==s&&s.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function Pm(t,n){if(!(256&n[2])){const e=n[11];Ye(e)&&e.destroyNode&&gs(t,n,e,3,null,null),function(t){let n=t[13];if(!n)return ad(t[1],t);for(;n;){let e=null;if(Un(n))e=n[13];else{const i=n[10];i&&(e=i)}if(!e){for(;n&&!n[4]&&n!==t;)Un(n)&&ad(n[1],n),n=n[3];null===n&&(n=t),Un(n)&&ad(n[1],n),e=n&&n[4]}n=e}}(n)}}function ad(t,n){if(!(256&n[2])){n[2]&=-129,n[2]|=256,function(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=c]():i[r=-c].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;oo?"":r[d+1].toLowerCase();const g=8&i?f:null;if(g&&-1!==Ym(g,c,0)||2&i&&c!==f){if(Nn(i))return!1;s=!0}}}}else{if(!s&&!Nn(i)&&!Nn(l))return!1;if(s&&Nn(l))continue;s=!1,i=l|1&i}}return Nn(i)||s}function Nn(t){return 0==(1&t)}function ex(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!Nn(s)&&(n+=Xm(o,r),r=""),i=s,o=o||!Nn(i);e++}return""!==r&&(n+=Xm(o,r)),n}const ae={};function m(t){e_(Se(),M(),Ut()+t,Oa())}function e_(t,n,e,i){if(!i)if(3==(3&n[2])){const o=t.preOrderCheckHooks;null!==o&&Va(n,o,e)}else{const o=t.preOrderHooks;null!==o&&Ba(n,o,0,e)}Ti(e)}function il(t,n){return t<<17|n<<2}function kn(t){return t>>17&32767}function hd(t){return 2|t}function ci(t){return(131068&t)>>2}function pd(t,n){return-131069&t|n<<2}function fd(t){return 1|t}function d_(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;i20&&e_(t,n,20,Oa()),e(i,r)}finally{Ti(o)}}function p_(t,n,e){if(mu(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(a)!=l&&a.push(l),a.push(i,r,s)}}function w_(t,n){null!==t.hostBindings&&t.hostBindings(1,n)}function C_(t,n){n.flags|=2,(t.components||(t.components=[])).push(n.index)}function Ax(t,n,e){if(e){if(n.exportAs)for(let i=0;i0&&Id(e)}}function Id(t){for(let i=nd(t);null!==i;i=id(i))for(let r=10;r0&&Id(o)}const e=t[1].components;if(null!==e)for(let i=0;i0&&Id(r)}}function Ux(t,n){const e=an(n,t),i=e[1];(function(t,n){for(let e=n.length;ePromise.resolve(null))();function x_(t){return t[7]||(t[7]=[])}function I_(t){return t.cleanup||(t.cleanup=[])}function N_(t,n){const e=t[9],i=e?e.get(Gr,null):null;i&&i.handleError(n)}function k_(t,n,e,i,r){for(let o=0;othis.processProvider(a,n,e)),jn([n],a=>this.processInjectorType(a,[],o)),this.records.set(Od,Zr(void 0,this));const s=this.records.get(Ad);this.scope=null!=s?s.value:null,this.source=r||("object"==typeof n?null:De(n))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(n=>n.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(n,e=os,i=ce.Default){this.assertNotDestroyed();const r=rm(this),o=wi(void 0);try{if(!(i&ce.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=("function"==typeof(t=n)||"object"==typeof t&&t instanceof te)&&cu(n);a=l&&this.injectableDefInScope(l)?Zr(Pd(n),vs):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&ce.Self?O_():this.parent).get(n,e=i&ce.Optional&&e===os?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Ka]=s[Ka]||[]).unshift(De(n)),r)throw s;return function(t,n,e,i){const r=t[Ka];throw n[im]&&r.unshift(n[im]),t.message=function(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let r=De(n);if(Array.isArray(n))r=n.map(De).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):De(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(TT,"\n ")}`}("\n"+t.message,r,e,i),t.ngTokenPath=r,t[Ka]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{wi(o),rm(r)}var t}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(n=>this.get(n))}toString(){const n=[];return this.records.forEach((i,r)=>n.push(De(r))),`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(n,e,i){if(!(n=ue(n)))return!1;let r=pg(n);const o=null==r&&n.ngModule||void 0,s=void 0===o?n:o,a=-1!==i.indexOf(s);if(void 0!==o&&(r=pg(o)),null==r)return!1;if(null!=r.imports&&!a){let u;i.push(s);try{jn(r.imports,d=>{this.processInjectorType(d,e,i)&&(void 0===u&&(u=[]),u.push(d))})}finally{}if(void 0!==u)for(let d=0;dthis.processProvider(y,f,g||Oe))}}this.injectorDefTypes.add(s);const l=Qi(s)||(()=>new s);this.records.set(s,Zr(l,vs));const c=r.providers;if(null!=c&&!a){const u=n;jn(c,d=>this.processProvider(d,u,c))}return void 0!==o&&void 0!==n.providers}processProvider(n,e,i){let r=Jr(n=ue(n))?n:ue(n&&n.provide);const o=(t=n,L_(t)?Zr(void 0,t.useValue):Zr(P_(t),vs));var t;if(Jr(n)||!0!==n.multi)this.records.get(r);else{let s=this.records.get(r);s||(s=Zr(void 0,vs,!0),s.factory=()=>Uu(s.multi),this.records.set(r,s)),r=n,s.multi.push(n)}this.records.set(r,o)}hydrate(n,e){return e.value===vs&&(e.value=Yx,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(t=e.value)&&"object"==typeof t&&"function"==typeof t.ngOnDestroy&&this.onDestroy.add(e.value),e.value;var t}injectableDefInScope(n){if(!n.providedIn)return!1;const e=ue(n.providedIn);return"string"==typeof e?"any"===e||e===this.scope:this.injectorDefTypes.has(e)}}function Pd(t){const n=cu(t),e=null!==n?n.factory:Qi(t);if(null!==e)return e;if(t instanceof te)throw new Error(`Token ${De(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const n=t.length;if(n>0){const i=rs(n,"?");throw new Error(`Can't resolve all parameters for ${De(t)}: (${i.join(", ")}).`)}const e=function(t){const n=t&&(t[Ta]||t[fg]);if(n){const e=function(t){if(t.hasOwnProperty("name"))return t.name;const n=(""+t).match(/^function\s*([^\s(]+)/);return null===n?"":n[1]}(t);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.`),n}return null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new Error("unreachable")}function P_(t,n,e){let i;if(Jr(t)){const r=ue(t);return Qi(r)||Pd(r)}if(L_(t))i=()=>ue(t.useValue);else if(function(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...Uu(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))i=()=>R(ue(t.useExisting));else{const r=ue(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return Qi(r)||Pd(r);i=()=>new r(...Uu(t.deps))}return i}function Zr(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function L_(t){return null!==t&&"object"==typeof t&&xT in t}function Jr(t){return"function"==typeof t}let ut=(()=>{class t{static create(e,i){var r;if(Array.isArray(e))return A_({name:""},i,e,"");{const o=null!=(r=e.name)?r:"";return A_({name:o},e.parent,e.providers,o)}}}return t.THROW_IF_NOT_FOUND=os,t.NULL=new R_,t.\u0275prov=L({token:t,providedIn:"any",factory:()=>R(Od)}),t.__NG_ELEMENT_ID__=-1,t})();function hI(t,n){La(Ju(t)[1],gt())}function Ne(t){let n=function(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),e=!0;const i=[t];for(;n;){let r;if(Mn(t))r=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new Error("Directives cannot inherit Components");r=n.\u0275dir}if(r){if(e){i.push(r);const s=t;s.inputs=Bd(t.inputs),s.declaredInputs=Bd(t.declaredInputs),s.outputs=Bd(t.outputs);const a=r.hostBindings;a&&mI(t,a);const l=r.viewQuery,c=r.contentQueries;if(l&&fI(t,l),c&&gI(t,c),su(t.inputs,r.inputs),su(t.declaredInputs,r.declaredInputs),su(t.outputs,r.outputs),Mn(r)&&r.data.animation){const u=t.data;u.animation=(u.animation||[]).concat(r.data.animation)}}const o=r.features;if(o)for(let s=0;s=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=Ua(r.hostAttrs,e=Ua(e,r.hostAttrs))}}(i)}function Bd(t){return t===Er?{}:t===Oe?[]:t}function fI(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function gI(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function mI(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}let cl=null;function Qr(){if(!cl){const t=Me.Symbol;if(t&&t.iterator)cl=t.iterator;else{const n=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ea(lt(H[i.index])):i.index;if(Ye(e)){let H=null;if(!a&&l&&(H=function(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==H)(H.__ngLastListenerFn__||H).__ngNextListenerFn__=o,H.__ngLastListenerFn__=o,g=!1;else{o=Kd(i,n,d,o,!1);const oe=e.listen(I,r,o);f.push(o,oe),u&&u.push(r,A,S,S+1)}}else o=Kd(i,n,d,o,!0),I.addEventListener(r,o,s),f.push(o),u&&u.push(r,A,S,s)}else o=Kd(i,n,d,o,!1);const y=i.outputs;let C;if(g&&null!==y&&(C=y[r])){const E=C.length;if(E)for(let I=0;I0;)n=n[15],t--;return n}(t,J.lFrame.contextLView))[8]}(t)}function qI(t,n){let e=null;const i=function(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(0==(1&e))return n[e+1]}return null}(t);for(let r=0;r=0}const _t={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Iv(t){return t.substring(_t.key,_t.keyEnd)}function Mv(t,n){const e=_t.textEnd;return e===n?-1:(n=_t.keyEnd=function(t,n,e){for(;n32;)n++;return n}(t,_t.key=n,e),co(t,n,e))}function co(t,n,e){for(;n=0;e=Mv(n,e))cn(t,Iv(n),!0)}function On(t,n,e,i){const r=M(),o=Se(),s=li(2);o.firstUpdatePass&&Fv(o,t,s,i),n!==ae&&At(r,s,n)&&Lv(o,o.data[Ut()],r,r[11],t,r[s+1]=function(t,n){return null==t||("string"==typeof n?t+=n:"object"==typeof t&&(t=De(xi(t)))),t}(n,e),i,s)}function Av(t,n){return n>=t.expandoStartIndex}function Fv(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[Ut()],s=Av(t,e);Bv(o,i)&&null===n&&!s&&(n=!1),n=function(t,n,e,i){const r=function(t){const n=J.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=Ds(e=Zd(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=Zd(r,t,n,e,i),null===o){let l=function(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==ci(i))return t[kn(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=Zd(null,t,n,l[1],i),l=Ds(l,n.attrs,i),function(t,n,e,i){t[kn(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)}else u=e;if(r)if(0!==l){const f=kn(t[a+1]);t[i+1]=il(f,a),0!==f&&(t[f+1]=pd(t[f+1],i)),t[a+1]=function(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=il(a,0),0!==a&&(t[a+1]=pd(t[a+1],i)),a=i;else t[i+1]=il(l,0),0===a?a=i:t[l+1]=pd(t[l+1],i),l=i;c&&(t[i+1]=hd(t[i+1])),xv(t,u,i,!0),xv(t,u,i,!1),function(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&Hr(o,n)>=0&&(e[i+1]=fd(e[i+1]))}(n,u,t,i,o),s=il(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function Zd(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let f=e[r+1];f===ae&&(f=d?Oe:void 0);let g=d?Vu(f,i):u===i?f:void 0;if(c&&!fl(g)&&(g=Vu(l,i)),fl(g)&&(a=g,s))return a;const y=t[r+1];r=s?kn(y):ci(y)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=Vu(l,i))}return a}function fl(t){return void 0!==t}function Bv(t,n){return 0!=(t.flags&(n?16:32))}function D(t,n=""){const e=M(),i=Se(),r=t+20,o=i.firstCreatePass?qr(i,r,1,n,null):i.data[r],s=e[r]=function(t,n){return Ye(t)?t.createText(n):t.createTextNode(n)}(e[11],n);tl(i,e,s,o),$n(o,!1)}function ve(t){return Be("",t,""),ve}function Be(t,n,e){const i=M(),r=function(t,n,e,i){return At(t,Rr(),e)?n+se(e)+i:ae}(i,t,n,e);return r!==ae&&ui(i,Ut(),r),Be}function Jd(t,n,e,i,r){const o=M(),s=to(o,t,n,e,i,r);return s!==ae&&ui(o,Ut(),s),Jd}const rr=void 0;var NM=["en",[["a","p"],["AM","PM"],rr],[["AM","PM"],rr,rr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],rr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],rr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",rr,"{1} 'at' {0}",rr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){const e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let uo={};function rb(t){return t in uo||(uo[t]=Me.ng&&Me.ng.common&&Me.ng.common.locales&&Me.ng.common.locales[t]),uo[t]}var P=(()=>((P=P||{})[P.LocaleId=0]="LocaleId",P[P.DayPeriodsFormat=1]="DayPeriodsFormat",P[P.DayPeriodsStandalone=2]="DayPeriodsStandalone",P[P.DaysFormat=3]="DaysFormat",P[P.DaysStandalone=4]="DaysStandalone",P[P.MonthsFormat=5]="MonthsFormat",P[P.MonthsStandalone=6]="MonthsStandalone",P[P.Eras=7]="Eras",P[P.FirstDayOfWeek=8]="FirstDayOfWeek",P[P.WeekendRange=9]="WeekendRange",P[P.DateFormat=10]="DateFormat",P[P.TimeFormat=11]="TimeFormat",P[P.DateTimeFormat=12]="DateTimeFormat",P[P.NumberSymbols=13]="NumberSymbols",P[P.NumberFormats=14]="NumberFormats",P[P.CurrencyCode=15]="CurrencyCode",P[P.CurrencySymbol=16]="CurrencySymbol",P[P.CurrencyName=17]="CurrencyName",P[P.Currencies=18]="Currencies",P[P.Directionality=19]="Directionality",P[P.PluralCase=20]="PluralCase",P[P.ExtraData=21]="ExtraData",P))();const gl="en-US";let ob=gl;function th(t,n,e,i,r){if(t=ue(t),Array.isArray(t))for(let o=0;o>20;if(Jr(t)||!t.multi){const g=new Jo(l,r,b),y=ih(a,n,r?u:u+f,d);-1===y?(Ga(Xo(c,s),o,a),nh(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(g),s.push(g)):(e[y]=g,s[y]=g)}else{const g=ih(a,n,u+f,d),y=ih(a,n,u,u+f),C=g>=0&&e[g],E=y>=0&&e[y];if(r&&!E||!r&&!C){Ga(Xo(c,s),o,a);const I=function(t,n,e,i,r){const o=new Jo(t,e,b);return o.multi=[],o.index=n,o.componentProviders=0,Mb(o,r,i&&!e),o}(r?EN:TN,e.length,r,i,l);!r&&E&&(e[y].providerFactory=I),nh(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(I),s.push(I)}else nh(o,t,g>-1?g:y,Mb(e[r?y:g],l,!r&&i));!r&&i&&E&&e[y].componentProviders++}}}function nh(t,n,e,i){const r=Jr(n),o=function(t){return!!t.useClass}(n);if(r||o){const l=(o?ue(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function Mb(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function ih(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function(t,n,e){const i=Se();if(i.firstCreatePass){const r=Mn(t);th(e,i.data,i.blueprint,r,!0),th(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class Nb{}class NN{resolveComponentFactory(n){throw function(t){const n=Error(`No component factory found for ${De(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let or=(()=>{class t{}return t.NULL=new NN,t})();function kN(){return po(gt(),M())}function po(t,n){return new me(vn(t,n))}let me=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=kN,t})();function RN(t){return t instanceof me?t.nativeElement:t}class oh{}let hn=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function(){const t=M(),e=an(gt().index,t);return function(t){return t[11]}(Un(e)?e:t)}(),t})(),FN=(()=>{class t{}return t.\u0275prov=L({token:t,providedIn:"root",factory:()=>null}),t})();class Is{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const PN=new Is("13.0.3"),sh={};function yl(t,n,e,i,r=!1){for(;null!==e;){const o=n[e.index];if(null!==o&&i.push(lt(o)),In(o))for(let a=10;a-1&&(sd(n,i),Wa(e,i))}this._attachedToViewContainer=!1}Pm(this._lView[1],this._lView)}onDestroy(n){__(this._lView[1],this._lView,null,n)}markForCheck(){Md(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){kd(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,n,e){Aa(!0);try{kd(t,n,e)}finally{Aa(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){var n;this._appRef=null,gs(this._lView[1],n=this._lView,n[11],2,null,null)}attachToAppRef(n){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=n}}class LN extends Ms{constructor(n){super(n),this._view=n}detectChanges(){E_(this._view)}checkNoChanges(){!function(t){Aa(!0);try{E_(t)}finally{Aa(!1)}}(this._view)}get context(){return null}}class Rb extends or{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=kt(n);return new ah(e,this.ngModule)}}function Ob(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}const BN=new te("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Im});class ah extends Nb{constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=n.selectors.map(ox).join(","),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Ob(this.componentDef.inputs)}get outputs(){return Ob(this.componentDef.outputs)}create(n,e,i,r){const o=(r=r||this.ngModule)?function(t,n){return{get:(e,i,r)=>{const o=t.get(e,sh,r);return o!==sh||i===sh?o:n.get(e,i,r)}}}(n,r.injector):n,s=o.get(oh,xg),a=o.get(FN,null),l=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=i?function(t,n,e){if(Ye(t))return t.selectRootElement(n,e===Hn.ShadowDom);let i="string"==typeof n?t.querySelector(n):n;return i.textContent="",i}(l,i,this.componentDef.encapsulation):od(s.createRenderer(null,this.componentDef),c,function(t){const n=t.toLowerCase();return"svg"===n?"http://www.w3.org/2000/svg":"math"===n?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,f=function(t,n){return{components:[],scheduler:t||Im,clean:Wx,playerHandler:n||null,flags:0}}(),g=sl(0,null,null,1,0,null,null,null,null,null),y=ms(null,g,f,d,null,null,s,l,a,o);let C,E;Fa(y);try{const I=function(t,n,e,i,r,o){const s=e[1];e[20]=t;const l=qr(s,20,2,"#host",null),c=l.mergedAttrs=n.hostAttrs;null!==c&&(ll(l,c,!0),null!==t&&(Ha(r,t,c),null!==l.classes&&dd(r,t,l.classes),null!==l.styles&&Km(r,t,l.styles)));const u=i.createRenderer(t,n),d=ms(e,f_(n),null,n.onPush?64:16,e[20],l,i,u,o||null,null);return s.firstCreatePass&&(Ga(Xo(l,e),s,n.type),C_(s,l),D_(l,e.length,1)),al(e,d),e[20]=d}(u,this.componentDef,y,s,l);if(u)if(i)Ha(l,u,["ng-version",PN.full]);else{const{attrs:S,classes:A}=function(t){const n=[],e=[];let i=1,r=2;for(;i0&&dd(l,u,A.join(" "))}if(E=wu(g,20),void 0!==e){const S=E.projection=[];for(let A=0;Al(s,n)),n.contentQueries){const l=gt();n.contentQueries(1,s,l.directiveStart)}const a=gt();return!o.firstCreatePass||null===n.hostBindings&&null===n.hostAttrs||(Ti(a.index),y_(e[1],a,0,a.directiveStart,a.directiveEnd,n),w_(n,s)),s}(I,this.componentDef,y,f,[hI]),_s(g,y,null)}finally{Pa()}return new $N(this.componentType,C,po(E,y),y,E)}}class $N extends class{}{constructor(n,e,i,r,o){super(),this.location=i,this._rootLView=r,this._tNode=o,this.instance=e,this.hostView=this.changeDetectorRef=new LN(r),this.componentType=n}get injector(){return new Fr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}}class di{}class Ab{}const fo=new Map;class Lb extends di{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Rb(this);const i=gn(n);this._bootstrapComponents=Wn(i.bootstrap),this._r3Injector=F_(n,e,[{provide:di,useValue:this},{provide:or,useValue:this.componentFactoryResolver}],De(n)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(n)}get(n,e=ut.THROW_IF_NOT_FOUND,i=ce.Default){return n===ut||n===di||n===Od?this:this._r3Injector.get(n,e,i)}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class lh extends Ab{constructor(n){super(),this.moduleType=n,null!==gn(n)&&function(t){const n=new Set;!function e(i){const r=gn(i,!0),o=r.id;null!==o&&(function(t,n,e){if(n&&n!==e)throw new Error(`Duplicate module registered for ${t} - ${De(n)} vs ${De(n.name)}`)}(o,fo.get(o),i),fo.set(o,i));const s=Wn(r.imports);for(const a of s)n.has(a)||(n.add(a),e(a))}(t)}(n)}create(n){return new Lb(this.moduleType,n)}}function Ns(t,n,e){const i=Ht()+t,r=M();return r[i]===ae?Kn(r,i,e?n.call(e):n()):ys(r,i)}function j(t,n,e,i){return Hb(M(),Ht(),t,n,e,i)}function Ee(t,n,e,i,r){return function(t,n,e,i,r,o,s){const a=n+e;return tr(t,a,r,o)?Kn(t,a+2,s?i.call(s,r,o):i(r,o)):Os(t,a+2)}(M(),Ht(),t,n,e,i,r)}function sr(t,n,e,i,r,o){return function(t,n,e,i,r,o,s,a){const l=n+e;return ul(t,l,r,o,s)?Kn(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):Os(t,l+3)}(M(),Ht(),t,n,e,i,r,o)}function ks(t,n,e,i,r,o,s){return function(t,n,e,i,r,o,s,a,l){const c=n+e;return yn(t,c,r,o,s,a)?Kn(t,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):Os(t,c+4)}(M(),Ht(),t,n,e,i,r,o,s)}function Rs(t,n,e,i,r,o,s,a){const l=Ht()+t,c=M(),u=yn(c,l,e,i,r,o);return At(c,l+4,s)||u?Kn(c,l+5,a?n.call(a,e,i,r,o,s):n(e,i,r,o,s)):ys(c,l+5)}function go(t,n,e,i,r,o,s,a,l){const c=Ht()+t,u=M(),d=yn(u,c,e,i,r,o);return tr(u,c+4,s,a)||d?Kn(u,c+6,l?n.call(l,e,i,r,o,s,a):n(e,i,r,o,s,a)):ys(u,c+6)}function Bb(t,n,e,i){return function(t,n,e,i,r,o){let s=n+e,a=!1;for(let l=0;l=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Qi(i.type)),s=wi(b);try{const a=$a(!1),l=o();return $a(a),function(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,M(),r,l),l}finally{wi(s)}}function _o(t,n,e){const i=t+20,r=M(),o=kr(r,i);return function(t,n){return t[1].data[n].pure}(r,i)?Hb(r,Ht(),n,o.transform,e,o):o.transform(e)}function ch(t){return n=>{setTimeout(t,void 0,n)}}const k=class extends le{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){var l,c,u;let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const d=n;r=null==(l=d.next)?void 0:l.bind(d),o=null==(c=d.error)?void 0:c.bind(d),s=null==(u=d.complete)?void 0:u.bind(d)}this.__isAsync&&(o=ch(o),r&&(r=ch(r)),s&&(s=ch(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof Lt&&n.add(a),a}};function QN(){return this._results[Qr()]()}class uh{constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=Qr(),i=uh.prototype;i[e]||(i[e]=QN)}get changes(){return this._changes||(this._changes=new k)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=bn(n);(this._changesDetected=!function(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=tk,t})();const XN=He,ek=class extends XN{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n){const e=this._declarationTContainer.tViews,i=ms(this._declarationLView,e,n,16,null,e.declTNode,null,null,null,null);i[17]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[19];return null!==o&&(i[19]=o.createEmbeddedView(e)),_s(e,i,n),new Ms(i)}};function tk(){return wl(gt(),M())}function wl(t,n){return 4&t.type?new ek(n,t,po(t,n)):null}let wn=(()=>{class t{}return t.__NG_ELEMENT_ID__=nk,t})();function nk(){return qb(gt(),M())}const ik=wn,zb=class extends ik{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return po(this._hostTNode,this._hostLView)}get injector(){return new Fr(this._hostTNode,this._hostLView)}get parentInjector(){const n=ja(this._hostTNode,this._hostLView);if(jg(n)){const e=Ar(n,this._hostLView),i=Or(n);return new Fr(e[1].data[i+8],e)}return new Fr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=Wb(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-10}createEmbeddedView(n,e,i){const r=n.createEmbeddedView(e||{});return this.insert(r,i),r}createComponent(n,e,i,r,o){const s=n&&!("function"==typeof n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.ngModuleRef}const l=s?n:new ah(kt(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule&&c){const d=c.get(di,null);d&&(o=d)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[1];if(In(i[3])){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[3],f=new zb(d,d[6],d[3]);f.detach(f.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function(t,n,e,i){const r=10+i,o=e.length;i>0&&(e[r-1][4]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=10;d{class t{constructor(e){this.appInits=e,this.resolve=Sl,this.reject=Sl,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{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(R(Tl,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const Ps=new te("AppId"),Nk={provide:Ps,useFactory:function(){return`${Ch()}${Ch()}${Ch()}`},deps:[]};function Ch(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const my=new te("Platform Initializer"),yo=new te("Platform ID"),_y=new te("appBootstrapListener");let vy=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const ki=new te("LocaleId"),by=new te("DefaultCurrencyCode");class kk{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let El=(()=>{class t{compileModuleSync(e){return new lh(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Wn(gn(e).declarations).reduce((s,a)=>{const l=kt(a);return l&&s.push(new ah(l)),s},[]);return new kk(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const Ok=(()=>Promise.resolve(0))();function Dh(t){"undefined"==typeof Zone?Ok.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class ye{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new k(!1),this.onMicrotaskEmpty=new k(!1),this.onStable=new k(!1),this.onError=new k(!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)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function(){let t=Me.requestAnimationFrame,n=Me.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function(t){const n=()=>{!function(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Me,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Th(t),t.isCheckStableRunning=!0,Sh(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Th(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return yy(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),wy(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return yy(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),wy(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,Th(t),Sh(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ye.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(ye.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,Fk,Sl,Sl);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const Fk={};function Sh(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Th(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function yy(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function wy(t){t._nesting--,Sh(t)}class Vk{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new k,this.onMicrotaskEmpty=new k,this.onStable=new k,this.onError=new k}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}let Eh=(()=>{class t{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,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:()=>{ye.assertNotInAngularZone(),Dh(()=>{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())Dh(()=>{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 o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,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}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(R(ye))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Cy=(()=>{class t{constructor(){this._applications=new Map,xh.addToWindow(this)}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){return xh.findTestabilityInTree(this,e,i)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();class Bk{addToWindow(n){}findTestabilityInTree(n,e,i){return null}}let Fn,xh=new Bk;const Dy=new te("AllowMultipleToken");class Sy{constructor(n,e){this.name=n,this.token=e}}function Ty(t,n,e=[]){const i=`Platform: ${n}`,r=new te(i);return(o=[])=>{let s=Ey();if(!s||s.injector.get(Dy,!1))if(t)t(e.concat(o).concat({provide:r,useValue:!0}));else{const a=e.concat(o).concat({provide:r,useValue:!0},{provide:Ad,useValue:"platform"});!function(t){if(Fn&&!Fn.destroyed&&!Fn.injector.get(Dy,!1))throw new nn("400","");Fn=t.get(xy);const n=t.get(my,null);n&&n.forEach(e=>e())}(ut.create({providers:a,name:i}))}return function(t){const n=Ey();if(!n)throw new nn("401","");return n}()}}function Ey(){return Fn&&!Fn.destroyed?Fn:null}let xy=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const a=function(t,n){let e;return e="noop"===t?new Vk:("zone.js"===t?void 0:t)||new ye({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==n?void 0:n.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==n?void 0:n.ngZoneRunCoalescing)}),e}(i?i.ngZone:void 0,{ngZoneEventCoalescing:i&&i.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:i&&i.ngZoneRunCoalescing||!1}),l=[{provide:ye,useValue:a}];return a.run(()=>{const c=ut.create({providers:l,parent:this.injector,name:e.moduleType.name}),u=e.create(c),d=u.injector.get(Gr,null);if(!d)throw new nn("402","");return a.runOutsideAngular(()=>{const f=a.onError.subscribe({next:g=>{d.handleError(g)}});u.onDestroy(()=>{Ih(this._modules,u),f.unsubscribe()})}),function(t,n,e){try{const i=e();return ws(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(d,a,()=>{const f=u.injector.get(bo);return f.runInitializers(),f.donePromise.then(()=>(function(t){on(t,"Expected localeId to be defined"),"string"==typeof t&&(ob=t.toLowerCase().replace(/_/g,"-"))}(u.injector.get(ki,gl)||gl),this._moduleDoBootstrap(u),u))})})}bootstrapModule(e,i=[]){const r=Iy({},i);return function(t,n,e){const i=new lh(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(wo);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new nn("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 nn("404","");this._modules.slice().forEach(e=>e.destroy()),this._destroyListeners.forEach(e=>e()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(R(ut))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function Iy(t,n){return Array.isArray(n)?n.reduce(Iy,t):V(V({},t),n)}let wo=(()=>{class t{constructor(e,i,r,o,s){this._zone=e,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=o,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new Ce(c=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{c.next(this._stable),c.complete()})}),l=new Ce(c=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{ye.assertNotInAngularZone(),Dh(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,c.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{ye.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{c.next(!1)}))});return()=>{u.unsubscribe(),d.unsubscribe()}});this.isStable=function(...t){const n=zo(t),e=function(t,n){return"number"==typeof ru(t)?t.pop():1/0}(t),i=t;return i.length?1===i.length?Tt(i[0]):Go(e)(Dt(i,n)):En}(a,l.pipe(ug()))}bootstrap(e,i){if(!this._initStatus.done)throw new nn("405","");let r;r=e instanceof Nb?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(r.componentType);const o=function(t){return t.isBoundToModule}(r)?void 0:this._injector.get(di),a=r.create(ut.NULL,[],i||r.selector,o),l=a.location.nativeElement,c=a.injector.get(Eh,null),u=c&&a.injector.get(Cy);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),Ih(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new nn("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;Ih(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(_y,[]).concat(this._bootstrapListeners).forEach(r=>r(e))}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(R(ye),R(ut),R(Gr),R(or),R(bo))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function Ih(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let Ny=!0,dt=(()=>{class t{}return t.__NG_ELEMENT_ID__=Zk,t})();function Zk(t){return function(t,n,e){if(Na(t)&&!e){const i=an(t.index,n);return new Ms(i,i)}return 47&t.type?new Ms(n[16],n):null}(gt(),M(),16==(16&t))}class Ly{constructor(){}supports(n){return bs(n)}create(n){return new iR(n)}}const nR=(t,n)=>n;class iR{constructor(n){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=n||nR}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new rR(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=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(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new Vy),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Vy),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class rR{constructor(n,e){this.item=n,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 oR{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class Vy{constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new oR,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function By(t,n,e){const i=t.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 o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),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(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new aR(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class aR{constructor(n){this.key=n,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 Uy(){return new Co([new Ly])}let Co=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||Uy()),deps:[[t,new Ur,new Gn]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(t){return t.name||typeof t}(e)}'`)}}return t.\u0275prov=L({token:t,providedIn:"root",factory:Uy}),t})();function $y(){return new Do([new Hy])}let Do=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||$y()),deps:[[t,new Ur,new Gn]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Error(`Cannot find a differ supporting object '${e}'`)}}return t.\u0275prov=L({token:t,providedIn:"root",factory:$y}),t})();const cR=[new Hy],dR=new Co([new Ly]),hR=new Do(cR),pR=Ty(null,"core",[{provide:yo,useValue:"unknown"},{provide:xy,deps:[ut]},{provide:Cy,deps:[]},{provide:vy,deps:[]}]),vR=[{provide:wo,useClass:wo,deps:[ye,ut,Gr,or,bo]},{provide:BN,deps:[ye],useFactory:function(t){let n=[];return t.onStable.subscribe(()=>{for(;n.length;)n.pop()()}),function(e){n.push(e)}}},{provide:bo,useClass:bo,deps:[[new Gn,Tl]]},{provide:El,useClass:El,deps:[]},Nk,{provide:Co,useFactory:function(){return dR},deps:[]},{provide:Do,useFactory:function(){return hR},deps:[]},{provide:ki,useFactory:function(t){return t||"undefined"!=typeof $localize&&$localize.locale||gl},deps:[[new ls(ki),new Gn,new Ur]]},{provide:by,useValue:"USD"}];let yR=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(R(wo))},t.\u0275mod=Z({type:t}),t.\u0275inj=K({providers:vR}),t})(),Il=null;function Jn(){return Il}const rt=new te("DocumentToken");let lr=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:function(){return R(jy)},providedIn:"platform"}),t})();const TR=new te("Location Initialized");let jy=(()=>{class t extends lr{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Jn().getBaseHref(this._doc)}onPopState(e){const i=Jn().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Jn().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){Gy()?this._history.pushState(e,i,r):this.location.hash=r}replaceState(e,i,r){Gy()?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 t.\u0275fac=function(e){return new(e||t)(R(rt))},t.\u0275prov=L({token:t,factory:function(){return new jy(R(rt))},providedIn:"platform"}),t})();function Gy(){return!!window.history.pushState}function Oh(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function zy(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function hi(t){return t&&"?"!==t[0]?"?"+t:t}let So=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:function(){return function(t){const n=R(rt).location;return new Wy(R(lr),n&&n.origin||"")}()},providedIn:"root"}),t})();const Ah=new te("appBaseHref");let Wy=(()=>{class t extends So{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 Oh(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+hi(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+hi(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+hi(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var i,r;null==(r=(i=this._platformLocation).historyGo)||r.call(i,e)}}return t.\u0275fac=function(e){return new(e||t)(R(lr),R(Ah,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),IR=(()=>{class t extends So{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=Oh(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+hi(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+hi(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var i,r;null==(r=(i=this._platformLocation).historyGo)||r.call(i,e)}}return t.\u0275fac=function(e){return new(e||t)(R(lr),R(Ah,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Fh=(()=>{class t{constructor(e,i){this._subject=new k,this._urlChangeListeners=[],this._platformStrategy=e;const r=this._platformStrategy.getBaseHref();this._platformLocation=i,this._baseHref=zy(qy(r)),this._platformStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+hi(i))}normalize(e){return t.stripTrailingSlash(function(t,n){return t&&n.startsWith(t)?n.substring(t.length):n}(this._baseHref,qy(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._platformStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+hi(i)),r)}replaceState(e,i="",r=null){this._platformStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+hi(i)),r)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(e=0){var i,r;null==(r=(i=this._platformStrategy).historyGo)||r.call(i,e)}onUrlChange(e){this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}))}_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 t.normalizeQueryParams=hi,t.joinWithSlash=Oh,t.stripTrailingSlash=zy,t.\u0275fac=function(e){return new(e||t)(R(So),R(lr))},t.\u0275prov=L({token:t,factory:function(){return new Fh(R(So),R(lr))},providedIn:"root"}),t})();function qy(t){return t.replace(/\/index.html$/,"")}var ht=(()=>((ht=ht||{})[ht.Zero=0]="Zero",ht[ht.One=1]="One",ht[ht.Two=2]="Two",ht[ht.Few=3]="Few",ht[ht.Many=4]="Many",ht[ht.Other=5]="Other",ht))();const LR=function(t){return function(t){const n=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=rb(n);if(e)return e;const i=n.split("-")[0];if(e=rb(i),e)return e;if("en"===i)return NM;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[P.PluralCase]};class Vl{}let hO=(()=>{class t extends Vl{constructor(e){super(),this.locale=e}getPluralCategory(e,i){switch(LR(i||this.locale)(e)){case ht.Zero:return"zero";case ht.One:return"one";case ht.Two:return"two";case ht.Few:return"few";case ht.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(R(ki))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function n0(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}let zt=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,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&&(bs(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 ${De(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 t.\u0275fac=function(e){return new(e||t)(b(Co),b(Do),b(me),b(hn))},t.\u0275dir=O({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class fO{constructor(n,e,i,r){this.$implicit=n,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 Wt=(()=>{class t{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;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(i){throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(t){return t.name||typeof t}(e)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=[];e.forEachOperation((r,o,s)=>{if(null==r.previousIndex){const a=this._viewContainer.createEmbeddedView(this._template,new fO(null,this._ngForOf,-1,-1),null===s?void 0:s),l=new r0(r,a);i.push(l)}else if(null==s)this._viewContainer.remove(null===o?void 0:o);else if(null!==o){const a=this._viewContainer.get(o);this._viewContainer.move(a,s);const l=new r0(r,a);i.push(l)}});for(let r=0;r{this._viewContainer.get(r.currentIndex).context.$implicit=r.item})}_perViewChange(e,i){e.context.$implicit=i.item}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(b(wn),b(He),b(Co))},t.\u0275dir=O({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class r0{constructor(n,e){this.record=n,this.view=e}}let je=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new mO,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){o0("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){o0("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 t.\u0275fac=function(e){return new(e||t)(b(wn),b(He))},t.\u0275dir=O({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class mO{constructor(){this.$implicit=null,this.ngIf=null}}function o0(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${De(n)}'.`)}let fi=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split(".");null!=(i=null!=i&&o?`${i}${o}`:i)?this._renderer.setStyle(this._ngEl.nativeElement,r,i):this._renderer.removeStyle(this._ngEl.nativeElement,r)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(Do),b(hn))},t.\u0275dir=O({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),Et=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(e){if(e.ngTemplateOutlet){const i=this._viewContainerRef;this._viewRef&&i.remove(i.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?i.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(b(wn))},t.\u0275dir=O({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[nt]}),t})();class yO{createSubscription(n,e){return n.subscribe({next:e,error:i=>{throw i}})}dispose(n){n.unsubscribe()}onDestroy(n){n.unsubscribe()}}class wO{createSubscription(n,e){return n.then(e,i=>{throw i})}dispose(n){}onDestroy(n){}}const CO=new wO,DO=new yO;let To=(()=>{class t{constructor(e){this._ref=e,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(ws(e))return CO;if(gv(e))return DO;throw function(t,n){return Error(`InvalidPipeArgument: '${n}' for pipe '${De(t)}'`)}(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(b(dt,16))},t.\u0275pipe=Xt({name:"async",type:t,pure:!1}),t})(),Ae=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({providers:[{provide:Vl,useClass:hO}]}),t})();const l0="browser";let jO=(()=>{class t{}return t.\u0275prov=L({token:t,providedIn:"root",factory:()=>new GO(R(rt),window)}),t})();class GO{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),this.attemptFocus(e))}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}attemptFocus(n){return n.focus(),this.document.activeElement===n}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=u0(this.window.history)||u0(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch(n){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(n){return!1}}}function u0(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class d0{}class Kh extends class extends class{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){var t;t=new Kh,Il||(Il=t)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=(Bs=Bs||document.querySelector("base"),Bs?Bs.getAttribute("href"):null);return null==e?null:function(t){Bl=Bl||document.createElement("a"),Bl.setAttribute("href",t);const n=Bl.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){Bs=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return n0(document.cookie,n)}}let Bl,Bs=null;const h0=new te("TRANSITION_ID"),ZO=[{provide:Tl,useFactory:function(t,n,e){return()=>{e.get(bo).donePromise.then(()=>{const i=Jn(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},Me.getAllAngularTestabilities=()=>n.getAllTestabilities(),Me.getAllAngularRootElements=()=>n.getAllRootElements(),Me.frameworkStabilizers||(Me.frameworkStabilizers=[]),Me.frameworkStabilizers.push(i=>{const r=Me.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){if(null==e)return null;const r=n.getTestability(e);return null!=r?r:i?Jn().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null}}let JO=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const Hl=new te("EventManagerPlugins");let Ul=(()=>{class t{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 o=0;o{class t{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 t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Hs=(()=>{class t extends f0{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}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(g0),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(g0))}}return t.\u0275fac=function(e){return new(e||t)(R(rt))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function g0(t){Jn().remove(t)}const Zh={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/"},Jh=/%COMP%/g;function $l(t,n,e){for(let i=0;i{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let Qh=(()=>{class t{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new Xh(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case Hn.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new iA(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case 1:case Hn.ShadowDom:return new rA(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=$l(i.id,i.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(R(Ul),R(Hs),R(Ps))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();class Xh{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(Zh[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){n.appendChild(e)}insertBefore(n,e,i){n&&n.insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=Zh[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=Zh[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(un.DashCase|un.Important)?n.style.setProperty(e,i,r&un.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&un.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,v0(i)):this.eventManager.addEventListener(n,e,v0(i))}}class iA extends Xh{constructor(n,e,i,r){super(n),this.component=i;const o=$l(r+"-"+i.id,i.styles,[]);e.addStyles(o),this.contentAttr="_ngcontent-%COMP%".replace(Jh,r+"-"+i.id),this.hostAttr="_nghost-%COMP%".replace(Jh,r+"-"+i.id)}applyToHost(n){super.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}class rA extends Xh{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=$l(r.id,r.styles,[]);for(let s=0;s{class t extends p0{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 t.\u0275fac=function(e){return new(e||t)(R(rt))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const y0=["alt","control","meta","shift"],aA={"\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"},w0={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"},lA={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let cA=(()=>{class t extends p0{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Jn().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="";if(y0.forEach(l=>{const c=i.indexOf(l);c>-1&&(i.splice(c,1),s+=l+".")}),s+=o,0!=i.length||0===o.length)return null;const a={};return a.domEventName=r,a.fullKey=s,a}static getEventFullKey(e){let i="",r=function(t){let n=t.key;if(null==n){if(n=t.keyIdentifier,null==n)return"Unidentified";n.startsWith("U+")&&(n=String.fromCharCode(parseInt(n.substring(2),16)),3===t.location&&w0.hasOwnProperty(n)&&(n=w0[n]))}return aA[n]||n}(e);return r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),y0.forEach(o=>{o!=r&&lA[o](e)&&(i+=o+".")}),i+=r,i}static eventCallback(e,i,r){return o=>{t.getEventFullKey(o)===e&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(R(rt))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const fA=Ty(pR,"browser",[{provide:yo,useValue:l0},{provide:my,useValue:function(){Kh.makeCurrent(),Yh.init()},multi:!0},{provide:rt,useFactory:function(){return t=document,bu=t,document;var t},deps:[]}]),gA=[{provide:Ad,useValue:"root"},{provide:Gr,useFactory:function(){return new Gr},deps:[]},{provide:Hl,useClass:oA,multi:!0,deps:[rt,ye,yo]},{provide:Hl,useClass:cA,multi:!0,deps:[rt]},{provide:Qh,useClass:Qh,deps:[Ul,Hs,Ps]},{provide:oh,useExisting:Qh},{provide:f0,useExisting:Hs},{provide:Hs,useClass:Hs,deps:[rt]},{provide:Eh,useClass:Eh,deps:[ye]},{provide:Ul,useClass:Ul,deps:[Hl,ye]},{provide:d0,useClass:JO,deps:[]}];let mA=(()=>{class t{constructor(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:Ps,useValue:e.appId},{provide:h0,useExisting:Ps},ZO]}}}return t.\u0275fac=function(e){return new(e||t)(R(t,12))},t.\u0275mod=Z({type:t}),t.\u0275inj=K({providers:gA,imports:[Ae,yR]}),t})();"undefined"!=typeof window&&window;const{isArray:xA}=Array,{getPrototypeOf:IA,prototype:MA,keys:NA}=Object;function S0(t){if(1===t.length){const n=t[0];if(xA(n))return{args:n,keys:null};if(function(t){return t&&"object"==typeof t&&IA(t)===MA}(n)){const e=NA(n);return{args:e.map(i=>n[i]),keys:e}}}return{args:t,keys:null}}const{isArray:RA}=Array;function tp(t){return q(n=>function(t,n){return RA(n)?t(...n):t(n)}(t,n))}function T0(t,n){return t.reduce((e,i,r)=>(e[i]=n[r],e),{})}let E0=(()=>{class t{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 t.\u0275fac=function(e){return new(e||t)(b(hn),b(me))},t.\u0275dir=O({type:t}),t})(),cr=(()=>{class t extends E0{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ln(t)))(i||t)}}(),t.\u0275dir=O({type:t,features:[Ne]}),t})();const xt=new te("NgValueAccessor"),PA={provide:xt,useExisting:pe(()=>Oi),multi:!0},VA=new te("CompositionEventMode");let Oi=(()=>{class t extends E0{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Jn()?Jn().getUserAgent():"";return/android (\d+)/.test(t.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 t.\u0275fac=function(e){return new(e||t)(b(hn),b(me),b(VA,8))},t.\u0275dir=O({type:t,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&&N("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[ge([PA]),Ne]}),t})();function Ai(t){return null==t||0===t.length}function I0(t){return null!=t&&"number"==typeof t.length}const Ft=new te("NgValidators"),Fi=new te("NgAsyncValidators"),BA=/^(?=.{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 xe{static min(n){return t=n,n=>{if(Ai(n.value)||Ai(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{if(Ai(n.value)||Ai(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null};var t}static required(n){return Ai(n.value)?{required:!0}:null}static requiredTrue(n){return!0===n.value?null:{required:!0}}static email(n){return Ai((t=n).value)||BA.test(t.value)?null:{email:!0};var t}static minLength(n){return t=n,n=>Ai(n.value)||!I0(n.value)?null:n.value.lengthI0(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null;var t}static pattern(n){return function(t){if(!t)return Us;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if(Ai(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return $0(n)}static composeAsync(n){return j0(n)}}function Us(t){return null}function L0(t){return null!=t}function V0(t){const n=ws(t)?Dt(t):t;return qd(n),n}function B0(t){let n={};return t.forEach(e=>{n=null!=e?V(V({},n),e):n}),0===Object.keys(n).length?null:n}function H0(t,n){return n.map(e=>e(t))}function U0(t){return t.map(n=>function(t){return!t.validate}(n)?n:e=>n.validate(e))}function $0(t){if(!t)return null;const n=t.filter(L0);return 0==n.length?null:function(e){return B0(H0(e,n))}}function np(t){return null!=t?$0(U0(t)):null}function j0(t){if(!t)return null;const n=t.filter(L0);return 0==n.length?null:function(e){return function(...t){const n=Da(t),{args:e,keys:i}=S0(t),r=new Ce(o=>{const{length:s}=e;if(!s)return void o.complete();const a=new Array(s);let l=s,c=s;for(let u=0;u{d||(d=!0,c--),a[u]=f},()=>l--,void 0,()=>{(!l||!d)&&(c||o.next(i?T0(i,a):a),o.complete())}))}});return n?r.pipe(tp(n)):r}(H0(e,n).map(V0)).pipe(q(B0))}}function ip(t){return null!=t?j0(U0(t)):null}function G0(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function z0(t){return t._rawValidators}function W0(t){return t._rawAsyncValidators}function rp(t){return t?Array.isArray(t)?t:[t]:[]}function jl(t,n){return Array.isArray(t)?t.includes(n):t===n}function q0(t,n){const e=rp(n);return rp(t).forEach(r=>{jl(e,r)||e.push(r)}),e}function K0(t,n){return rp(n).filter(e=>!jl(t,e))}class Y0{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(n){this._rawValidators=n||[],this._composedValidatorFn=np(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=ip(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class qt extends Y0{get formDirective(){return null}get path(){return null}}class Pi extends Y0{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Z0{constructor(n){this._cd=n}is(n){var e,i,r;return"submitted"===n?!!(null==(e=this._cd)?void 0:e.submitted):!!(null==(r=null==(i=this._cd)?void 0:i.control)?void 0:r[n])}}let ur=(()=>{class t extends Z0{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(b(Pi,2))},t.\u0275dir=O({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&ke("ng-untouched",i.is("untouched"))("ng-touched",i.is("touched"))("ng-pristine",i.is("pristine"))("ng-dirty",i.is("dirty"))("ng-valid",i.is("valid"))("ng-invalid",i.is("invalid"))("ng-pending",i.is("pending"))},features:[Ne]}),t})(),Eo=(()=>{class t extends Z0{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(b(qt,10))},t.\u0275dir=O({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&ke("ng-untouched",i.is("untouched"))("ng-touched",i.is("touched"))("ng-pristine",i.is("pristine"))("ng-dirty",i.is("dirty"))("ng-valid",i.is("valid"))("ng-invalid",i.is("invalid"))("ng-pending",i.is("pending"))("ng-submitted",i.is("submitted"))},features:[Ne]}),t})();function zl(t,n){return[...n.path,t]}function $s(t,n){ap(t,n),n.valueAccessor.writeValue(t.value),function(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&J0(t,n)})}(t,n),function(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&J0(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function Wl(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),Kl(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function ql(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function ap(t,n){const e=z0(t);null!==n.validator?t.setValidators(G0(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=W0(t);null!==n.asyncValidator?t.setAsyncValidators(G0(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();ql(n._rawValidators,r),ql(n._rawAsyncValidators,r)}function Kl(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=z0(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=W0(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return ql(n._rawValidators,i),ql(n._rawAsyncValidators,i),e}function J0(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function lp(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}function cp(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===Oi?e=o:function(t){return Object.getPrototypeOf(t.constructor)===cr}(o)?i=o:r=o}),r||i||e||null}function Yl(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}const js="VALID",Zl="INVALID",xo="PENDING",Gs="DISABLED";function up(t){return(hp(t)?t.validators:t)||null}function e1(t){return Array.isArray(t)?np(t):t||null}function dp(t,n){return(hp(n)?n.asyncValidators:t)||null}function t1(t){return Array.isArray(t)?ip(t):t||null}function hp(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class pp{constructor(n,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=n,this._rawAsyncValidators=e,this._composedValidatorFn=e1(this._rawValidators),this._composedAsyncValidatorFn=t1(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===js}get invalid(){return this.status===Zl}get pending(){return this.status==xo}get disabled(){return this.status===Gs}get enabled(){return this.status!==Gs}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._rawValidators=n,this._composedValidatorFn=e1(n)}setAsyncValidators(n){this._rawAsyncValidators=n,this._composedAsyncValidatorFn=t1(n)}addValidators(n){this.setValidators(q0(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(q0(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(K0(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(K0(n,this._rawAsyncValidators))}hasValidator(n){return jl(this._rawValidators,n)}hasAsyncValidator(n){return jl(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=xo,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=Gs,this.errors=null,this._forEachChild(i=>{i.disable(st(V({},n),{onlySelf:!0}))}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(st(V({},n),{skipPristineCheck:e})),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=js,this._forEachChild(i=>{i.enable(st(V({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(st(V({},n),{skipPristineCheck:e})),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===js||this.status===xo)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Gs:js}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=xo,this._hasOwnPendingAsyncValidator=!0;const e=V0(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){return function(t,n,e){if(null==n||(Array.isArray(n)||(n=n.split(".")),Array.isArray(n)&&0===n.length))return null;let i=t;return n.forEach(r=>{i=i instanceof zs?i.controls.hasOwnProperty(r)?i.controls[r]:null:i instanceof fp&&i.at(r)||null}),i}(this,n)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new k,this.statusChanges=new k}_calculateStatus(){return this._allControlsDisabled()?Gs:this.errors?Zl:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(xo)?xo:this._anyControlsHaveStatus(Zl)?Zl:js}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_isBoxedValue(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){hp(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class Io extends pp{constructor(n=null,e,i){super(up(e),dp(i,e)),this._onChange=[],this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=null,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){Yl(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){Yl(this._onDisabledChange,n)}_forEachChild(n){}_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(n){this._isBoxedValue(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}}class zs extends pp{constructor(n,e,i){super(up(e),dp(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){this._checkAllValuesPresent(n),Object.keys(n).forEach(i=>{this._throwIfControlMissing(i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e instanceof Io?e.value:e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_throwIfControlMissing(n){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[n])throw new Error(`Cannot find form control with name: ${n}.`)}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const e of Object.keys(this.controls)){const i=this.controls[e];if(this.contains(e)&&n(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(n,e,i)=>((e.enabled||this.disabled)&&(n[i]=e.value),n))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(n){this._forEachChild((e,i)=>{if(void 0===n[i])throw new Error(`Must supply a value for form control with name: '${i}'.`)})}}class fp extends pp{constructor(n,e,i){super(up(e),dp(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[n]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){this._checkAllValuesPresent(n),n.forEach((i,r)=>{this._throwIfControlMissing(r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n instanceof Io?n.value:n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_throwIfControlMissing(n){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(n))throw new Error(`Cannot find form control at index ${n}`)}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_checkAllValuesPresent(n){this._forEachChild((e,i)=>{if(void 0===n[i])throw new Error(`Must supply a value for form control at index: ${i}.`)})}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}}const eF={provide:Pi,useExisting:pe(()=>Jl)},o1=(()=>Promise.resolve(null))();let Jl=(()=>{class t extends Pi{constructor(e,i,r,o){super(),this.control=new Io,this._registered=!1,this.update=new k,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=cp(0,o)}ngOnChanges(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),lp(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?zl(this.name,this._parent):[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(){$s(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){o1.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1})})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=""===i||i&&"false"!==i;o1.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(b(qt,9),b(Ft,10),b(Fi,10),b(xt,10))},t.\u0275dir=O({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[ge([eF]),Ne,nt]}),t})(),Mo=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=O({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})(),a1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})();const mp=new te("NgModelWithFormControlWarning"),sF={provide:qt,useExisting:pe(()=>Li)};let Li=(()=>{class t extends qt{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 k,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&&(Kl(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 $s(i,e),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Wl(e.control||null,e,!1),Yl(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,function(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(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&&(Wl(i||null,e),r instanceof Io&&($s(r,e),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function(t,n){ap(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function(t,n){return Kl(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ap(this.form,this),this._oldForm&&Kl(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(b(Ft,10),b(Fi,10))},t.\u0275dir=O({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&N("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[ge([sF]),Ne,nt]}),t})();const cF={provide:Pi,useExisting:pe(()=>dr)};let dr=(()=>{class t extends Pi{constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new k,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=cp(0,o)}set isDisabled(e){}ngOnChanges(e){this._added||this._setUpControl(),lp(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return zl(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(b(qt,13),b(Ft,10),b(Fi,10),b(xt,10),b(mp,8))},t.\u0275dir=O({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[ge([cF]),Ne,nt]}),t})();const uF={provide:xt,useExisting:pe(()=>bp),multi:!0};function h1(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let bp=(()=>{class t extends cr{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const i=this._getOptionId(e);null==i&&this.setProperty("selectedIndex",-1);const r=h1(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ln(t)))(i||t)}}(),t.\u0275dir=O({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&N("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[ge([uF]),Ne]}),t})(),qs=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(h1(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(hn),b(bp,9))},t.\u0275dir=O({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const hF={provide:xt,useExisting:pe(()=>hr),multi:!0};function p1(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let hr=(()=>{class t extends cr{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(p1(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(p1(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(hn),b(hr,9))},t.\u0275dir=O({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})(),D1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[a1]]}),t})(),Xl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[D1]}),t})(),S1=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:mp,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[D1]}),t})(),Ys=(()=>{class t{group(e,i=null){const r=this._reduceControls(e);let a,o=null,s=null;return null!=i&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(i)?(o=null!=i.validators?i.validators:null,s=null!=i.asyncValidators?i.asyncValidators:null,a=null!=i.updateOn?i.updateOn:void 0):(o=null!=i.validator?i.validator:null,s=null!=i.asyncValidator?i.asyncValidator:null)),new zs(r,{asyncValidators:s,updateOn:a,validators:o})}control(e,i,r){return new Io(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new fp(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Io||e instanceof zs||e instanceof fp?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:S1}),t})();function Y(...t){return Dt(t,zo(t))}function No(t,n){return ee(n)?at(t,n,1):at(t,1)}function Kt(t,n){return ze((e,i)=>{let r=0;e.subscribe(new Ie(i,o=>t.call(n,o,r++)&&i.next(o)))})}class T1{}class E1{}class gi{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(n).forEach(e=>{let i=n[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(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof gi?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new gi;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof gi?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class DF{encodeKey(n){return x1(n)}encodeValue(n){return x1(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const TF=/%(\d[a-f0-9])/gi,EF={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function x1(t){return encodeURIComponent(t).replace(TF,(n,e)=>{var i;return null!=(i=EF[e])?i:n})}function I1(t){return`${t}`}class Vi{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new DF,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e];this.map.set(e,Array.isArray(i)?i:[i])})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new Vi({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(I1(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(I1(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class xF{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}keys(){return this.map.keys()}}function M1(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function N1(t){return"undefined"!=typeof Blob&&t instanceof Blob}function k1(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Zs{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function(t){switch(t){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,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new gi),this.context||(this.context=new xF),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":af.set(g,n.setHeaders[g]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((f,g)=>f.set(g,n.setParams[g]),c)),new Zs(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var ft=(()=>((ft=ft||{})[ft.Sent=0]="Sent",ft[ft.UploadProgress=1]="UploadProgress",ft[ft.ResponseHeader=2]="ResponseHeader",ft[ft.DownloadProgress=3]="DownloadProgress",ft[ft.Response=4]="Response",ft[ft.User=5]="User",ft))();class wp{constructor(n,e=200,i="OK"){this.headers=n.headers||new gi,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class Cp extends wp{constructor(n={}){super(n),this.type=ft.ResponseHeader}clone(n={}){return new Cp({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class ec extends wp{constructor(n={}){super(n),this.type=ft.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new ec({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class R1 extends wp{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function Dp(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let ko=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Zs)o=e;else{let l,c;l=r.headers instanceof gi?r.headers:new gi(r.headers),r.params&&(c=r.params instanceof Vi?r.params:new Vi({fromObject:r.params})),o=new Zs(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 s=Y(o).pipe(No(l=>this.handler.handle(l)));if(e instanceof Zs||"events"===r.observe)return s;const a=s.pipe(Kt(l=>l instanceof ec));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(q(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(q(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(q(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(q(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 Vi).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,Dp(r,i))}post(e,i,r={}){return this.request("POST",e,Dp(r,i))}put(e,i,r={}){return this.request("PUT",e,Dp(r,i))}}return t.\u0275fac=function(e){return new(e||t)(R(T1))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();class O1{constructor(n,e){this.next=n,this.interceptor=e}handle(n){return this.interceptor.intercept(n,this.next)}}const tc=new te("HTTP_INTERCEPTORS");let NF=(()=>{class t{intercept(e,i){return i.handle(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const kF=/^\)\]\}',?\n/;let A1=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Ce(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((g,y)=>r.setRequestHeader(g,y.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const g=e.detectContentTypeHeader();null!==g&&r.setRequestHeader("Content-Type",g)}if(e.responseType){const g=e.responseType.toLowerCase();r.responseType="json"!==g?g:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const g=1223===r.status?204:r.status,y=r.statusText||"OK",C=new gi(r.getAllResponseHeaders()),E=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new Cp({headers:C,status:g,statusText:y,url:E}),s},l=()=>{let{headers:g,status:y,statusText:C,url:E}=a(),I=null;204!==y&&(I=void 0===r.response?r.responseText:r.response),0===y&&(y=I?200:0);let S=y>=200&&y<300;if("json"===e.responseType&&"string"==typeof I){const A=I;I=I.replace(kF,"");try{I=""!==I?JSON.parse(I):null}catch(H){I=A,S&&(S=!1,I={error:H,text:I})}}S?(i.next(new ec({body:I,headers:g,status:y,statusText:C,url:E||void 0})),i.complete()):i.error(new R1({error:I,headers:g,status:y,statusText:C,url:E||void 0}))},c=g=>{const{url:y}=a(),C=new R1({error:g,status:r.status||0,statusText:r.statusText||"Unknown Error",url:y||void 0});i.error(C)};let u=!1;const d=g=>{u||(i.next(a()),u=!0);let y={type:ft.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(y.total=g.total),"text"===e.responseType&&!!r.responseText&&(y.partialText=r.responseText),i.next(y)},f=g=>{let y={type:ft.UploadProgress,loaded:g.loaded};g.lengthComputable&&(y.total=g.total),i.next(y)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",f)),r.send(o),i.next({type:ft.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",f)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(R(d0))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const Sp=new te("XSRF_COOKIE_NAME"),Tp=new te("XSRF_HEADER_NAME");class F1{}let OF=(()=>{class t{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=n0(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(R(rt),R(yo),R(Sp))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Ep=(()=>{class t{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 o=this.tokenService.getToken();return null!==o&&!e.headers.has(this.headerName)&&(e=e.clone({headers:e.headers.set(this.headerName,o)})),i.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(R(F1),R(Tp))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),AF=(()=>{class t{constructor(e,i){this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=this.injector.get(tc,[]);this.chain=i.reduceRight((r,o)=>new O1(r,o),this.backend)}return this.chain.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(R(E1),R(ut))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),FF=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Ep,useClass:NF}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Sp,useValue:e.cookieName}:[],e.headerName?{provide:Tp,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({providers:[Ep,{provide:tc,useExisting:Ep,multi:!0},{provide:F1,useClass:OF},{provide:Sp,useValue:"XSRF-TOKEN"},{provide:Tp,useValue:"X-XSRF-TOKEN"}]}),t})(),PF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({providers:[ko,{provide:T1,useClass:AF},A1,{provide:E1,useExisting:A1}],imports:[[FF.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();class yt extends le{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return!e.closed&&n.next(this._value),e}getValue(){const{hasError:n,thrownError:e,_value:i}=this;if(n)throw e;return this._throwIfClosed(),i}next(n){super.next(this._value=n)}}function P1(t,n,e){t?ri(e,t,n):n()}const nc=Ct(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Js(...t){return Go(1)(Dt(t,zo(t)))}function L1(t){return new Ce(n=>{Tt(t()).subscribe(n)})}function V1(){return ze((t,n)=>{let e=null;t._refCount++;const i=new Ie(n,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount)return void(e=null);const r=t._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),n.unsubscribe()});t.subscribe(i),i.closed||(e=t.connect())})}class BF extends Ce{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,qf(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:n}=this;this._subject=this._connection=null,null==n||n.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new Lt;const e=this.getSubject();n.add(this.source.subscribe(new Ie(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),n.closed&&(this._connection=null,n=Lt.EMPTY)}return n}refCount(){return V1()(this)}}function Qn(t,n){return ze((e,i)=>{let r=null,o=0,s=!1;const a=()=>s&&!r&&i.complete();e.subscribe(new Ie(i,l=>{null==r||r.unsubscribe();let c=0;const u=o++;Tt(t(l,u)).subscribe(r=new Ie(i,d=>i.next(n?n(l,d,u,c++):d),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Ro(...t){const n=zo(t);return ze((e,i)=>{(n?Js(t,e,n):Js(t,e)).subscribe(i)})}function HF(t,n,e,i,r){return(o,s)=>{let a=e,l=n,c=0;o.subscribe(new Ie(s,u=>{const d=c++;l=a?t(l,u,d):(a=!0,u),i&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}function B1(t,n){return ze(HF(t,n,arguments.length>=2,!0))}function pn(t){return ze((n,e)=>{let o,i=null,r=!1;i=n.subscribe(new Ie(e,void 0,void 0,s=>{o=Tt(t(s,pn(t)(n))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function Ip(t){return t<=0?()=>En:ze((n,e)=>{let i=[];n.subscribe(new Ie(e,r=>{i.push(r),t{for(const r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function H1(t=UF){return ze((n,e)=>{let i=!1;n.subscribe(new Ie(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(t())))})}function UF(){return new nc}function U1(t){return ze((n,e)=>{let i=!1;n.subscribe(new Ie(e,r=>{i=!0,e.next(r)},()=>{i||e.next(t),e.complete()}))})}function Vn(t,n){const e=arguments.length>=2;return i=>i.pipe(t?Kt((r,o)=>t(r,o,i)):ii,Vt(1),e?U1(n):H1(()=>new nc))}function Yt(t,n,e){const i=ee(t)||n||e?{next:t,error:n,complete:e}:t;return i?ze((r,o)=>{var s;null===(s=i.subscribe)||void 0===s||s.call(i);let a=!0;r.subscribe(new Ie(o,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),o.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),o.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)}))}):ii}class mi{constructor(n,e){this.id=n,this.url=e}}class ic extends mi{constructor(n,e,i="imperative",r=null){super(n,e),this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Qs extends mi{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class $1 extends mi{constructor(n,e,i){super(n,e),this.reason=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class GF extends mi{constructor(n,e,i){super(n,e),this.error=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class zF extends mi{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class WF extends mi{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class qF extends mi{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class KF extends mi{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class YF extends mi{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class j1{constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class G1{constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class ZF{constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class JF{constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class QF{constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class XF{constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class z1{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const _e="primary";class eP{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Oo(t){return new eP(t)}const W1="ngNavigationCancelingError";function Mp(t){const n=Error("NavigationCancelingError: "+t);return n[W1]=!0,n}function nP(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function K1(t){return Array.prototype.concat.apply([],t)}function Y1(t){return t.length>0?t[t.length-1]:null}function It(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function ei(t){return qd(t)?t:ws(t)?Dt(Promise.resolve(t)):Y(t)}const oP={exact:function Q1(t,n,e){if(!fr(t.segments,n.segments)||!rc(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!Q1(t.children[i],n.children[i],e))return!1;return!0},subset:X1},Z1={exact:function(t,n){return Xn(t,n)},subset:function(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>q1(t[e],n[e]))},ignored:()=>!0};function J1(t,n,e){return oP[e.paths](t.root,n.root,e.matrixParams)&&Z1[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function X1(t,n,e){return ew(t,n,n.segments,e)}function ew(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!fr(r,e)||n.hasChildren()||!rc(r,e,i))}if(t.segments.length===e.length){if(!fr(t.segments,e)||!rc(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!X1(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(fr(t.segments,r)&&rc(t.segments,r,i)&&t.children[_e])&&ew(t.children[_e],n,o,i)}}function rc(t,n,e){return n.every((i,r)=>Z1[e](t[r].parameters,i.parameters))}class pr{constructor(n,e,i){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Oo(this.queryParams)),this._queryParamMap}toString(){return uP.serialize(this)}}class we{constructor(n,e){this.segments=n,this.children=e,this.parent=null,It(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return oc(this)}}class Xs{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Oo(this.parameters)),this._parameterMap}toString(){return ow(this)}}function fr(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}class tw{}class nw{parse(n){const e=new bP(n);return new pr(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${ea(n.root,!0)}`,i=function(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${sc(e)}=${sc(r)}`).join("&"):`${sc(e)}=${sc(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams);var t;return`${e}${i}${"string"==typeof n.fragment?`#${t=n.fragment,encodeURI(t)}`:""}`}}const uP=new nw;function oc(t){return t.segments.map(n=>ow(n)).join("/")}function ea(t,n){if(!t.hasChildren())return oc(t);if(n){const e=t.children[_e]?ea(t.children[_e],!1):"",i=[];return It(t.children,(r,o)=>{o!==_e&&i.push(`${o}:${ea(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function(t,n){let e=[];return It(t.children,(i,r)=>{r===_e&&(e=e.concat(n(i,r)))}),It(t.children,(i,r)=>{r!==_e&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===_e?[ea(t.children[_e],!1)]:[`${r}:${ea(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[_e]?`${oc(t)}/${e[0]}`:`${oc(t)}/(${e.join("//")})`}}function iw(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function sc(t){return iw(t).replace(/%3B/gi,";")}function Np(t){return iw(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ac(t){return decodeURIComponent(t)}function rw(t){return ac(t.replace(/\+/g,"%20"))}function ow(t){return`${Np(t.path)}${function(t){return Object.keys(t).map(n=>`;${Np(n)}=${Np(t[n])}`).join("")}(t.parameters)}`}const fP=/^[^\/()?;=#]+/;function lc(t){const n=t.match(fP);return n?n[0]:""}const gP=/^[^=?&#]+/,_P=/^[^&#]+/;class bP{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new we([],{}):new we([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[_e]=new we(n,e)),i}parseSegment(){const n=lc(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(n),new Xs(ac(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=lc(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=lc(this.remaining);r&&(i=r,this.capture(i))}n[ac(e)]=ac(i)}parseQueryParam(n){const e=function(t){const n=t.match(gP);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function(t){const n=t.match(_P);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=rw(e),o=rw(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=lc(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let o;i.indexOf(":")>-1?(o=i.substr(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=_e);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[_e]:new we([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new Error(`Expected "${n}".`)}}class sw{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=kp(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=kp(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=Rp(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return Rp(n,this._root).map(e=>e.value)}}function kp(t,n){if(t===n.value)return n;for(const e of n.children){const i=kp(t,e);if(i)return i}return null}function Rp(t,n){if(t===n.value)return[n];for(const e of n.children){const i=Rp(t,e);if(i.length)return i.unshift(n),i}return[]}class _i{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Ao(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class aw extends sw{constructor(n,e){super(n),this.snapshot=e,Op(this,n)}toString(){return this.snapshot.toString()}}function lw(t,n){const e=function(t,n){const s=new cc([],{},{},"",{},_e,n,null,t.root,-1,{});return new uw("",new _i(s,[]))}(t,n),i=new yt([new Xs("",{})]),r=new yt({}),o=new yt({}),s=new yt({}),a=new yt(""),l=new gr(i,r,s,a,o,_e,n,e.root);return l.snapshot=e.root,new aw(new _i(l,[]),e)}class gr{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,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(q(n=>Oo(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(q(n=>Oo(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function cw(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function(t){return t.reduce((n,e)=>({params:V(V({},n.params),e.params),data:V(V({},n.data),e.data),resolve:V(V({},n.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(e.slice(i))}class cc{constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}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=Oo(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Oo(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class uw extends sw{constructor(n,e){super(e),this.url=n,Op(this,e)}toString(){return dw(this._root)}}function Op(t,n){n.value._routerState=t,n.children.forEach(e=>Op(t,e))}function dw(t){const n=t.children.length>0?` { ${t.children.map(dw).join(", ")} } `:"";return`${t.value}${n}`}function Ap(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,Xn(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),Xn(n.params,e.params)||t.params.next(e.params),function(t,n){if(t.length!==n.length)return!1;for(let e=0;eXn(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||Fp(t.parent,n.parent))}function ta(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return ta(t,i,r);return ta(t,i)})}(t,n,e);return new _i(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>ta(t,a)),s}}const i=function(t){return new gr(new yt(t.url),new yt(t.params),new yt(t.queryParams),new yt(t.fragment),new yt(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>ta(t,o));return new _i(i,r)}}function uc(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function na(t){return"object"==typeof t&&null!=t&&t.outlets}function Pp(t,n,e,i,r){let o={};return i&&It(i,(s,a)=>{o[a]=Array.isArray(s)?s.map(l=>`${l}`):`${s}`}),new pr(e.root===t?n:hw(e.root,t,n),o,r)}function hw(t,n,e){const i={};return It(t.children,(r,o)=>{i[o]=r===n?e:hw(r,n,e)}),new we(t.segments,i)}class pw{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&uc(i[0]))throw new Error("Root segment cannot have matrix parameters");const r=i.find(na);if(r&&r!==Y1(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Lp{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function fw(t,n,e){if(t||(t=new we([],{})),0===t.segments.length&&t.hasChildren())return dc(t,n,e);const i=function(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(na(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!mw(l,c,s))return o;i+=2}else{if(!mw(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=fw(t.children[s],n,o))}),It(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new we(t.segments,r)}}function Vp(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=Vp(new we([],{}),0,e))}),n}function gw(t){const n={};return It(t,(e,i)=>n[i]=`${e}`),n}function mw(t,n,e){return t==e.path&&Xn(n,e.parameters)}class OP{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),Ap(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Ao(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),It(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Ao(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Ao(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Ao(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new XF(o.value.snapshot))}),n.children.length&&this.forwardEvent(new JF(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(Ap(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Ap(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=function(t){for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(r.snapshot),l=a?a.module.componentFactoryResolver:null;s.attachRef=null,s.route=r,s.resolver=l,s.outlet&&s.outlet.activateWith(r,l),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class Bp{constructor(n,e){this.routes=n,this.module=e}}function Bi(t){return"function"==typeof t}function mr(t){return t instanceof pr}const ia=Symbol("INITIAL_VALUE");function ra(){return Qn(t=>function(...t){const n=zo(t),e=Da(t),{args:i,keys:r}=S0(t);if(0===i.length)return Dt([],n);const o=new Ce(function(t,n,e=ii){return i=>{P1(n,()=>{const{length:r}=t,o=new Array(r);let s=r,a=r;for(let l=0;l{const c=Dt(t[l],n);let u=!1;c.subscribe(new Ie(i,d=>{o[l]=d,u||(u=!0,a--),a||i.next(e(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}(i,n,r?s=>T0(r,s):ii));return e?o.pipe(tp(e)):o}(t.map(n=>n.pipe(Vt(1),Ro(ia)))).pipe(B1((n,e)=>{let i=!1;return e.reduce((r,o,s)=>r!==ia?r:(o===ia&&(i=!0),i||!1!==o&&s!==e.length-1&&!mr(o)?r:o),n)},ia),Kt(n=>n!==ia),q(n=>mr(n)?n:!0===n),Vt(1)))}class HP{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new oa,this.attachRef=null}}class oa{constructor(){this.contexts=new Map}onChildOutletCreated(n,e){const i=this.getOrCreateContext(n);i.outlet=e,this.contexts.set(n,i)}onChildOutletDestroyed(n){const e=this.getContext(n);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let e=this.getContext(n);return e||(e=new HP,this.contexts.set(n,e)),e}getContext(n){return this.contexts.get(n)||null}}let Hp=(()=>{class t{constructor(e,i,r,o,s){this.parentContexts=e,this.location=i,this.resolver=r,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new k,this.deactivateEvents=new k,this.attachEvents=new k,this.detachEvents=new k,this.name=o||_e,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.resolver||null))}}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 s=(i=i||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),a=this.parentContexts.getOrCreateContext(this.name).children,l=new UP(e,a,this.location.injector);this.activated=this.location.createComponent(s,this.location.length,l),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(b(oa),b(wn),b(or),Xi("name"),b(dt))},t.\u0275dir=O({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"]}),t})();class UP{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===gr?this.route:n===oa?this.childContexts:this.parent.get(n,e)}}let _w=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Te({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,i){1&e&&U(0,"router-outlet")},directives:[Hp],encapsulation:2}),t})();function vw(t,n=""){for(let e=0;eSn(i)===n);return e.push(...t.filter(i=>Sn(i)!==n)),e}const yw={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function hc(t,n,e){var a;if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?V({},yw):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const r=(n.matcher||nP)(e,t,n);if(!r)return V({},yw);const o={};It(r.posParams,(l,c)=>{o[c]=l.path});const s=r.consumed.length>0?V(V({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:s,positionalParamSegments:null!=(a=r.posParams)?a:{}}}function pc(t,n,e,i,r="corrected"){if(e.length>0&&function(t,n,e){return e.some(i=>fc(t,n,i)&&Sn(i)!==_e)}(t,e,i)){const s=new we(n,function(t,n,e,i){const r={};r[_e]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&Sn(o)!==_e){const s=new we([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[Sn(o)]=s}return r}(t,n,i,new we(e,t.children)));return s._sourceSegment=t,s._segmentIndexShift=n.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function(t,n,e){return e.some(i=>fc(t,n,i))}(t,e,i)){const s=new we(t.segments,function(t,n,e,i,r,o){const s={};for(const a of i)if(fc(t,e,a)&&!r[Sn(a)]){const l=new we([],{});l._sourceSegment=t,l._segmentIndexShift="legacy"===o?t.segments.length:n.length,s[Sn(a)]=l}return V(V({},r),s)}(t,n,e,i,t.children,r));return s._sourceSegment=t,s._segmentIndexShift=n.length,{segmentGroup:s,slicedSegments:e}}const o=new we(t.segments,t.children);return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}function fc(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function ww(t,n,e,i){return!!(Sn(t)===i||i!==_e&&fc(n,e,t))&&("**"===t.path||hc(n,t,e).matched)}function Cw(t,n,e){return 0===n.length&&!t.children[e]}class sa{constructor(n){this.segmentGroup=n||null}}class Dw{constructor(n){this.urlTree=n}}function gc(t){return new Ce(n=>n.error(new sa(t)))}function Sw(t){return new Ce(n=>n.error(new Dw(t)))}function KP(t){return new Ce(n=>n.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class JP{constructor(n,e,i,r,o){this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0,this.ngModule=n.get(di)}apply(){const n=pc(this.urlTree.root,[],[],this.config).segmentGroup,e=new we(n.segments,n.children);return this.expandSegmentGroup(this.ngModule,this.config,e,_e).pipe(q(o=>this.createUrlTree($p(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(pn(o=>{if(o instanceof Dw)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof sa?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.ngModule,this.config,n.root,_e).pipe(q(r=>this.createUrlTree($p(r),n.queryParams,n.fragment))).pipe(pn(r=>{throw r instanceof sa?this.noMatchError(r):r}))}noMatchError(n){return new Error(`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=n.segments.length>0?new we([],{[_e]:n}):n;return new pr(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(q(o=>new we([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return Dt(r).pipe(No(o=>{const s=i.children[o],a=bw(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(q(l=>({segment:l,outlet:o})))}),B1((o,s)=>(o[s.outlet]=s.segment,o),{}),function(t,n){const e=arguments.length>=2;return i=>i.pipe(t?Kt((r,o)=>t(r,o,i)):ii,Ip(1),e?U1(n):H1(()=>new nc))}())}expandSegment(n,e,i,r,o,s){return Dt(i).pipe(No(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(pn(c=>{if(c instanceof sa)return Y(null);throw c}))),Vn(a=>!!a),pn((a,l)=>{if(a instanceof nc||"EmptyError"===a.name){if(Cw(e,r,o))return Y(new we([],{}));throw new sa(e)}throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return ww(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):gc(e):gc(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?Sw(o):this.lineralizeSegments(i,o).pipe(at(s=>{const a=new we(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,lastChild:c,positionalParamSegments:u}=hc(e,r,o);if(!a)return gc(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?Sw(d):this.lineralizeSegments(r,d).pipe(at(f=>this.expandSegment(n,e,i,f.concat(o.slice(c)),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){if("**"===i.path)return i.loadChildren?(i._loadedConfig?Y(i._loadedConfig):this.configLoader.load(n.injector,i)).pipe(q(f=>(i._loadedConfig=f,new we(r,{})))):Y(new we(r,{}));const{matched:s,consumedSegments:a,lastChild:l}=hc(e,i,r);if(!s)return gc(e);const c=r.slice(l);return this.getChildConfig(n,i,r).pipe(at(d=>{const f=d.module,g=d.routes,{segmentGroup:y,slicedSegments:C}=pc(e,a,c,g),E=new we(y.segments,y.children);if(0===C.length&&E.hasChildren())return this.expandChildren(f,g,E).pipe(q(H=>new we(a,H)));if(0===g.length&&0===C.length)return Y(new we(a,{}));const I=Sn(i)===o;return this.expandSegment(f,E,g,C,I?_e:o,!0).pipe(q(A=>new we(a.concat(A.segments),A.children)))}))}getChildConfig(n,e,i){return e.children?Y(new Bp(e.children,n)):e.loadChildren?void 0!==e._loadedConfig?Y(e._loadedConfig):this.runCanLoadGuards(n.injector,e,i).pipe(at(r=>{return r?this.configLoader.load(n.injector,e).pipe(q(o=>(e._loadedConfig=o,o))):(t=e,new Ce(n=>n.error(Mp(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`))));var t})):Y(new Bp([],n))}runCanLoadGuards(n,e,i){const r=e.canLoad;return r&&0!==r.length?Y(r.map(s=>{const a=n.get(s);let l;if((t=a)&&Bi(t.canLoad))l=a.canLoad(e,i);else{if(!Bi(a))throw new Error("Invalid CanLoad guard");l=a(e,i)}var t;return ei(l)})).pipe(ra(),Yt(s=>{if(!mr(s))return;const a=Mp(`Redirecting to "${this.urlSerializer.serialize(s)}"`);throw a.url=s,a}),q(s=>!0===s)):Y(!0)}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Y(i);if(r.numberOfChildren>1||!r.children[_e])return KP(n.redirectTo);r=r.children[_e]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreatreUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new pr(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return It(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return It(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new we(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}function $p(t){const n={};for(const i of Object.keys(t.children)){const o=$p(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function(t){if(1===t.numberOfChildren&&t.children[_e]){const n=t.children[_e];return new we(t.segments.concat(n.segments),n.children)}return t}(new we(t.segments,n))}class Tw{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class mc{constructor(n,e){this.component=n,this.route=e}}function e2(t,n,e){const i=t._root;return aa(i,n?n._root:null,e,[i.value])}function _c(t,n,e){const i=function(t){if(!t)return null;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(n);return(i?i.module.injector:e).get(t)}function aa(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Ao(n);return t.children.forEach(s=>{(function(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!fr(t.url,n.url);case"pathParamsOrQueryParamsChange":return!fr(t.url,n.url)||!Xn(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Fp(t,n)||!Xn(t.queryParams,n.queryParams);default:return!Fp(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new Tw(i)):(o.data=s.data,o._resolvedData=s._resolvedData),aa(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new mc(a.outlet.component,s))}else s&&la(n,a,r),r.canActivateChecks.push(new Tw(i)),aa(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),It(o,(s,a)=>la(s,e.getContext(a),r)),r}function la(t,n,e){const i=Ao(t),r=t.value;It(i,(o,s)=>{la(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new mc(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}class f2{}function Ew(t){return new Ce(n=>n.error(t))}class m2{constructor(n,e,i,r,o,s){this.rootComponentType=n,this.config=e,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=s}recognize(){const n=pc(this.urlTree.root,[],[],this.config.filter(s=>void 0===s.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,n,_e);if(null===e)return null;const i=new cc([],Object.freeze({}),Object.freeze(V({},this.urlTree.queryParams)),this.urlTree.fragment,{},_e,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new _i(i,e),o=new uw(this.url,r);return this.inheritParamsAndData(o._root),o}inheritParamsAndData(n){const e=n.value,i=cw(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(n,e):this.processSegment(n,e,e.segments,i)}processChildren(n,e){const i=[];for(const o of Object.keys(e.children)){const s=e.children[o],a=bw(n,o),l=this.processSegmentGroup(a,s,o);if(null===l)return null;i.push(...l)}const r=xw(i);return r.sort((n,e)=>n.value.outlet===_e?-1:e.value.outlet===_e?1:n.value.outlet.localeCompare(e.value.outlet)),r}processSegment(n,e,i,r){for(const o of n){const s=this.processSegmentAgainstRoute(o,e,i,r);if(null!==s)return s}return Cw(e,i,r)?[]:null}processSegmentAgainstRoute(n,e,i,r){if(n.redirectTo||!ww(n,e,i,r))return null;let o,s=[],a=[];if("**"===n.path){const g=i.length>0?Y1(i).parameters:{};o=new cc(i,g,Object.freeze(V({},this.urlTree.queryParams)),this.urlTree.fragment,Nw(n),Sn(n),n.component,n,Iw(e),Mw(e)+i.length,kw(n))}else{const g=hc(e,n,i);if(!g.matched)return null;s=g.consumedSegments,a=i.slice(g.lastChild),o=new cc(s,g.parameters,Object.freeze(V({},this.urlTree.queryParams)),this.urlTree.fragment,Nw(n),Sn(n),n.component,n,Iw(e),Mw(e)+s.length,kw(n))}const l=(t=n).children?t.children:t.loadChildren?t._loadedConfig.routes:[],{segmentGroup:c,slicedSegments:u}=pc(e,s,a,l.filter(g=>void 0===g.redirectTo),this.relativeLinkResolution);var t;if(0===u.length&&c.hasChildren()){const g=this.processChildren(l,c);return null===g?null:[new _i(o,g)]}if(0===l.length&&0===u.length)return[new _i(o,[])];const d=Sn(n)===r,f=this.processSegment(l,c,u,d?_e:r);return null===f?null:[new _i(o,f)]}}function b2(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function xw(t){const n=[],e=new Set;for(const i of t){if(!b2(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=xw(i.children);n.push(new _i(i.value,r))}return n.filter(i=>!e.has(i))}function Iw(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function Mw(t){let n=t,e=n._segmentIndexShift?n._segmentIndexShift:0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift?n._segmentIndexShift:0;return e-1}function Nw(t){return t.data||{}}function kw(t){return t.resolve||{}}function jp(t){return Qn(n=>{const e=t(n);return e?Dt(e).pipe(q(()=>n)):Y(n)})}class x2 extends class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}{}const Gp=new te("ROUTES");class Rw{constructor(n,e,i,r){this.injector=n,this.compiler=e,this.onLoadStartListener=i,this.onLoadEndListener=r}load(n,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const r=this.loadModuleFactory(e.loadChildren).pipe(q(o=>{this.onLoadEndListener&&this.onLoadEndListener(e);const s=o.create(n);return new Bp(K1(s.injector.get(Gp,void 0,ce.Self|ce.Optional)).map(Up),s)}),pn(o=>{throw e._loader$=void 0,o}));return e._loader$=new BF(r,()=>new le).pipe(V1()),e._loader$}loadModuleFactory(n){return ei(n()).pipe(at(e=>e instanceof Ab?Y(e):Dt(this.compiler.compileModuleAsync(e))))}}class M2{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,e){return n}}function N2(t){throw t}function k2(t,n,e){return n.parse("/")}function Ow(t,n){return Y(null)}const R2={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},O2={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ke=(()=>{class t{constructor(e,i,r,o,s,a,l){this.rootComponentType=e,this.urlSerializer=i,this.rootContexts=r,this.location=o,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new le,this.errorHandler=N2,this.malformedUriErrorHandler=k2,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Ow,afterPreactivation:Ow},this.urlHandlingStrategy=new M2,this.routeReuseStrategy=new x2,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=s.get(di),this.console=s.get(vy);const d=s.get(ye);this.isNgZoneEnabled=d instanceof ye&&ye.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=new pr(new we([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Rw(s,a,f=>this.triggerEvent(new j1(f)),f=>this.triggerEvent(new G1(f))),this.routerState=lw(this.currentUrlTree,this.rootComponentType),this.transitions=new yt({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.\u0275routerPageId}setupNavigations(e){const i=this.events;return e.pipe(Kt(r=>0!==r.id),q(r=>st(V({},r),{extractedUrl:this.urlHandlingStrategy.extract(r.rawUrl)})),Qn(r=>{let o=!1,s=!1;return Y(r).pipe(Yt(a=>{this.currentNavigation={id:a.id,initialUrl:a.currentRawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?st(V({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Qn(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 vc(a.source)&&(this.browserUrlTree=a.extractedUrl),Y(a).pipe(Qn(d=>{const f=this.transitions.getValue();return i.next(new ic(d.id,this.serializeUrl(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions.getValue()?En:Promise.resolve(d)}),function(t,n,e,i){return Qn(r=>function(t,n,e,i,r){return new JP(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(q(o=>st(V({},r),{urlAfterRedirects:o}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),Yt(d=>{this.currentNavigation=st(V({},this.currentNavigation),{finalUrl:d.urlAfterRedirects})}),function(t,n,e,i,r){return at(o=>function(t,n,e,i,r="emptyOnly",o="legacy"){try{const s=new m2(t,n,e,i,r,o).recognize();return null===s?Ew(new f2):Y(s)}catch(s){return Ew(s)}}(t,n,o.urlAfterRedirects,e(o.urlAfterRedirects),i,r).pipe(q(s=>st(V({},o),{targetSnapshot:s}))))}(this.rootComponentType,this.config,d=>this.serializeUrl(d),this.paramsInheritanceStrategy,this.relativeLinkResolution),Yt(d=>{if("eager"===this.urlUpdateStrategy){if(!d.extras.skipLocationChange){const g=this.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);this.setBrowserUrl(g,d)}this.browserUrlTree=d.urlAfterRedirects}const f=new zF(d.id,this.serializeUrl(d.extractedUrl),this.serializeUrl(d.urlAfterRedirects),d.targetSnapshot);i.next(f)}));if(c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:f,extractedUrl:g,source:y,restoredState:C,extras:E}=a,I=new ic(f,this.serializeUrl(g),y,C);i.next(I);const S=lw(g,this.rootComponentType).snapshot;return Y(st(V({},a),{targetSnapshot:S,urlAfterRedirects:g,extras:st(V({},E),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=a.rawUrl,a.resolve(null),En}),jp(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:f,replaceUrl:g}}=a;return this.hooks.beforePreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!f,replaceUrl:!!g})}),Yt(a=>{const l=new WF(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),q(a=>st(V({},a),{guards:e2(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function(t,n){return at(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?Y(st(V({},e),{guardsResult:!0})):function(t,n,e,i){return Dt(t).pipe(at(r=>function(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?Y(o.map(a=>{const l=_c(a,n,r);let c;if(function(t){return t&&Bi(t.canDeactivate)}(l))c=ei(l.canDeactivate(t,n,e,i));else{if(!Bi(l))throw new Error("Invalid CanDeactivate guard");c=ei(l(t,n,e,i))}return c.pipe(Vn())})).pipe(ra()):Y(!0)}(r.component,r.route,e,n,i)),Vn(r=>!0!==r,!0))}(s,i,r,t).pipe(at(a=>a&&function(t){return"boolean"==typeof t}(a)?function(t,n,e,i){return Dt(n).pipe(No(r=>Js(function(t,n){return null!==t&&n&&n(new ZF(t)),Y(!0)}(r.route.parent,i),function(t,n){return null!==t&&n&&n(new QF(t)),Y(!0)}(r.route,i),function(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>L1(()=>Y(s.guards.map(l=>{const c=_c(l,s.node,e);let u;if(function(t){return t&&Bi(t.canActivateChild)}(c))u=ei(c.canActivateChild(i,t));else{if(!Bi(c))throw new Error("Invalid CanActivateChild guard");u=ei(c(i,t))}return u.pipe(Vn())})).pipe(ra())));return Y(o).pipe(ra())}(t,r.path,e),function(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return Y(!0);const r=i.map(o=>L1(()=>{const s=_c(o,n,e);let a;if(function(t){return t&&Bi(t.canActivate)}(s))a=ei(s.canActivate(n,t));else{if(!Bi(s))throw new Error("Invalid CanActivate guard");a=ei(s(n,t))}return a.pipe(Vn())}));return Y(r).pipe(ra())}(t,r.route,e))),Vn(r=>!0!==r,!0))}(i,o,t,n):Y(a)),q(a=>st(V({},e),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),Yt(a=>{if(mr(a.guardsResult)){const c=Mp(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw c.url=a.guardsResult,c}const l=new qF(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),Kt(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),jp(a=>{if(a.guards.canActivateChecks.length)return Y(a).pipe(Yt(l=>{const c=new KF(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}),Qn(l=>{let c=!1;return Y(l).pipe(function(t,n){return at(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return Y(e);let o=0;return Dt(r).pipe(No(s=>function(t,n,e,i){return function(t,n,e,i){const r=Object.keys(t);if(0===r.length)return Y({});const o={};return Dt(r).pipe(at(s=>function(t,n,e,i){const r=_c(t,n,i);return ei(r.resolve?r.resolve(n,e):r(n,e))}(t[s],n,e,i).pipe(Yt(a=>{o[s]=a}))),Ip(1),at(()=>Object.keys(o).length===r.length?Y(o):En))}(t._resolve,t,n,i).pipe(q(o=>(t._resolvedData=o,t.data=V(V({},t.data),cw(t,e).resolve),null)))}(s.route,i,t,n)),Yt(()=>o++),Ip(1),at(s=>o===r.length?Y(e):En))})}(this.paramsInheritanceStrategy,this.ngModule.injector),Yt({next:()=>c=!0,complete:()=>{c||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),Yt(l=>{const c=new YF(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}))}),jp(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:f,replaceUrl:g}}=a;return this.hooks.afterPreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!f,replaceUrl:!!g})}),q(a=>{const l=function(t,n,e){const i=ta(t,n._root,e?e._root:void 0);return new aw(i,n)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return st(V({},a),{targetRouterState:l})}),Yt(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)}),((t,n,e)=>q(i=>(new OP(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),Yt({next(){o=!0},complete(){o=!0}}),function(t){return ze((n,e)=>{try{n.subscribe(e)}finally{e.add(t)}})}(()=>{var a;o||s||this.cancelNavigationTransition(r,`Navigation ID ${r.id} is not equal to the current navigation id ${this.navigationId}`),(null==(a=this.currentNavigation)?void 0:a.id)===r.id&&(this.currentNavigation=null)}),pn(a=>{if(s=!0,function(t){return t&&t[W1]}(a)){const l=mr(a.url);l||(this.navigated=!0,this.restoreHistory(r,!0));const c=new $1(r.id,this.serializeUrl(r.extractedUrl),a.message);i.next(c),l?setTimeout(()=>{const u=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),d={skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||vc(r.source)};this.scheduleNavigation(u,"imperative",null,d,{resolve:r.resolve,reject:r.reject,promise:r.promise})},0):r.resolve(!1)}else{this.restoreHistory(r,!0);const l=new GF(r.id,this.serializeUrl(r.extractedUrl),a);i.next(l);try{r.resolve(this.errorHandler(a))}catch(c){r.reject(c)}}return En}))}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}setTransition(e){this.transitions.next(V(V({},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 a;const r={replaceUrl:!0},o=(null==(a=e.state)?void 0:a.navigationId)?e.state:null;if(o){const l=V({},o);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(r.state=l)}const s=this.parseUrl(e.url);this.scheduleNavigation(s,i,o,r)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){vw(e),this.config=e.map(Up),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:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=r||this.routerState.root,u=l?this.currentUrlTree.fragment:s;let d=null;switch(a){case"merge":d=V(V({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}return null!==d&&(d=this.removeEmptyProps(d)),function(t,n,e,i,r){if(0===e.length)return Pp(n.root,n.root,n,i,r);const o=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new pw(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return It(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new pw(e,n,i)}(e);if(o.toRoot())return Pp(n.root,new we([],{}),n,i,r);const s=function(t,n,e){if(t.isAbsolute)return new Lp(n.root,!0,0);if(-1===e.snapshot._lastPathIndex){const o=e.snapshot._urlSegment;return new Lp(o,o===n.root,0)}const i=uc(t.commands[0])?0:1;return function(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new Lp(i,!1,r-o)}(e.snapshot._urlSegment,e.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(o,n,t),a=s.processChildren?dc(s.segmentGroup,s.index,o.commands):fw(s.segmentGroup,s.index,o.commands);return Pp(s.segmentGroup,a,n,i,r)}(c,this.currentUrlTree,e,d,null!=u?u:null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=mr(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,i)}navigate(e,i={skipLocationChange:!1}){return function(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId,this.events.next(new Qs(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,e.resolve(!0)},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}scheduleNavigation(e,i,r,o,s){var I,S,A;if(this.disposed)return Promise.resolve(!1);const a=this.transitions.value,l=vc(i)&&a&&!vc(a.source),c=a.rawUrl.toString()===e.toString(),u=a.id===(null==(I=this.currentNavigation)?void 0:I.id);if(l&&c&&u)return Promise.resolve(!0);let f,g,y;s?(f=s.resolve,g=s.reject,y=s.promise):y=new Promise((H,oe)=>{f=H,g=oe});const C=++this.navigationId;let E;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(r=this.location.getState()),E=r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?null!=(S=this.browserPageId)?S:0:(null!=(A=this.browserPageId)?A:0)+1):E=0,this.setTransition({id:C,targetPageId:E,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:o,resolve:f,reject:g,promise:y,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),y.catch(H=>Promise.reject(H))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),o=V(V({},i.extras.state),this.generateNgRouterState(i.id,i.targetPageId));this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(e,i=!1){var r,o;if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null==(r=this.currentNavigation)?void 0:r.finalUrl)||0===s?this.currentUrlTree===(null==(o=this.currentNavigation)?void 0:o.finalUrl)&&0===s&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(s)}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 $1(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 t.\u0275fac=function(e){zd()},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function vc(t){return"imperative"!==t}let bc=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.commands=null,this.onChanges=new le,this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){if(null!=this.tabIndexAttribute)return;const i=this.renderer,r=this.el.nativeElement;null!==e?i.setAttribute(r,"tabindex",e):i.removeAttribute(r,"tabindex")}ngOnChanges(e){this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(){if(null===this.urlTree)return!0;const e={skipLocationChange:Fo(this.skipLocationChange),replaceUrl:Fo(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,e),!0}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:Fo(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(b(Ke),b(gr),Xi("tabindex"),b(hn),b(me))},t.\u0275dir=O({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(e,i){1&e&&N("click",function(){return i.onClick()})},inputs:{queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[nt]}),t})(),yc=(()=>{class t{constructor(e,i,r){this.router=e,this.route=i,this.locationStrategy=r,this.commands=null,this.href=null,this.onChanges=new le,this.subscription=e.events.subscribe(o=>{o instanceof Qs&&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,o,s){if(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target||null===this.urlTree)return!0;const a={skipLocationChange:Fo(this.skipLocationChange),replaceUrl:Fo(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:Fo(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(b(Ke),b(gr),b(So))},t.\u0275dir=O({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,i){1&e&&N("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&ne("target",i.target)("href",i.href,Yu)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[nt]}),t})();function Fo(t){return""===t||!!t}class Aw{}class Fw{preload(n,e){return Y(null)}}let Pw=(()=>{class t{constructor(e,i,r,o){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=new Rw(r,i,l=>e.triggerEvent(new j1(l)),l=>e.triggerEvent(new G1(l)))}setUpPreloading(){this.subscription=this.router.events.pipe(Kt(e=>e instanceof Qs),No(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(di);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i)if(o.loadChildren&&!o.canLoad&&o._loadedConfig){const s=o._loadedConfig;r.push(this.processRoutes(s.module,s.routes))}else o.loadChildren&&!o.canLoad?r.push(this.preloadConfig(e,o)):o.children&&r.push(this.processRoutes(e,o.children));return Dt(r).pipe(Go(),q(o=>{}))}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>(i._loadedConfig?Y(i._loadedConfig):this.loader.load(e.injector,i)).pipe(at(o=>(i._loadedConfig=o,this.processRoutes(o.module,o.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(R(Ke),R(El),R(ut),R(Aw))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),zp=(()=>{class t{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 ic?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Qs&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof z1&&(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 z1(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){zd()},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();const _r=new te("ROUTER_CONFIGURATION"),Lw=new te("ROUTER_FORROOT_GUARD"),V2=[Fh,{provide:tw,useClass:nw},{provide:Ke,useFactory:function(t,n,e,i,r,o,s={},a,l){const c=new Ke(null,t,n,e,i,r,K1(o));return a&&(c.urlHandlingStrategy=a),l&&(c.routeReuseStrategy=l),function(t,n){t.errorHandler&&(n.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(n.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(n.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(n.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(n.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(n.urlUpdateStrategy=t.urlUpdateStrategy),t.canceledNavigationResolution&&(n.canceledNavigationResolution=t.canceledNavigationResolution)}(s,c),s.enableTracing&&c.events.subscribe(u=>{var d,f;null==(d=console.group)||d.call(console,`Router Event: ${u.constructor.name}`),console.log(u.toString()),console.log(u),null==(f=console.groupEnd)||f.call(console)}),c},deps:[tw,oa,Fh,ut,El,Gp,_r,[class{},new Gn],[class{},new Gn]]},oa,{provide:gr,useFactory:function(t){return t.routerState.root},deps:[Ke]},Pw,Fw,class{preload(n,e){return e().pipe(pn(()=>Y(null)))}},{provide:_r,useValue:{enableTracing:!1}}];function B2(){return new Sy("Router",Ke)}let Wp=(()=>{class t{constructor(e,i){}static forRoot(e,i){return{ngModule:t,providers:[V2,Vw(e),{provide:Lw,useFactory:$2,deps:[[Ke,new Gn,new Ur]]},{provide:_r,useValue:i||{}},{provide:So,useFactory:U2,deps:[lr,[new ls(Ah),new Gn],_r]},{provide:zp,useFactory:H2,deps:[Ke,jO,_r]},{provide:Aw,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:Fw},{provide:Sy,multi:!0,useFactory:B2},[qp,{provide:Tl,multi:!0,useFactory:W2,deps:[qp]},{provide:Bw,useFactory:q2,deps:[qp]},{provide:_y,multi:!0,useExisting:Bw}]]}}static forChild(e){return{ngModule:t,providers:[Vw(e)]}}}return t.\u0275fac=function(e){return new(e||t)(R(Lw,8),R(Ke,8))},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})();function H2(t,n,e){return e.scrollOffset&&n.setOffset(e.scrollOffset),new zp(t,n,e)}function U2(t,n,e={}){return e.useHash?new IR(t,n):new Wy(t,n)}function $2(t){return"guarded"}function Vw(t){return[{provide:gT,multi:!0,useValue:t},{provide:Gp,multi:!0,useValue:t}]}let qp=(()=>{class t{constructor(e){this.injector=e,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new le}appInitializer(){return this.injector.get(TR,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let i=null;const r=new Promise(a=>i=a),o=this.injector.get(Ke),s=this.injector.get(_r);return"disabled"===s.initialNavigation?(o.setUpLocationChangeListener(),i(!0)):"enabled"===s.initialNavigation||"enabledBlocking"===s.initialNavigation?(o.hooks.afterPreactivation=()=>this.initNavigation?Y(null):(this.initNavigation=!0,i(!0),this.resultOfPreactivationDone),o.initialNavigation()):i(!0),r})}bootstrapListener(e){const i=this.injector.get(_r),r=this.injector.get(Pw),o=this.injector.get(zp),s=this.injector.get(Ke),a=this.injector.get(wo);e===a.components[0]&&(("enabledNonBlocking"===i.initialNavigation||void 0===i.initialNavigation)&&s.initialNavigation(),r.setUpPreloading(),o.init(),s.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return t.\u0275fac=function(e){return new(e||t)(R(ut))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})();function W2(t){return t.appInitializer.bind(t)}function q2(t){return t.bootstrapListener.bind(t)}const Bw=new te("Router Initializer"),Po_apiUrl="http://localhost:5566";class Y2{}let Lo=(()=>{class t{constructor(e){this.http=e,this.currentUserSubject=new yt(JSON.parse(localStorage.getItem("currentUser"))),this.currentUser=this.currentUserSubject.asObservable()}get currentUserValue(){return this.currentUserSubject.value}login(e,i){return this.http.post(`${Po_apiUrl}/admin/login`,{username:e,password:i}).pipe(q(r=>(localStorage.setItem("currentUser",JSON.stringify(r)),this.currentUserSubject.next(r),r)))}logout(){localStorage.removeItem("currentUser"),this.currentUserSubject.next(new Y2)}}return t.\u0275fac=function(e){return new(e||t)(R(ko))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Hw=(()=>{class t{constructor(e){this.router=e,this.subject=new le,this.keepAfterRouteChange=!1,this.router.events.subscribe(i=>{i instanceof ic&&(this.keepAfterRouteChange?this.keepAfterRouteChange=!1:this.clear())})}getAlert(){return this.subject.asObservable()}success(e,i=!1){this.keepAfterRouteChange=i,this.subject.next({type:"success",text:e})}error(e,i=!1){this.keepAfterRouteChange=i,this.subject.next({type:"error",text:e})}clear(){this.subject.next(new le)}}return t.\u0275fac=function(e){return new(e||t)(R(Ke))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Z2(t,n){if(1&t&&(h(0,"div",1),D(1),p()),2&t){const e=v();_("ngClass",e.message.cssClass),m(1),ve(e.message.text)}}let J2=(()=>{class t{constructor(e){this.alertService=e}ngOnInit(){this.subscription=this.alertService.getAlert().subscribe(e=>{switch(e&&e.type){case"success":e.cssClass="alert alert-success";break;case"error":e.cssClass="alert alert-danger"}this.message=e})}ngOnDestroy(){this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(b(Hw))},t.\u0275cmp=Te({type:t,selectors:[["alert"]],decls:1,vars:1,consts:[[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,i){1&e&&w(0,Z2,2,2,"div",0),2&e&&_("ngIf",i.message)},directives:[je,zt],encapsulation:2}),t})();const Q2=["addListener","removeListener"],X2=["addEventListener","removeEventListener"],eL=["on","off"];function Mt(t,n,e,i){if(ee(e)&&(i=e,e=void 0),i)return Mt(t,n,e).pipe(tp(i));const[r,o]=function(t){return ee(t.addEventListener)&&ee(t.removeEventListener)}(t)?X2.map(s=>a=>t[s](n,a,e)):function(t){return ee(t.addListener)&&ee(t.removeListener)}(t)?Q2.map(Uw(t,n)):function(t){return ee(t.on)&&ee(t.off)}(t)?eL.map(Uw(t,n)):[];if(!r&&iu(t))return at(s=>Mt(s,n,e))(Tt(t));if(!r)throw new TypeError("Invalid event target");return new Ce(s=>{const a=(...l)=>s.next(1o(a)})}function Uw(t,n){return e=>i=>t[e](n,i)}class rL extends Lt{constructor(n,e){super()}schedule(n,e=0){return this}}const wc={setInterval(...t){const{delegate:n}=wc;return((null==n?void 0:n.setInterval)||setInterval)(...t)},clearInterval(t){const{delegate:n}=wc;return((null==n?void 0:n.clearInterval)||clearInterval)(t)},delegate:void 0};class Kp extends rL{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;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(n,e,i=0){return wc.setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;wc.clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:n,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,Tr(i,this),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null,super.unsubscribe()}}}const Yp={now:()=>(Yp.delegate||Date).now(),delegate:void 0};class ca{constructor(n,e=ca.now){this.schedulerActionCtor=n,this.now=e}schedule(n,e=0,i){return new this.schedulerActionCtor(this,n).schedule(i,e)}}ca.now=Yp.now;class Zp extends ca{constructor(n,e=ca.now){super(n,e),this.actions=[],this._active=!1,this._scheduled=void 0}flush(n){const{actions:e}=this;if(this._active)return void e.push(n);let i;this._active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this._active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const jw=new Zp(Kp);function Cc(t=0,n,e=jw){let i=-1;return null!=n&&(sg(n)?e=n:i=n),new Ce(r=>{let o=function(t){return t instanceof Date&&!isNaN(t)}(t)?+t-e.now():t;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}const{isArray:sL}=Array;function Gw(t){return 1===t.length&&sL(t[0])?t[0]:t}function Dc(...t){const n=Da(t),e=Gw(t);return e.length?new Ce(i=>{let r=e.map(()=>[]),o=e.map(()=>!1);i.add(()=>{r=o=null});for(let s=0;!i.closed&&s{if(r[s].push(a),r.every(l=>l.length)){const l=r.map(c=>c.shift());i.next(n?n(...l):l),r.some((c,u)=>!c.length&&o[u])&&i.complete()}},()=>{o[s]=!0,!r[s].length&&i.complete()}));return()=>{r=o=null}}):En}function Qe(t){return ze((n,e)=>{Tt(t).subscribe(new Ie(e,()=>e.complete(),yi)),!e.closed&&n.subscribe(e)})}function cL(t,n){return t===n}function Jp(...t){const n=Da(t);return ze((e,i)=>{const r=t.length,o=new Array(r);let s=t.map(()=>!1),a=!1;for(let l=0;l{o[l]=c,!a&&!s[l]&&(s[l]=!0,(a=s.every(ii))&&(s=null))},yi));e.subscribe(new Ie(i,l=>{if(a){const c=[l,...o];i.next(n?n(...c):c)}}))})}new Ce(yi);const wL=["*"],BL=["dialog"];function vr(t){return null!=t}function Vo(t){return(t||document.body).getBoundingClientRect()}"undefined"!=typeof Element&&!Element.prototype.closest&&(Element.prototype.closest=function(t){let n=this;if(!document.documentElement.contains(n))return null;do{if(n.matches(t))return n;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null});const Yw={animation:!0,transitionTimerDelayMs:5},AV=()=>{},{transitionTimerDelayMs:FV}=Yw,ua=new Map,Zt=(t,n,e,i)=>{let r=i.context||{};const o=ua.get(n);if(o)switch(i.runningTransition){case"continue":return En;case"stop":t.run(()=>o.transition$.complete()),r=Object.assign(o.context,r),ua.delete(n)}const s=e(n,i.animation,r)||AV;if(!i.animation||"none"===window.getComputedStyle(n).transitionProperty)return t.run(()=>s()),Y(void 0).pipe(function(t){return n=>new Ce(e=>n.subscribe({next:s=>t.run(()=>e.next(s)),error:s=>t.run(()=>e.error(s)),complete:()=>t.run(()=>e.complete())}))}(t));const a=new le,l=new le,c=a.pipe(function(...t){return n=>Js(n,Y(...t))}(!0));ua.set(n,{transition$:a,complete:()=>{l.next(),l.complete()},context:r});const u=function(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(n);return t.runOutsideAngular(()=>{const d=Mt(n,"transitionend").pipe(Qe(c),Kt(({target:g})=>g===n));(function(...t){return 1===(t=Gw(t)).length?Tt(t[0]):new Ce(function(t){return n=>{let e=[];for(let i=0;e&&!n.closed&&i{if(e){for(let o=0;o{ua.delete(n),t.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()};let Ec=(()=>{class t{constructor(){this.animation=Yw.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),tC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),nC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),rC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})(),aC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),lC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})();var wt=(()=>{return(t=wt||(wt={}))[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",wt;var t})();"undefined"!=typeof navigator&&navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const uC=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function dC(t){const n=Array.from(t.querySelectorAll(uC)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}new class{getAllStyles(n){return window.getComputedStyle(n)}getStyle(n,e){return this.getAllStyles(n)[e]}isStaticPositioned(n){return"static"===(this.getStyle(n,"position")||"static")}offsetParent(n){let e=n.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(n,e=!0){let i,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(n,"position"))i=n.getBoundingClientRect(),i={top:i.top,bottom:i.bottom,left:i.left,right:i.right,height:i.height,width:i.width};else{const o=this.offsetParent(n);i=this.offset(n,!1),o!==document.documentElement&&(r=this.offset(o,!1)),r.top+=o.clientTop,r.left+=o.clientLeft}return i.top-=r.top,i.bottom-=r.top,i.left-=r.left,i.right-=r.left,e&&(i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}offset(n,e=!0){const i=n.getBoundingClientRect(),r_top=window.scrollY-document.documentElement.clientTop,r_left=window.scrollX-document.documentElement.clientLeft;let o={height:i.height||n.offsetHeight,width:i.width||n.offsetWidth,top:i.top+r_top,bottom:i.bottom+r_top,left:i.left+r_left,right:i.right+r_left};return e&&(o.height=Math.round(o.height),o.width=Math.round(o.width),o.top=Math.round(o.top),o.bottom=Math.round(o.bottom),o.left=Math.round(o.left),o.right=Math.round(o.right)),o}positionElements(n,e,i,r){const[o="top",s="center"]=i.split("-"),a=r?this.offset(n,!1):this.position(n,!1),l=this.getAllStyles(e),c=parseFloat(l.marginTop),u=parseFloat(l.marginBottom),d=parseFloat(l.marginLeft),f=parseFloat(l.marginRight);let g=0,y=0;switch(o){case"top":g=a.top-(e.offsetHeight+c+u);break;case"bottom":g=a.top+a.height;break;case"left":y=a.left-(e.offsetWidth+d+f);break;case"right":y=a.left+a.width}switch(s){case"top":g=a.top;break;case"bottom":g=a.top+a.height-e.offsetHeight;break;case"left":y=a.left;break;case"right":y=a.left+a.width-e.offsetWidth;break;case"center":"top"===o||"bottom"===o?y=a.left+a.width/2-e.offsetWidth/2:g=a.top+a.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(y)}px, ${Math.round(g)}px)`;const C=e.getBoundingClientRect(),E=document.documentElement,I=window.innerHeight||E.clientHeight,S=window.innerWidth||E.clientWidth;return C.left>=0&&C.top>=0&&C.right<=S&&C.bottom<=I}},new Date(1882,10,12),new Date(2174,10,25);let vC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,Xl]]}),t})(),lf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=O({type:t,selectors:[["",8,"navbar"]]}),t})(),wC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})();class Cr{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}let _B=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(Vt(1)).subscribe(()=>{Zt(this._zone,this._el.nativeElement,(e,i)=>{i&&Vo(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Zt(this._zone,this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(ye))},t.\u0275cmp=Te({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(e,i){2&e&&(Ve("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),ke("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class Ui{close(n){}dismiss(n){}}class vB{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new le,this._dismissed=new le,this._hidden=new le,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Qe(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Qe(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();(t=e)&&t.then?e.then(i=>{!1!==i&&this._dismiss(n)},()=>{}):!1!==e&&this._dismiss(n)}else this._dismiss(n);var t}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():Y(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),Dc(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var fa=(()=>{return(t=fa||(fa={}))[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",fa;var t})();let bB=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new le,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new k,this.shown=new le,this.hidden=new le}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(Vt(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=Dc(Zt(this._zone,e,()=>e.classList.remove("show"),i),Zt(this._zone,this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const e={animation:this.animation,runningTransition:"continue"};Dc(Zt(this._zone,this._elRef.nativeElement,(o,s)=>{s&&Vo(o),o.classList.add("show")},e),Zt(this._zone,this._dialogEl.nativeElement,()=>{},e)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Mt(e,"keydown").pipe(Qe(this._closed$),Kt(r=>r.which===wt.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(fa.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Mt(this._dialogEl.nativeElement,"mousedown").pipe(Qe(this._closed$),Yt(()=>i=!1),Qn(()=>Mt(e,"mouseup").pipe(Qe(this._closed$),Vt(1))),Kt(({target:r})=>e===r)).subscribe(()=>{i=!0}),Mt(e,"click").pipe(Qe(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(fa.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=dC(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Zt(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(b(rt),b(me),b(ye))},t.\u0275cmp=Te({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&it(BL,7),2&e){let r;ie(r=re())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(ne("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Ve("modal d-block"+(i.windowClass?" "+i.windowClass:"")),ke("fade",i.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:wL,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(hl(),h(0,"div",0,1),h(2,"div",2),Cs(3),p(),p()),2&e&&Ve("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+(i.scrollable?" modal-dialog-scrollable":"")+(i.modalDialogClass?" "+i.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:2}),t})();const yB=()=>{};let wB=(()=>{class t{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):yB}_adjustBody(e){const i=this._document.body,r=i.style.paddingRight,o=parseFloat(window.getComputedStyle(i)["padding-right"]);return i.style["padding-right"]=`${o+e}px`,()=>i.style["padding-right"]=r}_isPresent(e){const i=this._document.body.getBoundingClientRect();return window.innerWidth-(i.left+i.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const i=this._document.body;i.appendChild(e);const r=e.getBoundingClientRect().width-e.clientWidth;return i.removeChild(e),r}}return t.\u0275fac=function(e){return new(e||t)(R(rt))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),CB=(()=>{class t{constructor(e,i,r,o,s,a){this._applicationRef=e,this._injector=i,this._document=r,this._scrollBar=o,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new le,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass","modalDialogClass"],this._windowCmpts=[],this._activeInstances=new k,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const l=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{this._ngZone.runOutsideAngular(()=>{const r=Mt(n,"focusin").pipe(Qe(e),q(o=>o.target));Mt(n,"keydown").pipe(Qe(e),Kt(o=>o.which===wt.Tab),Jp(r)).subscribe(([o,s])=>{const[a,l]=dC(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Mt(n,"click").pipe(Qe(e),Jp(r),q(o=>o[1])).subscribe(o=>o.focus())})})(0,l.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(l.location.nativeElement)}})}open(e,i,r,o){const s=o.container instanceof HTMLElement?o.container:vr(o.container)?this._document.querySelector(o.container):this._document.body,a=this._rendererFactory.createRenderer(null,null),l=this._scrollBar.compensate(),c=()=>{this._modalRefs.length||(a.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);const u=new Ui,d=this._getContentRef(e,o.injector||i,r,u,o);let f=!1!==o.backdrop?this._attachBackdrop(e,s):void 0,g=this._attachWindowComponent(e,s,d),y=new vB(g,d,f,o.beforeDismiss);return this._registerModalRef(y),this._registerWindowCmpt(g),y.result.then(l,l),y.result.then(c,c),u.close=C=>{y.close(C)},u.dismiss=C=>{y.dismiss(C)},this._applyWindowOptions(g.instance,o),1===this._modalRefs.length&&a.addClass(this._document.body,"modal-open"),f&&f.instance&&(this._applyBackdropOptions(f.instance,o),f.changeDetectorRef.detectChanges()),g.changeDetectorRef.detectChanges(),y}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,i){let o=e.resolveComponentFactory(_B).create(this._injector);return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_attachWindowComponent(e,i,r){let s=e.resolveComponentFactory(bB).create(this._injector,r.nodes);return this._applicationRef.attachView(s.hostView),i.appendChild(s.location.nativeElement),s}_applyWindowOptions(e,i){this._windowAttributes.forEach(r=>{vr(i[r])&&(e[r]=i[r])})}_applyBackdropOptions(e,i){this._backdropAttributes.forEach(r=>{vr(i[r])&&(e[r]=i[r])})}_getContentRef(e,i,r,o,s){return r?r instanceof He?this._createFromTemplateRef(r,o):function(t){return"string"==typeof t}(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new Cr([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new Cr([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new Cr([[i]])}_createFromComponent(e,i,r,o,s){const a=e.resolveComponentFactory(r),l=ut.create({providers:[{provide:Ui,useValue:o}],parent:i}),c=a.create(l),u=c.location.nativeElement;return s.scrollable&&u.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new Cr([[u]],c.hostView,c)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(R(wo),R(ut),R(rt),R(wB),R(oh),R(ye))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),DB=(()=>{class t{constructor(e){this._ngbConfig=e,this.backdrop=!0,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(R(Ec))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ac=(()=>{class t{constructor(e,i,r,o){this._moduleCFR=e,this._injector=i,this._modalStack=r,this._config=o}open(e,i={}){const r=V(st(V({},this._config),{animation:this._config.animation}),i);return this._modalStack.open(this._moduleCFR,this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(R(or),R(ut),R(CB),R(DB))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),CC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({providers:[Ac]}),t})(),EC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),AC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),PC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),LC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),VC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),BC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),HC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),UC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})();new te("live announcer delay",{providedIn:"root",factory:function(){return 100}});let $C=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})();const BB=[tC,nC,rC,aC,lC,vC,wC,CC,EC,AC,PC,LC,VC,BC,HC,UC,$C];let HB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[BB,tC,nC,rC,aC,lC,vC,wC,CC,EC,AC,PC,LC,VC,BC,HC,UC,$C]}),t})(),x=(()=>{class t{static addClass(e,i){e.classList?e.classList.add(i):e.className+=" "+i}static addMultipleClasses(e,i){if(e.classList){let r=i.trim().split(" ");for(let o=0;oa.height?(l=-1*r.height,e.style.transformOrigin="bottom",s.top+l<0&&(l=-1*s.top)):(l=o,e.style.transformOrigin="top"),c=r.width>a.width?-1*s.left:s.left+r.width>a.width?-1*(s.left+r.width-a.width):0,e.style.top=l+"px",e.style.left=c+"px"}static absolutePosition(e,i){let g,y,r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=r.height,s=r.width,a=i.offsetHeight,l=i.offsetWidth,c=i.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),f=this.getViewport();c.top+a+o>f.height?(g=c.top+u-o,e.style.transformOrigin="bottom",g<0&&(g=u)):(g=a+c.top+u,e.style.transformOrigin="top"),y=c.left+s>f.width?Math.max(0,c.left+d+l-s):c.left+d,e.style.top=g+"px",e.style.left=y+"px"}static getParents(e,i=[]){return null===e.parentNode?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let r=this.getParents(e);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of r){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&i.push(d)}}9!==a.nodeType&&s(a)&&i.push(a)}}return i}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=e.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=e.scrollTop,f=e.clientHeight,g=this.getOuterHeight(i);u<0?e.scrollTop=d+u:u+g>f&&(e.scrollTop=d+u-f+g)}static fadeIn(e,i){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),e.style.opacity=r},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,i){var r=Element.prototype;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(e,i)}static getOuterWidth(e,i){let r=e.offsetWidth;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(e,i){let r=e.offsetHeight;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let e=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:e.innerWidth||r.clientWidth||o.clientWidth,height:e.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(e){var i=e.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,i){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,i){if(this.isElement(i))i.appendChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+e;i.el.nativeElement.appendChild(e)}}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+e+" from "+i;i.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let r=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,r){e[i].apply(e,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return null===e.offsetParent}static getFocusableElements(e){let i=t.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),r=[];for(let o of i)"none"!=getComputedStyle(o).display&&"hidden"!=getComputedStyle(o).visibility&&r.push(o);return r}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}}return t.zindex=1e3,t.calculatedScrollbarWidth=null,t.calculatedScrollbarHeight=null,t})();class hf{constructor(n,e=(()=>{})){this.element=n,this.listener=e}bindScrollListener(){this.scrollableParents=x.getScrollableParents(this.element);for(let n=0;n=n.length&&(i%=n.length,e%=n.length),n.splice(i,0,n.splice(e,1)[0]))}static insertIntoOrderedArray(n,e,i,r){if(i.length>0){let o=!1;for(let s=0;se){i.splice(s,0,n),o=!0;break}o||i.push(n)}else i.push(n)}static findIndexInList(n,e){let i=-1;if(e)for(let r=0;r-1&&(n=n.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),n}static isEmpty(n){return null==n||""===n||Array.isArray(n)&&0===n.length||!(n instanceof Date)&&"object"==typeof n&&0===Object.keys(n).length}static isNotEmpty(n){return!this.isEmpty(n)}}var jC=0;function pf(){return"pr_id_"+ ++jC}var ni=function(){let t=[];const r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(((o,s)=>{let a=t.length>0?t[t.length-1]:{key:o,value:s},l=a.value+(a.key===o?0:s)+1;return t.push({key:o,value:l}),l})(o,a)))},clear:o=>{o&&((o=>{t=t.filter(s=>s.value!==o)})(r(o)),o.style.zIndex="")},getCurrent:()=>t.length>0?t[t.length-1].value:0}}();let Nt=(()=>{class t{}return t.STARTS_WITH="startsWith",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.ENDS_WITH="endsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.IN="in",t.LESS_THAN="lt",t.LESS_THAN_OR_EQUAL_TO="lte",t.GREATER_THAN="gt",t.GREATER_THAN_OR_EQUAL_TO="gte",t.BETWEEN="between",t.IS="is",t.IS_NOT="isNot",t.BEFORE="before",t.AFTER="after",t.DATE_IS="dateIs",t.DATE_IS_NOT="dateIsNot",t.DATE_BEFORE="dateBefore",t.DATE_AFTER="dateAfter",t})(),Fc=(()=>{class t{constructor(){this.ripple=!1,this.filterMatchModeOptions={text:[Nt.STARTS_WITH,Nt.CONTAINS,Nt.NOT_CONTAINS,Nt.ENDS_WITH,Nt.EQUALS,Nt.NOT_EQUALS],numeric:[Nt.EQUALS,Nt.NOT_EQUALS,Nt.LESS_THAN,Nt.LESS_THAN_OR_EQUAL_TO,Nt.GREATER_THAN,Nt.GREATER_THAN_OR_EQUAL_TO],date:[Nt.DATE_IS,Nt.DATE_IS_NOT,Nt.DATE_BEFORE,Nt.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new le,this.translationObserver=this.translationSource.asObservable()}getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=V(V({},this.translation),e),this.translationSource.next(this.translation)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Tn=(()=>{class t{}return t.STARTS_WITH="startsWith",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.ENDS_WITH="endsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.NO_FILTER="noFilter",t.LT="lt",t.LTE="lte",t.GT="gt",t.GTE="gte",t.IS="is",t.IS_NOT="isNot",t.BEFORE="before",t.AFTER="after",t.CLEAR="clear",t.APPLY="apply",t.MATCH_ALL="matchAll",t.MATCH_ANY="matchAny",t.ADD_RULE="addRule",t.REMOVE_RULE="removeRule",t.ACCEPT="accept",t.REJECT="reject",t.CHOOSE="choose",t.UPLOAD="upload",t.CANCEL="cancel",t.DAY_NAMES="dayNames",t.DAY_NAMES_SHORT="dayNamesShort",t.DAY_NAMES_MIN="dayNamesMin",t.MONTH_NAMES="monthNames",t.MONTH_NAMES_SHORT="monthNamesShort",t.FIRST_DAY_OF_WEEK="firstDayOfWeek",t.TODAY="today",t.WEEK_HEADER="weekHeader",t.WEAK="weak",t.MEDIUM="medium",t.STRONG="strong",t.PASSWORD_PROMPT="passwordPrompt",t.EMPTY_MESSAGE="emptyMessage",t.EMPTY_FILTER_MESSAGE="emptyFilterMessage",t})(),GC=(()=>{class t{constructor(){this.filters={startsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=B.removeAccents(i.toString()).toLocaleLowerCase(r);return B.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=B.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==B.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=B.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===B.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=B.removeAccents(i.toString()).toLocaleLowerCase(r),s=B.removeAccents(e.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(e,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():B.removeAccents(e.toString()).toLocaleLowerCase(r)==B.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(e,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():B.removeAccents(e.toString()).toLocaleLowerCase(r)==B.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(e,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=e&&(e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1]),lt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i),gt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>i.getTime():e>i),gte:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i),is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>null==i||null!=e&&e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>null==i||null!=e&&e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>null==i||null!=e&&e.getTime()null==i||null!=e&&e.getTime()>i.getTime()}}filter(e,i,r,o,s){let a=[];if(e)for(let l of e)for(let c of i){let u=B.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(e,i){this.filters[e]=i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ff=(()=>{class t{constructor(){this.clickSource=new le,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),zC=(()=>{class t{}return t.AND="and",t.OR="or",t})(),Dr=(()=>{class t{constructor(e){this.template=e}getType(){return this.name}}return t.\u0275fac=function(e){return new(e||t)(b(He))},t.\u0275dir=O({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),t})(),$i=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),Pc=(()=>{class t{constructor(e,i,r){this.el=e,this.zone=i,this.config=r}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(e){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(x.removeClass(i,"p-ink-active"),!x.getHeight(i)&&!x.getWidth(i)){let a=Math.max(x.getOuterWidth(this.el.nativeElement),x.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=x.getOffset(this.el.nativeElement),o=e.pageX-r.left+document.body.scrollTop-x.getWidth(i)/2,s=e.pageY-r.top+document.body.scrollLeft-x.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",x.addClass(i,"p-ink-active")}getInk(){for(let e=0;e{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})(),ga=(()=>{class t{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1}ngAfterViewInit(){this._initialStyleClass=this.el.nativeElement.className,x.addMultipleClasses(this.el.nativeElement,this.getStyleClass()),(this.icon||this.loading)&&this.createIconEl();let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",this.label?e.appendChild(document.createTextNode(this.label)):e.innerHTML=" ",this.el.nativeElement.appendChild(e),this.initialized=!0}getStyleClass(){let e="p-button p-component";return this.icon&&!this.label&&(e+=" p-button-icon-only"),this.loading&&(e+=" p-disabled p-button-loading",!this.icon&&this.label&&(e+=" p-button-loading-label-only")),e}setStyleClass(){let e=this.getStyleClass();this.el.nativeElement.className=e+" "+this._initialStyleClass}createIconEl(){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&x.addClass(e,i);let r=this.getIconClass();r&&x.addMultipleClasses(e,r);let o=x.findSingle(this.el.nativeElement,".p-button-label");o?this.el.nativeElement.insertBefore(e,o):this.el.nativeElement.appendChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}setIconClass(){let e=x.findSingle(this.el.nativeElement,".p-button-icon");e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIconEl()}removeIconElement(){let e=x.findSingle(this.el.nativeElement,".p-button-icon");this.el.nativeElement.removeChild(e)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(x.findSingle(this.el.nativeElement,".p-button-label").textContent=this._label||" ",(this.loading||this.icon)&&this.setIconClass(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.setIconClass(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.loading||this.icon?this.setIconClass():this.removeIconElement(),this.setStyleClass())}ngOnDestroy(){this.initialized=!1}}return t.\u0275fac=function(e){return new(e||t)(b(me))},t.\u0275dir=O({type:t,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),t})(),ma=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,Ho]]}),t})(),jB=(()=>{class t{constructor(e){this.router=e}ngOnInit(){this.items=[{label:"Home",icon:"pi pi-fw pi-home",url:"/"},{label:"Endpoints",icon:"pi pi-fw pi-link",url:"endpoints"},{label:"Auth Rules",icon:"pi pi-fw pi-directions",url:"rules"}]}logoutRedirect(){this.router.navigate(["logout"])}}return t.\u0275fac=function(e){return new(e||t)(b(Ke))},t.\u0275cmp=Te({type:t,selectors:[["app-menu"]],decls:15,vars:0,consts:[[1,"navbar","navbar-expand-sm","navbar-light","bg-light"],["href","#",1,"navbar-brand"],["src","assets/images/minos_color@2x.png","height","30","alt","logo"],[1,"navbar-nav","mr-auto"],[1,"nav-item"],["routerLink","/endpoints",1,"nav-link"],["routerLink","/rules",1,"nav-link"],["routerLink","/autz-rules",1,"nav-link"],[1,"navbar-text"],["type","button","pButton","","label","Logout","icon","pi pi-power-off","routerLink","/logout",1,"my-2","my-sm-0",2,"margin-left",".25em"]],template:function(e,i){1&e&&(h(0,"nav",0),h(1,"a",1),U(2,"img",2),p(),h(3,"ul",3),h(4,"li",4),h(5,"a",5),D(6,"Endpoints"),p(),p(),h(7,"li",4),h(8,"a",6),D(9,"Authentication Rules"),p(),p(),h(10,"li",4),h(11,"a",7),D(12,"Authorization Rules"),p(),p(),p(),h(13,"span",8),U(14,"button",9),p(),p())},directives:[lf,yc,ga,bc],styles:[""]}),t})();function GB(t,n){1&t&&(Q(0),U(1,"app-menu"),X())}let zB=(()=>{class t{constructor(e,i){this.router=e,this.authenticationService=i,this.authenticationService.currentUser.subscribe(r=>this.currentUser=r)}}return t.\u0275fac=function(e){return new(e||t)(b(Ke),b(Lo))},t.\u0275cmp=Te({type:t,selectors:[["app-root"]],decls:4,vars:1,consts:[[4,"ngIf"],[1,"container-fluid"]],template:function(e,i){1&e&&(w(0,GB,2,0,"ng-container",0),h(1,"div",1),U(2,"alert"),U(3,"router-outlet"),p()),2&e&&_("ngIf",i.currentUser)},directives:[je,J2,Hp,jB],styles:[""]}),t})(),WC=(()=>{class t{constructor(e,i,r){this.el=e,this.ngModel=i,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(e){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(Jl,8),b(dt))},t.\u0275dir=O({type:t,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(e,i){1&e&&N("input",function(o){return i.onInput(o)}),2&e&&ke("p-filled",i.filled)}}),t})(),gf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})();function WB(t,n){if(1&t&&(Q(0),h(1,"div",16),h(2,"span",17),D(3),p(),p(),X()),2&t){const e=v().message;m(3),Be(" ",e," ")}}function qB(t,n){if(1&t&&w(0,WB,4,1,"ng-container",15),2&t){const e=n.control,i=n.validation;_("ngIf",e&&e.hasError(i)&&(e.dirty||e.touched))}}function KB(t,n){1&t&&U(0,"span",18)}const qC=function(t){return{"is-invalid":t}},KC=function(t){return{validation:"required",message:"Password is required",control:t}};let YB=(()=>{class t{constructor(e,i,r,o,s){this.formBuilder=e,this.route=i,this.router=r,this.authenticationService=o,this.alertService=s,this.loading=!1,this.submitted=!1,this.authenticationService.currentUserValue&&this.router.navigate(["/"])}ngOnInit(){this.loginForm=this.formBuilder.group({username:["",xe.required],password:["",xe.required]}),this.returnUrl=this.route.snapshot.queryParams.returnUrl||"/"}get f(){return this.loginForm.controls}onSubmit(){this.submitted=!0,this.alertService.clear(),!this.loginForm.invalid&&(this.loading=!0,this.authenticationService.login(this.f.username.value,this.f.password.value).pipe(Vn()).subscribe(e=>{this.router.navigate([this.returnUrl])},e=>{this.alertService.error(e),this.loading=!1}))}}return t.\u0275fac=function(e){return new(e||t)(b(Ys),b(gr),b(Ke),b(Lo),b(Hw))},t.\u0275cmp=Te({type:t,selectors:[["ng-component"]],decls:25,vars:17,consts:[[1,"card"],[1,"flex","justify-content-center","flex-wrap","card-container","blue-container","text-center"],[1,"grid","p-fluid"],[3,"formGroup","ngSubmit"],[1,"col-12"],[1,"p-inputgroup"],[1,"p-inputgroup-addon"],[1,"pi","pi-user"],["type","text","pInputText","","placeholder","Username","formControlName","username",1,"form-control",3,"ngClass"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","password","pInputText","","placeholder","Password","formControlName","password",1,"form-control",3,"ngClass"],["formError",""],[1,"form-group"],["pButton","",1,"btn","btn-primary",3,"disabled"],["class","spinner-border spinner-border-sm mr-1",4,"ngIf"],[4,"ngIf"],[1,"fv-plugins-message-container"],["role","alert"],[1,"spinner-border","spinner-border-sm","mr-1"]],template:function(e,i){if(1&e&&(h(0,"div",0),h(1,"div",1),h(2,"h2"),D(3,"Login"),p(),p(),h(4,"div",1),h(5,"div",2),h(6,"form",3),N("ngSubmit",function(){return i.onSubmit()}),h(7,"div",4),h(8,"div",5),h(9,"span",6),U(10,"i",7),p(),U(11,"input",8),$(12,9),p(),p(),h(13,"div",4),h(14,"div",5),h(15,"span",6),D(16,"$"),p(),U(17,"input",10),$(18,9),p(),p(),w(19,qB,1,1,"ng-template",null,11,vt),h(21,"div",12),h(22,"button",13),w(23,KB,1,0,"span",14),D(24," Login "),p(),p(),p(),p(),p(),p()),2&e){const r=We(20);m(6),_("formGroup",i.loginForm),m(5),_("ngClass",j(9,qC,i.submitted&&i.loginForm.controls.username.invalid)),m(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(11,KC,i.loginForm.controls.username)),m(5),_("ngClass",j(13,qC,i.submitted&&i.loginForm.controls.password.invalid)),m(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(15,KC,i.loginForm.controls.password)),m(4),_("disabled",i.loading),m(1),_("ngIf",i.loading)}},directives:[Mo,Eo,Li,Oi,WC,ur,dr,zt,Et,ga,je],encapsulation:2}),t})(),mf=(()=>{class t{constructor(e,i){this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentUserValue||(this.router.navigate(["/login"],{queryParams:{returnUrl:i.url}}),!1)}}return t.\u0275fac=function(e){return new(e||t)(R(Ke),R(Lo))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZB=(()=>{class t{constructor(e,i){this.router=e,this.authenticationService=i,this.authenticationService.currentUser.subscribe(r=>this.currentUser=r)}ngOnInit(){this.authenticationService.logout(),this.router.navigate(["/login"]),window.location.replace("/login")}}return t.\u0275fac=function(e){return new(e||t)(b(Ke),b(Lo))},t.\u0275cmp=Te({type:t,selectors:[["app-logout"]],decls:2,vars:0,template:function(e,i){1&e&&(h(0,"p"),D(1,"logout works!"),p())},styles:[""]}),t})();class YC{setRule(n){const e=n;this.service=e.service||"",this.rule=e.rule||"",this.methods=e.methods||[]}}function _f(t,n){const e=ee(t)?t:()=>t,i=r=>r.error(e());return new Ce(n?r=>n.schedule(i,0,r):i)}const Lc=`${Po_apiUrl}/admin/rules`;let vf=(()=>{class t{constructor(e){this.http=e}getRules(){return this.http.get(`${Lc}`).pipe(q(e=>(e=e.map(i=>i))||[]))}addRule(e){return this.http.post(`${Lc}`,e).pipe(q(i=>i||{}),pn(this.handleError))}deleteRule(e){return this.http.delete(`${Lc}/${e}`).pipe()}updateRule(e,i){return this.http.patch(`${Lc}/${i}`,e).pipe(q(r=>r||{}),pn(this.handleError))}handleError(e){let i="";return i=e.error instanceof ErrorEvent?e.error.message:`Error Code: ${e.status}\nMessage: ${e.message}`,_f(i)}}return t.\u0275fac=function(e){return new(e||t)(R(ko))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function JB(t,n){1&t&&(Q(0),h(1,"div",28),h(2,"div",29),D(3," Rule details are incorrect "),p(),p(),X())}function QB(t,n){if(1&t&&(Q(0),h(1,"div",30),h(2,"span",31),D(3),p(),p(),X()),2&t){const e=v().message;m(3),Be(" ",e," ")}}function XB(t,n){if(1&t&&w(0,QB,4,1,"ng-container",6),2&t){const e=n.control,i=n.validation;_("ngIf",e&&e.hasError(i)&&(e.dirty||e.touched))}}const bf=function(t,n){return{"is-invalid":t,"is-valid":n}},e3=function(t){return{validation:"required",message:"service is required",control:t}},t3=function(t){return{validation:"required",message:"rule is required",control:t}},n3=function(t){return{validation:"required",message:"Method is required",control:t}};let r3=(()=>{class t{constructor(e,i,r,o){this.fb=e,this.activeModal=i,this.ruleService=r,this.router=o,this.unsubscribe=[],this.codeExample="\n := ://\n := '*' | 'http' | 'https'\n := '*' | '*.' +\n := '/' "}ngOnInit(){this.initForm()}get f(){return this.ruleForm.controls}initForm(){let e=`${this.name}s`,i=`*://*/${e}*`;"*"==this.name?(e=this.name,i="*://*/*"):this.name=e,this.ruleForm=this.fb.group({service:[e,xe.compose([xe.required])],rule:[i,xe.compose([xe.required])],methods:[["*"],xe.compose([xe.required])]})}submit(){this.hasError=!1;const e={};Object.keys(this.f).forEach(o=>{e[o]=this.f[o].value});const i=new YC;i.setRule(e);const r=this.ruleService.addRule(i).pipe(Vn()).subscribe(o=>{console.log(o)},o=>{this.hasError=!0,this.errorMessage=o},()=>{this.activeModal.close(),this.router.navigate(["/rules"])});this.unsubscribe.push(r)}ngOnDestroy(){this.unsubscribe.forEach(e=>e.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(b(Ys),b(Ui),b(vf),b(Ke))},t.\u0275cmp=Te({type:t,selectors:[["app-rule-add"]],inputs:{name:"name"},decls:53,vars:28,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["novalidate","novalidate","id","kt_login_signin_form",1,"form","w-100",3,"formGroup","ngSubmit"],[4,"ngIf"],[1,"fv-row","mb-3"],[1,"form-label","fs-6","fw-bolder","text-dark"],["type","text","name","service","formControlName","service","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["id","emailHelp",1,"form-text","text-muted"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","name","rule","formControlName","rule","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["role","alert",1,"alert","alert-success"],[1,"alert-heading"],["formControlName","methods","multiple","",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",2,"height","210px",3,"ngClass"],["value","*"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["value","HEAD"],["value","OPTIONS"],[1,"text-center"],["type","submit","id","kt_sign_up_submit",1,"btn","btn-lg","btn-primary","w-100","mb-5",3,"disabled"],[1,"indicator-label"],["formError",""],[1,"mb-lg-15","alert","alert-danger"],[1,"alert-text","font-weight-bold"],[1,"fv-plugins-message-container"],["role","alert"]],template:function(e,i){if(1&e&&(h(0,"div",0),h(1,"h4",1),D(2,"New Rule"),p(),h(3,"button",2),N("click",function(){return i.activeModal.dismiss("close")}),h(4,"span",3),D(5,"\xd7"),p(),p(),p(),h(6,"div",4),h(7,"form",5),N("ngSubmit",function(){return i.submit()}),w(8,JB,4,0,"ng-container",6),h(9,"div",7),h(10,"label",8),D(11,"Service name"),p(),U(12,"input",9),h(13,"small",10),D(14,"'*' means all endpoints"),p(),$(15,11),p(),h(16,"div",7),h(17,"label",8),D(18,"Rule"),p(),U(19,"input",12),$(20,11),p(),h(21,"div",13),h(22,"h4",14),D(23,"How to correctly define routes!"),p(),h(24,"pre"),D(25),p(),p(),h(26,"div",7),h(27,"label",8),D(28,"Methods"),p(),h(29,"select",15),h(30,"option",16),D(31,"ALL"),p(),h(32,"option",17),D(33,"GET"),p(),h(34,"option",18),D(35,"POST"),p(),h(36,"option",19),D(37,"PUT"),p(),h(38,"option",20),D(39,"OPTIONS"),p(),h(40,"option",21),D(41,"DELETE"),p(),h(42,"option",22),D(43,"HEAD"),p(),h(44,"option",23),D(45,"OPTIONS"),p(),p(),$(46,11),p(),h(47,"div",24),h(48,"button",25),h(49,"span",26),D(50,"Submit"),p(),p(),p(),p(),w(51,XB,1,1,"ng-template",null,27,vt),p()),2&e){const r=We(52);m(7),_("formGroup",i.ruleForm),m(1),_("ngIf",i.hasError),m(4),_("ngClass",Ee(13,bf,i.ruleForm.controls.service.invalid,i.ruleForm.controls.service.valid)),m(3),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(16,e3,i.ruleForm.controls.service)),m(4),_("ngClass",Ee(18,bf,i.ruleForm.controls.rule.invalid,i.ruleForm.controls.rule.valid)),m(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(21,t3,i.ruleForm.controls.rule)),m(5),Be(" ",i.codeExample,"\n "),m(4),_("ngClass",Ee(23,bf,i.ruleForm.controls.methods.invalid,i.ruleForm.controls.methods.valid)),m(17),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(26,n3,i.ruleForm.controls.methods)),m(2),_("disabled",i.ruleForm.invalid)}},directives:[Mo,Eo,Li,je,Oi,ur,dr,zt,Et,hr,qs,Ks],styles:[""]}),t})();class ZC{setRule(n){const e=n;this.roles=e.roles||[],this.service=e.service||"",this.rule=e.rule||"",this.methods=e.methods||[]}}const o3=`${Po_apiUrl}/admin/roles`;let yf=(()=>{class t{constructor(e){this.http=e}getRoles(){return this.http.get(`${o3}`).pipe(q(e=>(e=e.map(i=>i))||[]))}}return t.\u0275fac=function(e){return new(e||t)(R(ko))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Vc=`${Po_apiUrl}/admin/autz-rules`;let wf=(()=>{class t{constructor(e){this.http=e}getRules(){return this.http.get(`${Vc}`).pipe(q(e=>(e=e.map(i=>i))||[]))}addRule(e){return this.http.post(`${Vc}`,e).pipe(q(i=>i||{}),pn(this.handleError))}deleteRule(e){return this.http.delete(`${Vc}/${e}`).pipe()}updateRule(e,i){return this.http.patch(`${Vc}/${i}`,e).pipe(q(r=>r||{}),pn(this.handleError))}handleError(e){let i="";return i=e.error instanceof ErrorEvent?e.error.message:`Error Code: ${e.status}\nMessage: ${e.message}`,_f(i)}}return t.\u0275fac=function(e){return new(e||t)(R(ko))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function s3(t,n){1&t&&(Q(0),h(1,"div",30),h(2,"div",31),D(3," Rule details are incorrect "),p(),p(),X())}function a3(t,n){if(1&t&&(h(0,"option",32),D(1),p()),2&t){const e=n.$implicit;_("ngValue",e.code),m(1),ve(e.role_name)}}function l3(t,n){if(1&t&&(Q(0),h(1,"div",33),h(2,"span",34),D(3),p(),p(),X()),2&t){const e=v().message;m(3),Be(" ",e," ")}}function c3(t,n){if(1&t&&w(0,l3,4,1,"ng-container",6),2&t){const e=n.control,i=n.validation;_("ngIf",e&&e.hasError(i)&&(e.dirty||e.touched))}}const Bc=function(t,n){return{"is-invalid":t,"is-valid":n}},JC=function(t){return{validation:"required",message:"Method is required",control:t}},u3=function(t){return{validation:"required",message:"service is required",control:t}},d3=function(t){return{validation:"required",message:"rule is required",control:t}};let h3=(()=>{class t{constructor(e,i,r,o,s){this.fb=e,this.activeModal=i,this.roleService=r,this.ruleService=o,this.router=s,this.unsubscribe=[],this.codeExample="\n := ://\n := '*' | 'http' | 'https'\n := '*' | '*.' +\n := '/' "}ngOnInit(){this.roles=this.roleService.getRoles(),this.initForm()}get f(){return this.ruleForm.controls}initForm(){let e=`${this.name}s`,i=`*://*/${e}*`;"*"==this.name?(e=this.name,i="*://*/*"):this.name=e,this.ruleForm=this.fb.group({service:[e,xe.compose([xe.required])],rule:[i,xe.compose([xe.required])],methods:[["*"],xe.compose([xe.required])],roles:[["*"],xe.compose([xe.required])]})}submit(){this.hasError=!1;const e={};Object.keys(this.f).forEach(o=>{e[o]=this.f[o].value});const i=new ZC;i.setRule(e);const r=this.ruleService.addRule(i).pipe(Vn()).subscribe(o=>{console.log(o)},o=>{this.hasError=!0,this.errorMessage=o},()=>{this.activeModal.close(),this.router.navigate(["/autz-rules"])});this.unsubscribe.push(r)}ngOnDestroy(){this.unsubscribe.forEach(e=>e.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(b(Ys),b(Ui),b(yf),b(wf),b(Ke))},t.\u0275cmp=Te({type:t,selectors:[["app-autz-rule-add"]],inputs:{name:"name"},decls:62,vars:39,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["novalidate","novalidate","id","kt_login_signin_form",1,"form","w-100",3,"formGroup","ngSubmit"],[4,"ngIf"],[1,"fv-row","mb-3"],[1,"form-label","fs-6","fw-bolder","text-dark"],["formControlName","roles","multiple","",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",2,"height","120px",3,"ngClass"],["value","*"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","name","service","formControlName","service","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["id","emailHelp",1,"form-text","text-muted"],["type","text","name","rule","formControlName","rule","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["role","alert",1,"alert","alert-success"],[1,"alert-heading"],["formControlName","methods","multiple","",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",2,"height","210px",3,"ngClass"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["value","HEAD"],["value","OPTIONS"],[1,"text-center"],["type","submit","id","kt_sign_up_submit",1,"btn","btn-lg","btn-primary","w-100","mb-5",3,"disabled"],[1,"indicator-label"],["formError",""],[1,"mb-lg-15","alert","alert-danger"],[1,"alert-text","font-weight-bold"],[3,"ngValue"],[1,"fv-plugins-message-container"],["role","alert"]],template:function(e,i){if(1&e&&(h(0,"div",0),h(1,"h4",1),D(2,"New Authorization Rule"),p(),h(3,"button",2),N("click",function(){return i.activeModal.dismiss("close")}),h(4,"span",3),D(5,"\xd7"),p(),p(),p(),h(6,"div",4),h(7,"form",5),N("ngSubmit",function(){return i.submit()}),w(8,s3,4,0,"ng-container",6),h(9,"div",7),h(10,"label",8),D(11,"Roles (access allowed)"),p(),h(12,"select",9),h(13,"option",10),D(14,"ALL"),p(),w(15,a3,2,2,"option",11),mo(16,"async"),p(),$(17,12),p(),h(18,"div",7),h(19,"label",8),D(20,"Service name"),p(),U(21,"input",13),h(22,"small",14),D(23,"'*' means all endpoints"),p(),$(24,12),p(),h(25,"div",7),h(26,"label",8),D(27,"Rule"),p(),U(28,"input",15),$(29,12),p(),h(30,"div",16),h(31,"h4",17),D(32,"How to correctly define routes!"),p(),h(33,"pre"),D(34),p(),p(),h(35,"div",7),h(36,"label",8),D(37,"Methods"),p(),h(38,"select",18),h(39,"option",10),D(40,"ALL"),p(),h(41,"option",19),D(42,"GET"),p(),h(43,"option",20),D(44,"POST"),p(),h(45,"option",21),D(46,"PUT"),p(),h(47,"option",22),D(48,"OPTIONS"),p(),h(49,"option",23),D(50,"DELETE"),p(),h(51,"option",24),D(52,"HEAD"),p(),h(53,"option",25),D(54,"OPTIONS"),p(),p(),$(55,12),p(),h(56,"div",26),h(57,"button",27),h(58,"span",28),D(59,"Submit"),p(),p(),p(),p(),w(60,c3,1,1,"ng-template",null,29,vt),p()),2&e){const r=We(61);m(7),_("formGroup",i.ruleForm),m(1),_("ngIf",i.hasError),m(4),_("ngClass",Ee(19,Bc,i.ruleForm.controls.roles.invalid,i.ruleForm.controls.roles.valid)),m(3),_("ngForOf",_o(16,17,i.roles)),m(2),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(22,JC,i.ruleForm.controls.methods)),m(4),_("ngClass",Ee(24,Bc,i.ruleForm.controls.service.invalid,i.ruleForm.controls.service.valid)),m(3),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(27,u3,i.ruleForm.controls.service)),m(4),_("ngClass",Ee(29,Bc,i.ruleForm.controls.rule.invalid,i.ruleForm.controls.rule.valid)),m(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(32,d3,i.ruleForm.controls.rule)),m(5),Be(" ",i.codeExample,"\n "),m(4),_("ngClass",Ee(34,Bc,i.ruleForm.controls.methods.invalid,i.ruleForm.controls.methods.valid)),m(17),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(37,JC,i.ruleForm.controls.methods)),m(2),_("disabled",i.ruleForm.invalid)}},directives:[Mo,Eo,Li,je,hr,ur,dr,zt,qs,Ks,Wt,Et,Oi],pipes:[To],styles:[""]}),t})();const p3=`${Po_apiUrl}/admin/endpoints`;let f3=(()=>{class t{constructor(e){this.http=e}getEndpoints(){return this.http.get(`${p3}`).pipe(q(e=>(e=e.map(i=>i))||[]))}}return t.\u0275fac=function(e){return new(e||t)(R(ko))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Hc(t,n=0){return function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):n}const _a={schedule(t){let n=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:i}=_a;i&&(n=i.requestAnimationFrame,e=i.cancelAnimationFrame);const r=n(o=>{e=void 0,t(o)});return new Lt(()=>null==e?void 0:e(r))},requestAnimationFrame(...t){const{delegate:n}=_a;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){const{delegate:n}=_a;return((null==n?void 0:n.cancelAnimationFrame)||cancelAnimationFrame)(...t)},delegate:void 0},y3=new class extends Zp{flush(n){this._active=!0,this._scheduled=void 0;const{actions:e}=this;let i,r=-1;n=n||e.shift();const o=e.length;do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n._scheduled||(n._scheduled=_a.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,e,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(_a.cancelAnimationFrame(e),n._scheduled=void 0)}});let Cf,w3=1;const Uc={};function QC(t){return t in Uc&&(delete Uc[t],!0)}const C3={setImmediate(t){const n=w3++;return Uc[n]=!0,Cf||(Cf=Promise.resolve()),Cf.then(()=>QC(n)&&t()),n},clearImmediate(t){QC(t)}},{setImmediate:D3,clearImmediate:S3}=C3,$c={setImmediate(...t){const{delegate:n}=$c;return((null==n?void 0:n.setImmediate)||D3)(...t)},clearImmediate(t){const{delegate:n}=$c;return((null==n?void 0:n.clearImmediate)||S3)(t)},delegate:void 0},x3=new class extends Zp{flush(n){this._active=!0,this._scheduled=void 0;const{actions:e}=this;let i,r=-1;n=n||e.shift();const o=e.length;do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n._scheduled||(n._scheduled=$c.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,e,i=0){if(null!=i&&i>0||null==i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&($c.clearImmediate(e),n._scheduled=void 0)}});function XC(t){return!!t&&(t instanceof Ce||ee(t.lift)&&ee(t.subscribe))}function Df(t,n=jw){return function(t){return ze((n,e)=>{let i=!1,r=null,o=null,s=!1;const a=()=>{if(null==o||o.unsubscribe(),o=null,i){i=!1;const c=r;r=null,e.next(c)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};n.subscribe(new Ie(e,c=>{i=!0,r=c,o||Tt(t()).subscribe(o=new Ie(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}(()=>Cc(t,n))}class N3 extends le{constructor(n=1/0,e=1/0,i=Yp){super(),this._bufferSize=n,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,e)}next(n){const{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;e||(i.push(n),!r&&i.push(o.now()+s)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();const e=this._innerSubscribe(n),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s{class t{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function(t){return t===l0}(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&&!Sf)&&"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 t.\u0275fac=function(e){return new(e||t)(R(yo))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),R3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})();function ba(){if("object"!=typeof document||!document)return 0;if(null==jc){const t=document.createElement("div"),n=t.style;t.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";const e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",t.appendChild(e),document.body.appendChild(t),jc=0,0===t.scrollLeft&&(t.scrollLeft=1,jc=0===t.scrollLeft?1:2),t.remove()}return jc}const P3=new te("cdk-dir-doc",{providedIn:"root",factory:function(){return MT(rt)}}),V3=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let nD=(()=>{class t{constructor(e){if(this.value="ltr",this.change=new k,e){const r=e.documentElement?e.documentElement.dir:null;this.value=function(t){const n=(null==t?void 0:t.toLowerCase())||"";return"auto"===n&&"undefined"!=typeof navigator&&(null==navigator?void 0:navigator.language)?V3.test(navigator.language)?"rtl":"ltr":"rtl"===n?"rtl":"ltr"}((e.body?e.body.dir:null)||r||"ltr")}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(R(P3,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),iD=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})();class $3 extends class{}{constructor(n){super(),this._data=n}connect(){return XC(this._data)?this._data:Y(this._data)}disconnect(){}}class j3{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(n,e,i,r,o){n.forEachOperation((s,a,l)=>{let c,u;null==s.previousIndex?(c=this._insertView(()=>i(s,a,l),l,e,r(s)),u=c?1:0):null==l?(this._detachAndCacheView(a,e),u=3):(c=this._moveView(a,l,e,r(s)),u=2),o&&o({context:null==c?void 0:c.context,operation:u,record:s})})}detach(){for(const n of this._viewCache)n.destroy();this._viewCache=[]}_insertView(n,e,i,r){const o=this._insertViewFromCache(e,i);if(o)return void(o.context.$implicit=r);const s=n();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(n,e){const i=e.detach(n);this._maybeCacheView(i,e)}_moveView(n,e,i,r){const o=i.get(n);return i.move(o,e),o.context.$implicit=r,o}_maybeCacheView(n,e){if(this._viewCache.length{let r,o=!0;e.subscribe(new Ie(i,s=>{const a=n(s);(o||!t(r,a))&&(o=!1,r=a,i.next(s))}))})}()),this._viewport=null,this._itemSize=n,this._minBufferPx=e,this._maxBufferPx=i}attach(n){this._viewport=n,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(n,e,i){this._itemSize=n,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(n,e){this._viewport&&this._viewport.scrollToOffset(n*this._itemSize,e)}_updateTotalContentSize(){!this._viewport||this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;const n=this._viewport.getRenderedRange(),e={start:n.start,end:n.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength();let o=this._viewport.measureScrollOffset(),s=this._itemSize>0?o/this._itemSize:0;if(e.end>r){const l=Math.ceil(i/this._itemSize),c=Math.max(0,Math.min(s,r-l));s!=c&&(s=c,o=c*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(r,e.start+l))}const a=o-e.start*this._itemSize;if(a0&&(e.end=Math.min(r,e.end+c),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(s))}}function q3(t){return t._scrollStrategy}let sD=(()=>{class t{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new W3(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=Hc(e)}get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=Hc(e)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=Hc(e)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=O({type:t,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[ge([{provide:oD,useFactory:q3,deps:[pe(()=>t)]}]),nt]}),t})(),aD=(()=>{class t{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new le,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 Ce(i=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(Df(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Y()}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(Kt(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){const i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=function(t){return t instanceof me?t.nativeElement:t}(i),o=e.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Mt(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(R(ye),R(eD),R(rt,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),lD=(()=>{class t{constructor(e,i,r,o){this.elementRef=e,this.scrollDispatcher=i,this.ngZone=r,this.dir=o,this._destroyed=new le,this._elementScrolled=new Ce(s=>this.ngZone.runOutsideAngular(()=>Mt(this.elementRef.nativeElement,"scroll").pipe(Qe(this._destroyed)).subscribe(s)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){const i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=r?e.end:e.start),null==e.right&&(e.right=r?e.start:e.end),null!=e.bottom&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&0!=ba()?(null!=e.left&&(e.right=i.scrollWidth-i.clientWidth-e.left),2==ba()?e.left=e.right:1==ba()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){const i=this.elementRef.nativeElement;!function(){if(null==Sr){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Sr=!1,Sr;if("scrollBehavior"in document.documentElement.style)Sr=!0;else{const t=Element.prototype.scrollTo;Sr=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return Sr}()?(null!=e.top&&(i.scrollTop=e.top),null!=e.left&&(i.scrollLeft=e.left)):i.scrollTo(e)}measureScrollOffset(e){const i="left",r="right",o=this.elementRef.nativeElement;if("top"==e)return o.scrollTop;if("bottom"==e)return o.scrollHeight-o.clientHeight-o.scrollTop;const s=this.dir&&"rtl"==this.dir.value;return"start"==e?e=s?r:i:"end"==e&&(e=s?i:r),s&&2==ba()?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&1==ba()?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(aD),b(ye),b(nD,8))},t.\u0275dir=O({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t})(),Z3=(()=>{class t{constructor(e,i,r){this._platform=e,this._change=new le,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.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,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(Df(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 t.\u0275fac=function(e){return new(e||t)(R(eD),R(ye),R(rt,8))},t.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Q3="undefined"!=typeof requestAnimationFrame?y3:x3;let ya=(()=>{class t extends lD{constructor(e,i,r,o,s,a,l){super(e,a,r,s),this.elementRef=e,this._changeDetectorRef=i,this._scrollStrategy=o,this._detachedSubject=new le,this._renderedRangeSubject=new le,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Ce(c=>this._scrollStrategy.scrolledIndexChange.subscribe(u=>Promise.resolve().then(()=>this.ngZone.run(()=>c.next(u))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=Lt.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()})}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=function(t){return null!=t&&"false"!=`${t}`}(e)}ngOnInit(){super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.elementScrolled().pipe(Ro(null),Df(0,Q3)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()}))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(Qe(this._detachedSubject)).subscribe(i=>{const r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){(function(t,n){return t.start==n.start&&t.end==n.end})(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,i="to-start"){const o="horizontal"==this.orientation,s=o?"X":"Y";let l=`translate${s}(${Number((o&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===i&&(l+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){const r={behavior:i};"horizontal"===this.orientation?r.start=e:r.top=e,this.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){return super.measureScrollOffset(e||("horizontal"===this.orientation?"start":"top"))}measureRenderedContentSize(){const e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){const e=this.elementRef.nativeElement;this._viewportSize="horizontal"===this.orientation?e.clientWidth:e.clientHeight}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const i of e)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(dt),b(ye),b(oD,8),b(nD,8),b(aD),b(Z3))},t.\u0275cmp=Te({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(1&e&&it(G3,7),2&e){let r;ie(r=re())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){2&e&&ke("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[ge([{provide:lD,useExisting:t}]),Ne],ngContentSelectors:z3,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){1&e&&(hl(),h(0,"div",0,1),Cs(2),p(),U(3,"div",2)),2&e&&(m(3),nr("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"],encapsulation:2,changeDetection:0}),t})();function cD(t,n,e){if(!e.getBoundingClientRect)return 0;const r=e.getBoundingClientRect();return"horizontal"===t?"start"===n?r.left:r.right:"start"===n?r.top:r.bottom}let uD=(()=>{class t{constructor(e,i,r,o,s,a){this._viewContainerRef=e,this._template=i,this._differs=r,this._viewRepeater=o,this._viewport=s,this.viewChange=new le,this._dataSourceChanges=new le,this.dataStream=this._dataSourceChanges.pipe(Ro(null),ze((t,n)=>{let e,i=!1;t.subscribe(new Ie(n,r=>{const o=e;e=r,i&&n.next([o,r]),i=!0}))}),Qn(([l,c])=>this._changeDataSource(l,c)),function(t,n,e){let o,s=!1;return o=1,ug({connector:()=>new N3(o,n,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}()),this._differ=null,this._needsUpdate=!1,this._destroyed=new le,this.dataStream.subscribe(l=>{this._data=l,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(Qe(this._destroyed)).subscribe(l=>{this._renderedRange=l,a.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,function(t){return t&&"function"==typeof t.connect}(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new $3(XC(e)?e:Array.from(e||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(i,r)=>e(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=Hc(e)}measureRangeSize(e,i){if(e.start>=e.end)return 0;const r=e.start-this._renderedRange.start,o=e.end-e.start;let s,a;for(let l=0;l-1;l--){const c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){a=c.rootNodes[c.rootNodes.length-1];break}}return s&&a?cD(i,"end",a)-cD(i,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){const e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){!this._renderedRange||(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,i):i)),this._needsUpdate=!0)}_changeDataSource(e,i){return e&&e.disconnect(this),this._needsUpdate=!0,i?i.connect(this):Y()}_updateContext(){const e=this._data.length;let i=this._viewContainerRef.length;for(;i--;){const r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=e,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(o,s,a)=>this._getEmbeddedViewArgs(o,a),o=>o.item),e.forEachIdentityChange(o=>{this._viewContainerRef.get(o.currentIndex).context.$implicit=o.item});const i=this._data.length;let r=this._viewContainerRef.length;for(;r--;){const o=this._viewContainerRef.get(r);o.context.index=this._renderedRange.start+r,o.context.count=i,this._updateComputedContextProperties(o.context)}}_updateComputedContextProperties(e){e.first=0===e.index,e.last=e.index===e.count-1,e.even=e.index%2==0,e.odd=!e.even}_getEmbeddedViewArgs(e,i){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}}return t.\u0275fac=function(e){return new(e||t)(b(wn),b(He),b(Co),b(rD),b(ya,4),b(ye))},t.\u0275dir=O({type:t,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[ge([{provide:rD,useClass:j3}])]}),t})(),dD=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({}),t})(),Gc=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[iD,R3,dD],iD,dD]}),t})();function hD(t,n){return{type:7,name:t,definitions:n,options:{}}}function $o(t,n=null){return{type:4,styles:n,timings:t}}function ji(t){return{type:6,styles:t,offset:null}}function X3(t,n,e){return{type:0,name:t,styles:n,options:e}}function jo(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}let eH=(()=>{class t{constructor(e,i,r){this.el=e,this.zone=i,this.config=r,this.escape=!0,this._tooltipOptions={tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",tooltipZIndex:"auto",escape:!1,positionTop:0,positionLeft:0}}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{"hover"===this.getOption("tooltipEvent")?(this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.addEventListener("click",this.clickListener)):"focus"===this.getOption("tooltipEvent")&&(this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this),this.el.nativeElement.addEventListener("focus",this.focusListener),this.el.nativeElement.addEventListener("blur",this.blurListener))})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.text&&(this.setOption({tooltipLabel:e.text.currentValue}),this.active&&(e.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.tooltipOptions&&(this._tooltipOptions=V(V({},this._tooltipOptions),e.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onClick(e){this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div");let e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),"body"===this.getOption("appendTo")?document.body.appendChild(this.container):"target"===this.getOption("appendTo")?x.appendChild(this.container,this.el.nativeElement):x.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block"}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),x.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?ni.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&&ni.clear(this.container),this.remove()}updateText(){this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(this.getOption("tooltipLabel")))):this.tooltipText.innerHTML=this.getOption("tooltipLabel")}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()))}}getHostOffset(){if("body"===this.getOption("appendTo")||"target"===this.getOption("appendTo")){let e=this.el.nativeElement.getBoundingClientRect();return{left:e.left+x.getWindowScrollLeft(),top:e.top+x.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),i=e.left+x.getOuterWidth(this.el.nativeElement),r=e.top+(x.getOuterHeight(this.el.nativeElement)-x.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let e=this.getHostOffset(),i=e.left-x.getOuterWidth(this.container),r=e.top+(x.getOuterHeight(this.el.nativeElement)-x.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let e=this.getHostOffset(),i=e.left+(x.getOuterWidth(this.el.nativeElement)-x.getOuterWidth(this.container))/2,r=e.top-x.getOuterHeight(this.container);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let e=this.getHostOffset(),i=e.left+(x.getOuterWidth(this.el.nativeElement)-x.getOuterWidth(this.container))/2,r=e.top+x.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=V(V({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let e=this.container.getBoundingClientRect(),i=e.top,r=e.left,o=x.getOuterWidth(this.container),s=x.getOuterHeight(this.container),a=x.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new hf(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){"hover"===this.getOption("tooltipEvent")?(this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener)):"focus"===this.getOption("tooltipEvent")&&(this.el.nativeElement.removeEventListener("focus",this.focusListener),this.el.nativeElement.removeEventListener("blur",this.blurListener)),this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&("body"===this.getOption("appendTo")?document.body.removeChild(this.container):"target"===this.getOption("appendTo")?this.el.nativeElement.removeChild(this.container):x.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&ni.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(ye),b(Fc))},t.\u0275dir=O({type:t,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",text:["pTooltip","text"],disabled:["tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[nt]}),t})(),Ef=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})();function tH(t,n){if(1&t&&(h(0,"span"),D(1),p()),2&t){const e=v();m(1),ve(e.label||"empty")}}function nH(t,n){1&t&&$(0)}const fD=function(t){return{height:t}},iH=function(t,n){return{"p-dropdown-item":!0,"p-highlight":t,"p-disabled":n}},xf=function(t){return{$implicit:t}},rH=["container"],oH=["filter"],sH=["in"],aH=["editableInput"];function lH(t,n){if(1&t&&(Q(0),D(1),X()),2&t){const e=v(2);m(1),ve(e.label||"empty")}}function cH(t,n){1&t&&$(0)}const uH=function(t){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":t}};function dH(t,n){if(1&t&&(h(0,"span",12),w(1,lH,2,1,"ng-container",13),w(2,cH,1,0,"ng-container",14),p()),2&t){const e=v();_("ngClass",j(9,uH,null==e.label||0===e.label.length))("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),ne("id",e.labelId),m(1),_("ngIf",!e.selectedItemTemplate),m(1),_("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",j(11,xf,e.selectedOption))}}const hH=function(t){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":t}};function pH(t,n){if(1&t&&(h(0,"span",15),D(1),p()),2&t){const e=v();_("ngClass",j(2,hH,null==e.placeholder||0===e.placeholder.length)),m(1),ve(e.placeholder||"empty")}}function fH(t,n){if(1&t){const e=G();h(0,"input",16,17),N("click",function(){return T(e),v().onEditableInputClick()})("input",function(r){return T(e),v().onEditableInputChange(r)})("focus",function(r){return T(e),v().onEditableInputFocus(r)})("blur",function(r){return T(e),v().onInputBlur(r)}),p()}if(2&t){const e=v();_("disabled",e.disabled),ne("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function gH(t,n){if(1&t){const e=G();h(0,"i",18),N("click",function(r){return T(e),v().clear(r)}),p()}}function mH(t,n){1&t&&$(0)}function _H(t,n){if(1&t){const e=G();h(0,"div",26),h(1,"div",27),N("click",function(r){return r.stopPropagation()}),h(2,"input",28,29),N("keydown.enter",function(r){return r.preventDefault()})("keydown",function(r){return T(e),v(2).onKeydown(r,!1)})("input",function(r){return T(e),v(2).onFilterInputChange(r)}),p(),U(4,"span",30),p(),p()}if(2&t){const e=v(2);m(2),_("value",e.filterValue||""),ne("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.overlayVisible?"p-highlighted-option":e.labelId)}}function vH(t,n){if(1&t&&(h(0,"span"),D(1),p()),2&t){const e=v().$implicit,i=v(3);m(1),ve(i.getOptionGroupLabel(e)||"empty")}}function bH(t,n){1&t&&$(0)}function yH(t,n){1&t&&$(0)}const gD=function(t,n){return{$implicit:t,selectedOption:n}};function wH(t,n){if(1&t&&(h(0,"li",32),w(1,vH,2,1,"span",13),w(2,bH,1,0,"ng-container",14),p(),w(3,yH,1,0,"ng-container",14)),2&t){const e=n.$implicit;v(2);const i=We(8),r=v();m(1),_("ngIf",!r.groupTemplate),m(1),_("ngTemplateOutlet",r.groupTemplate)("ngTemplateOutletContext",j(5,xf,e)),m(1),_("ngTemplateOutlet",i)("ngTemplateOutletContext",Ee(7,gD,r.getOptionGroupChildren(e),r.selectedOption))}}function CH(t,n){if(1&t&&(Q(0),w(1,wH,4,10,"ng-template",31),X()),2&t){const e=v(2);m(1),_("ngForOf",e.optionsToDisplay)}}function DH(t,n){1&t&&$(0)}function SH(t,n){if(1&t&&(Q(0),w(1,DH,1,0,"ng-container",14),X()),2&t){v();const e=We(8),i=v();m(1),_("ngTemplateOutlet",e)("ngTemplateOutletContext",Ee(2,gD,i.optionsToDisplay,i.selectedOption))}}function TH(t,n){if(1&t){const e=G();h(0,"p-dropdownItem",35),N("onClick",function(r){return T(e),v(4).onItemClick(r)}),p()}if(2&t){const e=n.$implicit,i=v(2).selectedOption,r=v(2);_("option",e)("selected",i==e)("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)}}function EH(t,n){if(1&t&&(Q(0),w(1,TH,1,5,"ng-template",31),X()),2&t){const e=v().$implicit;m(1),_("ngForOf",e)}}function xH(t,n){if(1&t){const e=G();Q(0),h(1,"p-dropdownItem",35),N("onClick",function(r){return T(e),v(5).onItemClick(r)}),p(),X()}if(2&t){const e=n.$implicit,i=v(3).selectedOption,r=v(2);m(1),_("option",e)("selected",i==e)("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)}}function IH(t,n){if(1&t){const e=G();h(0,"cdk-virtual-scroll-viewport",37,38),N("scrolledIndexChange",function(){return T(e),v(4).scrollToSelectedVirtualScrollElement()}),w(2,xH,2,5,"ng-container",39),p()}if(2&t){const e=v(2).$implicit,i=v(2);_("ngStyle",j(3,fD,i.scrollHeight))("itemSize",i.itemSize),m(2),_("cdkVirtualForOf",e)}}function MH(t,n){if(1&t&&w(0,IH,3,5,"cdk-virtual-scroll-viewport",36),2&t){const e=v(3);_("ngIf",e.virtualScroll&&e.optionsToDisplay&&e.optionsToDisplay.length)}}function NH(t,n){if(1&t&&(w(0,EH,2,1,"ng-container",33),w(1,MH,1,1,"ng-template",null,34,vt)),2&t){const e=We(2);_("ngIf",!v(2).virtualScroll)("ngIfElse",e)}}function kH(t,n){if(1&t&&(Q(0),D(1),X()),2&t){const e=v(3);m(1),Be(" ",e.emptyFilterMessageLabel," ")}}function RH(t,n){1&t&&$(0,null,41)}function OH(t,n){if(1&t&&(h(0,"li",40),w(1,kH,2,1,"ng-container",33),w(2,RH,2,0,"ng-container",20),p()),2&t){const e=v(2);m(1),_("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),m(1),_("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function AH(t,n){if(1&t&&(Q(0),D(1),X()),2&t){const e=v(3);m(1),Be(" ",e.emptyMessageLabel," ")}}function FH(t,n){1&t&&$(0,null,42)}function PH(t,n){if(1&t&&(h(0,"li",40),w(1,AH,2,1,"ng-container",33),w(2,FH,2,0,"ng-container",20),p()),2&t){const e=v(2);m(1),_("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),m(1),_("ngTemplateOutlet",e.emptyTemplate)}}function LH(t,n){1&t&&$(0)}const VH=function(t,n){return{showTransitionParams:t,hideTransitionParams:n}},BH=function(t){return{value:"visible",params:t}},HH=function(t){return{"p-dropdown-virtualscroll":t}};function UH(t,n){if(1&t){const e=G();h(0,"div",19),N("click",function(r){return T(e),v().onOverlayClick(r)})("@overlayAnimation.start",function(r){return T(e),v().onOverlayAnimationStart(r)})("@overlayAnimation.start",function(r){return T(e),v().onOverlayAnimationEnd(r)}),w(1,mH,1,0,"ng-container",20),w(2,_H,5,4,"div",21),h(3,"div",22),h(4,"ul",23),w(5,CH,2,1,"ng-container",13),w(6,SH,2,5,"ng-container",13),w(7,NH,3,2,"ng-template",null,24,vt),w(9,OH,3,3,"li",25),w(10,PH,3,3,"li",25),p(),p(),w(11,LH,1,0,"ng-container",20),p()}if(2&t){const e=v();Ve(e.panelStyleClass),_("ngClass","p-dropdown-panel p-component")("@overlayAnimation",j(19,BH,Ee(16,VH,e.showTransitionOptions,e.hideTransitionOptions)))("ngStyle",e.panelStyle),m(1),_("ngTemplateOutlet",e.headerTemplate),m(1),_("ngIf",e.filter),m(1),nr("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),m(1),_("ngClass",j(21,HH,e.virtualScroll)),ne("id",e.listId),m(1),_("ngIf",e.group),m(1),_("ngIf",!e.group),m(3),_("ngIf",e.filterValue&&e.isEmpty()),m(1),_("ngIf",!e.filterValue&&e.isEmpty()),m(1),_("ngTemplateOutlet",e.footerTemplate)}}const $H=function(t,n,e,i){return{"p-dropdown p-component":!0,"p-disabled":t,"p-dropdown-open":n,"p-focus":e,"p-dropdown-clearable":i}},jH={provide:xt,useExisting:pe(()=>mD),multi:!0};let GH=(()=>{class t{constructor(){this.onClick=new k}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Te({type:t,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick"},decls:3,vars:15,consts:[["role","option","pRipple","",3,"ngStyle","id","ngClass","click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(h(0,"li",0),N("click",function(o){return i.onOptionClick(o)}),w(1,tH,2,1,"span",1),w(2,nH,1,0,"ng-container",2),p()),2&e&&(_("ngStyle",j(8,fD,i.itemSize+"px"))("id",i.selected?"p-highlighted-option":"")("ngClass",Ee(10,iH,i.selected,i.disabled)),ne("aria-label",i.label)("aria-selected",i.selected),m(1),_("ngIf",!i.template),m(1),_("ngTemplateOutlet",i.template)("ngTemplateOutletContext",j(13,xf,i.option)))},directives:[Pc,fi,zt,je,Et],encapsulation:2}),t})(),mD=(()=>{class t{constructor(e,i,r,o,s,a,l){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.overlayService=l,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.onChange=new k,this.onFilter=new k,this.onFocus=new k,this.onBlur=new k,this.onClick=new k,this.onShow=new k,this.onHide=new k,this.onClear=new k,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.viewPortOffsetTop=0,this.id=pf()}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){default:this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list"}get options(){return this._options}set options(e){this._options=e,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.optionsChanged=!0,this._filterValue&&this._filterValue.length&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Tn.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Tn.EMPTY_FILTER_MESSAGE)}get filled(){return this.value||null!=this.value||null!=this.value}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(e){return this.optionLabel?B.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?B.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?B.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?B.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?B.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const i=e.option;this.isOptionDisabled(i)||(this.selectItem(e.originalEvent,i),this.accessibleViewChild.nativeElement.focus()),setTimeout(()=>{this.hide()},150)}selectItem(e,i){this.selectedOption!=i&&(this.selectedOption=i,this.value=this.getOptionValue(i),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e,value:this.value}),this.virtualScroll&&setTimeout(()=>{this.viewPortOffsetTop=this.viewPort?this.viewPort.measureScrollOffset():0},1))}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.virtualScroll&&this.updateVirtualScrollSelectedIndex(!0),this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){if(this.virtualScroll&&this.viewPort){let i=this.viewPort.getRenderedRange();this.updateVirtualScrollSelectedIndex(!1),(i.start>this.virtualScrollSelectedIndex||i.end-1&&this.viewPort.scrollToIndex(this.virtualScrollSelectedIndex)),this.virtualAutoScrolled=!0}updateVirtualScrollSelectedIndex(e){this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&(e&&(this.viewPortOffsetTop=0),this.virtualScrollSelectedIndex=this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay))}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):x.appendChild(this.overlay,this.appendTo),this.overlay.style.minWidth||(this.overlay.style.minWidth=x.getWidth(this.containerViewChild.nativeElement)+"px"))}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.virtualScroll&&(this.virtualAutoScrolled=!1),this.cd.markForCheck()}alignOverlay(){this.overlay&&(this.appendTo?x.absolutePosition(this.overlay,this.containerViewChild.nativeElement):x.relativePosition(this.overlay,this.containerViewChild.nativeElement))}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e-1;0<=r;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}if(!i)for(let r=this.optionsToDisplay.length-1;r>=e;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}}return i}findNextEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e+1;r0&&this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findNextEnabledOption(r);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 38:if(this.group){let r=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==r){let o=r.itemIndex-1;if(o>=0)this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[r.groupIndex])[o]),this.selectedOptionUpdated=!0;else if(o<0){let s=this.optionsToDisplay[r.groupIndex-1];s&&(this.selectItem(e,this.getOptionGroupChildren(s)[this.getOptionGroupChildren(s).length-1]),this.selectedOptionUpdated=!0)}}}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findPrevEnabledOption(r);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:i&&(this.overlayVisible?this.hide():this.show(),e.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),e.preventDefault();break;case 27:case 9:this.hide();break;default:i&&!e.metaKey&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const i=e.key;let r;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=i,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+i:i,this.group){let o=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};r=this.searchOptionWithinGroup(o)}else{let o=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;r=this.searchOption(++o)}r&&!this.isOptionDisabled(r)&&(this.selectItem(e,r),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let i;return this.searchValue&&(i=this.searchOptionInRange(e,this.optionsToDisplay.length),i||(i=this.searchOptionInRange(0,e))),i}searchOptionInRange(e,i){for(let r=e;r{!this.preventDocumentDefault&&this.isOutsideClicked(i)&&(this.hide(),this.unbindDocumentClickListener()),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}onWindowResize(){this.overlayVisible&&!x.isTouchDevice()&&this.hide()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new hf(this.containerViewChild.nativeElement,e=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}clear(e){this.value=null,this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.updateSelectedOption(this.value),this.updateEditableLabel(),this.onClear.emit(e)}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null,this.itemsWrapper=null,this.onModelTouched()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&ni.clear(this.overlay),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(hn),b(dt),b(ye),b(GC),b(Fc),b(ff))},t.\u0275cmp=Te({type:t,selectors:[["p-dropdown"]],contentQueries:function(e,i,r){if(1&e&&Ue(r,Dr,4),2&e){let o;ie(o=re())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(it(rH,5),it(oH,5),it(sH,5),it(ya,5),it(aH,5)),2&e){let r;ie(r=re())&&(i.containerViewChild=r.first),ie(r=re())&&(i.filterViewChild=r.first),ie(r=re())&&(i.accessibleViewChild=r.first),ie(r=re())&&(i.viewPort=r.first),ie(r=re())&&(i.editableInputViewChild=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(e,i){2&e&&ke("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focused||i.overlayVisible)},inputs:{scrollHeight:"scrollHeight",filter:"filter",name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:"readonly",required:"required",editable:"editable",appendTo:"appendTo",tabindex:"tabindex",placeholder:"placeholder",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",selectId:"selectId",dataKey:"dataKey",filterBy:"filterBy",autofocus:"autofocus",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:"autoDisplayFirst",group:"group",showClear:"showClear",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",virtualScroll:"virtualScroll",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:"maxlength",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",disabled:"disabled",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear"},features:[ge([jH])],decls:12,vars:24,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["type","text","readonly","","aria-haspopup","listbox","aria-haspopup","listbox","role","listbox",3,"disabled","focus","blur","keydown"],["in",""],[3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass",4,"ngIf"],[3,"ngClass",4,"ngIf"],["type","text","class","p-dropdown-label p-inputtext","aria-haspopup","listbox",3,"disabled","click","input","focus","blur",4,"ngIf"],["class","p-dropdown-clear-icon pi pi-times",3,"click",4,"ngIf"],["role","button","aria-haspopup","listbox",1,"p-dropdown-trigger"],[1,"p-dropdown-trigger-icon",3,"ngClass"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","class","click",4,"ngIf"],[3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],["type","text","aria-haspopup","listbox",1,"p-dropdown-label","p-inputtext",3,"disabled","click","input","focus","blur"],["editableInput",""],[1,"p-dropdown-clear-icon","pi","pi-times",3,"click"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","click"],[4,"ngTemplateOutlet"],["class","p-dropdown-header",4,"ngIf"],[1,"p-dropdown-items-wrapper"],["role","listbox",1,"p-dropdown-items",3,"ngClass"],["itemslist",""],["class","p-dropdown-empty-message",4,"ngIf"],[1,"p-dropdown-header"],[1,"p-dropdown-filter-container",3,"click"],["type","text","autocomplete","off",1,"p-dropdown-filter","p-inputtext","p-component",3,"value","keydown.enter","keydown","input"],["filter",""],[1,"p-dropdown-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-dropdown-item-group"],[4,"ngIf","ngIfElse"],["virtualScrollList",""],[3,"option","selected","label","disabled","template","onClick"],[3,"ngStyle","itemSize","scrolledIndexChange",4,"ngIf"],[3,"ngStyle","itemSize","scrolledIndexChange"],["viewport",""],[4,"cdkVirtualFor","cdkVirtualForOf"],[1,"p-dropdown-empty-message"],["emptyFilter",""],["empty",""]],template:function(e,i){1&e&&(h(0,"div",0,1),N("click",function(o){return i.onMouseclick(o)}),h(2,"div",2),h(3,"input",3,4),N("focus",function(o){return i.onInputFocus(o)})("blur",function(o){return i.onInputBlur(o)})("keydown",function(o){return i.onKeydown(o,!0)}),p(),p(),w(5,dH,3,13,"span",5),w(6,pH,2,4,"span",6),w(7,fH,2,4,"input",7),w(8,gH,1,0,"i",8),h(9,"div",9),U(10,"span",10),p(),w(11,UH,12,23,"div",11),p()),2&e&&(Ve(i.styleClass),_("ngClass",ks(19,$H,i.disabled,i.overlayVisible,i.focused,i.showClear&&!i.disabled))("ngStyle",i.style),m(3),_("disabled",i.disabled),ne("id",i.inputId)("placeholder",i.placeholder)("aria-expanded",i.overlayVisible)("aria-labelledby",i.ariaLabelledBy)("tabindex",i.tabindex)("autofocus",i.autofocus)("aria-activedescendant",i.overlayVisible?"p-highlighted-option":i.labelId),m(2),_("ngIf",!i.editable&&null!=i.label),m(1),_("ngIf",!i.editable&&null==i.label),m(1),_("ngIf",i.editable),m(1),_("ngIf",null!=i.value&&i.showClear&&!i.disabled),m(1),ne("aria-expanded",i.overlayVisible),m(1),_("ngClass",i.dropdownIcon),m(1),_("ngIf",i.overlayVisible))},directives:[zt,fi,je,eH,Et,Wt,GH,ya,sD,uD],styles:[".p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;visibility:hidden}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-panel{position:absolute;top:0;left:0}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:normal;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}\n"],encapsulation:2,data:{animation:[hD("overlayAnimation",[jo(":enter",[ji({opacity:0,transform:"scaleY(0.8)"}),$o("{{showTransitionParams}}")]),jo(":leave",[$o("{{hideTransitionParams}}",ji({opacity:0}))])])]},changeDetection:0}),t})(),If=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,$i,Gc,Ef,Ho],$i,Gc]}),t})();const zH=["input"],_D=function(){return{"p-inputnumber-button p-inputnumber-button-up":!0}},vD=function(){return{"p-inputnumber-button p-inputnumber-button-down":!0}};function WH(t,n){if(1&t){const e=G();h(0,"span",5),h(1,"button",6),N("mousedown",function(r){return T(e),v().onUpButtonMouseDown(r)})("mouseup",function(){return T(e),v().onUpButtonMouseUp()})("mouseleave",function(){return T(e),v().onUpButtonMouseLeave()})("keydown",function(r){return T(e),v().onUpButtonKeyDown(r)})("keyup",function(){return T(e),v().onUpButtonKeyUp()}),p(),h(2,"button",6),N("mousedown",function(r){return T(e),v().onDownButtonMouseDown(r)})("mouseup",function(){return T(e),v().onDownButtonMouseUp()})("mouseleave",function(){return T(e),v().onDownButtonMouseLeave()})("keydown",function(r){return T(e),v().onDownButtonKeyDown(r)})("keyup",function(){return T(e),v().onDownButtonKeyUp()}),p(),p()}if(2&t){const e=v();m(1),Ve(e.incrementButtonClass),_("ngClass",Ns(10,_D))("icon",e.incrementButtonIcon)("disabled",e.disabled),m(1),Ve(e.decrementButtonClass),_("ngClass",Ns(11,vD))("icon",e.decrementButtonIcon)("disabled",e.disabled)}}function qH(t,n){if(1&t){const e=G();h(0,"button",6),N("mousedown",function(r){return T(e),v().onUpButtonMouseDown(r)})("mouseup",function(){return T(e),v().onUpButtonMouseUp()})("mouseleave",function(){return T(e),v().onUpButtonMouseLeave()})("keydown",function(r){return T(e),v().onUpButtonKeyDown(r)})("keyup",function(){return T(e),v().onUpButtonKeyUp()}),p()}if(2&t){const e=v();Ve(e.incrementButtonClass),_("ngClass",Ns(5,_D))("icon",e.incrementButtonIcon)("disabled",e.disabled)}}function KH(t,n){if(1&t){const e=G();h(0,"button",6),N("mousedown",function(r){return T(e),v().onDownButtonMouseDown(r)})("mouseup",function(){return T(e),v().onDownButtonMouseUp()})("mouseleave",function(){return T(e),v().onDownButtonMouseLeave()})("keydown",function(r){return T(e),v().onDownButtonKeyDown(r)})("keyup",function(){return T(e),v().onDownButtonKeyUp()}),p()}if(2&t){const e=v();Ve(e.decrementButtonClass),_("ngClass",Ns(5,vD))("icon",e.decrementButtonIcon)("disabled",e.disabled)}}const YH=function(t,n,e){return{"p-inputnumber p-component":!0,"p-inputnumber-buttons-stacked":t,"p-inputnumber-buttons-horizontal":n,"p-inputnumber-buttons-vertical":e}},ZH={provide:xt,useExisting:pe(()=>bD),multi:!0};let bD=(()=>{class t{constructor(e,i){this.el=e,this.cd=i,this.showButtons=!1,this.format=!0,this.buttonLayout="stacked",this.incrementButtonIcon="pi pi-angle-up",this.decrementButtonIcon="pi pi-angle-down",this.readonly=!1,this.step=1,this.allowEmpty=!0,this.mode="decimal",this.useGrouping=!0,this.onInput=new k,this.onFocus=new k,this.onBlur=new k,this.onKeyDown=new k,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.groupChar="",this.prefixChar="",this.suffixChar=""}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1),this._disabled=e,this.timer&&this.clearTimer()}ngOnChanges(e){["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(r=>!!e[r])&&this.updateConstructParser()}ngOnInit(){this.constructParser(),this.initialized=!0}getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits}}constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());const e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),i=new Map(e.map((r,o)=>[r,o]));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=r=>i.get(r)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){const e=new Intl.NumberFormat(this.locale,st(V({},this.getOptions()),{useGrouping:!1}));return new RegExp(`[${e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}]`,"g")}getGroupingExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){const e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}formatValue(e){if(null!=e){if("-"===e)return e;if(this.format){let r=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(r=this.prefix+r),this.suffix&&(r+=this.suffix),r}return e.toString()}return""}parseValue(e){let i=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(i){if("-"===i)return i;let r=+i;return isNaN(r)?null:r}return null}repeat(e,i,r){if(this.readonly)return;let o=i||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,r)},o),this.spin(e,r)}spin(e,i){let r=this.step*i,o=this.parseValue(this.input.nativeElement.value)||0,s=this.validateValue(o+r);this.maxlength&&this.maxlength0&&i>l){const d=this.isDecimalMode()&&(this.minFractionDigits||0)0?s:""):s=o.slice(0,i-1)+o.slice(i)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(o,i,r),this.updateValue(e,s,null,"delete-range");break;case 46:if(e.preventDefault(),i===r){const a=o.charAt(i),{decimalCharIndex:l,decimalCharIndexWithoutPrefix:c}=this.getDecimalCharIndexes(o);if(this.isNumeralChar(a)){const u=this.getDecimalLength(o);if(this._group.test(a))this._group.lastIndex=0,s=o.slice(0,i)+o.slice(i+2);else if(this._decimal.test(a))this._decimal.lastIndex=0,u?this.input.nativeElement.setSelectionRange(i+1,i+1):s=o.slice(0,i)+o.slice(i+1);else if(l>0&&i>l){const d=this.isDecimalMode()&&(this.minFractionDigits||0)0?s:""):s=o.slice(0,i)+o.slice(i+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(o,i,r),this.updateValue(e,s,null,"delete-range")}this.onKeyDown.emit(e)}onInputKeyPress(e){if(this.readonly)return;e.preventDefault();let i=e.which||e.keyCode,r=String.fromCharCode(i);const o=this.isDecimalSign(r),s=this.isMinusSign(r);(48<=i&&i<=57||s||o)&&this.insert(e,r,{isDecimalSign:o,isMinusSign:s})}onPaste(e){if(!this.disabled&&!this.readonly){e.preventDefault();let i=(e.clipboardData||window.clipboardData).getData("Text");if(i){let r=this.parseValue(i);null!=r&&this.insert(e,r.toString())}}}allowMinusSign(){return null==this.min||this.min<0}isMinusSign(e){return!(!this._minusSign.test(e)&&"-"!==e||(this._minusSign.lastIndex=0,0))}isDecimalSign(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)}isDecimalMode(){return"decimal"===this.mode}getDecimalCharIndexes(e){let i=e.search(this._decimal);this._decimal.lastIndex=0;const o=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:i,decimalCharIndexWithoutPrefix:o}}getCharIndexes(e){const i=e.search(this._decimal);this._decimal.lastIndex=0;const r=e.search(this._minusSign);this._minusSign.lastIndex=0;const o=e.search(this._suffix);this._suffix.lastIndex=0;const s=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:i,minusCharIndex:r,suffixCharIndex:o,currencyCharIndex:s}}insert(e,i,r={isDecimalSign:!1,isMinusSign:!1}){const o=i.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&-1!==o)return;let s=this.input.nativeElement.selectionStart,a=this.input.nativeElement.selectionEnd,l=this.input.nativeElement.value.trim();const{decimalCharIndex:c,minusCharIndex:u,suffixCharIndex:d,currencyCharIndex:f}=this.getCharIndexes(l);let g;if(r.isMinusSign)0===s&&(g=l,(-1===u||0!==a)&&(g=this.insertText(l,i,0,a)),this.updateValue(e,g,i,"insert"));else if(r.isDecimalSign)c>0&&s===c?this.updateValue(e,l,i,"insert"):(c>s&&c0&&s>c){if(s+i.length-(c+1)<=y){const E=f>=s?f-1:d>=s?d:l.length;g=l.slice(0,s)+i+l.slice(s+i.length,E)+l.slice(E),this.updateValue(e,g,i,C)}}else g=this.insertText(l,i,s,a),this.updateValue(e,g,i,C)}}insertText(e,i,r,o){if(2===("."===i?i:i.split(".")).length){const a=e.slice(r,o).search(this._decimal);return this._decimal.lastIndex=0,a>0?e.slice(0,r)+this.formatValue(i)+e.slice(o):e||this.formatValue(i)}return o-r===e.length?this.formatValue(i):0===r?i+e.slice(o):o===e.length?e.slice(0,r)+i:e.slice(0,r)+i+e.slice(o)}deleteRange(e,i,r){let o;return o=r-i===e.length?"":0===i?e.slice(r):r===e.length?e.slice(0,i):e.slice(0,i)+e.slice(r),o}initCursor(){let e=this.input.nativeElement.selectionStart,i=this.input.nativeElement.value,r=i.length,o=null,s=(this.prefixChar||"").length;i=i.replace(this._prefix,""),e-=s;let a=i.charAt(e);if(this.isNumeralChar(a))return e+s;let l=e-1;for(;l>=0;){if(a=i.charAt(l),this.isNumeralChar(a)){o=l+s;break}l--}if(null!==o)this.input.nativeElement.setSelectionRange(o+1,o+1);else{for(l=e;lthis.max?this.max:e}updateInput(e,i,r,o){i=i||"";let s=this.input.nativeElement.value,a=this.formatValue(e),l=s.length;if(a!==o&&(a=this.concatValues(a,o)),0===l){this.input.nativeElement.value=a,this.input.nativeElement.setSelectionRange(0,0);const u=this.initCursor()+i.length;this.input.nativeElement.setSelectionRange(u,u)}else{let c=this.input.nativeElement.selectionStart,u=this.input.nativeElement.selectionEnd;if(this.maxlength&&this.maxlength0}clearTimer(){this.timer&&clearInterval(this.timer)}getFormatter(){return this.numberFormat}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(dt))},t.\u0275cmp=Te({type:t,selectors:[["p-inputNumber"]],viewQuery:function(e,i){if(1&e&&it(zH,5),2&e){let r;ie(r=re())&&(i.input=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(e,i){2&e&&ke("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focused)},inputs:{showButtons:"showButtons",format:"format",buttonLayout:"buttonLayout",inputId:"inputId",styleClass:"styleClass",style:"style",placeholder:"placeholder",size:"size",maxlength:"maxlength",tabindex:"tabindex",title:"title",ariaLabel:"ariaLabel",ariaRequired:"ariaRequired",name:"name",required:"required",autocomplete:"autocomplete",min:"min",max:"max",incrementButtonClass:"incrementButtonClass",decrementButtonClass:"decrementButtonClass",incrementButtonIcon:"incrementButtonIcon",decrementButtonIcon:"decrementButtonIcon",readonly:"readonly",step:"step",allowEmpty:"allowEmpty",locale:"locale",localeMatcher:"localeMatcher",mode:"mode",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:"useGrouping",minFractionDigits:"minFractionDigits",maxFractionDigits:"maxFractionDigits",prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",disabled:"disabled"},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown"},features:[ge([ZH]),nt],decls:6,vars:31,consts:[[3,"ngClass","ngStyle"],["pInputText","","inputmode","decimal",3,"ngClass","ngStyle","value","disabled","readonly","input","keydown","keypress","paste","click","focus","blur"],["input",""],["class","p-inputnumber-button-group",4,"ngIf"],["type","button","pButton","",3,"ngClass","class","icon","disabled","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],[1,"p-inputnumber-button-group"],["type","button","pButton","",3,"ngClass","icon","disabled","mousedown","mouseup","mouseleave","keydown","keyup"]],template:function(e,i){1&e&&(h(0,"span",0),h(1,"input",1,2),N("input",function(o){return i.onUserInput(o)})("keydown",function(o){return i.onInputKeyDown(o)})("keypress",function(o){return i.onInputKeyPress(o)})("paste",function(o){return i.onPaste(o)})("click",function(){return i.onInputClick()})("focus",function(o){return i.onInputFocus(o)})("blur",function(o){return i.onInputBlur(o)}),p(),w(3,WH,3,12,"span",3),w(4,qH,1,6,"button",4),w(5,KH,1,6,"button",4),p()),2&e&&(Ve(i.styleClass),_("ngClass",sr(27,YH,i.showButtons&&"stacked"===i.buttonLayout,i.showButtons&&"horizontal"===i.buttonLayout,i.showButtons&&"vertical"===i.buttonLayout))("ngStyle",i.style),m(1),Ve(i.inputStyleClass),_("ngClass","p-inputnumber-input")("ngStyle",i.inputStyle)("value",i.formattedValue())("disabled",i.disabled)("readonly",i.readonly),ne("placeholder",i.placeholder)("title",i.title)("id",i.inputId)("size",i.size)("name",i.name)("autocomplete",i.autocomplete)("maxlength",i.maxlength)("tabindex",i.tabindex)("aria-label",i.ariaLabel)("aria-required",i.ariaRequired)("required",i.required)("aria-valuemin",i.min)("aria-valuemax",i.max),m(2),_("ngIf",i.showButtons&&"stacked"===i.buttonLayout),m(1),_("ngIf",i.showButtons&&"stacked"!==i.buttonLayout),m(1),_("ngIf",i.showButtons&&"stacked"!==i.buttonLayout))},directives:[zt,fi,WC,je,ga],styles:["p-inputnumber,.p-inputnumber{display:inline-flex}.p-inputnumber-button{display:flex;align-items:center;justify-content:center;flex:0 0 auto}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label{display:none}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up{border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-input{border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-button-group{display:flex;flex-direction:column}.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button{flex:1 1 auto}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up{order:3;border-top-left-radius:0;border-bottom-left-radius:0}.p-inputnumber-buttons-horizontal .p-inputnumber-input{order:2;border-radius:0}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down{order:1;border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-vertical{flex-direction:column}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up{order:1;border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.p-inputnumber-buttons-vertical .p-inputnumber-input{order:2;border-radius:0;text-align:center}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down{order:3;border-top-left-radius:0;border-top-right-radius:0;width:100%}.p-inputnumber-input{flex:1 1 auto}.p-fluid p-inputnumber,.p-fluid .p-inputnumber{width:100%}.p-fluid .p-inputnumber .p-inputnumber-input{width:1%}.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input{width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),Mf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,gf,ma]]}),t})();function JH(t,n){1&t&&$(0)}const Nf=function(t){return{$implicit:t}};function QH(t,n){if(1&t&&(h(0,"div",15),w(1,JH,1,0,"ng-container",16),p()),2&t){const e=v(2);m(1),_("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",j(2,Nf,e.paginatorState))}}function XH(t,n){if(1&t&&(h(0,"span",17),D(1),p()),2&t){const e=v(2);m(1),ve(e.currentPageReport)}}const zc=function(t){return{"p-disabled":t}};function e4(t,n){if(1&t){const e=G();h(0,"button",18),N("click",function(r){return T(e),v(2).changePageToFirst(r)}),U(1,"span",19),p()}if(2&t){const e=v(2);_("disabled",e.isFirstPage()||e.empty())("ngClass",j(2,zc,e.isFirstPage()||e.empty()))}}const t4=function(t){return{"p-highlight":t}};function n4(t,n){if(1&t){const e=G();h(0,"button",22),N("click",function(r){const s=T(e).$implicit;return v(3).onPageLinkClick(r,s-1)}),D(1),p()}if(2&t){const e=n.$implicit,i=v(3);_("ngClass",j(2,t4,e-1==i.getPage())),m(1),ve(e)}}function r4(t,n){if(1&t&&(h(0,"span",20),w(1,n4,2,4,"button",21),p()),2&t){const e=v(2);m(1),_("ngForOf",e.pageLinks)}}function o4(t,n){1&t&&D(0),2&t&&ve(v(3).currentPageReport)}function s4(t,n){if(1&t){const e=G();h(0,"p-dropdown",23),N("onChange",function(r){return T(e),v(2).onPageDropdownChange(r)}),w(1,o4,1,1,"ng-template",24),p()}if(2&t){const e=v(2);_("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("appendTo",e.dropdownAppendTo)("scrollHeight",e.dropdownScrollHeight)}}function a4(t,n){if(1&t){const e=G();h(0,"button",25),N("click",function(r){return T(e),v(2).changePageToLast(r)}),U(1,"span",26),p()}if(2&t){const e=v(2);_("disabled",e.isLastPage()||e.empty())("ngClass",j(2,zc,e.isLastPage()||e.empty()))}}function l4(t,n){if(1&t){const e=G();h(0,"p-inputNumber",27),N("ngModelChange",function(r){return T(e),v(2).changePage(r-1)}),p()}if(2&t){const e=v(2);_("ngModel",e.currentPage())("disabled",e.empty())}}function c4(t,n){1&t&&$(0)}function u4(t,n){if(1&t&&w(0,c4,1,0,"ng-container",16),2&t){const e=n.$implicit;_("ngTemplateOutlet",v(4).dropdownItemTemplate)("ngTemplateOutletContext",j(2,Nf,e))}}function d4(t,n){1&t&&(Q(0),w(1,u4,1,4,"ng-template",30),X())}function h4(t,n){if(1&t){const e=G();h(0,"p-dropdown",28),N("ngModelChange",function(r){return T(e),v(2).rows=r})("onChange",function(r){return T(e),v(2).onRppChange(r)}),w(1,d4,2,0,"ng-container",29),p()}if(2&t){const e=v(2);_("options",e.rowsPerPageItems)("ngModel",e.rows)("disabled",e.empty())("appendTo",e.dropdownAppendTo)("scrollHeight",e.dropdownScrollHeight),m(1),_("ngIf",e.dropdownItemTemplate)}}function p4(t,n){1&t&&$(0)}function f4(t,n){if(1&t&&(h(0,"div",31),w(1,p4,1,0,"ng-container",16),p()),2&t){const e=v(2);m(1),_("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",j(2,Nf,e.paginatorState))}}function g4(t,n){if(1&t){const e=G();h(0,"div",1),w(1,QH,2,4,"div",2),w(2,XH,2,1,"span",3),w(3,e4,2,4,"button",4),h(4,"button",5),N("click",function(r){return T(e),v().changePageToPrev(r)}),U(5,"span",6),p(),w(6,r4,2,1,"span",7),w(7,s4,2,5,"p-dropdown",8),h(8,"button",9),N("click",function(r){return T(e),v().changePageToNext(r)}),U(9,"span",10),p(),w(10,a4,2,4,"button",11),w(11,l4,1,2,"p-inputNumber",12),w(12,h4,2,6,"p-dropdown",13),w(13,f4,2,4,"div",14),p()}if(2&t){const e=v();Ve(e.styleClass),_("ngStyle",e.style)("ngClass","p-paginator p-component"),m(1),_("ngIf",e.templateLeft),m(1),_("ngIf",e.showCurrentPageReport),m(1),_("ngIf",e.showFirstLastIcon),m(1),_("disabled",e.isFirstPage()||e.empty())("ngClass",j(17,zc,e.isFirstPage()||e.empty())),m(2),_("ngIf",e.showPageLinks),m(1),_("ngIf",e.showJumpToPageDropdown),m(1),_("disabled",e.isLastPage()||e.empty())("ngClass",j(19,zc,e.isLastPage()||e.empty())),m(2),_("ngIf",e.showFirstLastIcon),m(1),_("ngIf",e.showJumpToPageInput),m(1),_("ngIf",e.rowsPerPageOptions),m(1),_("ngIf",e.templateRight)}}let m4=(()=>{class t{constructor(e){this.cd=e,this.pageLinkSize=5,this.onPageChange=new k,this.alwaysShow=!0,this.dropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.totalRecords=0,this.rows=0,this.showPageLinks=!0,this._first=0,this._page=0}ngOnInit(){this.updatePaginatorState()}ngOnChanges(e){e.totalRecords&&(this.updatePageLinks(),this.updatePaginatorState(),this.updateFirst(),this.updateRowsPerPageOptions()),e.first&&(this._first=e.first.currentValue,this.updatePageLinks(),this.updatePaginatorState()),e.rows&&(this.updatePageLinks(),this.updatePaginatorState()),e.rowsPerPageOptions&&this.updateRowsPerPageOptions()}get first(){return this._first}set first(e){this._first=e}updateRowsPerPageOptions(){if(this.rowsPerPageOptions){this.rowsPerPageItems=[];for(let e of this.rowsPerPageOptions)"object"==typeof e&&e.showAll?this.rowsPerPageItems.unshift({label:e.showAll,value:this.totalRecords}):this.rowsPerPageItems.push({label:String(e),value:e})}}isFirstPage(){return 0===this.getPage()}isLastPage(){return this.getPage()===this.getPageCount()-1}getPageCount(){return Math.ceil(this.totalRecords/this.rows)}calculatePageLinkBoundaries(){let e=this.getPageCount(),i=Math.min(this.pageLinkSize,e),r=Math.max(0,Math.ceil(this.getPage()-i/2)),o=Math.min(e-1,r+i-1);return r=Math.max(0,r-(this.pageLinkSize-(o-r+1))),[r,o]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),r=e[1];for(let o=e[0];o<=r;o++)this.pageLinks.push(o+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let o=0;o=0&&e0&&this.totalRecords&&this.first>=this.totalRecords&&Promise.resolve(null).then(()=>this.changePage(e-1))}getPage(){return Math.floor(this.first/this.rows)}changePageToFirst(e){this.isFirstPage()||this.changePage(0),e.preventDefault()}changePageToPrev(e){this.changePage(this.getPage()-1),e.preventDefault()}changePageToNext(e){this.changePage(this.getPage()+1),e.preventDefault()}changePageToLast(e){this.isLastPage()||this.changePage(this.getPageCount()-1),e.preventDefault()}onPageLinkClick(e,i){this.changePage(i),e.preventDefault()}onRppChange(e){this.changePage(this.getPage())}onPageDropdownChange(e){this.changePage(e.value)}updatePaginatorState(){this.paginatorState={page:this.getPage(),pageCount:this.getPageCount(),rows:this.rows,first:this.first,totalRecords:this.totalRecords}}empty(){return 0===this.getPageCount()}currentPage(){return this.getPageCount()>0?this.getPage()+1:0}get currentPageReport(){return this.currentPageReportTemplate.replace("{currentPage}",String(this.currentPage())).replace("{totalPages}",String(this.getPageCount())).replace("{first}",String(this.totalRecords>0?this._first+1:0)).replace("{last}",String(Math.min(this._first+this.rows,this.totalRecords))).replace("{rows}",String(this.rows)).replace("{totalRecords}",String(this.totalRecords))}}return t.\u0275fac=function(e){return new(e||t)(b(dt))},t.\u0275cmp=Te({type:t,selectors:[["p-paginator"]],hostAttrs:[1,"p-element"],inputs:{pageLinkSize:"pageLinkSize",style:"style",styleClass:"styleClass",alwaysShow:"alwaysShow",templateLeft:"templateLeft",templateRight:"templateRight",dropdownAppendTo:"dropdownAppendTo",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showFirstLastIcon:"showFirstLastIcon",totalRecords:"totalRecords",rows:"rows",rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:"showJumpToPageDropdown",showJumpToPageInput:"showJumpToPageInput",showPageLinks:"showPageLinks",dropdownItemTemplate:"dropdownItemTemplate",first:"first"},outputs:{onPageChange:"onPageChange"},features:[nt],decls:1,vars:1,consts:[[3,"class","ngStyle","ngClass",4,"ngIf"],[3,"ngStyle","ngClass"],["class","p-paginator-left-content",4,"ngIf"],["class","p-paginator-current",4,"ngIf"],["type","button","pRipple","","class","p-paginator-first p-paginator-element p-link",3,"disabled","ngClass","click",4,"ngIf"],["type","button","pRipple","",1,"p-paginator-prev","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-left"],["class","p-paginator-pages",4,"ngIf"],["styleClass","p-paginator-page-options",3,"options","ngModel","disabled","appendTo","scrollHeight","onChange",4,"ngIf"],["type","button","pRipple","",1,"p-paginator-next","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-right"],["type","button","pRipple","","class","p-paginator-last p-paginator-element p-link",3,"disabled","ngClass","click",4,"ngIf"],["class","p-paginator-page-input",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["styleClass","p-paginator-rpp-options",3,"options","ngModel","disabled","appendTo","scrollHeight","ngModelChange","onChange",4,"ngIf"],["class","p-paginator-right-content",4,"ngIf"],[1,"p-paginator-left-content"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-paginator-current"],["type","button","pRipple","",1,"p-paginator-first","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-double-left"],[1,"p-paginator-pages"],["type","button","class","p-paginator-page p-paginator-element p-link","pRipple","",3,"ngClass","click",4,"ngFor","ngForOf"],["type","button","pRipple","",1,"p-paginator-page","p-paginator-element","p-link",3,"ngClass","click"],["styleClass","p-paginator-page-options",3,"options","ngModel","disabled","appendTo","scrollHeight","onChange"],["pTemplate","selectedItem"],["type","button","pRipple","",1,"p-paginator-last","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-double-right"],[1,"p-paginator-page-input",3,"ngModel","disabled","ngModelChange"],["styleClass","p-paginator-rpp-options",3,"options","ngModel","disabled","appendTo","scrollHeight","ngModelChange","onChange"],[4,"ngIf"],["pTemplate","item"],[1,"p-paginator-right-content"]],template:function(e,i){1&e&&w(0,g4,14,21,"div",0),2&e&&_("ngIf",!!i.alwaysShow||i.pageLinks&&i.pageLinks.length>1)},directives:[je,fi,zt,Pc,Et,Wt,mD,ur,Jl,Dr,bD],styles:[".p-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.p-paginator-left-content{margin-right:auto}.p-paginator-right-content{margin-left:auto}.p-paginator-page,.p-paginator-next,.p-paginator-last,.p-paginator-first,.p-paginator-prev,.p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}.p-paginator-element:focus{z-index:1;position:relative}\n"],encapsulation:2,changeDetection:0}),t})(),_4=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,If,Mf,Xl,$i,Ho],If,Mf,Xl,$i]}),t})();function v4(t,n){1&t&&U(0,"span",8),2&t&&(Ve(v(2).$implicit.icon),_("ngClass","p-button-icon p-button-icon-left"))}function b4(t,n){if(1&t&&(Q(0),w(1,v4,1,3,"span",6),h(2,"span",7),D(3),p(),X()),2&t){const e=v().$implicit,i=v();m(1),_("ngIf",e.icon),m(2),ve(i.getOptionLabel(e))}}function y4(t,n){1&t&&$(0)}const w4=function(t,n){return{$implicit:t,index:n}};function C4(t,n){if(1&t&&w(0,y4,1,0,"ng-container",9),2&t){const e=v(),i=e.$implicit,r=e.index;_("ngTemplateOutlet",v().itemTemplate)("ngTemplateOutletContext",Ee(2,w4,i,r))}}const D4=function(t,n,e){return{"p-highlight":t,"p-disabled":n,"p-button-icon-only":e}};function S4(t,n){if(1&t){const e=G();h(0,"div",2,3),N("click",function(r){const o=T(e),s=o.$implicit,a=o.index;return v().onItemClick(r,s,a)})("keydown.enter",function(r){const o=T(e),s=o.$implicit,a=o.index;return v().onItemClick(r,s,a)})("blur",function(){return T(e),v().onBlur()}),w(2,b4,4,2,"ng-container",4),w(3,C4,1,5,"ng-template",null,5,vt),p()}if(2&t){const e=n.$implicit,i=We(4),r=v();Ve(e.styleClass),_("ngClass",sr(10,D4,r.isSelected(e),r.disabled||r.isOptionDisabled(e),e.icon&&!r.getOptionLabel(e))),ne("aria-pressed",r.isSelected(e))("title",e.title)("aria-label",e.label)("tabindex",r.disabled?null:r.tabindex)("aria-labelledby",r.getOptionLabel(e)),m(2),_("ngIf",!r.itemTemplate)("ngIfElse",i)}}const T4={provide:xt,useExisting:pe(()=>E4),multi:!0};let E4=(()=>{class t{constructor(e){this.cd=e,this.tabindex=0,this.onOptionClick=new k,this.onChange=new k,this.onModelChange=()=>{},this.onModelTouched=()=>{}}getOptionLabel(e){return this.optionLabel?B.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?B.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?B.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onItemClick(e,i,r){this.disabled||this.isOptionDisabled(i)||(this.multiple?this.isSelected(i)?this.removeOption(i):this.value=[...this.value||[],this.getOptionValue(i)]:this.value=this.getOptionValue(i),this.onOptionClick.emit({originalEvent:e,option:i,index:r}),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onBlur(){this.onModelTouched()}removeOption(e){this.value=this.value.filter(i=>!B.equals(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,r=this.getOptionValue(e);if(this.multiple){if(this.value)for(let o of this.value)if(B.equals(o,r,this.dataKey)){i=!0;break}}else i=B.equals(this.getOptionValue(e),this.value,this.dataKey);return i}}return t.\u0275fac=function(e){return new(e||t)(b(dt))},t.\u0275cmp=Te({type:t,selectors:[["p-selectButton"]],contentQueries:function(e,i,r){if(1&e&&Ue(r,He,5),2&e){let o;ie(o=re())&&(i.itemTemplate=o.first)}},hostAttrs:[1,"p-element"],inputs:{options:"options",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",tabindex:"tabindex",multiple:"multiple",style:"style",styleClass:"styleClass",ariaLabelledBy:"ariaLabelledBy",disabled:"disabled",dataKey:"dataKey"},outputs:{onOptionClick:"onOptionClick",onChange:"onChange"},features:[ge([T4])],decls:2,vars:5,consts:[["role","group",3,"ngClass","ngStyle"],["class","p-button p-component","role","button","pRipple","",3,"class","ngClass","click","keydown.enter","blur",4,"ngFor","ngForOf"],["role","button","pRipple","",1,"p-button","p-component",3,"ngClass","click","keydown.enter","blur"],["btn",""],[4,"ngIf","ngIfElse"],["customcontent",""],[3,"ngClass","class",4,"ngIf"],[1,"p-button-label"],[3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(h(0,"div",0),w(1,S4,5,14,"div",1),p()),2&e&&(Ve(i.styleClass),_("ngClass","p-selectbutton p-buttonset p-component")("ngStyle",i.style),m(1),_("ngForOf",i.options))},directives:[zt,fi,Wt,Pc,je,Et],styles:[".p-button{margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative}.p-button-label{flex:1 1 auto}.p-button-icon-right{order:1}.p-button:disabled{cursor:default}.p-button-icon-only{justify-content:center}.p-button-icon-only .p-button-label{visibility:hidden;width:0;flex:0 0 auto}.p-button-vertical{flex-direction:column}.p-button-icon-bottom{order:2}.p-buttonset .p-button{margin:0}.p-buttonset .p-button:not(:last-child){border-right:0 none}.p-buttonset .p-button:not(:first-of-type):not(:last-of-type){border-radius:0}.p-buttonset .p-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0}.p-buttonset .p-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0}.p-buttonset .p-button:focus{position:relative;z-index:1}.p-button-label{transition:all .2s}\n"],encapsulation:2,changeDetection:0}),t})(),x4=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,Ho]]}),t})();const I4=function(t,n,e){return{"p-checkbox-label-active":t,"p-disabled":n,"p-checkbox-label-focus":e}};function M4(t,n){if(1&t){const e=G();h(0,"label",7),N("click",function(r){T(e);const o=v(),s=We(3);return o.onClick(r,s)}),D(1),p()}if(2&t){const e=v();_("ngClass",sr(3,I4,null!=e.value,e.disabled,e.focused)),ne("for",e.inputId),m(1),ve(e.label)}}const N4=function(t,n){return{"p-checkbox p-component":!0,"p-checkbox-disabled":t,"p-checkbox-focused":n}},k4=function(t,n,e){return{"p-highlight":t,"p-disabled":n,"p-focus":e}},R4={provide:xt,useExisting:pe(()=>O4),multi:!0};let O4=(()=>{class t{constructor(e){this.cd=e,this.checkboxTrueIcon="pi pi-check",this.checkboxFalseIcon="pi pi-times",this.onChange=new k,this.onModelChange=()=>{},this.onModelTouched=()=>{}}onClick(e,i){!this.disabled&&!this.readonly&&(this.toggle(e),this.focused=!0,i.focus())}onKeydown(e){32==e.keyCode&&e.preventDefault()}onKeyup(e){32==e.keyCode&&!this.readonly&&(this.toggle(e),e.preventDefault())}toggle(e){null==this.value||null==this.value?this.value=!0:1==this.value?this.value=!1:0==this.value&&(this.value=null),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}writeValue(e){this.value=e,this.cd.markForCheck()}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(b(dt))},t.\u0275cmp=Te({type:t,selectors:[["p-triStateCheckbox"]],hostAttrs:[1,"p-element"],inputs:{disabled:"disabled",name:"name",ariaLabelledBy:"ariaLabelledBy",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",label:"label",readonly:"readonly",checkboxTrueIcon:"checkboxTrueIcon",checkboxFalseIcon:"checkboxFalseIcon"},outputs:{onChange:"onChange"},features:[ge([R4])],decls:7,vars:21,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","text","inputmode","none",3,"name","readonly","disabled","keyup","keydown","focus","blur"],["input",""],["role","checkbox",1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],["class","p-checkbox-label",3,"ngClass","click",4,"ngIf"],[1,"p-checkbox-label",3,"ngClass","click"]],template:function(e,i){if(1&e){const r=G();h(0,"div",0),h(1,"div",1),h(2,"input",2,3),N("keyup",function(s){return i.onKeyup(s)})("keydown",function(s){return i.onKeydown(s)})("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()}),p(),p(),h(4,"div",4),N("click",function(s){T(r);const a=We(3);return i.onClick(s,a)}),U(5,"span",5),p(),p(),w(6,M4,2,7,"label",6)}2&e&&(Ve(i.styleClass),_("ngStyle",i.style)("ngClass",Ee(14,N4,i.disabled,i.focused)),m(2),_("name",i.name)("readonly",i.readonly)("disabled",i.disabled),ne("id",i.inputId)("tabindex",i.tabindex)("aria-labelledby",i.ariaLabelledBy),m(2),_("ngClass",sr(17,k4,null!=i.value,i.disabled,i.focused)),ne("aria-checked",!0===i.value),m(1),_("ngClass",!0===i.value?i.checkboxTrueIcon:!1===i.value?i.checkboxFalseIcon:""),m(1),_("ngIf",i.label))},directives:[fi,zt,je],encapsulation:2,changeDetection:0}),t})(),A4=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae]]}),t})();const F4=["container"],P4=["inputfield"],L4=["contentWrapper"];function V4(t,n){if(1&t){const e=G();h(0,"button",7),N("click",function(r){T(e),v();const o=We(1);return v().onButtonClick(r,o)}),p()}if(2&t){const e=v(2);_("icon",e.icon)("disabled",e.disabled),ne("aria-label",e.iconAriaLabel)}}function B4(t,n){if(1&t){const e=G();h(0,"input",4,5),N("focus",function(r){return T(e),v().onInputFocus(r)})("keydown",function(r){return T(e),v().onInputKeydown(r)})("click",function(){return T(e),v().onInputClick()})("blur",function(r){return T(e),v().onInputBlur(r)})("input",function(r){return T(e),v().onUserInput(r)}),p(),w(2,V4,1,3,"button",6)}if(2&t){const e=v();Ve(e.inputStyleClass),_("value",e.inputFieldValue)("readonly",e.readonlyInput)("ngStyle",e.inputStyle)("placeholder",e.placeholder||"")("disabled",e.disabled)("ngClass","p-inputtext p-component"),ne("id",e.inputId)("name",e.name)("required",e.required)("aria-required",e.required)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null)("aria-labelledby",e.ariaLabelledBy),m(2),_("ngIf",e.showIcon)}}function H4(t,n){1&t&&$(0)}function U4(t,n){if(1&t){const e=G();h(0,"button",28),N("keydown",function(r){return T(e),v(4).onContainerButtonKeydown(r)})("click",function(r){return T(e),v(4).onPrevButtonClick(r)}),U(1,"span",29),p()}}function $4(t,n){if(1&t){const e=G();h(0,"button",30),N("click",function(r){return T(e),v(4).switchToMonthView(r)})("keydown",function(r){return T(e),v(4).onContainerButtonKeydown(r)}),D(1),p()}if(2&t){const e=v().$implicit,i=v(3);_("disabled",i.switchViewButtonDisabled()),m(1),Be(" ",i.getMonthName(e.month)," ")}}function j4(t,n){if(1&t){const e=G();h(0,"button",31),N("click",function(r){return T(e),v(4).switchToYearView(r)})("keydown",function(r){return T(e),v(4).onContainerButtonKeydown(r)}),D(1),p()}if(2&t){const e=v().$implicit,i=v(3);_("disabled",i.switchViewButtonDisabled()),m(1),Be(" ",i.getYear(e)," ")}}function G4(t,n){if(1&t&&(Q(0),D(1),X()),2&t){const e=v(5);m(1),Jd("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1],"")}}function z4(t,n){1&t&&$(0)}const yD=function(t){return{$implicit:t}};function W4(t,n){if(1&t&&(h(0,"span",32),w(1,G4,2,2,"ng-container",11),w(2,z4,1,0,"ng-container",33),p()),2&t){const e=v(4);m(1),_("ngIf",!e.decadeTemplate),m(1),_("ngTemplateOutlet",e.decadeTemplate)("ngTemplateOutletContext",j(3,yD,e.yearPickerValues))}}function q4(t,n){if(1&t&&(h(0,"th",39),h(1,"span"),D(2),p(),p()),2&t){const e=v(5);m(2),ve(e.getTranslation("weekHeader"))}}function K4(t,n){if(1&t&&(h(0,"th",40),h(1,"span"),D(2),p(),p()),2&t){const e=n.$implicit;m(2),ve(e)}}function Y4(t,n){if(1&t&&(h(0,"td",43),h(1,"span",44),D(2),p(),p()),2&t){const e=v().index,i=v(2).$implicit;m(2),Be(" ",i.weekNumbers[e]," ")}}function Z4(t,n){if(1&t&&(Q(0),D(1),X()),2&t){const e=v(2).$implicit;m(1),ve(e.day)}}function J4(t,n){1&t&&$(0)}const Q4=function(t,n){return{"p-highlight":t,"p-disabled":n}};function X4(t,n){if(1&t){const e=G();Q(0),h(1,"span",46),N("click",function(r){T(e);const o=v().$implicit;return v(6).onDateSelect(r,o)})("keydown",function(r){T(e);const o=v().$implicit,s=v(3).index;return v(3).onDateCellKeydown(r,o,s)}),w(2,Z4,2,1,"ng-container",11),w(3,J4,1,0,"ng-container",33),p(),X()}if(2&t){const e=v().$implicit,i=v(6);m(1),_("ngClass",Ee(4,Q4,i.isSelected(e),!e.selectable)),m(1),_("ngIf",!i.dateTemplate),m(1),_("ngTemplateOutlet",i.dateTemplate)("ngTemplateOutletContext",j(7,yD,e))}}const eU=function(t,n){return{"p-datepicker-other-month":t,"p-datepicker-today":n}};function tU(t,n){if(1&t&&(h(0,"td",45),w(1,X4,4,9,"ng-container",11),p()),2&t){const e=n.$implicit,i=v(6);_("ngClass",Ee(2,eU,e.otherMonth,e.today)),m(1),_("ngIf",!e.otherMonth||i.showOtherMonths)}}function nU(t,n){if(1&t&&(h(0,"tr"),w(1,Y4,3,1,"td",41),w(2,tU,2,5,"td",42),p()),2&t){const e=n.$implicit,i=v(5);m(1),_("ngIf",i.showWeek),m(1),_("ngForOf",e)}}function iU(t,n){if(1&t&&(h(0,"div",34),h(1,"table",35),h(2,"thead"),h(3,"tr"),w(4,q4,3,1,"th",36),w(5,K4,3,1,"th",37),p(),p(),h(6,"tbody"),w(7,nU,3,2,"tr",38),p(),p(),p()),2&t){const e=v().$implicit,i=v(3);m(4),_("ngIf",i.showWeek),m(1),_("ngForOf",i.weekDays),m(2),_("ngForOf",e.dates)}}function rU(t,n){if(1&t){const e=G();h(0,"div",18),h(1,"div",19),w(2,U4,2,0,"button",20),h(3,"div",21),w(4,$4,2,2,"button",22),w(5,j4,2,2,"button",23),w(6,W4,3,5,"span",24),p(),h(7,"button",25),N("keydown",function(r){return T(e),v(3).onContainerButtonKeydown(r)})("click",function(r){return T(e),v(3).onNextButtonClick(r)}),U(8,"span",26),p(),p(),w(9,iU,8,3,"div",27),p()}if(2&t){const e=n.index,i=v(3);m(2),_("ngIf",0===e),m(2),_("ngIf","date"===i.currentView),m(1),_("ngIf","year"!==i.currentView),m(1),_("ngIf","year"===i.currentView),m(1),nr("display",1===i.numberOfMonths||e===i.numberOfMonths-1?"inline-flex":"none"),m(2),_("ngIf","date"===i.currentView)}}const wD=function(t){return{"p-highlight":t}};function oU(t,n){if(1&t){const e=G();h(0,"span",49),N("click",function(r){const s=T(e).index;return v(4).onMonthSelect(r,s)})("keydown",function(r){const s=T(e).index;return v(4).onMonthCellKeydown(r,s)}),D(1),p()}if(2&t){const e=n.$implicit,i=n.index,r=v(4);_("ngClass",j(2,wD,r.isMonthSelected(i))),m(1),Be(" ",e," ")}}function sU(t,n){if(1&t&&(h(0,"div",47),w(1,oU,2,4,"span",48),p()),2&t){const e=v(3);m(1),_("ngForOf",e.monthPickerValues())}}function aU(t,n){if(1&t){const e=G();h(0,"span",52),N("click",function(r){const s=T(e).$implicit;return v(4).onYearSelect(r,s)})("keydown",function(r){const s=T(e).$implicit;return v(4).onYearCellKeydown(r,s)}),D(1),p()}if(2&t){const e=n.$implicit,i=v(4);_("ngClass",j(2,wD,i.isYearSelected(e))),m(1),Be(" ",e," ")}}function lU(t,n){if(1&t&&(h(0,"div",50),w(1,aU,2,4,"span",51),p()),2&t){const e=v(3);m(1),_("ngForOf",e.yearPickerValues())}}function cU(t,n){if(1&t&&(Q(0),h(1,"div",14),w(2,rU,10,7,"div",15),p(),w(3,sU,2,1,"div",16),w(4,lU,2,1,"div",17),X()),2&t){const e=v(2);m(2),_("ngForOf",e.months),m(1),_("ngIf","month"===e.currentView),m(1),_("ngIf","year"===e.currentView)}}function uU(t,n){1&t&&(Q(0),D(1,"0"),X())}function dU(t,n){1&t&&(Q(0),D(1,"0"),X())}function hU(t,n){if(1&t&&(h(0,"div",58),h(1,"span"),D(2),p(),p()),2&t){const e=v(3);m(2),ve(e.timeSeparator)}}function pU(t,n){1&t&&(Q(0),D(1,"0"),X())}function fU(t,n){if(1&t){const e=G();h(0,"div",63),h(1,"button",55),N("keydown",function(r){return T(e),v(3).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),v(3).incrementSecond(r)})("keydown.space",function(r){return T(e),v(3).incrementSecond(r)})("mousedown",function(r){return T(e),v(3).onTimePickerElementMouseDown(r,2,1)})("mouseup",function(r){return T(e),v(3).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),v(3).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),v(3).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),v(3).onTimePickerElementMouseLeave()}),U(2,"span",56),p(),h(3,"span"),w(4,pU,2,0,"ng-container",11),D(5),p(),h(6,"button",55),N("keydown",function(r){return T(e),v(3).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),v(3).decrementSecond(r)})("keydown.space",function(r){return T(e),v(3).decrementSecond(r)})("mousedown",function(r){return T(e),v(3).onTimePickerElementMouseDown(r,2,-1)})("mouseup",function(r){return T(e),v(3).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),v(3).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),v(3).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),v(3).onTimePickerElementMouseLeave()}),U(7,"span",57),p(),p()}if(2&t){const e=v(3);m(4),_("ngIf",e.currentSecond<10),m(1),ve(e.currentSecond)}}function gU(t,n){if(1&t){const e=G();h(0,"div",64),h(1,"button",65),N("keydown",function(r){return T(e),v(3).onContainerButtonKeydown(r)})("click",function(r){return T(e),v(3).toggleAMPM(r)})("keydown.enter",function(r){return T(e),v(3).toggleAMPM(r)}),U(2,"span",56),p(),h(3,"span"),D(4),p(),h(5,"button",65),N("keydown",function(r){return T(e),v(3).onContainerButtonKeydown(r)})("click",function(r){return T(e),v(3).toggleAMPM(r)})("keydown.enter",function(r){return T(e),v(3).toggleAMPM(r)}),U(6,"span",57),p(),p()}if(2&t){const e=v(3);m(4),ve(e.pm?"PM":"AM")}}function mU(t,n){if(1&t){const e=G();h(0,"div",53),h(1,"div",54),h(2,"button",55),N("keydown",function(r){return T(e),v(2).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),v(2).incrementHour(r)})("keydown.space",function(r){return T(e),v(2).incrementHour(r)})("mousedown",function(r){return T(e),v(2).onTimePickerElementMouseDown(r,0,1)})("mouseup",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),v(2).onTimePickerElementMouseLeave()}),U(3,"span",56),p(),h(4,"span"),w(5,uU,2,0,"ng-container",11),D(6),p(),h(7,"button",55),N("keydown",function(r){return T(e),v(2).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),v(2).decrementHour(r)})("keydown.space",function(r){return T(e),v(2).decrementHour(r)})("mousedown",function(r){return T(e),v(2).onTimePickerElementMouseDown(r,0,-1)})("mouseup",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),v(2).onTimePickerElementMouseLeave()}),U(8,"span",57),p(),p(),h(9,"div",58),h(10,"span"),D(11),p(),p(),h(12,"div",59),h(13,"button",55),N("keydown",function(r){return T(e),v(2).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),v(2).incrementMinute(r)})("keydown.space",function(r){return T(e),v(2).incrementMinute(r)})("mousedown",function(r){return T(e),v(2).onTimePickerElementMouseDown(r,1,1)})("mouseup",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),v(2).onTimePickerElementMouseLeave()}),U(14,"span",56),p(),h(15,"span"),w(16,dU,2,0,"ng-container",11),D(17),p(),h(18,"button",55),N("keydown",function(r){return T(e),v(2).onContainerButtonKeydown(r)})("keydown.enter",function(r){return T(e),v(2).decrementMinute(r)})("keydown.space",function(r){return T(e),v(2).decrementMinute(r)})("mousedown",function(r){return T(e),v(2).onTimePickerElementMouseDown(r,1,-1)})("mouseup",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("keyup.enter",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("keyup.space",function(r){return T(e),v(2).onTimePickerElementMouseUp(r)})("mouseleave",function(){return T(e),v(2).onTimePickerElementMouseLeave()}),U(19,"span",57),p(),p(),w(20,hU,3,1,"div",60),w(21,fU,8,2,"div",61),w(22,gU,7,1,"div",62),p()}if(2&t){const e=v(2);m(5),_("ngIf",e.currentHour<10),m(1),ve(e.currentHour),m(5),ve(e.timeSeparator),m(5),_("ngIf",e.currentMinute<10),m(1),ve(e.currentMinute),m(3),_("ngIf",e.showSeconds),m(1),_("ngIf",e.showSeconds),m(1),_("ngIf","12"==e.hourFormat)}}const CD=function(t){return[t]};function _U(t,n){if(1&t){const e=G();h(0,"div",66),h(1,"button",67),N("keydown",function(r){return T(e),v(2).onContainerButtonKeydown(r)})("click",function(r){return T(e),v(2).onTodayButtonClick(r)}),p(),h(2,"button",67),N("keydown",function(r){return T(e),v(2).onContainerButtonKeydown(r)})("click",function(r){return T(e),v(2).onClearButtonClick(r)}),p(),p()}if(2&t){const e=v(2);m(1),_("label",e.getTranslation("today"))("ngClass",j(4,CD,e.todayButtonStyleClass)),m(1),_("label",e.getTranslation("clear"))("ngClass",j(6,CD,e.clearButtonStyleClass))}}function vU(t,n){1&t&&$(0)}const bU=function(t,n,e,i,r,o){return{"p-datepicker p-component":!0,"p-datepicker-inline":t,"p-disabled":n,"p-datepicker-timeonly":e,"p-datepicker-multiple-month":i,"p-datepicker-monthpicker":r,"p-datepicker-touch-ui":o}},DD=function(t,n){return{showTransitionParams:t,hideTransitionParams:n}},yU=function(t){return{value:"visibleTouchUI",params:t}},wU=function(t){return{value:"visible",params:t}};function CU(t,n){if(1&t){const e=G();h(0,"div",8,9),N("@overlayAnimation.start",function(r){return T(e),v().onOverlayAnimationStart(r)})("@overlayAnimation.done",function(r){return T(e),v().onOverlayAnimationDone(r)})("click",function(r){return T(e),v().onOverlayClick(r)}),Cs(2),w(3,H4,1,0,"ng-container",10),w(4,cU,5,3,"ng-container",11),w(5,mU,23,8,"div",12),w(6,_U,3,8,"div",13),Cs(7,1),w(8,vU,1,0,"ng-container",10),p()}if(2&t){const e=v();Ve(e.panelStyleClass),_("ngStyle",e.panelStyle)("ngClass",go(11,bU,e.inline,e.disabled,e.timeOnly,e.numberOfMonths>1,"month"===e.view,e.touchUI))("@overlayAnimation",e.touchUI?j(21,yU,Ee(18,DD,e.showTransitionOptions,e.hideTransitionOptions)):j(26,wU,Ee(23,DD,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0===e.inline),m(3),_("ngTemplateOutlet",e.headerTemplate),m(1),_("ngIf",!e.timeOnly),m(1),_("ngIf",e.showTime||e.timeOnly),m(1),_("ngIf",e.showButtonBar),m(2),_("ngTemplateOutlet",e.footerTemplate)}}const DU=[[["p-header"]],[["p-footer"]]],SU=function(t,n,e,i){return{"p-calendar":!0,"p-calendar-w-btn":t,"p-calendar-timeonly":n,"p-calendar-disabled":e,"p-focus":i}},TU=["p-header","p-footer"],EU={provide:xt,useExisting:pe(()=>xU),multi:!0};let xU=(()=>{class t{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.config=s,this.overlayService=a,this.multipleSeparator=",",this.rangeSeparator="-",this.inline=!1,this.showOtherMonths=!0,this.icon="pi pi-calendar",this.shortYearCutoff="+10",this.hourFormat="24",this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.showOnFocus=!0,this.showWeek=!1,this.dataType="date",this.selectionMode="single",this.todayButtonStyleClass="p-button-text",this.clearButtonStyleClass="p-button-text",this.autoZIndex=!0,this.baseZIndex=0,this.keepInvalid=!1,this.hideOnDateTimeSelect=!0,this.timeSeparator=":",this.focusTrap=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onFocus=new k,this.onBlur=new k,this.onClose=new k,this.onSelect=new k,this.onInput=new k,this.onTodayClick=new k,this.onClearClick=new k,this.onMonthChange=new k,this.onYearChange=new k,this.onClickOutside=new k,this.onShow=new k,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.inputFieldValue=null,this.navigationState=null,this._numberOfMonths=1,this._view="date",this.convertTo24Hour=function(l,c){return"12"==this.hourFormat?12===l?c?12:0:c?l+12:l:l}}set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):this.focus||this.initFocusableCell())}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){const i=e||new Date;this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.initTime(i),this.createMonths(this.currentMonth,this.currentYear)}}get minDate(){return this._minDate}set minDate(e){this._minDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(e){if(this._yearRange=e,e){const i=e.split(":"),r=parseInt(i[0]),o=parseInt(i[1]);this.populateYearOptions(r,o)}}get showTime(){return this._showTime}set showTime(e){this._showTime=e,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()}get locale(){return this._locale}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}set locale(e){console.warn("Locale property has no effect, use new i18n API instead.")}ngOnInit(){this.attributeSelector=pf();const e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.currentView=this.view,"date"===this.view&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays()}),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){default:this.dateTemplate=e.template;break;case"decade":this.decadeTemplate=e.template;break;case"disabledDate":this.disabledDateTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),this.disabled||(this.initFocusableCell(),1===this.numberOfMonths&&(this.contentViewChild.nativeElement.style.width=x.getOuterWidth(this.containerViewChild.nativeElement)+"px")))}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,i){this.yearOptions=[];for(let r=e;r<=i;r++)this.yearOptions.push(r)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),i=this.getTranslation(Tn.DAY_NAMES_MIN);for(let r=0;r<7;r++)this.weekDays.push(i[e]),e=6==e?0:++e}monthPickerValues(){let e=[];for(let i=0;i<=11;i++)e.push(this.config.getTranslation("monthNamesShort")[i]);return e}yearPickerValues(){let e=[],i=this.currentYear-this.currentYear%10;for(let r=0;r<10;r++)e.push(i+r);return e}createMonths(e,i){this.months=this.months=[];for(let r=0;r11&&(o=o%11-1,s=i+1),this.months.push(this.createMonth(o,s))}}getWeekNumber(e){let i=new Date(e.getTime());i.setDate(i.getDate()+4-(i.getDay()||7));let r=i.getTime();return i.setMonth(0),i.setDate(1),Math.floor(Math.round((r-i.getTime())/864e5)/7)+1}createMonth(e,i){let r=[],o=this.getFirstDayOfMonthIndex(e,i),s=this.getDaysCountInMonth(e,i),a=this.getDaysCountInPrevMonth(e,i),l=1,c=new Date,u=[],d=Math.ceil((s+o)/7);for(let f=0;fs){let C=this.getNextMonthAndYear(e,i);g.push({day:l-s,month:C.month,year:C.year,otherMonth:!0,today:this.isToday(c,l-s,C.month,C.year),selectable:this.isSelectable(l-s,C.month,C.year,!0)})}else g.push({day:l,month:e,year:i,today:this.isToday(c,l,e,i),selectable:this.isSelectable(l,e,i,!1)});l++}this.showWeek&&u.push(this.getWeekNumber(new Date(g[0].year,g[0].month,g[0].day))),r.push(g)}return{month:e,year:i,dates:r,weekNumbers:u}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(0===this.currentMonth?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}navForward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(11===this.currentMonth?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}decrementYear(){if(this.currentYear--,this.yearNavigator&&this.currentYearthis.yearOptions[this.yearOptions.length-1]){let e=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+e,this.yearOptions[this.yearOptions.length-1]+e)}}switchToMonthView(e){this.currentView="month",e.preventDefault()}switchToYearView(e){this.currentView="year",e.preventDefault()}onDateSelect(e,i){!this.disabled&&i.selectable?(this.isMultipleSelection()&&this.isSelected(i)?(this.value=this.value.filter((r,o)=>!this.isDateEquals(r,i)),0===this.value.length&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(i)&&this.selectDate(i),this.isSingleSelection()&&this.hideOnDateTimeSelect&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()):e.preventDefault()}shouldSelectDate(e){return!this.isMultipleSelection()||null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0)}onMonthSelect(e,i){"month"===this.view?this.onDateSelect(e,{year:this.currentYear,month:i,day:1,selectable:!0}):(this.currentMonth=i,this.currentView="date",this.createMonths(this.currentMonth,this.currentYear),this.cd.markForCheck(),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,i){"year"===this.view?this.onDateSelect(e,{year:i,month:0,day:1,selectable:!0}):(this.currentYear=i,this.currentView="month",this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value)if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let i=0;i11,this.currentHour=e>=12?12==e?12:e-12:0==e?12:e):this.currentHour=e}selectDate(e){let i=new Date(e.year,e.month,e.day);if(this.showTime&&(i.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),i.setMinutes(this.currentMinute),i.setSeconds(this.currentSecond)),this.minDate&&this.minDate>i&&(i=this.minDate,this.setCurrentHourPM(i.getHours()),this.currentMinute=i.getMinutes(),this.currentSecond=i.getSeconds()),this.maxDate&&this.maxDate=r.getTime()?o=i:(r=i,o=null),this.updateModel([r,o])}else this.updateModel([i,null]);this.onSelect.emit(i)}updateModel(e){if(this.value=e,"date"==this.dataType)this.onModelChange(this.value);else if("string"==this.dataType)if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let i=null;this.value&&(i=this.value.map(r=>this.formatDateTime(r))),this.onModelChange(i)}}getFirstDayOfMonthIndex(e,i){let r=new Date;r.setDate(1),r.setMonth(e),r.setFullYear(i);let o=r.getDay()+this.getSundayIndex();return o>=7?o-7:o}getDaysCountInMonth(e,i){return 32-this.daylightSavingAdjust(new Date(i,e,32)).getDate()}getDaysCountInPrevMonth(e,i){let r=this.getPreviousMonthAndYear(e,i);return this.getDaysCountInMonth(r.month,r.year)}getPreviousMonthAndYear(e,i){let r,o;return 0===e?(r=11,o=i-1):(r=e-1,o=i),{month:r,year:o}}getNextMonthAndYear(e,i){let r,o;return 11===e?(r=0,o=i+1):(r=e+1,o=i),{month:r,year:o}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let i=!1;for(let r of this.value)if(i=this.isDateEquals(r,e),i)break;return i}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e):void 0}isComparable(){return null!=this.value&&"string"!=typeof this.value}isMonthSelected(e){if(this.isComparable()){let i=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&i.getMonth()===e&&i.getFullYear()===this.currentYear}return!1}isYearSelected(e){if(this.isComparable()){let i=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&i.getFullYear()===e}return!1}isDateEquals(e,i){return!!(e&&e instanceof Date)&&e.getDate()===i.day&&e.getMonth()===i.month&&e.getFullYear()===i.year}isDateBetween(e,i,r){if(e&&i){let s=new Date(r.year,r.month,r.day);return e.getTime()<=s.getTime()&&i.getTime()>=s.getTime()}return!1}isSingleSelection(){return"single"===this.selectionMode}isRangeSelection(){return"range"===this.selectionMode}isMultipleSelection(){return"multiple"===this.selectionMode}isToday(e,i,r,o){return e.getDate()===i&&e.getMonth()===r&&e.getFullYear()===o}isSelectable(e,i,r,o){let s=!0,a=!0,l=!0,c=!0;return!(o&&!this.selectOtherMonths)&&(this.minDate&&(this.minDate.getFullYear()>r||this.minDate.getFullYear()===r&&(this.minDate.getMonth()>i||this.minDate.getMonth()===i&&this.minDate.getDate()>e))&&(s=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.disabled}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:this.inline||this.trapFocus(e);break;case 27:this.overlayVisible=!1,e.preventDefault()}}onInputKeydown(e){this.isKeydown=!0,40===e.keyCode&&this.contentViewChild?this.trapFocus(e):27===e.keyCode||13===e.keyCode?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):9===e.keyCode&&this.contentViewChild&&(x.getFocusableElements(this.contentViewChild.nativeElement).forEach(i=>i.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,i,r){const o=e.currentTarget,s=o.parentElement;switch(e.which){case 40:{o.tabIndex="-1";let a=x.index(s),l=s.parentElement.nextElementSibling;l?x.hasClass(l.children[a].children[0],"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(l.children[a].children[0].tabIndex="0",l.children[a].children[0].focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 38:{o.tabIndex="-1";let a=x.index(s),l=s.parentElement.previousElementSibling;if(l){let c=l.children[a].children[0];x.hasClass(c,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(c.tabIndex="0",c.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{o.tabIndex="-1";let a=s.previousElementSibling;if(a){let l=a.children[0];x.hasClass(l,"p-disabled")||x.hasClass(l.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,r):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!0,r);e.preventDefault();break}case 39:{o.tabIndex="-1";let a=s.nextElementSibling;if(a){let l=a.children[0];x.hasClass(l,"p-disabled")?this.navigateToMonth(!1,r):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!1,r);e.preventDefault();break}case 13:case 32:this.onDateSelect(e,i),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onMonthCellKeydown(e,i){const r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=x.index(r);let a=o[40===e.which?s+3:s-3];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:this.onMonthSelect(e,i),e.preventDefault();break;case 13:case 32:case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onYearCellKeydown(e,i){const r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=x.index(r);let a=o[40===e.which?s+2:s-2];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:this.onYearSelect(e,i),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.trapFocus(e)}}navigateToMonth(e,i){if(e)if(1===this.numberOfMonths||0===i)this.navigationState={backward:!0},this.navBackward(event);else{let o=x.find(this.contentViewChild.nativeElement.children[i-1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),s=o[o.length-1];s.tabIndex="0",s.focus()}else if(1===this.numberOfMonths||i===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let o=x.findSingle(this.contentViewChild.nativeElement.children[i+1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");o.tabIndex="0",o.focus()}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let i;i=x.find(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),i&&i.length>0&&(e=i[i.length-1])}else e=x.findSingle(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){let e;if("month"===this.currentView){let i=x.find(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),r=x.findSingle(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month.p-highlight");i.forEach(o=>o.tabIndex=-1),e=r||i[0],0===i.length&&x.find(this.contentViewChild.nativeElement,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if("year"===this.currentView){let i=x.find(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),r=x.findSingle(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year.p-highlight");i.forEach(o=>o.tabIndex=-1),e=r||i[0],0===i.length&&x.find(this.contentViewChild.nativeElement,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(e=x.findSingle(this.contentViewChild.nativeElement,"span.p-highlight"),!e){let i=x.findSingle(this.contentViewChild.nativeElement,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");e=i||x.findSingle(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}e&&(e.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{e.focus()},1),this.preventFocus=!1)}trapFocus(e){let i=x.getFocusableElements(this.contentViewChild.nativeElement);if(i&&i.length>0)if(i[0].ownerDocument.activeElement){let r=i.indexOf(i[0].ownerDocument.activeElement);if(e.shiftKey)if(-1==r||0===r)if(this.focusTrap)i[i.length-1].focus();else{if(-1===r)return this.hideOverlay();if(0===r)return}else i[r-1].focus();else if(-1==r||r===i.length-1){if(!this.focusTrap&&-1!=r)return this.hideOverlay();i[0].focus()}else i[r+1].focus()}else i[0].focus();e.preventDefault()}onMonthDropdownChange(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}validateTime(e,i,r,o){let s=this.value;const a=this.convertTo24Hour(e,o);this.isRangeSelection()&&(s=this.value[1]||this.value[0]),this.isMultipleSelection()&&(s=this.value[this.value.length-1]);const l=s?s.toDateString():null;return!(this.minDate&&l&&this.minDate.toDateString()===l&&(this.minDate.getHours()>a||this.minDate.getHours()===a&&(this.minDate.getMinutes()>i||this.minDate.getMinutes()===i&&this.minDate.getSeconds()>r))||this.maxDate&&l&&this.maxDate.toDateString()===l&&(this.maxDate.getHours()=24?r-24:r:"12"==this.hourFormat&&(this.currentHour<12&&r>11&&(o=!this.pm),r=r>=13?r-12:r),this.validateTime(r,this.currentMinute,this.currentSecond,o)&&(this.currentHour=r,this.pm=o),e.preventDefault()}onTimePickerElementMouseDown(e,i,r){this.disabled||(this.repeat(e,null,i,r),e.preventDefault())}onTimePickerElementMouseUp(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,i,r,o){let s=i||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,r,o),this.cd.markForCheck()},s),r){case 0:1===o?this.incrementHour(e):this.decrementHour(e);break;case 1:1===o?this.incrementMinute(e):this.decrementMinute(e);break;case 2:1===o?this.incrementSecond(e):this.decrementSecond(e)}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let i=this.currentHour-this.stepHour,r=this.pm;"24"==this.hourFormat?i=i<0?24+i:i:"12"==this.hourFormat&&(12===this.currentHour&&(r=!this.pm),i=i<=0?12+i:i),this.validateTime(i,this.currentMinute,this.currentSecond,r)&&(this.currentHour=i,this.pm=r),e.preventDefault()}incrementMinute(e){let i=this.currentMinute+this.stepMinute;i=i>59?i-60:i,this.validateTime(this.currentHour,i,this.currentSecond,this.pm)&&(this.currentMinute=i),e.preventDefault()}decrementMinute(e){let i=this.currentMinute-this.stepMinute;i=i<0?60+i:i,this.validateTime(this.currentHour,i,this.currentSecond,this.pm)&&(this.currentMinute=i),e.preventDefault()}incrementSecond(e){let i=this.currentSecond+this.stepSecond;i=i>59?i-60:i,this.validateTime(this.currentHour,this.currentMinute,i,this.pm)&&(this.currentSecond=i),e.preventDefault()}decrementSecond(e){let i=this.currentSecond-this.stepSecond;i=i<0?60+i:i,this.validateTime(this.currentHour,this.currentMinute,i,this.pm)&&(this.currentSecond=i),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,e.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(e=this.value[1]?[this.value[0],e]:[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){const i=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,i)&&(this.pm=i,this.updateTime()),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let i=e.target.value;try{let r=this.parseValueFromString(i);this.isValidSelection(r)&&(this.updateModel(r),this.updateUI())}catch(r){this.updateModel(this.keepInvalid?i:null)}this.filled=null!=i&&i.length,this.onInput.emit(e)}isValidSelection(e){let i=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(i=!1):e.every(r=>this.isSelectable(r.getDate(),r.getMonth(),r.getFullYear(),!1))&&this.isRangeSelection()&&(i=e.length>1&&e[1]>e[0]),i}parseValueFromString(e){if(!e||0===e.trim().length)return null;let i;if(this.isSingleSelection())i=this.parseDateTime(e);else if(this.isMultipleSelection()){let r=e.split(this.multipleSeparator);i=[];for(let o of r)i.push(this.parseDateTime(o.trim()))}else if(this.isRangeSelection()){let r=e.split(" "+this.rangeSeparator+" ");i=[];for(let o=0;o{this.disableModality()}),document.body.appendChild(this.mask),x.addClass(document.body,"p-overflow-hidden"))}disableModality(){this.mask&&(x.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener=this.destroyMask.bind(this),this.mask.addEventListener("animationend",this.animationEndListener))}destroyMask(){document.body.removeChild(this.mask);let i,e=document.body.children;for(let r=0;r{const d=r+1{let g=""+d;if(o(u))for(;g.lengtho(u)?g[d]:f[d];let l="",c=!1;if(e)for(r=0;r11&&12!=r&&(r-=12),i+="12"==this.hourFormat&&0===r?12:r<10?"0"+r:r,i+=":",i+=o<10?"0"+o:o,this.showSeconds&&(i+=":",i+=s<10?"0"+s:s),"12"==this.hourFormat&&(i+=e.getHours()>11?" PM":" AM"),i}parseTime(e){let i=e.split(":");if(i.length!==(this.showSeconds?3:2))throw"Invalid time";let o=parseInt(i[0]),s=parseInt(i[1]),a=this.showSeconds?parseInt(i[2]):null;if(isNaN(o)||isNaN(s)||o>23||s>59||"12"==this.hourFormat&&o>12||this.showSeconds&&(isNaN(a)||a>59))throw"Invalid time";return"12"==this.hourFormat&&(12!==o&&this.pm?o+=12:!this.pm&&12===o&&(o-=12)),{hour:o,minute:s,second:a}}parseDate(e,i){if(null==i||null==e)throw"Invalid arguments";if(""===(e="object"==typeof e?e.toString():e+""))return null;let r,o,s,y,a=0,l="string"!=typeof this.shortYearCutoff?this.shortYearCutoff:(new Date).getFullYear()%100+parseInt(this.shortYearCutoff,10),c=-1,u=-1,d=-1,f=-1,g=!1,C=A=>{let H=r+1{let H=C(A),oe="@"===A?14:"!"===A?20:"y"===A&&H?4:"o"===A?3:2,Jt=new RegExp("^\\d{"+("y"===A?oe:1)+","+oe+"}"),et=e.substring(a).match(Jt);if(!et)throw"Missing number at position "+a;return a+=et[0].length,parseInt(et[0],10)},I=(A,H,oe)=>{let Xe=-1,Jt=C(A)?oe:H,et=[];for(let Qt=0;Qt-(Qt[1].length-bi[1].length));for(let Qt=0;Qt{if(e.charAt(a)!==i.charAt(r))throw"Unexpected literal at position "+a;a++};for("month"===this.view&&(d=1),r=0;r-1)for(u=1,d=f;o=this.getDaysCountInMonth(c,u-1),!(d<=o);)u++,d-=o;if(y=this.daylightSavingAdjust(new Date(c,u-1,d)),y.getFullYear()!==c||y.getMonth()+1!==u||y.getDate()!==d)throw"Invalid date";return y}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}updateFilledState(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue}onTodayButtonClick(e){let i=new Date,r={day:i.getDate(),month:i.getMonth(),year:i.getFullYear(),otherMonth:i.getMonth()!==this.currentMonth||i.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(e,r),this.onTodayClick.emit(e)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.body.appendChild(this.responsiveStyleElement));let e="";if(this.responsiveOptions){let i=[...this.responsiveOptions].filter(r=>!(!r.breakpoint||!r.numMonths)).sort((r,o)=>-1*r.breakpoint.localeCompare(o.breakpoint,void 0,{numeric:!0}));for(let r=0;r{this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","mousedown",i=>{this.isOutsideClicked(i)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(i),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new hf(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return x.hasClass(e.target,"p-datepicker-prev")||x.hasClass(e.target,"p-datepicker-prev-icon")||x.hasClass(e.target,"p-datepicker-next")||x.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!x.isAndroid()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&ni.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(hn),b(dt),b(ye),b(Fc),b(ff))},t.\u0275cmp=Te({type:t,selectors:[["p-calendar"]],contentQueries:function(e,i,r){if(1&e&&Ue(r,Dr,4),2&e){let o;ie(o=re())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(it(F4,5),it(P4,5),it(L4,5)),2&e){let r;ie(r=re())&&(i.containerViewChild=r.first),ie(r=re())&&(i.inputfieldViewChild=r.first),ie(r=re())&&(i.content=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(e,i){2&e&&ke("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focus)},inputs:{style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",view:"view",defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[ge([EU])],ngContentSelectors:TU,decls:4,vars:11,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],["type","button","pButton","","pRipple","","class","p-datepicker-trigger","tabindex","0",3,"icon","disabled","click",4,"ngIf"],["type","button","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger",3,"icon","disabled","click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[1,"p-datepicker-next-icon","pi","pi-chevron-right"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],[1,"p-datepicker-prev-icon","pi","pi-chevron-left"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datepicker-calendar-container"],[1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],[3,"ngClass"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"pi","pi-chevron-up"],[1,"pi","pi-chevron-down"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(e,i){1&e&&(hl(DU),h(0,"span",0,1),w(2,B4,3,16,"ng-template",2),w(3,CU,9,28,"div",3),p()),2&e&&(Ve(i.styleClass),_("ngClass",ks(6,SU,i.showIcon,i.timeOnly,i.disabled,i.focus))("ngStyle",i.style),m(2),_("ngIf",!i.inline),m(1),_("ngIf",i.inline||i.overlayVisible))},directives:[zt,fi,je,ga,Pc,Et,Wt],styles:[".p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}\n"],encapsulation:2,data:{animation:[hD("overlayAnimation",[X3("visibleTouchUI",ji({transform:"translate(-50%,-50%)",opacity:1})),jo("void => visible",[ji({opacity:0,transform:"scaleY(0.8)"}),$o("{{showTransitionParams}}",ji({opacity:1,transform:"*"}))]),jo("visible => void",[$o("{{hideTransitionParams}}",ji({opacity:0}))]),jo("void => visibleTouchUI",[ji({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),$o("{{showTransitionParams}}")]),jo("visibleTouchUI => void",[$o("{{hideTransitionParams}}",ji({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0}),t})(),IU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,ma,$i,Ho],ma,$i]}),t})();const MU=["container"],NU=["resizeHelper"],kU=["reorderIndicatorUp"],RU=["reorderIndicatorDown"],OU=["wrapper"],AU=["table"],FU=["tableHeader"];function PU(t,n){if(1&t&&(h(0,"div",14),U(1,"i"),p()),2&t){const e=v();m(1),Ve("p-datatable-loading-icon pi-spin "+e.loadingIcon)}}function LU(t,n){1&t&&$(0)}function VU(t,n){if(1&t&&(h(0,"div",15),w(1,LU,1,0,"ng-container",16),p()),2&t){const e=v();m(1),_("ngTemplateOutlet",e.captionTemplate)}}function BU(t,n){if(1&t){const e=G();h(0,"p-paginator",17),N("onPageChange",function(r){return T(e),v().onPageChange(r)}),p()}if(2&t){const e=v();_("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)}}function HU(t,n){1&t&&$(0)}function UU(t,n){1&t&&$(0)}function $U(t,n){if(1&t&&U(0,"tbody",25),2&t){const e=v(2);_("value",e.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",e.frozenBodyTemplate)("frozen",!0)}}function jU(t,n){1&t&&$(0)}const Gi=function(t){return{$implicit:t}};function GU(t,n){if(1&t&&(h(0,"tfoot",26),w(1,jU,1,0,"ng-container",20),p()),2&t){const e=v(2);m(1),_("ngTemplateOutlet",e.footerGroupedTemplate||e.footerTemplate)("ngTemplateOutletContext",j(2,Gi,e.columns))}}function zU(t,n){if(1&t&&(h(0,"table",18,19),w(2,HU,1,0,"ng-container",20),h(3,"thead",21),w(4,UU,1,0,"ng-container",20),p(),w(5,$U,1,5,"tbody",22),U(6,"tbody",23),w(7,GU,2,4,"tfoot",24),p()),2&t){const e=v();_("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),ne("id",e.id+"-table"),m(2),_("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",j(12,Gi,e.columns)),m(2),_("ngTemplateOutlet",e.headerGroupedTemplate||e.headerTemplate)("ngTemplateOutletContext",j(14,Gi,e.columns)),m(1),_("ngIf",e.frozenValue||e.frozenBodyTemplate),m(1),_("value",e.dataToRender)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate),m(1),_("ngIf",e.footerGroupedTemplate||e.footerTemplate)}}function WU(t,n){1&t&&$(0)}function qU(t,n){1&t&&$(0)}function KU(t,n){if(1&t&&U(0,"tbody",25),2&t){const e=v(2);_("value",e.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate)("frozen",!0)}}function YU(t,n){1&t&&$(0)}function ZU(t,n){if(1&t&&(h(0,"tfoot",26),w(1,YU,1,0,"ng-container",20),p()),2&t){const e=v(2);m(1),_("ngTemplateOutlet",e.footerGroupedTemplate||e.footerTemplate)("ngTemplateOutletContext",j(2,Gi,e.columns))}}function JU(t,n){if(1&t){const e=G();h(0,"cdk-virtual-scroll-viewport",27),N("scrolledIndexChange",function(r){return T(e),v().onScrollIndexChange(r)}),h(1,"table",18,19),w(3,WU,1,0,"ng-container",20),h(4,"thead",21,28),w(6,qU,1,0,"ng-container",20),p(),w(7,KU,1,5,"tbody",22),U(8,"tbody",23),w(9,ZU,2,4,"tfoot",24),p(),p()}if(2&t){const e=v();nr("height","flex"!==e.scrollHeight?e.scrollHeight:void 0),_("itemSize",e.virtualRowHeight)("minBufferPx",e.minBufferPx)("maxBufferPx",e.maxBufferPx),m(1),_("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),ne("id",e.id+"-table"),m(2),_("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",j(17,Gi,e.columns)),m(3),_("ngTemplateOutlet",e.headerGroupedTemplate||e.headerTemplate)("ngTemplateOutletContext",j(19,Gi,e.columns)),m(1),_("ngIf",e.frozenValue||e.frozenBodyTemplate),m(1),_("value",e.dataToRender)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate),m(1),_("ngIf",e.footerGroupedTemplate||e.footerTemplate)}}function QU(t,n){if(1&t){const e=G();h(0,"p-paginator",29),N("onPageChange",function(r){return T(e),v().onPageChange(r)}),p()}if(2&t){const e=v();_("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)}}function XU(t,n){1&t&&$(0)}function e$(t,n){if(1&t&&(h(0,"div",30),w(1,XU,1,0,"ng-container",16),p()),2&t){const e=v();m(1),_("ngTemplateOutlet",e.summaryTemplate)}}function t$(t,n){1&t&&U(0,"div",31,32)}function n$(t,n){1&t&&U(0,"span",33,34)}function i$(t,n){1&t&&U(0,"span",35,36)}const r$=function(t,n,e,i,r,o,s,a,l,c,u,d,f,g){return{"p-datatable p-component":!0,"p-datatable-hoverable-rows":t,"p-datatable-auto-layout":n,"p-datatable-resizable":e,"p-datatable-resizable-fit":i,"p-datatable-scrollable":r,"p-datatable-scrollable-vertical":o,"p-datatable-scrollable-horizontal":s,"p-datatable-scrollable-both":a,"p-datatable-flex-scrollable":l,"p-datatable-responsive-stack":c,"p-datatable-responsive-scroll":u,"p-datatable-responsive":d,"p-datatable-grouped-header":f,"p-datatable-grouped-footer":g}},o$=function(t){return{height:t}},s$=["pTableBody",""];function a$(t,n){1&t&&$(0)}const Wc=function(t,n,e,i,r){return{$implicit:t,rowIndex:n,columns:e,editing:i,frozen:r}};function l$(t,n){if(1&t&&(Q(0,3),w(1,a$,1,0,"ng-container",4),X()),2&t){const e=v(),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.dt.groupHeaderTemplate)("ngTemplateOutletContext",Rs(2,Wc,i,o.dt.paginator?o.dt.first+r:r,o.columns,"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function c$(t,n){1&t&&$(0)}function u$(t,n){if(1&t&&(Q(0),w(1,c$,1,0,"ng-container",4),X()),2&t){const e=v(),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",Rs(2,Wc,i,o.dt.paginator?o.dt.first+r:r,o.columns,"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function d$(t,n){1&t&&$(0)}const h$=function(t,n,e,i,r,o,s){return{$implicit:t,rowIndex:n,columns:e,editing:i,frozen:r,rowgroup:o,rowspan:s}};function p$(t,n){if(1&t&&(Q(0),w(1,d$,1,0,"ng-container",4),X()),2&t){const e=v(),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",function(t,n,e,i,r,o,s,a,l,c){const u=Ht()+t,d=M();let f=yn(d,u,e,i,r,o);return ul(d,u+4,s,a,l)||f?Kn(d,u+7,c?n.call(c,e,i,r,o,s,a,l):n(e,i,r,o,s,a,l)):ys(d,u+7)}(2,h$,i,o.dt.paginator?o.dt.first+r:r,o.columns,"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen,o.shouldRenderRowspan(o.value,i,r),o.calculateRowGroupSize(o.value,i,r)))}}function f$(t,n){1&t&&$(0)}function g$(t,n){if(1&t&&(Q(0,3),w(1,f$,1,0,"ng-container",4),X()),2&t){const e=v(),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.dt.groupFooterTemplate)("ngTemplateOutletContext",Rs(2,Wc,i,o.dt.paginator?o.dt.first+r:r,o.columns,"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function m$(t,n){if(1&t&&(w(0,l$,2,8,"ng-container",2),w(1,u$,2,8,"ng-container",0),w(2,p$,2,10,"ng-container",0),w(3,g$,2,8,"ng-container",2)),2&t){const e=n.$implicit,i=n.index,r=v(2);_("ngIf",r.dt.groupHeaderTemplate&&"subheader"===r.dt.rowGroupMode&&r.shouldRenderRowGroupHeader(r.value,e,i)),m(1),_("ngIf","rowspan"!==r.dt.rowGroupMode),m(1),_("ngIf","rowspan"===r.dt.rowGroupMode),m(1),_("ngIf",r.dt.groupFooterTemplate&&"subheader"===r.dt.rowGroupMode&&r.shouldRenderRowGroupFooter(r.value,e,i))}}function _$(t,n){if(1&t&&(Q(0),w(1,m$,4,4,"ng-template",1),X()),2&t){const e=v();m(1),_("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function v$(t,n){1&t&&$(0)}function b$(t,n){if(1&t&&w(0,v$,1,0,"ng-container",4),2&t){const e=n.$implicit,i=n.index,r=v(2);_("ngTemplateOutlet",e?r.template:r.dt.loadingBodyTemplate)("ngTemplateOutletContext",Rs(2,Wc,e,r.dt.paginator?r.dt.first+i:i,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(e),r.frozen))}}function y$(t,n){if(1&t&&(Q(0),w(1,b$,1,8,"ng-template",5),X()),2&t){const e=v();m(1),_("cdkVirtualForOf",e.dt.filteredValue||e.dt.value)("cdkVirtualForTrackBy",e.dt.rowTrackBy)("cdkVirtualForTemplateCacheSize",0)}}function w$(t,n){1&t&&$(0)}const qc=function(t,n,e,i,r,o){return{$implicit:t,rowIndex:n,columns:e,expanded:i,editing:r,frozen:o}};function C$(t,n){if(1&t&&(Q(0),w(1,w$,1,0,"ng-container",4),X()),2&t){const e=v(),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",go(2,qc,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.dt.isRowExpanded(i),"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function D$(t,n){1&t&&$(0)}function S$(t,n){if(1&t&&(Q(0,3),w(1,D$,1,0,"ng-container",4),X()),2&t){const e=v(),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.dt.groupHeaderTemplate)("ngTemplateOutletContext",go(2,qc,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.dt.isRowExpanded(i),"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}function T$(t,n){1&t&&$(0)}function E$(t,n){1&t&&$(0)}function x$(t,n){if(1&t&&(Q(0,3),w(1,E$,1,0,"ng-container",4),X()),2&t){const e=v(2),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.dt.groupFooterTemplate)("ngTemplateOutletContext",go(2,qc,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.dt.isRowExpanded(i),"row"===o.dt.editMode&&o.dt.isRowEditing(i),o.frozen))}}const SD=function(t,n,e,i){return{$implicit:t,rowIndex:n,columns:e,frozen:i}};function I$(t,n){if(1&t&&(Q(0),w(1,T$,1,0,"ng-container",4),w(2,x$,2,9,"ng-container",2),X()),2&t){const e=v(),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.dt.expandedRowTemplate)("ngTemplateOutletContext",ks(3,SD,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.frozen)),m(1),_("ngIf",o.dt.groupFooterTemplate&&"subheader"===o.dt.rowGroupMode&&o.shouldRenderRowGroupFooter(o.value,i,r))}}function M$(t,n){if(1&t&&(w(0,C$,2,9,"ng-container",0),w(1,S$,2,9,"ng-container",2),w(2,I$,3,8,"ng-container",0)),2&t){const e=n.$implicit,i=n.index,r=v(2);_("ngIf",!r.dt.groupHeaderTemplate),m(1),_("ngIf",r.dt.groupHeaderTemplate&&"subheader"===r.dt.rowGroupMode&&r.shouldRenderRowGroupHeader(r.value,e,i)),m(1),_("ngIf",r.dt.isRowExpanded(e))}}function N$(t,n){if(1&t&&(Q(0),w(1,M$,3,3,"ng-template",1),X()),2&t){const e=v();m(1),_("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function k$(t,n){1&t&&$(0)}function R$(t,n){1&t&&$(0)}function O$(t,n){if(1&t&&(Q(0),w(1,R$,1,0,"ng-container",4),X()),2&t){const e=v(),i=e.$implicit,r=e.index,o=v(2);m(1),_("ngTemplateOutlet",o.dt.frozenExpandedRowTemplate)("ngTemplateOutletContext",ks(2,SD,i,o.dt.paginator?o.dt.first+r:r,o.columns,o.frozen))}}function A$(t,n){if(1&t&&(w(0,k$,1,0,"ng-container",4),w(1,O$,2,7,"ng-container",0)),2&t){const e=n.$implicit,i=n.index,r=v(2);_("ngTemplateOutlet",r.template)("ngTemplateOutletContext",go(3,qc,e,r.dt.paginator?r.dt.first+i:i,r.columns,r.dt.isRowExpanded(e),"row"===r.dt.editMode&&r.dt.isRowEditing(e),r.frozen)),m(1),_("ngIf",r.dt.isRowExpanded(e))}}function F$(t,n){if(1&t&&(Q(0),w(1,A$,2,10,"ng-template",1),X()),2&t){const e=v();m(1),_("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function P$(t,n){1&t&&$(0)}const TD=function(t,n){return{$implicit:t,frozen:n}};function L$(t,n){if(1&t&&(Q(0),w(1,P$,1,0,"ng-container",4),X()),2&t){const e=v();m(1),_("ngTemplateOutlet",e.dt.loadingBodyTemplate)("ngTemplateOutletContext",Ee(2,TD,e.columns,e.frozen))}}function V$(t,n){1&t&&$(0)}function B$(t,n){if(1&t&&(Q(0),w(1,V$,1,0,"ng-container",4),X()),2&t){const e=v();m(1),_("ngTemplateOutlet",e.dt.emptyMessageTemplate)("ngTemplateOutletContext",Ee(2,TD,e.columns,e.frozen))}}let kf=(()=>{class t{constructor(){this.sortSource=new le,this.selectionSource=new le,this.contextMenuSource=new le,this.valueSource=new le,this.totalRecordsSource=new le,this.columnsSource=new le,this.resetSource=new le,this.sortSource$=this.sortSource.asObservable(),this.selectionSource$=this.selectionSource.asObservable(),this.contextMenuSource$=this.contextMenuSource.asObservable(),this.valueSource$=this.valueSource.asObservable(),this.totalRecordsSource$=this.totalRecordsSource.asObservable(),this.columnsSource$=this.columnsSource.asObservable(),this.resetSource$=this.resetSource.asObservable()}onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onResetChange(){this.resetSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onValueChange(e){this.valueSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}onColumnsChange(e){this.columnsSource.next(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Kc=(()=>{class t{constructor(e,i,r,o,s,a){this.el=e,this.zone=i,this.tableService=r,this.cd=o,this.filterService=s,this.overlayService=a,this.pageLinks=5,this.alwaysShowPaginator=!0,this.paginatorPosition="bottom",this.paginatorDropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.showPageLinks=!0,this.defaultSortOrder=1,this.sortMode="single",this.resetPageOnSort=!0,this.selectAllChange=new k,this.selectionChange=new k,this.contextMenuSelectionChange=new k,this.contextMenuSelectionMode="separate",this.rowTrackBy=(l,c)=>c,this.lazy=!1,this.lazyLoadOnInit=!0,this.compareSelectionBy="deepEquals",this.csvSeparator=",",this.exportFilename="download",this.filters={},this.filterDelay=300,this.expandedRowKeys={},this.editingRowKeys={},this.rowExpandMode="multiple",this.scrollDirection="vertical",this.virtualScrollDelay=250,this.virtualRowHeight=28,this.columnResizeMode="fit",this.loadingIcon="pi pi-spinner",this.showLoader=!0,this.showInitialSortBadge=!0,this.stateStorage="session",this.editMode="cell",this.groupRowsByOrder=1,this.responsiveLayout="stack",this.breakpoint="960px",this.onRowSelect=new k,this.onRowUnselect=new k,this.onPage=new k,this.onSort=new k,this.onFilter=new k,this.onLazyLoad=new k,this.onRowExpand=new k,this.onRowCollapse=new k,this.onContextMenuSelect=new k,this.onColResize=new k,this.onColReorder=new k,this.onRowReorder=new k,this.onEditInit=new k,this.onEditComplete=new k,this.onEditCancel=new k,this.onHeaderCheckboxToggle=new k,this.sortFunction=new k,this.firstChange=new k,this.rowsChange=new k,this.onStateSave=new k,this.onStateRestore=new k,this._value=[],this._totalRecords=0,this._first=0,this.selectionKeys={},this._sortOrder=1,this._selectAll=null,this.columnResizing=!1,this.rowGroupHeaderStyleObject={},this.id=pf()}ngOnInit(){this.lazy&&this.lazyLoadOnInit&&(this.virtualScroll||this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.restoringFilter&&(this.restoringFilter=!1)),"stack"===this.responsiveLayout&&!this.scrollable&&this.createResponsiveStyle(),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"headergrouped":this.headerGroupedTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"loadingbody":this.loadingBodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"footergrouped":this.footerGroupedTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"rowexpansion":this.expandedRowTemplate=e.template;break;case"groupheader":this.groupHeaderTemplate=e.template;break;case"rowspan":this.rowspanTemplate=e.template;break;case"groupfooter":this.groupFooterTemplate=e.template;break;case"frozenrows":this.frozenRowsTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"frozenrowexpansion":this.frozenExpandedRowTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template}})}ngAfterViewInit(){this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths(),this.scrollable&&this.virtualScroll&&(this.virtualScrollSubscription=this.virtualScrollBody.renderedRangeStream.subscribe(e=>{this.tableHeaderViewChild.nativeElement.style.top=e.start*this.virtualRowHeight*-1+"px"}))}ngOnChanges(e){e.value&&(this.isStateful()&&!this.stateRestored&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,"single"==this.sortMode&&(this.sortField||this.groupRowsBy)?this.sortSingle():"multiple"==this.sortMode&&(this.multiSortMeta||this.groupRowsBy)?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&this.restoreColumnOrder()),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle()),e.groupRowsBy&&(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle(),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle()),e.groupRowsByOrder&&(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle(),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,"multiple"===this.sortMode&&(this.initialized||!this.lazy&&!this.virtualScroll)&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1),e.selectAll&&(this._selectAll=e.selectAll.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()),this.preventSelectionSetterPropagation=!1)}get value(){return this._value}set value(e){this._value=e}get columns(){return this._columns}set columns(e){this._columns=e}get first(){return this._first}set first(e){this._first=e}get rows(){return this._rows}set rows(e){this._rows=e}get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get selectAll(){return this._selection}set selectAll(e){this._selection=e}get dataToRender(){let e=this.filteredValue||this.value;return e?this.paginator&&!this.lazy?e.slice(this.first,this.first+this.rows):e:[]}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(B.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(B.resolveFieldData(this._selection,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.onPage.emit({first:this.first,rows:this.rows}),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()}sort(e){let i=e.originalEvent;if("single"===this.sortMode&&(this._sortOrder=this.sortField===e.field?-1*this.sortOrder:this.defaultSortOrder,this._sortField=e.field,this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop()),this.sortSingle()),"multiple"===this.sortMode){let r=i.metaKey||i.ctrlKey,o=this.getSortMeta(e.field);o?r?o.order=-1*o.order:(this._multiSortMeta=[{field:e.field,order:-1*o.order}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!r||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null}sortSingle(){let e=this.sortField||this.groupRowsBy,i=this.sortField?this.sortOrder:this.groupRowsByOrder;if(this.groupRowsBy&&this.sortField&&this.groupRowsBy!==this.sortField)return this._multiSortMeta=[this.getGroupRowsMeta(),{field:this.sortField,order:this.sortOrder}],void this.sortMultiple();if(e&&i){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:e,order:i}):(this.value.sort((o,s)=>{let a=B.resolveFieldData(o,e),l=B.resolveFieldData(s,e),c=null;return c=null==a&&null!=l?-1:null!=a&&null==l?1:null==a&&null==l?0:"string"==typeof a&&"string"==typeof l?a.localeCompare(l):al?1:0,i*c}),this._value=[...this.value]),this.hasFilter()&&this._filter());let r={field:e,order:i};this.onSort.emit(r),this.tableService.onSort(r)}}sortMultiple(){this.groupRowsBy&&(this._multiSortMeta?this.multiSortMeta[0].field!==this.groupRowsBy&&(this._multiSortMeta=[this.getGroupRowsMeta(),...this._multiSortMeta]):this._multiSortMeta=[this.getGroupRowsMeta()]),this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((e,i)=>this.multisortField(e,i,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,i,r,o){let s=B.resolveFieldData(e,r[o].field),a=B.resolveFieldData(i,r[o].field),l=null;if(null==s&&null!=a)l=-1;else if(null!=s&&null==a)l=1;else if(null==s&&null==a)l=0;else if("string"==typeof s||s instanceof String){if(s.localeCompare&&s!=a)return r[o].order*s.localeCompare(a)}else l=so?this.multisortField(e,i,r,o+1):0:r[o].order*l}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length)for(let i=0;iy!=f),this.selectionChange.emit(this.selection),u&&delete this.selectionKeys[u]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row"})}else this.isSingleSelectionMode()?(this._selection=s,this.selectionChange.emit(s),u&&(this.selectionKeys={},this.selectionKeys[u]=1)):this.isMultipleSelectionMode()&&(d?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,s],this.selectionChange.emit(this.selection),u&&(this.selectionKeys[u]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a})}else if("single"===this.selectionMode)l?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a})):(this._selection=s,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a}),u&&(this.selectionKeys={},this.selectionKeys[u]=1));else if("multiple"===this.selectionMode)if(l){let d=this.findIndexInSelection(s);this._selection=this.selection.filter((f,g)=>g!=d),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a}),u&&delete this.selectionKeys[u]}else this._selection=this.selection?[...this.selection,s]:[s],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:s,type:"row",index:a}),u&&(this.selectionKeys[u]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){const i=e.rowData,r=e.rowIndex;if("separate"===this.contextMenuSelectionMode)this.contextMenuSelection=i,this.contextMenuSelectionChange.emit(i),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:i,index:e.rowIndex}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(i);else if("joint"===this.contextMenuSelectionMode){this.preventSelectionSetterPropagation=!0;let o=this.isSelected(i),s=this.dataKey?String(B.resolveFieldData(i,this.dataKey)):null;if(!o){if(!this.isRowSelectable(i,r))return;this.isSingleSelectionMode()?(this.selection=i,this.selectionChange.emit(i),s&&(this.selectionKeys={},this.selectionKeys[s]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,i]:[i],this.selectionChange.emit(this.selection),s&&(this.selectionKeys[s]=1))}this.tableService.onSelectionChange(),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e,data:i,index:e.rowIndex})}}}selectRange(e,i){let r,o;this.anchorRowIndex>i?(r=i,o=this.anchorRowIndex):this.anchorRowIndexthis.anchorRowIndex?(i=this.anchorRowIndex,r=this.rangeRowIndex):this.rangeRowIndexu!=a);let l=this.dataKey?String(B.resolveFieldData(s,this.dataKey)):null;l&&delete this.selectionKeys[l],this.onRowUnselect.emit({originalEvent:e,data:s,type:"row"})}}isSelected(e){return!(!e||!this.selection)&&(this.dataKey?void 0!==this.selectionKeys[B.resolveFieldData(e,this.dataKey)]:this.selection instanceof Array?this.findIndexInSelection(e)>-1:this.equals(e,this.selection))}findIndexInSelection(e){let i=-1;if(this.selection&&this.selection.length)for(let r=0;rl!=s),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:i,type:"checkbox"}),o&&delete this.selectionKeys[o]}else{if(!this.isRowSelectable(i,e.rowIndex))return;this._selection=this.selection?[...this.selection,i]:[i],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:i,type:"checkbox"}),o&&(this.selectionKeys[o]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox(e,i){if(null!==this._selectAll)this.selectAllChange.emit({originalEvent:e,checked:i});else{const r=this.selectionPageOnly?this.dataToRender:this.filteredValue||this.value||[];let o=this.selectionPageOnly&&this._selection?this._selection.filter(s=>!r.some(a=>this.equals(s,a))):[];i&&(o=this.frozenValue?[...o,...this.frozenValue,...r]:[...o,...r],o=this.rowSelectable?o.filter((s,a)=>this.rowSelectable({data:s,index:a})):o),this._selection=o,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:i}),this.isStateful()&&this.saveState()}}equals(e,i){return"equals"===this.compareSelectionBy?e===i:B.equals(e,i,this.dataKey)}filter(e,i,r){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[i]&&delete this.filters[i]:this.filters[i]={value:e,matchMode:r},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,i){this.filter(e,"global",i)}isFilterBlank(e){return null==e||"string"==typeof e&&0==e.trim().length||e instanceof Array&&0==e.length}_filter(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(this.hasFilter()){let e;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(let i=0;i{r+="\n";for(let u=0;u{let i=Math.floor(e/this.rows),r=0===i?0:(i-1)*this.rows,o=0===i?2*this.rows:3*this.rows;i!==this.virtualPage&&(this.virtualPage=i,this.onLazyLoad.emit({first:r,rows:o,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta}))},this.virtualScrollDelay))}scrollTo(e){this.virtualScrollBody?this.virtualScrollBody.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}updateEditingCell(e,i,r,o){this.editingCell=e,this.editingCellData=i,this.editingCellField=r,this.editingCellRowIndex=o,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&0===x.find(this.editingCell,".ng-invalid.ng-dirty").length}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=e=>{this.editingCell&&!this.selfClick&&this.isEditingCellValid()&&(x.removeClass(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData,originalEvent:e,index:this.editingCellRowIndex}),this.editingCellField=null,this.editingCellData=null,this.editingCellRowIndex=null,this.unbindDocumentEditListener(),this.cd.markForCheck(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()),this.selfClick=!1},document.addEventListener("click",this.documentEditListener))}unbindDocumentEditListener(){this.documentEditListener&&(document.removeEventListener("click",this.documentEditListener),this.documentEditListener=null)}initRowEdit(e){let i=String(B.resolveFieldData(e,this.dataKey));this.editingRowKeys[i]=!0}saveRowEdit(e,i){if(0===x.find(i,".ng-invalid.ng-dirty").length){let r=String(B.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[r]}}cancelRowEdit(e){let i=String(B.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[i]}toggleRow(e,i){if(!this.dataKey)throw new Error("dataKey must be defined to use row expansion");let r=String(B.resolveFieldData(e,this.dataKey));null!=this.expandedRowKeys[r]?(delete this.expandedRowKeys[r],this.onRowCollapse.emit({originalEvent:i,data:e})):("single"===this.rowExpandMode&&(this.expandedRowKeys={}),this.expandedRowKeys[r]=!0,this.onRowExpand.emit({originalEvent:i,data:e})),i&&i.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return!0===this.expandedRowKeys[String(B.resolveFieldData(e,this.dataKey))]}isRowEditing(e){return!0===this.editingRowKeys[String(B.resolveFieldData(e,this.dataKey))]}isSingleSelectionMode(){return"single"===this.selectionMode}isMultipleSelectionMode(){return"multiple"===this.selectionMode}onColumnResizeBegin(e){let i=x.getOffset(this.containerViewChild.nativeElement).left;this.resizeColumnElement=e.target.parentElement,this.columnResizing=!0,this.lastResizerHelperX=e.pageX-i+this.containerViewChild.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let i=x.getOffset(this.containerViewChild.nativeElement).left;x.addClass(this.containerViewChild.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-i+this.containerViewChild.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,r=this.resizeColumnElement.offsetWidth+e;if(r>=(this.resizeColumnElement.style.minWidth||15)){if("fit"===this.columnResizeMode){let a=this.resizeColumnElement.nextElementSibling.offsetWidth-e;r>15&&a>15&&this.resizeTableCells(r,a)}else if("expand"===this.columnResizeMode){let s=this.tableViewChild.nativeElement.offsetWidth+e;this.tableViewChild.nativeElement.style.width=s+"px",this.tableViewChild.nativeElement.style.minWidth=s+"px",this.resizeTableCells(r,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:e}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",x.removeClass(this.containerViewChild.nativeElement,"p-unselectable-text")}resizeTableCells(e,i){let r=x.index(this.resizeColumnElement),o=[];const s=x.findSingle(this.containerViewChild.nativeElement,".p-datatable-thead");x.find(s,"tr > th").forEach(c=>o.push(x.getOuterWidth(c))),this.destroyStyleElement(),this.createStyleElement();let l="";o.forEach((c,u)=>{let d=u===r?e:i&&u===r+1?i:c;l+=`\n #${this.id} .p-datatable-thead > tr > th:nth-child(${u+1}),\n #${this.id} .p-datatable-tbody > tr > td:nth-child(${u+1}),\n #${this.id} .p-datatable-tfoot > tr > td:nth-child(${u+1}) {\n ${this.scrollable?`flex: 1 1 ${d}px !important`:`width: ${d}px !important`}\n }\n `}),this.styleElement.innerHTML=l}onColumnDragStart(e,i){this.reorderIconWidth=x.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild.nativeElement),this.reorderIconHeight=x.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild.nativeElement),this.draggedColumn=i,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,i){if(this.reorderableColumns&&this.draggedColumn&&i){e.preventDefault();let r=x.getOffset(this.containerViewChild.nativeElement),o=x.getOffset(i);if(this.draggedColumn!=i){let s=x.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),a=x.indexWithinGroup(i,"preorderablecolumn"),l=o.left-r.left,u=o.left+i.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=o.top-r.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=o.top-r.top+i.offsetHeight+"px",e.pageX>u?(this.reorderIndicatorUpViewChild.nativeElement.style.left=l+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=l+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=l-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=l-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),a-s==1&&-1===this.dropPosition||a-s==-1&&1===this.dropPosition?(this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none"):(this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block")}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,i){if(e.preventDefault(),this.draggedColumn){let r=x.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),o=x.indexWithinGroup(i,"preorderablecolumn"),s=r!=o;s&&(o-r==1&&-1===this.dropPosition||r-o==1&&1===this.dropPosition)&&(s=!1),s&&or&&-1===this.dropPosition&&(o-=1),s&&(B.reorderArray(this.columns,r,o),this.onColReorder.emit({dragIndex:r,dropIndex:o,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}onRowDragStart(e,i){this.rowDragging=!0,this.draggedRowIndex=i,e.dataTransfer.setData("text","b")}onRowDragOver(e,i,r){if(this.rowDragging&&this.draggedRowIndex!==i){let o=x.getOffset(r).top+x.getWindowScrollTop(),s=e.pageY,a=o+x.getOuterHeight(r)/2,l=r.previousElementSibling;sthis.droppedRowIndex?this.droppedRowIndex:0===this.droppedRowIndex?0:this.droppedRowIndex-1;B.reorderArray(this.value,this.draggedRowIndex,r),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:r})}this.onRowDragLeave(e,i),this.onRowDragEnd(e)}isEmpty(){let e=this.filteredValue||this.value;return null==e||0==e.length}getBlockableElement(){return this.el.nativeElement.children[0]}getStorage(){switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}}isStateful(){return null!=this.stateKey}saveState(){const e=this.getStorage();let i={};this.paginator&&(i.first=this.first,i.rows=this.rows),this.sortField&&(i.sortField=this.sortField,i.sortOrder=this.sortOrder),this.multiSortMeta&&(i.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(i.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(i),this.reorderableColumns&&this.saveColumnOrder(i),this.selection&&(i.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(i.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(i)),this.onStateSave.emit(i)}clearState(){const e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){const i=this.getStorage().getItem(this.stateKey),r=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;if(i){let s=JSON.parse(i,function(s,a){return"string"==typeof a&&r.test(a)?new Date(a):a});this.paginator&&(void 0!==this.first&&(this.first=s.first,this.firstChange.emit(this.first)),void 0!==this.rows&&(this.rows=s.rows,this.rowsChange.emit(this.rows))),s.sortField&&(this.restoringSort=!0,this._sortField=s.sortField,this._sortOrder=s.sortOrder),s.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=s.multiSortMeta),s.filters&&(this.restoringFilter=!0,this.filters=s.filters),this.resizableColumns&&(this.columnWidthsState=s.columnWidths,this.tableWidthState=s.tableWidth),s.expandedRowKeys&&(this.expandedRowKeys=s.expandedRowKeys),s.selection&&Promise.resolve(null).then(()=>this.selectionChange.emit(s.selection)),this.stateRestored=!0,this.onStateRestore.emit(s)}}saveColumnWidths(e){let i=[];x.find(this.containerViewChild.nativeElement,".p-datatable-thead > tr > th").forEach(o=>i.push(x.getOuterWidth(o))),e.columnWidths=i.join(","),"expand"===this.columnResizeMode&&(e.tableWidth=x.getOuterWidth(this.tableViewChild.nativeElement)+"px")}restoreColumnWidths(){if(this.columnWidthsState){let e=this.columnWidthsState.split(",");if("expand"===this.columnResizeMode&&this.tableWidthState&&(this.tableViewChild.nativeElement.style.width=this.tableWidthState,this.tableViewChild.nativeElement.style.minWidth=this.tableWidthState,this.containerViewChild.nativeElement.style.width=this.tableWidthState),B.isNotEmpty(e)){this.createStyleElement();let i="";e.forEach((r,o)=>{i+=`\n #${this.id} .p-datatable-thead > tr > th:nth-child(${o+1}),\n #${this.id} .p-datatable-tbody > tr > td:nth-child(${o+1}),\n #${this.id} .p-datatable-tfoot > tr > td:nth-child(${o+1}) {\n ${this.scrollable?`flex: 1 1 ${r}px !important`:`width: ${r}px !important`}\n }\n `}),this.styleElement.innerHTML=i}}}saveColumnOrder(e){if(this.columns){let i=[];this.columns.map(r=>{i.push(r.field||r.key)}),e.columnOrder=i}}restoreColumnOrder(){const i=this.getStorage().getItem(this.stateKey);if(i){let o=JSON.parse(i).columnOrder;if(o){let s=[];o.map(a=>{let l=this.findColumnByKey(a);l&&s.push(l)}),this.columnOrderStateRestored=!0,this.columns=s}}}findColumnByKey(e){if(!this.columns)return null;for(let i of this.columns)if(i.key===e||i.field===e)return i}createStyleElement(){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.head.appendChild(this.responsiveStyleElement),this.responsiveStyleElement.innerHTML=`\n@media screen and (max-width: ${this.breakpoint}) {\n #${this.id} .p-datatable-thead > tr > th,\n #${this.id} .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n #${this.id} .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n #${this.id} .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n #${this.id}.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n #${this.id} .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n`)}destroyResponsiveStyle(){this.responsiveStyleElement&&(document.head.removeChild(this.responsiveStyleElement),this.responsiveStyleElement=null)}destroyStyleElement(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null,this.virtualScrollSubscription&&this.virtualScrollSubscription.unsubscribe(),this.destroyStyleElement(),this.destroyResponsiveStyle()}}return t.\u0275fac=function(e){return new(e||t)(b(me),b(ye),b(kf),b(dt),b(GC),b(ff))},t.\u0275cmp=Te({type:t,selectors:[["p-table"]],contentQueries:function(e,i,r){if(1&e&&Ue(r,Dr,4),2&e){let o;ie(o=re())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(it(MU,5),it(NU,5),it(kU,5),it(RU,5),it(OU,5),it(AU,5),it(FU,5),it(ya,5)),2&e){let r;ie(r=re())&&(i.containerViewChild=r.first),ie(r=re())&&(i.resizeHelperViewChild=r.first),ie(r=re())&&(i.reorderIndicatorUpViewChild=r.first),ie(r=re())&&(i.reorderIndicatorDownViewChild=r.first),ie(r=re())&&(i.wrapperViewChild=r.first),ie(r=re())&&(i.tableViewChild=r.first),ie(r=re())&&(i.tableHeaderViewChild=r.first),ie(r=re())&&(i.virtualScrollBody=r.first)}},hostAttrs:[1,"p-element"],inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",style:"style",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:"paginator",pageLinks:"pageLinks",rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:"alwaysShowPaginator",paginatorPosition:"paginatorPosition",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showJumpToPageDropdown:"showJumpToPageDropdown",showJumpToPageInput:"showJumpToPageInput",showFirstLastIcon:"showFirstLastIcon",showPageLinks:"showPageLinks",defaultSortOrder:"defaultSortOrder",sortMode:"sortMode",resetPageOnSort:"resetPageOnSort",selectionMode:"selectionMode",selectionPageOnly:"selectionPageOnly",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:"metaKeySelection",rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:"lazy",lazyLoadOnInit:"lazyLoadOnInit",compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:"filterDelay",filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:"scrollable",scrollDirection:"scrollDirection",rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:"virtualScroll",virtualScrollDelay:"virtualScrollDelay",virtualRowHeight:"virtualRowHeight",frozenWidth:"frozenWidth",responsive:"responsive",contextMenu:"contextMenu",resizableColumns:"resizableColumns",columnResizeMode:"columnResizeMode",reorderableColumns:"reorderableColumns",loading:"loading",loadingIcon:"loadingIcon",showLoader:"showLoader",rowHover:"rowHover",customSort:"customSort",showInitialSortBadge:"showInitialSortBadge",autoLayout:"autoLayout",exportFunction:"exportFunction",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",groupRowsByOrder:"groupRowsByOrder",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx",responsiveLayout:"responsiveLayout",breakpoint:"breakpoint",value:"value",columns:"columns",first:"first",rows:"rows",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",selectAll:"selectAll"},outputs:{selectAllChange:"selectAllChange",selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onRowSelect:"onRowSelect",onRowUnselect:"onRowUnselect",onPage:"onPage",onSort:"onSort",onFilter:"onFilter",onLazyLoad:"onLazyLoad",onRowExpand:"onRowExpand",onRowCollapse:"onRowCollapse",onContextMenuSelect:"onContextMenuSelect",onColResize:"onColResize",onColReorder:"onColReorder",onRowReorder:"onRowReorder",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",sortFunction:"sortFunction",firstChange:"firstChange",rowsChange:"rowsChange",onStateSave:"onStateSave",onStateRestore:"onStateRestore"},features:[ge([kf]),nt],decls:14,vars:33,consts:[[3,"ngStyle","ngClass"],["container",""],["class","p-datatable-loading-overlay p-component-overlay",4,"ngIf"],["class","p-datatable-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange",4,"ngIf"],[1,"p-datatable-wrapper",3,"ngStyle"],["wrapper",""],["role","table","class","p-datatable-table",3,"ngClass","ngStyle",4,"ngIf"],["tabindex","0","class","p-datatable-virtual-scrollable-body",3,"itemSize","height","minBufferPx","maxBufferPx","scrolledIndexChange",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange",4,"ngIf"],["class","p-datatable-footer",4,"ngIf"],["class","p-column-resizer-helper","style","display:none",4,"ngIf"],["class","pi pi-arrow-down p-datatable-reorder-indicator-up","style","display:none",4,"ngIf"],["class","pi pi-arrow-up p-datatable-reorder-indicator-down","style","display:none",4,"ngIf"],[1,"p-datatable-loading-overlay","p-component-overlay"],[1,"p-datatable-header"],[4,"ngTemplateOutlet"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange"],["role","table",1,"p-datatable-table",3,"ngClass","ngStyle"],["table",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datatable-thead"],["class","p-datatable-tbody p-datatable-frozen-tbody",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen",4,"ngIf"],[1,"p-datatable-tbody",3,"value","pTableBody","pTableBodyTemplate"],["class","p-datatable-tfoot",4,"ngIf"],[1,"p-datatable-tbody","p-datatable-frozen-tbody",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen"],[1,"p-datatable-tfoot"],["tabindex","0",1,"p-datatable-virtual-scrollable-body",3,"itemSize","minBufferPx","maxBufferPx","scrolledIndexChange"],["tableHeader",""],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange"],[1,"p-datatable-footer"],[1,"p-column-resizer-helper",2,"display","none"],["resizeHelper",""],[1,"pi","pi-arrow-down","p-datatable-reorder-indicator-up",2,"display","none"],["reorderIndicatorUp",""],[1,"pi","pi-arrow-up","p-datatable-reorder-indicator-down",2,"display","none"],["reorderIndicatorDown",""]],template:function(e,i){1&e&&(h(0,"div",0,1),w(2,PU,2,2,"div",2),w(3,VU,2,1,"div",3),w(4,BU,1,17,"p-paginator",4),h(5,"div",5,6),w(7,zU,8,16,"table",7),w(8,JU,10,21,"cdk-virtual-scroll-viewport",8),p(),w(9,QU,1,17,"p-paginator",9),w(10,e$,2,1,"div",10),w(11,t$,2,0,"div",11),w(12,n$,2,0,"span",12),w(13,i$,2,0,"span",13),p()),2&e&&(Ve(i.styleClass),_("ngStyle",i.style)("ngClass",Bb(16,r$,[i.rowHover||i.selectionMode,i.autoLayout,i.resizableColumns,i.resizableColumns&&"fit"===i.columnResizeMode,i.scrollable,i.scrollable&&"vertical"===i.scrollDirection,i.scrollable&&"horizontal"===i.scrollDirection,i.scrollable&&"both"===i.scrollDirection,i.scrollable&&"flex"===i.scrollHeight,"stack"===i.responsiveLayout,"scroll"===i.responsiveLayout,i.responsive,null!=i.headerGroupedTemplate,null!=i.footerGroupedTemplate])),ne("id",i.id),m(2),_("ngIf",i.loading&&i.showLoader),m(1),_("ngIf",i.captionTemplate),m(1),_("ngIf",i.paginator&&("top"===i.paginatorPosition||"both"==i.paginatorPosition)),m(1),_("ngStyle",j(31,o$,i.scrollHeight)),m(2),_("ngIf",!i.virtualScroll),m(1),_("ngIf",i.virtualScroll),m(1),_("ngIf",i.paginator&&("bottom"===i.paginatorPosition||"both"==i.paginatorPosition)),m(1),_("ngIf",i.summaryTemplate),m(1),_("ngIf",i.resizableColumns),m(1),_("ngIf",i.reorderableColumns),m(1),_("ngIf",i.reorderableColumns))},directives:function(){return[fi,zt,je,Et,m4,uj,ya,sD]},styles:[".p-datatable{position:relative}.p-datatable table{border-collapse:collapse;min-width:100%;table-layout:fixed}.p-datatable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}.p-datatable .p-sortable-column .p-column-title,.p-datatable .p-sortable-column .p-sortable-column-icon,.p-datatable .p-sortable-column .p-sortable-column-badge{vertical-align:middle}.p-datatable .p-sortable-column .p-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.p-datatable-auto-layout>.p-datatable-wrapper{overflow-x:auto}.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-responsive-scroll>.p-datatable-wrapper{overflow-x:auto}.p-datatable-responsive-scroll>.p-datatable-wrapper>table,.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-hoverable-rows .p-selectable-row{cursor:pointer}.p-datatable-scrollable .p-datatable-wrapper{position:relative;overflow:auto}.p-datatable-scrollable .p-datatable-thead,.p-datatable-scrollable .p-datatable-tbody,.p-datatable-scrollable .p-datatable-tfoot{display:block}.p-datatable-scrollable .p-datatable-thead>tr,.p-datatable-scrollable .p-datatable-tbody>tr,.p-datatable-scrollable .p-datatable-tfoot>tr{display:flex;flex-wrap:nowrap;width:100%}.p-datatable-scrollable .p-datatable-thead>tr>th,.p-datatable-scrollable .p-datatable-tbody>tr>td,.p-datatable-scrollable .p-datatable-tfoot>tr>td{display:flex;flex:1 1 0;align-items:center}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-thead,.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-virtual-scrollable-body>.cdk-virtual-scroll-content-wrapper>.p-datatable-table>.p-datatable-thead{position:sticky;top:0;z-index:1}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-frozen-tbody{position:sticky;z-index:1}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-tfoot{position:sticky;bottom:0;z-index:1}.p-datatable-scrollable .p-frozen-column{position:sticky;background:inherit}.p-datatable-scrollable th.p-frozen-column{z-index:1}.p-datatable-scrollable-both .p-datatable-thead>tr>th,.p-datatable-scrollable-both .p-datatable-tbody>tr>td,.p-datatable-scrollable-both .p-datatable-tfoot>tr>td,.p-datatable-scrollable-horizontal .p-datatable-thead>tr>th .p-datatable-scrollable-horizontal .p-datatable-tbody>tr>td,.p-datatable-scrollable-horizontal .p-datatable-tfoot>tr>td{flex:0 0 auto}.p-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}.p-datatable-flex-scrollable .p-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}.p-datatable-scrollable .p-rowgroup-header{position:sticky;z-index:1}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot{display:table;border-collapse:collapse;width:100%;table-layout:fixed}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead>tr,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot>tr{display:table-row}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead>tr>th,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot>tr>td{display:table-cell}.p-datatable-flex-scrollable{display:flex;flex-direction:column;flex:1;height:100%}.p-datatable-flex-scrollable .p-datatable-virtual-scrollable-body{flex:1}.p-datatable-resizable>.p-datatable-wrapper{overflow-x:auto}.p-datatable-resizable .p-datatable-thead>tr>th,.p-datatable-resizable .p-datatable-tfoot>tr>td,.p-datatable-resizable .p-datatable-tbody>tr>td{overflow:hidden;white-space:nowrap}.p-datatable-resizable .p-resizable-column:not(.p-frozen-column){background-clip:padding-box;position:relative}.p-datatable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-datatable .p-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.p-datatable .p-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.p-datatable .p-row-editor-init,.p-datatable .p-row-editor-save,.p-datatable .p-row-editor-cancel{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-datatable .p-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-datatable-reorder-indicator-up,.p-datatable-reorder-indicator-down{position:absolute;display:none}.p-datatable-reorderablerow-handle{cursor:move}[pReorderableColumn]{cursor:move}.p-datatable .p-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}.p-column-filter-row{display:flex;align-items:center;width:100%}.p-column-filter-menu{display:inline-flex}.p-column-filter-row p-columnfilterformelement{flex:1 1 auto;width:1%}.p-column-filter-menu-button,.p-column-filter-clear-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}.p-column-filter-overlay{position:absolute;top:0;left:0}.p-column-filter-row-items{margin:0;padding:0;list-style:none}.p-column-filter-row-item{cursor:pointer}.p-column-filter-add-button,.p-column-filter-remove-button{justify-content:center}.p-column-filter-add-button .p-button-label,.p-column-filter-remove-button .p-button-label{flex-grow:0}.p-column-filter-buttonbar{display:flex;align-items:center;justify-content:space-between}.p-column-filter-buttonbar .p-button{width:auto}.p-datatable .p-datatable-tbody>tr>td>.p-column-title{display:none}cdk-virtual-scroll-viewport{outline:0 none}\n"],encapsulation:2}),t})(),uj=(()=>{class t{constructor(e,i,r,o){this.dt=e,this.tableService=i,this.cd=r,this.el=o,this.subscription=this.dt.tableService.valueSource$.subscribe(()=>{this.dt.virtualScroll&&this.cd.detectChanges()})}get value(){return this._value}set value(e){this._value=e,this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&"subheader"===this.dt.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()}ngAfterViewInit(){this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&"subheader"===this.dt.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()}shouldRenderRowGroupHeader(e,i,r){let o=B.resolveFieldData(i,this.dt.groupRowsBy),s=e[r-1];return!s||o!==B.resolveFieldData(s,this.dt.groupRowsBy)}shouldRenderRowGroupFooter(e,i,r){let o=B.resolveFieldData(i,this.dt.groupRowsBy),s=e[r+1];return!s||o!==B.resolveFieldData(s,this.dt.groupRowsBy)}shouldRenderRowspan(e,i,r){let o=B.resolveFieldData(i,this.dt.groupRowsBy),s=e[r-1];return!s||o!==B.resolveFieldData(s,this.dt.groupRowsBy)}calculateRowGroupSize(e,i,r){let o=B.resolveFieldData(i,this.dt.groupRowsBy),s=o,a=0;for(;o===s;){a++;let l=e[++r];if(!l)break;s=B.resolveFieldData(l,this.dt.groupRowsBy)}return 1===a?null:a}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=x.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=x.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dt.rowGroupHeaderStyleObject.top=e+"px"}}}return t.\u0275fac=function(e){return new(e||t)(b(Kc),b(kf),b(dt),b(me))},t.\u0275cmp=Te({type:t,selectors:[["","pTableBody",""]],hostAttrs:[1,"p-element"],inputs:{columns:["pTableBody","columns"],template:["pTableBodyTemplate","template"],value:"value",frozen:"frozen",frozenRows:"frozenRows"},attrs:s$,decls:6,vars:6,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["cdkVirtualFor","",3,"cdkVirtualForOf","cdkVirtualForTrackBy","cdkVirtualForTemplateCacheSize"]],template:function(e,i){1&e&&(w(0,_$,2,2,"ng-container",0),w(1,y$,2,3,"ng-container",0),w(2,N$,2,2,"ng-container",0),w(3,F$,2,2,"ng-container",0),w(4,L$,2,5,"ng-container",0),w(5,B$,2,5,"ng-container",0)),2&e&&(_("ngIf",!i.dt.expandedRowTemplate&&!i.dt.virtualScroll),m(1),_("ngIf",!i.dt.expandedRowTemplate&&i.dt.virtualScroll),m(1),_("ngIf",i.dt.expandedRowTemplate&&!(i.frozen&&i.dt.frozenExpandedRowTemplate)),m(1),_("ngIf",i.dt.frozenExpandedRowTemplate&&i.frozen),m(1),_("ngIf",i.dt.loading),m(1),_("ngIf",i.dt.isEmpty()&&!i.dt.loading))},directives:[je,Wt,Et,uD],encapsulation:2}),t})(),dj=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,_4,gf,If,Gc,Xl,ma,x4,IU,Mf,A4],$i,Gc]}),t})();function hj(t,n){1&t&&(h(0,"tr"),h(1,"th"),D(2,"Name"),p(),h(3,"th"),D(4,"Address"),p(),h(5,"th"),D(6,"Port"),p(),h(7,"th"),D(8,"Status"),p(),h(9,"th"),D(10,"Endpoints"),p(),h(11,"th"),D(12,"Add Rule"),p(),p())}function pj(t,n){if(1&t&&(h(0,"div"),D(1),p()),2&t){const e=n.$implicit;m(1),Be(" ",e.replace("endpoint:","")," ")}}function fj(t,n){if(1&t){const e=G();h(0,"tr"),h(1,"td"),D(2),p(),h(3,"td"),D(4),p(),h(5,"td"),D(6),p(),h(7,"td"),D(8),p(),h(9,"td"),w(10,pj,2,1,"div",11),p(),h(11,"td"),h(12,"p"),h(13,"button",6),N("click",function(){const o=T(e).$implicit;return v(2).open_authentication(o.name)}),D(14," Add auth rule "),U(15,"i",5),p(),p(),h(16,"p"),h(17,"button",6),N("click",function(){const o=T(e).$implicit;return v(2).open_authorization(o.name)}),D(18," Add autz rule "),U(19,"i",5),p(),p(),p(),p()}if(2&t){const e=n.$implicit;m(2),ve(e.name),m(2),ve(e.address),m(2),ve(e.port),m(2),ve(e.status),m(2),_("ngForOf",e.endpoints)}}function gj(t,n){if(1&t&&(Q(0),h(1,"p-table",8),w(2,hj,13,0,"ng-template",9),w(3,fj,20,5,"ng-template",10),p(),X()),2&t){const e=n.ngIf;m(1),_("value",e)}}let mj=(()=>{class t{constructor(e,i){this.endpointService=e,this.modalService=i}ngOnInit(){this.initTable()}open_authentication(e){this.modalService.open(r3).componentInstance.name=e}open_authorization(e){this.modalService.open(h3).componentInstance.name=e}initTable(){this.endpoints=this.endpointService.getEndpoints()}}return t.\u0275fac=function(e){return new(e||t)(b(f3),b(Ac))},t.\u0275cmp=Te({type:t,selectors:[["app-endpoint"]],decls:14,vars:3,consts:[[1,"container-fluid"],[1,"row","mt-3","mb-3"],[1,"col-auto","mr-auto"],[1,"col-auto"],["pButton","",1,"btn","btn-primary","mr-4",3,"click"],[1,"pi","pi-plus","ml-2"],["pButton","",1,"btn","btn-primary",3,"click"],[4,"ngIf"],["responsiveLayout","scroll",3,"value"],["pTemplate","header"],["pTemplate","body"],[4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(h(0,"div",0),h(1,"div",1),h(2,"div",2),h(3,"h2"),D(4,"Listing endpoints"),p(),p(),h(5,"div",3),h(6,"button",4),N("click",function(){return i.open_authentication("*")}),D(7," New authentication rule"),U(8,"i",5),p(),h(9,"button",6),N("click",function(){return i.open_authorization("*")}),D(10," New authorization rule"),U(11,"i",5),p(),p(),p(),p(),w(12,gj,4,1,"ng-container",7),mo(13,"async")),2&e&&(m(12),_("ngIf",_o(13,1,i.endpoints)))},directives:[ga,je,Kc,Dr,Wt],pipes:[To],styles:[""]}),t})();function _j(t,n){1&t&&(Q(0),h(1,"div",28),h(2,"div",29),D(3," Rule details are incorrect "),p(),p(),X())}function vj(t,n){if(1&t&&(Q(0),h(1,"div",30),h(2,"span",31),D(3),p(),p(),X()),2&t){const e=v().message;m(3),Be(" ",e," ")}}function bj(t,n){if(1&t&&w(0,vj,4,1,"ng-container",6),2&t){const e=n.control,i=n.validation;_("ngIf",e&&e.hasError(i)&&(e.dirty||e.touched))}}const Rf=function(t,n){return{"is-invalid":t,"is-valid":n}},yj=function(t){return{validation:"required",message:"Service name is required",control:t}},wj=function(t){return{validation:"required",message:"rule is required",control:t}},Cj=function(t){return{validation:"required",message:"Method is required",control:t}};let Dj=(()=>{class t{constructor(e,i,r,o){this.fb=e,this.activeModal=i,this.ruleService=r,this.router=o,this.editModalEvent=new k,this.unsubscribe=[],this.codeExample="\n := ://\n := '*' | 'http' | 'https'\n := '*' | '*.' +\n := '/' ",this.router.routeReuseStrategy.shouldReuseRoute=()=>!1}ngOnInit(){this.initForm()}get f(){return this.ruleForm.controls}initForm(){this.ruleForm=this.fb.group({service:[this.service,xe.compose([xe.required])],rule:[this.rule,xe.compose([xe.required])],methods:[this.methods,xe.compose([xe.required])]})}submit(){this.hasError=!1;const e={};Object.keys(this.f).forEach(o=>{e[o]=this.f[o].value});const i=new YC;i.setRule(e);const r=this.ruleService.updateRule(i,this.ruleId).pipe(Vn()).subscribe(o=>{o?(this.editModalEvent.emit("closeModal"),this.router.navigate(["rules"])):this.hasError=!0});this.unsubscribe.push(r)}ngOnDestroy(){this.unsubscribe.forEach(e=>e.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(b(Ys),b(Ui),b(vf),b(Ke))},t.\u0275cmp=Te({type:t,selectors:[["app-rule-edit"]],inputs:{service:"service",rule:"rule",methods:"methods",ruleId:"ruleId"},outputs:{editModalEvent:"editModalEvent"},features:[ge([Ui])],decls:53,vars:28,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["novalidate","novalidate","id","kt_login_signin_form",1,"form","w-100",3,"formGroup","ngSubmit"],[4,"ngIf"],[1,"fv-row","mb-3"],[1,"form-label","fs-6","fw-bolder","text-dark"],["type","text","name","service","formControlName","service","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["id","emailHelp",1,"form-text","text-muted"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","name","rule","formControlName","rule","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["role","alert",1,"alert","alert-success"],[1,"alert-heading"],["formControlName","methods","multiple","",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",2,"height","210px",3,"ngClass"],["value","*"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["value","HEAD"],["value","OPTIONS"],[1,"text-center"],["type","submit","id","kt_sign_up_submit",1,"btn","btn-lg","btn-primary","w-100","mb-5",3,"disabled"],[1,"indicator-label"],["formError",""],[1,"mb-lg-15","alert","alert-danger"],[1,"alert-text","font-weight-bold"],[1,"fv-plugins-message-container"],["role","alert"]],template:function(e,i){if(1&e&&(h(0,"div",0),h(1,"h4",1),D(2,"Edit Rule"),p(),h(3,"button",2),N("click",function(){return i.editModalEvent.emit("closeModal")}),h(4,"span",3),D(5,"\xd7"),p(),p(),p(),h(6,"div",4),h(7,"form",5),N("ngSubmit",function(){return i.submit()}),w(8,_j,4,0,"ng-container",6),h(9,"div",7),h(10,"label",8),D(11,"Service name"),p(),U(12,"input",9),h(13,"small",10),D(14,"'*' means all endpoints"),p(),$(15,11),p(),h(16,"div",7),h(17,"label",8),D(18,"Rule"),p(),U(19,"input",12),$(20,11),p(),h(21,"div",13),h(22,"h4",14),D(23,"How to correctly define routes!"),p(),h(24,"pre"),D(25),p(),p(),h(26,"div",7),h(27,"label",8),D(28,"Methods"),p(),h(29,"select",15),h(30,"option",16),D(31,"ALL"),p(),h(32,"option",17),D(33,"GET"),p(),h(34,"option",18),D(35,"POST"),p(),h(36,"option",19),D(37,"PUT"),p(),h(38,"option",20),D(39,"OPTIONS"),p(),h(40,"option",21),D(41,"DELETE"),p(),h(42,"option",22),D(43,"HEAD"),p(),h(44,"option",23),D(45,"OPTIONS"),p(),p(),$(46,11),p(),h(47,"div",24),h(48,"button",25),h(49,"span",26),D(50,"Submit"),p(),p(),p(),p(),w(51,bj,1,1,"ng-template",null,27,vt),p()),2&e){const r=We(52);m(7),_("formGroup",i.ruleForm),m(1),_("ngIf",i.hasError),m(4),_("ngClass",Ee(13,Rf,i.ruleForm.controls.service.invalid,i.ruleForm.controls.service.valid)),m(3),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(16,yj,i.ruleForm.controls.service)),m(4),_("ngClass",Ee(18,Rf,i.ruleForm.controls.rule.invalid,i.ruleForm.controls.rule.valid)),m(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(21,wj,i.ruleForm.controls.rule)),m(5),Be(" ",i.codeExample,"\n "),m(4),_("ngClass",Ee(23,Rf,i.ruleForm.controls.methods.invalid,i.ruleForm.controls.methods.valid)),m(17),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(26,Cj,i.ruleForm.controls.methods)),m(2),_("disabled",i.ruleForm.invalid)}},directives:[Mo,Eo,Li,je,Oi,ur,dr,zt,Et,hr,qs,Ks],styles:[""]}),t})();function Sj(t,n){1&t&&(h(0,"tr"),h(1,"th"),D(2,"Id"),p(),h(3,"th"),D(4,"Service"),p(),h(5,"th"),D(6,"Rule"),p(),h(7,"th"),D(8,"Methods"),p(),h(9,"th"),D(10,"Created"),p(),h(11,"th"),D(12,"Updated"),p(),h(13,"th"),D(14,"Options"),p(),p())}function Tj(t,n){if(1&t&&(h(0,"div"),D(1),p()),2&t){const e=n.$implicit;m(1),Be(" ",e," ")}}function Ej(t,n){if(1&t){const e=G();h(0,"app-rule-edit",10),N("editModalEvent",function(){return T(e).$implicit.dismiss("close")}),p()}if(2&t){const e=v().$implicit;_("service",e.service)("rule",e.rule)("methods",e.methods)("ruleId",e.id)}}function xj(t,n){if(1&t){const e=G();h(0,"tr"),h(1,"td"),D(2),p(),h(3,"td"),D(4),p(),h(5,"td"),D(6),p(),h(7,"td"),w(8,Tj,2,1,"div",4),p(),h(9,"td"),D(10),p(),h(11,"td"),D(12),p(),h(13,"td"),h(14,"button",5),N("click",function(){T(e);const r=We(19);return v(2).open(r)}),U(15,"i",6),p(),h(16,"button",7),N("click",function(){const o=T(e).$implicit;return v(2).deleteRule(o.id)}),U(17,"i",8),p(),w(18,Ej,1,4,"ng-template",null,9,vt),p(),p()}if(2&t){const e=n.$implicit;m(2),ve(e.id),m(2),ve(e.service),m(2),ve(e.rule),m(2),_("ngForOf",e.methods),m(2),ve(e.created_at),m(2),ve(e.updated_at)}}function Ij(t,n){if(1&t&&(Q(0),h(1,"p-table",1),w(2,Sj,15,0,"ng-template",2),w(3,xj,20,6,"ng-template",3),p(),X()),2&t){const e=n.ngIf;m(1),_("value",e)}}let Mj=(()=>{class t{constructor(e,i){this.ruleService=e,this.modalService=i}ngOnInit(){this.initTable()}initTable(){this.rules=this.ruleService.getRules()}open(e){this.modalService.open(e)}deleteRule(e){this.ruleService.deleteRule(e).subscribe(()=>{this.initTable()}),this.initTable()}}return t.\u0275fac=function(e){return new(e||t)(b(vf),b(Ac))},t.\u0275cmp=Te({type:t,selectors:[["app-rules"]],decls:4,vars:3,consts:[[4,"ngIf"],["responsiveLayout","scroll",3,"value"],["pTemplate","header"],["pTemplate","body"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-primary","mr-2",3,"click"],[1,"pi","pi-pencil"],[1,"btn","btn-outline-danger",3,"click"],[1,"pi","pi-trash"],["editRule",""],[3,"service","rule","methods","ruleId","editModalEvent"]],template:function(e,i){1&e&&(h(0,"h2"),D(1,"Listing endpoints"),p(),w(2,Ij,4,1,"ng-container",0),mo(3,"async")),2&e&&(m(2),_("ngIf",_o(3,1,i.rules)))},directives:[je,Kc,Dr,Wt,Dj],pipes:[To],styles:[""]}),t})();function Nj(t,n){1&t&&(Q(0),h(1,"div",30),h(2,"div",31),D(3," Rule details are incorrect "),p(),p(),X())}function kj(t,n){if(1&t&&(h(0,"option",32),D(1),p()),2&t){const e=n.$implicit;_("ngValue",e.code),m(1),ve(e.role_name)}}function Rj(t,n){if(1&t&&(Q(0),h(1,"div",33),h(2,"span",34),D(3),p(),p(),X()),2&t){const e=v().message;m(3),Be(" ",e," ")}}function Oj(t,n){if(1&t&&w(0,Rj,4,1,"ng-container",6),2&t){const e=n.control,i=n.validation;_("ngIf",e&&e.hasError(i)&&(e.dirty||e.touched))}}const Yc=function(t,n){return{"is-invalid":t,"is-valid":n}},ED=function(t){return{validation:"required",message:"Method is required",control:t}},Aj=function(t){return{validation:"required",message:"Service name is required",control:t}},Fj=function(t){return{validation:"required",message:"rule is required",control:t}};let Pj=(()=>{class t{constructor(e,i,r,o,s){this.fb=e,this.activeModal=i,this.roleService=r,this.ruleService=o,this.router=s,this.editModalEvent=new k,this.unsubscribe=[],this.codeExample="\n := ://\n := '*' | 'http' | 'https'\n := '*' | '*.' +\n := '/' ",this.router.routeReuseStrategy.shouldReuseRoute=()=>!1}ngOnInit(){this.roles_list=this.roleService.getRoles(),this.initForm()}get f(){return this.ruleForm.controls}initForm(){this.ruleForm=this.fb.group({service:[this.service,xe.compose([xe.required])],rule:[this.rule,xe.compose([xe.required])],methods:[this.methods,xe.compose([xe.required])],roles:[this.roles,xe.compose([xe.required])]})}submit(){this.hasError=!1;const e={};Object.keys(this.f).forEach(o=>{e[o]=this.f[o].value});const i=new ZC;i.setRule(e);const r=this.ruleService.updateRule(i,this.ruleId).pipe(Vn()).subscribe(o=>{o?(this.editModalEvent.emit("closeModal"),this.router.navigate(["autz-rules"])):this.hasError=!0});this.unsubscribe.push(r)}ngOnDestroy(){this.unsubscribe.forEach(e=>e.unsubscribe())}}return t.\u0275fac=function(e){return new(e||t)(b(Ys),b(Ui),b(yf),b(wf),b(Ke))},t.\u0275cmp=Te({type:t,selectors:[["app-autz-rule-edit"]],inputs:{service:"service",rule:"rule",roles:"roles",methods:"methods",ruleId:"ruleId"},outputs:{editModalEvent:"editModalEvent"},features:[ge([Ui])],decls:62,vars:39,consts:[[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["novalidate","novalidate","id","kt_login_signin_form",1,"form","w-100",3,"formGroup","ngSubmit"],[4,"ngIf"],[1,"fv-row","mb-3"],[1,"form-label","fs-6","fw-bolder","text-dark"],["formControlName","roles","multiple","",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",2,"height","120px",3,"ngClass"],["value","*"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","name","service","formControlName","service","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["id","emailHelp",1,"form-text","text-muted"],["type","text","name","rule","formControlName","rule","autocomplete","off",1,"form-control","form-control-lg","form-control-solid",3,"ngClass"],["role","alert",1,"alert","alert-success"],[1,"alert-heading"],["formControlName","methods","multiple","",1,"form-control","form-control-lg","form-control-solid","form-select","form-select-solid","form-select-lg",2,"height","210px",3,"ngClass"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["value","HEAD"],["value","OPTIONS"],[1,"text-center"],["type","submit","id","kt_sign_up_submit",1,"btn","btn-lg","btn-primary","w-100","mb-5",3,"disabled"],[1,"indicator-label"],["formError",""],[1,"mb-lg-15","alert","alert-danger"],[1,"alert-text","font-weight-bold"],[3,"ngValue"],[1,"fv-plugins-message-container"],["role","alert"]],template:function(e,i){if(1&e&&(h(0,"div",0),h(1,"h4",1),D(2,"Edit Authorization Rule"),p(),h(3,"button",2),N("click",function(){return i.editModalEvent.emit("closeModal")}),h(4,"span",3),D(5,"\xd7"),p(),p(),p(),h(6,"div",4),h(7,"form",5),N("ngSubmit",function(){return i.submit()}),w(8,Nj,4,0,"ng-container",6),h(9,"div",7),h(10,"label",8),D(11,"Roles (access allowed)"),p(),h(12,"select",9),h(13,"option",10),D(14,"ALL"),p(),w(15,kj,2,2,"option",11),mo(16,"async"),p(),$(17,12),p(),h(18,"div",7),h(19,"label",8),D(20,"Service name"),p(),U(21,"input",13),h(22,"small",14),D(23,"'*' means all endpoints"),p(),$(24,12),p(),h(25,"div",7),h(26,"label",8),D(27,"Rule"),p(),U(28,"input",15),$(29,12),p(),h(30,"div",16),h(31,"h4",17),D(32,"How to correctly define routes!"),p(),h(33,"pre"),D(34),p(),p(),h(35,"div",7),h(36,"label",8),D(37,"Methods"),p(),h(38,"select",18),h(39,"option",10),D(40,"ALL"),p(),h(41,"option",19),D(42,"GET"),p(),h(43,"option",20),D(44,"POST"),p(),h(45,"option",21),D(46,"PUT"),p(),h(47,"option",22),D(48,"OPTIONS"),p(),h(49,"option",23),D(50,"DELETE"),p(),h(51,"option",24),D(52,"HEAD"),p(),h(53,"option",25),D(54,"OPTIONS"),p(),p(),$(55,12),p(),h(56,"div",26),h(57,"button",27),h(58,"span",28),D(59,"Submit"),p(),p(),p(),p(),w(60,Oj,1,1,"ng-template",null,29,vt),p()),2&e){const r=We(61);m(7),_("formGroup",i.ruleForm),m(1),_("ngIf",i.hasError),m(4),_("ngClass",Ee(19,Yc,i.ruleForm.controls.roles.invalid,i.ruleForm.controls.roles.valid)),m(3),_("ngForOf",_o(16,17,i.roles_list)),m(2),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(22,ED,i.ruleForm.controls.methods)),m(4),_("ngClass",Ee(24,Yc,i.ruleForm.controls.service.invalid,i.ruleForm.controls.service.valid)),m(3),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(27,Aj,i.ruleForm.controls.service)),m(4),_("ngClass",Ee(29,Yc,i.ruleForm.controls.rule.invalid,i.ruleForm.controls.rule.valid)),m(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(32,Fj,i.ruleForm.controls.rule)),m(5),Be(" ",i.codeExample,"\n "),m(4),_("ngClass",Ee(34,Yc,i.ruleForm.controls.methods.invalid,i.ruleForm.controls.methods.valid)),m(17),_("ngTemplateOutlet",r)("ngTemplateOutletContext",j(37,ED,i.ruleForm.controls.methods)),m(2),_("disabled",i.ruleForm.invalid)}},directives:[Mo,Eo,Li,je,hr,ur,dr,zt,qs,Ks,Wt,Et,Oi],pipes:[To],styles:[""]}),t})();function Lj(t,n){1&t&&(h(0,"tr"),h(1,"th"),D(2,"Id"),p(),h(3,"th"),D(4,"Service"),p(),h(5,"th"),D(6,"Rule"),p(),h(7,"th"),D(8,"Roles"),p(),h(9,"th"),D(10,"Methods"),p(),h(11,"th"),D(12,"Created"),p(),h(13,"th"),D(14,"Updated"),p(),h(15,"th"),D(16,"Options"),p(),p())}function Vj(t,n){if(1&t&&(h(0,"div"),D(1),p()),2&t){const e=n.$implicit;m(1),Be(" ",e," ")}}function Bj(t,n){if(1&t&&(h(0,"div"),D(1),p()),2&t){const e=n.$implicit;m(1),Be(" ",e," ")}}function Hj(t,n){if(1&t){const e=G();h(0,"app-autz-rule-edit",11),N("editModalEvent",function(){return T(e).$implicit.dismiss("close")}),p()}if(2&t){const e=v().$implicit;_("service",e.service)("rule",e.rule)("roles",e.roles)("methods",e.methods)("ruleId",e.id)}}function Uj(t,n){if(1&t){const e=G();h(0,"tr"),h(1,"td"),D(2),p(),h(3,"td"),D(4),p(),h(5,"td"),D(6),p(),h(7,"td"),w(8,Vj,2,1,"div",5),p(),h(9,"td"),w(10,Bj,2,1,"div",5),p(),h(11,"td"),D(12),p(),h(13,"td"),D(14),p(),h(15,"td"),h(16,"button",6),N("click",function(){T(e);const r=We(21);return v(2).open(r)}),U(17,"i",7),p(),h(18,"button",8),N("click",function(){const o=T(e).$implicit;return v(2).deleteRule(o.id)}),U(19,"i",9),p(),w(20,Hj,1,5,"ng-template",null,10,vt),p(),p()}if(2&t){const e=n.$implicit;m(2),ve(e.id),m(2),ve(e.service),m(2),ve(e.rule),m(2),_("ngForOf",e.roles),m(2),_("ngForOf",e.methods),m(2),ve(e.created_at),m(2),ve(e.updated_at)}}function $j(t,n){if(1&t&&(Q(0),h(1,"p-table",2),w(2,Lj,17,0,"ng-template",3),w(3,Uj,22,7,"ng-template",4),p(),X()),2&t){const e=n.ngIf;m(1),_("value",e)}}const Gj=Wp.forRoot([{path:"",component:mj,canActivate:[mf]},{path:"rules",component:Mj,canActivate:[mf]},{path:"autz-rules",component:(()=>{class t{constructor(e,i,r){this.ruleService=e,this.roleService=i,this.modalService=r}ngOnInit(){this.initTable()}initTable(){this.rules=this.ruleService.getRules()}open(e){this.modalService.open(e)}deleteRule(e){this.ruleService.deleteRule(e).subscribe(()=>{this.initTable()}),this.initTable()}}return t.\u0275fac=function(e){return new(e||t)(b(wf),b(yf),b(Ac))},t.\u0275cmp=Te({type:t,selectors:[["app-autz-rules"]],decls:4,vars:3,consts:[[1,"mt-2","mb-2"],[4,"ngIf"],["responsiveLayout","scroll",3,"value"],["pTemplate","header"],["pTemplate","body"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-primary","mr-2",3,"click"],[1,"pi","pi-pencil"],[1,"btn","btn-outline-danger",3,"click"],[1,"pi","pi-trash"],["editRule",""],[3,"service","rule","roles","methods","ruleId","editModalEvent"]],template:function(e,i){1&e&&(h(0,"h2",0),D(1,"Listing authorization rules"),p(),w(2,$j,4,1,"ng-container",1),mo(3,"async")),2&e&&(m(2),_("ngIf",_o(3,1,i.rules)))},directives:[je,Kc,Dr,Wt,Pj],pipes:[To],styles:[""]}),t})(),canActivate:[mf]},{path:"login",component:YB},{path:"logout",component:ZB},{path:"**",redirectTo:""}],{useHash:!0,onSameUrlNavigation:"reload"});let zj=(()=>{class t{constructor(e){this.authenticationService=e}intercept(e,i){return i.handle(e).pipe(pn(r=>(401===r.status&&(this.authenticationService.logout(),location.reload()),_f(r.error.message||r.statusText))))}}return t.\u0275fac=function(e){return new(e||t)(R(Lo))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),Wj=(()=>{class t{constructor(e){this.authenticationService=e}intercept(e,i){let r=this.authenticationService.currentUserValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(R(Lo))},t.\u0275prov=L({token:t,factory:t.\u0275fac}),t})(),h8=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t}),t.\u0275inj=K({imports:[[Ae,Wp,Ho,Ef],Wp,Ef]}),t})(),p8=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Z({type:t,bootstrap:[zB]}),t.\u0275inj=K({providers:[{provide:tc,useClass:Wj,multi:!0},{provide:tc,useClass:zj,multi:!0}],imports:[[mA,S1,PF,Gj,Ae,h8,gf,ma,$i,dj,HB]]}),t})();Ny=!1,fA().bootstrapModule(p8).catch(t=>console.error(t))}},ee=>{ee(ee.s=816)}]); \ No newline at end of file diff --git a/minos/api_gateway/rest/backend/templates/index.html b/minos/api_gateway/rest/backend/templates/index.html index 6728d4e..988bcae 100644 --- a/minos/api_gateway/rest/backend/templates/index.html +++ b/minos/api_gateway/rest/backend/templates/index.html @@ -7,6 +7,6 @@ - + \ No newline at end of file From 857f4a8cce093d6a9f61ebde19d6b30454464238 Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Wed, 16 Feb 2022 14:13:39 +0100 Subject: [PATCH 08/10] ISSUE #92 --- .../test_rest/test_authorization.py | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/tests/test_api_gateway/test_rest/test_authorization.py b/tests/test_api_gateway/test_rest/test_authorization.py index bde510b..bb336d7 100644 --- a/tests/test_api_gateway/test_rest/test_authorization.py +++ b/tests/test_api_gateway/test_rest/test_authorization.py @@ -45,7 +45,10 @@ def setUp(self) -> None: "/order/5", "Microservice call correct!!!", methods=("GET", "PUT", "PATCH", "DELETE",) ) self.microservice.add_json_response( - "/merchants/5", "Microservice call correct!!!", methods=("GET", "PUT", "PATCH", "DELETE",) + "/autz-merchants/5", "Microservice call correct!!!", methods=("GET", "PUT", "PATCH", "DELETE",) + ) + self.microservice.add_json_response( + "/autz-merchants-2/5", "Microservice call correct!!!", methods=("GET", "PUT", "PATCH", "DELETE",) ) self.microservice.add_json_response("/categories/5", "Microservice call correct!!!", methods=("GET",)) self.microservice.add_json_response("/order", "Microservice call correct!!!", methods=("POST",)) @@ -94,15 +97,22 @@ async def get_application(self): async def test_auth_unauthorized(self): await self.client.post( "/admin/rules", - data=json.dumps({"service": "merchants", "rule": "*://*/merchants/*", "methods": ["GET", "POST"]}), + data=json.dumps( + {"service": "autz-merchants", "rule": "*://*/autz-merchants/*", "methods": ["GET", "POST"]} + ), ) await self.client.post( "/admin/autz-rules", data=json.dumps( - {"service": "merchants", "roles": ["2"], "rule": "*://*/merchants/*", "methods": ["GET", "POST"]} + { + "service": "autz-merchants", + "roles": [2], + "rule": "*://*/autz-merchants/*", + "methods": ["GET", "POST"], + } ), ) - url = "/merchants/5" + url = "/autz-merchants/5" headers = {"Authorization": "Bearer credential-token-test"} response = await self.client.request("POST", url, headers=headers) @@ -110,6 +120,32 @@ async def test_auth_unauthorized(self): self.assertEqual(401, response.status) self.assertIn("401: Unauthorized", await response.text()) + async def test_authorized(self): + await self.client.post( + "/admin/rules", + data=json.dumps( + {"service": "autz-merchants-2", "rule": "*://*/autz-merchants-2/*", "methods": ["GET", "POST"]} + ), + ) + await self.client.post( + "/admin/autz-rules", + data=json.dumps( + { + "service": "autz-merchants-2", + "roles": [3], + "rule": "*://*/autz-merchants-2/*", + "methods": ["GET", "POST"], + } + ), + ) + url = "/autz-merchants-2/5" + headers = {"Authorization": "Bearer credential-token-test"} + + response = await self.client.request("GET", url, headers=headers) + + self.assertEqual(200, response.status) + self.assertIn("Microservice call correct!!!", await response.text()) + class TestAutzFailed(AioHTTPTestCase): CONFIG_FILE_PATH = BASE_PATH / "config.yml" From fa487e8d1eb8c8c2146ce9b589e5517969b7f6c4 Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Wed, 16 Feb 2022 14:19:31 +0100 Subject: [PATCH 09/10] ISSUE #92 --- minos/api_gateway/rest/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minos/api_gateway/rest/service.py b/minos/api_gateway/rest/service.py index 9f0b3bc..7be4a09 100644 --- a/minos/api_gateway/rest/service.py +++ b/minos/api_gateway/rest/service.py @@ -98,7 +98,7 @@ async def create_database(self): Base.metadata.create_all(self.engine) @aiohttp_jinja2.template("tmpl.jinja2") - async def handler(self, request): + async def handler(self, request): # pragma: no cover try: path = Path(Path.cwd()) self._directory = path.resolve() @@ -114,7 +114,7 @@ async def handler(self, request): return response @staticmethod - async def _get_file(file_path) -> web.FileResponse: + async def _get_file(file_path) -> web.FileResponse: # pragma: no cover try: return web.FileResponse(path=file_path, status=200) except (ValueError, FileNotFoundError) as error: From 4e36827da5ebc0886ae7fdd57135097a4190f05e Mon Sep 17 00:00:00 2001 From: Vladyslav Fenchak Date: Wed, 16 Feb 2022 14:29:14 +0100 Subject: [PATCH 10/10] ISSUE #92 --- .../test_api_gateway/test_rest/test_admin.py | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/tests/test_api_gateway/test_rest/test_admin.py b/tests/test_api_gateway/test_rest/test_admin.py index c8d97a8..808eaf6 100644 --- a/tests/test_api_gateway/test_rest/test_admin.py +++ b/tests/test_api_gateway/test_rest/test_admin.py @@ -233,5 +233,95 @@ async def test_admin_delete_rule(self): self.assertEqual(200, response.status) +class TestApiGatewayAdminAutzRules(AioHTTPTestCase): + CONFIG_FILE_PATH = BASE_PATH / "config.yml" + + @mock.patch.dict(os.environ, {"API_GATEWAY_REST_CORS_ENABLED": "true"}) + def setUp(self) -> None: + self.config = ApiGatewayConfig(self.CONFIG_FILE_PATH) + super().setUp() + + def tearDown(self) -> None: + super().tearDown() + + async def get_application(self): + """ + Override the get_app method to return your application. + """ + rest_service = ApiGatewayRestService( + address=self.config.rest.host, port=self.config.rest.port, config=self.config + ) + + return await rest_service.create_application() + + @unittest_run_loop + async def test_admin_get_rules(self): + url = "/admin/autz-rules" + + response = await self.client.request("GET", url) + + self.assertEqual(200, response.status) + + @unittest_run_loop + async def test_admin_create_rule(self): + url = "/admin/autz-rules" + + response = await self.client.request( + "POST", + url, + data=json.dumps({"service": "abc", "roles": ["*"], "rule": "*://*/abc/*", "methods": ["GET", "POST"]}), + ) + + self.assertEqual(200, response.status) + + @unittest_run_loop + async def test_admin_update_rule(self): + url = "/admin/autz-rules" + + res = await self.client.request( + "POST", + url, + data=json.dumps( + {"service": "abcd", "roles": ["*"], "rule": "test_rule_update", "methods": ["GET", "POST"]} + ), + ) + + data = json.loads(await res.text()) + + self.assertEqual(200, res.status) + + url = f"/admin/autz-rules/{data['id']}" + + response = await self.client.request( + "PATCH", + url, + data=json.dumps({"service": "abcde_modified", "rule": "*://*/abcde/*", "methods": ["GET", "POST"]}), + ) + + self.assertEqual(200, response.status) + + @unittest_run_loop + async def test_admin_delete_rule(self): + url = "/admin/autz-rules" + + res = await self.client.request( + "POST", + url, + data=json.dumps( + {"service": "efg", "roles": ["*"], "rule": "efg_test_rule_delete", "methods": ["GET", "POST"]} + ), + ) + + data = json.loads(await res.text()) + + self.assertEqual(200, res.status) + + url = f"/admin/autz-rules/{data['id']}" + + response = await self.client.request("DELETE", url) + + self.assertEqual(200, response.status) + + if __name__ == "__main__": unittest.main()