diff --git a/.storage/lovelace_resources b/.storage/lovelace_resources index 9ed2602d..13d45899 100644 --- a/.storage/lovelace_resources +++ b/.storage/lovelace_resources @@ -51,7 +51,7 @@ }, { "id": "6ad5d0d7a4c9435a85476e49d22d4df4", - "url": "/hacsfiles/versatile-thermostat-ui-card/versatile-thermostat-ui-card.js?hacstag=714354847320", + "url": "/hacsfiles/versatile-thermostat-ui-card/versatile-thermostat-ui-card.js?hacstag=714354847330", "type": "module" }, { diff --git a/custom_components/ha_mcp_tools/const.py b/custom_components/ha_mcp_tools/const.py index f14ed53c..db689710 100644 --- a/custom_components/ha_mcp_tools/const.py +++ b/custom_components/ha_mcp_tools/const.py @@ -25,7 +25,7 @@ DOMAIN = "ha_mcp_tools" # in CI. The # capability negotiation — not this version — gates each WS command (see # ``websocket_api.CAPABILITIES``). -COMPONENT_VERSION = "2.1.0" +COMPONENT_VERSION = "2.1.1" # Config-entry discriminator (``entry.data[CONF_ENTRY_TYPE]``). A missing value # means "tools" so the pre-existing services entry keeps working across the diff --git a/custom_components/ha_mcp_tools/manifest.json b/custom_components/ha_mcp_tools/manifest.json index 49ec701d..538d4820 100644 --- a/custom_components/ha_mcp_tools/manifest.json +++ b/custom_components/ha_mcp_tools/manifest.json @@ -22,5 +22,5 @@ "requirements": [ "ruamel.yaml>=0.18.0" ], - "version": "2.1.0" + "version": "2.1.1" } diff --git a/custom_components/ha_mcp_tools/mcp_webhook.py b/custom_components/ha_mcp_tools/mcp_webhook.py index eafb00b8..77dd85af 100644 --- a/custom_components/ha_mcp_tools/mcp_webhook.py +++ b/custom_components/ha_mcp_tools/mcp_webhook.py @@ -29,7 +29,7 @@ mapping); the ``ha_auth`` bearer check + discovery documents mirror the add-on's ``auth_native.py`` + the ``ha_auth`` subset of ``oauth.py``; the ``legacy`` provider + its root ``/authorize`` + ``/token`` views live in :mod:`oauth_legacy`, ported from the ``legacy`` subset of the add-on's -``oauth.py``. The seven RFC 8414 / RFC 9728 discovery views below are shared by +``oauth.py``. The six RFC 8414 / RFC 9728 discovery views below are shared by ``ha_auth``, ``legacy``, and ``none`` (which serves a distinct auto-approve authorization-server document pointing at :mod:`oauth_autoapprove`'s endpoints) — see :func:`active_auth_mode`. @@ -387,39 +387,6 @@ def _none_mode_authorization_server_document(base: str) -> dict[str, Any]: } -class _ProtectedResourceMetadataView(HomeAssistantView): - """RFC 9728 Protected Resource Metadata.""" - - requires_auth = False - cors_allowed = True - url = f"{OAUTH_BASE}/protected-resource" - name = "ha_mcp_tools:oauth:protected-resource" - - def __init__(self, hass: HomeAssistant) -> None: - """Bind the view to the HA instance; liveness is resolved per request.""" - self._hass = hass - - async def get(self, request: web.Request) -> web.Response: - """Serve the protected-resource document for the bearer-gated modes only. - - SECURITY (#1976 review): this ANONYMOUS, fixed (guessable) path exposes - ``resource: /api/webhook/``. In none mode the webhook id is the - SOLE credential, so serving it here would leak it to any unauthenticated - GET. Serve only for ``ha_auth``/``legacy`` (where the id is not a secret - and the 401 ``WWW-Authenticate`` pointer legitimately directs a client - here); 404 otherwise. The PATH-SCOPED well-known view still serves in none - mode — its caller must already know the id (it is a route parameter). - """ - if active_auth_mode(self._hass) not in (WEBHOOK_AUTH_HA, WEBHOOK_AUTH_LEGACY): - return _json_not_found() - webhook_id = _active_webhook_id(self._hass) - if webhook_id is None: - return _json_not_found() - return web.json_response( - _protected_resource_document(webhook_id, _build_base_url(request)) - ) - - class _AuthorizationServerMetadataView(HomeAssistantView): """RFC 8414 Authorization Server Metadata. @@ -450,12 +417,23 @@ class _AuthorizationServerMetadataView(HomeAssistantView): class _WellKnownProtectedResourceView(HomeAssistantView): - """RFC 9728 §3.1 path-scoped Protected Resource Metadata. + """RFC 9728 §3.1 path-scoped Protected Resource Metadata — the ONLY + protected-resource document this integration serves. - Same document as :class:`_ProtectedResourceMetadataView`, served at the - well-known location derived from the webhook resource URL — claude.ai's - first fallback probe when the 401's ``resource_metadata`` pointer is - missing. The webhook id is a ROUTE PARAMETER (not baked into the path at + Served at the well-known location derived from the webhook resource URL + (``/.well-known/oauth-protected-resource/api/webhook/``), which is also + where the webhook's 401 ``resource_metadata`` challenge points, and which is + claude.ai's first fallback probe when that pointer is missing. + + SECURITY (#1976 review): there is deliberately NO fixed-path variant of this + document. A fixed, guessable path handed ``resource: /api/webhook/`` + to any anonymous GET while ``ha_auth``/``legacy`` was on, and a later switch + back to ``none`` mode — where the webhook id is the SOLE credential — + promoted that already-published value into the credential. This view's + caller must already hold the id (it is a route parameter), so the document + discloses nothing in any mode. + + The webhook id is a ROUTE PARAMETER (not baked into the path at registration): a remove + re-add of the entry mints a new webhook id in the same HA session, and the bound view must serve whichever id is currently live (404 for any other). Standalone view (not a subclass of the plain @@ -496,10 +474,11 @@ class _WellKnownAuthorizationServerMetadataView(_AuthorizationServerMetadataView def _metadata_views(hass: HomeAssistant) -> list[HomeAssistantView]: - """Build the seven discovery-document views, shared by ha_auth and legacy - (mode-agnostic — each view resolves the active mode per request).""" + """Build the six discovery-document views, shared by ha_auth and legacy + (mode-agnostic — each view resolves the active mode per request): the + path-scoped protected-resource document, the authorization-server document, + and the four RFC 8414 / OIDC well-known authorization-server locations.""" views: list[HomeAssistantView] = [ - _ProtectedResourceMetadataView(hass), _AuthorizationServerMetadataView(hass), _WellKnownProtectedResourceView(hass), ] @@ -528,7 +507,7 @@ def _metadata_views(hass: HomeAssistant) -> list[HomeAssistantView]: def _register_metadata_views(hass: HomeAssistant) -> None: - """Register the seven discovery views at most once per HA session. + """Register the six discovery views at most once per HA session. aiohttp cannot unregister a bound view, so a reload / re-enable / re-add / ha_auth<->legacy mode switch must all reuse the already-bound views — they @@ -551,15 +530,21 @@ def _register_metadata_views(hass: HomeAssistant) -> None: hass.data[_OAUTH_VIEWS_REGISTERED_KEY] = True -def _build_unauthorized_response(request: web.Request) -> web.Response: +def _build_unauthorized_response(request: web.Request, webhook_id: str) -> web.Response: """Build the 401 + ``WWW-Authenticate`` challenge MCP clients use to discover. - Per RFC 9728 §5.1 / MCP spec, the ``resource_metadata`` parameter points to - the protected-resource metadata URL where the client finds the authorization - server. + Per RFC 9728 §5.1 / MCP 2026-07-28 Authorization Server Discovery, the + ``resource_metadata`` parameter points to the protected-resource metadata + URL where the client finds the authorization server. """ base = _build_base_url(request) - metadata_url = f"{base}{OAUTH_BASE}/protected-resource" + # RFC 9728 §3.1 path-scoped location. The pointer names the id, but this + # 401 is only produced on a request TO /api/webhook/, so the caller + # already holds it; there is no fixed-path document to point at (see + # _WellKnownProtectedResourceView). + metadata_url = ( + f"{base}/.well-known/oauth-protected-resource/api/webhook/{webhook_id}" + ) return web.Response( status=401, text="Unauthorized", @@ -592,10 +577,10 @@ async def _check_webhook_auth( if resource_server is not None and not await resource_server.validate_request( request ): - return _build_unauthorized_response(request) + return _build_unauthorized_response(request, cfg["webhook_id"]) oauth_provider: LegacyOAuthProvider | None = cfg.get("oauth_provider") if oauth_provider is not None and not oauth_provider.validate_bearer(request): - return _build_unauthorized_response(request) + return _build_unauthorized_response(request, cfg["webhook_id"]) return None diff --git a/custom_components/ha_mcp_tools/oauth_autoapprove.py b/custom_components/ha_mcp_tools/oauth_autoapprove.py index 42cf2498..c229838a 100644 --- a/custom_components/ha_mcp_tools/oauth_autoapprove.py +++ b/custom_components/ha_mcp_tools/oauth_autoapprove.py @@ -49,7 +49,7 @@ from __future__ import annotations import logging import secrets from typing import TYPE_CHECKING, Any -from urllib.parse import urlparse +from urllib.parse import urlencode, urlparse import aiohttp from aiohttp import web @@ -303,13 +303,23 @@ class AutoApproveAuthorizeView(HomeAssistantView): if forward_id != client_id: params.popall("client_id", None) params["client_id"] = forward_id - import yarl # Keep the browser hop relative, matching the token leg. Browsers cannot # be made to send X-Forwarded-Host, so this is consistency rather than a # vulnerability fix. - target = yarl.URL("/auth/authorize").with_query(params) - return web.Response(status=302, headers={"Location": str(target)}) + + # Percent-encode the query instead of handing the params to yarl: yarl + # legally leaves ":" and "/" literal inside query values (RFC 3986 + # permits both in the query component), so a loopback client's callback + # forwards as ``redirect_uri=http://127.0.0.1:1234/callback``. Reverse + # proxies shipping a generic "block common exploits" ruleset -- Nginx + # Proxy Manager enables one per host with a checkbox -- match + # ``[a-zA-Z0-9_]=http://`` and answer 403 before core ever sees the + # request, stranding every native-app client behind such a proxy. + # Full encoding is semantically identical and survives those filters. + query = urlencode(list(params.items())) + target = f"/auth/authorize?{query}" if query else "/auth/authorize" + return web.Response(status=302, headers={"Location": target}) async def post(self, request: web.Request) -> web.Response: """Handle a legacy-mode consent submission on the scoped route.""" diff --git a/custom_components/ha_mcp_tools/translations/cs.json b/custom_components/ha_mcp_tools/translations/cs.json index 6e9da30d..87ff20c3 100644 --- a/custom_components/ha_mcp_tools/translations/cs.json +++ b/custom_components/ha_mcp_tools/translations/cs.json @@ -29,11 +29,11 @@ "title": "Nástroje souborů a YAML HA-MCP", "description": "Nakonfigurujte privilegované služby pro úpravu souborů a YAML používané volitelnými nástroji souborů/YAML ha-mcp. Tato nastavení se také zobrazují v uživatelském rozhraní nastavení serveru ha-mcp a aplikují se okamžitě, bez restartu. Nepřepisovatelná úroveň zákazu stále blokuje citlivé cesty (např. .storage) a klíče hranice důvěry (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Další adresáře souborů", + "allowed_dirs": "Další cesta k souborům", "extra_yaml_keys": "Další klíče pro zápis YAML" }, "data_description": { - "allowed_dirs": "Adresáře vzhledem ke konfiguračnímu adresáři, každému je uděleno právo čtení a zápisu (např. pyscript). Průchod a položky mimo konfiguraci jsou zahozeny.", + "allowed_dirs": "Cesty relativní k adresáři konfigurace, včetně přesných názvů souborů, jako je sensor.yaml, nebo cesty pod /share, /media, /ssl a /backup. Každá položka má uděleno oprávnění pro čtení a zápis pro danou cestu a vše pod ní; každou cestu zadejte jako samostatnou položku seznamu. Adresářový posun (traversal) a jiné nepovolené cesty budou ignorovány.", "extra_yaml_keys": "Klíče nejvyšší úrovně, které ha_config_set_yaml může zapisovat navíc k vestavěným, pro integrace s prioritou YAML v této instalaci (např. alert2). Klíče hranice důvěry jsou zahozeny." } }, diff --git a/custom_components/ha_mcp_tools/translations/de.json b/custom_components/ha_mcp_tools/translations/de.json index f59a2472..3faa7816 100644 --- a/custom_components/ha_mcp_tools/translations/de.json +++ b/custom_components/ha_mcp_tools/translations/de.json @@ -29,11 +29,11 @@ "title": "HA-MCP File & YAML Tools", "description": "Konfiguriere die privilegierten Datei- und YAML-Bearbeitungsdienste, die von den opt-in Datei/YAML-Tools von ha-mcp verwendet werden. Diese Einstellungen erscheinen auch in der eigenen Einstellungs-UI des ha-mcp-Servers und werden live wirksam, ohne Neustart. Eine nicht überschreibbare Deny-Grenze blockiert weiterhin sensible Pfade (z. B. .storage) und Vertrauensgrenzen-Keys (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Zusätzliche Datei-Verzeichnisse", + "allowed_dirs": "Zusätzliche Dateipfade", "extra_yaml_keys": "Zusätzliche YAML-Schreib-Keys" }, "data_description": { - "allowed_dirs": "Verzeichnisse relativ zum Konfigurationsverzeichnis, jeweils mit Lese- und Schreibzugriff (z. B. pyscript). Traversal- und Einträge außerhalb des Konfig-Verzeichnisses werden verworfen.", + "allowed_dirs": "Pfade relativ zum Konfigurationsverzeichnis, einschließlich genauer Dateinamen wie sensor.yaml, oder Pfade unter /share, /media, /ssl und /backup. Jedem Eintrag wird Lese- und Schreibzugriff für diesen Pfad und alles darunter gewährt; gib jeden Pfad als separaten Listeneintrag an. Verzeichnistraversierung und andere nicht erlaubte Pfade werden verworfen.", "extra_yaml_keys": "Top-Level-Keys, die ha_config_set_yaml zusätzlich zu den eingebauten schreiben darf, für YAML-first-Integrationen auf dieser Installation (z. B. alert2). Vertrauensgrenzen-Keys werden verworfen." } }, diff --git a/custom_components/ha_mcp_tools/translations/eo.json b/custom_components/ha_mcp_tools/translations/eo.json index 03baac6d..291392e2 100644 --- a/custom_components/ha_mcp_tools/translations/eo.json +++ b/custom_components/ha_mcp_tools/translations/eo.json @@ -29,11 +29,11 @@ "title": "HA-MCP Dosieraj & YAML Iloj", "description": "Agordu la privilegiajn dosierajn kaj YAML-redaktajn servojn uzatajn de la laŭvolaj dosieraj/YAML-iloj de ha-mcp. Ĉi tiuj agordoj ankaŭ aperas en la propra agorda UI de la ha-mcp servilo kaj aplikiĝas tuj, sen rekomenco. Ne-superregebla malpermesa limo ankoraŭ blokas sentemajn vojojn (ekz. .storage) kaj fid-limajn ŝlosilojn (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Ekstraj dosierujoj", + "allowed_dirs": "Kromaj dosiervojoj", "extra_yaml_keys": "Ekstraj YAML-skribaj ŝlosiloj" }, "data_description": { - "allowed_dirs": "Dosierujoj rilataj al la agorda dosierujo, ĉiu kun legado kaj skribado permesita (ekz. pyscript). Trairo kaj ekster-agordaj eniroj estas forĵetitaj.", + "allowed_dirs": "Vojoj relative al la agorda dosierujo, inkluzive de ekzakta dosiernomo kiel sensor.yaml, aŭ vojoj sub /share, /media, /ssl, kaj /backup. Ĉiu eniro ricevas leg- kaj skrib-permeson por tiu vojo kaj ĉio sub ĝi; enigu ĉiun vojon kiel apartan listan eron. Trairado kaj aliaj nepermesitaj vojoj estas forigitaj.", "extra_yaml_keys": "Ĉefnivelaj ŝlosiloj, kiujn ha_config_set_yaml povas skribi krom la enkonstruitaj, por YAML-unuaj integriĝoj en ĉi tiu instalaĵo (ekz. alert2). Fid-limaj ŝlosiloj estas forĵetitaj." } }, diff --git a/custom_components/ha_mcp_tools/translations/es.json b/custom_components/ha_mcp_tools/translations/es.json index e8ba73c8..4671026c 100644 --- a/custom_components/ha_mcp_tools/translations/es.json +++ b/custom_components/ha_mcp_tools/translations/es.json @@ -29,11 +29,11 @@ "title": "Herramientas de archivos y YAML de HA-MCP", "description": "Configura los servicios privilegiados de edición de archivos y YAML que usan las herramientas opcionales de archivos/YAML de ha-mcp. Estos ajustes aparecen también en la propia interfaz de ajustes del servidor ha-mcp y se aplican en caliente, sin reiniciar. Un mínimo de denegación no anulable sigue bloqueando rutas sensibles (p. ej. .storage) y claves de la frontera de confianza (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Directorios de archivos adicionales", + "allowed_dirs": "Rutas de archivos adicionales", "extra_yaml_keys": "Claves YAML de escritura adicionales" }, "data_description": { - "allowed_dirs": "Directorios relativos al directorio de configuración, cada uno con permiso de lectura y escritura (p. ej. pyscript). Se descartan los recorridos de ruta y las entradas fuera de la configuración.", + "allowed_dirs": "Rutas relativas al directorio de configuración, incluidos nombres de archivo exactos como sensor.yaml, o rutas bajo /share, /media, /ssl y /backup. A cada entrada se le concede lectura y escritura para esa ruta y todo lo que esté debajo de ella; introduce cada ruta como un elemento de lista separado. Se descartarán los recorridos de directorios y otras rutas no permitidas.", "extra_yaml_keys": "Claves de primer nivel que ha_config_set_yaml puede escribir además de las integradas, para integraciones basadas en YAML de esta instalación (p. ej. alert2). Las claves de la frontera de confianza se descartan." } }, diff --git a/custom_components/ha_mcp_tools/translations/fr.json b/custom_components/ha_mcp_tools/translations/fr.json index 62eff47d..3ac55c39 100644 --- a/custom_components/ha_mcp_tools/translations/fr.json +++ b/custom_components/ha_mcp_tools/translations/fr.json @@ -29,11 +29,11 @@ "title": "Outils Fichier & YAML HA-MCP", "description": "Configurez les services privilégiés d'édition de fichiers et de YAML utilisés par les outils fichier/YAML optionnels de ha-mcp. Ces paramètres apparaissent également dans l'interface de configuration du serveur ha-mcp et s'appliquent en direct, sans redémarrage. Un plancher de refus non contournable bloque toujours les chemins sensibles (ex. .storage) et les clés de limite de confiance (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Répertoires de fichiers supplémentaires", + "allowed_dirs": "Chemins de fichiers supplémentaires", "extra_yaml_keys": "Clés d'écriture YAML supplémentaires" }, "data_description": { - "allowed_dirs": "Répertoires relatifs au répertoire de configuration, chacun avec accès en lecture et écriture (ex. pyscript). Les traversées et les entrées hors du répertoire de configuration sont ignorées.", + "allowed_dirs": "Chemins relatifs au répertoire de configuration, incluant les noms de fichiers exacts tels que sensor.yaml, ou les chemins sous /share, /media, /ssl et /backup. Chaque entrée bénéficie d'un accès en lecture et en écriture pour ce chemin et tout ce qu'il contient ; saisissez chaque chemin comme un élément de liste séparé. Les parcours de répertoires (traversal) et autres chemins non autorisés sont ignorés.", "extra_yaml_keys": "Clés de premier niveau que ha_config_set_yaml peut écrire en plus de celles intégrées, pour les intégrations YAML-first de cette installation (ex. alert2). Les clés de limite de confiance sont ignorées." } }, diff --git a/custom_components/ha_mcp_tools/translations/it.json b/custom_components/ha_mcp_tools/translations/it.json index 1128d924..775e347c 100644 --- a/custom_components/ha_mcp_tools/translations/it.json +++ b/custom_components/ha_mcp_tools/translations/it.json @@ -29,11 +29,11 @@ "title": "Strumenti file e YAML di HA-MCP", "description": "Configura i servizi privilegiati di modifica di file e YAML usati dagli strumenti file/YAML opzionali di ha-mcp. Queste impostazioni compaiono anche nell'interfaccia delle impostazioni del server ha-mcp e si applicano subito, senza riavvio. Una soglia di divieto non aggirabile continua a bloccare i percorsi sensibili (per esempio .storage) e le chiavi del confine di fiducia (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Directory di file aggiuntive", + "allowed_dirs": "Percorsi file extra", "extra_yaml_keys": "Chiavi YAML scrivibili aggiuntive" }, "data_description": { - "allowed_dirs": "Directory relative alla directory di configurazione, ciascuna con permesso di lettura e scrittura (per esempio pyscript). I percorsi che risalgono l'albero e le voci fuori dalla configurazione vengono scartati.", + "allowed_dirs": "Percorsi relativi alla directory di configurazione, inclusi nomi di file esatti come sensor.yaml, o percorsi sotto /share, /media, /ssl e /backup. A ciascuna voce viene concesso l'accesso in lettura e scrittura per quel percorso e per tutto ciò che si trova al di sotto; inserisci ogni percorso come elemento di elenco separato. I percorsi di attraversamento e altri non consentiti vengono scartati.", "extra_yaml_keys": "Chiavi di primo livello che ha_config_set_yaml può scrivere oltre a quelle integrate, per le integrazioni basate su YAML di questa installazione (per esempio alert2). Le chiavi del confine di fiducia vengono scartate." } }, diff --git a/custom_components/ha_mcp_tools/translations/ko.json b/custom_components/ha_mcp_tools/translations/ko.json index 4d36fba3..ea65fb15 100644 --- a/custom_components/ha_mcp_tools/translations/ko.json +++ b/custom_components/ha_mcp_tools/translations/ko.json @@ -29,11 +29,11 @@ "title": "HA-MCP 파일 및 YAML 도구", "description": "ha-mcp의 선택형 파일/YAML 도구가 사용하는, 권한이 필요한 파일 및 YAML 편집 서비스를 구성합니다. 이 설정은 ha-mcp 서버 자체의 설정 UI에도 나타나며 다시 시작하지 않아도 즉시 적용됩니다. 재정의할 수 없는 기본 차단 규칙은 민감한 경로(예: .storage)와 신뢰 경계 키(homeassistant, http, frontend, lovelace)를 계속 차단합니다.", "data": { - "allowed_dirs": "추가 파일 디렉터리", + "allowed_dirs": "추가 파일 경로", "extra_yaml_keys": "추가 YAML 쓰기 허용 키" }, "data_description": { - "allowed_dirs": "설정 디렉터리 기준 상대 디렉터리이며 각각 읽기와 쓰기가 허용됩니다(예: pyscript). 경로 탈출과 설정 디렉터리 밖의 항목은 무시됩니다.", + "allowed_dirs": "sensor.yaml 같은 정확한 파일 이름을 포함하여 config 디렉토리 상대 경로, 또는 /share, /media, /ssl, /backup 아래의 경로입니다. 각 항목에는 해당 경로 및 그 하위 경로에 대한 읽기 및 쓰기 권한이 부여되며, 각 경로는 별도의 목록 항목으로 입력하세요. 상위 디렉토리 순회 및 허용되지 않는 경로는 제외됩니다.", "extra_yaml_keys": "이 설치본에서 YAML 우선으로 동작하는 통합 구성요소(예: alert2)를 위해, ha_config_set_yaml이 기본 허용 키 외에 추가로 쓸 수 있는 최상위 키입니다. 신뢰 경계 키는 무시됩니다." } }, diff --git a/custom_components/ha_mcp_tools/translations/nl.json b/custom_components/ha_mcp_tools/translations/nl.json index cbc3a2c7..63250528 100644 --- a/custom_components/ha_mcp_tools/translations/nl.json +++ b/custom_components/ha_mcp_tools/translations/nl.json @@ -29,11 +29,11 @@ "title": "HA-MCP Bestands- & YAML-hulpmiddelen", "description": "Configureer de geprivilegieerde bestands- en YAML-bewerkingsservices die worden gebruikt door de opt-in bestands-/YAML-hulpmiddelen van ha-mcp. Deze instellingen verschijnen ook in de eigen instellingen-UI van de ha-mcp server en worden direct toegepast, zonder herstart. Een niet-overbrugbare blokkade weigert nog steeds gevoelige paden (bijv. .storage) en trust-boundary sleutels (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Extra bestandsmappen", + "allowed_dirs": "Extra bestandspaden", "extra_yaml_keys": "Extra YAML-schrijfsleutels" }, "data_description": { - "allowed_dirs": "Mappen relatief aan de configuratiemap, elk met lees- en schrijfrechten (bijv. pyscript). Traversale en buiten-configuratie ingangen worden genegeerd.", + "allowed_dirs": "Paden relatief ten opzichte van deconfiguratiemap, inclusief exacte bestandsnamen zoals sensor.yaml, of paden onder /share, /media, /ssl en /backup. Elk opgegeven pad en alles daaronder krijgt lees- en schrijfrechten; voer elk pad in als een apart lijstitem. Padtraversatie en andere niet-toegestane paden worden genegeerd.", "extra_yaml_keys": "Top-level sleutels die ha_config_set_yaml mag schrijven naast de ingebouwde, voor YAML-first integraties op deze installatie (bijv. alert2). Trust-boundary sleutels worden genegeerd." } }, diff --git a/custom_components/ha_mcp_tools/translations/pl.json b/custom_components/ha_mcp_tools/translations/pl.json index 97b3ffd5..2aad9fc3 100644 --- a/custom_components/ha_mcp_tools/translations/pl.json +++ b/custom_components/ha_mcp_tools/translations/pl.json @@ -29,11 +29,11 @@ "title": "Narzędzia plików i YAML HA-MCP", "description": "Skonfiguruj uprzywilejowane usługi edycji plików i YAML używane przez opcjonalne narzędzia plików/YAML ha-mcp. Te ustawienia pojawiają się również w interfejsie ustawień serwera ha-mcp i są stosowane na żywo, bez restartu. Nienadpisywalna blokada nadal blokuje wrażliwe ścieżki (np. .storage) i klucze graniczne zaufania (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Dodatkowe katalogi plików", + "allowed_dirs": "Dodatkowe ścieżki plików", "extra_yaml_keys": "Dodatkowe klucze zapisu YAML" }, "data_description": { - "allowed_dirs": "Katalogi względem katalogu konfiguracyjnego, każdy z uprawnieniami do odczytu i zapisu (np. pyscript). Wpisy poza konfiguracją i przechodzenie przez katalogi są odrzucane.", + "allowed_dirs": "Ścieżki względne do katalogu konfiguracyjnego, w tym dokładne nazwy plików, takie jak sensor.yaml, lub ścieżki w katalogach /share, /media, /ssl i /backup. Każdy wpis otrzymuje uprawnienia do odczytu i zapisu dla danej ścieżki oraz wszystkiego, co się w niej znajduje; wpisz każdą ścieżkę jako oddzielny element listy. Przechodzenie w górę drzewa katalogów (traversal) i inne niedozwolone ścieżki są odrzucane.", "extra_yaml_keys": "Klucze najwyższego poziomu, które ha_config_set_yaml może zapisywać oprócz wbudowanych, dla integracji opartych na YAML w tej instalacji (np. alert2). Klucze graniczne zaufania są odrzucane." } }, diff --git a/custom_components/ha_mcp_tools/translations/ru.json b/custom_components/ha_mcp_tools/translations/ru.json index 1af726fc..bd46464e 100644 --- a/custom_components/ha_mcp_tools/translations/ru.json +++ b/custom_components/ha_mcp_tools/translations/ru.json @@ -29,11 +29,11 @@ "title": "Файловые инструменты и инструменты YAML HA-MCP", "description": "Настройка привилегированных служб для работы с файлами и редактирования YAML, которые используются отключёнными по умолчанию файловыми инструментами и инструментами YAML в ha-mcp. Эти параметры также отображаются в собственном интерфейсе настроек сервера ha-mcp и применяются сразу, без перезапуска. Неотключаемый базовый запрет по-прежнему блокирует чувствительные пути (например, .storage) и ключи границы доверия (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Дополнительные файловые каталоги", + "allowed_dirs": "Дополнительные пути к файлам", "extra_yaml_keys": "Дополнительные YAML-ключи для записи" }, "data_description": { - "allowed_dirs": "Каталоги относительно каталога конфигурации, каждому предоставляется доступ на чтение и запись (например, pyscript). Записи с обходом пути и вне каталога конфигурации отбрасываются.", + "allowed_dirs": "Пути относительно каталога конфигурации, включая точные имена файлов, такие как sensor.yaml, или пути в директориях /share, /media, /ssl и /backup. Для каждого элемента предоставляется доступ на чтение и запись к самому пути и всему, что находится в нем; вводите каждый путь как отдельный элемент списка. Обход каталогов и другие запрещенные пути отбрасываются.", "extra_yaml_keys": "Верхнеуровневые ключи, которые ha_config_set_yaml может записывать вдобавок к встроенным, — для YAML-ориентированных интеграций на этой установке (например, alert2). Ключи границы доверия отбрасываются." } }, diff --git a/custom_components/ha_mcp_tools/translations/sv.json b/custom_components/ha_mcp_tools/translations/sv.json index 02ea9883..40edb5ca 100644 --- a/custom_components/ha_mcp_tools/translations/sv.json +++ b/custom_components/ha_mcp_tools/translations/sv.json @@ -29,11 +29,11 @@ "title": "HA-MCP Fil- & YAML-verktyg", "description": "Konfigurera de privilegierade fil- och YAML-redigeringstjänsterna som används av ha-mcp:s valfria fil-/YAML-verktyg. Dessa inställningar visas också i ha-mcp-serverns eget inställningsgränssnitt och tillämpas direkt, utan omstart. En icke-överskridbar spärr blockerar fortfarande känsliga sökvägar (t.ex. .storage) och nycklar för förtroendegränser (homeassistant, http, frontend, lovelace).", "data": { - "allowed_dirs": "Extra filkataloger", + "allowed_dirs": "Extra filvägar", "extra_yaml_keys": "Extra YAML-skrivnycklar" }, "data_description": { - "allowed_dirs": "Kataloger i förhållande till konfigurationskatalogen, var och en beviljas läs- och skrivrättigheter (t.ex. pyscript). Genomgång och poster utanför konfigurationen ignoreras.", + "allowed_dirs": "Sökvägar relativt konfigurationskatalogen, inklusive exakta filnamn som sensor.yaml, eller sökvägar under /share, /media, /ssl och /backup. Varje post ges läs- och skrivbehörighet för den sökvägen och allt under den; ange varje sökväg som ett separat listobjekt. Sökordsbläddring (traversal) och andra otillåtna sökvägar tas bort.", "extra_yaml_keys": "Toppnivånycklar som ha_config_set_yaml får skriva utöver de inbyggda, för YAML-först-integrationer på denna installation (t.ex. alert2). Nycklar för förtroendegränser ignoreras." } }, diff --git a/custom_components/ha_mcp_tools/translations/zh-Hans.json b/custom_components/ha_mcp_tools/translations/zh-Hans.json index fd6f25d6..3128ab5d 100644 --- a/custom_components/ha_mcp_tools/translations/zh-Hans.json +++ b/custom_components/ha_mcp_tools/translations/zh-Hans.json @@ -29,11 +29,11 @@ "title": "HA-MCP 文件与 YAML 工具", "description": "配置 ha-mcp 可选文件/YAML 工具所使用的特权文件和 YAML 编辑服务。这些设置也会出现在 ha-mcp 服务器自身的设置界面中,并实时生效,无需重启。不可覆盖的拒绝底线仍会阻止敏感路径(例如 .storage)和信任边界键(homeassistant、http、frontend、lovelace)。", "data": { - "allowed_dirs": "额外的文件目录", + "allowed_dirs": "额外文件路径", "extra_yaml_keys": "额外的 YAML 可写键" }, "data_description": { - "allowed_dirs": "相对于配置目录的目录,每个目录都授予读写权限(例如 pyscript)。路径穿越以及配置目录之外的条目会被丢弃。", + "allowed_dirs": "相对于配置目录的路径,包括诸如 sensor.yaml 的确切文件名,或 /share、/media、/ssl 和 /backup 下的路径。每个条目均被授予对该路径及其中所有内容的读写权限;每个路径请作为一个单独的列表项输入。将丢弃目录遍历及其他不允许的路径。", "extra_yaml_keys": "除内置键外,ha_config_set_yaml 还可写入的顶层键,适用于本安装中以 YAML 为主的集成(例如 alert2)。信任边界键会被丢弃。" } }, diff --git a/custom_components/ha_mcp_tools/websocket_api.py b/custom_components/ha_mcp_tools/websocket_api.py index a5e86df8..c0518a68 100644 --- a/custom_components/ha_mcp_tools/websocket_api.py +++ b/custom_components/ha_mcp_tools/websocket_api.py @@ -5647,11 +5647,23 @@ async def _call_service_prep( domain, so it holds no matter which path reaches this function. 2. **ServiceNotFound** before dispatch, so an unknown service is a clean ``SERVICE_NOT_FOUND`` and never a landed-but-unreported write. - 3. Pre-state capture for each ``entity_id`` (a synchronous in-memory read). + 3. Pre-state capture for each ``entity_id`` (a synchronous in-memory read). A + target whose captured state is ``None`` — absent from the state machine, so + it structurally cannot ever emit a ``state_changed`` for this dispatch — is + excluded from the wait entirely (:func:`_confirmable_entity_ids`); waiting on + it would only burn the full ``timeout`` to learn what the pre-state already + proved. An ``"unavailable"`` target stays IN the wait (unlike a nonexistent + one, it can legitimately reconnect and transition mid-dispatch — excluding it + too would silently miss that), so ``should_confirm`` itself stays keyed off + the full ``entity_ids`` (intent to confirm), not the narrower confirmable + subset — a ``validate_first=False`` caller that intentionally skips the + not-found/unavailable error mapping still needs ``partial=True`` on a + genuinely-excluded target, not a bare unconfirmed-but-not-partial result. 4. Register the expected-aware ``EVENT_STATE_CHANGED`` waiter BEFORE the dispatch - (D5) so a fast entity's event can't arrive before the listener exists. The - waiter confirms only on reaching the server's ``expected_state`` hint (skipping - intermediate/noise events); a ``None`` hint keeps any-first-event confirmation. + (D5) so a fast entity's event can't arrive before the listener exists, scoped + to only the confirmable targets from step 3. The waiter confirms only on + reaching the server's ``expected_state`` hint (skipping intermediate/noise + events); a ``None`` hint keeps any-first-event confirmation. 5. Fire exactly ONE ``async_call`` (``blocking=True``); flip ``dispatched`` immediately after so a post-dispatch problem is never retried as a failed call (D3/D9). @@ -5695,22 +5707,32 @@ async def _call_service_prep( wait = msg.get("wait", True) timeout = msg.get("timeout", CALL_SERVICE_DEFAULT_TIMEOUT) return_response = msg.get("return_response", False) - should_confirm = bool(wait and entity_ids) # The server's confirmation HINT (``_SERVICE_TO_STATE.get(service)``), applied to # every confirmation target. Absent / None keeps any-first-event confirmation. expected_state = msg.get("expected_state") expected_by_entity = dict.fromkeys(entity_ids, expected_state) + # should_confirm stays keyed off the full entity_ids (intent to confirm) — see + # the docstring's step 3 for why this must NOT narrow to the confirmable subset. + should_confirm = bool(wait and entity_ids) + # 3. Pre-state capture (synchronous in-memory reads, guarded against drift). pre = {eid: _state_as_dict(_state_get(hass, eid)) for eid in entity_ids} + # Only a target whose pre-dispatch state proves it can possibly report a + # confirming event is worth actually waiting on (see + # ``_confirmable_entity_ids``) — a target absent from the state machine can + # never emit one, so waiting on it is certain to burn the full ``timeout`` for + # no new information; the server reads the certain ``None`` old_state straight + # off the transition instead. + confirmable_entity_ids = _confirmable_entity_ids(entity_ids, pre) - # 4. Register-before-fire (D5): only when there is something to confirm. + # 4. Register-before-fire (D5): only when there is something worth confirming. evt: Any = None captured: dict[str, Any] = {} unsub: Any = None - if should_confirm: + if should_confirm and confirmable_entity_ids: evt, captured, unsub = _register_transition_waiter( - hass, set(entity_ids), expected_by_entity + hass, set(confirmable_entity_ids), expected_by_entity ) # 5. Dispatch exactly once. 6. Immediate-match + bounded wait. 7. Build the diff. @@ -5729,9 +5751,13 @@ async def _call_service_prep( return_response=return_response, ) dispatched = True - if should_confirm: + # ``evt`` is None when nothing was worth waiting on (should_confirm was + # True but every target was excluded as unconfirmable) — there is then + # nothing that could ever confirm, so skip the wait outright rather than + # awaiting an event that was never registered to fire. + if should_confirm and evt is not None: await _await_confirmation( - hass, entity_ids, expected_by_entity, captured, evt, timeout + hass, confirmable_entity_ids, expected_by_entity, captured, evt, timeout ) result = _build_call_service_result( hass, @@ -5764,6 +5790,26 @@ async def _call_service_prep( return {"result": result} +def _confirmable_entity_ids(entity_ids: list[str], pre: Mapping[str, Any]) -> list[str]: + """Targets whose pre-dispatch state proves they can possibly confirm. + + A target absent from the state machine (``pre[eid] is None``) can never emit a + confirming ``state_changed`` for this dispatch — HA no-ops a service call for + an entity id that matches nothing, and nothing will register that id mid-call + either. Excluding it from the wait lets the server read the certain outcome + straight off the transition's ``None`` ``old_state`` instead of burning the + full timeout to learn nothing new. + + Deliberately NOT excluded: a target whose captured state is ``"unavailable"``. + Unlike a nonexistent id, an unavailable entity can legitimately reconnect and + transition during the blocking dispatch (the very case ``ENTITY_UNAVAILABLE`` + exists to distinguish from a real failure would itself go undetected if the + listener were never registered) — so it stays in the wait and is judged by + whether it actually confirmed, not excluded upfront. + """ + return [eid for eid in entity_ids if pre.get(eid) is not None] + + def _guard_call_service_target(hass: HomeAssistant, domain: str, service: str) -> None: """Pre-dispatch refusals for ``call_service`` — raise BEFORE any dispatch. @@ -5953,6 +5999,9 @@ def _build_call_service_result( _call_service_transition(eid, pre.get(eid), _post_state(hass, eid, captured)) for eid in entity_ids ] + # Against the FULL entity_ids, not just the confirmable subset: an excluded + # (nonexistent) target can never land in captured, so this naturally stays + # False whenever one is present — exactly right, since it never confirmed. confirmed = bool(should_confirm and set(entity_ids) <= set(captured)) result: dict[str, Any] = { "domain": domain, @@ -6155,19 +6204,36 @@ def _bulk_op_record( ``pre`` is the synchronous in-memory pre-state per target; ``expected_by_entity`` maps every target to this op's confirmation hint (``_SERVICE_TO_STATE``) so the waiter + immediate-match key off it; ``dispatched`` / ``error`` / ``response`` - start empty and are filled during dispatch; ``should_confirm`` is true only when - the batch is waiting AND this op names targets to confirm. + start empty and are filled during dispatch. ``confirmable_entity_ids`` excludes + ONLY a target whose captured pre-state is ``None`` (nonexistent) — it can never + emit a confirming event, so it is never worth the shared wait (see + ``_confirmable_entity_ids``). Deliberately NOT excluded from it: a target + already ``"unavailable"``, which can legitimately reconnect and confirm + mid-dispatch. ``should_confirm`` stays intent-level (``bool(wait and + entity_ids)`` — the FULL list, not the confirmable subset): a + ``validate_first=False`` caller that skips the not-found/unavailable error + mapping still needs ``partial=True`` on a genuinely-excluded target, not a + bare unconfirmed-but-not-partial result. """ entity_ids = list(op.get("entity_ids") or []) expected_state = op.get("expected_state") + pre = {eid: _state_as_dict(_state_get(hass, eid)) for eid in entity_ids} + confirmable_entity_ids = _confirmable_entity_ids(entity_ids, pre) return { "domain": op["domain"], "service": op["service"], "service_data": op.get("service_data") or {}, "entity_ids": entity_ids, + "confirmable_entity_ids": confirmable_entity_ids, "expected_by_entity": dict.fromkeys(entity_ids, expected_state), + # Intent-level (full entity_ids), NOT the confirmable subset — mirrors + # ``_call_service_prep``'s should_confirm: a validate_first=False caller + # that intentionally skips the not-found/unavailable error mapping still + # needs partial=True on a genuinely-excluded target, not a bare + # unconfirmed-but-not-partial result. confirmable_entity_ids scopes ONLY + # which targets are actually worth registering a listener / waiting for. "should_confirm": bool(wait and entity_ids), - "pre": {eid: _state_as_dict(_state_get(hass, eid)) for eid in entity_ids}, + "pre": pre, "evt": None, "captured": {}, "dispatched": False, @@ -6210,9 +6276,9 @@ def _bulk_register_all(hass: HomeAssistant, ops: list[dict[str, Any]]) -> list[A unsubs: list[Any] = [] try: for op in ops: - if op["should_confirm"]: + if op["should_confirm"] and op["confirmable_entity_ids"]: evt, captured, unsub = _register_transition_waiter( - hass, set(op["entity_ids"]), op["expected_by_entity"] + hass, set(op["confirmable_entity_ids"]), op["expected_by_entity"] ) op["evt"] = evt op["captured"] = captured @@ -6267,7 +6333,10 @@ def _bulk_match_immediate(hass: HomeAssistant, ops: list[dict[str, Any]]) -> Non for op in ops: if op["should_confirm"] and op["dispatched"]: _match_immediate( - hass, op["entity_ids"], op["expected_by_entity"], op["captured"] + hass, + op["confirmable_entity_ids"], + op["expected_by_entity"], + op["captured"], ) @@ -6289,7 +6358,10 @@ async def _bulk_wait_all(ops: list[dict[str, Any]], timeout: float) -> None: for op in ops if op["should_confirm"] and op["dispatched"] - and not (set(op["entity_ids"]) <= set(op["captured"])) + # evt is None when nothing was worth waiting on for this op (every + # target was excluded as unconfirmable) — nothing could ever set it. + and op["evt"] is not None + and not (set(op["confirmable_entity_ids"]) <= set(op["captured"])) ] if not waiters: return @@ -6330,6 +6402,9 @@ def _build_bulk_op_result(hass: HomeAssistant, op: Mapping[str, Any]) -> dict[st ) for eid in entity_ids ] + # Against the FULL entity_ids, not just the confirmable subset: an excluded + # (nonexistent) target can never land in captured, so this naturally stays + # False whenever one is present — exactly right, since it never confirmed. confirmed = bool(should_confirm and dispatched and set(entity_ids) <= set(captured)) result: dict[str, Any] = { "domain": op["domain"], diff --git a/www/community/versatile-thermostat-ui-card/versatile-thermostat-ui-card.js b/www/community/versatile-thermostat-ui-card/versatile-thermostat-ui-card.js index 7eee151b..21aae1cc 100644 --- a/www/community/versatile-thermostat-ui-card/versatile-thermostat-ui-card.js +++ b/www/community/versatile-thermostat-ui-card/versatile-thermostat-ui-card.js @@ -1,63 +1,63 @@ -function t(t,e,i,o){var n,a=arguments.length,s=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(s=(a<3?n(s):a>3?n(e,i,s):n(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s}"function"==typeof SuppressedError&&SuppressedError; +function t(t,e,i,o){var a,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(n<3?a(s):n>3?a(e,i,s):a(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s}"function"==typeof SuppressedError&&SuppressedError; /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),n=new WeakMap;let a=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}};const s=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new a(i,t,o)},r=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t +const e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),a=new WeakMap;let n=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&a.set(e,t))}return t}toString(){return this.cssText}};const s=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new n(i,t,o)},r=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new n("string"==typeof t?t:t+"",void 0,o))(e)})(t):t /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,{is:l,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:h,getOwnPropertySymbols:u,getPrototypeOf:m}=Object,p=globalThis,_=p.trustedTypes,g=_?_.emptyScript:"",f=p.reactiveElementPolyfillSupport,b=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},y=(t,e)=>!l(t,e),w={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;let x=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&c(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:n}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return o?.call(this)},set(e){const a=o?.call(this);n.call(this,e),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=m(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...h(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$ES??=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$ES?.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{if(i)t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of o){const o=document.createElement("style"),n=e.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=i.cssText,t.appendChild(o)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$ES?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$ES?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:v).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:v;this._$Em=o,this[o]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i,o=!1,n){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??y)(o?n:this[t],e))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$ES?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$ES?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}};x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[b("elementProperties")]=new Map,x[b("finalized")]=new Map,f?.({ReactiveElement:x}),(p.reactiveElementVersions??=[]).push("2.0.1"); + */,{is:l,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:h,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,m=globalThis,_=m.trustedTypes,f=_?_.emptyScript:"",g=m.reactiveElementPolyfillSupport,b=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},y=(t,e)=>!l(t,e),w={attribute:!0,type:String,converter:v,reflect:!1,useDefault:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;let x=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&c(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:a}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const n=o?.call(this);a?.call(this,e),this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...h(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{if(i)t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of o){const o=document.createElement("style"),a=e.litNonce;void 0!==a&&o.setAttribute("nonce",a),o.textContent=i.cssText,t.appendChild(o)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const a=(void 0!==i.converter?.toAttribute?i.converter:v).toAttribute(e,i.type);this._$Em=t,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),a="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:v;this._$Em=o;const n=a.fromAttribute(e,t.type);this[o]=n??this._$Ej?.get(o)??n,this._$Em=null}}requestUpdate(t,e,i,o=!1,a){if(void 0!==t){const n=this.constructor;if(!1===o&&(a=this[t]),i??=n.getPropertyOptions(t),!((i.hasChanged??y)(a,e)||i.useDefault&&i.reflect&&a===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:a},n){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==a||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[b("elementProperties")]=new Map,x[b("finalized")]=new Map,g?.({ReactiveElement:x}),(m.reactiveElementVersions??=[]).push("2.1.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const k=globalThis,T=k.trustedTypes,S=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",D=`lit$${(Math.random()+"").slice(9)}$`,C="?"+D,A=`<${C}>`,P=document,E=()=>P.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,z="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,H=/>/g,R=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),I=/'/g,N=/"/g,F=/^(?:script|style|textarea|title)$/i,W=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),B=W(1),j=W(2),U=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),q=new WeakMap,Z=P.createTreeWalker(P,129);function X(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,o=[];let n,a=2===e?"":"",s=O;for(let e=0;e"===l[0]?(s=n??O,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,r=l[1],s=void 0===l[3]?R:'"'===l[3]?N:I):s===N||s===I?s=R:s===V||s===H?s=O:(s=R,n=void 0);const h=s===R&&t[e+1].startsWith("/>")?" ":"";a+=s===O?i+A:c>=0?(o.push(r),i.slice(0,c)+M+i.slice(c)+D+h):i+D+(-2===c?e:h)}return[X(t,a+(t[i]||"")+(2===e?"":"")),o]};class G{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,a=0;const s=t.length-1,r=this.parts,[l,c]=K(t,e);if(this.el=G.createElement(l,i),Z.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=Z.nextNode())&&r.length0){o.textContent=T?T.emptyScript:"";for(let i=0;i$(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Y&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=G.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new J(o,this),i=t.u(this.options);t.p(e),this.$(i),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new G(t)),e}T(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new tt(this.k(E()),this.k(E()),this,this.options)):i=e[o],i._$AI(n),o++;o2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(t,e=this,i,o){const n=this.strings;let a=!1;if(void 0===n)t=Q(this,t,e,0),a=!L(t)||t!==this._$AH&&t!==U,a&&(this._$AH=t);else{const o=t;let s,r;for(t=n[0],s=0;st}):void 0,M="$lit$",D=`lit$${Math.random().toFixed(9).slice(2)}$`,C="?"+D,A=`<${C}>`,P=document,E=()=>P.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,z="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,H=/>/g,I=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,F=/"/g,N=/^(?:script|style|textarea|title)$/i,j=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),W=j(1),B=j(2),U=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),q=new WeakMap,Z=P.createTreeWalker(P,129);function X(t,e){if(!$(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==T?T.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,o=[];let a,n=2===e?"":3===e?"":"",s=O;for(let e=0;e"===l[0]?(s=a??O,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,r=l[1],s=void 0===l[3]?I:'"'===l[3]?F:R):s===F||s===R?s=I:s===V||s===H?s=O:(s=I,a=void 0);const h=s===I&&t[e+1].startsWith("/>")?" ":"";n+=s===O?i+A:c>=0?(o.push(r),i.slice(0,c)+M+i.slice(c)+D+h):i+D+(-2===c?e:h)}return[X(t,n+(t[i]||"")+(2===e?"":3===e?"":"")),o]};class G{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let a=0,n=0;const s=t.length-1,r=this.parts,[l,c]=K(t,e);if(this.el=G.createElement(l,i),Z.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=Z.nextNode())&&r.length0){o.textContent=S?S.emptyScript:"";for(let i=0;i$(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Y&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=G.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new J(o,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new G(t)),e}k(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const a of t)o===e.length?e.push(i=new tt(this.O(E()),this.O(E()),this,this.options)):i=e[o],i._$AI(a),o++;o2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(t,e=this,i,o){const a=this.strings;let n=!1;if(void 0===a)t=Q(this,t,e,0),n=!L(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const o=t;let s,r;for(t=a[0],s=0;s{const o=i?.renderBefore??e;let a=o._$litPart$;if(void 0===a){const t=i?.renderBefore??null;o._$litPart$=a=new tt(e.insertBefore(E(),t),t,void 0,i??{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};lt._$litElement$=!0,lt.finalized=!0,rt.litElementHydrateSupport?.({LitElement:lt});const ct=rt.litElementPolyfillSupport;ct?.({LitElement:lt}),(rt.litElementVersions??=[]).push("4.2.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class rt extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const o=i?.renderBefore??e;let n=o._$litPart$;if(void 0===n){const t=i?.renderBefore??null;o._$litPart$=n=new tt(e.insertBefore(E(),t),t,void 0,i??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}}rt._$litElement$=!0,rt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:rt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:rt}),(globalThis.litElementVersions??=[]).push("4.0.1"); +const dt=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */,ht={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y},ut=(t=ht,e,i)=>{const{kind:o,metadata:a}=i;let n=globalThis.litPropertyMetadata.get(a);if(void 0===n&&globalThis.litPropertyMetadata.set(a,n=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),n.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const a=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,a,t,!0,i)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const a=this[o];e.call(this,i),this.requestUpdate(o,a,t,!0,i)}}throw Error("Unsupported decorator location: "+o)};function pt(t){return(e,i)=>"object"==typeof i?ut(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i) +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */}function mt(t){return pt({...t,state:!0,attribute:!1})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const ct=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */,dt={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y},ht=(t=dt,e,i)=>{const{kind:o,metadata:n}=i;let a=globalThis.litPropertyMetadata.get(n);if(void 0===a&&globalThis.litPropertyMetadata.set(n,a=new Map),a.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const n=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t),e}}}if("setter"===o){const{name:o}=i;return function(i){const n=this[o];e.call(this,i),this.requestUpdate(o,n,t)}}throw Error("Unsupported decorator location: "+o)};function ut(t){return(e,i)=>"object"==typeof i?ht(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,o?{...t,wrapped:!0}:t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i) + */ +function _t(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */}function mt(t){return ut({...t,state:!0,attribute:!1})} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const pt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i) -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */;function _t(t,e){return(i,o,n)=>{const a=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:s}="object"==typeof o?i:n??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return pt(i,o,{get(){if(e){let e=t.call(this);return void 0===e&&(e=a(this),s.call(this,e)),e}return a(this)}})}return pt(i,o,{get(){return a(this)}})}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const gt=1;class ft{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}} + */const ft=1;class gt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}} /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const bt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends ft{constructor(t){if(super(t),t.type!==gt||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.it)t in e||(i.remove(t),this.it.delete(t));for(const t in e){const o=!!e[t];o===this.it.has(t)||this.st?.has(t)||(o?(i.add(t),this.it.add(t)):(i.remove(t),this.it.delete(t)))}return U}});var vt="M6.59,0.66C8.93,-1.15 11.47,1.06 12.04,4.5C12.47,4.5 12.89,4.62 13.27,4.84C13.79,4.24 14.25,3.42 14.07,2.5C13.65,0.35 16.06,-1.39 18.35,1.58C20.16,3.92 17.95,6.46 14.5,7.03C14.5,7.46 14.39,7.89 14.16,8.27C14.76,8.78 15.58,9.24 16.5,9.06C18.63,8.64 20.38,11.04 17.41,13.34C15.07,15.15 12.53,12.94 11.96,9.5C11.53,9.5 11.11,9.37 10.74,9.15C10.22,9.75 9.75,10.58 9.93,11.5C10.35,13.64 7.94,15.39 5.65,12.42C3.83,10.07 6.05,7.53 9.5,6.97C9.5,6.54 9.63,6.12 9.85,5.74C9.25,5.23 8.43,4.76 7.5,4.94C5.37,5.36 3.62,2.96 6.59,0.66M5,16H7A2,2 0 0,1 9,18V24H7V22H5V24H3V18A2,2 0 0,1 5,16M5,18V20H7V18H5M12.93,16H15L12.07,24H10L12.93,16M18,16H21V18H18V22H21V24H18A2,2 0 0,1 16,22V18A2,2 0 0,1 18,16Z",yt="M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M11,15H13V17H11V15M11,7H13V13H11V7",wt="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",xt="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",kt="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",Tt="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",St="M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",Mt="M5,2V13H8V22L15,10H11L15,2M17,15H19V17H17V15M17,7H19V13H17V7Z",Dt="M8.5 4.5L5.4 9.5L8.5 14.7L5.2 20.5L3.4 19.6L6.1 14.7L3 9.5L6.7 3.6L8.5 4.5M14.7 4.4L11.6 9.5L14.7 14.5L11.4 20.3L9.6 19.4L12.3 14.5L9.2 9.5L12.9 3.5L14.7 4.4M21 4.4L17.9 9.5L21 14.5L17.7 20.3L15.9 19.4L18.6 14.5L15.5 9.5L19.2 3.5L21 4.4",Ct="M12,3L2,12H5V20H19V12H22L12,3M12,8.75A2.25,2.25 0 0,1 14.25,11A2.25,2.25 0 0,1 12,13.25A2.25,2.25 0 0,1 9.75,11A2.25,2.25 0 0,1 12,8.75M12,15C13.5,15 16.5,15.75 16.5,17.25V18H7.5V17.25C7.5,15.75 10.5,15 12,15Z",At="M13 9H11V7H13V9M13 17H11V11H13V17M5 3H19C20.1 3 21 3.89 21 5V19C21 19.53 20.79 20.04 20.41 20.41C20.04 20.79 19.53 21 19 21H5C4.47 21 3.96 20.79 3.59 20.41C3.21 20.04 3 19.53 3 19V5C3 3.89 3.89 3 5 3M19 19V5H5V19H19Z",Pt="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z",Et="M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z",Lt="M12 2C7.04 2 3 6.04 3 11C3 14.91 5.5 18.24 9 19.47V22H11V19.94C11.33 20 11.66 20 12 20S12.67 20 13 19.94V22H15V19.47C18.5 18.23 21 14.9 21 11C21 6.04 16.96 2 12 2M14.25 14L11.25 17L9.75 15.5L11 14.25L9.75 13L12.75 10L14.25 11.5L13 12.75L14.25 14M16 9H8V7H16V9Z",$t="M10,0.2C9,0.2 8.2,1 8.2,2C8.2,3 9,3.8 10,3.8C11,3.8 11.8,3 11.8,2C11.8,1 11,0.2 10,0.2M15.67,1A7.33,7.33 0 0,0 23,8.33V7A6,6 0 0,1 17,1H15.67M18.33,1C18.33,3.58 20.42,5.67 23,5.67V4.33C21.16,4.33 19.67,2.84 19.67,1H18.33M21,1A2,2 0 0,0 23,3V1H21M7.92,4.03C7.75,4.03 7.58,4.06 7.42,4.11L2,5.8V11H3.8V7.33L5.91,6.67L2,22H3.8L6.67,13.89L9,17V22H10.8V15.59L8.31,11.05L9.04,8.18L10.12,10H15V8.2H11.38L9.38,4.87C9.08,4.37 8.54,4.03 7.92,4.03Z",zt="M18.73,18C15.4,21.69 9.71,22 6,18.64C2.33,15.31 2.04,9.62 5.37,5.93C6.9,4.25 9,3.2 11.27,3C7.96,6.7 8.27,12.39 12,15.71C13.63,17.19 15.78,18 18,18C18.25,18 18.5,18 18.73,18Z",Ot="M17 13V7H19V13H17M17 17V15H19V17H17M13 13V5C13 3.3 11.7 2 10 2S7 3.3 7 5V13C4.8 14.7 4.3 17.8 6 20S10.8 22.7 13 21 15.7 16.2 14 14C13.7 13.6 13.4 13.3 13 13M10 4C10.6 4 11 4.4 11 5V8H9V5C9 4.4 9.4 4 10 4Z",Vt="M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",Ht="M21 20V2H3V20H1V23H23V20M19 4V11H17V4M5 4H7V11H5M5 20V13H7V20M9 20V4H15V20M17 20V13H19V20Z",Rt="M2 4H20V8H18V20H16V8H6V20H4V8H2V4M7 9H15V11H7V9M7 12H15V14H7V12M20 19V17H22V19H20M20 15V10H22V15H20Z";var It={version:"version",current:"current"},Nt={card:{climate:{autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",allow_lock_toggle:"Allow lock/unlock from card",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Allow preset temperature modification",show_status_text:"Show current HVAC action text",show_background_gradient_on_active:"Show the slider background gradient when the entity is active",show_regulation_chart:"Show regulation chart"}}},Ft={window_open:"Window open",window_bypass:"Bypass window activated",night_mode:"Night mode",eco:"Eco",overpowering:"Overpowering detected",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active",lock_users_active:"User controls locked",lock_automations_active:"Automation changes locked","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",code_error:"Incorrect code",lock:"Lock",unlock:"Unlock",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Preset temperatures",preset_mod_no_entities:"No preset temperature entities found for this device.",preset_row_heat:"Heat",preset_row_heat_away:"Heat away",preset_row_cool:"Cool",preset_row_cool_away:"Cool away",regulation_chart_title:"Regulation chart"},Wt={common:It,editor:Nt,extra_states:Ft},Bt=Object.freeze({__proto__:null,common:It,default:Wt,editor:Nt,extra_states:Ft}),jt={version:"Version",current:"Aktuell"},Ut={card:{climate:{autoStartStopEnableEntity:"Auto-Start/Stop-Entität",powerEntity:"Entität für den Stromverbrauch",theme:"Thema",theme_classic:"Klassisch",theme_vtherm:"VTherm",theme_uncolored:"Ohne Farbe",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",disable_window:"Fenster deaktivieren",disable_autoStartStop:"Auto-Start/Stop deaktivieren",disable_overpowering:"Überverbrauch deaktivieren",disable_heat:"Heizen deaktivieren",disable_cool:"Kühlen deaktivieren",disable_heat_cool:"Heizen/Kühlen deaktivieren",disable_auto:"Auto deaktivieren",disable_fan_only:"Nur-Lüfter deaktivieren",disable_dry:"Entfeuchten deaktivieren",disable_off:"Aus deaktivieren",disable_menu:"Menü deaktivieren",set_current_as_main:"Zieltemperatur mit aktueller Temperatur tauschen",disable_safety_warning:"Sicherheitsmeldungen deaktivieren",disable_buttons:"Plus/Minus-Buttons deaktivieren",disable_power_infos:"Verbrauchsinformationen deaktivieren",disable_auto_fan_infos:"Auto-Lüfter-Informationen deaktivieren",disable_name:"Name deaktivieren",eco_temperature:"Eco-Temperatur",allow_lock_toggle:"Allow lock/unlock from card",menu_system:"System menu",disable_sleep:"Disable sleep mode",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Voreinstellungstemperaturen bearbeitbar machen",show_status_text:"Aktuellen Status als Text anzeigen",show_background_gradient_on_active:"Hintergrundverlauf des Schiebereglers anzeigen, wenn die Entität aktiv ist",show_regulation_chart:"Show regulation chart"}}},Yt={window_open:"Fenster offen",window_bypass:"Fenster-Bypass aktiviert",night_mode:"Nachtmodus",eco:"Eco",overpowering:"Überverbrauch erkannt",none:"Manuell",comfort:"Komfort",boost:"Boost",frost:"Frostschutz",power:"Lastabwurf",activity:"Aktivität erkannt",presence:"Anwesenheit erkannt",motion:"Bewegung erkannt",auto_regulation_light:"Leicht",auto_regulation_medium:"Mittel",auto_regulation_strong:"Stark",auto_regulation_slow:"Langsam",auto_regulation_expert:"Experte",auto_fan_mode:"Auto-Lüfter",auto_fan_mode_off:"Keine",auto_fan_none:"Keine",auto_fan_low:"Niedrig",auto_fan_medium:"Mittel",auto_fan_high:"Hoch",auto_fan_turbo:"Turbo",fan_low:"Niedrig",fan_low_mid:"Niedrig-mittel",fan_mid:"Mittel",fan_mid_high:"Mittel-hoch",fan_high:"Hoch",fan_mute:"Leise",fan_turbo:"Turbo",fan_none:"Keine",fan_auto:"Auto",change_message:"Klicken zum Ändern des Presets",toggle_message:"Klicken zum Umschalten",auto_start_stop:"Gestoppt durch Auto-Start/Stop",auto_start_stop_enable:"Aktiviert/deaktiviert Auto-Start/Stop",auto_start_stop_label:"Auto-Start/Stop",temp_unavailable:"-",sleep:"Schlafmodus",lock_users_active:"Benutzersteuerung gesperrt",lock_automations_active:"Automatisierungsänderungen gesperrt",lock:"Sperren",unlock:"Entsperren",code_error:"Falscher Code",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Temperatur erhöhen",decrease_temp:"Temperatur verringern",undefined:"None",auto_fan_boost:"Boost",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",not_initialized:"Initialisation error",preset_mod_title:"Voreinstellungstemperaturen",preset_mod_no_entities:"Keine Voreinstellungstemperatur-Entitäten für dieses Gerät gefunden.",preset_row_heat:"Heizen",preset_row_heat_away:"Heizen (abwesend)",preset_row_cool:"Kühlen",preset_row_cool_away:"Kühlen (abwesend)",regulation_chart_title:"Regulation chart"},qt={common:jt,editor:Ut,extra_states:Yt},Zt=Object.freeze({__proto__:null,common:jt,default:qt,editor:Ut,extra_states:Yt}),Xt={version:"version",current:"Actuelle"},Kt={card:{climate:{autoStartStopEnableEntity:"Entité - auto-start/stop",powerEntity:"Entité - puissance consommée",theme:"Thème",theme_classic:"Classique",theme_vtherm:"VTherm",theme_uncolored:"Sans couleur",theme_gunmalmg:"Gunmalmg",section_all_themes:"Pour tous les thèmes",section_classic_only:"Pour les thèmes Classique, VTherm et Sans couleur",menu_system:"Menu système",disable_window:"Désactiver fenêtre status",disable_autoStartStop:"Désactiver auto-startStop",disable_overpowering:"Désactiver sur-puissance status",disable_heat:"Désactiver mode chauffe",disable_cool:"Désactiver mode clim",disable_heat_cool:"Désactiver mode chauffe/clim",disable_auto:"Désactiver mode auto",disable_fan_only:"Désactiver mode ventilation",disable_dry:"Désactiver mode déshumidification",disable_off:"Désactiver mode arret",disable_sleep:"Désactiver mode endormi",set_current_as_main:"Echanger temperature cible avec temperature locale",disable_safety_warning:"Désactiver sécurité messages",disable_buttons:"Désactiver les boutons +/-",disable_power_infos:"Désactiver les infos de puissance",disable_auto_fan_infos:"Désactiver les infos auto-ventilation",disable_name:"Désactiver le nom",disable_target_icon:"Désactiver l'icône cible",allow_lock_toggle:"Activer le verrouillage/déverrouillage depuis la carte",disable_presets:"Désactiver les presets",disable_timed_preset:"Désactiver le champ de durée du preset temporisé",use_manual_duration_input:"Permettre la saisie manuelle de la durée",allow_preset_modification:"Permettre la modification des températures de preset",disable_menu:"Désactiver le menu",show_status_text:"Afficher l'état du HVAC en texte",show_background_gradient_on_active:"Afficher le dégradé de fond du slider lorsque l'entité est active",show_regulation_chart:"Afficher le graphique de régulation"}}},Gt={window_open:"Fenêtre ouverte",window_bypass:"Bypass fenêtre activé",eco:"Eco",overpowering:"Sur-puissance détectée",none:"Manuel",comfort:"Confort",boost:"Boost",frost:"Hors-gel",power:"Délestage",activity:"Activité",presence:"Présence détectée",motion:"Mouvement détecté",auto_regulation_light:"Légère",auto_regulation_medium:"Moyenne",auto_regulation_strong:"Forte",auto_regulation_slow:"Lente",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"Aucun",auto_fan_none:"Aucun",auto_fan_low:"Bas",auto_fan_medium:"Moyen",auto_fan_high:"Haut",auto_fan_turbo:"Turbo",fan_low:"Bas",fan_low_mid:"Bas-moyen",fan_mid:"Moyen",fan_mid_high:"Moyen-haut",fan_high:"Haut",fan_mute:"Silence",fan_turbo:"Turbo",fan_none:"Aucun",fan_auto:"Auto",fan_1:"Vitesse 1",fan_2:"Vitesse 2",fan_3:"Vitesse 3",fan_4:"Vitesse 4",fan_5:"Vitesse 5",change_message:"Clic pour sélectionner le preset",toggle_message:"Clic pour basculer",auto_start_stop:"Stoppé par auto-start/stop",auto_start_stop_enable:"Active/désactive l'auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Endormi","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. pièce",outdoor_temp:"Temp. ext.",safety_warning:"Attention",safety_warning_msg:"défaut de temp.",hvac_off_manual:"Eteint manuellement",hvac_off_auto_start_stop:"Eteint par auto-start/stop",hvac_off_window_detection:"Eteint par détection d'ouverture",hvac_off_sleep_mode:"Eteint par le mode endormi",hvac_off_safety_detection:"Eteint par le mode sécurité",hvac_off_central_mode:"Eteint par le mode central",safety_detected:"Mode sécurité détectée",overpowering_detected:"Sur-puissance détectée",target_temp_window_eco:"Temp. cible : fenêtre éco",target_temp_window_frost:"Temp. cible : fenêtre hors-gel",target_temp_power:"Temp. cible : délestage",target_temp_central_mode:"Temp. cible : mode central",target_temp_activity_detected:"Temp. cible : activité détectée",target_temp_activity_not_detected:"Temp. cible : activité non détectée",target_temp_absence_detected:"Temp. cible : absence détectée",target_temp_timed_preset:"Temporisation d'un preset active",lock_users_active:"Verrouillage utilisateurs actif",lock_automations_active:"Verrouillage automations actif","messages-button":"Pourquoi cet état ?",recalculation_scheduled:"Sous-jacent en cours de mise à jour","window-bypass-button":"Basculer le bypass fenêtre",code_error:"Code incorrect",lock:"Verrouiller",unlock:"Déverrouiller",timed_preset_title:"Durée en minutes (0 = permanent)",timed_preset_active:"Preset temporisé actif",cancel_timed_preset:"Annuler le preset temporisé",heating_failure:"Défaut de chauffage détecté",cooling_failure:"Défaut de refroidissement détecté",increase_temp:"Augmenter la température",decrease_temp:"Diminuer la température",night_mode:"Mode nuit",undefined:"Aucun",auto_fan_boost:"Boost",not_initialized:"Erreur d'initialisation",preset_mod_title:"Températures des presets",preset_mod_no_entities:"Aucune entité de température de preset trouvée pour cet appareil.",preset_row_heat:"Chauffe",preset_row_heat_away:"Chauffe absent",preset_row_cool:"Clim.",preset_row_cool_away:"Clim. absent",regulation_chart_title:"Graphique de régulation"},Qt={common:Xt,editor:Kt,extra_states:Gt},Jt=Object.freeze({__proto__:null,common:Xt,default:Qt,editor:Kt,extra_states:Gt}),te={version:"Версия",current:"Текущая"},ee={card:{climate:{autoStartStopEnableEntity:"Сущность автоматического старта/стопа",powerEntity:"Сущность потребления энергии",disable_window:"Отключить окно",disable_autoStartStop:"Отключить автоматический старт/стоп",disable_overpowering:"Отключить перегрузку",disable_heat:"Отключить обогрев",disable_cool:"Отключить охлаждение",disable_heat_cool:"Отключить обогрев/охлаждение",disable_auto:"Отключить авто",disable_fan_only:"Отключить только вентилятор",disable_dry:"Отключить осушение",disable_off:"Отключить режим выключения",disable_sleep:"Отключить спящий режим",disable_menu:"Отключить меню",set_current_as_main:"Поменять местами целевую и текущую температуру",disable_safety_warning:"Отключить сообщения безопасности",disable_buttons:"Отключить кнопки плюс/минус",disable_power_infos:"Отключить информацию о питании",disable_auto_fan_infos:"Отключить информацию автовентилятора",disable_name:"Отключить название",disable_target_icon:"Отключить иконку цели",allow_lock_toggle:"Разрешить блокировку/разблокировку с карты",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Разрешить изменение температур пресетов",show_status_text:"Показывать текущий статус в виде текста",show_background_gradient_on_active:"Показывать фоновый градиент ползунка, когда сущность активна",show_regulation_chart:"Show regulation chart"}}},ie={window_open:"Окно открыто",window_bypass:"Обход окна активирован",night_mode:"Ночной режим",eco:"Эко",overpowering:"Обнаружена перегрузка",none:"Ручной",comfort:"Комфорт",boost:"Турбо",frost:"Защита от замерзания",power:"Перегрузка",activity:"Обнаружена активность",presence:"Обнаружено присутствие",motion:"Обнаружено движение",undefined:"Нет",auto_regulation_light:"Легкий",auto_regulation_medium:"Средний",auto_regulation_strong:"Сильный",auto_regulation_slow:"Медленный",auto_regulation_expert:"Экспертный",auto_fan_mode:"Авторежим вентилятора",auto_fan_mode_off:"Нет",auto_fan_none:"Нет",auto_fan_low:"Низкий",auto_fan_medium:"Средний",auto_fan_high:"Высокий",auto_fan_boost:"Турбо",fan_low:"Низкий",fan_low_mid:"Низкий-средний",fan_mid:"Средний",fan_mid_high:"Средний-высокий",fan_high:"Высокий",fan_mute:"Тихий",fan_turbo:"Турбо",fan_none:"Нет",fan_auto:"Авто",change_message:"Клик для смены предустановки",toggle_message:"Клик для переключения",auto_start_stop:"Остановлено авто-старт/стопом",auto_start_stop_enable:"Включить/отключить авто-старт/стоп",auto_start_stop_label:"Авто-старт/стоп",temp_unavailable:"-",sleep:"Сон",minutes:"мин",room_temp:"Температура в помещении",outdoor_temp:"Уличная температура",lock_users_active:"Пользовательское управление заблокировано",lock_automations_active:"Изменения автоматизации заблокированы",code_error:"Неверный код",lock:"Блокировать",unlock:"Разблокировать",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5","New strings for recent edits. Please translate":"-------------------------------------",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температуры пресетов",preset_mod_no_entities:"Не найдено объектов температуры пресетов для этого устройства.",preset_row_heat:"Обогрев",preset_row_heat_away:"Обогрев (отсутствие)",preset_row_cool:"Охлаждение",preset_row_cool_away:"Охлаждение (отсутствие)",regulation_chart_title:"Regulation chart"},oe="Тема",ne="Классический",ae="VTherm",se="Без цвета",re="Gunmalmg",le={common:te,editor:ee,extra_states:ie,theme:oe,theme_classic:ne,theme_vtherm:ae,theme_uncolored:se,theme_gunmalmg:re},ce=Object.freeze({__proto__:null,common:te,default:le,editor:ee,extra_states:ie,theme:oe,theme_classic:ne,theme_gunmalmg:re,theme_uncolored:se,theme_vtherm:ae}),de={version:"wersja",current:"aktualna"},he={card:{climate:{allow_lock_toggle:"Zezwalaj na blokowanie/odblokowanie karty",autoStartStopEnableEntity:"Encja autoSTART/autoSTOP",powerEntity:"Encja poboru mocy",disable_window:"Wyłącz okno",disable_autoStartStop:"Wyłącz autoSTART/autoSTOP",disable_overpowering:"Wyłącz przeciążenie",disable_heat:"Wyłącz tryb grzania",disable_cool:"Wyłącz tryb chłodzenia",disable_heat_cool:"Wyłącz tryb 'grzanie/chłodzenie'",disable_auto:"Wyłącz tryb automatyczny",disable_fan_only:"Wyłącz tryb wentylatora",disable_dry:"Wyłącz tryb osuszania",disable_off:"Wyłącz tryb 'OFF'",disable_sleep:"Wyłącz tryb uśpienia",disable_menu:"Wyłącz menu",set_current_as_main:"Zamień temperaturę docelową z temperaturą pomieszczenia",disable_safety_warning:"Wyłącz ostrzeżenie bezpieczeństwa",disable_buttons:"Wyłącz przyciski +/- (plus/minus)",disable_power_infos:"Wyłącz komunikaty mocy",disable_auto_fan_infos:"Wyłącz komunikaty autowentylacji",disable_name:"Wyłącz nazwę",disable_target_icon:"Wyłącz ikonę",theme:"Motyw",theme_classic:"Klasyczny",theme_vtherm:"VTherm",theme_uncolored:"Bez koloru",theme_gunmalmg:"Gunmalmg",section_all_themes:"Dla wszystkich motywów",section_classic_only:"Dla motywu klasycznego, bez koloru i VTherm",menu_system:"Menu systemowe",disable_presets:"Wyłącz presety",disable_timed_preset:"Wyłącz czas trwania presetu",use_manual_duration_input:"Zamiast selektora zezwól na ręczne ustawienie czasu",allow_preset_modification:"Zezwól na modyfikację temperatur ustawień wstępnych",show_status_text:"Pokaż aktualny status jako tekst",show_background_gradient_on_active:"Pokaż gradient tła suwaka, gdy encja jest aktywna",show_regulation_chart:"Show regulation chart"}}},ue={window_open:"Otwarte okno",window_bypass:"Załączone pomijanie okien",night_mode:"Tryb nocny",eco:"Tryb Eko",overpowering:"Wykryte przeciążenie",none:"Ręczny",theme:"Motyw",theme_classic:"Klasyczny",theme_vtherm:"VTherm",theme_uncolored:"Bez koloru",theme_gunmalmg:"Gunmalmg",comfort:"Komfort",boost:"Boost",frost:"Ochrona przed mrozem",power:"Przeciążenie",activity:"Wykryto aktywność",presence:"Wykryto obecność",motion:"Wykryto ruch",undefined:"Brak",auto_regulation_light:"Słaby",auto_regulation_medium:"Średni",auto_regulation_strong:"Silny",auto_regulation_slow:"Powolny",auto_regulation_expert:"Ekspert",auto_fan_mode:"Autowentylacja",auto_fan_mode_off:"Wyłączony",auto_fan_none:"Brak",auto_fan_low:"Niski",auto_fan_medium:"Średni",auto_fan_high:"Wysoki",auto_fan_boost:"Boost",fan_low:"Niski",fan_low_mid:"Niskośredni",fan_mid:"Średni",fan_mid_high:"Średniowysoki",fan_high:"Wysoki",fan_mute:"Cichy",fan_turbo:"Turbo",fan_none:"Brak",fan_auto:"Auto",change_message:"Kliknij aby zmienić preset",toggle_message:"Kliknij aby przełączyć",auto_start_stop:"Zatrzymany przez autoSTART/autoSTOP",auto_start_stop_enable:"Załącz/wyłącz autoSTART/autoSTOP",auto_start_stop_label:"AutoSTART/autoSTOP",temp_unavailable:"-",sleep:"Uśpienie","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. pomieszczenia",outdoor_temp:"Temp. zewnętrzna",safety_warning:"Ostrzeżenie",safety_warning_msg:"Błąd temperatury",hvac_off_manual:"Wyłączony ręcznie",hvac_off_auto_start_stop:"Wyłączony przez autoSTART/autoSTOP",hvac_off_window_detection:"Wyłączony prze otwarcie okna",hvac_off_sleep_mode:"Wyłączony przez tryb uśpienia",hvac_off_safety_detection:"Wyłączony przez tryb bezpieczny",hvac_off_central_mode:"Wyłączony przez tryb główny",safety_detected:"Wykryty tryb bezpieczny",overpowering_detected:"Wykryte przeciążenie",target_temp_window_eco:"Docelowa temp.: Eko okno",target_temp_window_frost:"Docelowa temp.: ochr. przed mrozem okno",target_temp_power:"Docelowa temp.: moc",target_temp_central_mode:"Docelowa temp.: tryb główny",target_temp_activity_detected:"Docelowa temp.: wykryta aktywność",target_temp_activity_not_detected:"Docelowa temp.: brak aktywności",target_temp_absence_detected:"Docelowa temp.: wykryta nieobecność","messages-button":"Dlaczego taki stan?",recalculation_scheduled:"Aktualizacja urządzeń w toku","window-bypass-button":"Przełącz pomijanie okna",lock_users_active:"Sterowanie użytkownika zablokowane",lock_automations_active:"Zmiany automatyzacji zablokowane",code_error:"Błędny kod",lock:"Zablokuj",unlock:"Odblokuj",heating_failure:"Wykryto błąd ogrzewania",cooling_failure:"Wykryto błąd chłodzenia",fan_1:"Prędkość 1",fan_2:"Prędkość 2",fan_3:"Prędkość 3",fan_4:"Prędkość 4",fan_5:"Prędkość 5",target_temp_timed_preset:"Aktywny preset czasowy",timed_preset_title:"Czas trwania (w min., 0 = stały)",timed_preset_active:"Aktywny preset czasowy",cancel_timed_preset:"Usuń preset czasowy",increase_temp:"Zwiększ temperaturę",decrease_temp:"Obniż temperaturę",not_initialized:"Błąd inicjalizacji",preset_mod_title:"Temperatury ustawień wstępnych",preset_mod_no_entities:"Nie znaleziono jednostek temperatury ustawień wstępnych dla tego urządzenia.",preset_row_heat:"Ogrzewanie",preset_row_heat_away:"Ogrzewanie (nieobecność)",preset_row_cool:"Chłodzenie",preset_row_cool_away:"Chłodzenie (nieobecność)",regulation_chart_title:"Regulation chart"},me={common:de,editor:he,extra_states:ue},pe=Object.freeze({__proto__:null,common:de,default:me,editor:he,extra_states:ue}),_e={version:"verzia",current:"aktuálny"},ge={card:{climate:{disable_window:"Zakázať okno",disable_overpowering:"Zakázať leto",disable_heat:"Zakázať kúrenie",disable_cool:"Zakázať chladenie",disable_heat_cool:"Zakázať kúrenie/chladenie",disable_auto:"Zakázat automatic",disable_fan_only:"Zakázať režim ventilátora",disable_dry:"Zakázať sušenie",disable_off:"Vypnúť",disable_menu:"Zakázať menu",disable_safety_warning:"Zakázať bezpečnostné správy",disable_buttons:"Zakázať plus/mínus tlačidlá",eco_temperature:"Eco teplota",set_current_as_main:"Vymeňte cieľ za miesta s aktuálnou teplotou",allow_lock_toggle:"Povoliť uzamknutie/odomknutie z karty",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Povoliť úpravu teplôt predvolieb",show_status_text:"Zobraziť aktuálny stav textom",show_background_gradient_on_active:"Zobraziť prechod pozadia posúvača, keď je entita aktívna",show_regulation_chart:"Show regulation chart"}}},fe={window_open:"Okno otvorené",night_mode:"Nočný mód",eco:"Eco",overpowering:"Leto",lock_users_active:"Ovládanie používateľa zamknuté",lock_automations_active:"Zmeny automatizácie zamknuté",code_error:"Chybný kód",lock:"Zamknúť",unlock:"Odomknúť",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Teploty predvolieb",preset_mod_no_entities:"Pre toto zariadenie neboli nájdené žiadne entity teplôt predvolieb.",preset_row_heat:"Kúrenie",preset_row_heat_away:"Kúrenie (neprítomnosť)",preset_row_cool:"Chladenie",preset_row_cool_away:"Chladenie (neprítomnosť)",regulation_chart_title:"Regulation chart"},be="Téma",ve="Klasický",ye="VTherm",we="Bez farby",xe="Gunmalmg",ke={common:_e,editor:ge,extra_states:fe,theme:be,theme_classic:ve,theme_vtherm:ye,theme_uncolored:we,theme_gunmalmg:xe},Te={version:"Verzió",current:"Aktuális"},Se={card:{climate:{disable_window:"Ablak kikapcsolás",disable_overpowering:"Nyár kikapcsolás",disable_heat:"Fűtés kikacsolás",disable_cool:"Hűtés kikapcsolás",disable_heat_cool:"Fűtés/Hűtés kikapcsolás",disable_auto:"Auto kikapcsolás",disable_fan_only:"Csak ventillátor kikapcsolás",disable_dry:"Szárítás kikapcsolás",disable_off:"Kikapcsolás inaktiválás",eco_temperature:"Eco hőmérséklet",set_current_as_main:"Aktuális hőmérséklet használata",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Előbeállítási hőmérsékletek módosításának engedélyezése",show_status_text:"Aktuális állapot megjelenítése szövegként",show_background_gradient_on_active:"A csúszka háttérszínátmenetének megjelenítése, ha az entitás aktív",show_regulation_chart:"Show regulation chart"}}},Me={window_open:"Ablak nyitva",night_mode:"Éjszakai mód",eco:"Eco",overpowering:"Nyár",lock_users_active:"Felhasználói vezérlők zárolva",lock_automations_active:"Automatizálási változtatások zárolva",code_error:"Rossz kód",lock:"Zárolás",unlock:"Feloldás",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Előbeállítási hőmérsékletek",preset_mod_no_entities:"Nem találhatók előbeállítási hőmérséklet entitások ehhez az eszközhöz.",preset_row_heat:"Fűtés",preset_row_heat_away:"Fűtés (távol)",preset_row_cool:"Hűtés",preset_row_cool_away:"Hűtés (távol)",regulation_chart_title:"Regulation chart"},De="Téma",Ce="Klasszikus",Ae="VTherm",Pe="Színtelen",Ee="Gunmalmg",Le={common:Te,editor:Se,extra_states:Me,theme:De,theme_classic:Ce,theme_vtherm:Ae,theme_uncolored:Pe,theme_gunmalmg:Ee},$e={version:"version",current:"nuværende"},ze={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillad ændring af forudindstillingstemperaturer",show_status_text:"Vis aktuel status som tekst",show_background_gradient_on_active:"Vis skyderens baggrundsgradient, når enheden er aktiv",show_regulation_chart:"Show regulation chart"}}},Oe={window_open:"Vindue åben",night_mode:"Nattilstand",eco:"Eco",overpowering:"Overpowering",lock_users_active:"Brugerkontroller låst",lock_automations_active:"Automatiske ændringer låst",code_error:"Forkert kode",lock:"Lås",unlock:"Lås op",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Forudindstilte temperaturer",preset_mod_no_entities:"Ingen forudindstillede temperaturenheder fundet for denne enhed.",preset_row_heat:"Varme",preset_row_heat_away:"Varme fraværende",preset_row_cool:"Køling",preset_row_cool_away:"Køling fraværende",regulation_chart_title:"Regulation chart"},Ve="Tema",He="Klassisk",Re="VTherm",Ie="Ufarvet",Ne="Gunmalmg",Fe={common:$e,editor:ze,extra_states:Oe,theme:Ve,theme_classic:He,theme_vtherm:Re,theme_uncolored:Ie,theme_gunmalmg:Ne},We={version:"version",current:"Actual"},Be={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",show_status_text:"Mostrar el estado actual en texto",show_background_gradient_on_active:"Mostrar el degradado de fondo del control deslizante cuando la entidad está activa",allow_preset_modification:"Allow preset temperature modification",show_regulation_chart:"Show regulation chart"}}},je={window_open:"Ventana abierta",night_mode:"Modo noche",eco:"Eco",overpowering:"Verano",lock_users_active:"Controles de usuario bloqueados",lock_automations_active:"Cambios de automatización bloqueados",code_error:"Código incorrecto",lock:"Bloquear",unlock:"Desbloquear",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Aumentar la temperatura",decrease_temp:"Disminuir la temperatura",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",not_initialized:"Initialisation error",preset_mod_title:"Temperaturas de presets",preset_mod_no_entities:"No se encontraron entidades de temperatura de preset para este dispositivo.",preset_row_heat:"Calefacción",preset_row_heat_away:"Calefacción ausente",preset_row_cool:"Refrigeración",preset_row_cool_away:"Refrigeración ausente",regulation_chart_title:"Regulation chart"},Ue="Tema",Ye="Clásico",qe="VTherm",Ze="Sin color",Xe="Gunmalmg",Ke={common:We,editor:Be,extra_states:je,theme:Ue,theme_classic:Ye,theme_vtherm:qe,theme_uncolored:Ze,theme_gunmalmg:Xe},Ge={version:"versiyon",current:"şimdiki"},Qe={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Ön ayar sıcaklıklarının değiştirilmesine izin ver",show_status_text:"Mevcut durumu metin olarak göster",show_background_gradient_on_active:"Varlık etkinken kaydırıcı arka plan gradyanını göster",show_regulation_chart:"Show regulation chart"}}},Je={window_open:"Pencere açık",night_mode:"Gece modu",eco:"Eco",overpowering:"Yaz",lock_users_active:"Kullanıcı kontrolleri kilitlendi",lock_automations_active:"Otomasyon değişiklikleri kilitlendi",code_error:"Hatalı kod",lock:"Kilitle",unlock:"Kilidi aç",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Ön ayar sıcaklıkları",preset_mod_no_entities:"Bu cihaz için ön ayar sıcaklığı varlıkları bulunamadı.",preset_row_heat:"Isıtma",preset_row_heat_away:"Isıtma (uzakta)",preset_row_cool:"Soğutma",preset_row_cool_away:"Soğutma (uzakta)",regulation_chart_title:"Regulation chart"},ti="Tema",ei="Klasik",ii="VTherm",oi="Renksiz",ni="Gunmalmg",ai={common:Ge,editor:Qe,extra_states:Je,theme:ti,theme_classic:ei,theme_vtherm:ii,theme_uncolored:oi,theme_gunmalmg:ni},si={version:"versione",current:"attuale"},ri={card:{climate:{autoStartStopEnableEntity:"Entità di avvio/arresto automatico",powerEntity:"Entità di consumo energetico",theme:"Tema",theme_classic:"Classico",theme_vtherm:"VTherm",theme_uncolored:"Senza colore",theme_gunmalmg:"Gunmalmg",section_all_themes:"Per tutti i temi",section_classic_only:"Per i temi Classic, VTherm e Uncolored",menu_system:"System menu",disable_window:"Disabilita la finestra",disable_autoStartStop:"Disabilita Avvio/Arresto automatico",disable_overpowering:"Disabilita la sovralimentazione",disable_heat:"Disabilita Riscalda",disable_cool:"Disabilita Raffresca",disable_heat_cool:"Disabilita Riscalda/Raffredda",disable_auto:"Disabilita Automatico",disable_fan_only:"Disabilita Ventilazione",disable_dry:"Disabilita Deumidifica",disable_off:"Disabilita off",disable_menu:"Disabilita menu",set_current_as_main:"Scambia Setpoint con Temperatura ambiente",disable_safety_warning:"Disabilita i messaggi di sicurezza",disable_buttons:"Disabilita pulsanti Più/Meno",disable_power_infos:"Disabilita Info Potenza",disable_auto_fan_infos:"Disabilita Info auto-fan",disable_name:"Disabilita nome",disable_target_icon:"Disabilita icona obbiettivo",allow_lock_toggle:"Consenti blocco/sblocco dalla card",disable_sleep:"Disabilita modo riposo",disable_timed_preset:"Disattiva immissione durata preimpostata",use_manual_duration_input:"Consenti l'inserimento manuale della durata invece della selezione",disable_presets:"Disabilita preimpostazioni",allow_preset_modification:"Consenti la modifica delle temperature dei preset",show_status_text:"Mostra lo stato attuale come testo",show_background_gradient_on_active:"Mostra il gradiente di sfondo del cursore quando l'entità è attiva",show_regulation_chart:"Show regulation chart"}}},li={window_open:"Finestra aperta",window_bypass:"Bypass finestra Attivo",eco:"Eco",overpowering:"Rilevata Sovrapotenza",none:"Manuale",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Sovrapotenza",activity:"Rilevata Attività",presence:"Rilevata Presenza",motion:"Rilevato movimento",auto_regulation_light:"Leggero",auto_regulation_medium:"Medio",auto_regulation_strong:"Forte",auto_regulation_slow:"Lento",auto_regulation_expert:"Esperto",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"Nulla",auto_fan_none:"Nulla",auto_fan_low:"Basso",auto_fan_medium:"Medio",auto_fan_high:"Alto",auto_fan_boost:"Boost",fan_low:"Basso",fan_low_mid:"Medio-basso",fan_mid:"Medio",fan_mid_high:"Medio-alto",fan_high:"Alto",fan_mute:"Silenzioso",fan_turbo:"Turbo",fan_none:"Nulla",fan_auto:"Auto",fan_1:"Velocità 1",fan_2:"Velocità 2",fan_3:"Velocità 3",fan_4:"Velocità 4",fan_5:"Velocità 5",change_message:"Click per cambio preimpostazione",toggle_message:"Click per commutare",auto_start_stop:"Fermato da auto-start/stop",auto_start_stop_enable:"Abilita/disabilita auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Riposo","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. ambiente",outdoor_temp:"Temp. esterna",safety_warning:"Avviso",safety_warning_msg:"Guasto Temp.",hvac_off_manual:"Spento manualmente",hvac_off_auto_start_stop:"Spento da auto-start/stop",hvac_off_window_detection:"Spento da rilevamento finestra",hvac_off_sleep_mode:"Spento da modo notte",hvac_off_safety_detection:"Spento da modalità sicurezza",hvac_off_central_mode:"Spento da modalità centralizzato",safety_detected:"Modalità sicurezza rilavata",overpowering_detected:"Sovrapotenza rilevata",target_temp_window_eco:"Temp. impostata: window eco",target_temp_window_frost:"Temp. impostata: window freddo",target_temp_power:"Temp. impostata: power",target_temp_central_mode:"Temp. impostata: modalità centralizzata",target_temp_activity_detected:"Temp. impostata: rilevata atività",target_temp_activity_not_detected:"Temp. impostata: attività non rilevata",target_temp_absence_detected:"Temp. impostata: assenza rilevata",target_temp_timed_preset:"Preimpostazione a tempo attiva",lock_users_active:"Controlli utente bloccati",lock_automations_active:"Modifiche automazioni bloccate","messages-button":"Perchè questo stato?",recalculation_scheduled:"Aggiornamento sottostanti in corso","window-bypass-button":"Commuta bypass finestra",code_error:"Codice errato",lock:"Blocca",unlock:"Sblocca",timed_preset_title:"Durata in minuti (0 = permanente)",timed_preset_active:"Preimpostazione temporizzata attiva",cancel_timed_preset:"Disattiva Preimpostazione temporizzata",heating_failure:"Rilevato guasto al riscaldamento",cooling_failure:"Rilevato guasto al raffrescamento",increase_temp:"Aumenta la temperatura",decrease_temp:"Diminuisci la temperatura",night_mode:"Modalità notte",undefined:"Nulla",not_initialized:"Errore di inizializzazione",preset_mod_title:"Temperature dei preset",preset_mod_no_entities:"Nessuna entità di temperatura preset trovata per questo dispositivo.",preset_row_heat:"Riscaldamento",preset_row_heat_away:"Riscaldamento (assente)",preset_row_cool:"Raffreddamento",preset_row_cool_away:"Raffreddamento (assente)",regulation_chart_title:"Regulation chart"},ci={common:si,editor:ri,extra_states:li},di={version:"versão",current:"actual"},hi={card:{climate:{disable_window:"Desactivar Janela",disable_overpowering:"Desactivar Verão",disable_heat:"Desactivar Aquecimento",disable_cool:"Desactivar Arrefecimento",disable_heat_cool:"Desactivar Aquecimento/Arrefecimento",disable_auto:"Desactivar Auto",disable_fan_only:"Desactivar Ventilação",disable_dry:"Desactivar Secagem",disable_off:"Desactivar Off",eco_temperature:"Modo Eco",set_current_as_main:"Mudar para a temperatura local actual",theme:"Tema",theme_classic:"Clássico",theme_vtherm:"VTherm",theme_uncolored:"Sem cor",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permitir modificação das temperaturas de predefinição",show_status_text:"Mostrar o estado atual em texto",show_background_gradient_on_active:"Mostrar o gradiente de fundo do controle deslizante quando a entidade está ativa",show_regulation_chart:"Show regulation chart"}}},ui={window_open:"Janela Aberta",night_mode:"Modo Noturno",eco:"Eco",overpowering:"Verão",lock_users_active:"Controlos de utilizador bloqueados",lock_automations_active:"Alterações de automação bloqueadas",code_error:"Código incorreto",lock:"Bloquear",unlock:"Desbloquear",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperaturas das predefinições",preset_mod_no_entities:"Nenhuma entidade de temperatura de predefinição encontrada para este dispositivo.",preset_row_heat:"Aquecimento",preset_row_heat_away:"Aquecimento (ausente)",preset_row_cool:"Arrefecimento",preset_row_cool_away:"Arrefecimento (ausente)",regulation_chart_title:"Regulation chart"},mi={common:di,editor:hi,extra_states:ui},pi={version:"版本",current:"当前"},_i={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"允许修改预设温度",show_status_text:"以文本形式显示当前状态",show_background_gradient_on_active:"当实体处于活动状态时显示滑块背景渐变",show_regulation_chart:"Show regulation chart"}}},gi={window_open:"窗户打开",night_mode:"夜间模式",eco:"节能",overpowering:"夏季",lock_users_active:"用户控制已锁定",lock_automations_active:"自动化更改已锁定",code_error:"代码错误",lock:"锁定",unlock:"解锁",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"预设温度",preset_mod_no_entities:"未找到该设备的预设温度实体。",preset_row_heat:"制热",preset_row_heat_away:"制热(离开)",preset_row_cool:"制冷",preset_row_cool_away:"制冷(离开)",regulation_chart_title:"Regulation chart"},fi="VTherm",bi="Gunmalmg",vi={common:pi,editor:_i,extra_states:gi,theme:"主题",theme_classic:"经典",theme_vtherm:fi,theme_uncolored:"无颜色",theme_gunmalmg:bi},yi={version:"версія",current:"поточний"},wi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Дозволити зміну температур попередніх налаштувань",show_status_text:"Показувати поточний статус у вигляді тексту",show_background_gradient_on_active:"Показувати фоновий градієнт повзунка, коли сутність активна",show_regulation_chart:"Show regulation chart"}}},xi={window_open:"Вікно відчинено",night_mode:"Нічний режим",eco:"Економія",overpowering:"Літо",lock_users_active:"Керування користувача заблоковано",lock_automations_active:"Зміни автоматизації заблоковані",code_error:"Невірний код",lock:"Блокувати",unlock:"Розблокувати",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температури попередніх налаштувань",preset_mod_no_entities:"Не знайдено об'єктів температури попередніх налаштувань для цього пристрою.",preset_row_heat:"Опалення",preset_row_heat_away:"Опалення (відсутність)",preset_row_cool:"Охолодження",preset_row_cool_away:"Охолодження (відсутність)",regulation_chart_title:"Regulation chart"},ki="Тема",Ti="Класичний",Si="VTherm",Mi="Без кольору",Di="Gunmalmg",Ci={common:yi,editor:wi,extra_states:xi,theme:ki,theme_classic:Ti,theme_vtherm:Si,theme_uncolored:Mi,theme_gunmalmg:Di},Ai={version:"έκδοση",current:"τρέχουσα"},Pi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Να επιτρέπεται η τροποποίηση θερμοκρασιών προεπιλογής",show_status_text:"Εμφάνιση τρέχουσας κατάστασης σε κείμενο",show_background_gradient_on_active:"Εμφάνιση της διαβάθμισης φόντου του ρυθμιστικού όταν η οντότητα είναι ενεργή",show_regulation_chart:"Show regulation chart"}}},Ei={window_open:"Παράθυρο ανοικτό",night_mode:"Λειτουργία νυκτός",eco:"Εξοικονόμηση",overpowering:"Καλοκαίρι",lock_users_active:"Έλεγχοι χρήστη κλειδωμένοι",lock_automations_active:"Αλλαγές αυτοματισμών κλειδωμένες",code_error:"Λάθος κωδικός",lock:"Κλείδωμα",unlock:"Ξεκλείδωμα",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Θερμοκρασίες προεπιλογής",preset_mod_no_entities:"Δεν βρέθηκαν οντότητες θερμοκρασίας προεπιλογής για αυτή τη συσκευή.",preset_row_heat:"Θέρμανση",preset_row_heat_away:"Θέρμανση (απουσία)",preset_row_cool:"Ψύξη",preset_row_cool_away:"Ψύξη (απουσία)",regulation_chart_title:"Regulation chart"},Li="Θέμα",$i="Κλασικό",zi="VTherm",Oi="Χωρίς χρώμα",Vi="Gunmalmg",Hi={common:Ai,editor:Pi,extra_states:Ei,theme:Li,theme_classic:$i,theme_vtherm:zi,theme_uncolored:Oi,theme_gunmalmg:Vi},Ri={version:"versie",current:"huidig"},Ii={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Voorkeursinstellingstemperaturen aanpassen toestaan",show_status_text:"Toon huidige status als tekst",show_background_gradient_on_active:"Toon achtergrondgradiënt van de schuifregelaar wanneer de entiteit actief is",show_regulation_chart:"Show regulation chart"}}},Ni={window_open:"Raam open",night_mode:"Nacht modus",eco:"Eco",overpowering:"Zomer",lock_users_active:"Gebruikersbediening vergrendeld",lock_automations_active:"Automatisatie wijzigingen vergrendeld",code_error:"Foute code",lock:"Vergrendelen",unlock:"Ontgrendelen",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Voorkeursinstellingstemperaturen",preset_mod_no_entities:"Geen entiteiten voor voorkeursinstellingstemperaturen gevonden voor dit apparaat.",preset_row_heat:"Verwarming",preset_row_heat_away:"Verwarming (afwezig)",preset_row_cool:"Koeling",preset_row_cool_away:"Koeling (afwezig)",regulation_chart_title:"Regulation chart"},Fi="Thema",Wi="Classic",Bi="VTherm",ji="Ongekleurd",Ui="Gunmalmg",Yi={common:Ri,editor:Ii,extra_states:Ni,theme:Fi,theme_classic:Wi,theme_vtherm:Bi,theme_uncolored:ji,theme_gunmalmg:Ui},qi={version:"versjon",current:"nåværende"},Zi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillat endring av forhåndsinnstillingstemperaturer",show_status_text:"Vis gjeldende status som tekst",show_background_gradient_on_active:"Vis glidebryterens bakgrunnsgradient når enheten er aktiv",show_regulation_chart:"Show regulation chart"}}},Xi={window_open:"Vindu åpent",night_mode:"Nattmodus",eco:"Eco",overpowering:"Sommer",lock_users_active:"Brukerkontroller låst",lock_automations_active:"Automatiseringsendringer låst",code_error:"Feil kode",lock:"Lås",unlock:"Lås opp",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Forhåndsinnstillingstemperaturer",preset_mod_no_entities:"Ingen forhåndsinnstillingstemperaturenheter funnet for denne enheten.",preset_row_heat:"Varme",preset_row_heat_away:"Varme (fraværende)",preset_row_cool:"Kjøling",preset_row_cool_away:"Kjøling (fraværende)",regulation_chart_title:"Regulation chart"},Ki="Tema",Gi="Klassisk",Qi="VTherm",Ji="Uten farge",to="Gunmalmg",eo={common:qi,editor:Zi,extra_states:Xi,theme:Ki,theme_classic:Gi,theme_vtherm:Qi,theme_uncolored:Ji,theme_gunmalmg:to},io={version:"verze",current:"aktuální"},oo={card:{climate:{disable_window:"Zakázat okno",disable_overpowering:"Zakázat léto",disable_heat:"Zakázat topení",disable_cool:"Zakázat chlazení",disable_heat_cool:"Zakázat topení/chlazení",disable_auto:"Zakázať automatic",disable_fan_only:"Zakázat pouze ventilátor",disable_dry:"Zakázat sušení",disable_off:"Zakázat vypnuto",disable_menu:"Zakázat menu",disable_safety_warning:"Zakázat bezpečnostní oznámení",disable_buttons:"Zakázat tlačítka plus/minus",eco_temperature:"Eco teplota",set_current_as_main:"Prohodit místa cílovoé a aktáalní teploty",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Povolit úpravu teplot předvoleb",show_status_text:"Zobrazit aktuální stav textem",show_background_gradient_on_active:"Zobrazit přechod pozadí posuvníku, když je entita aktivní",show_regulation_chart:"Show regulation chart"}}},no={window_open:"okno otevřeno",night_mode:"Noční režim",eco:"Eco",overpowering:"Léto",lock_users_active:"Uživatelské ovládání zamčeno",lock_automations_active:"Změny automatizace zamčeny",code_error:"Chybný kód",lock:"Zamknout",unlock:"Odemknout",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Teploty předvoleb",preset_mod_no_entities:"Pro toto zařízení nebyly nalezeny žádné entity teplot předvoleb.",preset_row_heat:"Topení",preset_row_heat_away:"Topení nepřítomnost",preset_row_cool:"Chlazení",preset_row_cool_away:"Chlazení nepřítomnost",regulation_chart_title:"Regulation chart"},ao="Téma",so="Klasické",ro="VTherm",lo="Bez barvy",co="Gunmalmg",ho={common:io,editor:oo,extra_states:no,theme:ao,theme_classic:so,theme_vtherm:ro,theme_uncolored:lo,theme_gunmalmg:co},uo={version:"različica",current:"trenutno"},mo={card:{climate:{allow_lock_toggle:"Dovoli zaklepanje/odklepanje iz kartice",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Dovoli spremembo temperatur prednastavitev",show_status_text:"Prikaži trenutno stanje kot besedilo",show_background_gradient_on_active:"Prikaži preliv ozadja drsnika, ko je entiteta aktivna",show_regulation_chart:"Show regulation chart"}}},po={window_open:"Okno odprto",night_mode:"Nočni način",eco:"Eko",overpowering:"Poletje",lock_users_active:"Uporabniške kontrole zaklenjene",lock_automations_active:"Spremembe avtomatizacije zaklenjene",code_error:"Napačna koda",lock:"Zakleni",unlock:"Odkleni",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperature prednastavitev",preset_mod_no_entities:"Za to napravo ni bila najdena nobena entiteta temperature prednastavitve.",preset_row_heat:"Ogrevanje",preset_row_heat_away:"Ogrevanje (odsotnost)",preset_row_cool:"Hlajenje",preset_row_cool_away:"Hlajenje (odsotnost)",regulation_chart_title:"Regulation chart"},_o="Tema",go="Klasična",fo="VTherm",bo="Brez barve",vo="Gunmalmg",yo={common:uo,editor:mo,extra_states:po,theme:_o,theme_classic:go,theme_vtherm:fo,theme_uncolored:bo,theme_gunmalmg:vo},wo={version:"version",current:"Nuvarande"},xo={window_open:"Fönster öppet",night_mode:"Nattläge",eco:"Eco",overpowering:"Sommar",lock_users_active:"Användarkontroller låsta",lock_automations_active:"Automationsändringar låsta",code_error:"Fel kod",lock:"Lås",unlock:"Lås upp",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Förinställningstemperaturer",preset_mod_no_entities:"Inga förinställningstemperaturenheter hittades för den här enheten.",preset_row_heat:"Värme",preset_row_heat_away:"Värme (frånvaro)",preset_row_cool:"Kyla",preset_row_cool_away:"Kyla (frånvaro)",regulation_chart_title:"Regulation chart"},ko="Tema",To="Klassisk",So="VTherm",Mo="Omdfärgad",Do="Gunmalmg",Co={card:{climate:{autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",allow_lock_toggle:"Allow lock/unlock from card",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillåt ändring av förinställningstemperaturer",show_status_text:"Visa aktuell status som text",show_background_gradient_on_active:"Visa reglagets bakgrundsgradient när entiteten är aktiv",show_regulation_chart:"Show regulation chart"}}},Ao={common:wo,extra_states:xo,theme:ko,theme_classic:To,theme_vtherm:So,theme_uncolored:Mo,theme_gunmalmg:Do,editor:Co},Po={version:"версия",currrent:"текущий",current:"current"},Eo={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Позволи промяна на температурите на предварителни настройки",show_status_text:"Показване на статуса като текст",show_background_gradient_on_active:"Показване на фоновия градиент на плъзгача, когато обектът е активен",show_regulation_chart:"Show regulation chart"}}},Lo={window_open:"Отворен прозорец",night_mode:"Нощен режим",eco:"Екологичен режим",overpowering:"Лято",lock_users_active:"Потребителските контроли са заключени",lock_automations_active:"Промените от автоматизации са заключени",code_error:"Грешен код",lock:"Заключване",unlock:"Отключване",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температури на предварителни настройки",preset_mod_no_entities:"Не са намерени обекти за температура на предварителни настройки за това устройство.",preset_row_heat:"Отопление",preset_row_heat_away:"Отопление (отсъствие)",preset_row_cool:"Охлаждане",preset_row_cool_away:"Охлаждане (отсъствие)",regulation_chart_title:"Regulation chart"},$o="Тема",zo="Класически",Oo="VTherm",Vo="Без цвят",Ho="Gunmalmg",Ro={common:Po,editor:Eo,extra_states:Lo,theme:$o,theme_classic:zo,theme_vtherm:Oo,theme_uncolored:Vo,theme_gunmalmg:Ho},Io={version:"version",current:"Nykyinen"},No={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Salli esiasetuslämpötilojen muokkaus",show_status_text:"Näytä nykyinen tila tekstinä",show_background_gradient_on_active:"Näytä liukusäätimen taustaliukuväri, kun entiteetti on aktiivinen",show_regulation_chart:"Show regulation chart"}}},Fo={window_open:"Ikkuna auki",night_mode:"Yötila",eco:"Eco",overpowering:"Kesä",lock_users_active:"Käyttäjän säädöt lukittu",lock_automations_active:"Automaation muutokset lukittu",code_error:"Virheellinen koodi",lock:"Lukitse",unlock:"Avaa lukitus",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Esiasetuslämpötilat",preset_mod_no_entities:"Tälle laitteelle ei löydetty esiasetuslämpötilaobjekteja.",preset_row_heat:"Lämmitys",preset_row_heat_away:"Lämmitys (poissa)",preset_row_cool:"Jäähdytys",preset_row_cool_away:"Jäähdytys (poissa)",regulation_chart_title:"Regulation chart"},Wo="Teema",Bo="Klassinen",jo="VTherm",Uo="Väritön",Yo="Gunmalmg",qo={common:Io,editor:No,extra_states:Fo,theme:Wo,theme_classic:Bo,theme_vtherm:jo,theme_uncolored:Uo,theme_gunmalmg:Yo},Zo={version:"versiune",current:"curent"},Xo={card:{climate:{allow_lock_toggle:"Permite blocarea/deblocarea din card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permite modificarea temperaturilor presetate",show_status_text:"Afișează starea curentă ca text",show_background_gradient_on_active:"Afișează gradientul de fundal al glisorului când entitatea este activă",show_regulation_chart:"Show regulation chart"}}},Ko={window_open:"Fereastră deschisă",night_mode:"Mod noapte",eco:"Eco",overpowering:"Vară",lock_users_active:"Comenzi utilizator blocate",lock_automations_active:"Modificări automatizări blocate",code_error:"Cod incorect",lock:"Blocare",unlock:"Deblocare",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperaturi presetate",preset_mod_no_entities:"Nu s-au găsit entități de temperatură presetată pentru acest dispozitiv.",preset_row_heat:"Încălzire",preset_row_heat_away:"Încălzire (absent)",preset_row_cool:"Răcire",preset_row_cool_away:"Răcire (absent)",regulation_chart_title:"Regulation chart"},Go="Temă",Qo="Clasic",Jo="VTherm",tn="Fără culoare",en="Gunmalmg",on={common:Zo,editor:Xo,extra_states:Ko,theme:Go,theme_classic:Qo,theme_vtherm:Jo,theme_uncolored:tn,theme_gunmalmg:en},nn={version:"versió",current:"Actual"},an={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permet la modificació de les temperatures de preset",show_status_text:"Mostra l'estat actual en text",show_background_gradient_on_active:"Mostra el degradat de fons del control lliscant quan l'entitat està activa",show_regulation_chart:"Show regulation chart"}}},sn={window_open:"Finestra oberta",night_mode:"Mode nocturn",eco:"Eco",overpowering:"Estiu",lock_users_active:"Controls d'usuari bloquejats",lock_automations_active:"Canvis d'automatització bloquejats",code_error:"Codi incorrecte",lock:"Bloquejar",unlock:"Desbloquejar",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperatures dels presets",preset_mod_no_entities:"No s'han trobat entitats de temperatura de preset per a aquest dispositiu.",preset_row_heat:"Calefacció",preset_row_heat_away:"Calefacció absent",preset_row_cool:"Refrigeració",preset_row_cool_away:"Refrigeració absent",regulation_chart_title:"Regulation chart"},rn="Tema",ln="Clàssic",cn="VTherm",dn="Sense color",hn="Gunmalmg",un={common:nn,editor:an,extra_states:sn,theme:rn,theme_classic:ln,theme_vtherm:cn,theme_uncolored:dn,theme_gunmalmg:hn};const mn={en:Bt,de:Zt,fr:Jt,ru:ce,sk:Object.freeze({__proto__:null,common:_e,default:ke,editor:ge,extra_states:fe,theme:be,theme_classic:ve,theme_gunmalmg:xe,theme_uncolored:we,theme_vtherm:ye}),hu:Object.freeze({__proto__:null,common:Te,default:Le,editor:Se,extra_states:Me,theme:De,theme_classic:Ce,theme_gunmalmg:Ee,theme_uncolored:Pe,theme_vtherm:Ae}),pl:pe,da:Object.freeze({__proto__:null,common:$e,default:Fe,editor:ze,extra_states:Oe,theme:Ve,theme_classic:He,theme_gunmalmg:Ne,theme_uncolored:Ie,theme_vtherm:Re}),es:Object.freeze({__proto__:null,common:We,default:Ke,editor:Be,extra_states:je,theme:Ue,theme_classic:Ye,theme_gunmalmg:Xe,theme_uncolored:Ze,theme_vtherm:qe}),tr:Object.freeze({__proto__:null,common:Ge,default:ai,editor:Qe,extra_states:Je,theme:ti,theme_classic:ei,theme_gunmalmg:ni,theme_uncolored:oi,theme_vtherm:ii}),it:Object.freeze({__proto__:null,common:si,default:ci,editor:ri,extra_states:li}),pt:Object.freeze({__proto__:null,common:di,default:mi,editor:hi,extra_states:ui}),cn:Object.freeze({__proto__:null,common:pi,default:vi,editor:_i,extra_states:gi,theme:"主题",theme_classic:"经典",theme_gunmalmg:bi,theme_uncolored:"无颜色",theme_vtherm:fi}),uk:Object.freeze({__proto__:null,common:yi,default:Ci,editor:wi,extra_states:xi,theme:ki,theme_classic:Ti,theme_gunmalmg:Di,theme_uncolored:Mi,theme_vtherm:Si}),el:Object.freeze({__proto__:null,common:Ai,default:Hi,editor:Pi,extra_states:Ei,theme:Li,theme_classic:$i,theme_gunmalmg:Vi,theme_uncolored:Oi,theme_vtherm:zi}),nl:Object.freeze({__proto__:null,common:Ri,default:Yi,editor:Ii,extra_states:Ni,theme:Fi,theme_classic:Wi,theme_gunmalmg:Ui,theme_uncolored:ji,theme_vtherm:Bi}),no:Object.freeze({__proto__:null,common:qi,default:eo,editor:Zi,extra_states:Xi,theme:Ki,theme_classic:Gi,theme_gunmalmg:to,theme_uncolored:Ji,theme_vtherm:Qi}),cs:Object.freeze({__proto__:null,common:io,default:ho,editor:oo,extra_states:no,theme:ao,theme_classic:so,theme_gunmalmg:co,theme_uncolored:lo,theme_vtherm:ro}),sl:Object.freeze({__proto__:null,common:uo,default:yo,editor:mo,extra_states:po,theme:_o,theme_classic:go,theme_gunmalmg:vo,theme_uncolored:bo,theme_vtherm:fo}),sv:Object.freeze({__proto__:null,common:wo,default:Ao,editor:Co,extra_states:xo,theme:ko,theme_classic:To,theme_gunmalmg:Do,theme_uncolored:Mo,theme_vtherm:So}),bg:Object.freeze({__proto__:null,common:Po,default:Ro,editor:Eo,extra_states:Lo,theme:$o,theme_classic:zo,theme_gunmalmg:Ho,theme_uncolored:Vo,theme_vtherm:Oo}),fi:Object.freeze({__proto__:null,common:Io,default:qo,editor:No,extra_states:Fo,theme:Wo,theme_classic:Bo,theme_gunmalmg:Yo,theme_uncolored:Uo,theme_vtherm:jo}),ro:Object.freeze({__proto__:null,common:Zo,default:on,editor:Xo,extra_states:Ko,theme:Go,theme_classic:Qo,theme_gunmalmg:en,theme_uncolored:tn,theme_vtherm:Jo}),ca:Object.freeze({__proto__:null,common:nn,default:un,editor:an,extra_states:sn,theme:rn,theme_classic:ln,theme_gunmalmg:hn,theme_uncolored:dn,theme_vtherm:cn})},pn="en";function _n({hass:t,string:e,search:i="",replace:o=""}){var n;const a=null!==(n=null==t?void 0:t.locale.language)&&void 0!==n?n:pn;let s;try{s=e.split(".").reduce(((t,e)=>t[e]),mn[a])}catch(t){s=e.split(".").reduce(((t,e)=>t[e]),mn.en)}return void 0===s&&(s=e.split(".").reduce(((t,e)=>t[e]),mn.en)),""!==i&&""!==o&&(s=s.replace(i,o)),s}function gn(t,e){try{return t.split(".").reduce(((t,e)=>t[e]),mn[e])}catch(t){return}}function fn(t){return function(e){var i;let o=gn(e,null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:pn);return o||(o=gn(e,pn)),null!=o?o:e}}var bn,vn,yn=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function wn(t,e){if(t.length!==e.length)return!1;for(var i=0;inew Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric"}))),xn((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric"}))),xn((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"numeric",day:"numeric"}))),xn((t=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short"}))),xn((t=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric"}))),xn((t=>new Intl.DateTimeFormat(t.language,{month:"long"}))),xn((t=>new Intl.DateTimeFormat(t.language,{year:"numeric"}))),function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(bn||(bn={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(vn||(vn={}));const kn=xn((t=>{if(t.time_format===vn.language||t.time_format===vn.system){const e=t.time_format===vn.language?t.language:void 0,i=(new Date).toLocaleString(e);return i.includes("AM")||i.includes("PM")}return t.time_format===vn.am_pm}));xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:kn(t)?"numeric":"2-digit",minute:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:kn(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{hour:kn(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{weekday:"long",hour:kn(t)?"numeric":"2-digit",minute:"2-digit",hour12:kn(t)})));const Tn=(t,e,i,o)=>{o=o||{},i=null==i?{}:i;const n=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return n.detail=i,t.dispatchEvent(n),n},Sn=(t,e,i)=>Math.min(Math.max(t,e),i),Mn=(t,e,i)=>{const o=e?(t=>{switch(t.number_format){case bn.comma_decimal:return["en-US","en"];case bn.decimal_comma:return["de","es","it"];case bn.space_comma:return["fr","sv","cs"];case bn.system:return;default:return t.language}})(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==bn.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(o,Dn(t,i)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,Dn(t,i)).format(Number(t))}return"string"==typeof t?t:`${((t,e=2)=>Math.round(t*10**e)/10**e)(t,null==i?void 0:i.maximumFractionDigits).toString()}${"currency"===(null==i?void 0:i.style)?` ${i.currency}`:""}`},Dn=(t,e)=>{const i=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return i;if(!e||!e.minimumFractionDigits&&!e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;i.minimumFractionDigits=e,i.maximumFractionDigits=e}return i};class Cn extends TypeError{constructor(t,e){let i;const{message:o,explanation:n,...a}=t,{path:s}=t,r=0===s.length?o:`At path: ${s.join(".")} -- ${o}`;super(n??r),null!=n&&(this.cause=r),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>i??(i=[t,...e()])}}function An(t){return"object"==typeof t&&null!=t}function Pn(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function En(t,e,i,o){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:n,branch:a}=e,{type:s}=i,{refinement:r,message:l=`Expected a value of type \`${s}\`${r?` with refinement \`${r}\``:""}, but received: \`${Pn(o)}\``}=t;return{value:o,type:s,refinement:r,key:n[n.length-1],path:n,branch:a,...t,message:l}}function*Ln(t,e,i,o){(function(t){return An(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const n of t){const t=En(n,e,i,o);t&&(yield t)}}function*$n(t,e,i={}){const{path:o=[],branch:n=[t],coerce:a=!1,mask:s=!1}=i,r={path:o,branch:n};if(a&&(t=e.coercer(t,r),s&&"type"!==e.type&&An(e.schema)&&An(t)&&!Array.isArray(t)))for(const i in t)void 0===e.schema[i]&&delete t[i];let l="valid";for(const o of e.validator(t,r))o.explanation=i.message,l="not_valid",yield[o,void 0];for(let[c,d,h]of e.entries(t,r)){const e=$n(d,h,{path:void 0===c?o:[...o,c],branch:void 0===c?n:[...n,d],coerce:a,mask:s,message:i.message});for(const i of e)i[0]?(l=null!=i[0].refinement?"not_refined":"not_valid",yield[i[0],void 0]):a&&(d=i[1],void 0===c?t=d:t instanceof Map?t.set(c,d):t instanceof Set?t.add(d):An(t)&&(void 0!==d||c in t)&&(t[c]=d))}if("not_valid"!==l)for(const o of e.refiner(t,r))o.explanation=i.message,l="not_refined",yield[o,void 0];"valid"===l&&(yield[void 0,t])}class zn{constructor(t){const{type:e,schema:i,validator:o,refiner:n,coercer:a=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=i,this.entries=s,this.coercer=a,this.validator=o?(t,e)=>Ln(o(t,e),e,this,t):()=>[],this.refiner=n?(t,e)=>Ln(n(t,e),e,this,t):()=>[]}assert(t,e){return On(t,this,e)}create(t,e){return function(t,e,i){const o=Vn(t,e,{coerce:!0,message:i});if(o[0])throw o[0];return o[1]}(t,this,e)}is(t){return function(t,e){const i=Vn(t,e);return!i[0]}(t,this)}mask(t,e){return function(t,e,i){const o=Vn(t,e,{coerce:!0,mask:!0,message:i});if(o[0])throw o[0];return o[1]}(t,this,e)}validate(t,e={}){return Vn(t,this,e)}}function On(t,e,i){const o=Vn(t,e,{message:i});if(o[0])throw o[0]}function Vn(t,e,i={}){const o=$n(t,e,i),n=function(t){const{done:e,value:i}=t.next();return e?void 0:i}(o);if(n[0]){const t=new Cn(n[0],(function*(){for(const t of o)t[0]&&(yield t[0])}));return[t,void 0]}return[void 0,n[1]]}function Hn(t,e){return new zn({type:t,schema:null,validator:e})}function Rn(){return Hn("any",(()=>!0))}function In(t){return new zn({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[i,o]of e.entries())yield[i,o,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${Pn(t)}`})}function Nn(){return Hn("boolean",(t=>"boolean"==typeof t))}function Fn(t){const e=Pn(t),i=typeof t;return new zn({type:"literal",schema:"string"===i||"number"===i||"boolean"===i?t:null,validator:i=>i===t||`Expected the literal \`${e}\`, but received: ${Pn(i)}`})}function Wn(){return Hn("number",(t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${Pn(t)}`))}function Bn(t){const e=t?Object.keys(t):[],i=Hn("never",(()=>!1));return new zn({type:"object",schema:t||null,*entries(o){if(t&&An(o)){const n=new Set(Object.keys(o));for(const i of e)n.delete(i),yield[i,o[i],t[i]];for(const t of n)yield[t,o[t],i]}},validator:t=>An(t)||`Expected an object, but received: ${Pn(t)}`,coercer:t=>An(t)?{...t}:t})}function jn(t){return new zn({...t,validator:(e,i)=>void 0===e||t.validator(e,i),refiner:(e,i)=>void 0===e||t.refiner(e,i)})}function Un(){return Hn("string",(t=>"string"==typeof t||`Expected a string, but received: ${Pn(t)}`))}function Yn(t){const e=Object.keys(t);return new zn({type:"type",schema:t,*entries(i){if(An(i))for(const o of e)yield[o,i[o],t[o]]},validator:t=>An(t)||`Expected an object, but received: ${Pn(t)}`,coercer:t=>An(t)?{...t}:t})}function qn(t){const e=t.map((t=>t.type)).join(" | ");return new zn({type:"union",schema:null,coercer(e){for(const i of t){const[t,o]=i.validate(e,{coerce:!0});if(!t)return o}return e},validator(i,o){const n=[];for(const e of t){const[...t]=$n(i,e,o),[a]=t;if(!a[0])return[];for(const[e]of t)e&&n.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${Pn(i)}`,...n]}})}const Zn=Bn({user:Un()}),Xn=qn([Nn(),Bn({text:jn(Un()),excemptions:jn(In(Zn))})]),Kn=Bn({action:Fn("url"),url_path:Un(),confirmation:jn(Xn)}),Gn=Bn({action:Fn("call-service"),service:Un(),service_data:jn(Bn()),data:jn(Bn()),target:jn(Bn({entity_id:jn(qn([Un(),In(Un())])),device_id:jn(qn([Un(),In(Un())])),area_id:jn(qn([Un(),In(Un())]))})),confirmation:jn(Xn)}),Qn=Bn({action:Fn("navigate"),navigation_path:Un(),confirmation:jn(Xn)}),Jn=Yn({action:Fn("fire-dom-event")}),ta=Bn({action:function(t){const e={},i=t.map((t=>Pn(t))).join();for(const i of t)e[i]=i;return new zn({type:"enums",schema:e,validator:e=>t.includes(e)||`Expected one of \`${i}\`, but received: ${Pn(e)}`})}(["none","toggle","more-info","call-service","url","navigate"]),confirmation:jn(Xn)});var ea;ea=t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":return Gn;case"fire-dom-event":return Jn;case"navigate":return Qn;case"url":return Kn}return ta},new zn({type:"dynamic",schema:null,*entries(t,e){const i=ea(t,e);yield*i.entries(t,e)},validator:(t,e)=>ea(t,e).validator(t,e),coercer:(t,e)=>ea(t,e).coercer(t,e),refiner:(t,e)=>ea(t,e).refiner(t,e)}),s` + */const bt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends gt{constructor(t){if(super(t),t.type!==ft||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const o=!!e[t];o===this.st.has(t)||this.nt?.has(t)||(o?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return U}});var vt="M6.59,0.66C8.93,-1.15 11.47,1.06 12.04,4.5C12.47,4.5 12.89,4.62 13.27,4.84C13.79,4.24 14.25,3.42 14.07,2.5C13.65,0.35 16.06,-1.39 18.35,1.58C20.16,3.92 17.95,6.46 14.5,7.03C14.5,7.46 14.39,7.89 14.16,8.27C14.76,8.78 15.58,9.24 16.5,9.06C18.63,8.64 20.38,11.04 17.41,13.34C15.07,15.15 12.53,12.94 11.96,9.5C11.53,9.5 11.11,9.37 10.74,9.15C10.22,9.75 9.75,10.58 9.93,11.5C10.35,13.64 7.94,15.39 5.65,12.42C3.83,10.07 6.05,7.53 9.5,6.97C9.5,6.54 9.63,6.12 9.85,5.74C9.25,5.23 8.43,4.76 7.5,4.94C5.37,5.36 3.62,2.96 6.59,0.66M5,16H7A2,2 0 0,1 9,18V24H7V22H5V24H3V18A2,2 0 0,1 5,16M5,18V20H7V18H5M12.93,16H15L12.07,24H10L12.93,16M18,16H21V18H18V22H21V24H18A2,2 0 0,1 16,22V18A2,2 0 0,1 18,16Z",yt="M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M11,15H13V17H11V15M11,7H13V13H11V7",wt="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",xt="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",kt="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",St="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",Tt="M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",Mt="M5,2V13H8V22L15,10H11L15,2M17,15H19V17H17V15M17,7H19V13H17V7Z",Dt="M8.5 4.5L5.4 9.5L8.5 14.7L5.2 20.5L3.4 19.6L6.1 14.7L3 9.5L6.7 3.6L8.5 4.5M14.7 4.4L11.6 9.5L14.7 14.5L11.4 20.3L9.6 19.4L12.3 14.5L9.2 9.5L12.9 3.5L14.7 4.4M21 4.4L17.9 9.5L21 14.5L17.7 20.3L15.9 19.4L18.6 14.5L15.5 9.5L19.2 3.5L21 4.4",Ct="M12,3L2,12H5V20H19V12H22L12,3M12,8.75A2.25,2.25 0 0,1 14.25,11A2.25,2.25 0 0,1 12,13.25A2.25,2.25 0 0,1 9.75,11A2.25,2.25 0 0,1 12,8.75M12,15C13.5,15 16.5,15.75 16.5,17.25V18H7.5V17.25C7.5,15.75 10.5,15 12,15Z",At="M13 9H11V7H13V9M13 17H11V11H13V17M5 3H19C20.1 3 21 3.89 21 5V19C21 19.53 20.79 20.04 20.41 20.41C20.04 20.79 19.53 21 19 21H5C4.47 21 3.96 20.79 3.59 20.41C3.21 20.04 3 19.53 3 19V5C3 3.89 3.89 3 5 3M19 19V5H5V19H19Z",Pt="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z",Et="M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z",Lt="M12 2C7.04 2 3 6.04 3 11C3 14.91 5.5 18.24 9 19.47V22H11V19.94C11.33 20 11.66 20 12 20S12.67 20 13 19.94V22H15V19.47C18.5 18.23 21 14.9 21 11C21 6.04 16.96 2 12 2M14.25 14L11.25 17L9.75 15.5L11 14.25L9.75 13L12.75 10L14.25 11.5L13 12.75L14.25 14M16 9H8V7H16V9Z",$t="M10,0.2C9,0.2 8.2,1 8.2,2C8.2,3 9,3.8 10,3.8C11,3.8 11.8,3 11.8,2C11.8,1 11,0.2 10,0.2M15.67,1A7.33,7.33 0 0,0 23,8.33V7A6,6 0 0,1 17,1H15.67M18.33,1C18.33,3.58 20.42,5.67 23,5.67V4.33C21.16,4.33 19.67,2.84 19.67,1H18.33M21,1A2,2 0 0,0 23,3V1H21M7.92,4.03C7.75,4.03 7.58,4.06 7.42,4.11L2,5.8V11H3.8V7.33L5.91,6.67L2,22H3.8L6.67,13.89L9,17V22H10.8V15.59L8.31,11.05L9.04,8.18L10.12,10H15V8.2H11.38L9.38,4.87C9.08,4.37 8.54,4.03 7.92,4.03Z",zt="M18.73,18C15.4,21.69 9.71,22 6,18.64C2.33,15.31 2.04,9.62 5.37,5.93C6.9,4.25 9,3.2 11.27,3C7.96,6.7 8.27,12.39 12,15.71C13.63,17.19 15.78,18 18,18C18.25,18 18.5,18 18.73,18Z",Ot="M17 13V7H19V13H17M17 17V15H19V17H17M13 13V5C13 3.3 11.7 2 10 2S7 3.3 7 5V13C4.8 14.7 4.3 17.8 6 20S10.8 22.7 13 21 15.7 16.2 14 14C13.7 13.6 13.4 13.3 13 13M10 4C10.6 4 11 4.4 11 5V8H9V5C9 4.4 9.4 4 10 4Z",Vt="M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",Ht="M21 20V2H3V20H1V23H23V20M19 4V11H17V4M5 4H7V11H5M5 20V13H7V20M9 20V4H15V20M17 20V13H19V20Z",It="M2 4H20V8H18V20H16V8H6V20H4V8H2V4M7 9H15V11H7V9M7 12H15V14H7V12M20 19V17H22V19H20M20 15V10H22V15H20Z";var Rt={version:"version",current:"current"},Ft={card:{climate:{autoStartStopEnableEntity:"Auto-start/stop entity",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",allow_lock_toggle:"Allow lock/unlock from card",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Allow preset temperature modification",show_status_text:"Show current HVAC action text",show_background_gradient_on_active:"Show the slider background gradient when the entity is active",show_regulation_chart:"Show regulation chart"}}},Nt={window_open:"Window open",window_bypass:"Bypass window activated",night_mode:"Night mode",eco:"Eco",overpowering:"Overpowering detected",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active",lock_users_active:"User controls locked",lock_automations_active:"Automation changes locked","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",code_error:"Incorrect code",lock:"Lock",unlock:"Unlock",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Preset temperatures",preset_mod_no_entities:"No preset temperature entities found for this device.",preset_row_heat:"Heat",preset_row_heat_away:"Heat away",preset_row_cool:"Cool",preset_row_cool_away:"Cool away",regulation_chart_title:"Regulation chart"},jt={common:Rt,editor:Ft,extra_states:Nt},Wt=Object.freeze({__proto__:null,common:Rt,default:jt,editor:Ft,extra_states:Nt}),Bt={version:"Version",current:"Aktuell"},Ut={card:{climate:{autoStartStopEnableEntity:"Auto-Start/Stop-Entität",powerEntity:"Entität für den Stromverbrauch",theme:"Thema",theme_classic:"Klassisch",theme_vtherm:"VTherm",theme_uncolored:"Ohne Farbe",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",disable_window:"Fenster deaktivieren",disable_autoStartStop:"Auto-Start/Stop deaktivieren",disable_overpowering:"Überverbrauch deaktivieren",disable_heat:"Heizen deaktivieren",disable_cool:"Kühlen deaktivieren",disable_heat_cool:"Heizen/Kühlen deaktivieren",disable_auto:"Auto deaktivieren",disable_fan_only:"Nur-Lüfter deaktivieren",disable_dry:"Entfeuchten deaktivieren",disable_off:"Aus deaktivieren",disable_menu:"Menü deaktivieren",set_current_as_main:"Zieltemperatur mit aktueller Temperatur tauschen",disable_safety_warning:"Sicherheitsmeldungen deaktivieren",disable_buttons:"Plus/Minus-Buttons deaktivieren",disable_power_infos:"Verbrauchsinformationen deaktivieren",disable_auto_fan_infos:"Auto-Lüfter-Informationen deaktivieren",disable_name:"Name deaktivieren",eco_temperature:"Eco-Temperatur",allow_lock_toggle:"Allow lock/unlock from card",menu_system:"System menu",disable_sleep:"Disable sleep mode",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Voreinstellungstemperaturen bearbeitbar machen",show_status_text:"Aktuellen Status als Text anzeigen",show_background_gradient_on_active:"Hintergrundverlauf des Schiebereglers anzeigen, wenn die Entität aktiv ist",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Yt={window_open:"Fenster offen",window_bypass:"Fenster-Bypass aktiviert",night_mode:"Nachtmodus",eco:"Eco",overpowering:"Überverbrauch erkannt",none:"Manuell",comfort:"Komfort",boost:"Boost",frost:"Frostschutz",power:"Lastabwurf",activity:"Aktivität erkannt",presence:"Anwesenheit erkannt",motion:"Bewegung erkannt",auto_regulation_light:"Leicht",auto_regulation_medium:"Mittel",auto_regulation_strong:"Stark",auto_regulation_slow:"Langsam",auto_regulation_expert:"Experte",auto_fan_mode:"Auto-Lüfter",auto_fan_mode_off:"Keine",auto_fan_none:"Keine",auto_fan_low:"Niedrig",auto_fan_medium:"Mittel",auto_fan_high:"Hoch",auto_fan_turbo:"Turbo",fan_low:"Niedrig",fan_low_mid:"Niedrig-mittel",fan_mid:"Mittel",fan_mid_high:"Mittel-hoch",fan_high:"Hoch",fan_mute:"Leise",fan_turbo:"Turbo",fan_none:"Keine",fan_auto:"Auto",change_message:"Klicken zum Ändern des Presets",toggle_message:"Klicken zum Umschalten",auto_start_stop:"Gestoppt durch Auto-Start/Stop",auto_start_stop_enable:"Aktiviert/deaktiviert Auto-Start/Stop",auto_start_stop_label:"Auto-Start/Stop",temp_unavailable:"-",sleep:"Schlafmodus",lock_users_active:"Benutzersteuerung gesperrt",lock_automations_active:"Automatisierungsänderungen gesperrt",lock:"Sperren",unlock:"Entsperren",code_error:"Falscher Code",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Temperatur erhöhen",decrease_temp:"Temperatur verringern",undefined:"None",auto_fan_boost:"Boost",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",not_initialized:"Initialisation error",preset_mod_title:"Voreinstellungstemperaturen",preset_mod_no_entities:"Keine Voreinstellungstemperatur-Entitäten für dieses Gerät gefunden.",preset_row_heat:"Heizen",preset_row_heat_away:"Heizen (abwesend)",preset_row_cool:"Kühlen",preset_row_cool_away:"Kühlen (abwesend)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},qt={common:Bt,editor:Ut,extra_states:Yt},Zt=Object.freeze({__proto__:null,common:Bt,default:qt,editor:Ut,extra_states:Yt}),Xt={version:"version",current:"Actuelle"},Kt={card:{climate:{autoStartStopEnableEntity:"Entité - auto-start/stop",autoStartStopStopModeEntity:"Entité - mode d'arrêt auto-start/stop",autoFanEnableEntity:"Entité - auto-fan",powerEntity:"Entité - puissance consommée",theme:"Thème",theme_classic:"Classique",theme_vtherm:"VTherm",theme_uncolored:"Sans couleur",theme_gunmalmg:"Gunmalmg",section_all_themes:"Pour tous les thèmes",section_classic_only:"Pour les thèmes Classique, VTherm et Sans couleur",menu_system:"Menu système",disable_window:"Désactiver fenêtre status",disable_autoStartStop:"Désactiver auto-startStop",disable_overpowering:"Désactiver sur-puissance status",disable_heat:"Désactiver mode chauffe",disable_cool:"Désactiver mode clim",disable_heat_cool:"Désactiver mode chauffe/clim",disable_auto:"Désactiver mode auto",disable_fan_only:"Désactiver mode ventilation",disable_dry:"Désactiver mode déshumidification",disable_off:"Désactiver mode arret",disable_sleep:"Désactiver mode endormi",set_current_as_main:"Echanger temperature cible avec temperature locale",disable_safety_warning:"Désactiver sécurité messages",disable_buttons:"Désactiver les boutons +/-",disable_power_infos:"Désactiver les infos de puissance",disable_auto_fan_infos:"Désactiver les infos auto-ventilation",disable_name:"Désactiver le nom",disable_target_icon:"Désactiver l'icône cible",allow_lock_toggle:"Activer le verrouillage/déverrouillage depuis la carte",disable_presets:"Désactiver les presets",disable_timed_preset:"Désactiver le champ de durée du preset temporisé",use_manual_duration_input:"Permettre la saisie manuelle de la durée",allow_preset_modification:"Permettre la modification des températures de preset",disable_menu:"Désactiver le menu",show_status_text:"Afficher l'état du HVAC en texte",show_background_gradient_on_active:"Afficher le dégradé de fond du slider lorsque l'entité est active",show_regulation_chart:"Afficher le graphique de régulation"}}},Gt={window_open:"Fenêtre ouverte",window_bypass:"Bypass fenêtre activé",eco:"Eco",overpowering:"Sur-puissance détectée",none:"Manuel",comfort:"Confort",boost:"Boost",frost:"Hors-gel",power:"Délestage",activity:"Activité",presence:"Présence détectée",motion:"Mouvement détecté",auto_regulation_light:"Légère",auto_regulation_medium:"Moyenne",auto_regulation_strong:"Forte",auto_regulation_slow:"Lente",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"Aucun",auto_fan_none:"Aucun",auto_fan_low:"Bas",auto_fan_medium:"Moyen",auto_fan_high:"Haut",auto_fan_turbo:"Turbo",fan_low:"Bas",fan_low_mid:"Bas-moyen",fan_mid:"Moyen",fan_mid_high:"Moyen-haut",fan_high:"Haut",fan_mute:"Silence",fan_turbo:"Turbo",fan_none:"Aucun",fan_auto:"Auto",fan_1:"Vitesse 1",fan_2:"Vitesse 2",fan_3:"Vitesse 3",fan_4:"Vitesse 4",fan_5:"Vitesse 5",change_message:"Clic pour sélectionner le preset",toggle_message:"Clic pour basculer",auto_start_stop:"Stoppé par auto-start/stop",auto_start_stop_enable:"Active/désactive l'auto-start/stop",auto_start_stop_label:"Auto-start/stop",auto_start_stop_mode_disabled:"Désactivé",auto_start_stop_mode_off:"Extinction",auto_start_stop_mode_fan_only:"Ventilation seule",auto_start_stop_mode_dry:"Déshumidification",temp_unavailable:"-",sleep:"Endormi","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. pièce",outdoor_temp:"Temp. ext.",safety_warning:"Attention",safety_warning_msg:"défaut de temp.",hvac_off_manual:"Eteint manuellement",hvac_off_auto_start_stop:"Eteint par auto-start/stop",hvac_off_window_detection:"Eteint par détection d'ouverture",hvac_off_sleep_mode:"Eteint par le mode endormi",hvac_off_safety_detection:"Eteint par le mode sécurité",hvac_off_central_mode:"Eteint par le mode central",safety_detected:"Mode sécurité détectée",overpowering_detected:"Sur-puissance détectée",target_temp_window_eco:"Temp. cible : fenêtre éco",target_temp_window_frost:"Temp. cible : fenêtre hors-gel",target_temp_power:"Temp. cible : délestage",target_temp_central_mode:"Temp. cible : mode central",target_temp_activity_detected:"Temp. cible : activité détectée",target_temp_activity_not_detected:"Temp. cible : activité non détectée",target_temp_absence_detected:"Temp. cible : absence détectée",target_temp_timed_preset:"Temporisation d'un preset active",lock_users_active:"Verrouillage utilisateurs actif",lock_automations_active:"Verrouillage automations actif","messages-button":"Pourquoi cet état ?",recalculation_scheduled:"Sous-jacent en cours de mise à jour","window-bypass-button":"Basculer le bypass fenêtre",code_error:"Code incorrect",lock:"Verrouiller",unlock:"Déverrouiller",timed_preset_title:"Durée en minutes (0 = permanent)",timed_preset_active:"Preset temporisé actif",cancel_timed_preset:"Annuler le preset temporisé",heating_failure:"Défaut de chauffage détecté",cooling_failure:"Défaut de refroidissement détecté",increase_temp:"Augmenter la température",decrease_temp:"Diminuer la température",night_mode:"Mode nuit",undefined:"Aucun",auto_fan_boost:"Boost",not_initialized:"Erreur d'initialisation",preset_mod_title:"Températures des presets",preset_mod_no_entities:"Aucune entité de température de preset trouvée pour cet appareil.",preset_row_heat:"Chauffe",preset_row_heat_away:"Chauffe absent",preset_row_cool:"Clim.",preset_row_cool_away:"Clim. absent",regulation_chart_title:"Graphique de régulation",hvac_fan_only_auto_start_stop:"Ventilation seule par auto-start/stop",hvac_dry_auto_start_stop:"Déshumidification par auto-start/stop"},Qt={common:Xt,editor:Kt,extra_states:Gt},Jt=Object.freeze({__proto__:null,common:Xt,default:Qt,editor:Kt,extra_states:Gt}),te={version:"Версия",current:"Текущая"},ee={card:{climate:{autoStartStopEnableEntity:"Сущность автоматического старта/стопа",powerEntity:"Сущность потребления энергии",disable_window:"Отключить окно",disable_autoStartStop:"Отключить автоматический старт/стоп",disable_overpowering:"Отключить перегрузку",disable_heat:"Отключить обогрев",disable_cool:"Отключить охлаждение",disable_heat_cool:"Отключить обогрев/охлаждение",disable_auto:"Отключить авто",disable_fan_only:"Отключить только вентилятор",disable_dry:"Отключить осушение",disable_off:"Отключить режим выключения",disable_sleep:"Отключить спящий режим",disable_menu:"Отключить меню",set_current_as_main:"Поменять местами целевую и текущую температуру",disable_safety_warning:"Отключить сообщения безопасности",disable_buttons:"Отключить кнопки плюс/минус",disable_power_infos:"Отключить информацию о питании",disable_auto_fan_infos:"Отключить информацию автовентилятора",disable_name:"Отключить название",disable_target_icon:"Отключить иконку цели",allow_lock_toggle:"Разрешить блокировку/разблокировку с карты",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Разрешить изменение температур пресетов",show_status_text:"Показывать текущий статус в виде текста",show_background_gradient_on_active:"Показывать фоновый градиент ползунка, когда сущность активна",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},ie={window_open:"Окно открыто",window_bypass:"Обход окна активирован",night_mode:"Ночной режим",eco:"Эко",overpowering:"Обнаружена перегрузка",none:"Ручной",comfort:"Комфорт",boost:"Турбо",frost:"Защита от замерзания",power:"Перегрузка",activity:"Обнаружена активность",presence:"Обнаружено присутствие",motion:"Обнаружено движение",undefined:"Нет",auto_regulation_light:"Легкий",auto_regulation_medium:"Средний",auto_regulation_strong:"Сильный",auto_regulation_slow:"Медленный",auto_regulation_expert:"Экспертный",auto_fan_mode:"Авторежим вентилятора",auto_fan_mode_off:"Нет",auto_fan_none:"Нет",auto_fan_low:"Низкий",auto_fan_medium:"Средний",auto_fan_high:"Высокий",auto_fan_boost:"Турбо",fan_low:"Низкий",fan_low_mid:"Низкий-средний",fan_mid:"Средний",fan_mid_high:"Средний-высокий",fan_high:"Высокий",fan_mute:"Тихий",fan_turbo:"Турбо",fan_none:"Нет",fan_auto:"Авто",change_message:"Клик для смены предустановки",toggle_message:"Клик для переключения",auto_start_stop:"Остановлено авто-старт/стопом",auto_start_stop_enable:"Включить/отключить авто-старт/стоп",auto_start_stop_label:"Авто-старт/стоп",temp_unavailable:"-",sleep:"Сон",minutes:"мин",room_temp:"Температура в помещении",outdoor_temp:"Уличная температура",lock_users_active:"Пользовательское управление заблокировано",lock_automations_active:"Изменения автоматизации заблокированы",code_error:"Неверный код",lock:"Блокировать",unlock:"Разблокировать",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5","New strings for recent edits. Please translate":"-------------------------------------",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температуры пресетов",preset_mod_no_entities:"Не найдено объектов температуры пресетов для этого устройства.",preset_row_heat:"Обогрев",preset_row_heat_away:"Обогрев (отсутствие)",preset_row_cool:"Охлаждение",preset_row_cool_away:"Охлаждение (отсутствие)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},oe="Тема",ae="Классический",ne="VTherm",se="Без цвета",re="Gunmalmg",le={common:te,editor:ee,extra_states:ie,theme:oe,theme_classic:ae,theme_vtherm:ne,theme_uncolored:se,theme_gunmalmg:re},ce=Object.freeze({__proto__:null,common:te,default:le,editor:ee,extra_states:ie,theme:oe,theme_classic:ae,theme_gunmalmg:re,theme_uncolored:se,theme_vtherm:ne}),de={version:"wersja",current:"aktualna"},he={card:{climate:{allow_lock_toggle:"Zezwalaj na blokowanie/odblokowanie karty",autoStartStopEnableEntity:"Encja autoSTART/autoSTOP",powerEntity:"Encja poboru mocy",disable_window:"Wyłącz okno",disable_autoStartStop:"Wyłącz autoSTART/autoSTOP",disable_overpowering:"Wyłącz przeciążenie",disable_heat:"Wyłącz tryb grzania",disable_cool:"Wyłącz tryb chłodzenia",disable_heat_cool:"Wyłącz tryb 'grzanie/chłodzenie'",disable_auto:"Wyłącz tryb automatyczny",disable_fan_only:"Wyłącz tryb wentylatora",disable_dry:"Wyłącz tryb osuszania",disable_off:"Wyłącz tryb 'OFF'",disable_sleep:"Wyłącz tryb uśpienia",disable_menu:"Wyłącz menu",set_current_as_main:"Zamień temperaturę docelową z temperaturą pomieszczenia",disable_safety_warning:"Wyłącz ostrzeżenie bezpieczeństwa",disable_buttons:"Wyłącz przyciski +/- (plus/minus)",disable_power_infos:"Wyłącz komunikaty mocy",disable_auto_fan_infos:"Wyłącz komunikaty autowentylacji",disable_name:"Wyłącz nazwę",disable_target_icon:"Wyłącz ikonę",theme:"Motyw",theme_classic:"Klasyczny",theme_vtherm:"VTherm",theme_uncolored:"Bez koloru",theme_gunmalmg:"Gunmalmg",section_all_themes:"Dla wszystkich motywów",section_classic_only:"Dla motywu klasycznego, bez koloru i VTherm",menu_system:"Menu systemowe",disable_presets:"Wyłącz presety",disable_timed_preset:"Wyłącz czas trwania presetu",use_manual_duration_input:"Zamiast selektora zezwól na ręczne ustawienie czasu",allow_preset_modification:"Zezwól na modyfikację temperatur ustawień wstępnych",show_status_text:"Pokaż aktualny status jako tekst",show_background_gradient_on_active:"Pokaż gradient tła suwaka, gdy encja jest aktywna",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},ue={window_open:"Otwarte okno",window_bypass:"Załączone pomijanie okien",night_mode:"Tryb nocny",eco:"Tryb Eko",overpowering:"Wykryte przeciążenie",none:"Ręczny",theme:"Motyw",theme_classic:"Klasyczny",theme_vtherm:"VTherm",theme_uncolored:"Bez koloru",theme_gunmalmg:"Gunmalmg",comfort:"Komfort",boost:"Boost",frost:"Ochrona przed mrozem",power:"Przeciążenie",activity:"Wykryto aktywność",presence:"Wykryto obecność",motion:"Wykryto ruch",undefined:"Brak",auto_regulation_light:"Słaby",auto_regulation_medium:"Średni",auto_regulation_strong:"Silny",auto_regulation_slow:"Powolny",auto_regulation_expert:"Ekspert",auto_fan_mode:"Autowentylacja",auto_fan_mode_off:"Wyłączony",auto_fan_none:"Brak",auto_fan_low:"Niski",auto_fan_medium:"Średni",auto_fan_high:"Wysoki",auto_fan_boost:"Boost",fan_low:"Niski",fan_low_mid:"Niskośredni",fan_mid:"Średni",fan_mid_high:"Średniowysoki",fan_high:"Wysoki",fan_mute:"Cichy",fan_turbo:"Turbo",fan_none:"Brak",fan_auto:"Auto",change_message:"Kliknij aby zmienić preset",toggle_message:"Kliknij aby przełączyć",auto_start_stop:"Zatrzymany przez autoSTART/autoSTOP",auto_start_stop_enable:"Załącz/wyłącz autoSTART/autoSTOP",auto_start_stop_label:"AutoSTART/autoSTOP",temp_unavailable:"-",sleep:"Uśpienie","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. pomieszczenia",outdoor_temp:"Temp. zewnętrzna",safety_warning:"Ostrzeżenie",safety_warning_msg:"Błąd temperatury",hvac_off_manual:"Wyłączony ręcznie",hvac_off_auto_start_stop:"Wyłączony przez autoSTART/autoSTOP",hvac_off_window_detection:"Wyłączony prze otwarcie okna",hvac_off_sleep_mode:"Wyłączony przez tryb uśpienia",hvac_off_safety_detection:"Wyłączony przez tryb bezpieczny",hvac_off_central_mode:"Wyłączony przez tryb główny",safety_detected:"Wykryty tryb bezpieczny",overpowering_detected:"Wykryte przeciążenie",target_temp_window_eco:"Docelowa temp.: Eko okno",target_temp_window_frost:"Docelowa temp.: ochr. przed mrozem okno",target_temp_power:"Docelowa temp.: moc",target_temp_central_mode:"Docelowa temp.: tryb główny",target_temp_activity_detected:"Docelowa temp.: wykryta aktywność",target_temp_activity_not_detected:"Docelowa temp.: brak aktywności",target_temp_absence_detected:"Docelowa temp.: wykryta nieobecność","messages-button":"Dlaczego taki stan?",recalculation_scheduled:"Aktualizacja urządzeń w toku","window-bypass-button":"Przełącz pomijanie okna",lock_users_active:"Sterowanie użytkownika zablokowane",lock_automations_active:"Zmiany automatyzacji zablokowane",code_error:"Błędny kod",lock:"Zablokuj",unlock:"Odblokuj",heating_failure:"Wykryto błąd ogrzewania",cooling_failure:"Wykryto błąd chłodzenia",fan_1:"Prędkość 1",fan_2:"Prędkość 2",fan_3:"Prędkość 3",fan_4:"Prędkość 4",fan_5:"Prędkość 5",target_temp_timed_preset:"Aktywny preset czasowy",timed_preset_title:"Czas trwania (w min., 0 = stały)",timed_preset_active:"Aktywny preset czasowy",cancel_timed_preset:"Usuń preset czasowy",increase_temp:"Zwiększ temperaturę",decrease_temp:"Obniż temperaturę",not_initialized:"Błąd inicjalizacji",preset_mod_title:"Temperatury ustawień wstępnych",preset_mod_no_entities:"Nie znaleziono jednostek temperatury ustawień wstępnych dla tego urządzenia.",preset_row_heat:"Ogrzewanie",preset_row_heat_away:"Ogrzewanie (nieobecność)",preset_row_cool:"Chłodzenie",preset_row_cool_away:"Chłodzenie (nieobecność)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Ustawiony na tryb wentylatora przez autoSTART/autoSTOP",hvac_dry_auto_start_stop:"Ustawiony na tryb osuszania przez autoSTART/autoSTOP"},pe={common:de,editor:he,extra_states:ue},me=Object.freeze({__proto__:null,common:de,default:pe,editor:he,extra_states:ue}),_e={version:"verzia",current:"aktuálny"},fe={card:{climate:{disable_window:"Zakázať okno",disable_overpowering:"Zakázať leto",disable_heat:"Zakázať kúrenie",disable_cool:"Zakázať chladenie",disable_heat_cool:"Zakázať kúrenie/chladenie",disable_auto:"Zakázat automatic",disable_fan_only:"Zakázať režim ventilátora",disable_dry:"Zakázať sušenie",disable_off:"Vypnúť",disable_menu:"Zakázať menu",disable_safety_warning:"Zakázať bezpečnostné správy",disable_buttons:"Zakázať plus/mínus tlačidlá",eco_temperature:"Eco teplota",set_current_as_main:"Vymeňte cieľ za miesta s aktuálnou teplotou",allow_lock_toggle:"Povoliť uzamknutie/odomknutie z karty",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Povoliť úpravu teplôt predvolieb",show_status_text:"Zobraziť aktuálny stav textom",show_background_gradient_on_active:"Zobraziť prechod pozadia posúvača, keď je entita aktívna",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},ge={window_open:"Okno otvorené",night_mode:"Nočný mód",eco:"Eco",overpowering:"Leto",lock_users_active:"Ovládanie používateľa zamknuté",lock_automations_active:"Zmeny automatizácie zamknuté",code_error:"Chybný kód",lock:"Zamknúť",unlock:"Odomknúť",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Teploty predvolieb",preset_mod_no_entities:"Pre toto zariadenie neboli nájdené žiadne entity teplôt predvolieb.",preset_row_heat:"Kúrenie",preset_row_heat_away:"Kúrenie (neprítomnosť)",preset_row_cool:"Chladenie",preset_row_cool_away:"Chladenie (neprítomnosť)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},be="Téma",ve="Klasický",ye="VTherm",we="Bez farby",xe="Gunmalmg",ke={common:_e,editor:fe,extra_states:ge,theme:be,theme_classic:ve,theme_vtherm:ye,theme_uncolored:we,theme_gunmalmg:xe},Se={version:"Verzió",current:"Aktuális"},Te={card:{climate:{disable_window:"Ablak kikapcsolás",disable_overpowering:"Nyár kikapcsolás",disable_heat:"Fűtés kikacsolás",disable_cool:"Hűtés kikapcsolás",disable_heat_cool:"Fűtés/Hűtés kikapcsolás",disable_auto:"Auto kikapcsolás",disable_fan_only:"Csak ventillátor kikapcsolás",disable_dry:"Szárítás kikapcsolás",disable_off:"Kikapcsolás inaktiválás",eco_temperature:"Eco hőmérséklet",set_current_as_main:"Aktuális hőmérséklet használata",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Előbeállítási hőmérsékletek módosításának engedélyezése",show_status_text:"Aktuális állapot megjelenítése szövegként",show_background_gradient_on_active:"A csúszka háttérszínátmenetének megjelenítése, ha az entitás aktív",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Me={window_open:"Ablak nyitva",night_mode:"Éjszakai mód",eco:"Eco",overpowering:"Nyár",lock_users_active:"Felhasználói vezérlők zárolva",lock_automations_active:"Automatizálási változtatások zárolva",code_error:"Rossz kód",lock:"Zárolás",unlock:"Feloldás",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Előbeállítási hőmérsékletek",preset_mod_no_entities:"Nem találhatók előbeállítási hőmérséklet entitások ehhez az eszközhöz.",preset_row_heat:"Fűtés",preset_row_heat_away:"Fűtés (távol)",preset_row_cool:"Hűtés",preset_row_cool_away:"Hűtés (távol)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},De="Téma",Ce="Klasszikus",Ae="VTherm",Pe="Színtelen",Ee="Gunmalmg",Le={common:Se,editor:Te,extra_states:Me,theme:De,theme_classic:Ce,theme_vtherm:Ae,theme_uncolored:Pe,theme_gunmalmg:Ee},$e={version:"version",current:"nuværende"},ze={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillad ændring af forudindstillingstemperaturer",show_status_text:"Vis aktuel status som tekst",show_background_gradient_on_active:"Vis skyderens baggrundsgradient, når enheden er aktiv",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Oe={window_open:"Vindue åben",night_mode:"Nattilstand",eco:"Eco",overpowering:"Overpowering",lock_users_active:"Brugerkontroller låst",lock_automations_active:"Automatiske ændringer låst",code_error:"Forkert kode",lock:"Lås",unlock:"Lås op",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Forudindstilte temperaturer",preset_mod_no_entities:"Ingen forudindstillede temperaturenheder fundet for denne enhed.",preset_row_heat:"Varme",preset_row_heat_away:"Varme fraværende",preset_row_cool:"Køling",preset_row_cool_away:"Køling fraværende",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Ve="Tema",He="Klassisk",Ie="VTherm",Re="Ufarvet",Fe="Gunmalmg",Ne={common:$e,editor:ze,extra_states:Oe,theme:Ve,theme_classic:He,theme_vtherm:Ie,theme_uncolored:Re,theme_gunmalmg:Fe},je={version:"version",current:"Actual"},We={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",show_status_text:"Mostrar el estado actual en texto",show_background_gradient_on_active:"Mostrar el degradado de fondo del control deslizante cuando la entidad está activa",allow_preset_modification:"Allow preset temperature modification",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Be={window_open:"Ventana abierta",night_mode:"Modo noche",eco:"Eco",overpowering:"Verano",lock_users_active:"Controles de usuario bloqueados",lock_automations_active:"Cambios de automatización bloqueados",code_error:"Código incorrecto",lock:"Bloquear",unlock:"Desbloquear",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Aumentar la temperatura",decrease_temp:"Disminuir la temperatura",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",not_initialized:"Initialisation error",preset_mod_title:"Temperaturas de presets",preset_mod_no_entities:"No se encontraron entidades de temperatura de preset para este dispositivo.",preset_row_heat:"Calefacción",preset_row_heat_away:"Calefacción ausente",preset_row_cool:"Refrigeración",preset_row_cool_away:"Refrigeración ausente",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Ue="Tema",Ye="Clásico",qe="VTherm",Ze="Sin color",Xe="Gunmalmg",Ke={common:je,editor:We,extra_states:Be,theme:Ue,theme_classic:Ye,theme_vtherm:qe,theme_uncolored:Ze,theme_gunmalmg:Xe},Ge={version:"versiyon",current:"şimdiki"},Qe={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Ön ayar sıcaklıklarının değiştirilmesine izin ver",show_status_text:"Mevcut durumu metin olarak göster",show_background_gradient_on_active:"Varlık etkinken kaydırıcı arka plan gradyanını göster",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Je={window_open:"Pencere açık",night_mode:"Gece modu",eco:"Eco",overpowering:"Yaz",lock_users_active:"Kullanıcı kontrolleri kilitlendi",lock_automations_active:"Otomasyon değişiklikleri kilitlendi",code_error:"Hatalı kod",lock:"Kilitle",unlock:"Kilidi aç",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Ön ayar sıcaklıkları",preset_mod_no_entities:"Bu cihaz için ön ayar sıcaklığı varlıkları bulunamadı.",preset_row_heat:"Isıtma",preset_row_heat_away:"Isıtma (uzakta)",preset_row_cool:"Soğutma",preset_row_cool_away:"Soğutma (uzakta)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},ti="Tema",ei="Klasik",ii="VTherm",oi="Renksiz",ai="Gunmalmg",ni={common:Ge,editor:Qe,extra_states:Je,theme:ti,theme_classic:ei,theme_vtherm:ii,theme_uncolored:oi,theme_gunmalmg:ai},si={version:"versione",current:"attuale"},ri={card:{climate:{autoStartStopEnableEntity:"Entità di avvio/arresto automatico",powerEntity:"Entità di consumo energetico",theme:"Tema",theme_classic:"Classico",theme_vtherm:"VTherm",theme_uncolored:"Senza colore",theme_gunmalmg:"Gunmalmg",section_all_themes:"Per tutti i temi",section_classic_only:"Per i temi Classic, VTherm e Uncolored",menu_system:"System menu",disable_window:"Disabilita la finestra",disable_autoStartStop:"Disabilita Avvio/Arresto automatico",disable_overpowering:"Disabilita la sovralimentazione",disable_heat:"Disabilita Riscalda",disable_cool:"Disabilita Raffresca",disable_heat_cool:"Disabilita Riscalda/Raffredda",disable_auto:"Disabilita Automatico",disable_fan_only:"Disabilita Ventilazione",disable_dry:"Disabilita Deumidifica",disable_off:"Disabilita off",disable_menu:"Disabilita menu",set_current_as_main:"Scambia Setpoint con Temperatura ambiente",disable_safety_warning:"Disabilita i messaggi di sicurezza",disable_buttons:"Disabilita pulsanti Più/Meno",disable_power_infos:"Disabilita Info Potenza",disable_auto_fan_infos:"Disabilita Info auto-fan",disable_name:"Disabilita nome",disable_target_icon:"Disabilita icona obbiettivo",allow_lock_toggle:"Consenti blocco/sblocco dalla card",disable_sleep:"Disabilita modo riposo",disable_timed_preset:"Disattiva immissione durata preimpostata",use_manual_duration_input:"Consenti l'inserimento manuale della durata invece della selezione",disable_presets:"Disabilita preimpostazioni",allow_preset_modification:"Consenti la modifica delle temperature dei preset",show_status_text:"Mostra lo stato attuale come testo",show_background_gradient_on_active:"Mostra il gradiente di sfondo del cursore quando l'entità è attiva",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},li={window_open:"Finestra aperta",window_bypass:"Bypass finestra Attivo",eco:"Eco",overpowering:"Rilevata Sovrapotenza",none:"Manuale",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Sovrapotenza",activity:"Rilevata Attività",presence:"Rilevata Presenza",motion:"Rilevato movimento",auto_regulation_light:"Leggero",auto_regulation_medium:"Medio",auto_regulation_strong:"Forte",auto_regulation_slow:"Lento",auto_regulation_expert:"Esperto",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"Nulla",auto_fan_none:"Nulla",auto_fan_low:"Basso",auto_fan_medium:"Medio",auto_fan_high:"Alto",auto_fan_boost:"Boost",fan_low:"Basso",fan_low_mid:"Medio-basso",fan_mid:"Medio",fan_mid_high:"Medio-alto",fan_high:"Alto",fan_mute:"Silenzioso",fan_turbo:"Turbo",fan_none:"Nulla",fan_auto:"Auto",fan_1:"Velocità 1",fan_2:"Velocità 2",fan_3:"Velocità 3",fan_4:"Velocità 4",fan_5:"Velocità 5",change_message:"Click per cambio preimpostazione",toggle_message:"Click per commutare",auto_start_stop:"Fermato da auto-start/stop",auto_start_stop_enable:"Abilita/disabilita auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Riposo","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. ambiente",outdoor_temp:"Temp. esterna",safety_warning:"Avviso",safety_warning_msg:"Guasto Temp.",hvac_off_manual:"Spento manualmente",hvac_off_auto_start_stop:"Spento da auto-start/stop",hvac_off_window_detection:"Spento da rilevamento finestra",hvac_off_sleep_mode:"Spento da modo notte",hvac_off_safety_detection:"Spento da modalità sicurezza",hvac_off_central_mode:"Spento da modalità centralizzato",safety_detected:"Modalità sicurezza rilavata",overpowering_detected:"Sovrapotenza rilevata",target_temp_window_eco:"Temp. impostata: window eco",target_temp_window_frost:"Temp. impostata: window freddo",target_temp_power:"Temp. impostata: power",target_temp_central_mode:"Temp. impostata: modalità centralizzata",target_temp_activity_detected:"Temp. impostata: rilevata atività",target_temp_activity_not_detected:"Temp. impostata: attività non rilevata",target_temp_absence_detected:"Temp. impostata: assenza rilevata",target_temp_timed_preset:"Preimpostazione a tempo attiva",lock_users_active:"Controlli utente bloccati",lock_automations_active:"Modifiche automazioni bloccate","messages-button":"Perchè questo stato?",recalculation_scheduled:"Aggiornamento sottostanti in corso","window-bypass-button":"Commuta bypass finestra",code_error:"Codice errato",lock:"Blocca",unlock:"Sblocca",timed_preset_title:"Durata in minuti (0 = permanente)",timed_preset_active:"Preimpostazione temporizzata attiva",cancel_timed_preset:"Disattiva Preimpostazione temporizzata",heating_failure:"Rilevato guasto al riscaldamento",cooling_failure:"Rilevato guasto al raffrescamento",increase_temp:"Aumenta la temperatura",decrease_temp:"Diminuisci la temperatura",night_mode:"Modalità notte",undefined:"Nulla",not_initialized:"Errore di inizializzazione",preset_mod_title:"Temperature dei preset",preset_mod_no_entities:"Nessuna entità di temperatura preset trovata per questo dispositivo.",preset_row_heat:"Riscaldamento",preset_row_heat_away:"Riscaldamento (assente)",preset_row_cool:"Raffreddamento",preset_row_cool_away:"Raffreddamento (assente)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Impostato su sola ventola da auto-start/stop",hvac_dry_auto_start_stop:"Impostato su deumidificazione da auto-start/stop"},ci={common:si,editor:ri,extra_states:li},di={version:"versão",current:"actual"},hi={card:{climate:{disable_window:"Desactivar Janela",disable_overpowering:"Desactivar Verão",disable_heat:"Desactivar Aquecimento",disable_cool:"Desactivar Arrefecimento",disable_heat_cool:"Desactivar Aquecimento/Arrefecimento",disable_auto:"Desactivar Auto",disable_fan_only:"Desactivar Ventilação",disable_dry:"Desactivar Secagem",disable_off:"Desactivar Off",eco_temperature:"Modo Eco",set_current_as_main:"Mudar para a temperatura local actual",theme:"Tema",theme_classic:"Clássico",theme_vtherm:"VTherm",theme_uncolored:"Sem cor",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permitir modificação das temperaturas de predefinição",show_status_text:"Mostrar o estado atual em texto",show_background_gradient_on_active:"Mostrar o gradiente de fundo do controle deslizante quando a entidade está ativa",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},ui={window_open:"Janela Aberta",night_mode:"Modo Noturno",eco:"Eco",overpowering:"Verão",lock_users_active:"Controlos de utilizador bloqueados",lock_automations_active:"Alterações de automação bloqueadas",code_error:"Código incorreto",lock:"Bloquear",unlock:"Desbloquear",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperaturas das predefinições",preset_mod_no_entities:"Nenhuma entidade de temperatura de predefinição encontrada para este dispositivo.",preset_row_heat:"Aquecimento",preset_row_heat_away:"Aquecimento (ausente)",preset_row_cool:"Arrefecimento",preset_row_cool_away:"Arrefecimento (ausente)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},pi={common:di,editor:hi,extra_states:ui},mi={version:"版本",current:"当前"},_i={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"允许修改预设温度",show_status_text:"以文本形式显示当前状态",show_background_gradient_on_active:"当实体处于活动状态时显示滑块背景渐变",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},fi={window_open:"窗户打开",night_mode:"夜间模式",eco:"节能",overpowering:"夏季",lock_users_active:"用户控制已锁定",lock_automations_active:"自动化更改已锁定",code_error:"代码错误",lock:"锁定",unlock:"解锁",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"预设温度",preset_mod_no_entities:"未找到该设备的预设温度实体。",preset_row_heat:"制热",preset_row_heat_away:"制热(离开)",preset_row_cool:"制冷",preset_row_cool_away:"制冷(离开)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},gi="VTherm",bi="Gunmalmg",vi={common:mi,editor:_i,extra_states:fi,theme:"主题",theme_classic:"经典",theme_vtherm:gi,theme_uncolored:"无颜色",theme_gunmalmg:bi},yi={version:"версія",current:"поточний"},wi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Дозволити зміну температур попередніх налаштувань",show_status_text:"Показувати поточний статус у вигляді тексту",show_background_gradient_on_active:"Показувати фоновий градієнт повзунка, коли сутність активна",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},xi={window_open:"Вікно відчинено",night_mode:"Нічний режим",eco:"Економія",overpowering:"Літо",lock_users_active:"Керування користувача заблоковано",lock_automations_active:"Зміни автоматизації заблоковані",code_error:"Невірний код",lock:"Блокувати",unlock:"Розблокувати",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температури попередніх налаштувань",preset_mod_no_entities:"Не знайдено об'єктів температури попередніх налаштувань для цього пристрою.",preset_row_heat:"Опалення",preset_row_heat_away:"Опалення (відсутність)",preset_row_cool:"Охолодження",preset_row_cool_away:"Охолодження (відсутність)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},ki="Тема",Si="Класичний",Ti="VTherm",Mi="Без кольору",Di="Gunmalmg",Ci={common:yi,editor:wi,extra_states:xi,theme:ki,theme_classic:Si,theme_vtherm:Ti,theme_uncolored:Mi,theme_gunmalmg:Di},Ai={version:"έκδοση",current:"τρέχουσα"},Pi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Να επιτρέπεται η τροποποίηση θερμοκρασιών προεπιλογής",show_status_text:"Εμφάνιση τρέχουσας κατάστασης σε κείμενο",show_background_gradient_on_active:"Εμφάνιση της διαβάθμισης φόντου του ρυθμιστικού όταν η οντότητα είναι ενεργή",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Ei={window_open:"Παράθυρο ανοικτό",night_mode:"Λειτουργία νυκτός",eco:"Εξοικονόμηση",overpowering:"Καλοκαίρι",lock_users_active:"Έλεγχοι χρήστη κλειδωμένοι",lock_automations_active:"Αλλαγές αυτοματισμών κλειδωμένες",code_error:"Λάθος κωδικός",lock:"Κλείδωμα",unlock:"Ξεκλείδωμα",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Θερμοκρασίες προεπιλογής",preset_mod_no_entities:"Δεν βρέθηκαν οντότητες θερμοκρασίας προεπιλογής για αυτή τη συσκευή.",preset_row_heat:"Θέρμανση",preset_row_heat_away:"Θέρμανση (απουσία)",preset_row_cool:"Ψύξη",preset_row_cool_away:"Ψύξη (απουσία)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Li="Θέμα",$i="Κλασικό",zi="VTherm",Oi="Χωρίς χρώμα",Vi="Gunmalmg",Hi={common:Ai,editor:Pi,extra_states:Ei,theme:Li,theme_classic:$i,theme_vtherm:zi,theme_uncolored:Oi,theme_gunmalmg:Vi},Ii={version:"versie",current:"huidig"},Ri={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Voorkeursinstellingstemperaturen aanpassen toestaan",show_status_text:"Toon huidige status als tekst",show_background_gradient_on_active:"Toon achtergrondgradiënt van de schuifregelaar wanneer de entiteit actief is",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Fi={window_open:"Raam open",night_mode:"Nacht modus",eco:"Eco",overpowering:"Zomer",lock_users_active:"Gebruikersbediening vergrendeld",lock_automations_active:"Automatisatie wijzigingen vergrendeld",code_error:"Foute code",lock:"Vergrendelen",unlock:"Ontgrendelen",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Voorkeursinstellingstemperaturen",preset_mod_no_entities:"Geen entiteiten voor voorkeursinstellingstemperaturen gevonden voor dit apparaat.",preset_row_heat:"Verwarming",preset_row_heat_away:"Verwarming (afwezig)",preset_row_cool:"Koeling",preset_row_cool_away:"Koeling (afwezig)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Ni="Thema",ji="Classic",Wi="VTherm",Bi="Ongekleurd",Ui="Gunmalmg",Yi={common:Ii,editor:Ri,extra_states:Fi,theme:Ni,theme_classic:ji,theme_vtherm:Wi,theme_uncolored:Bi,theme_gunmalmg:Ui},qi={version:"versjon",current:"nåværende"},Zi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillat endring av forhåndsinnstillingstemperaturer",show_status_text:"Vis gjeldende status som tekst",show_background_gradient_on_active:"Vis glidebryterens bakgrunnsgradient når enheten er aktiv",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Xi={window_open:"Vindu åpent",night_mode:"Nattmodus",eco:"Eco",overpowering:"Sommer",lock_users_active:"Brukerkontroller låst",lock_automations_active:"Automatiseringsendringer låst",code_error:"Feil kode",lock:"Lås",unlock:"Lås opp",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Forhåndsinnstillingstemperaturer",preset_mod_no_entities:"Ingen forhåndsinnstillingstemperaturenheter funnet for denne enheten.",preset_row_heat:"Varme",preset_row_heat_away:"Varme (fraværende)",preset_row_cool:"Kjøling",preset_row_cool_away:"Kjøling (fraværende)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Ki="Tema",Gi="Klassisk",Qi="VTherm",Ji="Uten farge",to="Gunmalmg",eo={common:qi,editor:Zi,extra_states:Xi,theme:Ki,theme_classic:Gi,theme_vtherm:Qi,theme_uncolored:Ji,theme_gunmalmg:to},io={version:"verze",current:"aktuální"},oo={card:{climate:{disable_window:"Zakázat okno",disable_overpowering:"Zakázat léto",disable_heat:"Zakázat topení",disable_cool:"Zakázat chlazení",disable_heat_cool:"Zakázat topení/chlazení",disable_auto:"Zakázať automatic",disable_fan_only:"Zakázat pouze ventilátor",disable_dry:"Zakázat sušení",disable_off:"Zakázat vypnuto",disable_menu:"Zakázat menu",disable_safety_warning:"Zakázat bezpečnostní oznámení",disable_buttons:"Zakázat tlačítka plus/minus",eco_temperature:"Eco teplota",set_current_as_main:"Prohodit místa cílovoé a aktáalní teploty",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Povolit úpravu teplot předvoleb",show_status_text:"Zobrazit aktuální stav textem",show_background_gradient_on_active:"Zobrazit přechod pozadí posuvníku, když je entita aktivní",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},ao={window_open:"okno otevřeno",night_mode:"Noční režim",eco:"Eco",overpowering:"Léto",lock_users_active:"Uživatelské ovládání zamčeno",lock_automations_active:"Změny automatizace zamčeny",code_error:"Chybný kód",lock:"Zamknout",unlock:"Odemknout",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Teploty předvoleb",preset_mod_no_entities:"Pro toto zařízení nebyly nalezeny žádné entity teplot předvoleb.",preset_row_heat:"Topení",preset_row_heat_away:"Topení nepřítomnost",preset_row_cool:"Chlazení",preset_row_cool_away:"Chlazení nepřítomnost",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},no="Téma",so="Klasické",ro="VTherm",lo="Bez barvy",co="Gunmalmg",ho={common:io,editor:oo,extra_states:ao,theme:no,theme_classic:so,theme_vtherm:ro,theme_uncolored:lo,theme_gunmalmg:co},uo={version:"različica",current:"trenutno"},po={card:{climate:{allow_lock_toggle:"Dovoli zaklepanje/odklepanje iz kartice",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Dovoli spremembo temperatur prednastavitev",show_status_text:"Prikaži trenutno stanje kot besedilo",show_background_gradient_on_active:"Prikaži preliv ozadja drsnika, ko je entiteta aktivna",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},mo={window_open:"Okno odprto",night_mode:"Nočni način",eco:"Eko",overpowering:"Poletje",lock_users_active:"Uporabniške kontrole zaklenjene",lock_automations_active:"Spremembe avtomatizacije zaklenjene",code_error:"Napačna koda",lock:"Zakleni",unlock:"Odkleni",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperature prednastavitev",preset_mod_no_entities:"Za to napravo ni bila najdena nobena entiteta temperature prednastavitve.",preset_row_heat:"Ogrevanje",preset_row_heat_away:"Ogrevanje (odsotnost)",preset_row_cool:"Hlajenje",preset_row_cool_away:"Hlajenje (odsotnost)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},_o="Tema",fo="Klasična",go="VTherm",bo="Brez barve",vo="Gunmalmg",yo={common:uo,editor:po,extra_states:mo,theme:_o,theme_classic:fo,theme_vtherm:go,theme_uncolored:bo,theme_gunmalmg:vo},wo={version:"version",current:"Nuvarande"},xo={window_open:"Fönster öppet",night_mode:"Nattläge",eco:"Eco",overpowering:"Sommar",lock_users_active:"Användarkontroller låsta",lock_automations_active:"Automationsändringar låsta",code_error:"Fel kod",lock:"Lås",unlock:"Lås upp",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Förinställningstemperaturer",preset_mod_no_entities:"Inga förinställningstemperaturenheter hittades för den här enheten.",preset_row_heat:"Värme",preset_row_heat_away:"Värme (frånvaro)",preset_row_cool:"Kyla",preset_row_cool_away:"Kyla (frånvaro)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},ko="Tema",So="Klassisk",To="VTherm",Mo="Omdfärgad",Do="Gunmalmg",Co={card:{climate:{autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",allow_lock_toggle:"Allow lock/unlock from card",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillåt ändring av förinställningstemperaturer",show_status_text:"Visa aktuell status som text",show_background_gradient_on_active:"Visa reglagets bakgrundsgradient när entiteten är aktiv",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Ao={common:wo,extra_states:xo,theme:ko,theme_classic:So,theme_vtherm:To,theme_uncolored:Mo,theme_gunmalmg:Do,editor:Co},Po={version:"версия",currrent:"текущий",current:"current"},Eo={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Позволи промяна на температурите на предварителни настройки",show_status_text:"Показване на статуса като текст",show_background_gradient_on_active:"Показване на фоновия градиент на плъзгача, когато обектът е активен",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Lo={window_open:"Отворен прозорец",night_mode:"Нощен режим",eco:"Екологичен режим",overpowering:"Лято",lock_users_active:"Потребителските контроли са заключени",lock_automations_active:"Промените от автоматизации са заключени",code_error:"Грешен код",lock:"Заключване",unlock:"Отключване",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температури на предварителни настройки",preset_mod_no_entities:"Не са намерени обекти за температура на предварителни настройки за това устройство.",preset_row_heat:"Отопление",preset_row_heat_away:"Отопление (отсъствие)",preset_row_cool:"Охлаждане",preset_row_cool_away:"Охлаждане (отсъствие)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},$o="Тема",zo="Класически",Oo="VTherm",Vo="Без цвят",Ho="Gunmalmg",Io={common:Po,editor:Eo,extra_states:Lo,theme:$o,theme_classic:zo,theme_vtherm:Oo,theme_uncolored:Vo,theme_gunmalmg:Ho},Ro={version:"version",current:"Nykyinen"},Fo={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Salli esiasetuslämpötilojen muokkaus",show_status_text:"Näytä nykyinen tila tekstinä",show_background_gradient_on_active:"Näytä liukusäätimen taustaliukuväri, kun entiteetti on aktiivinen",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},No={window_open:"Ikkuna auki",night_mode:"Yötila",eco:"Eco",overpowering:"Kesä",lock_users_active:"Käyttäjän säädöt lukittu",lock_automations_active:"Automaation muutokset lukittu",code_error:"Virheellinen koodi",lock:"Lukitse",unlock:"Avaa lukitus",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Esiasetuslämpötilat",preset_mod_no_entities:"Tälle laitteelle ei löydetty esiasetuslämpötilaobjekteja.",preset_row_heat:"Lämmitys",preset_row_heat_away:"Lämmitys (poissa)",preset_row_cool:"Jäähdytys",preset_row_cool_away:"Jäähdytys (poissa)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},jo="Teema",Wo="Klassinen",Bo="VTherm",Uo="Väritön",Yo="Gunmalmg",qo={common:Ro,editor:Fo,extra_states:No,theme:jo,theme_classic:Wo,theme_vtherm:Bo,theme_uncolored:Uo,theme_gunmalmg:Yo},Zo={version:"versiune",current:"curent"},Xo={card:{climate:{allow_lock_toggle:"Permite blocarea/deblocarea din card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permite modificarea temperaturilor presetate",show_status_text:"Afișează starea curentă ca text",show_background_gradient_on_active:"Afișează gradientul de fundal al glisorului când entitatea este activă",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},Ko={window_open:"Fereastră deschisă",night_mode:"Mod noapte",eco:"Eco",overpowering:"Vară",lock_users_active:"Comenzi utilizator blocate",lock_automations_active:"Modificări automatizări blocate",code_error:"Cod incorect",lock:"Blocare",unlock:"Deblocare",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperaturi presetate",preset_mod_no_entities:"Nu s-au găsit entități de temperatură presetată pentru acest dispozitiv.",preset_row_heat:"Încălzire",preset_row_heat_away:"Încălzire (absent)",preset_row_cool:"Răcire",preset_row_cool_away:"Răcire (absent)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Go="Temă",Qo="Clasic",Jo="VTherm",ta="Fără culoare",ea="Gunmalmg",ia={common:Zo,editor:Xo,extra_states:Ko,theme:Go,theme_classic:Qo,theme_vtherm:Jo,theme_uncolored:ta,theme_gunmalmg:ea},oa={version:"versió",current:"Actual"},aa={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permet la modificació de les temperatures de preset",show_status_text:"Mostra l'estat actual en text",show_background_gradient_on_active:"Mostra el degradat de fons del control lliscant quan l'entitat està activa",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity"}}},na={window_open:"Finestra oberta",night_mode:"Mode nocturn",eco:"Eco",overpowering:"Estiu",lock_users_active:"Controls d'usuari bloquejats",lock_automations_active:"Canvis d'automatització bloquejats",code_error:"Codi incorrecte",lock:"Bloquejar",unlock:"Desbloquejar",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperatures dels presets",preset_mod_no_entities:"No s'han trobat entitats de temperatura de preset per a aquest dispositiu.",preset_row_heat:"Calefacció",preset_row_heat_away:"Calefacció absent",preset_row_cool:"Refrigeració",preset_row_cool_away:"Refrigeració absent",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},sa="Tema",ra="Clàssic",la="VTherm",ca="Sense color",da="Gunmalmg",ha={common:oa,editor:aa,extra_states:na,theme:sa,theme_classic:ra,theme_vtherm:la,theme_uncolored:ca,theme_gunmalmg:da};const ua={en:Wt,de:Zt,fr:Jt,ru:ce,sk:Object.freeze({__proto__:null,common:_e,default:ke,editor:fe,extra_states:ge,theme:be,theme_classic:ve,theme_gunmalmg:xe,theme_uncolored:we,theme_vtherm:ye}),hu:Object.freeze({__proto__:null,common:Se,default:Le,editor:Te,extra_states:Me,theme:De,theme_classic:Ce,theme_gunmalmg:Ee,theme_uncolored:Pe,theme_vtherm:Ae}),pl:me,da:Object.freeze({__proto__:null,common:$e,default:Ne,editor:ze,extra_states:Oe,theme:Ve,theme_classic:He,theme_gunmalmg:Fe,theme_uncolored:Re,theme_vtherm:Ie}),es:Object.freeze({__proto__:null,common:je,default:Ke,editor:We,extra_states:Be,theme:Ue,theme_classic:Ye,theme_gunmalmg:Xe,theme_uncolored:Ze,theme_vtherm:qe}),tr:Object.freeze({__proto__:null,common:Ge,default:ni,editor:Qe,extra_states:Je,theme:ti,theme_classic:ei,theme_gunmalmg:ai,theme_uncolored:oi,theme_vtherm:ii}),it:Object.freeze({__proto__:null,common:si,default:ci,editor:ri,extra_states:li}),pt:Object.freeze({__proto__:null,common:di,default:pi,editor:hi,extra_states:ui}),cn:Object.freeze({__proto__:null,common:mi,default:vi,editor:_i,extra_states:fi,theme:"主题",theme_classic:"经典",theme_gunmalmg:bi,theme_uncolored:"无颜色",theme_vtherm:gi}),uk:Object.freeze({__proto__:null,common:yi,default:Ci,editor:wi,extra_states:xi,theme:ki,theme_classic:Si,theme_gunmalmg:Di,theme_uncolored:Mi,theme_vtherm:Ti}),el:Object.freeze({__proto__:null,common:Ai,default:Hi,editor:Pi,extra_states:Ei,theme:Li,theme_classic:$i,theme_gunmalmg:Vi,theme_uncolored:Oi,theme_vtherm:zi}),nl:Object.freeze({__proto__:null,common:Ii,default:Yi,editor:Ri,extra_states:Fi,theme:Ni,theme_classic:ji,theme_gunmalmg:Ui,theme_uncolored:Bi,theme_vtherm:Wi}),no:Object.freeze({__proto__:null,common:qi,default:eo,editor:Zi,extra_states:Xi,theme:Ki,theme_classic:Gi,theme_gunmalmg:to,theme_uncolored:Ji,theme_vtherm:Qi}),cs:Object.freeze({__proto__:null,common:io,default:ho,editor:oo,extra_states:ao,theme:no,theme_classic:so,theme_gunmalmg:co,theme_uncolored:lo,theme_vtherm:ro}),sl:Object.freeze({__proto__:null,common:uo,default:yo,editor:po,extra_states:mo,theme:_o,theme_classic:fo,theme_gunmalmg:vo,theme_uncolored:bo,theme_vtherm:go}),sv:Object.freeze({__proto__:null,common:wo,default:Ao,editor:Co,extra_states:xo,theme:ko,theme_classic:So,theme_gunmalmg:Do,theme_uncolored:Mo,theme_vtherm:To}),bg:Object.freeze({__proto__:null,common:Po,default:Io,editor:Eo,extra_states:Lo,theme:$o,theme_classic:zo,theme_gunmalmg:Ho,theme_uncolored:Vo,theme_vtherm:Oo}),fi:Object.freeze({__proto__:null,common:Ro,default:qo,editor:Fo,extra_states:No,theme:jo,theme_classic:Wo,theme_gunmalmg:Yo,theme_uncolored:Uo,theme_vtherm:Bo}),ro:Object.freeze({__proto__:null,common:Zo,default:ia,editor:Xo,extra_states:Ko,theme:Go,theme_classic:Qo,theme_gunmalmg:ea,theme_uncolored:ta,theme_vtherm:Jo}),ca:Object.freeze({__proto__:null,common:oa,default:ha,editor:aa,extra_states:na,theme:sa,theme_classic:ra,theme_gunmalmg:da,theme_uncolored:ca,theme_vtherm:la})},pa="en";function ma({hass:t,string:e,search:i="",replace:o=""}){var a;const n=null!==(a=null==t?void 0:t.locale.language)&&void 0!==a?a:pa;let s;try{s=e.split(".").reduce(((t,e)=>t[e]),ua[n])}catch(t){s=e.split(".").reduce(((t,e)=>t[e]),ua.en)}return void 0===s&&(s=e.split(".").reduce(((t,e)=>t[e]),ua.en)),""!==i&&""!==o&&(s=s.replace(i,o)),s}function _a(t,e){try{return t.split(".").reduce(((t,e)=>t[e]),ua[e])}catch(t){return}}function fa(t){return function(e){var i;let o=_a(e,null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:pa);return o||(o=_a(e,pa)),null!=o?o:e}}var ga,ba,va=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function ya(t,e){if(t.length!==e.length)return!1;for(var i=0;inew Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric"}))),wa((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric"}))),wa((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"numeric",day:"numeric"}))),wa((t=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short"}))),wa((t=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric"}))),wa((t=>new Intl.DateTimeFormat(t.language,{month:"long"}))),wa((t=>new Intl.DateTimeFormat(t.language,{year:"numeric"}))),function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(ga||(ga={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(ba||(ba={}));const xa=wa((t=>{if(t.time_format===ba.language||t.time_format===ba.system){const e=t.time_format===ba.language?t.language:void 0,i=(new Date).toLocaleString(e);return i.includes("AM")||i.includes("PM")}return t.time_format===ba.am_pm}));wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:xa(t)?"numeric":"2-digit",minute:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:xa(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{hour:xa(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{weekday:"long",hour:xa(t)?"numeric":"2-digit",minute:"2-digit",hour12:xa(t)})));const ka=(t,e,i,o)=>{o=o||{},i=null==i?{}:i;const a=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return a.detail=i,t.dispatchEvent(a),a},Sa=(t,e,i)=>Math.min(Math.max(t,e),i),Ta=(t,e,i)=>{const o=e?(t=>{switch(t.number_format){case ga.comma_decimal:return["en-US","en"];case ga.decimal_comma:return["de","es","it"];case ga.space_comma:return["fr","sv","cs"];case ga.system:return;default:return t.language}})(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==ga.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(o,Ma(t,i)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,Ma(t,i)).format(Number(t))}return"string"==typeof t?t:`${((t,e=2)=>Math.round(t*10**e)/10**e)(t,null==i?void 0:i.maximumFractionDigits).toString()}${"currency"===(null==i?void 0:i.style)?` ${i.currency}`:""}`},Ma=(t,e)=>{const i=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return i;if(!e||!e.minimumFractionDigits&&!e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;i.minimumFractionDigits=e,i.maximumFractionDigits=e}return i};class Da extends TypeError{constructor(t,e){let i;const{message:o,explanation:a,...n}=t,{path:s}=t,r=0===s.length?o:`At path: ${s.join(".")} -- ${o}`;super(a??r),null!=a&&(this.cause=r),Object.assign(this,n),this.name=this.constructor.name,this.failures=()=>i??(i=[t,...e()])}}function Ca(t){return"object"==typeof t&&null!=t}function Aa(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function Pa(t,e,i,o){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:a,branch:n}=e,{type:s}=i,{refinement:r,message:l=`Expected a value of type \`${s}\`${r?` with refinement \`${r}\``:""}, but received: \`${Aa(o)}\``}=t;return{value:o,type:s,refinement:r,key:a[a.length-1],path:a,branch:n,...t,message:l}}function*Ea(t,e,i,o){(function(t){return Ca(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const a of t){const t=Pa(a,e,i,o);t&&(yield t)}}function*La(t,e,i={}){const{path:o=[],branch:a=[t],coerce:n=!1,mask:s=!1}=i,r={path:o,branch:a};if(n&&(t=e.coercer(t,r),s&&"type"!==e.type&&Ca(e.schema)&&Ca(t)&&!Array.isArray(t)))for(const i in t)void 0===e.schema[i]&&delete t[i];let l="valid";for(const o of e.validator(t,r))o.explanation=i.message,l="not_valid",yield[o,void 0];for(let[c,d,h]of e.entries(t,r)){const e=La(d,h,{path:void 0===c?o:[...o,c],branch:void 0===c?a:[...a,d],coerce:n,mask:s,message:i.message});for(const i of e)i[0]?(l=null!=i[0].refinement?"not_refined":"not_valid",yield[i[0],void 0]):n&&(d=i[1],void 0===c?t=d:t instanceof Map?t.set(c,d):t instanceof Set?t.add(d):Ca(t)&&(void 0!==d||c in t)&&(t[c]=d))}if("not_valid"!==l)for(const o of e.refiner(t,r))o.explanation=i.message,l="not_refined",yield[o,void 0];"valid"===l&&(yield[void 0,t])}class $a{constructor(t){const{type:e,schema:i,validator:o,refiner:a,coercer:n=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=i,this.entries=s,this.coercer=n,this.validator=o?(t,e)=>Ea(o(t,e),e,this,t):()=>[],this.refiner=a?(t,e)=>Ea(a(t,e),e,this,t):()=>[]}assert(t,e){return za(t,this,e)}create(t,e){return function(t,e,i){const o=Oa(t,e,{coerce:!0,message:i});if(o[0])throw o[0];return o[1]}(t,this,e)}is(t){return function(t,e){const i=Oa(t,e);return!i[0]}(t,this)}mask(t,e){return function(t,e,i){const o=Oa(t,e,{coerce:!0,mask:!0,message:i});if(o[0])throw o[0];return o[1]}(t,this,e)}validate(t,e={}){return Oa(t,this,e)}}function za(t,e,i){const o=Oa(t,e,{message:i});if(o[0])throw o[0]}function Oa(t,e,i={}){const o=La(t,e,i),a=function(t){const{done:e,value:i}=t.next();return e?void 0:i}(o);if(a[0]){const t=new Da(a[0],(function*(){for(const t of o)t[0]&&(yield t[0])}));return[t,void 0]}return[void 0,a[1]]}function Va(t,e){return new $a({type:t,schema:null,validator:e})}function Ha(){return Va("any",(()=>!0))}function Ia(t){return new $a({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[i,o]of e.entries())yield[i,o,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${Aa(t)}`})}function Ra(){return Va("boolean",(t=>"boolean"==typeof t))}function Fa(t){const e=Aa(t),i=typeof t;return new $a({type:"literal",schema:"string"===i||"number"===i||"boolean"===i?t:null,validator:i=>i===t||`Expected the literal \`${e}\`, but received: ${Aa(i)}`})}function Na(){return Va("number",(t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${Aa(t)}`))}function ja(t){const e=t?Object.keys(t):[],i=Va("never",(()=>!1));return new $a({type:"object",schema:t||null,*entries(o){if(t&&Ca(o)){const a=new Set(Object.keys(o));for(const i of e)a.delete(i),yield[i,o[i],t[i]];for(const t of a)yield[t,o[t],i]}},validator:t=>Ca(t)||`Expected an object, but received: ${Aa(t)}`,coercer:t=>Ca(t)?{...t}:t})}function Wa(t){return new $a({...t,validator:(e,i)=>void 0===e||t.validator(e,i),refiner:(e,i)=>void 0===e||t.refiner(e,i)})}function Ba(){return Va("string",(t=>"string"==typeof t||`Expected a string, but received: ${Aa(t)}`))}function Ua(t){const e=Object.keys(t);return new $a({type:"type",schema:t,*entries(i){if(Ca(i))for(const o of e)yield[o,i[o],t[o]]},validator:t=>Ca(t)||`Expected an object, but received: ${Aa(t)}`,coercer:t=>Ca(t)?{...t}:t})}function Ya(t){const e=t.map((t=>t.type)).join(" | ");return new $a({type:"union",schema:null,coercer(e){for(const i of t){const[t,o]=i.validate(e,{coerce:!0});if(!t)return o}return e},validator(i,o){const a=[];for(const e of t){const[...t]=La(i,e,o),[n]=t;if(!n[0])return[];for(const[e]of t)e&&a.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${Aa(i)}`,...a]}})}const qa=ja({user:Ba()}),Za=Ya([Ra(),ja({text:Wa(Ba()),excemptions:Wa(Ia(qa))})]),Xa=ja({action:Fa("url"),url_path:Ba(),confirmation:Wa(Za)}),Ka=ja({action:Fa("call-service"),service:Ba(),service_data:Wa(ja()),data:Wa(ja()),target:Wa(ja({entity_id:Wa(Ya([Ba(),Ia(Ba())])),device_id:Wa(Ya([Ba(),Ia(Ba())])),area_id:Wa(Ya([Ba(),Ia(Ba())]))})),confirmation:Wa(Za)}),Ga=ja({action:Fa("navigate"),navigation_path:Ba(),confirmation:Wa(Za)}),Qa=Ua({action:Fa("fire-dom-event")}),Ja=ja({action:function(t){const e={},i=t.map((t=>Aa(t))).join();for(const i of t)e[i]=i;return new $a({type:"enums",schema:e,validator:e=>t.includes(e)||`Expected one of \`${i}\`, but received: ${Aa(e)}`})}(["none","toggle","more-info","call-service","url","navigate"]),confirmation:Wa(Za)});var tn;tn=t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":return Ka;case"fire-dom-event":return Qa;case"navigate":return Ga;case"url":return Xa}return Ja},new $a({type:"dynamic",schema:null,*entries(t,e){const i=tn(t,e);yield*i.entries(t,e)},validator:(t,e)=>tn(t,e).validator(t,e),coercer:(t,e)=>tn(t,e).coercer(t,e),refiner:(t,e)=>tn(t,e).refiner(t,e)}),s` #sortable a:nth-of-type(2n) paper-icon-item { animation-name: keyframes1; animation-iteration-count: infinite; @@ -163,29 +163,29 @@ const ct=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e) color: var(--secondary-text-color); cursor: pointer; } -`;const ia=([[t,e],[i,o]],[n,a])=>[t*n+e*a,i*n+o*a],oa=([t,e],[i,o])=>[t+i,e+o],na=t=>t/180*Math.PI,aa=t=>{const{x:e,y:i,r:o,start:n,end:a,rotate:s=0}=t,r=e,l=i,c=o,d=o,h=na(n),u=(na(a)-h)%(2*Math.PI),m=na(s),p=(t=>[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]])(m),[_,g]=oa(ia(p,[c*Math.cos(h),d*Math.sin(h)]),[r,l]),[f,b]=oa(ia(p,[c*Math.cos(h+u),d*Math.sin(h+u)]),[r,l]),v=u>Math.PI?1:0,y=u>0?1:0;return["M",_,g,"A",c,d,m/(2*Math.PI)*360,v,y,f,b].join(" ")};function sa(){return sa=Object.assign||function(t){for(var e=1;e-1}var Xa=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===ya&&(t=this.compute()),va&&this.manager.element.style&&Ma[t]&&(this.manager.element.style[ba]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Ya(this.manager.recognizers,(function(e){qa(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(Za(t,ka))return ka;var e=Za(t,Ta),i=Za(t,Sa);return e&&i?ka:e||i?e?Ta:Sa:Za(t,xa)?xa:wa}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,n=Za(o,ka)&&!Ma[ka],a=Za(o,Sa)&&!Ma[Sa],s=Za(o,Ta)&&!Ma[Ta];if(n){var r=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(r&&l&&c)return}if(!s||!a)return n||a&&i&Fa||s&&i&Wa?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Ka(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Ga(t){var e=t.length;if(1===e)return{x:pa(t[0].clientX),y:pa(t[0].clientY)};for(var i=0,o=0,n=0;n=_a(e)?t<0?Ha:Ra:e<0?Ia:Na}function is(t,e,i){return{x:e/t||0,y:i/t||0}}function os(t,e){var i=t.session,o=e.pointers,n=o.length;i.firstInput||(i.firstInput=Qa(e)),n>1&&!i.firstMultiple?i.firstMultiple=Qa(e):1===n&&(i.firstMultiple=!1);var a=i.firstInput,s=i.firstMultiple,r=s?s.center:a.center,l=e.center=Ga(o);e.timeStamp=ga(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=ts(r,l),e.distance=Ja(r,l),function(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};e.eventType!==$a&&a.eventType!==za||(n=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}(i,e),e.offsetDirection=es(e.deltaX,e.deltaY);var c,d,h=is(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=_a(h.x)>_a(h.y)?h.x:h.y,e.scale=s?(c=s.pointers,Ja((d=o)[0],d[1],Ua)/Ja(c[0],c[1],Ua)):1,e.rotation=s?function(t,e){return ts(e[1],e[0],Ua)+ts(t[1],t[0],Ua)}(s.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,o,n,a,s=t.lastInterval||e,r=e.timeStamp-s.timeStamp;if(e.eventType!==Oa&&(r>La||void 0===s.velocity)){var l=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,d=is(r,l,c);o=d.x,n=d.y,i=_a(d.x)>_a(d.y)?d.x:d.y,a=es(l,c),t.lastInterval=e}else i=s.velocity,o=s.velocityX,n=s.velocityY,a=s.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=a}(i,e);var u,m=t.element,p=e.srcEvent;Ka(u=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,m)&&(m=u),e.target=m}function ns(t,e,i){var o=i.pointers.length,n=i.changedPointers.length,a=e&$a&&o-n==0,s=e&(za|Oa)&&o-n==0;i.isFirst=!!a,i.isFinal=!!s,a&&(t.session={}),i.eventType=e,os(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function as(t){return t.trim().split(/\s+/g)}function ss(t,e,i){Ya(as(e),(function(e){t.addEventListener(e,i,!1)}))}function rs(t,e,i){Ya(as(e),(function(e){t.removeEventListener(e,i,!1)}))}function ls(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var cs=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){qa(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&ss(this.element,this.evEl,this.domHandler),this.evTarget&&ss(this.target,this.evTarget,this.domHandler),this.evWin&&ss(ls(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&rs(this.element,this.evEl,this.domHandler),this.evTarget&&rs(this.target,this.evTarget,this.domHandler),this.evWin&&rs(ls(this.element),this.evWin,this.domHandler)},t}();function ds(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]})):o.sort()),o}var bs={touchstart:$a,touchmove:2,touchend:za,touchcancel:Oa},vs=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return ra(e,t),e.prototype.handler=function(t){var e=bs[t.type],i=ys.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Pa,srcEvent:t})},e}(cs);function ys(t,e){var i,o,n=gs(t.touches),a=this.targetIds;if(e&(2|$a)&&1===n.length)return a[n[0].identifier]=!0,[n,n];var s=gs(t.changedTouches),r=[],l=this.target;if(o=n.filter((function(t){return Ka(t.target,l)})),e===$a)for(i=0;i-1&&o.splice(t,1)}),ks)}}function Ss(t,e){t&$a?(this.primaryTouch=e.changedPointers[0].identifier,Ts.call(this,e)):t&(za|Oa)&&Ts.call(this,e)}function Ms(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+Ls(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+Ls(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=As},e.canEmit=function(){for(var t=0;te.threshold&&n&e.direction},i.attrTest=function(t){return Os.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=Vs(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(Os),Rs=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sa({event:"swipe",threshold:10,velocity:.3,direction:Fa|Wa,pointers:1},e))||this}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return Hs.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,o=this.options.direction;return o&(Fa|Wa)?i=e.overallVelocity:o&Fa?i=e.overallVelocityX:o&Wa&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&o&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&_a(i)>this.options.velocity&&e.eventType&za},i.emit=function(t){var e=Vs(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Os),Is=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sa({event:"pinch",threshold:0,pointers:2},e))||this}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return[ka]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(Os),Ns=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sa({event:"rotate",threshold:0,pointers:2},e))||this}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return[ka]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Os),Fs=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,sa({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return[wa]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distancei.time;if(this._input=t,!n||!o||t.eventType&(za|Oa)&&!a)this.reset();else if(t.eventType&$a)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(t.eventType&za)return 8;return As},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&t.eventType&za?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=ga(),this.manager.emit(this.options.event,this._input)))},e}($s),Ws={domEvents:!1,touchAction:ya,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Bs=[[Ns,{enable:!1}],[Is,{enable:!1},["rotate"]],[Rs,{direction:Fa}],[Hs,{direction:Fa},["swipe"]],[zs],[zs,{event:"doubletap",taps:2},["tap"]],[Fs]];function js(t,e){var i,o=t.element;o.style&&(Ya(t.options.cssProps,(function(n,a){i=fa(o.style,a),e?(t.oldCssProps[i]=o.style[i],o.style[i]=n):o.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var Us=function(){function t(t,e){var i,o=this;this.options=ha({},Ws,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Ca?_s:Aa?vs:Da?Ds:xs))(i,ns),this.touchAction=new Xa(this,this.options.touchAction),js(this,!0),Ya(this.options.recognizers,(function(t){var e=o.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return ha(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var o=this.recognizers,n=e.curRecognizer;(!n||n&&8&n.state)&&(e.curRecognizer=null,n=null);for(var a=0;a\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",n=window.console&&(window.console.warn||window.console.log);return n&&n.call(window.console,o,i),t.apply(this,arguments)}}var Ks=Xs((function(t,e,i){for(var o=Object.keys(e),n=0;n[t*a+e*n,i*a+o*n],on=([t,e],[i,o])=>[t+i,e+o],an=t=>t/180*Math.PI,nn=t=>{const{x:e,y:i,r:o,start:a,end:n,rotate:s=0}=t,r=e,l=i,c=o,d=o,h=an(a),u=(an(n)-h)%(2*Math.PI),p=an(s),m=(t=>[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]])(p),[_,f]=on(en(m,[c*Math.cos(h),d*Math.sin(h)]),[r,l]),[g,b]=on(en(m,[c*Math.cos(h+u),d*Math.sin(h+u)]),[r,l]),v=u>Math.PI?1:0,y=u>0?1:0;return["M",_,f,"A",c,d,p/(2*Math.PI)*360,v,y,g,b].join(" ")};function sn(){return sn=Object.assign||function(t){for(var e=1;e-1}var Xn=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===yn&&(t=this.compute()),vn&&this.manager.element.style&&Mn[t]&&(this.manager.element.style[bn]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Yn(this.manager.recognizers,(function(e){qn(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(Zn(t,kn))return kn;var e=Zn(t,Sn),i=Zn(t,Tn);return e&&i?kn:e||i?e?Sn:Tn:Zn(t,xn)?xn:wn}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,a=Zn(o,kn)&&!Mn[kn],n=Zn(o,Tn)&&!Mn[Tn],s=Zn(o,Sn)&&!Mn[Sn];if(a){var r=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(r&&l&&c)return}if(!s||!n)return a||n&&i&Nn||s&&i&jn?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Kn(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Gn(t){var e=t.length;if(1===e)return{x:mn(t[0].clientX),y:mn(t[0].clientY)};for(var i=0,o=0,a=0;a=_n(e)?t<0?Hn:In:e<0?Rn:Fn}function is(t,e,i){return{x:e/t||0,y:i/t||0}}function os(t,e){var i=t.session,o=e.pointers,a=o.length;i.firstInput||(i.firstInput=Qn(e)),a>1&&!i.firstMultiple?i.firstMultiple=Qn(e):1===a&&(i.firstMultiple=!1);var n=i.firstInput,s=i.firstMultiple,r=s?s.center:n.center,l=e.center=Gn(o);e.timeStamp=fn(),e.deltaTime=e.timeStamp-n.timeStamp,e.angle=ts(r,l),e.distance=Jn(r,l),function(t,e){var i=e.center,o=t.offsetDelta||{},a=t.prevDelta||{},n=t.prevInput||{};e.eventType!==$n&&n.eventType!==zn||(a=t.prevDelta={x:n.deltaX||0,y:n.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=a.x+(i.x-o.x),e.deltaY=a.y+(i.y-o.y)}(i,e),e.offsetDirection=es(e.deltaX,e.deltaY);var c,d,h=is(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=_n(h.x)>_n(h.y)?h.x:h.y,e.scale=s?(c=s.pointers,Jn((d=o)[0],d[1],Un)/Jn(c[0],c[1],Un)):1,e.rotation=s?function(t,e){return ts(e[1],e[0],Un)+ts(t[1],t[0],Un)}(s.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,o,a,n,s=t.lastInterval||e,r=e.timeStamp-s.timeStamp;if(e.eventType!==On&&(r>Ln||void 0===s.velocity)){var l=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,d=is(r,l,c);o=d.x,a=d.y,i=_n(d.x)>_n(d.y)?d.x:d.y,n=es(l,c),t.lastInterval=e}else i=s.velocity,o=s.velocityX,a=s.velocityY,n=s.direction;e.velocity=i,e.velocityX=o,e.velocityY=a,e.direction=n}(i,e);var u,p=t.element,m=e.srcEvent;Kn(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function as(t,e,i){var o=i.pointers.length,a=i.changedPointers.length,n=e&$n&&o-a==0,s=e&(zn|On)&&o-a==0;i.isFirst=!!n,i.isFinal=!!s,n&&(t.session={}),i.eventType=e,os(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function ns(t){return t.trim().split(/\s+/g)}function ss(t,e,i){Yn(ns(e),(function(e){t.addEventListener(e,i,!1)}))}function rs(t,e,i){Yn(ns(e),(function(e){t.removeEventListener(e,i,!1)}))}function ls(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var cs=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){qn(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&ss(this.element,this.evEl,this.domHandler),this.evTarget&&ss(this.target,this.evTarget,this.domHandler),this.evWin&&ss(ls(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&rs(this.element,this.evEl,this.domHandler),this.evTarget&&rs(this.target,this.evTarget,this.domHandler),this.evWin&&rs(ls(this.element),this.evWin,this.domHandler)},t}();function ds(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]})):o.sort()),o}var bs={touchstart:$n,touchmove:2,touchend:zn,touchcancel:On},vs=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return rn(e,t),e.prototype.handler=function(t){var e=bs[t.type],i=ys.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Pn,srcEvent:t})},e}(cs);function ys(t,e){var i,o,a=fs(t.touches),n=this.targetIds;if(e&(2|$n)&&1===a.length)return n[a[0].identifier]=!0,[a,a];var s=fs(t.changedTouches),r=[],l=this.target;if(o=a.filter((function(t){return Kn(t.target,l)})),e===$n)for(i=0;i-1&&o.splice(t,1)}),ks)}}function Ts(t,e){t&$n?(this.primaryTouch=e.changedPointers[0].identifier,Ss.call(this,e)):t&(zn|On)&&Ss.call(this,e)}function Ms(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+Ls(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+Ls(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=As},e.canEmit=function(){for(var t=0;te.threshold&&a&e.direction},i.attrTest=function(t){return Os.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=Vs(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(Os),Is=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sn({event:"swipe",threshold:10,velocity:.3,direction:Nn|jn,pointers:1},e))||this}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return Hs.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,o=this.options.direction;return o&(Nn|jn)?i=e.overallVelocity:o&Nn?i=e.overallVelocityX:o&jn&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&o&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&_n(i)>this.options.velocity&&e.eventType&zn},i.emit=function(t){var e=Vs(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Os),Rs=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sn({event:"pinch",threshold:0,pointers:2},e))||this}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[kn]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(Os),Fs=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sn({event:"rotate",threshold:0,pointers:2},e))||this}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[kn]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Os),Ns=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,sn({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[wn]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,a=t.distancei.time;if(this._input=t,!a||!o||t.eventType&(zn|On)&&!n)this.reset();else if(t.eventType&$n)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(t.eventType&zn)return 8;return As},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&t.eventType&zn?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=fn(),this.manager.emit(this.options.event,this._input)))},e}($s),js={domEvents:!1,touchAction:yn,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ws=[[Fs,{enable:!1}],[Rs,{enable:!1},["rotate"]],[Is,{direction:Nn}],[Hs,{direction:Nn},["swipe"]],[zs],[zs,{event:"doubletap",taps:2},["tap"]],[Ns]];function Bs(t,e){var i,o=t.element;o.style&&(Yn(t.options.cssProps,(function(a,n){i=gn(o.style,n),e?(t.oldCssProps[i]=o.style[i],o.style[i]=a):o.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var Us=function(){function t(t,e){var i,o=this;this.options=hn({},js,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Cn?_s:An?vs:Dn?Ds:xs))(i,as),this.touchAction=new Xn(this,this.options.touchAction),Bs(this,!0),Yn(this.options.recognizers,(function(t){var e=o.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return hn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var o=this.recognizers,a=e.curRecognizer;(!a||a&&8&a.state)&&(e.curRecognizer=null,a=null);for(var n=0;n\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,o,i),t.apply(this,arguments)}}var Ks=Xs((function(t,e,i){for(var o=Object.keys(e),a=0;a{const e=this._slider.getBoundingClientRect(),i=2*(t.center.x-e.left-e.width/2)/e.width,o=2*(t.center.y-e.top-e.height/2)/e.height,[,n]=function(t,e){return[Math.sqrt(t*t+e*e),Math.atan2(e,t)]}(i,o),a=(n/(2*Math.PI)*360+45-135+360)%360-45;return Math.max(Math.min(a/er,1),0)}}_valueToPercentage(t){return(Sn(t,this.min,this.max)-this.min)/(this.max-this.min)}_percentageToValue(t){return(this.max-this.min)*t+this.min}_steppedValue(t){return Math.round(t/this.step)*this.step}_boundedValue(t){var e,i;const o="high"===this._activeSlider?Math.min(null!==(e=this._localLow)&&void 0!==e?e:this.max):this.min,n="low"===this._activeSlider?Math.max(null!==(i=this._localHigh)&&void 0!==i?i:this.min):this.max;return Math.min(Math.max(t,o),n)}firstUpdated(t){super.firstUpdated(t),this._setupListeners()}updated(t){super.updated(t),this._activeSlider||(t.has("value")&&(this._localValue=this.value),t.has("low")&&(this._localLow=this.low),t.has("high")&&(this._localHigh=this.high))}connectedCallback(){super.connectedCallback(),this._setupListeners()}disconnectedCallback(){super.disconnectedCallback()}_findActiveSlider(t){var e,i;if(!this.dual)return"value";const o=Math.max(null!==(e=this._localLow)&&void 0!==e?e:this.min,this.min),n=Math.min(null!==(i=this._localHigh)&&void 0!==i?i:this.max,this.max);if(o>=t)return"low";if(n<=t)return"high";return Math.abs(t-o)<=Math.abs(t-n)?"low":"high"}_setActiveValue(t){switch(this._activeSlider){case"high":this._localHigh=t;break;case"low":this._localLow=t;break;case"value":this._localValue=t}}_getActiveValue(){switch(this._activeSlider){case"high":return this._localHigh;case"low":return this._localLow;case"value":return this._localValue}}_setupListeners(){this._interaction&&!this._mc&&(this._mc=new Us(this._interaction,{inputClass:Ds}),this._mc.add(new Hs({direction:Ba,enable:!0,threshold:0})),this._mc.add(new zs({event:"singletap"})),this._mc.on("pan",(t=>{t.srcEvent.stopPropagation(),t.srcEvent.preventDefault()})),this._mc.on("panstart",(t=>{var e,i;if(this.disabled)return;const o=this._getPercentageFromEvent(t),n=this._percentageToValue(o);this._activeSlider=this._findActiveSlider(n),this._lastSlider=this._activeSlider,null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("#slider"))||void 0===i||i.focus()})),this._mc.on("pancancel",(()=>{this.disabled||(this._activeSlider=void 0)})),this._mc.on("panmove",(t=>{if(this.disabled)return;const e=this._getPercentageFromEvent(t),i=this._percentageToValue(e),o=this._boundedValue(i);this._setActiveValue(o);const n=this._steppedValue(o);this._activeSlider&&Tn(this,`${this._activeSlider}-changing`,{value:n})})),this._mc.on("panend",(t=>{if(this.disabled)return;const e=this._getPercentageFromEvent(t),i=this._percentageToValue(e),o=this._boundedValue(i),n=this._steppedValue(o);this._setActiveValue(n),this._activeSlider&&(Tn(this,`${this._activeSlider}-changing`,{value:void 0}),Tn(this,`${this._activeSlider}-changed`,{value:n})),this._activeSlider=void 0})),this._mc.on("singletap",(t=>{var e,i;if(this.disabled)return;const o=this._getPercentageFromEvent(t),n=this._percentageToValue(o);this._activeSlider=this._findActiveSlider(n);const a=this._boundedValue(n),s=this._steppedValue(a);this._setActiveValue(s),this._activeSlider&&(Tn(this,`${this._activeSlider}-changing`,{value:void 0}),Tn(this,`${this._activeSlider}-changed`,{value:s})),this._lastSlider=this._activeSlider,null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("#slider"))||void 0===i||i.focus(),this._activeSlider=void 0})))}get _tenPercentStep(){return Math.max(this.step,(this.max-this.min)/10)}_handleKeyDown(t){var e,i,o;if(!ir.has(t.code))return;t.preventDefault(),this._lastSlider&&(null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById(this._lastSlider))||void 0===i||i.focus()),this._activeSlider=null!==(o=this._lastSlider)&&void 0!==o?o:t.currentTarget.id,this._lastSlider=void 0;const n=this._getActiveValue();switch(t.code){case"ArrowRight":case"ArrowUp":this._setActiveValue(this._boundedValue((null!=n?n:this.min)+this.step));break;case"ArrowLeft":case"ArrowDown":this._setActiveValue(this._boundedValue((null!=n?n:this.min)-this.step));break;case"PageUp":this._setActiveValue(this._steppedValue(this._boundedValue((null!=n?n:this.min)+this._tenPercentStep)));break;case"PageDown":this._setActiveValue(this._steppedValue(this._boundedValue((null!=n?n:this.min)-this._tenPercentStep)));break;case"Home":this._setActiveValue(this._boundedValue(this.min));break;case"End":this._setActiveValue(this._boundedValue(this.max))}Tn(this,`${this._activeSlider}-changing`,{value:this._getActiveValue()}),this._activeSlider=void 0}_handleKeyUp(t){ir.has(t.code)&&(this._activeSlider=t.currentTarget.id,t.preventDefault(),Tn(this,`${this._activeSlider}-changing`,{value:void 0}),Tn(this,`${this._activeSlider}-changed`,{value:this._getActiveValue()}),this._activeSlider=void 0)}destroyListeners(){this._mc&&(this._mc.destroy(),this._mc=void 0)}_strokeCircleDashArc(t){return this._strokeDashArc(t,t)}_strokeDashArc(t,e){const i=this._valueToPercentage(t),o=this._valueToPercentage(e),n=290*Math.PI*er/360,a=Math.max((o-i)*n,0);return[`${a} ${n-a}`,`-${i*n-.5}`]}renderArc(t,e,i){var o,n;if(this.disabled)return Y;const a=aa({x:0,y:0,start:0,end:er,r:145}),s="end"===i?this.max:this.min,r=null!==(o=this.current)&&void 0!==o?o:s,l=null!=e?e:s,c="end"===i?l<=r:"start"===i&&r<=l,d=c?"end"===i?this._strokeDashArc(l,r):this._strokeDashArc(r,l):this._strokeCircleDashArc(l),h="full"===i?this._strokeDashArc(this.min,this.max):"end"===i?this._strokeDashArc(l,s):this._strokeDashArc(s,l),u=this._strokeCircleDashArc(l),m=null!=this.current&&this.current<=this.max&&this.current>=this.min&&(c||"full"===this.mode)?this._strokeCircleDashArc(this.current):void 0;return j` +const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","PageUp","PageDown","Home","End"]);let or=class extends lt{constructor(){super(...arguments),this.disabled=!1,this.step=1,this.min=0,this.max=100,this._localValue=this.value,this._localLow=this.low,this._localHigh=this.high,this._getPercentageFromEvent=t=>{const e=this._slider.getBoundingClientRect(),i=2*(t.center.x-e.left-e.width/2)/e.width,o=2*(t.center.y-e.top-e.height/2)/e.height,[,a]=function(t,e){return[Math.sqrt(t*t+e*e),Math.atan2(e,t)]}(i,o),n=(a/(2*Math.PI)*360+45-135+360)%360-45;return Math.max(Math.min(n/er,1),0)}}_valueToPercentage(t){return(Sa(t,this.min,this.max)-this.min)/(this.max-this.min)}_percentageToValue(t){return(this.max-this.min)*t+this.min}_steppedValue(t){return Math.round(t/this.step)*this.step}_boundedValue(t){var e,i;const o="high"===this._activeSlider?Math.min(null!==(e=this._localLow)&&void 0!==e?e:this.max):this.min,a="low"===this._activeSlider?Math.max(null!==(i=this._localHigh)&&void 0!==i?i:this.min):this.max;return Math.min(Math.max(t,o),a)}firstUpdated(t){super.firstUpdated(t),this._setupListeners()}updated(t){super.updated(t),this._activeSlider||(t.has("value")&&(this._localValue=this.value),t.has("low")&&(this._localLow=this.low),t.has("high")&&(this._localHigh=this.high))}connectedCallback(){super.connectedCallback(),this._setupListeners()}disconnectedCallback(){super.disconnectedCallback()}_findActiveSlider(t){var e,i;if(!this.dual)return"value";const o=Math.max(null!==(e=this._localLow)&&void 0!==e?e:this.min,this.min),a=Math.min(null!==(i=this._localHigh)&&void 0!==i?i:this.max,this.max);if(o>=t)return"low";if(a<=t)return"high";return Math.abs(t-o)<=Math.abs(t-a)?"low":"high"}_setActiveValue(t){switch(this._activeSlider){case"high":this._localHigh=t;break;case"low":this._localLow=t;break;case"value":this._localValue=t}}_getActiveValue(){switch(this._activeSlider){case"high":return this._localHigh;case"low":return this._localLow;case"value":return this._localValue}}_setupListeners(){this._interaction&&!this._mc&&(this._mc=new Us(this._interaction,{inputClass:Ds}),this._mc.add(new Hs({direction:Wn,enable:!0,threshold:0})),this._mc.add(new zs({event:"singletap"})),this._mc.on("pan",(t=>{t.srcEvent.stopPropagation(),t.srcEvent.preventDefault()})),this._mc.on("panstart",(t=>{var e,i;if(this.disabled)return;const o=this._getPercentageFromEvent(t),a=this._percentageToValue(o);this._activeSlider=this._findActiveSlider(a),this._lastSlider=this._activeSlider,null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("#slider"))||void 0===i||i.focus()})),this._mc.on("pancancel",(()=>{this.disabled||(this._activeSlider=void 0)})),this._mc.on("panmove",(t=>{if(this.disabled)return;const e=this._getPercentageFromEvent(t),i=this._percentageToValue(e),o=this._boundedValue(i);this._setActiveValue(o);const a=this._steppedValue(o);this._activeSlider&&ka(this,`${this._activeSlider}-changing`,{value:a})})),this._mc.on("panend",(t=>{if(this.disabled)return;const e=this._getPercentageFromEvent(t),i=this._percentageToValue(e),o=this._boundedValue(i),a=this._steppedValue(o);this._setActiveValue(a),this._activeSlider&&(ka(this,`${this._activeSlider}-changing`,{value:void 0}),ka(this,`${this._activeSlider}-changed`,{value:a})),this._activeSlider=void 0})),this._mc.on("singletap",(t=>{var e,i;if(this.disabled)return;const o=this._getPercentageFromEvent(t),a=this._percentageToValue(o);this._activeSlider=this._findActiveSlider(a);const n=this._boundedValue(a),s=this._steppedValue(n);this._setActiveValue(s),this._activeSlider&&(ka(this,`${this._activeSlider}-changing`,{value:void 0}),ka(this,`${this._activeSlider}-changed`,{value:s})),this._lastSlider=this._activeSlider,null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("#slider"))||void 0===i||i.focus(),this._activeSlider=void 0})))}get _tenPercentStep(){return Math.max(this.step,(this.max-this.min)/10)}_handleKeyDown(t){var e,i,o;if(!ir.has(t.code))return;t.preventDefault(),this._lastSlider&&(null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById(this._lastSlider))||void 0===i||i.focus()),this._activeSlider=null!==(o=this._lastSlider)&&void 0!==o?o:t.currentTarget.id,this._lastSlider=void 0;const a=this._getActiveValue();switch(t.code){case"ArrowRight":case"ArrowUp":this._setActiveValue(this._boundedValue((null!=a?a:this.min)+this.step));break;case"ArrowLeft":case"ArrowDown":this._setActiveValue(this._boundedValue((null!=a?a:this.min)-this.step));break;case"PageUp":this._setActiveValue(this._steppedValue(this._boundedValue((null!=a?a:this.min)+this._tenPercentStep)));break;case"PageDown":this._setActiveValue(this._steppedValue(this._boundedValue((null!=a?a:this.min)-this._tenPercentStep)));break;case"Home":this._setActiveValue(this._boundedValue(this.min));break;case"End":this._setActiveValue(this._boundedValue(this.max))}ka(this,`${this._activeSlider}-changing`,{value:this._getActiveValue()}),this._activeSlider=void 0}_handleKeyUp(t){ir.has(t.code)&&(this._activeSlider=t.currentTarget.id,t.preventDefault(),ka(this,`${this._activeSlider}-changing`,{value:void 0}),ka(this,`${this._activeSlider}-changed`,{value:this._getActiveValue()}),this._activeSlider=void 0)}destroyListeners(){this._mc&&(this._mc.destroy(),this._mc=void 0)}_strokeCircleDashArc(t){return this._strokeDashArc(t,t)}_strokeDashArc(t,e){const i=this._valueToPercentage(t),o=this._valueToPercentage(e),a=290*Math.PI*er/360,n=Math.max((o-i)*a,0);return[`${n} ${a-n}`,`-${i*a-.5}`]}renderArc(t,e,i){var o,a;if(this.disabled)return Y;const n=nn({x:0,y:0,start:0,end:er,r:145}),s="end"===i?this.max:this.min,r=null!==(o=this.current)&&void 0!==o?o:s,l=null!=e?e:s,c="end"===i?l<=r:"start"===i&&r<=l,d=c?"end"===i?this._strokeDashArc(l,r):this._strokeDashArc(r,l):this._strokeCircleDashArc(l),h="full"===i?this._strokeDashArc(this.min,this.max):"end"===i?this._strokeDashArc(l,s):this._strokeDashArc(s,l),u=this._strokeCircleDashArc(l),p=null!=this.current&&this.current<=this.max&&this.current>=this.min&&(c||"full"===this.mode)?this._strokeCircleDashArc(this.current):void 0;return B` t??Y)(null!==(n=this.lowLabel)&&void 0!==n?n:this.label)} + aria-label=${(t=>t??Y)(null!==(a=this.lowLabel)&&void 0!==a?a:this.label)} @keydown=${this._handleKeyDown} @keyup=${this._handleKeyUp} /> - ${m?j` + ${p?B` `:Y} - `}render(){const t=aa({x:0,y:0,start:0,end:er,r:145}),e=this.dual?this._localLow:this._localValue,i=this._localHigh,o=this.current,n=o?this._strokeCircleDashArc(o):void 0;return B` + `}render(){const t=nn({x:0,y:0,start:0,end:er,r:145}),e=this.dual?this._localLow:this._localValue,i=this._localHigh,o=this.current,a=o?this._strokeCircleDashArc(o):void 0;return W` - ${n?j` + ${a?B` `:Y} ${null!=e?this.renderArc(this.dual?"low":"value",e,!this.dual&&this.mode||"start"):Y} @@ -403,9 +403,9 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P .high { stroke: var(--state-climate-cool-color); } - `}};function nr(t){var e,i;return B` + `}};function ar(t){var e,i;return W` - ${t._showClassicPopup?function(t){var e,i,o;return B` + ${t._showClassicPopup?function(t){var e,i,o;return W`
t._closeClassicPopup()}>
t._closeClassicPopup()} tabindex="0" > - ${(null===(e=t._config)||void 0===e?void 0:e.disable_menu)?"":B` + ${(null===(e=t._config)||void 0===e?void 0:e.disable_menu)?"":W` {t._closeClassicPopup(),t._handleMoreInfo()}} tabindex="0" > @@ -438,10 +438,10 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P
t._openClassicPopup()}>
- ${(()=>{var e,i,o,n;const a=(null===(e=t.hass)||void 0===e?void 0:e.locale)||void 0,s=new Intl.NumberFormat(a,{minimumFractionDigits:1,maximumFractionDigits:1}),r=t._display_top,l=t._display_bottom,c=(null===(n=null===(o=null===(i=t.hass)||void 0===i?void 0:i.config)||void 0===o?void 0:o.unit_system)||void 0===n?void 0:n.temperature)||"",d=null==r?t.hass?t.hass.localize("extra_states.temp_unavailable"):"":s.format(r),h=null==l?null:s.format(l);return B` + ${(()=>{var e,i,o,a;const n=(null===(e=t.hass)||void 0===e?void 0:e.locale)||void 0,s=new Intl.NumberFormat(n,{minimumFractionDigits:1,maximumFractionDigits:1}),r=t._display_top,l=t._display_bottom,c=(null===(a=null===(o=null===(i=t.hass)||void 0===i?void 0:i.config)||void 0===o?void 0:o.unit_system)||void 0===a?void 0:a.temperature)||"",d=null==r?t.hass?t.hass.localize("extra_states.temp_unavailable"):"":s.format(r),h=null==l?null:s.format(l);return W`
${d} ${c} - ${h?B`(${h} ${c})`:""} + ${h?W`(${h} ${c})`:""}
`})()}
@@ -449,11 +449,11 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P
- ${(null===(e=t._config)||void 0===e?void 0:e.disable_presets)?"":t.presets.map((e=>B`${t._renderPreset(e,t.preset)}`))} + ${(null===(e=t._config)||void 0===e?void 0:e.disable_presets)?"":t.presets.map((e=>W`${t._renderPreset(e,t.preset)}`))}
- ${(null===(i=t._config)||void 0===i?void 0:i.allow_lock_toggle)?B` + ${(null===(i=t._config)||void 0===i?void 0:i.allow_lock_toggle)?W` `:""} - ${function(t){var e,i,o,n;return(null===(e=t._config)||void 0===e?void 0:e.disable_timed_preset)?B``:B` + ${function(t){var e,i,o,a;return(null===(e=t._config)||void 0===e?void 0:e.disable_timed_preset)?W``:W`
- ${t.timedPresetActive?B` + ${t.timedPresetActive?W` ${t._formatRemainingTime(t.timedPresetRemainingTime)} - ${(null!==(i=t.timedPresetRemainingTime)&&void 0!==i?i:0)<60?B` - ${_n({hass:t.hass,string:"extra_states.minutes"})} + ${(null!==(i=t.timedPresetRemainingTime)&&void 0!==i?i:0)<60?W` + ${ma({hass:t.hass,string:"extra_states.minutes"})} `:""} - `:(null===(o=t._config)||void 0===o?void 0:o.use_manual_duration_input)?B` + `:(null===(o=t._config)||void 0===o?void 0:o.use_manual_duration_input)?W` - ${_n({hass:t.hass,string:"extra_states.minutes"})} - `:B` + ${ma({hass:t.hass,string:"extra_states.minutes"})} + `:W` {const e=parseFloat(t.target.value);isNaN(e)||b(e)}} - /> -
- - + `:W``}_renderPresetModificationPanel(){var t;if(!(null===(t=this._config)||void 0===t?void 0:t.allow_preset_modification))return W``;const e=["frost","eco","comfort","boost"],i={frost:ma({hass:this.hass,string:"extra_states.frost"}),eco:ma({hass:this.hass,string:"extra_states.eco"}),comfort:ma({hass:this.hass,string:"extra_states.comfort"}),boost:ma({hass:this.hass,string:"extra_states.boost"})},o=new Map;for(const t of this._presetTempEntities){const e=`${t.mode}_${t.away?"away":"present"}_${t.preset}`;o.set(e,t.entityId)}const a=this._hasValidCentralPresetTemperatures(),n=this._presetTempEntities.some((t=>{var e;const i=null===(e=this.hass)||void 0===e?void 0:e.states[t.entityId];return!!i&&i.state!==cr})),s=this.hvacMode===pr?"cool":"heat";let r=[{mode:"heat",away:!1,labelKey:"extra_states.preset_row_heat"},{mode:"heat",away:!0,labelKey:"extra_states.preset_row_heat_away"},{mode:"cool",away:!1,labelKey:"extra_states.preset_row_cool"},{mode:"cool",away:!0,labelKey:"extra_states.preset_row_cool_away"}];r=r.filter((t=>t.mode===s)),n?r=r.filter((t=>e.some((e=>o.has(`${t.mode}_${t.away?"away":"present"}_${e}`))))):a||(r=[]);const l=n||a,c=(t,e,i)=>{var s,r,l,c,d,h;const u=`${t}_${e?"away":"present"}_${i}`,p=o.get(u),m=p?this.hass.states[p]:void 0,_=!!m&&m.state!==cr;if(p&&_){const t=parseFloat(m.state),e=null!==(r=null===(s=null==m?void 0:m.attributes)||void 0===s?void 0:s.step)&&void 0!==r?r:.5,o=null!==(c=null===(l=null==m?void 0:m.attributes)||void 0===l?void 0:l.min)&&void 0!==c?c:7,a=null!==(h=null===(d=null==m?void 0:m.attributes)||void 0===d?void 0:d.max)&&void 0!==h?h:35,n=t=>{const i=Math.round(Math.min(a,Math.max(o,t))/e)*e,n=Math.round(100*i)/100;this.hass.callService("number","set_value",{entity_id:p,value:n})};return W` + +
+ {const e=parseFloat(t.target.value);isNaN(e)||n(e)}} + /> +
+ + +
-
- - `};return B` + + `}if(!n&&a){const o=this._getPresetTemperature(i,t,e,!1);if(null!==o)return W` + +
+
+ ${Ta(o,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1})} ${this.hass.config.unit_system.temperature} +
+
+ + `}return W`–`};return W`
{this._isLocked||(this._presetsPanelOpen=!this._presetsPanelOpen)}} - title=${_n({hass:this.hass,string:"extra_states.preset_mod_title"})} + title=${ma({hass:this.hass,string:"extra_states.preset_mod_title"})} > - ${_n({hass:this.hass,string:"extra_states.preset_mod_title"})} + ${ma({hass:this.hass,string:"extra_states.preset_mod_title"})}
- ${this._presetsPanelOpen?B` + ${this._presetsPanelOpen?W`
- ${a?B` + ${l?W` - ${e.map((t=>B``))} + ${e.map((t=>W``))} - ${n.map((t=>B` + ${r.map((t=>W` - ${e.map((e=>s(t.mode,t.away,e)))} + ${e.map((e=>c(t.mode,t.away,e)))} `))}
${i[t]}${i[t]}
- ${_n({hass:this.hass,string:t.labelKey})} + ${ma({hass:this.hass,string:t.labelKey})}
- `:B` + `:W`
- ${_n({hass:this.hass,string:"extra_states.preset_mod_no_entities"})} + ${ma({hass:this.hass,string:"extra_states.preset_mod_no_entities"})}
`}
`:""}
- `}_renderClassicContent(t=!1){var e,i,o,n,a,s,r,l,c,d,h,u,m,p,_,g,f,b,v,y,w,x,k;const T=!t&&this.effectiveDisableCircle,S=!t&&this.effectiveDisableBackgroundColor;this._renderingAsClassic=t;const M=B` - ${this.name.length>0?B` + `}_renderClassicContent(t=!1){var e,i,o,a,n,s,r,l,c,d,h,u,p,m,_,f,g,b,v,y,w,x,k;const S=!t&&this.effectiveDisableCircle,T=!t&&this.effectiveDisableBackgroundColor;this._renderingAsClassic=t;const M=W` + ${this.name.length>0?W`
${this.name}
`:""} - ${(null===(e=this.safety_state)||void 0===e?void 0:e.length)>0&&!this.displayMessages?B` + ${(null===(e=this.safety_state)||void 0===e?void 0:e.length)>0&&!this.displayMessages?W`
- ${B` - ${this.safety_state.map((t=>B`${t.name}: ${t.security_msg}`))} + ${W` + ${this.safety_state.map((t=>W`${t.name}: ${t.security_msg}`))} `}
`:""} - ${this.messages.length>0&&this.displayMessages?B` + ${this.messages.length>0&&this.displayMessages?W`
- ${this.messages.map((t=>B`${t}`))} + ${this.messages.map((t=>W`${t}`))}
`:""} -
- ${T?B` +
+ ${S?W` - `:null!=this.value.low&&null!=this.value.high&&"unavailable"!==(null===(i=this.stateObj)||void 0===i?void 0:i.state)?B` + `:null!=this.value.low&&null!=this.value.high&&(null===(i=this.stateObj)||void 0===i?void 0:i.state)!==cr?W` - `:B` + `:W` `} -
+
- ${this._hasWindowByPass?j` + ${this._hasWindowByPass?B` - + `:""} - ${this._hasWindowByPass||!this._hasWindow||(null===(s=this._config)||void 0===s?void 0:s.disable_window)?"":j` + ${this._hasWindowByPass||!this._hasWindow||(null===(s=this._config)||void 0===s?void 0:s.disable_window)?"":B` `} - ${this._hasOverpowering&&!(null===(l=this._config)||void 0===l?void 0:l.disable_overpowering)?j` + ${this._hasOverpowering&&!(null===(l=this._config)||void 0===l?void 0:l.disable_overpowering)?B` `:""} - ${this._hasPresence?j` + ${this._hasPresence?B` `:""} - ${this._hasAutoStartStop&&!(null===(d=this._config)||void 0===d?void 0:d.disable_autoStartStop)?j` + ${this._hasAutoStartStop&&!(null===(d=this._config)||void 0===d?void 0:d.disable_autoStartStop)?B` `:""} - ${this._hasMotion?j` + ${this._hasMotion?B` `:""} - ${T?j` + ${S?B` ${this._renderStatusText("62.5","50")} ${this._renderTemperature(this._display_top,!0,"55","62%",!(null===(u=null==this?void 0:this._config)||void 0===u?void 0:u.set_current_as_main))} - ${this._renderTemperature(this._display_bottom,!1,"90","62%",1==(null===(m=null==this?void 0:this._config)||void 0===m?void 0:m.set_current_as_main))} + ${this._renderTemperature(this._display_bottom,!1,"90","62%",1==(null===(p=null==this?void 0:this._config)||void 0===p?void 0:p.set_current_as_main))} ${this._renderHVACAction()} - `:j` + `:B` ${this._renderStatusText("62.5","50")} - ${this._renderTemperature(this._display_top,!0,"50%","62%",!(null===(p=null==this?void 0:this._config)||void 0===p?void 0:p.set_current_as_main))} + ${this._renderTemperature(this._display_top,!0,"50%","62%",!(null===(m=null==this?void 0:this._config)||void 0===m?void 0:m.set_current_as_main))} ${this._renderTemperature(this._display_bottom,!1,"-5%","0%",1==(null===(_=null==this?void 0:this._config)||void 0===_?void 0:_.set_current_as_main))} @@ -1472,15 +1480,15 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P `}
- ${T?"":B` + ${S?"":W` `}
- ${j` - ${this.modes.map((t=>{var e,i,o,n,a,s,r,l;return(null===(e=this._config)||void 0===e?void 0:e.disable_heat)&&"heat"===t||(null===(i=this._config)||void 0===i?void 0:i.disable_auto)&&"auto"===t||(null===(o=this._config)||void 0===o?void 0:o.disable_cool)&&"cool"===t||(null===(n=this._config)||void 0===n?void 0:n.disable_heat_cool)&&"heat_cool"===t||(null===(a=this._config)||void 0===a?void 0:a.disable_dry)&&"dry"===t||(null===(s=this._config)||void 0===s?void 0:s.disable_fan_only)&&"fan_only"===t||(null===(r=this._config)||void 0===r?void 0:r.disable_off)&&"off"===t||(null===(l=this._config)||void 0===l?void 0:l.disable_sleep)&&"sleep"===t?B``:this._renderIcon(t,this.hvacMode)}))} + ${B` + ${this.modes.map((t=>{var e,i,o,a,n,s,r,l;return(null===(e=this._config)||void 0===e?void 0:e.disable_heat)&&"heat"===t||(null===(i=this._config)||void 0===i?void 0:i.disable_auto)&&"auto"===t||(null===(o=this._config)||void 0===o?void 0:o.disable_cool)&&"cool"===t||(null===(a=this._config)||void 0===a?void 0:a.disable_heat_cool)&&"heat_cool"===t||(null===(n=this._config)||void 0===n?void 0:n.disable_dry)&&"dry"===t||(null===(s=this._config)||void 0===s?void 0:s.disable_fan_only)&&"fan_only"===t||(null===(r=this._config)||void 0===r?void 0:r.disable_off)&&"off"===t||(null===(l=this._config)||void 0===l?void 0:l.disable_sleep)&&"sleep"===t?W``:this._renderIcon(t,this.hvacMode)}))} `}
- ${(null===(g=null==this?void 0:this._config)||void 0===g?void 0:g.disable_buttons)?B``:B` + ${(null===(f=null==this?void 0:this._config)||void 0===f?void 0:f.disable_buttons)?W``:W`
`} - ${(null===(f=this._config)||void 0===f?void 0:f.disable_presets)?"":B` + ${(null===(g=this._config)||void 0===g?void 0:g.disable_presets)?"":W`
- ${j` + ${B` ${this.presets.map((t=>this._renderPreset(t,this.preset)))} `} - ${(null===(b=this._config)||void 0===b?void 0:b.disable_timed_preset)?"":B` + ${(null===(b=this._config)||void 0===b?void 0:b.disable_timed_preset)?"":W`
- ${this.timedPresetActive?B` + ${this.timedPresetActive?W` ${this._formatRemainingTime(this.timedPresetRemainingTime)} - ${(null!==(v=this.timedPresetRemainingTime)&&void 0!==v?v:0)<60?B` - ${_n({hass:this.hass,string:"extra_states.minutes"})} + ${(null!==(v=this.timedPresetRemainingTime)&&void 0!==v?v:0)<60?W` + ${ma({hass:this.hass,string:"extra_states.minutes"})} `:""} - `:(null===(y=this._config)||void 0===y?void 0:y.use_manual_duration_input)?B` + `:(null===(y=this._config)||void 0===y?void 0:y.use_manual_duration_input)?W` - ${_n({hass:this.hass,string:"extra_states.minutes"})} - `:B` + ${ma({hass:this.hass,string:"extra_states.minutes"})} + `:W` + + - ${e} + ${this._autoStartStopEditMode&&!this.isUserLocked?W` + + + + `:W` + ${n} + `}
- `}_handleMoreInfo(){Tn(this,"hass-more-info",{entityId:this._config.entity})}_handleLockToggle(){var t,e;if((null===(t=this._config)||void 0===t?void 0:t.allow_lock_toggle)&&(null===(e=this._config)||void 0===e?void 0:e.entity)&&this.hass&&this.stateObj)if(this._isLocked){if(this._hasLockCode)return this.isLocking=!1,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?this.hass.callService("versatile_thermostat","unlock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!1,this.requestUpdate())}else{if(this._hasLockCode)return this.isLocking=!0,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?this.hass.callService("versatile_thermostat","lock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!0,this.requestUpdate())}}_handleKeypadPress(t){this.enteredCode.length<4&&(this.enteredCode+=t,this.codeError=!1,4===this.enteredCode.length&&this._handleValidate())}_handleKeypadClear(){this.enteredCode=this.enteredCode.slice(0,-1),this.codeError=!1}_handleModalClose(){this.showDigicodeModal=!1,this.enteredCode="",this.codeError=!1}async _handleValidate(){if(4===this.enteredCode.length){const t=this.isLocking?"lock":"unlock";try{await this.hass.callService("versatile_thermostat",t,{entity_id:this._config.entity,code:this.enteredCode}),this._handleModalClose()}catch(t){this.codeError=!0,this.enteredCode="",this._vibrate(200)}}else this.codeError=!0,this.enteredCode="",this._vibrate(200)}buildTitle(){var t,e,i;let o="";return this._hasWindow&&!(null===(t=this._config)||void 0===t?void 0:t.disable_window)&&(o+=_n({hass:this.hass,string:"extra_states.window_open"})+"\n"),this._hasWindowByPass&&(o+=_n({hass:this.hass,string:"extra_states.window_bypass"})+"\n"),this._hasOverpowering&&!(null===(e=this._config)||void 0===e?void 0:e.disable_overpowering)&&(o+=_n({hass:this.hass,string:"extra_states.overpowering"})+"\n"),this._hasPresence&&(o+=_n({hass:this.hass,string:"extra_states.presence"})+"\n"),this._hasAutoStartStop&&!(null===(i=this._config)||void 0===i?void 0:i.disable_autoStartStop)&&(o+=_n({hass:this.hass,string:"extra_states.auto_start_stop"})+"\n"),this._hasMotion&&(o+=_n({hass:this.hass,string:"extra_states.motion"})+"\n"),o}_renderTemperature(t,e,i,o,n){var a;let s=76,r=56,l=.2;const c=e?-2:-1,d=e?-5.5:-2;let h;h=t?Mn(t,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1}):this.hass.localize("extra_states.temp_unavailable"),n&&e&&(s=this.effectiveDisableCircle?30:35,r=56,l=.25);const u=e?"temp-main":"temp-secondary";return j` - ${n&&!(null===(a=this._config)||void 0===a?void 0:a.disable_target_icon)?j` + `}_handleClickAutoStartStopIcon(){this.isUserLocked||(this._autoStartStopEditMode=!this._autoStartStopEditMode)}_handleBlurAutoStartStop(){this._autoStartStopEditMode=!1}_handleMoreInfo(){ka(this,"hass-more-info",{entityId:this._config.entity})}_handleLockToggle(){var t,e;if((null===(t=this._config)||void 0===t?void 0:t.allow_lock_toggle)&&(null===(e=this._config)||void 0===e?void 0:e.entity)&&this.hass&&this.stateObj)if(this._isLocked){if(this._hasLockCode)return this.isLocking=!1,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?this.hass.callService("versatile_thermostat","unlock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!1,this.requestUpdate())}else{if(this._hasLockCode)return this.isLocking=!0,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?this.hass.callService("versatile_thermostat","lock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!0,this.requestUpdate())}}_handleKeypadPress(t){this.enteredCode.length<4&&(this.enteredCode+=t,this.codeError=!1,4===this.enteredCode.length&&this._handleValidate())}_handleKeypadClear(){this.enteredCode=this.enteredCode.slice(0,-1),this.codeError=!1}_handleModalClose(){this.showDigicodeModal=!1,this.enteredCode="",this.codeError=!1}async _handleValidate(){if(4===this.enteredCode.length){const t=this.isLocking?"lock":"unlock";try{await this.hass.callService("versatile_thermostat",t,{entity_id:this._config.entity,code:this.enteredCode}),this._handleModalClose()}catch(t){this.codeError=!0,this.enteredCode="",this._vibrate(200)}}else this.codeError=!0,this.enteredCode="",this._vibrate(200)}buildTitle(){var t,e,i;let o="";return this._hasWindow&&!(null===(t=this._config)||void 0===t?void 0:t.disable_window)&&(o+=ma({hass:this.hass,string:"extra_states.window_open"})+"\n"),this._hasWindowByPass&&(o+=ma({hass:this.hass,string:"extra_states.window_bypass"})+"\n"),this._hasOverpowering&&!(null===(e=this._config)||void 0===e?void 0:e.disable_overpowering)&&(o+=ma({hass:this.hass,string:"extra_states.overpowering"})+"\n"),this._hasPresence&&(o+=ma({hass:this.hass,string:"extra_states.presence"})+"\n"),this._hasAutoStartStop&&!(null===(i=this._config)||void 0===i?void 0:i.disable_autoStartStop)&&(o+=ma({hass:this.hass,string:"extra_states.auto_start_stop"})+"\n"),this._hasMotion&&(o+=ma({hass:this.hass,string:"extra_states.motion"})+"\n"),o}_renderTemperature(t,e,i,o,a){var n;let s=76,r=56,l=.2;const c=e?-2:-1,d=e?-5.5:-2;let h;h=t?Ta(t,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1}):this.hass.localize("extra_states.temp_unavailable"),a&&e&&(s=this.effectiveDisableCircle?30:35,r=56,l=.25);const u=e?"temp-main":"temp-secondary";return B` + ${a&&!(null===(n=this._config)||void 0===n?void 0:n.disable_target_icon)?B` `:""} - ${j`${h}`} + ${B`${h}`} - ${j` + ${B` ${this.hass.config.unit_system.temperature} `} - `}constructor(){super(),this.value={},this._selectTargetTemperature="low",this.current=0,this.humidity=0,this.temperature=0,this.min=7,this.max=35,this.step=.5,this.powerPercent=0,this.meanCyclePower=0,this.valveOpenPercent=0,this.devicePower=0,this.regulatedTargetTemperature=null,this.isOn=!1,this.window=!1,this.windowByPass=!1,this.presence=!1,this.motion=!1,this.overpowering=!1,this.isDeviceActive=!1,this.isSleeping=!1,this.isRegulated=!1,this.isRecalculateScheduled=!1,this.windowState="off",this.windowAutoState="off",this.overpoweringState="off",this.presenceState="off",this.motionState="off",this.safetyState="off",this.status="loading",this.hvacMode=hr,this.hvacAction="idle",this.preset=dr,this.autoRegulationMode="",this.currentAutoFanMode=mr,this.autoFanMode=mr,this.fanMode="",this.hvacOffReason="",this.dragging=!1,this.name="",this.target="value",this._debouncedCallService=((t,e,i=!1)=>{let o;const n=(...n)=>{const a=i&&!o;clearTimeout(o),o=window.setTimeout((()=>{o=void 0,i||t(...n)}),e),a&&t(...n)};return n.cancel=()=>{clearTimeout(o)},n})((t=>this._callService(t)),1e3),this._init=!0,this._firstRender=!0,this._gunmalmgPresetScrollDone=!1,this._ignore=!1,this._hasWindow=!1,this._hasWindowByPass=!1,this._hasPresence=!1,this._hasMotion=!1,this._hasOverpowering=!1,this._hasAutoStartStop=!1,this._isAutoStartStopEnabled=!1,this._isAutoStartStopConfigured=!1,this._isLockConfigured=!1,this._isLocked=!1,this._hasLockCode=!1,this._oldValueMin=0,this._oldValueMax=0,this._display_bottom=0,this._display_top=0,this.modes=[],this.presets=[],this.safety_state={},this.powerInfos=[],this._externalPowerInfos=[],this.autoFanInfos=[],this.messages=[],this.displayMessages=!1,this._hasError=!1,this._renderingAsClassic=!1,this._showThemeMenu=!1,this._showClassicPopup=!1,this.theme="",this.isLocked=!1,this.isUserLocked=!1,this.isAutomationLocked=!1,this.showDigicodeModal=!1,this.enteredCode="",this.codeError=!1,this.isLocking=!1,this.timedPresetDuration=null,this.timedPresetActive=!1,this.timedPresetRemainingTime=null,this.timedPresetPreset=null,this._presetsPanelOpen=!1,this._regulationChartOpen=!1,this._presetTempEntities=[],this._handleKeyDown=t=>{t.key>="0"&&t.key<="9"?this._handleKeypadPress(t.key):"Backspace"===t.key&&this._handleKeypadClear()},this.render=()=>{var t,e,i,o,n;return(null===(t=this._config)||void 0===t?void 0:t.theme)===vr?(console.log("Rendering Gunmalmg theme"),nr(this)):B` + `}constructor(){super(),this.value={},this._selectTargetTemperature="low",this.current=0,this.humidity=0,this.temperature=0,this.min=7,this.max=35,this.step=.5,this.powerPercent=0,this.meanCyclePower=0,this.valveOpenPercent=0,this.devicePower=0,this.regulatedTargetTemperature=null,this.isOn=!1,this.window=!1,this.windowByPass=!1,this.presence=!1,this.motion=!1,this.overpowering=!1,this.isDeviceActive=!1,this.isSleeping=!1,this.isRegulated=!1,this.isRecalculateScheduled=!1,this.windowState="off",this.windowAutoState="off",this.overpoweringState="off",this.presenceState="off",this.motionState="off",this.safetyState="off",this.status="loading",this.hvacMode=ur,this.hvacAction="idle",this.preset=hr,this.autoRegulationMode="",this.currentAutoFanMode=_r,this.autoFanMode=_r,this.fanMode="",this.hvacModeReason="",this.dragging=!1,this.name="",this.target="value",this._debouncedCallService=((t,e,i=!1)=>{let o;const a=(...a)=>{const n=i&&!o;clearTimeout(o),o=window.setTimeout((()=>{o=void 0,i||t(...a)}),e),n&&t(...a)};return a.cancel=()=>{clearTimeout(o)},a})((t=>this._callService(t)),1e3),this._init=!0,this._firstRender=!0,this._gunmalmgPresetScrollDone=!1,this._ignore=!1,this._hasWindow=!1,this._hasWindowByPass=!1,this._hasPresence=!1,this._hasMotion=!1,this._hasOverpowering=!1,this._hasAutoStartStop=!1,this._isAutoStartStopEnabled=!1,this._isAutoStartStopConfigured=!1,this._autoStartStopStopMode=xr,this._autoStartStopStopModeOptions=[],this._isAutoFanPlugin=!1,this._isAutoFanEnabled=!1,this._autoFanSelectedMode="",this._isLockConfigured=!1,this._isLocked=!1,this._hasLockCode=!1,this._oldValueMin=0,this._oldValueMax=0,this._display_bottom=0,this._display_top=0,this.modes=[],this.presets=[],this.safety_state={},this.powerInfos=[],this._externalPowerInfos=[],this.autoFanInfos=[],this.messages=[],this.displayMessages=!1,this._hasError=!1,this._renderingAsClassic=!1,this._showThemeMenu=!1,this._showClassicPopup=!1,this.theme="",this.isLocked=!1,this.isUserLocked=!1,this.isAutomationLocked=!1,this.showDigicodeModal=!1,this.enteredCode="",this.codeError=!1,this.isLocking=!1,this.timedPresetDuration=null,this.timedPresetActive=!1,this.timedPresetRemainingTime=null,this.timedPresetPreset=null,this._presetsPanelOpen=!1,this._regulationChartOpen=!1,this._presetTempEntities=[],this._autoStartStopEditMode=!1,this._handleKeyDown=t=>{t.key>="0"&&t.key<="9"?this._handleKeypadPress(t.key):"Backspace"===t.key&&this._handleKeypadClear()},this.render=()=>{var t,e,i,o,a;return(null===(t=this._config)||void 0===t?void 0:t.theme)===Tr?(console.log("Rendering Gunmalmg theme"),ar(this)):W` - ${(null===(o=this._config)||void 0===o?void 0:o.disable_menu)?"":B` + ${(null===(o=this._config)||void 0===o?void 0:o.disable_menu)?"":W` - ${this._showThemeMenu?B` + ${this._showThemeMenu?W`
-
{this._handleMoreInfo(),this._closeThemeMenu()}}>${_n({hass:this.hass,string:"editor.card.climate.menu_system"})}
+
{this._handleMoreInfo(),this._closeThemeMenu()}}>${ma({hass:this.hass,string:"editor.card.climate.menu_system"})}
${""} - ${(null===(n=this._config)||void 0===n?void 0:n.theme)===vr?B` + ${(null===(a=this._config)||void 0===a?void 0:a.theme)===Tr?W`
{this._menuLockToggle(),this._closeThemeMenu()}}> - ${this._isLocked?_n({hass:this.hass,string:"extra_states.unlock"}):_n({hass:this.hass,string:"extra_states.lock"})} + ${this._isLocked?ma({hass:this.hass,string:"extra_states.unlock"}):ma({hass:this.hass,string:"extra_states.lock"})}
- ${this.timedPresetActive?B` + ${this.timedPresetActive?W`
{this._menuCancelTimedPreset(),this._closeThemeMenu()}}> - ${_n({hass:this.hass,string:"extra_states.cancel_timed_preset"})} + ${ma({hass:this.hass,string:"extra_states.cancel_timed_preset"})}
`:""} `:""} -
this._applyTheme("classic")}>${_n({hass:this.hass,string:"editor.card.climate.theme_classic"})}
-
this._applyTheme("vtherm")}>${_n({hass:this.hass,string:"editor.card.climate.theme_vtherm"})}
-
this._applyTheme("uncolored")}>${_n({hass:this.hass,string:"editor.card.climate.theme_uncolored"})}
-
this._applyTheme("gunmalmg")}>${_n({hass:this.hass,string:"editor.card.climate.theme_gunmalmg"})}
+
this._applyTheme("classic")}>${ma({hass:this.hass,string:"editor.card.climate.theme_classic"})}
+
this._applyTheme("vtherm")}>${ma({hass:this.hass,string:"editor.card.climate.theme_vtherm"})}
+
this._applyTheme("uncolored")}>${ma({hass:this.hass,string:"editor.card.climate.theme_uncolored"})}
+
this._applyTheme("gunmalmg")}>${ma({hass:this.hass,string:"editor.card.climate.theme_gunmalmg"})}
`:""} `} @@ -1747,7 +1782,7 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P >

- ${this.isLocking?_n({hass:this.hass,string:"extra_states.lock"}):_n({hass:this.hass,string:"extra_states.unlock"})} ${this.name} + ${this.isLocking?ma({hass:this.hass,string:"extra_states.lock"}):ma({hass:this.hass,string:"extra_states.unlock"})} ${this.name}

@@ -1756,7 +1791,7 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P
- ${_n({hass:this.hass,string:"extra_states.code_error"})} + ${ma({hass:this.hass,string:"extra_states.code_error"})}
@@ -1784,7 +1819,7 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P
- `}}connectedCallback(){super.connectedCallback(),this._gunmalmgPresetScrollDone=!1}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this._handleKeyDown)}static async getConfigElement(){return await Promise.resolve().then((function(){return Bb})),document.createElement("versatile-thermostat-ui-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>["climate"].includes(t.split(".")[0]))),i=e.filter((e=>{var i;return null===(i=t.states[e].attributes)||void 0===i?void 0:i.specific_states}));return{type:"custom:versatile-thermostat-ui-card",entity:i[0]||e[0]}}};function Tr(t){return t+.5|0}kr.styles=[s` + `}}connectedCallback(){super.connectedCallback(),this._gunmalmgPresetScrollDone=!1}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this._handleKeyDown)}static async getConfigElement(){return await Promise.resolve().then((function(){return Gb})),document.createElement("versatile-thermostat-ui-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>["climate"].includes(t.split(".")[0]))),i=e.filter((e=>{var i;return null===(i=t.states[e].attributes)||void 0===i?void 0:i.specific_states}));return{type:"custom:versatile-thermostat-ui-card",entity:i[0]||e[0]}}};function Pr(t){return t+.5|0}Ar.styles=[s` :host { display: block; box-sizing: border-box; @@ -2170,6 +2205,28 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P color: var(--text-primary-color, #fff); } + .auto-start-stop-select { + height: 28px; + max-width: 120px; + border: 1px solid var(--divider-color, #e0e0e0); + border-radius: 4px; + padding: 0 4px; + font-size: 13px; + background: var(--card-background-color, #fff); + color: var(--primary-text-color); + outline: none; + cursor: pointer; + transition: border-color 0.2s ease; + } + + .auto-start-stop-select:focus { + border-color: var(--primary-color); + } + + .auto-start-stop-select.active { + border-color: var(--primary-color); + } + .timed-preset-remaining { font-size: 16px; font-weight: 500; @@ -2258,6 +2315,12 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P width: 40px; } + .clickable-info-label { + cursor: pointer; + user-select: none; + -webkit-tap-highlight-color: transparent; + } + #vt-control-buttons { z-index: 0; position: absolute; @@ -2805,10 +2868,10 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P } /* Column colors */ - .preset-temp-col-label.col-frost { color: #3a9ff2; } - .preset-temp-col-label.col-eco { color: #5dd461; } - .preset-temp-col-label.col-comfort { color: #f9a21f; } - .preset-temp-col-label.col-boost { color: #f75252; } + .preset-temp-col-label.col-frost, .preset-temp-cell.preset-col-frost { color: #3a9ff2; } + .preset-temp-col-label.col-eco, .preset-temp-cell.preset-col-eco { color: #5dd461; } + .preset-temp-col-label.col-comfort, .preset-temp-cell.preset-col-comfort { color: #f9a21f; } + .preset-temp-col-label.col-boost, .preset-temp-cell.preset-col-boost { color: #f75252; } .preset-col-frost .preset-step-btn { background: rgba(58,159,242,0.15); color: #3a9ff2; border-color: rgba(58,159,242,0.4); } .preset-col-frost .preset-step-btn:hover { background: #3a9ff2; color: white; } @@ -2901,12 +2964,12 @@ const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","P fill: var(--hvac-mode-color, #f44336); } - `,ar,sr],kr.additionalThemeStyles=[sr],t([ut({attribute:!1})],kr.prototype,"hass",void 0),t([ut({type:Number})],kr.prototype,"value",void 0),t([mt()],kr.prototype,"_selectTargetTemperature",void 0),t([ut({type:Number})],kr.prototype,"current",void 0),t([ut({type:Number})],kr.prototype,"humidity",void 0),t([ut({type:Number})],kr.prototype,"temperature",void 0),t([ut({type:Number})],kr.prototype,"min",void 0),t([ut({type:Number})],kr.prototype,"max",void 0),t([ut({type:Number})],kr.prototype,"step",void 0),t([ut({type:Number})],kr.prototype,"powerPercent",void 0),t([ut({type:Number})],kr.prototype,"meanCyclePower",void 0),t([ut({type:Number})],kr.prototype,"valveOpenPercent",void 0),t([ut({type:Number})],kr.prototype,"devicePower",void 0),t([ut({type:Number})],kr.prototype,"regulatedTargetTemperature",void 0),t([ut({type:Boolean})],kr.prototype,"isOn",void 0),t([ut({type:Boolean})],kr.prototype,"window",void 0),t([ut({type:Boolean})],kr.prototype,"windowByPass",void 0),t([ut({type:Boolean})],kr.prototype,"presence",void 0),t([ut({type:Boolean})],kr.prototype,"motion",void 0),t([ut({type:Boolean})],kr.prototype,"overpowering",void 0),t([ut({type:Boolean})],kr.prototype,"isDeviceActive",void 0),t([ut({type:Boolean})],kr.prototype,"isSleeping",void 0),t([ut({type:Boolean})],kr.prototype,"isRegulated",void 0),t([ut({type:Boolean})],kr.prototype,"isRecalculateScheduled",void 0),t([ut({type:String})],kr.prototype,"windowState",void 0),t([ut({type:String})],kr.prototype,"windowAutoState",void 0),t([ut({type:String})],kr.prototype,"overpoweringState",void 0),t([ut({type:String})],kr.prototype,"presenceState",void 0),t([ut({type:String})],kr.prototype,"motionState",void 0),t([ut({type:String})],kr.prototype,"safetyState",void 0),t([ut({type:String})],kr.prototype,"status",void 0),t([ut({type:String})],kr.prototype,"hvacMode",void 0),t([ut({type:String})],kr.prototype,"hvacAction",void 0),t([ut({type:String})],kr.prototype,"preset",void 0),t([ut({type:String})],kr.prototype,"autoRegulationMode",void 0),t([ut({type:String})],kr.prototype,"currentAutoFanMode",void 0),t([ut({type:String})],kr.prototype,"autoFanMode",void 0),t([ut({type:String})],kr.prototype,"fanMode",void 0),t([ut({type:String})],kr.prototype,"hvacOffReason",void 0),t([ut({type:Boolean,reflect:!0})],kr.prototype,"dragging",void 0),t([ut({type:String})],kr.prototype,"name",void 0),t([mt()],kr.prototype,"changingHigh",void 0),t([mt()],kr.prototype,"_hasError",void 0),t([mt()],kr.prototype,"_config",void 0),t([mt()],kr.prototype,"_showThemeMenu",void 0),t([mt()],kr.prototype,"_showClassicPopup",void 0),t([ut({type:String})],kr.prototype,"theme",void 0),t([mt()],kr.prototype,"isLocked",void 0),t([mt()],kr.prototype,"isUserLocked",void 0),t([mt()],kr.prototype,"isAutomationLocked",void 0),t([mt()],kr.prototype,"showDigicodeModal",void 0),t([mt()],kr.prototype,"enteredCode",void 0),t([mt()],kr.prototype,"codeError",void 0),t([mt()],kr.prototype,"isLocking",void 0),t([mt()],kr.prototype,"timedPresetDuration",void 0),t([mt()],kr.prototype,"timedPresetActive",void 0),t([mt()],kr.prototype,"timedPresetRemainingTime",void 0),t([mt()],kr.prototype,"timedPresetPreset",void 0),t([mt()],kr.prototype,"_presetsPanelOpen",void 0),t([mt()],kr.prototype,"_regulationChartOpen",void 0),t([mt()],kr.prototype,"_presetTempEntities",void 0),kr=t([ct("versatile-thermostat-ui-card")],kr);const Sr=(t,e,i)=>Math.max(Math.min(t,i),e);function Mr(t){return Sr(Tr(2.55*t),0,255)}function Dr(t){return Sr(Tr(255*t),0,255)}function Cr(t){return Sr(Tr(t/2.55)/100,0,1)}function Ar(t){return Sr(Tr(100*t),0,100)}const Pr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Er=[..."0123456789ABCDEF"],Lr=t=>Er[15&t],$r=t=>Er[(240&t)>>4]+Er[15&t],zr=t=>(240&t)>>4==(15&t);function Or(t){var e=(t=>zr(t.r)&&zr(t.g)&&zr(t.b)&&zr(t.a))(t)?Lr:$r;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Vr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Hr(t,e,i){const o=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-o*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Rr(t,e,i){const o=(o,n=(o+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[o(5),o(3),o(1)]}function Ir(t,e,i){const o=Hr(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)o[n]*=1-e-i,o[n]+=e;return o}function Nr(t){const e=t.r/255,i=t.g/255,o=t.b/255,n=Math.max(e,i,o),a=Math.min(e,i,o),s=(n+a)/2;let r,l,c;return n!==a&&(c=n-a,l=s>.5?c/(2-n-a):c/(n+a),r=function(t,e,i,o,n){return t===n?(e-i)/o+(e>16&255,a>>8&255,255&a]}return t}(),qr.transparent=[0,0,0,0]);const e=qr[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Xr=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Kr=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Gr=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Qr(t,e,i){if(t){let o=Nr(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*i,0===e?360:1)),o=Wr(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function Jr(t,e){return t?Object.assign(e||{},t):t}function tl(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Dr(t[3]))):(e=Jr(t,{r:0,g:0,b:0,a:1})).a=Dr(e.a),e}function el(t){return"r"===t.charAt(0)?function(t){const e=Xr.exec(t);let i,o,n,a=255;if(e){if(e[7]!==i){const t=+e[7];a=e[8]?Mr(t):Sr(255*t,0,255)}return i=+e[1],o=+e[3],n=+e[5],i=255&(e[2]?Mr(i):Sr(i,0,255)),o=255&(e[4]?Mr(o):Sr(o,0,255)),n=255&(e[6]?Mr(n):Sr(n,0,255)),{r:i,g:o,b:n,a:a}}}(t):jr(t)}class il{constructor(t){if(t instanceof il)return t;const e=typeof t;let i;var o,n,a;"object"===e?i=tl(t):"string"===e&&(a=(o=t).length,"#"===o[0]&&(4===a||5===a?n={r:255&17*Pr[o[1]],g:255&17*Pr[o[2]],b:255&17*Pr[o[3]],a:5===a?17*Pr[o[4]]:255}:7!==a&&9!==a||(n={r:Pr[o[1]]<<4|Pr[o[2]],g:Pr[o[3]]<<4|Pr[o[4]],b:Pr[o[5]]<<4|Pr[o[6]],a:9===a?Pr[o[7]]<<4|Pr[o[8]]:255})),i=n||Zr(t)||el(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Jr(this._rgb);return t&&(t.a=Cr(t.a)),t}set rgb(t){this._rgb=tl(t)}rgbString(){return this._valid?function(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Cr(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}(this._rgb):void 0}hexString(){return this._valid?Or(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Nr(t),i=e[0],o=Ar(e[1]),n=Ar(e[2]);return t.a<255?`hsla(${i}, ${o}%, ${n}%, ${Cr(t.a)})`:`hsl(${i}, ${o}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,o=t.rgb;let n;const a=e===n?.5:e,s=2*a-1,r=i.a-o.a,l=((s*r==-1?s:(s+r)/(1+s*r))+1)/2;n=1-l,i.r=255&l*i.r+n*o.r+.5,i.g=255&l*i.g+n*o.g+.5,i.b=255&l*i.b+n*o.b+.5,i.a=a*i.a+(1-a)*o.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const o=Gr(Cr(t.r)),n=Gr(Cr(t.g)),a=Gr(Cr(t.b));return{r:Dr(Kr(o+i*(Gr(Cr(e.r))-o))),g:Dr(Kr(n+i*(Gr(Cr(e.g))-n))),b:Dr(Kr(a+i*(Gr(Cr(e.b))-a))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new il(this.rgb)}alpha(t){return this._rgb.a=Dr(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Tr(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Qr(this._rgb,2,t),this}darken(t){return Qr(this._rgb,2,-t),this}saturate(t){return Qr(this._rgb,1,t),this}desaturate(t){return Qr(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Nr(t);i[0]=Br(i[0]+e),i=Wr(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function ol(){}const nl=(()=>{let t=0;return()=>t++})();function al(t){return null==t}function sl(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function rl(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function ll(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function cl(t,e){return ll(t)?t:e}function dl(t,e){return void 0===t?e:t}const hl=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ul(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function ml(t,e,i,o){let n,a,s;if(sl(t))if(a=t.length,o)for(n=a-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;nt,x:t=>t.x,y:t=>t.y};function xl(t,e){const i=wl[e]||(wl[e]=function(t){const e=function(t){const e=t.split("."),i=[];let o="";for(const t of e)o+=t,o.endsWith("\\")?o=o.slice(0,-1)+".":(i.push(o),o="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function kl(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Tl=t=>void 0!==t,Sl=t=>"function"==typeof t,Ml=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const Dl=Math.PI,Cl=2*Dl,Al=Cl+Dl,Pl=Number.POSITIVE_INFINITY,El=Dl/180,Ll=Dl/2,$l=Dl/4,zl=2*Dl/3,Ol=Math.log10,Vl=Math.sign;function Hl(t,e,i){return Math.abs(t-e)l&&c=Math.min(e,i)-o&&t<=Math.max(e,i)+o}function Gl(t,e,i){i=i||(i=>t[i]1;)o=a+n>>1,i(o)?a=o:n=o;return{lo:a,hi:n}}const Ql=(t,e,i,o)=>Gl(t,i,o?o=>{const n=t[o][e];return nt[o][e]Gl(t,i,(o=>t[o][e]>=i));const tc=["push","pop","shift","splice","unshift"];function ec(t,e){const i=t._chartjs;if(!i)return;const o=i.listeners,n=o.indexOf(e);-1!==n&&o.splice(n,1),o.length>0||(tc.forEach((e=>{delete t[e]})),delete t._chartjs)}function ic(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const oc="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function nc(t,e){let i=[],o=!1;return function(...n){i=n,o||(o=!0,oc.call(window,(()=>{o=!1,t.apply(e,i)})))}}const ac=t=>"start"===t?"left":"end"===t?"right":"center",sc=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function rc(t,e,i){const o=e.length;let n=0,a=o;if(t._sorted){const{iScale:s,vScale:r,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=s.axis,{min:h,max:u,minDefined:m,maxDefined:p}=s.getUserBounds();if(m){if(n=Math.min(Ql(l,d,h).lo,i?o:Ql(e,d,s.getPixelForValue(h)).lo),c){const t=l.slice(0,n+1).reverse().findIndex((t=>!al(t[r.axis])));n-=Math.max(0,t)}n=Xl(n,0,o-1)}if(p){let t=Math.max(Ql(l,s.axis,u,!0).hi+1,i?0:Ql(e,d,s.getPixelForValue(u),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!al(t[r.axis])));t+=Math.max(0,e)}a=Xl(t,n,o)-n}else a=o-n}return{start:n,count:a}}function lc(t){const{xScale:e,yScale:i,_scaleRanges:o}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!o)return t._scaleRanges=n,!0;const a=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==i.min||o.ymax!==i.max;return Object.assign(o,n),a}const cc=t=>0===t||1===t,dc=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Cl/i),hc=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*Cl/i)+1,uc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Ll),easeOutSine:t=>Math.sin(t*Ll),easeInOutSine:t=>-.5*(Math.cos(Dl*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>cc(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>cc(t)?t:dc(t,.075,.3),easeOutElastic:t=>cc(t)?t:hc(t,.075,.3),easeInOutElastic(t){const e=.1125;return cc(t)?t:t<.5?.5*dc(2*t,e,.45):.5+.5*hc(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-uc.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*uc.easeInBounce(2*t):.5*uc.easeOutBounce(2*t-1)+.5};function mc(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function pc(t){return mc(t)?t:new il(t)}function _c(t){return mc(t)?t:new il(t).saturate(.5).darken(.1).hexString()}const gc=["x","y","borderWidth","radius","tension"],fc=["color","borderColor","backgroundColor"];const bc=new Map;function vc(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let o=bc.get(i);return o||(o=new Intl.NumberFormat(t,e),bc.set(i,o)),o}(e,i).format(t)}const yc={values:t=>sl(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const o=this.chart.options.locale;let n,a=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),a=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=Ol(Math.abs(a)),r=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),vc(t,o,l)},logarithmic(t,e,i){if(0===t)return"0";const o=i[e].significand||t/Math.pow(10,Math.floor(Ol(t)));return[1,2,3,5,10,15].includes(o)||e>.8*i.length?yc.numeric.call(this,t,e,i):""}};var wc={formatters:yc};const xc=Object.create(null),kc=Object.create(null);function Tc(t,e){if(!e)return t;const i=e.split(".");for(let e=0,o=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>_c(e.backgroundColor),this.hoverBorderColor=(t,e)=>_c(e.borderColor),this.hoverColor=(t,e)=>_c(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Sc(this,t,e)}get(t){return Tc(this,t)}describe(t,e){return Sc(kc,t,e)}override(t,e){return Sc(xc,t,e)}route(t,e,i,o){const n=Tc(this,t),a=Tc(this,i),s="_"+e;Object.defineProperties(n,{[s]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=a[o];return rl(t)?Object.assign({},e,t):dl(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Dc=new Mc({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:fc},numbers:{type:"number",properties:gc}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:wc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Cc(t,e,i,o,n){let a=e[n];return a||(a=e[n]=t.measureText(n).width,i.push(n)),a>o&&(o=a),o}function Ac(t,e,i,o){let n=(o=o||{}).data=o.data||{},a=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(n=o.data={},a=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let s=0;const r=i.length;let l,c,d,h,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function zc(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==a.strokeColor;let l,c;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),al(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,a),l=0;l+t||0;function qc(t,e){const i={},o=rl(e),n=o?Object.keys(e):e,a=rl(t)?o?i=>dl(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=Yc(a(t));return i}function Zc(t){return qc(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Xc(t){return qc(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Kc(t){const e=Zc(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Gc(t,e){t=t||{},e=e||Dc.font;let i=dl(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let o=dl(t.style,e.style);o&&!(""+o).match(jc)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const n={family:dl(t.family,e.family),lineHeight:Uc(dl(t.lineHeight,e.lineHeight),i),size:i,style:o,weight:dl(t.weight,e.weight),string:""};return n.string=function(t){return!t||al(t.size)||al(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function Qc(t,e,i,o){let n,a,s,r=!0;for(n=0,a=t.length;nt[0])){const a=i||t;void 0===o&&(o=hd("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:o,_getTarget:n,override:i=>td([i,...t],e,a,o)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,o)=>ad(i,o,(()=>function(t,e,i,o){let n;for(const a of e)if(n=hd(od(a,t),i),void 0!==n)return nd(t,n)?cd(i,o,t,n):n}(o,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ud(t).includes(e),ownKeys:t=>ud(t),set(t,e,i){const o=t._storage||(t._storage=n());return t[e]=o[e]=i,delete t._keys,!0}})}function ed(t,e,i,o){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:id(t,o),setContext:e=>ed(t,e,i,o),override:n=>ed(t.override(n),e,i,o)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ad(t,e,(()=>function(t,e,i){const{_proxy:o,_context:n,_subProxy:a,_descriptors:s}=t;let r=o[e];Sl(r)&&s.isScriptable(e)&&(r=function(t,e,i,o){const{_proxy:n,_context:a,_subProxy:s,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(a,s||o);r.delete(t),nd(t,l)&&(l=cd(n._scopes,n,t,l));return l}(e,r,t,i));sl(r)&&r.length&&(r=function(t,e,i,o){const{_proxy:n,_context:a,_subProxy:s,_descriptors:r}=i;if(void 0!==a.index&&o(t))return e[a.index%e.length];if(rl(e[0])){const i=e,o=n._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=cd(o,n,t,l);e.push(ed(i,a,s&&s[t],r))}}return e}(e,r,t,s.isIndexable));nd(e,r)&&(r=ed(r,n,a&&a[e],s));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,o)=>(t[i]=o,delete e[i],!0)})}function id(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:o=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:o,isScriptable:Sl(i)?i:()=>i,isIndexable:Sl(o)?o:()=>o}}const od=(t,e)=>t?t+kl(e):e,nd=(t,e)=>rl(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ad(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const o=i();return t[e]=o,o}function sd(t,e,i){return Sl(t)?t(e,i):t}const rd=(t,e)=>!0===t?e:"string"==typeof t?xl(e,t):void 0;function ld(t,e,i,o,n){for(const a of e){const e=rd(i,a);if(e){t.add(e);const a=sd(e._fallback,i,n);if(void 0!==a&&a!==i&&a!==o)return a}else if(!1===e&&void 0!==o&&i!==o)return null}return!1}function cd(t,e,i,o){const n=e._rootScopes,a=sd(e._fallback,i,o),s=[...t,...n],r=new Set;r.add(o);let l=dd(r,s,i,a||i,o);return null!==l&&((void 0===a||a===i||(l=dd(r,s,a,l,o),null!==l))&&td(Array.from(r),[""],n,a,(()=>function(t,e,i){const o=t._getTarget();e in o||(o[e]={});const n=o[e];if(sl(n)&&rl(i))return i;return n||{}}(e,i,o))))}function dd(t,e,i,o,n){for(;i;)i=ld(t,e,i,o,n);return i}function hd(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function ud(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function md(t,e,i,o){const{iScale:n}=t,{key:a="r"}=this._parsing,s=new Array(o);let r,l,c,d;for(r=0,l=o;re"x"===t?"y":"x";function fd(t,e,i,o){const n=t.skip?e:t,a=e,s=i.skip?e:i,r=Ul(a,n),l=Ul(s,a);let c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const h=o*c,u=o*d;return{previous:{x:a.x-h*(s.x-n.x),y:a.y-h*(s.y-n.y)},next:{x:a.x+u*(s.x-n.x),y:a.y+u*(s.y-n.y)}}}function bd(t,e="x"){const i=gd(e),o=t.length,n=Array(o).fill(0),a=Array(o);let s,r,l,c=_d(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)bd(t,n);else{let i=o?t[t.length-1]:t[0];for(a=0,s=t.length;at.ownerDocument.defaultView.getComputedStyle(t,null);const Sd=["top","right","bottom","left"];function Md(t,e,i){const o={};i=i?"-"+i:"";for(let n=0;n<4;n++){const a=Sd[n];o[a]=parseFloat(t[e+"-"+a+i])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const Dd=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function Cd(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:o}=e,n=Td(i),a="border-box"===n.boxSizing,s=Md(n,"padding"),r=Md(n,"border","width"),{x:l,y:c,box:d}=function(t,e){const i=t.touches,o=i&&i.length?i[0]:t,{offsetX:n,offsetY:a}=o;let s,r,l=!1;if(Dd(n,a,t.target))s=n,r=a;else{const t=e.getBoundingClientRect();s=o.clientX-t.left,r=o.clientY-t.top,l=!0}return{x:s,y:r,box:l}}(t,i),h=s.left+(d&&r.left),u=s.top+(d&&r.top);let{width:m,height:p}=e;return a&&(m-=s.width+r.width,p-=s.height+r.height),{x:Math.round((l-h)/m*i.width/o),y:Math.round((c-u)/p*i.height/o)}}const Ad=t=>Math.round(10*t)/10;function Pd(t,e,i,o){const n=Td(t),a=Md(n,"margin"),s=kd(n.maxWidth,t,"clientWidth")||Pl,r=kd(n.maxHeight,t,"clientHeight")||Pl,l=function(t,e,i){let o,n;if(void 0===e||void 0===i){const a=t&&xd(t);if(a){const t=a.getBoundingClientRect(),s=Td(a),r=Md(s,"border","width"),l=Md(s,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,o=kd(s.maxWidth,a,"clientWidth"),n=kd(s.maxHeight,a,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:o||Pl,maxHeight:n||Pl}}(t,e,i);let{width:c,height:d}=l;if("content-box"===n.boxSizing){const t=Md(n,"border","width"),e=Md(n,"padding");c-=e.width+t.width,d-=e.height+t.height}c=Math.max(0,c-a.width),d=Math.max(0,o?c/o:d-a.height),c=Ad(Math.min(c,s,l.maxWidth)),d=Ad(Math.min(d,r,l.maxHeight)),c&&!d&&(d=Ad(c/2));return(void 0!==e||void 0!==i)&&o&&l.height&&d>l.height&&(d=l.height,c=Ad(Math.floor(d*o))),{width:c,height:d}}function Ed(t,e,i){const o=e||1,n=Ad(t.height*o),a=Ad(t.width*o);t.height=Ad(t.height),t.width=Ad(t.width);const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==o||s.height!==n||s.width!==a)&&(t.currentDevicePixelRatio=o,s.height=n,s.width=a,t.ctx.setTransform(o,0,0,o,0,0),!0)}const Ld=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};wd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function $d(t,e){const i=function(t,e){return Td(t).getPropertyValue(e)}(t,e),o=i&&i.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function zd(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Od(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:"middle"===o?i<.5?t.y:e.y:"after"===o?i<1?t.y:e.y:i>0?e.y:t.y}}function Vd(t,e,i,o){const n={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},s=zd(t,n,i),r=zd(n,a,i),l=zd(a,e,i),c=zd(s,r,i),d=zd(r,l,i);return zd(c,d,i)}function Hd(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Rd(t,e){let i,o;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,o=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Id(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Nd(t){return"angle"===t?{between:Zl,compare:Yl,normalize:ql}:{between:Kl,compare:(t,e)=>t-e,normalize:t=>t}}function Fd({start:t,end:e,count:i,loop:o,style:n}){return{start:t%i,end:e%i,loop:o&&(e-t+1)%i==0,style:n}}function Wd(t,e,i){if(!i)return[t];const{property:o,start:n,end:a}=i,s=e.length,{compare:r,between:l,normalize:c}=Nd(o),{start:d,end:h,loop:u,style:m}=function(t,e,i){const{property:o,start:n,end:a}=i,{between:s,normalize:r}=Nd(o),l=e.length;let c,d,{start:h,end:u,loop:m}=t;if(m){for(h+=l,u+=l,c=0,d=l;cb||l(n,f,_)&&0!==r(n,f),w=()=>!b||0===r(a,_)||l(a,f,_);for(let t=d,i=d;t<=h;++t)g=e[t%s],g.skip||(_=c(g[o]),_!==f&&(b=l(_,n,a),null===v&&y()&&(v=0===r(_,n)?t:i),null!==v&&w()&&(p.push(Fd({start:v,end:t,loop:u,count:s,style:m})),v=null),i=t,f=_));return null!==v&&p.push(Fd({start:v,end:h,loop:u,count:s,style:m})),p}function Bd(t,e){const i=[],o=t.segments;for(let n=0;no({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)})))}_refresh(){this._request||(this._running=!0,this._request=oc.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,o)=>{if(!i.running||!i.items.length)return;const n=i.items;let a,s=n.length-1,r=!1;for(;s>=0;--s)a=n[s],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),r=!0):(n[s]=n[n.length-1],n.pop());r&&(o.draw(),this._notify(o,i,t,"progress")),n.length||(i.running=!1,this._notify(o,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let o=i.length-1;for(;o>=0;--o)i[o].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Kd=new Xd;const Gd="transparent",Qd={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const o=pc(t||Gd),n=o.valid&&pc(e||Gd);return n&&n.valid?n.mix(o,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Jd{constructor(t,e,i,o){const n=e[i];o=Qc([t.to,o,n,t.from]);const a=Qc([t.from,n,o]);this._active=!0,this._fn=t.fn||Qd[t.type||typeof a],this._easing=uc[t.easing]||uc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=o,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const o=this._target[this._prop],n=i-this._start,a=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Qc([t.to,e,o,t.from]),this._from=Qc([t.from,o,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,o=this._prop,n=this._from,a=this._loop,s=this._to;let r;if(this._active=n!==s&&(a||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[o]=this._fn(n,s,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t{const n=t[o];if(!rl(n))return;const a={};for(const t of e)a[t]=n[t];(sl(n.properties)&&n.properties||[o]).forEach((t=>{t!==o&&i.has(t)||i.set(t,a)}))}))}_animateOptions(t,e){const i=e.options,o=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!o)return[];const n=this._createAnimations(o,i);return i.$shared&&function(t,e){const i=[],o=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,o=[],n=t.$animations||(t.$animations={}),a=Object.keys(e),s=Date.now();let r;for(r=a.length-1;r>=0;--r){const l=a[r];if("$"===l.charAt(0))continue;if("options"===l){o.push(...this._animateOptions(t,e));continue}const c=e[l];let d=n[l];const h=i.get(l);if(d){if(h&&d.active()){d.update(h,c,s);continue}d.cancel()}h&&h.duration?(n[l]=d=new Jd(h,t,l,c),o.push(d)):t[l]=c}return o}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Kd.add(this._chart,i),!0):void 0}}function eh(t,e){const i=t&&t.options||{},o=i.reverse,n=void 0===i.min?e:0,a=void 0===i.max?e:0;return{start:o?a:n,end:o?n:a}}function ih(t,e){const i=[],o=t._getSortedDatasetMetas(e);let n,a;for(n=0,a=o.length;n0||!i&&e<0)return n.index}return null}function rh(t,e){const{chart:i,_cachedMeta:o}=t,n=i._stacks||(i._stacks={}),{iScale:a,vScale:s,index:r}=o,l=a.axis,c=s.axis,d=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(a,s,o),h=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function ch(t,e){const i=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[o]||void 0===e[o][i])return;delete e[o][i],void 0!==e[o]._visualValues&&void 0!==e[o]._visualValues[i]&&delete e[o]._visualValues[i]}}}const dh=t=>"reset"===t||"none"===t,hh=(t,e)=>e?t:Object.assign({},t);class uh{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=nh(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ch(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),o=(t,e,i,o)=>"x"===t?e:"r"===t?o:i,n=e.xAxisID=dl(i.xAxisID,lh(t,"x")),a=e.yAxisID=dl(i.yAxisID,lh(t,"y")),s=e.rAxisID=dl(i.rAxisID,lh(t,"r")),r=e.indexAxis,l=e.iAxisID=o(r,n,a,s),c=e.vAxisID=o(r,a,n,s);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ec(this._data,this),t._stacked&&ch(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(rl(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:o}=e,n="x"===i.axis?"x":"y",a="x"===o.axis?"x":"y",s=Object.keys(t),r=new Array(s.length);let l,c,d;for(l=0,c=s.length;l{const i="_onData"+kl(e),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=o.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let o=!1;this._dataCheck();const n=e._stacked;e._stacked=nh(e.vScale,e),e.stack!==i.stack&&(o=!0,ch(e),e.stack=i.stack),this._resyncElements(t),(o||n!==e._stacked)&&(rh(this,e._parsed),e._stacked=nh(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:o}=this,{iScale:n,_stacked:a}=i,s=n.axis;let r,l,c,d=0===t&&e===o.length||i._sorted,h=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=o,i._sorted=!0,c=o;else{c=sl(o[t])?this.parseArrayData(i,o,t,e):rl(o[t])?this.parseObjectData(i,o,t,e):this.parsePrimitiveData(i,o,t,e);const n=()=>null===l[s]||h&&l[s]t&&!e.hidden&&e._stacked&&{keys:ih(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:i,minDefined:o,maxDefined:n}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(s);let h,u;function m(){u=o[h];const e=u[s.axis];return!ll(u[t.axis])||c>e||d=0;--h)if(!m()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let o,n,a;for(o=0,n=e.length;o=0&&tthis.getContext(i,o,e)),d);return m.$shared&&(m.$shared=r,n[a]=Object.freeze(hh(m,r))),m}_resolveAnimations(t,e,i){const o=this.chart,n=this._cachedDataOpts,a=`animation-${e}`,s=n[a];if(s)return s;let r;if(!1!==o.options.animation){const o=this.chart.config,n=o.datasetAnimationScopeKeys(this._type,e),a=o.getOptionScopes(this.getDataset(),n);r=o.createResolver(a,this.getContext(t,i,e))}const l=new th(o,r&&r.animations);return r&&r._cacheable&&(n[a]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||dh(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),o=this._sharedOptions,n=this.getSharedOptions(i),a=this.includeOptions(e,n)||n!==o;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:a}}updateElement(t,e,i,o){dh(o)?Object.assign(t,i):this._resolveAnimations(e,o).update(t,i)}updateSharedOptions(t,e,i){t&&!dh(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,o){t.active=o;const n=this.getStyle(e,o);this._resolveAnimations(e,i,o).update(t,{options:!o&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const o=i.length,n=e.length,a=Math.min(n,o);a&&this.parse(0,a),n>o?this._insertElements(o,n-o,t):n{for(t.length+=e,s=t.length-1;s>=a;s--)t[s]=t[s-e]};for(r(n),s=t;st-e)))}return t._cache.$bar}(e,t.type);let o,n,a,s,r=e._length;const l=()=>{32767!==a&&-32768!==a&&(Tl(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(o=0,n=i.length;oMath.abs(r)&&(l=r,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:n,end:a,min:s,max:r}}(t,e,i,o):e[i.axis]=i.parse(t,o),e}function _h(t,e,i,o){const n=t.iScale,a=t.vScale,s=n.getLabels(),r=n===a,l=[];let c,d,h,u;for(c=i,d=i+o;ct.x,i="left",o="right"):(e=t.baset.controller.options.grouped)),n=i.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(e),r=s&&s[i.axis],l=t=>{const e=t._parsed.find((t=>t[i.axis]===r)),o=e&&e[t.vScale.axis];if(al(o)||isNaN(o))return!0};for(const i of o)if((void 0===e||!l(i))&&((!1===n||-1===a.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&a.push(i.stack),i.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter((i=>t[i].axis===e)).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[dl("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const o=this._getStacks(t,i),n=void 0!==e?o.indexOf(e):-1;return-1===n?o.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,o=[];let n,a;for(n=0,a=e.data.length;n=i?1:-1)}(h,e,s)*a,u===s&&(g-=h/2);const t=e.getPixelForDecimal(0),n=e.getPixelForDecimal(1),l=Math.min(t,n),m=Math.max(t,n);g=Math.max(Math.min(g,m),l),d=g+h,i&&!c&&(r._stacks[e.axis]._visualValues[o]=e.getValueForPixel(d)-e.getValueForPixel(g))}if(g===e.getPixelForValue(s)){const t=Vl(h)*e.getLineWidthForValue(s)/2;g+=t,h-=t}return{size:h,base:g,head:d,center:d+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,o=this.options,n=o.skipNull,a=dl(o.maxBarThickness,1/0);let s,r;const l=this._getAxisCount();if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,o){const n=e.pixels,a=n[t];let s=t>0?n[t-1]:null,r=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:o,yScale:n}=e,a=this.getParsed(t),s=o.getLabelForValue(a.x),r=n.getLabelForValue(a.y),l=a._custom;return{label:i[t]||"",value:"("+s+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,o){const n="reset"===o,{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,o),c=a.axis,d=s.axis;for(let h=e;h"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:o,color:n,useBorderRadius:a,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map(((e,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:l.backgroundColor,fontColor:n,hidden:!t.getDataVisibility(r),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:o,pointStyle:i,borderRadius:a&&(s||l.borderRadius),index:r}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,o=this._cachedMeta;if(!1===this._parsing)o._parsed=i;else{let n,a,s=t=>+i[t];if(rl(i[t])){const{key:t="value"}=this._parsing;s=e=>+xl(i[e],t)}for(n=t,a=t+e;nZl(t,r,l,!0)?1:Math.max(e,e*i,o,o*i),p=(t,e,o)=>Zl(t,r,l,!0)?-1:Math.min(e,e*i,o,o*i),_=m(0,c,h),g=m(Ll,d,u),f=p(Dl,c,h),b=p(Dl+Ll,d,u);o=(_-f)/2,n=(g-b)/2,a=-(_+f)/2,s=-(g+b)/2}return{ratioX:o,ratioY:n,offsetX:a,offsetY:s}}(u,h,r),f=(i.width-a)/m,b=(i.height-a)/p,v=Math.max(Math.min(f,b)/2,0),y=hl(this.options.radius,v),w=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=_*y,this.offsetY=g*y,o.total=this.calculateTotal(),this.outerRadius=y-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*d,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,o=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*n/Cl)}updateElements(t,e,i,o){const n="reset"===o,a=this.chart,s=a.chartArea,r=a.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=n&&r.animateScale,h=d?0:this.innerRadius,u=d?0:this.outerRadius,{sharedOptions:m,includeOptions:p}=this._getSharedOptions(e,o);let _,g=this._getRotation();for(_=0;_0&&!isNaN(t)?Cl*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,o=i.data.labels||[],n=vc(e._parsed[t],i.options.locale);return{label:o[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let o,n,a,s,r;if(!t)for(o=0,n=i.data.datasets.length;o0&&this.getParsed(e-1);for(let i=0;i=f){b.skip=!0;continue}const y=this.getParsed(i),w=al(y[u]),x=b[h]=a.getPixelForValue(y[h],i),k=b[u]=n||w?s.getBasePixel():s.getPixelForValue(r?this.applyStack(s,y,r):y[u],i);b.skip=isNaN(x)||isNaN(k)||w,b.stop=i>0&&Math.abs(y[h]-v[h])>_,p&&(b.parsed=y,b.raw=l.data[i]),d&&(b.options=c||this.resolveDataElementOptions(i,m.active?"active":o)),g||this.updateElement(m,i,b,o),v=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,o=t.data||[];if(!o.length)return i;const n=o[0].size(this.resolveDataElementOptions(0)),a=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(i,n,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class Sh extends uh{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:o}}=t.legend.options;return e.labels.map(((e,n)=>{const a=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:o,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,o=i.data.labels||[],n=vc(e._parsed[t].r,i.options.locale);return{label:o[t]||"",value:n}}parseObjectData(t,e,i,o){return md.bind(this)(t,e,i,o)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(oe.max&&(e.max=o))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,o=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(o/2,0),a=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,o){const n="reset"===o,a=this.chart,s=a.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,c=r.yCenter,d=r.getIndexAngle(0)-.5*Dl;let h,u=d;const m=360/this.countVisibleElements();for(h=0;h{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Fl(this.resolveDataElementOptions(t,e).angle||i):0}}class Mh extends kh{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class Dh extends uh{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,o){return md.bind(this)(t,e,i,o)}update(t){const e=this._cachedMeta,i=e.dataset,o=e.data||[],n=e.iScale.getLabels();if(i.points=o,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const a={_loop:!0,_fullLoop:n.length===o.length,options:e};this.updateElement(i,void 0,a,t)}this.updateElements(o,0,o.length,t)}updateElements(t,e,i,o){const n=this._cachedMeta.rScale,a="reset"===o;for(let s=e;s0&&this.getParsed(e-1);for(let c=e;c0&&Math.abs(i[u]-b[u])>g,_&&(p.parsed=i,p.raw=l.data[c]),h&&(p.options=d||this.resolveDataElementOptions(c,e.active?"active":o)),f||this.updateElement(e,c,p,o),b=i}this.updateSharedOptions(d,o,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,o=i.options&&i.options.borderWidth||0;if(!e.length)return o;const n=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,n,a)/2}}var Ah=Object.freeze({__proto__:null,BarController:wh,BubbleController:xh,DoughnutController:kh,LineController:Th,PieController:Mh,PolarAreaController:Sh,RadarController:Dh,ScatterController:Ch});function Ph(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Eh{static override(t){Object.assign(Eh.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Ph()}parse(){return Ph()}format(){return Ph()}add(){return Ph()}diff(){return Ph()}startOf(){return Ph()}endOf(){return Ph()}}var Lh={_date:Eh};function $h(t,e,i,o){const{controller:n,data:a,_sorted:s}=t,r=n._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&"r"!==e&&s&&a.length){const s=r._reversePixels?Jl:Ql;if(!o){const o=s(a,e,i);if(l){const{vScale:e}=n._cachedMeta,{_parsed:i}=t,a=i.slice(0,o.lo+1).reverse().findIndex((t=>!al(t[e.axis])));o.lo-=Math.max(0,a);const s=i.slice(o.hi).findIndex((t=>!al(t[e.axis])));o.hi+=Math.max(0,s)}return o}if(n._sharedOptions){const t=a[0],o="function"==typeof t.getRange&&t.getRange(e);if(o){const t=s(a,e,i-o),n=s(a,e,i+o);return{lo:t.lo,hi:n.hi}}}}return{lo:0,hi:a.length-1}}function zh(t,e,i,o,n){const a=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=a.length;t{t[s]&&t[s](e[i],n)&&(a.push({element:t,datasetIndex:o,index:l}),r=r||t.inRange(e.x,e.y,n))})),o&&!r?[]:a}var Ih={evaluateInteractionItems:zh,modes:{index(t,e,i,o){const n=Cd(e,t),a=i.axis||"x",s=i.includeInvisible||!1,r=i.intersect?Oh(t,n,a,o,s):Hh(t,n,a,!1,o,s),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,o){const n=Cd(e,t),a=i.axis||"xy",s=i.includeInvisible||!1;let r=i.intersect?Oh(t,n,a,o,s):Hh(t,n,a,!1,o,s);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tOh(t,Cd(e,t),i.axis||"xy",o,i.includeInvisible||!1),nearest(t,e,i,o){const n=Cd(e,t),a=i.axis||"xy",s=i.includeInvisible||!1;return Hh(t,n,a,i.intersect,o,s)},x:(t,e,i,o)=>Rh(t,Cd(e,t),"x",i.intersect,o),y:(t,e,i,o)=>Rh(t,Cd(e,t),"y",i.intersect,o)}};const Nh=["left","top","right","bottom"];function Fh(t,e){return t.filter((t=>t.pos===e))}function Wh(t,e){return t.filter((t=>-1===Nh.indexOf(t.pos)&&t.box.axis===e))}function Bh(t,e){return t.sort(((t,i)=>{const o=e?i:t,n=e?t:i;return o.weight===n.weight?o.index-n.index:o.weight-n.weight}))}function jh(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:o,stackWeight:n}=i;if(!t||!Nh.includes(o))continue;const a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=n}return e}(t),{vBoxMaxWidth:o,hBoxMaxHeight:n}=e;let a,s,r;for(a=0,s=t.length;a{o[t]=Math.max(e[t],i[t])})),o}return o(t?["left","right"]:["top","bottom"])}function Xh(t,e,i,o){const n=[];let a,s,r,l,c,d;for(a=0,s=t.length,c=0;at.box.fullSize)),!0),o=Bh(Fh(e,"left"),!0),n=Bh(Fh(e,"right")),a=Bh(Fh(e,"top"),!0),s=Bh(Fh(e,"bottom")),r=Wh(e,"x"),l=Wh(e,"y");return{fullSize:i,leftAndTop:o.concat(a),rightAndBottom:n.concat(l).concat(s).concat(r),chartArea:Fh(e,"chartArea"),vertical:o.concat(n).concat(l),horizontal:a.concat(s).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;ml(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const d=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,h=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/d,hBoxMaxHeight:s/2}),u=Object.assign({},n);Yh(u,Kc(o));const m=Object.assign({maxPadding:u,w:a,h:s,x:n.left,y:n.top},n),p=jh(l.concat(c),h);Xh(r.fullSize,m,h,p),Xh(l,m,h,p),Xh(c,m,h,p)&&Xh(l,m,h,p),function(t){const e=t.maxPadding;function i(i){const o=Math.max(e[i]-t[i],0);return t[i]+=o,o}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(m),Gh(r.leftAndTop,m,h,p),m.x+=m.w,m.y+=m.h,Gh(r.rightAndBottom,m,h,p),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},ml(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})}))}};class Jh{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,o){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,o?Math.floor(e/o):i)}}isAttached(t){return!0}updateConfig(t){}}class tu extends Jh{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const eu="$chartjs",iu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ou=t=>null===t||""===t;const nu=!!Ld&&{passive:!0};function au(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,nu)}function su(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function ru(t,e,i){const o=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||su(i.addedNodes,o),e=e&&!su(i.removedNodes,o);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function lu(t,e,i){const o=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||su(i.removedNodes,o),e=e&&!su(i.addedNodes,o);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const cu=new Map;let du=0;function hu(){const t=window.devicePixelRatio;t!==du&&(du=t,cu.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function uu(t,e,i){const o=t.canvas,n=o&&xd(o);if(!n)return;const a=nc(((t,e)=>{const o=n.clientWidth;i(t,e),o{const e=t[0],i=e.contentRect.width,o=e.contentRect.height;0===i&&0===o||a(i,o)}));return s.observe(n),function(t,e){cu.size||window.addEventListener("resize",hu),cu.set(t,e)}(t,a),s}function mu(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){cu.delete(t),cu.size||window.removeEventListener("resize",hu)}(t)}function pu(t,e,i){const o=t.canvas,n=nc((e=>{null!==t.ctx&&i(function(t,e){const i=iu[t.type]||t.type,{x:o,y:n}=Cd(t,e);return{type:i,chart:e,native:t,x:void 0!==o?o:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,nu)}(o,e,n),n}class _u extends Jh{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,o=t.getAttribute("height"),n=t.getAttribute("width");if(t[eu]={initial:{height:o,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ou(n)){const e=$d(t,"width");void 0!==e&&(t.width=e)}if(ou(o))if(""===t.style.height)t.height=t.width/(e||2);else{const e=$d(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[eu])return!1;const i=e[eu].initial;["height","width"].forEach((t=>{const o=i[t];al(o)?e.removeAttribute(t):e.setAttribute(t,o)}));const o=i.style||{};return Object.keys(o).forEach((t=>{e.style[t]=o[t]})),e.width=e.width,delete e[eu],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const o=t.$proxies||(t.$proxies={}),n={attach:ru,detach:lu,resize:uu}[e]||pu;o[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),o=i[e];if(!o)return;({attach:mu,detach:mu,resize:mu}[e]||au)(t,e,o),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,o){return Pd(t,e,i,o)}isAttached(t){const e=t&&xd(t);return!(!e||!e.isConnected)}}function gu(t){return!wd()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?tu:_u}class fu{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Il(this.x)&&Il(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const o={};return t.forEach((t=>{o[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),o}}function bu(t,e){const i=t.options.ticks,o=function(t){const e=t.options.offset,i=t._tickSize(),o=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(o,n))}(t),n=Math.min(i.maxTicksLimit||o,o),a=i.major.enabled?function(t){const e=[];let i,o;for(i=0,o=t.length;in)return function(t,e,i,o){let n,a=0,s=i[0];for(o=Math.ceil(o),n=0;nt-e)).pop(),e}(o);for(let t=0,e=a.length-1;tn)return e}return Math.max(n,1)}(a,e,n);if(s>0){let t,i;const o=s>1?Math.round((l-r)/(s-1)):null;for(vu(e,c,d,al(o)?0:r-o,r),t=0,i=s-1;t"top"===e||"left"===e?t[e]+i:t[e]-i,wu=(t,e)=>Math.min(e||t,t);function xu(t,e){const i=[],o=t.length/e,n=t.length;let a=0;for(;as+r)))return c}function Tu(t){return t.drawTicks?t.tickLength:0}function Su(t,e){if(!t.display)return 0;const i=Gc(t.font,e),o=Kc(t.padding);return(sl(t.text)?t.text.length:1)*i.lineHeight+o.height}function Mu(t,e,i){let o=ac(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class Du extends fu{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:o}=this;return t=cl(t,Number.POSITIVE_INFINITY),e=cl(e,Number.NEGATIVE_INFINITY),i=cl(i,Number.POSITIVE_INFINITY),o=cl(o,Number.NEGATIVE_INFINITY),{min:cl(t,i),max:cl(e,o),minDefined:ll(t),maxDefined:ll(e)}}getMinMax(t){let e,{min:i,max:o,minDefined:n,maxDefined:a}=this.getUserBounds();if(n&&a)return{min:i,max:o};const s=this.getMatchingVisibleMetas();for(let r=0,l=s.length;ro?o:i,o=n&&i>o?i:o,{min:cl(i,cl(o,i)),max:cl(o,cl(i,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ul(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:o,grace:n,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:o,max:n}=t,a=hl(e,(n-o)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(o,-Math.abs(a)),max:s(n,a)}}(this,n,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=s=n||i<=1||!this.isHorizontal())return void(this.labelRotation=o);const c=this._getLabelSizes(),d=c.widest.width,h=c.highest.height,u=Xl(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:u/(i-1),d+6>a&&(a=u/(i-(t.offset?.5:1)),s=this.maxHeight-Tu(t.grid)-e.padding-Su(t.title,this.chart.options.font),r=Math.sqrt(d*d+h*h),l=Wl(Math.min(Math.asin(Xl((c.highest.height+6)/a,-1,1)),Math.asin(Xl(s/r,-1,1))-Math.asin(Xl(h/r,-1,1)))),l=Math.max(o,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){ul(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ul(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:o,grid:n}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const a=Su(o,e.options.font);if(s?(t.width=this.maxWidth,t.height=Tu(n)+a):(t.height=this.maxHeight,t.width=Tu(n)+a),i.display&&this.ticks.length){const{first:e,last:o,widest:n,highest:a}=this._getLabelSizes(),r=2*i.padding,l=Fl(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(s){const e=i.mirror?0:d*n.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:c*n.width+d*a.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,o,d,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,o){const{ticks:{align:n,padding:a},position:s}=this.options,r=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;r?l?(d=o*t.width,h=i*e.height):(d=i*t.height,h=o*e.width):"start"===n?h=e.width:"end"===n?d=t.width:"inner"!==n&&(d=t.width/2,h=e.width/2),this.paddingLeft=Math.max((d-s+a)*this.width/(this.width-s),0),this.paddingRight=Math.max((h-c+a)*this.width/(this.width-c),0)}else{let i=e.height/2,o=t.height/2;"start"===n?(i=0,o=t.height):"end"===n&&(i=e.height,o=0),this.paddingTop=i+a,this.paddingBottom=o+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ul(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,o=i.length/2;let n;if(o>e){for(n=0;n({width:a[t]||0,height:s[t]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(x),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Xl(this._alignToPixels?Pc(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*o?s/i:r/o:r*o0}_computeGridLineItems(t){const e=this.axis,i=this.chart,o=this.options,{grid:n,position:a,border:s}=o,r=n.offset,l=this.isHorizontal(),c=this.ticks.length+(r?1:0),d=Tu(n),h=[],u=s.setContext(this.getContext()),m=u.display?u.width:0,p=m/2,_=function(t){return Pc(i,t,m)};let g,f,b,v,y,w,x,k,T,S,M,D;if("top"===a)g=_(this.bottom),w=this.bottom-d,k=g-p,S=_(t.top)+p,D=t.bottom;else if("bottom"===a)g=_(this.top),S=t.top,D=_(t.bottom)-p,w=g+p,k=this.top+d;else if("left"===a)g=_(this.right),y=this.right-d,x=g-p,T=_(t.left)+p,M=t.right;else if("right"===a)g=_(this.left),T=t.left,M=_(t.right)-p,y=g+p,x=this.left+d;else if("x"===e){if("center"===a)g=_((t.top+t.bottom)/2+.5);else if(rl(a)){const t=Object.keys(a)[0],e=a[t];g=_(this.chart.scales[t].getPixelForValue(e))}S=t.top,D=t.bottom,w=g+p,k=w+d}else if("y"===e){if("center"===a)g=_((t.left+t.right)/2);else if(rl(a)){const t=Object.keys(a)[0],e=a[t];g=_(this.chart.scales[t].getPixelForValue(e))}y=g-p,x=y-d,T=t.left,M=t.right}const C=dl(o.ticks.maxTicksLimit,c),A=Math.max(1,Math.ceil(c/C));for(f=0;f0&&(a-=o/2)}h={left:a,top:n,width:o+e.width,height:i+e.height,color:t.backdropColor}}_.push({label:v,font:T,textOffset:D,options:{rotation:p,color:i,strokeColor:r,strokeWidth:c,textAlign:u,textBaseline:C,translation:[y,w],backdrop:h}})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Fl(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:o,padding:n}}=this.options,a=t+n,s=this._getLabelSizes().widest.width;let r,l;return"left"===e?o?(l=this.right+n,"near"===i?r="left":"center"===i?(r="center",l+=s/2):(r="right",l+=s)):(l=this.right-a,"near"===i?r="right":"center"===i?(r="center",l-=s/2):(r="left",l=this.left)):"right"===e?o?(l=this.left+n,"near"===i?r="right":"center"===i?(r="center",l-=s/2):(r="left",l-=s)):(l=this.left+a,"near"===i?r="left":"center"===i?(r="center",l+=s/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:o,width:n,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,o,n,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,a;const s=(t,e,o)=>{o.width&&o.color&&(i.save(),i.lineWidth=o.width,i.strokeStyle=o.color,i.setLineDash(o.borderDash||[]),i.lineDashOffset=o.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,a=o.length;n{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[];let n,a;for(n=0,a=e.length;n{const o=i.split("."),n=o.pop(),a=[t].concat(o).join("."),s=e[i].split("."),r=s.pop(),l=s.join(".");Dc.route(a,n,l,r)}))}(e,t.defaultRoutes);t.descriptors&&Dc.describe(e,t.descriptors)}(t,a,i),this.override&&Dc.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,o=this.scope;i in e&&delete e[i],o&&i in Dc[o]&&(delete Dc[o][i],this.override&&delete xc[i])}}class Au{constructor(){this.controllers=new Cu(uh,"datasets",!0),this.elements=new Cu(fu,"elements"),this.plugins=new Cu(Object,"plugins"),this.scales=new Cu(Du,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const o=i||this._getRegistryForType(e);i||o.isForType(e)||o===this.plugins&&e.id?this._exec(t,o,e):ml(e,(e=>{const o=i||this._getRegistryForType(e);this._exec(t,o,e)}))}))}_exec(t,e,i){const o=kl(t);ul(i["before"+o],[],i),e[t](i),ul(i["after"+o],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(o(e,i),t,"stop"),this._notify(o(i,e),t,"start")}}function Lu(t,e){return e||!1!==t?!0===t?{}:t:null}function $u(t,{plugin:e,local:i},o,n){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(o,a);return i&&e.defaults&&s.push(e.defaults),t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function zu(t,e){const i=Dc.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ou(t){if("x"===t||"y"===t||"r"===t)return t}function Vu(t,...e){if(Ou(t))return t;for(const o of e){const e=o.axis||("top"===(i=o.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&Ou(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Hu(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Ru(t,e){const i=xc[t.type]||{scales:{}},o=e.scales||{},n=zu(t.type,e),a=Object.create(null);return Object.keys(o).forEach((e=>{const s=o[e];if(!rl(s))return console.error(`Invalid scale configuration for scale: ${e}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=Vu(e,s,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Hu(t,"x",i[0])||Hu(t,"y",i[0])}return{}}(e,t),Dc.scales[s.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,n),c=i.scales||{};a[e]=vl(Object.create(null),[{axis:r},s,c[r],c[l]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,s=i.indexAxis||zu(n,e),r=(xc[n]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,s),n=i[e+"AxisID"]||e;a[n]=a[n]||Object.create(null),vl(a[n],[{axis:e},o[n],r[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];vl(e,[Dc.scales[e.type],Dc.scale])})),a}function Iu(t){const e=t.options||(t.options={});e.plugins=dl(e.plugins,{}),e.scales=Ru(t,e)}function Nu(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Fu=new Map,Wu=new Set;function Bu(t,e){let i=Fu.get(t);return i||(i=e(),Fu.set(t,i),Wu.add(i)),i}const ju=(t,e,i)=>{const o=xl(e,i);void 0!==o&&t.add(o)};class Uu{constructor(t){this._config=function(t){return(t=t||{}).data=Nu(t.data),Iu(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Nu(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Iu(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Bu(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Bu(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Bu(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Bu(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let o=i.get(t);return o&&!e||(o=new Map,i.set(t,o)),o}getOptionScopes(t,e,i){const{options:o,type:n}=this,a=this._cachedScopes(t,i),s=a.get(e);if(s)return s;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>ju(r,t,e)))),e.forEach((t=>ju(r,o,t))),e.forEach((t=>ju(r,xc[n]||{},t))),e.forEach((t=>ju(r,Dc,t))),e.forEach((t=>ju(r,kc,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Wu.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,xc[e]||{},Dc.datasets[e]||{},{type:e},Dc,kc]}resolveNamedOptions(t,e,i,o=[""]){const n={$shared:!0},{resolver:a,subPrefixes:s}=Yu(this._resolverCache,t,o);let r=a;if(function(t,e){const{isScriptable:i,isIndexable:o}=id(t);for(const n of e){const e=i(n),a=o(n),s=(a||e)&&t[n];if(e&&(Sl(s)||qu(s))||a&&sl(s))return!0}return!1}(a,e)){n.$shared=!1;r=ed(a,i=Sl(i)?i():i,this.createResolver(t,i,s))}for(const t of e)n[t]=r[t];return n}createResolver(t,e,i=[""],o){const{resolver:n}=Yu(this._resolverCache,t,i);return rl(e)?ed(n,e,void 0,o):n}}function Yu(t,e,i){let o=t.get(e);o||(o=new Map,t.set(e,o));const n=i.join();let a=o.get(n);if(!a){a={resolver:td(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},o.set(n,a)}return a}const qu=t=>rl(t)&&Object.getOwnPropertyNames(t).some((e=>Sl(t[e])));const Zu=["top","bottom","left","right","chartArea"];function Xu(t,e){return"top"===t||"bottom"===t||-1===Zu.indexOf(t)&&"x"===e}function Ku(t,e){return function(i,o){return i[t]===o[t]?i[e]-o[e]:i[t]-o[t]}}function Gu(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),ul(i&&i.onComplete,[t],e)}function Qu(t){const e=t.chart,i=e.options.animation;ul(i&&i.onProgress,[t],e)}function Ju(t){return wd()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const tm={},em=t=>{const e=Ju(t);return Object.values(tm).filter((t=>t.canvas===e)).pop()};function im(t,e,i){const o=Object.keys(t);for(const n of o){const o=+n;if(o>=e){const a=t[n];delete t[n],(i>0||o>e)&&(t[o+i]=a)}}}class om{static defaults=Dc;static instances=tm;static overrides=xc;static registry=Pu;static version="4.5.1";static getChart=em;static register(...t){Pu.add(...t),nm()}static unregister(...t){Pu.remove(...t),nm()}constructor(t,e){const i=this.config=new Uu(e),o=Ju(t),n=em(o);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||gu(o)),this.platform.updateConfig(i);const s=this.platform.acquireContext(o,a.aspectRatio),r=s&&s.canvas,l=r&&r.height,c=r&&r.width;this.id=nl(),this.ctx=s,this.canvas=r,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Eu,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...o){return e?(clearTimeout(i),i=setTimeout(t,e,o)):t.apply(this,o),e}}((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],tm[this.id]=this,s&&r?(Kd.listen(this,"complete",Gu),Kd.listen(this,"progress",Qu),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:o,_aspectRatio:n}=this;return al(t)?e&&n?n:o?i/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Pu}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ed(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ec(this.canvas,this.ctx),this}stop(){return Kd.stop(this),this}resize(t,e){Kd.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,o=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(o,t,e,n),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ed(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),ul(i.onResize,[this,a],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){ml(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,o=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],o=Vu(t,i),n="r"===o,a="x"===o;return{options:i,dposition:n?"chartArea":a?"bottom":"left",dtype:n?"radialLinear":a?"category":"linear"}})))),ml(n,(e=>{const n=e.options,a=n.id,s=Vu(a,n),r=dl(n.type,e.dtype);void 0!==n.position&&Xu(n.position,s)===Xu(e.dposition)||(n.position=e.dposition),o[a]=!0;let l=null;if(a in i&&i[a].type===r)l=i[a];else{l=new(Pu.getScale(r))({id:a,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,t)})),ml(o,((t,e)=>{t||delete i[e]})),ml(i,(t=>{Qh.configure(this,t,t.options),Qh.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,o;for(this._removeUnreferencedMetasets(),i=0,o=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ku("z","_idx"));const{_active:s,_lastEvent:r}=this;r?this._eventHandler(r,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){ml(this.scales,(t=>{Qh.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Ml(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:o,count:n}of e){im(t,o,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),o=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Qh.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],ml(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},o=Zd(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(o&&Oc(e,o),t.controller.draw(),o&&Vc(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return zc(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,o){const n=Ih.modes[e];return"function"==typeof n?n(this,t,i,o):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let o=i.filter((t=>t&&t._dataset===e)).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(o)),o}getContext(){return this.$context||(this.$context=Jc(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const o=i?"show":"hide",n=this.getDatasetMeta(t),a=n.controller._resolveAnimations(void 0,o);Tl(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?o:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Kd.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,o),t[i]=o},o=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};ml(this.options.events,(t=>i(t,o)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,o)=>{e.addEventListener(this,i,o),t[i]=o},o=(i,o)=>{t[i]&&(e.removeEventListener(this,i,o),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let a;const s=()=>{o("attach",s),this.attached=!0,this.resize(),i("resize",n),i("detach",a)};a=()=>{this.attached=!1,o("resize",n),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():a()}unbindEvents(){ml(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},ml(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const o=i?"set":"remove";let n,a,s,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+o+"DatasetHoverStyle"]()),s=0,r=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!pl(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const o=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=n(e,t),s=i?t:n(t,e);a.length&&this.updateHoverStyle(a,o.mode,!1),s.length&&o.mode&&this.updateHoverStyle(s,o.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},o=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,o))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,o),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:o=[],options:n}=this,a=e,s=this._getActiveElements(t,o,i,a),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,o){return i&&"mouseout"!==t.type?o?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,ul(n.onHover,[t,s,this],this),r&&ul(n.onClick,[t,s,this],this));const c=!pl(s,o);return(c||e)&&(this._active=s,this._updateHoverStyles(s,o,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,o){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,o)}}function nm(){return ml(om.instances,(t=>t._plugins.invalidate()))}function am(t,e,i,o){const n=qc(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const a=(i-e)/2,s=Math.min(a,o*e/2),r=t=>{const e=(i-Math.min(a,t))*o/2;return Xl(t,0,Math.min(a,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Xl(n.innerStart,0,s),innerEnd:Xl(n.innerEnd,0,s)}}function sm(t,e,i,o){return{x:i+t*Math.cos(e),y:o+t*Math.sin(e)}}function rm(t,e,i,o,n,a){const{x:s,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=e,h=Math.max(e.outerRadius+o+i-c,0),u=d>0?d+o+i+c:0;let m=0;const p=n-l;if(o){const t=((d>0?d-o:0)+(h>0?h-o:0))/2;m=(p-(0!==t?p*t/(t+o):p))/2}const _=(p-Math.max(.001,p*h-i/Dl)/h)/2,g=l+_+m,f=n-_-m,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:w}=am(e,u,h,f-g),x=h-b,k=h-v,T=g+b/x,S=f-v/k,M=u+y,D=u+w,C=g+y/M,A=f-w/D;if(t.beginPath(),a){const e=(T+S)/2;if(t.arc(s,r,h,T,e),t.arc(s,r,h,e,S),v>0){const e=sm(k,S,s,r);t.arc(e.x,e.y,v,S,f+Ll)}const i=sm(D,f,s,r);if(t.lineTo(i.x,i.y),w>0){const e=sm(D,A,s,r);t.arc(e.x,e.y,w,f+Ll,A+Math.PI)}const o=(f-w/u+(g+y/u))/2;if(t.arc(s,r,u,f-w/u,o,!0),t.arc(s,r,u,o,g+y/u,!0),y>0){const e=sm(M,C,s,r);t.arc(e.x,e.y,y,C+Math.PI,g-Ll)}const n=sm(x,g,s,r);if(t.lineTo(n.x,n.y),b>0){const e=sm(x,T,s,r);t.arc(e.x,e.y,b,g-Ll,T)}}else{t.moveTo(s,r);const e=Math.cos(T)*h+s,i=Math.sin(T)*h+r;t.lineTo(e,i);const o=Math.cos(S)*h+s,n=Math.sin(S)*h+r;t.lineTo(o,n)}t.closePath()}function lm(t,e,i,o,n){const{fullCircles:a,startAngle:s,circumference:r,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:h,borderDashOffset:u,borderRadius:m}=l,p="inner"===l.borderAlign;if(!c)return;t.setLineDash(h||[]),t.lineDashOffset=u,p?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let _=e.endAngle;if(a){rm(t,e,i,o,_,n);for(let e=0;en?(c=n/l,t.arc(a,s,l,i+c,o-c,!0)):t.arc(a,s,n,i+Ll,o-Ll),t.closePath(),t.clip()}(t,e,_),l.selfJoin&&_-s>=Dl&&0===m&&"miter"!==d&&function(t,e,i){const{startAngle:o,x:n,y:a,outerRadius:s,innerRadius:r,options:l}=e,{borderWidth:c,borderJoinStyle:d}=l,h=Math.min(c/s,ql(o-i));if(t.beginPath(),t.arc(n,a,s-c/2,o+h/2,i-h/2),r>0){const e=Math.min(c/r,ql(o-i));t.arc(n,a,r+c/2,i-e/2,o+e/2,!0)}else{const e=Math.min(c/2,s*ql(o-i));if("round"===d)t.arc(n,a,e,i-Dl/2,o+Dl/2,!0);else if("bevel"===d){const s=2*e*e,r=-s*Math.cos(i+Dl/2)+n,l=-s*Math.sin(i+Dl/2)+a,c=s*Math.cos(o+Dl/2)+n,d=s*Math.sin(o+Dl/2)+a;t.lineTo(r,l),t.lineTo(c,d)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,_),a||(rm(t,e,i,o,_,n),t.stroke())}class cm extends fu{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const o=this.getProps(["x","y"],i),{angle:n,distance:a}=jl(o,{x:t,y:e}),{startAngle:s,endAngle:r,innerRadius:l,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,u=dl(d,r-s),m=Zl(n,s,r)&&s!==r,p=u>=Cl||m,_=Kl(a,l+h,c+h);return p&&_}getCenterPoint(t){const{x:e,y:i,startAngle:o,endAngle:n,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,c=(o+n)/2,d=(a+s+l+r)/2;return{x:e+Math.cos(c)*d,y:i+Math.sin(c)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,o=(e.offset||0)/4,n=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Cl?Math.floor(i/Cl):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*o,Math.sin(s)*o);const r=o*(1-Math.sin(Math.min(Dl,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,o,n){const{fullCircles:a,startAngle:s,circumference:r}=e;let l=e.endAngle;if(a){rm(t,e,i,o,l,n);for(let e=0;er&&a>r;return{count:o,start:l,loop:e.loop,ilen:c(s+(c?r-t:t))%a,v=()=>{m!==p&&(t.lineTo(g,p),t.lineTo(g,m),t.lineTo(g,_))};for(l&&(h=n[b(0)],t.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=n[b(d)],h.skip)continue;const e=h.x,i=h.y,o=0|e;o===u?(ip&&(p=i),g=(f*g+e)/++f):(v(),t.lineTo(e,i),u=o,f=0,m=p=i),_=i}v()}function _m(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?pm:mm}const gm="function"==typeof Path2D;function fm(t,e,i,o){gm&&!e.options.segment?function(t,e,i,o){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,o)&&n.closePath()),dm(t,e.options),t.stroke(n)}(t,e,i,o):function(t,e,i,o){const{segments:n,options:a}=e,s=_m(e);for(const r of n)dm(t,a,r.style),t.beginPath(),s(t,e,r,{start:i,end:i+o-1})&&t.closePath(),t.stroke()}(t,e,i,o)}class bm extends fu{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const o=i.spanGaps?this._loop:this._fullLoop;yd(this._points,i,t,o,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,o=t.options.spanGaps,n=i.length;if(!n)return[];const a=!!t._loop,{start:s,end:r}=function(t,e,i,o){let n=0,a=e-1;if(i&&!o)for(;nn&&t[a%e].skip;)a--;return a%=e,{start:n,end:a}}(i,n,a,o);return jd(t,!0===o?[{start:s,end:r,loop:a}]:function(t,e,i,o){const n=t.length,a=[];let s,r=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%n];i.skip||i.stop?l.skip||(o=!1,a.push({start:e%n,end:(s-1)%n,loop:o}),e=r=i.stop?s:null):(r=s,l.skip&&(e=s)),l=i}return null!==r&&a.push({start:e%n,end:r%n,loop:o}),a}(i,s,rt.replace("rgb(","rgba(").replace(")",", 0.5)")));function Em(t){return Am[t%Am.length]}function Lm(t){return Pm[t%Pm.length]}function $m(t){let e=0;return(i,o)=>{const n=t.getDatasetMeta(o).controller;n instanceof kh?e=function(t,e){return t.backgroundColor=t.data.map((()=>Em(e++))),e}(i,e):n instanceof Sh?e=function(t,e){return t.backgroundColor=t.data.map((()=>Lm(e++))),e}(i,e):n&&(e=function(t,e){return t.borderColor=Em(e),t.backgroundColor=Lm(e),++e}(i,e))}}function zm(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Om={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:o},options:n}=t.config,{elements:a}=n,s=zm(o)||(r=n)&&(r.borderColor||r.backgroundColor)||a&&zm(a)||"rgba(0,0,0,0.1)"!==Dc.borderColor||"rgba(0,0,0,0.1)"!==Dc.backgroundColor;var r;if(!i.forceOverride&&s)return;const l=$m(t);o.forEach(l)}};function Vm(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Hm(t){t.data.datasets.forEach((t=>{Vm(t)}))}var Rm={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Hm(t);const o=t.width;t.data.datasets.forEach(((e,n)=>{const{_data:a,indexAxis:s}=e,r=t.getDatasetMeta(n),l=a||e.data;if("y"===Qc([s,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:d,count:h}=function(t,e){const i=e.length;let o,n=0;const{iScale:a}=t,{min:s,max:r,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(n=Xl(Ql(e,a.axis,s).lo,0,i-1)),o=c?Xl(Ql(e,a.axis,r).hi+1,n,i)-n:i-n,{start:n,count:o}}(r,l);if(h<=(i.threshold||4*o))return void Vm(e);let u;switch(al(a)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,o,n){const a=n.samples||o;if(a>=i)return t.slice(e,e+i);const s=[],r=(i-2)/(a-2);let l=0;const c=e+i-1;let d,h,u,m,p,_=e;for(s[l++]=t[_],d=0;du&&(u=m,h=t[o],p=o);s[l++]=h,_=p}return s[l++]=t[c],s}(l,d,h,o,i);break;case"min-max":u=function(t,e,i,o){let n,a,s,r,l,c,d,h,u,m,p=0,_=0;const g=[],f=e+i-1,b=t[e].x,v=t[f].x-b;for(n=e;nm&&(m=r,d=n),p=(_*p+a.x)/++_;else{const i=n-1;if(!al(c)&&!al(d)){const e=Math.min(c,d),o=Math.max(c,d);e!==h&&e!==i&&g.push({...t[e],x:p}),o!==h&&o!==i&&g.push({...t[o],x:p})}n>0&&i!==h&&g.push(t[i]),g.push(a),l=e,_=0,u=m=r,c=d=h=n}}return g}(l,d,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Hm(t)}};function Im(t,e,i,o){if(o)return;let n=e[t],a=i[t];return"angle"===t&&(n=ql(n),a=ql(a)),{property:t,start:n,end:a}}function Nm(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Fm(t,e,i,o){return t&&e?o(t[i],e[i]):t?t[i]:e?e[i]:0}function Wm(t,e){let i=[],o=!1;return sl(t)?(o=!0,i=t):i=function(t,e){const{x:i=null,y:o=null}=t||{},n=e.points,a=[];return e.segments.forEach((({start:t,end:e})=>{e=Nm(t,e,n);const s=n[t],r=n[e];null!==o?(a.push({x:s.x,y:o}),a.push({x:r.x,y:o})):null!==i&&(a.push({x:i,y:s.y}),a.push({x:i,y:r.y}))})),a}(t,e),i.length?new bm({points:i,options:{tension:0},_loop:o,_fullLoop:o}):null}function Bm(t){return t&&!1!==t.fill}function jm(t,e,i){let o=t[e].fill;const n=[e];let a;if(!i)return o;for(;!1!==o&&-1===n.indexOf(o);){if(!ll(o))return o;if(a=t[o],!a)return!1;if(a.visible)return o;n.push(o),o=a.fill}return!1}function Um(t,e,i){const o=function(t){const e=t.options,i=e.fill;let o=dl(i&&i.target,i);void 0===o&&(o=!!e.backgroundColor);if(!1===o||null===o)return!1;if(!0===o)return"origin";return o}(t);if(rl(o))return!isNaN(o.value)&&o;let n=parseFloat(o);return ll(n)&&Math.floor(n)===n?function(t,e,i,o){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=o)return!1;return i}(o[0],e,n,i):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Ym(t,e,i){const o=[];for(let n=0;n=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(a,i.axis),o&&i.fill&&Km(t.ctx,i,a))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const o=t.getSortedVisibleDatasetMetas();for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;Bm(i)&&Km(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const o=e.meta.$filler;Bm(o)&&"beforeDatasetDraw"===i.drawTime&&Km(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const op=(t,e)=>{let{boxHeight:i=e,boxWidth:o=e}=t;return t.usePointStyle&&(i=Math.min(i,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:i,itemHeight:Math.max(e,i)}};class np extends fu{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=ul(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,o=Gc(i.font),n=o.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:r}=op(i,n);let l,c;e.font=o.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,n,s,r)+10):(c=this.maxHeight,l=this._fitCols(a,o,s,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,o){const{ctx:n,maxWidth:a,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],c=o+s;let d=t;n.textAlign="left",n.textBaseline="middle";let h=-1,u=-c;return this.legendItems.forEach(((t,m)=>{const p=i+e/2+n.measureText(t.text).width;(0===m||l[l.length-1]+p+2*s>a)&&(d+=c,l[l.length-(m>0?0:1)]=0,u+=c,h++),r[m]={left:0,top:u,row:h,width:p,height:o},l[l.length-1]+=p+s})),d}_fitCols(t,e,i,o){const{ctx:n,maxHeight:a,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-t;let d=s,h=0,u=0,m=0,p=0;return this.legendItems.forEach(((t,a)=>{const{itemWidth:_,itemHeight:g}=function(t,e,i,o,n){const a=function(t,e,i,o){let n=t.text;n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+o.measureText(n).width}(o,t,e,i),s=function(t,e,i){let o=t;"string"!=typeof e.text&&(o=ap(e,i));return o}(n,o,e.lineHeight);return{itemWidth:a,itemHeight:s}}(i,e,n,t,o);a>0&&u+g+2*s>c&&(d+=h+s,l.push({width:h,height:u}),m+=h+s,p++,h=u=0),r[a]={left:m,top:u,col:p,width:_,height:g},h=Math.max(h,_),u+=g+s})),d+=h,l.push({width:h,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:o},rtl:n}}=this,a=Hd(n,this.left,this.width);if(this.isHorizontal()){let n=0,s=sc(i,this.left+o,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,s=sc(i,this.left+o,this.right-this.lineWidths[n])),r.top+=this.top+t+o,r.left=a.leftForLtr(a.x(s),r.width),s+=r.width+o}else{let n=0,s=sc(i,this.top+t+o,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,s=sc(i,this.top+t+o,this.bottom-this.columnSizes[n].height)),r.top=s,r.left+=this.left+o,r.left=a.leftForLtr(a.x(r.left),r.width),s+=r.height+o}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Oc(t,this),this._draw(),Vc(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:o}=this,{align:n,labels:a}=t,s=Dc.color,r=Hd(t.rtl,this.left,this.width),l=Gc(a.font),{padding:c}=a,d=l.size,h=d/2;let u;this.drawTitle(),o.textAlign=r.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=l.string;const{boxWidth:m,boxHeight:p,itemHeight:_}=op(a,d),g=this.isHorizontal(),f=this._computeTitleHeight();u=g?{x:sc(n,this.left+c,this.right-i[0]),y:this.top+c+f,line:0}:{x:this.left+c,y:sc(n,this.top+f+c,this.bottom-e[0].height),line:0},Rd(this.ctx,t.textDirection);const b=_+c;this.legendItems.forEach(((v,y)=>{o.strokeStyle=v.fontColor,o.fillStyle=v.fontColor;const w=o.measureText(v.text).width,x=r.textAlign(v.textAlign||(v.textAlign=a.textAlign)),k=m+h+w;let T=u.x,S=u.y;r.setWidth(this.width),g?y>0&&T+k+c>this.right&&(S=u.y+=b,u.line++,T=u.x=sc(n,this.left+c,this.right-i[u.line])):y>0&&S+b>this.bottom&&(T=u.x=T+e[u.line].width+c,u.line++,S=u.y=sc(n,this.top+f+c,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;o.save();const n=dl(i.lineWidth,1);if(o.fillStyle=dl(i.fillStyle,s),o.lineCap=dl(i.lineCap,"butt"),o.lineDashOffset=dl(i.lineDashOffset,0),o.lineJoin=dl(i.lineJoin,"miter"),o.lineWidth=n,o.strokeStyle=dl(i.strokeStyle,s),o.setLineDash(dl(i.lineDash,[])),a.usePointStyle){const s={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=r.xPlus(t,m/2);$c(o,s,l,e+h,a.pointStyleWidth&&m)}else{const a=e+Math.max((d-p)/2,0),s=r.leftForLtr(t,m),l=Xc(i.borderRadius);o.beginPath(),Object.values(l).some((t=>0!==t))?Wc(o,{x:s,y:a,w:m,h:p,radius:l}):o.rect(s,a,m,p),o.fill(),0!==n&&o.stroke()}o.restore()}(r.x(T),S,v),T=((t,e,i,o)=>t===(o?"left":"right")?i:"center"===t?(e+i)/2:e)(x,T+m+h,g?T+k:this.right,t.rtl),function(t,e,i){Fc(o,i.text,t,e+_/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(T),S,v),g)u.x+=k+c;else if("string"!=typeof v.text){const t=l.lineHeight;u.y+=ap(v,t)+c}else u.y+=b})),Id(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Gc(e.font),o=Kc(e.padding);if(!e.display)return;const n=Hd(t.rtl,this.left,this.width),a=this.ctx,s=e.position,r=i.size/2,l=o.top+r;let c,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,d=sc(t.align,d,this.right-h);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+sc(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=sc(s,d,d+h);a.textAlign=n.textAlign(ac(s)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,Fc(a,e.text,u,c,i)}_computeTitleHeight(){const t=this.options.title,e=Gc(t.font),i=Kc(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,o,n;if(Kl(t,this.left,this.right)&&Kl(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;inull!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index)(o,i);o&&!n&&ul(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!n&&ul(e.onHover,[t,i,this],this)}else i&&ul(e.onClick,[t,i,this],this)}}function ap(t,e){return e*(t.text?t.text.length:0)}var sp={id:"legend",_element:np,start(t,e,i){const o=t.legend=new np({ctx:t.ctx,options:i,chart:t});Qh.configure(t,o,i),Qh.addBox(t,o)},stop(t){Qh.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const o=t.legend;Qh.configure(t,o,i),o.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const o=e.datasetIndex,n=i.chart;n.isDatasetVisible(o)?(n.hide(o),e.hidden=!0):(n.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:o,textAlign:n,color:a,useBorderRadius:s,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),c=Kc(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:o||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:s&&(r||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class rp extends fu{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const o=sl(i.text)?i.text.length:1;this._padding=Kc(i.padding);const n=o*Gc(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:o,right:n,options:a}=this,s=a.align;let r,l,c,d=0;return this.isHorizontal()?(l=sc(s,i,n),c=e+t,r=n-i):("left"===a.position?(l=i+t,c=sc(s,o,e),d=-.5*Dl):(l=n-t,c=sc(s,e,o),d=.5*Dl),r=o-e),{titleX:l,titleY:c,maxWidth:r,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Gc(e.font),o=i.lineHeight/2+this._padding.top,{titleX:n,titleY:a,maxWidth:s,rotation:r}=this._drawArgs(o);Fc(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:r,textAlign:ac(e.align),textBaseline:"middle",translation:[n,a]})}}var lp={id:"title",_element:rp,start(t,e,i){!function(t,e){const i=new rp({ctx:t.ctx,options:e,chart:t});Qh.configure(t,i,e),Qh.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Qh.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const o=t.titleBlock;Qh.configure(t,o,i),o.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cp=new WeakMap;var dp={id:"subtitle",start(t,e,i){const o=new rp({ctx:t.ctx,options:i,chart:t});Qh.configure(t,o,i),Qh.addBox(t,o),cp.set(t,o)},stop(t){Qh.removeBox(t,cp.get(t)),cp.delete(t)},beforeUpdate(t,e,i){const o=cp.get(t);Qh.configure(t,o,i),o.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const hp={average(t){if(!t.length)return!1;let e,i,o=new Set,n=0,a=0;for(e=0,i=t.length;et+e))/o.size;return{x:s,y:n/a}},nearest(t,e){if(!t.length)return!1;let i,o,n,a=e.x,s=e.y,r=Number.POSITIVE_INFINITY;for(i=0,o=t.length;i-1?t.split("\n"):t}function pp(t,e){const{element:i,datasetIndex:o,index:n}=e,a=t.getDatasetMeta(o).controller,{label:s,value:r}=a.getLabelAndValue(n);return{chart:t,label:s,parsed:a.getParsed(n),raw:t.data.datasets[o].data[n],formattedValue:r,dataset:a.getDataset(),dataIndex:n,datasetIndex:o,element:i}}function _p(t,e){const i=t.chart.ctx,{body:o,footer:n,title:a}=t,{boxWidth:s,boxHeight:r}=e,l=Gc(e.bodyFont),c=Gc(e.titleFont),d=Gc(e.footerFont),h=a.length,u=n.length,m=o.length,p=Kc(e.padding);let _=p.height,g=0,f=o.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(f+=t.beforeBody.length+t.afterBody.length,h&&(_+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),f){_+=m*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(f-m)*l.lineHeight+(f-1)*e.bodySpacing}u&&(_+=e.footerMarginTop+u*d.lineHeight+(u-1)*e.footerSpacing);let b=0;const v=function(t){g=Math.max(g,i.measureText(t).width+b)};return i.save(),i.font=c.string,ml(t.title,v),i.font=l.string,ml(t.beforeBody.concat(t.afterBody),v),b=e.displayColors?s+2+e.boxPadding:0,ml(o,(t=>{ml(t.before,v),ml(t.lines,v),ml(t.after,v)})),b=0,i.font=d.string,ml(t.footer,v),i.restore(),g+=p.width,{width:g,height:_}}function gp(t,e,i,o){const{x:n,width:a}=i,{width:s,chartArea:{left:r,right:l}}=t;let c="center";return"center"===o?c=n<=(r+l)/2?"left":"right":n<=a/2?c="left":n>=s-a/2&&(c="right"),function(t,e,i,o){const{x:n,width:a}=o,s=i.caretSize+i.caretPadding;return"left"===t&&n+a+s>e.width||"right"===t&&n-a-s<0||void 0}(c,t,e,i)&&(c="center"),c}function fp(t,e,i){const o=i.yAlign||e.yAlign||function(t,e){const{y:i,height:o}=e;return it.height-o/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||gp(t,e,i,o),yAlign:o}}function bp(t,e,i,o){const{caretSize:n,caretPadding:a,cornerRadius:s}=t,{xAlign:r,yAlign:l}=i,c=n+a,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:m}=Xc(s);let p=function(t,e){let{x:i,width:o}=t;return"right"===e?i-=o:"center"===e&&(i-=o/2),i}(e,r);const _=function(t,e,i){let{y:o,height:n}=t;return"top"===e?o+=i:o-="bottom"===e?n+i:n/2,o}(e,l,c);return"center"===l?"left"===r?p+=c:"right"===r&&(p-=c):"left"===r?p-=Math.max(d,u)+n:"right"===r&&(p+=Math.max(h,m)+n),{x:Xl(p,0,o.width-e.width),y:Xl(_,0,o.height-e.height)}}function vp(t,e,i){const o=Kc(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-o.right:t.x+o.left}function yp(t){return up([],mp(t))}function wp(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const xp={beforeTitle:ol,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,o=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex{const e={before:[],lines:[],after:[]},n=wp(i,t);up(e.before,mp(kp(n,"beforeLabel",this,t))),up(e.lines,kp(n,"label",this,t)),up(e.after,mp(kp(n,"afterLabel",this,t))),o.push(e)})),o}getAfterBody(t,e){return yp(kp(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,o=kp(i,"beforeFooter",this,t),n=kp(i,"footer",this,t),a=kp(i,"afterFooter",this,t);let s=[];return s=up(s,mp(o)),s=up(s,mp(n)),s=up(s,mp(a)),s}_createItems(t){const e=this._active,i=this.chart.data,o=[],n=[],a=[];let s,r,l=[];for(s=0,r=e.length;st.filter(e,o,n,i)))),t.itemSort&&(l=l.sort(((e,o)=>t.itemSort(e,o,i)))),ml(l,(e=>{const i=wp(t.callbacks,e);o.push(kp(i,"labelColor",this,e)),n.push(kp(i,"labelPointStyle",this,e)),a.push(kp(i,"labelTextColor",this,e))})),this.labelColors=o,this.labelPointStyles=n,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),o=this._active;let n,a=[];if(o.length){const t=hp[i.position].call(this,o,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const e=this._size=_p(this,i),s=Object.assign({},t,e),r=fp(this.chart,i,s),l=bp(i,s,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=a,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,o){const n=this.getCaretPosition(t,i,o);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:o,yAlign:n}=this,{caretSize:a,cornerRadius:s}=i,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:d}=Xc(s),{x:h,y:u}=t,{width:m,height:p}=e;let _,g,f,b,v,y;return"center"===n?(v=u+p/2,"left"===o?(_=h,g=_-a,b=v+a,y=v-a):(_=h+m,g=_+a,b=v-a,y=v+a),f=_):(g="left"===o?h+Math.max(r,c)+a:"right"===o?h+m-Math.max(l,d)-a:this.caretX,"top"===n?(b=u,v=b-a,_=g-a,f=g+a):(b=u+p,v=b+a,_=g+a,f=g-a),y=b),{x1:_,x2:g,x3:f,y1:b,y2:v,y3:y}}drawTitle(t,e,i){const o=this.title,n=o.length;let a,s,r;if(n){const l=Hd(i.rtl,this.x,this.width);for(t.x=vp(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",a=Gc(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,Wc(t,{x:e,y:m,w:l,h:r,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Wc(t,{x:i,y:m+1,w:l-2,h:r-2,radius:s}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,m,l,r),t.strokeRect(e,m,l,r),t.fillStyle=a.backgroundColor,t.fillRect(i,m+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:o}=this,{bodySpacing:n,bodyAlign:a,displayColors:s,boxHeight:r,boxWidth:l,boxPadding:c}=i,d=Gc(i.bodyFont);let h=d.lineHeight,u=0;const m=Hd(i.rtl,this.x,this.width),p=function(i){e.fillText(i,m.x(t.x+u),t.y+h/2),t.y+=h+n},_=m.textAlign(a);let g,f,b,v,y,w,x;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=vp(this,_,i),e.fillStyle=i.bodyColor,ml(this.beforeBody,p),u=s&&"right"!==_?"center"===a?l/2+c:l+2+c:0,v=0,w=o.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,o=i&&i.x,n=i&&i.y;if(o||n){const i=hp[t.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=_p(this,t),s=Object.assign({},i,this._size),r=fp(e,t,s),l=bp(t,s,r,e);o._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const o={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=Kc(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,o,e),Rd(t,e.textDirection),n.y+=a.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),Id(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,o=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!pl(i,o),a=this._positionChanged(o,e);(n||a)&&(this._active=o,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,n=this._active||[],a=this._getActiveElements(t,n,e,i),s=this._positionChanged(a,t),r=e||!pl(a,n)||s;return r&&(this._active=a,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,o){const n=this.options;if("mouseout"===t.type)return[];if(!o)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const a=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:o,options:n}=this,a=hp[n.position].call(this,t,e);return!1!==a&&(i!==a.x||o!==a.y)}}var Sp={id:"tooltip",_element:Tp,positioners:hp,afterInit(t,e,i){i&&(t.tooltip=new Tp({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:xp},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Mp=Object.freeze({__proto__:null,Colors:Om,Decimation:Rm,Filler:ip,Legend:sp,SubTitle:dp,Title:lp,Tooltip:Sp});function Dp(t,e,i,o){const n=t.indexOf(e);if(-1===n)return((t,e,i,o)=>("string"==typeof e?(i=t.push(e)-1,o.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,o);return n!==t.lastIndexOf(e)?i:n}function Cp(t){const e=this.getLabels();return t>=0&&tnull===t?null:Xl(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Dp(i,t,dl(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:o}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(o=this.getLabels().length-1)),this.min=i,this.max=o}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,o=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)o.push({value:i});return o}getLabelForValue(t){return Cp.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Pp(t,e){const i=[],{bounds:o,step:n,min:a,max:s,precision:r,count:l,maxTicks:c,maxDigits:d,includeBounds:h}=t,u=n||1,m=c-1,{min:p,max:_}=e,g=!al(a),f=!al(s),b=!al(l),v=(_-p)/(d+1);let y,w,x,k,T=Rl((_-p)/m/u)*u;if(T<1e-14&&!g&&!f)return[{value:p},{value:_}];k=Math.ceil(_/T)-Math.floor(p/T),k>m&&(T=Rl(k*T/m/u)*u),al(r)||(y=Math.pow(10,r),T=Math.ceil(T*y)/y),"ticks"===o?(w=Math.floor(p/T)*T,x=Math.ceil(_/T)*T):(w=p,x=_),g&&f&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-a)/n,T/1e3)?(k=Math.round(Math.min((s-a)/T,c)),T=(s-a)/k,w=a,x=s):b?(w=g?a:w,x=f?s:x,k=l-1,T=(x-w)/k):(k=(x-w)/T,k=Hl(k,Math.round(k),T/1e3)?Math.round(k):Math.ceil(k));const S=Math.max(Bl(T),Bl(w));y=Math.pow(10,al(r)?S:r),w=Math.round(w*y)/y,x=Math.round(x*y)/y;let M=0;for(g&&(h&&w!==a?(i.push({value:a}),ws)break;i.push({value:t})}return f&&h&&x!==s?i.length&&Hl(i[i.length-1].value,s,Ep(s,v,t))?i[i.length-1].value=s:i.push({value:s}):f&&x!==s||i.push({value:x}),i}function Ep(t,e,{horizontal:i,minRotation:o}){const n=Fl(o),a=(i?Math.sin(n):Math.cos(n))||.001,s=.75*e*(""+t).length;return Math.min(e/a,s)}class Lp extends Du{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return al(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:o,max:n}=this;const a=t=>o=e?o:t,s=t=>n=i?n:t;if(t){const t=Vl(o),e=Vl(n);t<0&&e<0?s(0):t>0&&e>0&&a(0)}if(o===n){let e=0===n?1:Math.abs(.05*n);s(n+e),t||a(o-e)}this.min=o,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:o}=t;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const o=Pp({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Nl(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const o=(i-e)/Math.max(t.length-1,1)/2;e-=o,i+=o}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return vc(t,this.chart.options.locale,this.options.ticks.format)}}class $p extends Lp{static id="linear";static defaults={ticks:{callback:wc.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ll(t)?t:0,this.max=ll(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Fl(this.options.ticks.minRotation),o=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const zp=t=>Math.floor(Ol(t)),Op=(t,e)=>Math.pow(10,zp(t)+e);function Vp(t){return 1===t/Math.pow(10,zp(t))}function Hp(t,e,i){const o=Math.pow(10,i),n=Math.floor(t/o);return Math.ceil(e/o)-n}function Rp(t,{min:e,max:i}){e=cl(t.min,e);const o=[],n=zp(e);let a=function(t,e){let i=zp(e-t);for(;Hp(t,e,i)>10;)i++;for(;Hp(t,e,i)<10;)i--;return Math.min(i,zp(t))}(e,i),s=a<0?Math.pow(10,Math.abs(a)):1;const r=Math.pow(10,a),l=n>a?Math.pow(10,n):0,c=Math.round((e-l)*s)/s,d=Math.floor((e-l)/r/10)*r*10;let h=Math.floor((c-d)/Math.pow(10,a)),u=cl(t.min,Math.round((l+d+h*Math.pow(10,a))*s)/s);for(;u=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,s=a>=0?1:s),u=Math.round((l+d+h*Math.pow(10,a))*s)/s;const m=cl(t.max,u);return o.push({value:m,major:Vp(m),significand:h}),o}class Ip extends Du{static id="logarithmic";static defaults={ticks:{callback:wc.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Lp.prototype.parse.apply(this,[t,e]);if(0!==i)return ll(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ll(t)?Math.max(0,t):null,this.max=ll(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ll(this._userMin)&&(this.min=t===Op(this.min,0)?Op(this.min,-1):Op(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,o=this.max;const n=e=>i=t?i:e,a=t=>o=e?o:t;i===o&&(i<=0?(n(1),a(10)):(n(Op(i,-1)),a(Op(o,1)))),i<=0&&n(Op(o,-1)),o<=0&&a(Op(i,1)),this.min=i,this.max=o}buildTicks(){const t=this.options,e=Rp({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Nl(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":vc(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ol(t),this._valueRange=Ol(this.max)-Ol(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ol(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Np(t){const e=t.ticks;if(e.display&&t.display){const t=Kc(e.backdropPadding);return dl(e.font&&e.font.size,Dc.font.size)+t.height}return 0}function Fp(t,e,i,o,n){return t===o||t===n?{start:e-i/2,end:e+i/2}:tn?{start:e-i,end:e}:{start:e,end:e+i}}function Wp(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),o=[],n=[],a=t._pointLabels.length,s=t.options.pointLabels,r=s.centerPointLabels?Dl/a:0;for(let h=0;he.r&&(r=(o.end-e.r)/a,t.r=Math.max(t.r,e.r+r)),n.starte.b&&(l=(n.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function jp(t,e,i){const o=t.drawingArea,{extra:n,additionalAngle:a,padding:s,size:r}=i,l=t.getPointPosition(e,o+n+s,a),c=Math.round(Wl(ql(l.angle+Ll))),d=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,r.h,c),h=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(c),u=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,r.w,h);return{visible:!0,x:l.x,y:d,textAlign:h,left:u,top:d,right:u+r.w,bottom:d+r.h}}function Up(t,e){if(!e)return!0;const{left:i,top:o,right:n,bottom:a}=t;return!(zc({x:i,y:o},e)||zc({x:i,y:a},e)||zc({x:n,y:o},e)||zc({x:n,y:a},e))}function Yp(t,e,i){const{left:o,top:n,right:a,bottom:s}=i,{backdropColor:r}=e;if(!al(r)){const i=Xc(e.borderRadius),l=Kc(e.backdropPadding);t.fillStyle=r;const c=o-l.left,d=n-l.top,h=a-o+l.width,u=s-n+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),Wc(t,{x:c,y:d,w:h,h:u,radius:i}),t.fill()):t.fillRect(c,d,h,u)}}function qp(t,e,i,o){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,Cl);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let a=1;at,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Kc(Np(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ll(t)&&!isNaN(t)?t:0,this.max=ll(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Np(this.options))}generateTickLabels(t){Lp.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=ul(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Wp(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,o){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-o)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,o))}getIndexAngle(t){return ql(t*(Cl/(this._pointLabels.length||1))+Fl(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(al(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(al(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;n--){const e=t._pointLabelItems[n];if(!e.visible)continue;const a=o.setContext(t.getPointLabelContext(n));Yp(i,a,e);const s=Gc(a.font),{x:r,y:l,textAlign:c}=e;Fc(i,t._pointLabels[n],r,l+s.lineHeight/2,s,{color:a.color,textAlign:c,textBaseline:"middle"})}}(this,a),o.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),s=o.setContext(i),l=n.setContext(i);!function(t,e,i,o,n){const a=t.ctx,s=e.circular,{color:r,lineWidth:l}=e;!s&&!o||!r||!l||i<0||(a.save(),a.strokeStyle=r,a.lineWidth=l,a.setLineDash(n.dash||[]),a.lineDashOffset=n.dashOffset,a.beginPath(),qp(t,i,s,o),a.closePath(),a.stroke(),a.restore())}(this,s,r,a,l)}})),i.display){for(t.save(),s=a-1;s>=0;s--){const o=i.setContext(this.getPointLabelContext(s)),{color:n,lineWidth:a}=o;a&&n&&(t.lineWidth=a,t.strokeStyle=n,t.setLineDash(o.borderDash),t.lineDashOffset=o.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const o=this.getIndexAngle(0);let n,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((o,s)=>{if(0===s&&this.min>=0&&!e.reverse)return;const r=i.setContext(this.getContext(s)),l=Gc(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[s].value),r.showLabelBackdrop){t.font=l.string,a=t.measureText(o.label).width,t.fillStyle=r.backdropColor;const e=Kc(r.backdropPadding);t.fillRect(-a/2-e.left,-n-l.size/2-e.top,a+e.width,l.size+e.height)}Fc(t,o.label,0,-n,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})})),t.restore()}drawTitle(){}}const Xp={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Kp=Object.keys(Xp);function Gp(t,e){return t-e}function Qp(t,e){if(al(e))return null;const i=t._adapter,{parser:o,round:n,isoWeekday:a}=t._parseOpts;let s=e;return"function"==typeof o&&(s=o(s)),ll(s)||(s="string"==typeof o?i.parse(s,o):i.parse(s)),null===s?null:(n&&(s="week"!==n||!Il(a)&&!0!==a?i.startOf(s,n):i.startOf(s,"isoWeek",a)),+s)}function Jp(t,e,i,o){const n=Kp.length;for(let a=Kp.indexOf(t);a=e?i[o]:i[n]]=!0}}else t[e]=!0}function e_(t,e,i){const o=[],n={},a=e.length;let s,r;for(s=0;s=0&&(e[l].major=!0);return e}(t,o,n,i):o}class i_ extends Du{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),o=this._adapter=new Lh._date(t.adapters.date);o.init(e),vl(i.displayFormats,o.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Qp(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:o,max:n,minDefined:a,maxDefined:s}=this.getUserBounds();function r(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),s||isNaN(t.max)||(n=Math.max(n,t.max))}a&&s||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),o=ll(o)&&!isNaN(o)?o:+e.startOf(Date.now(),i),n=ll(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(o,n-1),this.max=Math.max(o+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,o="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const n=this.min,a=function(t,e,i){let o=0,n=t.length;for(;oo&&t[n-1]>i;)n--;return o>0||n=Kp.indexOf(i);a--){const i=Kp[a];if(Xp[i].common&&t._adapter.diff(n,o,i)>=e-1)return i}return Kp[i?Kp.indexOf(i):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Kp.indexOf(t)+1,i=Kp.length;e+t.value)))}initOffsets(t=[]){let e,i,o=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),o=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Xl(o,0,a),n=Xl(n,0,a),this._offsets={start:o,end:n,factor:1/(o+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,o=this.options,n=o.time,a=n.unit||Jp(n.minUnit,e,i,this._getLabelCapacity(e)),s=dl(o.ticks.stepSize,1),r="week"===a&&n.isoWeekday,l=Il(r)||!0===r,c={};let d,h,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":a),t.diff(i,e,a)>1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+a);const m="data"===o.ticks.source&&this.getDataTimestamps();for(d=u,h=0;d+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,o=this._unit,n=e||i[o];return this._adapter.format(t,n)}_tickFormatFunction(t,e,i,o){const n=this.options,a=n.ticks.callback;if(a)return ul(a,[t,e,i],this);const s=n.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&s[r],d=l&&s[l],h=i[e],u=l&&d&&h&&h.major;return this._adapter.format(t,o||(u?d:c))}generateTickLabels(t){let e,i,o;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(t=0,e=o.length;t=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=Ql(t,"pos",e)),({pos:o,time:a}=t[r]),({pos:n,time:s}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=Ql(t,"time",e)),({time:o,pos:a}=t[r]),({time:n,pos:s}=t[l]));const c=n-o;return c?a+(s-a)*(e-o)/c:a}class n_ extends i_{static id="timeseries";static defaults=i_.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=o_(e,this.min),this._tableRange=o_(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,o=[],n=[];let a,s,r,l,c;for(a=0,s=t.length;a=e&&l<=i&&o.push(l);if(o.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,s=o.length;at-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(o_(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return o_(this._table,i*this._tableRange+this._minPos,!0)}}var a_=Object.freeze({__proto__:null,CategoryScale:Ap,LinearScale:$p,LogarithmicScale:Ip,RadialLinearScale:Zp,TimeScale:i_,TimeSeriesScale:n_});const s_=[Ah,Cm,Mp,a_];var r_=Object.freeze({__proto__:null,Animation:Jd,Animations:th,ArcElement:cm,BarController:wh,BarElement:Dm,BasePlatform:Jh,BasicPlatform:tu,BubbleController:xh,CategoryScale:Ap,Chart:om,Colors:Om,DatasetController:uh,Decimation:Rm,DomPlatform:_u,DoughnutController:kh,Element:fu,Filler:ip,Interaction:Ih,Legend:sp,LineController:Th,LineElement:bm,LinearScale:$p,LogarithmicScale:Ip,PieController:Mh,PointElement:ym,PolarAreaController:Sh,RadarController:Dh,RadialLinearScale:Zp,Scale:Du,ScatterController:Ch,SubTitle:dp,Ticks:wc,TimeScale:i_,TimeSeriesScale:n_,Title:lp,Tooltip:Sp,_adapters:Lh,_detectPlatform:gu,animator:Kd,controllers:Ah,defaults:Dc,elements:Cm,layouts:Qh,plugins:Mp,registerables:s_,registry:Pu,scales:a_});function l_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c_,d_={exports:{}};c_=d_,function(t,e,i,o){var n,a=["","webkit","Moz","MS","ms","o"],s=e.createElement("div"),r="function",l=Math.round,c=Math.abs,d=Date.now;function h(t,e,i){return setTimeout(b(t,i),e)}function u(t,e,i){return!!Array.isArray(t)&&(m(t,i[e],i),!0)}function m(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==o)for(n=0;n\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=t.console&&(t.console.warn||t.console.log);return a&&a.call(t.console,n,o),e.apply(this,arguments)}}n="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1}function S(t){return t.trim().split(/\s+/g)}function M(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]})):o.sort()),o}function A(t,e){for(var i,n,s=e[0].toUpperCase()+e.slice(1),r=0;r1&&!i.firstMultiple?i.firstMultiple=J(e):1===a&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,l=r?r.center:s.center,h=e.center=tt(n);e.timeStamp=d(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=nt(l,h),e.distance=ot(l,h),function(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};e.eventType!==R&&a.eventType!==I||(n=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}(i,e),e.offsetDirection=it(e.deltaX,e.deltaY);var u,m,p=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=c(p.x)>c(p.y)?p.x:p.y,e.scale=r?(u=r.pointers,ot((m=n)[0],m[1],K)/ot(u[0],u[1],K)):1,e.rotation=r?function(t,e){return nt(e[1],e[0],K)+nt(t[1],t[0],K)}(r.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,a,s,r=t.lastInterval||e,l=e.timeStamp-r.timeStamp;if(e.eventType!=N&&(l>H||r.velocity===o)){var d=e.deltaX-r.deltaX,h=e.deltaY-r.deltaY,u=et(l,d,h);n=u.x,a=u.y,i=c(u.x)>c(u.y)?u.x:u.y,s=it(d,h),t.lastInterval=e}else i=r.velocity,n=r.velocityX,a=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=n,e.velocityY=a,e.direction=s}(i,e);var _=t.element;k(e.srcEvent.target,_)&&(_=e.srcEvent.target),e.target=_}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function J(t){for(var e=[],i=0;i=c(e)?t<0?W:B:e<0?j:U}function ot(t,e,i){i||(i=X);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function nt(t,e,i){i||(i=X);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}G.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(E(this.element),this.evWin,this.domHandler)}};var at={mousedown:R,mousemove:2,mouseup:I},st="mousedown",rt="mousemove mouseup";function lt(){this.evEl=st,this.evWin=rt,this.pressed=!1,G.apply(this,arguments)}f(lt,G,{handler:function(t){var e=at[t.type];e&R&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=I),this.pressed&&(e&I&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:V,srcEvent:t}))}});var ct={pointerdown:R,pointermove:2,pointerup:I,pointercancel:N,pointerout:N},dt={2:O,3:"pen",4:V,5:"kinect"},ht="pointerdown",ut="pointermove pointerup pointercancel";function mt(){this.evEl=ht,this.evWin=ut,G.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ht="MSPointerDown",ut="MSPointerMove MSPointerUp MSPointerCancel"),f(mt,G,{handler:function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),n=ct[o],a=dt[t.pointerType]||t.pointerType,s=a==O,r=M(e,t.pointerId,"pointerId");n&R&&(0===t.button||s)?r<0&&(e.push(t),r=e.length-1):n&(I|N)&&(i=!0),r<0||(e[r]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:a,srcEvent:t}),i&&e.splice(r,1))}});var pt={touchstart:R,touchmove:2,touchend:I,touchcancel:N};function _t(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,G.apply(this,arguments)}function gt(t,e){var i=D(t.touches),o=D(t.changedTouches);return e&(I|N)&&(i=C(i.concat(o),"identifier",!0)),[i,o]}f(_t,G,{handler:function(t){var e=pt[t.type];if(e===R&&(this.started=!0),this.started){var i=gt.call(this,t,e);e&(I|N)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:O,srcEvent:t})}}});var ft={touchstart:R,touchmove:2,touchend:I,touchcancel:N},bt="touchstart touchmove touchend touchcancel";function vt(){this.evTarget=bt,this.targetIds={},G.apply(this,arguments)}function yt(t,e){var i=D(t.touches),o=this.targetIds;if(e&(2|R)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,a,s=D(t.changedTouches),r=[],l=this.target;if(a=i.filter((function(t){return k(t.target,l)})),e===R)for(n=0;n-1&&o.splice(t,1)}),wt)}}function St(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+It(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+It(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Ht},canEmit:function(){for(var t=0;te.threshold&&n&e.direction},attrTest:function(t){return Wt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Nt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),f(jt,Wt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),f(Ut,Rt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[At]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(I|N)&&!n)this.reset();else if(t.eventType&R)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&I)return 8;return Ht},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&I?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),f(Yt,Wt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),f(qt,Wt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Y|q,pointers:1},getTouchAction:function(){return Bt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Y|q)?e=t.overallVelocity:i&Y?e=t.overallVelocityX:i&q&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&t.eventType&I},emit:function(t){var e=Nt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),f(Zt,Rt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Pt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancet&&t.enabled&&t.modifierKey,m_=(t,e)=>t&&e[t+"Key"],p_=(t,e)=>t&&!e[t+"Key"];function __(t,e,i){return void 0===t||("string"==typeof t?-1!==t.indexOf(e):"function"==typeof t&&-1!==t({chart:i}).indexOf(e))}function g_(t,e){return"function"==typeof t&&(t=t({chart:e})),"string"==typeof t?{x:-1!==t.indexOf("x"),y:-1!==t.indexOf("y")}:{x:!1,y:!1}}function f_(t,e,i){const{mode:o="xy",scaleMode:n,overScaleMode:a}=t||{},s=function({x:t,y:e},i){const o=i.scales,n=Object.keys(o);for(let i=0;i=a.top&&e<=a.bottom&&t>=a.left&&t<=a.right)return a}return null}(e,i),r=g_(o,i),l=g_(n,i);if(a){const t=g_(a,i);for(const e of["x","y"])t[e]&&(l[e]=r[e],r[e]=!1)}if(s&&l[s.axis])return[s];const c=[];return ml(i.scales,(function(t){r[t.axis]&&c.push(t)})),c}const b_=new WeakMap;function v_(t){let e=b_.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},b_.set(t,e)),e}function y_(t,e,i,o){const n=Math.max(0,Math.min(1,(t-e)/i||0));return{min:o*n,max:o*(1-n)}}function w_(t,e){const i=t.isHorizontal()?e.x:e.y;return t.getValueForPixel(i)}function x_(t,e,i){const o=t.max-t.min,n=o*(e-1);return y_(w_(t,i),t.min,o,n)}function k_(t,e,i,o,n){let a=i[o];if("original"===a){const i=t.originalScaleLimits[e.id][o];a=dl(i.options,i.scale)}return dl(a,n)}function T_(t,{min:e,max:i},o,n=!1){const a=v_(t.chart),{options:s}=t,r=function(t,e){return e&&(e[t.id]||e[t.axis])||{}}(t,o),{minRange:l=0}=r,c=k_(a,t,r,"min",-1/0),d=k_(a,t,r,"max",1/0);if("pan"===n&&(ed))return!0;const h=t.max-t.min,u=n?Math.max(i-e,l):h;if(n&&u===l&&h<=l)return!0;const m=function(t,{min:e,max:i,minLimit:o,maxLimit:n},a){const s=(t-i+e)/2;e-=s,i+=s;const r=a.min.options??a.min.scale,l=a.max.options??a.max.scale,c=t/1e6;return Hl(e,r,c)&&(e=r),Hl(i,l,c)&&(i=l),en&&(i=n,e=Math.max(n-t,o)),{min:e,max:i}}(u,{min:e,max:i,minLimit:c,maxLimit:d},a.originalScaleLimits[t.id]);return s.min=m.min,s.max=m.max,a.updatedScaleLimits[t.id]=m,t.parse(m.min)!==t.min||t.parse(m.max)!==t.max}const S_=t=>0===t||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);const M_={second:500,minute:3e4,hour:18e5,day:432e5,week:3024e5,month:1296e6,quarter:5184e6,year:157248e5};function D_(t,e,i,o=!1){const{min:n,max:a,options:s}=t,r=s.time&&s.time.round,l=M_[r]||0,c=t.getValueForPixel(t.getPixelForValue(n+l)-e),d=t.getValueForPixel(t.getPixelForValue(a+l)-e);return!(!isNaN(c)&&!isNaN(d))||T_(t,{min:c,max:d},i,!!o&&"pan")}function C_(t,e,i){return D_(t,e,i,!0)}const A_={category:function(t,e,i,o){const n=x_(t,e,i);return t.min===t.max&&e<1&&function(t){const e=t.getLabels().length-1;t.min>0&&(t.min-=1),t.maxr&&(n=Math.max(0,n-l),a=1===s?n:n+s,c=0===n),T_(t,{min:n,max:a},i)||c},default:D_,logarithmic:C_,timeseries:C_};function L_(t,e){ml(t,((i,o)=>{e[o]||delete t[o]}))}function $_(t,e){const{scales:i}=t,{originalScaleLimits:o,updatedScaleLimits:n}=e;return ml(i,(function(t){(function(t,e,i){const{id:o,options:{min:n,max:a}}=t;if(!e[o]||!i[o])return!0;const s=i[o];return s.min!==n||s.max!==a})(t,o,n)&&(o[t.id]={min:{scale:t.min,options:t.options.min},max:{scale:t.max,options:t.options.max}})})),L_(o,i),L_(n,i),o}function z_(t,e,i,o){ul(A_[t.type]||A_.default,[t,e,i,o])}function O_(t,e,i,o){ul(P_[t.type]||P_.default,[t,e,i,o])}function V_(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function H_(t,e,i="none",o="api"){const{x:n=1,y:a=1,focalPoint:s=V_(t)}="number"==typeof e?{x:e,y:e}:e,r=v_(t),{options:{limits:l,zoom:c}}=r;$_(t,r);const d=1!==n,h=1!==a;ml(f_(c,s,t)||t.scales,(function(t){t.isHorizontal()&&d?z_(t,n,s,l):!t.isHorizontal()&&h&&z_(t,a,s,l)})),t.update(i),ul(c.onZoom,[{chart:t,trigger:o}])}function R_(t,e,i,o="none",n="api"){const a=v_(t),{options:{limits:s,zoom:r}}=a,{mode:l="xy"}=r;$_(t,a);const c=__(l,"x",t),d=__(l,"y",t);ml(t.scales,(function(t){t.isHorizontal()&&c?O_(t,e.x,i.x,s):!t.isHorizontal()&&d&&O_(t,e.y,i.y,s)})),t.update(o),ul(r.onZoom,[{chart:t,trigger:n}])}function I_(t,e,i,o="none",n="api"){const a=v_(t);$_(t,a);T_(t.scales[e],i,void 0,!0),t.update(o),ul(a.options.zoom?.onZoom,[{chart:t,trigger:n}])}function N_(t,e="default"){const i=v_(t),o=$_(t,i);ml(t.scales,(function(t){const e=t.options;o[t.id]?(e.min=o[t.id].min.options,e.max=o[t.id].max.options):(delete e.min,delete e.max),delete i.updatedScaleLimits[t.id]})),t.update(e),ul(i.options.zoom.onZoomComplete,[{chart:t}])}function F_(t){const e=v_(t);let i=1,o=1;return ml(t.scales,(function(t){const n=function(t,e){const i=t.originalScaleLimits[e];if(!i)return;const{min:o,max:n}=i;return dl(n.options,n.scale)-dl(o.options,o.scale)}(e,t.id);if(n){const e=Math.round(n/(t.max-t.min)*100)/100;i=Math.min(i,e),o=Math.max(o,e)}})),i<1?i:o}function W_(t,e,i,o){const{panDelta:n}=o,a=n[t.id]||0;Vl(a)===Vl(e)&&(e+=a);ul(E_[t.type]||E_.default,[t,e,i])?n[t.id]=0:n[t.id]=e}function B_(t,e,i,o="none"){const{x:n=0,y:a=0}="number"==typeof e?{x:e,y:e}:e,s=v_(t),{options:{pan:r,limits:l}}=s,{onPan:c}=r||{};$_(t,s);const d=0!==n,h=0!==a;ml(i||t.scales,(function(t){t.isHorizontal()&&d?W_(t,n,l,s):!t.isHorizontal()&&h&&W_(t,a,l,s)})),t.update(o),ul(c,[{chart:t}])}function j_(t){const e=v_(t);$_(t,e);const i={};for(const o of Object.keys(t.scales)){const{min:t,max:n}=e.originalScaleLimits[o]||{min:{},max:{}};i[o]={min:t.scale,max:n.scale}}return i}function U_(t){const e=v_(t);return e.panning||e.dragging}const Y_=(t,e,i)=>Math.min(i,Math.max(e,t));function q_(t,e){const{handlers:i}=v_(t),o=i[e];o&&o.target&&(o.target.removeEventListener(e,o),delete i[e])}function Z_(t,e,i,o){const{handlers:n,options:a}=v_(t),s=n[i];if(s&&s.target===e)return;q_(t,i),n[i]=e=>o(t,e,a),n[i].target=e;const r="wheel"!==i&&void 0;e.addEventListener(i,n[i],{passive:r})}function X_(t,e){const i=v_(t);i.dragStart&&(i.dragging=!0,i.dragEnd=e,t.update("none"))}function K_(t,e){const i=v_(t);i.dragStart&&"Escape"===e.key&&(q_(t,"keydown"),i.dragging=!1,i.dragStart=i.dragEnd=null,t.update("none"))}function G_(t,e){if(t.target!==e.canvas){const i=e.canvas.getBoundingClientRect();return{x:t.clientX-i.left,y:t.clientY-i.top}}return Cd(t,e)}function Q_(t,e,i){const{onZoomStart:o,onZoomRejected:n}=i;if(o){if(!1===ul(o,[{chart:t,event:e,point:G_(e,t)}]))return ul(n,[{chart:t,event:e}]),!1}}function J_(t,e){if(t.legend){if(zc(Cd(e,t),t.legend))return}const i=v_(t),{pan:o,zoom:n={}}=i.options;if(0!==e.button||m_(u_(o),e)||p_(u_(n.drag),e))return ul(n.onZoomRejected,[{chart:t,event:e}]);!1!==Q_(t,e,n)&&(i.dragStart=e,Z_(t,t.canvas.ownerDocument,"mousemove",X_),Z_(t,window.document,"keydown",K_))}function tg(t,e,i,{min:o,max:n,prop:a}){t[o]=Y_(Math.min(i.begin[a],i.end[a]),e[o],e[n]),t[n]=Y_(Math.max(i.begin[a],i.end[a]),e[o],e[n])}function eg(t,e,i){const o={begin:G_(e.dragStart,t),end:G_(e.dragEnd,t)};if(i){!function({begin:t,end:e},i){let o=e.x-t.x,n=e.y-t.y;const a=Math.abs(o/n);a>i?o=Math.sign(o)*Math.abs(n*i):a=0?2-1/(1-a):1+a;H_(t,{x:s,y:s,focalPoint:{x:e.clientX-n.left,y:e.clientY-n.top}},"zoom","wheel"),ul(i,[{chart:t}])}function ag(t,e,i,o){i&&(v_(t).handlers[e]=function(t,e){let i;return function(){return clearTimeout(i),i=setTimeout(t,e),e}}((()=>ul(i,[{chart:t}])),o))}function sg(t,e){return function(i,o){const{pan:n,zoom:a={}}=e.options;if(!n||!n.enabled)return!1;const s=o&&o.srcEvent;return!s||(!(!e.panning&&"mouse"===o.pointerType&&(p_(u_(n),s)||m_(u_(a.drag),s)))||(ul(n.onPanRejected,[{chart:t,event:o}]),!1))}}function rg(t,e,i){if(e.scale){const{center:o,pointers:n}=i,a=1/e.scale*i.scale,s=i.target.getBoundingClientRect(),r=function(t,e){const i=Math.abs(t.clientX-e.clientX),o=Math.abs(t.clientY-e.clientY),n=i/o;let a,s;return n>.3&&n<1.7?a=s=!0:i>o?a=!0:s=!0,{x:a,y:s}}(n[0],n[1]),l=e.options.zoom.mode;H_(t,{x:r.x&&__(l,"x",t)?a:1,y:r.y&&__(l,"y",t)?a:1,focalPoint:{x:o.x-s.left,y:o.y-s.top}},"zoom","pinch"),e.scale=i.scale}}function lg(t,e,i){const o=e.delta;o&&(e.panning=!0,B_(t,{x:i.deltaX-o.x,y:i.deltaY-o.y},e.panScales),e.delta={x:i.deltaX,y:i.deltaY})}const cg=new WeakMap;function dg(t,e){const i=v_(t),o=t.canvas,{pan:n,zoom:a}=e,s=new h_.Manager(o);a&&a.pinch.enabled&&(s.add(new h_.Pinch),s.on("pinchstart",(e=>function(t,e,i){if(e.options.zoom.pinch.enabled){const o=Cd(i,t);!1===ul(e.options.zoom.onZoomStart,[{chart:t,event:i,point:o}])?(e.scale=null,ul(e.options.zoom.onZoomRejected,[{chart:t,event:i}])):e.scale=1}}(t,i,e))),s.on("pinch",(e=>rg(t,i,e))),s.on("pinchend",(e=>function(t,e,i){e.scale&&(rg(t,e,i),e.scale=null,ul(e.options.zoom.onZoomComplete,[{chart:t}]))}(t,i,e)))),n&&n.enabled&&(s.add(new h_.Pan({threshold:n.threshold,enable:sg(t,i)})),s.on("panstart",(e=>function(t,e,i){const{enabled:o,onPanStart:n,onPanRejected:a}=e.options.pan;if(!o)return;const s=i.target.getBoundingClientRect(),r={x:i.center.x-s.left,y:i.center.y-s.top};if(!1===ul(n,[{chart:t,event:i,point:r}]))return ul(a,[{chart:t,event:i}]);e.panScales=f_(e.options.pan,r,t),e.delta={x:0,y:0},lg(t,e,i)}(t,i,e))),s.on("panmove",(e=>lg(t,i,e))),s.on("panend",(()=>function(t,e){e.delta=null,e.panning&&(e.panning=!1,e.filterNextClick=!0,ul(e.options.pan.onPanComplete,[{chart:t}]))}(t,i)))),cg.set(t,s)}function hg(t){const e=cg.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),cg.delete(t))}function ug(t,e,i){const o=i.zoom.drag,{dragStart:n,dragEnd:a}=v_(t);if(o.drawTime!==e||!a)return;const{left:s,top:r,width:l,height:c}=ig(t,i.zoom.mode,{dragStart:n,dragEnd:a},o.maintainAspectRatio),d=t.ctx;d.save(),d.beginPath(),d.fillStyle=o.backgroundColor||"rgba(225,225,225,0.3)",d.fillRect(s,r,l,c),o.borderWidth>0&&(d.lineWidth=o.borderWidth,d.strokeStyle=o.borderColor||"rgba(225,225,225)",d.strokeRect(s,r,l,c)),d.restore()}var mg={id:"zoom",version:"2.2.0",defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(t,e,i){v_(t).options=i,Object.prototype.hasOwnProperty.call(i.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(i.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(i.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),h_&&dg(t,i),t.pan=(e,i,o)=>B_(t,e,i,o),t.zoom=(e,i)=>H_(t,e,i),t.zoomRect=(e,i,o)=>R_(t,e,i,o),t.zoomScale=(e,i,o)=>I_(t,e,i,o),t.resetZoom=e=>N_(t,e),t.getZoomLevel=()=>F_(t),t.getInitialScaleBounds=()=>j_(t),t.getZoomedScaleBounds=()=>function(t){const e=v_(t),i={};for(const o of Object.keys(t.scales))i[o]=e.updatedScaleLimits[o];return i}(t),t.isZoomedOrPanned=()=>function(t){const e=j_(t);for(const i of Object.keys(t.scales)){const{min:o,max:n}=e[i];if(void 0!==o&&t.scales[i].min!==o)return!0;if(void 0!==n&&t.scales[i].max!==n)return!0}return!1}(t),t.isZoomingOrPanning=()=>U_(t)},beforeEvent(t,{event:e}){if(U_(t))return!1;if("click"===e.type||"mouseup"===e.type){const e=v_(t);if(e.filterNextClick)return e.filterNextClick=!1,!1}},beforeUpdate:function(t,e,i){const o=v_(t),n=o.options;o.options=i,function(t,e){const{pan:i,zoom:o}=t,{pan:n,zoom:a}=e;return o?.zoom?.pinch?.enabled!==a?.zoom?.pinch?.enabled||i?.enabled!==n?.enabled||i?.threshold!==n?.threshold}(n,i)&&(hg(t),dg(t,i)),function(t,e){const i=t.canvas,{wheel:o,drag:n,onZoomComplete:a}=e.zoom;o.enabled?(Z_(t,i,"wheel",ng),ag(t,"onZoomComplete",a,250)):q_(t,"wheel"),n.enabled?(Z_(t,i,"mousedown",J_),Z_(t,i.ownerDocument,"mouseup",og)):(q_(t,"mousedown"),q_(t,"mousemove"),q_(t,"mouseup"),q_(t,"keydown"))}(t,i)},beforeDatasetsDraw(t,e,i){ug(t,"beforeDatasetsDraw",i)},afterDatasetsDraw(t,e,i){ug(t,"afterDatasetsDraw",i)},beforeDraw(t,e,i){ug(t,"beforeDraw",i)},afterDraw(t,e,i){ug(t,"afterDraw",i)},stop:function(t){!function(t){q_(t,"mousedown"),q_(t,"mousemove"),q_(t,"mouseup"),q_(t,"wheel"),q_(t,"click"),q_(t,"keydown")}(t),h_&&hg(t),function(t){b_.delete(t)}(t)},panFunctions:E_,zoomFunctions:A_,zoomRectFunctions:P_},pg=Object.freeze({__proto__:null,default:mg,pan:B_,resetZoom:N_,zoom:H_,zoomRect:R_,zoomScale:I_});function _g(t){const e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new t.constructor(+t):"number"==typeof t||"[object Number]"===e||"string"==typeof t||"[object String]"===e?new Date(t):new Date(NaN)}function gg(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function fg(t,e){const i=_g(t);return isNaN(e)?gg(t,NaN):e?(i.setDate(i.getDate()+e),i):i}function bg(t,e){const i=_g(t);if(isNaN(e))return gg(t,NaN);if(!e)return i;const o=i.getDate(),n=gg(t,i.getTime());n.setMonth(i.getMonth()+e+1,0);return o>=n.getDate()?n:(i.setFullYear(n.getFullYear(),n.getMonth(),o),i)}function vg(t,e){return gg(t,+_g(t)+e)}const yg=6048e5,wg=864e5,xg=6e4,kg=36e5;let Tg={};function Sg(){return Tg}function Mg(t,e){const i=Sg(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,n=_g(t),a=n.getDay(),s=(a=n.getTime()?i+1:e.getTime()>=s.getTime()?i:i-1}function Ag(t){const e=_g(t);return e.setHours(0,0,0,0),e}function Pg(t){const e=_g(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Eg(t,e){const i=Ag(t),o=Ag(e),n=+i-Pg(i),a=+o-Pg(o);return Math.round((n-a)/wg)}function Lg(t,e){const i=_g(t),o=_g(e),n=i.getTime()-o.getTime();return n<0?-1:n>0?1:n}function $g(t){if(!(e=t,e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)||"number"==typeof t))return!1;var e;const i=_g(t);return!isNaN(Number(i))}function zg(t,e){const i=_g(t),o=_g(e),n=Og(i,o),a=Math.abs(Eg(i,o));i.setDate(i.getDate()-n*a);const s=n*(a-Number(Og(i,o)===-n));return 0===s?0:s}function Og(t,e){const i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function Vg(t){return e=>{const i=(t?Math[t]:Math.trunc)(e);return 0===i?0:i}}function Hg(t,e){return+_g(t)-+_g(e)}function Rg(t){const e=_g(t);return e.setHours(23,59,59,999),e}function Ig(t){const e=_g(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Ng(t,e){const i=_g(t),o=_g(e),n=Lg(i,o),a=Math.abs(function(t,e){const i=_g(t),o=_g(e);return 12*(i.getFullYear()-o.getFullYear())+(i.getMonth()-o.getMonth())}(i,o));let s;if(a<1)s=0;else{1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-n*a);let e=Lg(i,o)===-n;(function(t){const e=_g(t);return+Rg(e)==+Ig(e)})(_g(t))&&1===a&&1===Lg(t,o)&&(e=!1),s=n*(a-Number(e))}return 0===s?0:s}function Fg(t,e){const i=_g(t),o=_g(e),n=Lg(i,o),a=Math.abs(function(t,e){const i=_g(t),o=_g(e);return i.getFullYear()-o.getFullYear()}(i,o));i.setFullYear(1584),o.setFullYear(1584);const s=n*(a-+(Lg(i,o)===-n));return 0===s?0:s}function Wg(t){const e=_g(t),i=gg(t,0);return i.setFullYear(e.getFullYear(),0,1),i.setHours(0,0,0,0),i}const Bg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function jg(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const Ug={date:jg({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:jg({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:jg({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Yg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function qg(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,n=i?.width?String(i.width):e;o=t.formattingValues[n]||t.formattingValues[e]}else{const e=t.defaultWidth,n=i?.width?String(i.width):t.defaultWidth;o=t.values[n]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}const Zg={ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:qg({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:qg({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:qg({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:qg({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:qg({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Xg(t){return(e,i={})=>{const o=i.width,n=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],a=e.match(n);if(!a)return null;const s=a[0],r=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(r)?function(t,e){for(let i=0;it.test(s))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(r,(t=>t.test(s)));let c;c=t.valueCallback?t.valueCallback(l):l,c=i.valueCallback?i.valueCallback(c):c;return{value:c,rest:e.slice(s.length)}}}const Kg={ordinalNumber:(Gg={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(Gg.matchPattern);if(!i)return null;const o=i[0],n=t.match(Gg.parsePattern);if(!n)return null;let a=Gg.valueCallback?Gg.valueCallback(n[0]):n[0];return a=e.valueCallback?e.valueCallback(a):a,{value:a,rest:t.slice(o.length)}}),era:Xg({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Xg({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:Xg({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Xg({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Xg({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Gg;const Qg={code:"en-US",formatDistance:(t,e,i)=>{let o;const n=Bg[t];return o="string"==typeof n?n:1===e?n.one:n.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:Ug,formatRelative:(t,e,i,o)=>Yg[t],localize:Zg,match:Kg,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Jg(t){const e=_g(t),i=+Dg(e)-+function(t){const e=Cg(t),i=gg(t,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Dg(i)}(e);return Math.round(i/yg)+1}function tf(t,e){const i=_g(t),o=i.getFullYear(),n=Sg(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=gg(t,0);s.setFullYear(o+1,0,a),s.setHours(0,0,0,0);const r=Mg(s,e),l=gg(t,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);const c=Mg(l,e);return i.getTime()>=r.getTime()?o+1:i.getTime()>=c.getTime()?o:o-1}function ef(t,e){const i=_g(t),o=+Mg(i,e)-+function(t,e){const i=Sg(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,n=tf(t,e),a=gg(t,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),Mg(a,e)}(i,e);return Math.round(o/yg)+1}function of(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const nf={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return of("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):of(i+1,2)},d:(t,e)=>of(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>of(t.getHours()%12||12,e.length),H:(t,e)=>of(t.getHours(),e.length),m:(t,e)=>of(t.getMinutes(),e.length),s:(t,e)=>of(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return of(Math.trunc(o*Math.pow(10,i-3)),e.length)}},af="midnight",sf="noon",rf="morning",lf="afternoon",cf="evening",df="night",hf={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return nf.y(t,e)},Y:function(t,e,i,o){const n=tf(t,o),a=n>0?n:1-n;if("YY"===e){return of(a%100,2)}return"Yo"===e?i.ordinalNumber(a,{unit:"year"}):of(a,e.length)},R:function(t,e){return of(Cg(t),e.length)},u:function(t,e){return of(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return of(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return of(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return nf.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return of(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const n=ef(t,o);return"wo"===e?i.ordinalNumber(n,{unit:"week"}):of(n,e.length)},I:function(t,e,i){const o=Jg(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):of(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):nf.d(t,e)},D:function(t,e,i){const o=function(t){const e=_g(t);return Eg(e,Wg(e))+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):of(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const n=t.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return of(a,2);case"eo":return i.ordinalNumber(a,{unit:"day"});case"eee":return i.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const n=t.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return of(a,e.length);case"co":return i.ordinalNumber(a,{unit:"day"});case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"});default:return i.day(n,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),n=0===o?7:o;switch(e){case"i":return String(n);case"ii":return of(n,e.length);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let n;switch(n=12===o?sf:0===o?af:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let n;switch(n=o>=17?cf:o>=12?lf:o>=4?rf:df,e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return nf.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):nf.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):of(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):of(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):nf.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):nf.s(t,e)},S:function(t,e){return nf.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return mf(o);case"XXXX":case"XX":return pf(o);default:return pf(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return mf(o);case"xxxx":case"xx":return pf(o);default:return pf(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+uf(o,":");default:return"GMT"+pf(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+uf(o,":");default:return"GMT"+pf(o,":")}},t:function(t,e,i){return of(Math.trunc(t.getTime()/1e3),e.length)},T:function(t,e,i){return of(t.getTime(),e.length)}};function uf(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),n=Math.trunc(o/60),a=o%60;return 0===a?i+String(n):i+String(n)+e+of(a,2)}function mf(t,e){if(t%60==0){return(t>0?"-":"+")+of(Math.abs(t)/60,2)}return pf(t,e)}function pf(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+of(Math.trunc(o/60),2)+e+of(o%60,2)}const _f=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},gf=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ff={p:gf,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],n=i[2];if(!n)return _f(t,e);let a;switch(o){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;default:a=e.dateTime({width:"full"})}return a.replace("{{date}}",_f(o,e)).replace("{{time}}",gf(n,e))}},bf=/^D+$/,vf=/^Y+$/,yf=["D","DD","YY","YYYY"];function wf(t){return bf.test(t)}function xf(t){return vf.test(t)}function kf(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),yf.includes(t))throw new RangeError(o)}const Tf=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sf=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mf=/^'([^]*?)'?$/,Df=/''/g,Cf=/[a-zA-Z]/;function Af(t){const e=t.match(Mf);return e?e[1].replace(Df,"'"):t}class Pf{subPriority=0;validate(t,e){return!0}}class Ef extends Pf{constructor(t,e,i,o,n){super(),this.value=t,this.validateValue=e,this.setValue=i,this.priority=o,n&&(this.subPriority=n)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,i){return this.setValue(t,e,this.value,i)}}class Lf extends Pf{priority=10;subPriority=-1;set(t,e){return e.timestampIsSet?t:gg(t,function(t,e){const i=e instanceof Date?gg(e,0):new e(0);return i.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i}(t,Date))}}class $f{run(t,e,i,o){const n=this.parse(t,e,i,o);return n?{setter:new Ef(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}validate(t,e,i){return!0}}const zf=/^(1[0-2]|0?\d)/,Of=/^(3[0-1]|[0-2]?\d)/,Vf=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Hf=/^(5[0-3]|[0-4]?\d)/,Rf=/^(2[0-3]|[0-1]?\d)/,If=/^(2[0-4]|[0-1]?\d)/,Nf=/^(1[0-1]|0?\d)/,Ff=/^(1[0-2]|0?\d)/,Wf=/^[0-5]?\d/,Bf=/^[0-5]?\d/,jf=/^\d/,Uf=/^\d{1,2}/,Yf=/^\d{1,3}/,qf=/^\d{1,4}/,Zf=/^-?\d+/,Xf=/^-?\d/,Kf=/^-?\d{1,2}/,Gf=/^-?\d{1,3}/,Qf=/^-?\d{1,4}/,Jf=/^([+-])(\d{2})(\d{2})?|Z/,tb=/^([+-])(\d{2})(\d{2})|Z/,eb=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ib=/^([+-])(\d{2}):(\d{2})|Z/,ob=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function nb(t,e){return t?{value:e(t.value),rest:t.rest}:t}function ab(t,e){const i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function sb(t,e){const i=e.match(t);if(!i)return null;if("Z"===i[0])return{value:0,rest:e.slice(1)};const o="+"===i[1]?1:-1,n=i[2]?parseInt(i[2],10):0,a=i[3]?parseInt(i[3],10):0,s=i[5]?parseInt(i[5],10):0;return{value:o*(n*kg+a*xg+1e3*s),rest:e.slice(i[0].length)}}function rb(t){return ab(Zf,t)}function lb(t,e){switch(t){case 1:return ab(jf,e);case 2:return ab(Uf,e);case 3:return ab(Yf,e);case 4:return ab(qf,e);default:return ab(new RegExp("^\\d{1,"+t+"}"),e)}}function cb(t,e){switch(t){case 1:return ab(Xf,e);case 2:return ab(Kf,e);case 3:return ab(Gf,e);case 4:return ab(Qf,e);default:return ab(new RegExp("^-?\\d{1,"+t+"}"),e)}}function db(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function hb(t,e){const i=e>0,o=i?e:1-e;let n;if(o<=50)n=t||100;else{const e=o+50;n=t+100*Math.trunc(e/100)-(t>=e%100?100:0)}return i?n:1-n}function ub(t){return t%400==0||t%4==0&&t%100!=0}const mb=[31,28,31,30,31,30,31,31,30,31,30,31],pb=[31,29,31,30,31,30,31,31,30,31,30,31];function _b(t,e,i){const o=Sg(),n=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=_g(t),s=a.getDay(),r=7-n;return fg(a,e<0||e>6?e-(s+r)%7:((e%7+7)%7+r)%7-(s+r)%7)}function gb(t,e){const i=_g(t),o=function(t){let e=_g(t).getDay();return 0===e&&(e=7),e}(i);return fg(i,e-o)}const fb={G:new class extends $f{priority=140;parse(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}set(t,e,i){return e.era=i,t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]},y:new class extends $f{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,i){const o=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return nb(lb(4,t),o);case"yo":return nb(i.ordinalNumber(t,{unit:"year"}),o);default:return nb(lb(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i){const o=t.getFullYear();if(i.isTwoDigitYear){const e=hb(i.year,o);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}const n="era"in e&&1!==e.era?1-i.year:i.year;return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}},Y:new class extends $f{priority=130;parse(t,e,i){const o=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return nb(lb(4,t),o);case"Yo":return nb(i.ordinalNumber(t,{unit:"year"}),o);default:return nb(lb(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i,o){const n=tf(t,o);if(i.isTwoDigitYear){const e=hb(i.year,n);return t.setFullYear(e,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Mg(t,o)}const a="era"in e&&1!==e.era?1-i.year:i.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Mg(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends $f{priority=130;parse(t,e){return cb("R"===e?4:e.length,t)}set(t,e,i){const o=gg(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Dg(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends $f{priority=130;parse(t,e){return cb("u"===e?4:e.length,t)}set(t,e,i){return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends $f{priority=120;parse(t,e,i){switch(e){case"Q":case"QQ":return lb(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setMonth(3*(i-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends $f{priority=120;parse(t,e,i){switch(e){case"q":case"qq":return lb(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setMonth(3*(i-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends $f{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,i){const o=t=>t-1;switch(e){case"M":return nb(ab(zf,t),o);case"MM":return nb(lb(2,t),o);case"Mo":return nb(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}},L:new class extends $f{priority=110;parse(t,e,i){const o=t=>t-1;switch(e){case"L":return nb(ab(zf,t),o);case"LL":return nb(lb(2,t),o);case"Lo":return nb(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends $f{priority=100;parse(t,e,i){switch(e){case"w":return ab(Hf,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return lb(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i,o){return Mg(function(t,e,i){const o=_g(t),n=ef(o,i)-e;return o.setDate(o.getDate()-7*n),o}(t,i,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends $f{priority=100;parse(t,e,i){switch(e){case"I":return ab(Hf,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return lb(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i){return Dg(function(t,e){const i=_g(t),o=Jg(i)-e;return i.setDate(i.getDate()-7*o),i}(t,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends $f{priority=90;subPriority=1;parse(t,e,i){switch(e){case"d":return ab(Of,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return lb(e.length,t)}}validate(t,e){const i=ub(t.getFullYear()),o=t.getMonth();return i?e>=1&&e<=pb[o]:e>=1&&e<=mb[o]}set(t,e,i){return t.setDate(i),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends $f{priority=90;subpriority=1;parse(t,e,i){switch(e){case"D":case"DD":return ab(Vf,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return lb(e.length,t)}}validate(t,e){return ub(t.getFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,i){return t.setMonth(0,i),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends $f{priority=90;parse(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=_b(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends $f{priority=90;parse(t,e,i,o){const n=t=>{const e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return nb(lb(e.length,t),n);case"eo":return nb(i.ordinalNumber(t,{unit:"day"}),n);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=_b(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends $f{priority=90;parse(t,e,i,o){const n=t=>{const e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return nb(lb(e.length,t),n);case"co":return nb(i.ordinalNumber(t,{unit:"day"}),n);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=_b(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends $f{priority=90;parse(t,e,i){const o=t=>0===t?7:t;switch(e){case"i":case"ii":return lb(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return nb(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return nb(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return nb(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return nb(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,e){return e>=1&&e<=7}set(t,e,i){return(t=gb(t,i)).setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends $f{priority=80;parse(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(db(i),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends $f{priority=80;parse(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(db(i),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends $f{priority=80;parse(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(db(i),0,0,0),t}incompatibleTokens=["a","b","t","T"]},h:new class extends $f{priority=70;parse(t,e,i){switch(e){case"h":return ab(Ff,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return lb(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,i){const o=t.getHours()>=12;return o&&i<12?t.setHours(i+12,0,0,0):o||12!==i?t.setHours(i,0,0,0):t.setHours(0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]},H:new class extends $f{priority=70;parse(t,e,i){switch(e){case"H":return ab(Rf,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return lb(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,i){return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends $f{priority=70;parse(t,e,i){switch(e){case"K":return ab(Nf,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return lb(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.getHours()>=12&&i<12?t.setHours(i+12,0,0,0):t.setHours(i,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]},k:new class extends $f{priority=70;parse(t,e,i){switch(e){case"k":return ab(If,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return lb(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,i){const o=i<=24?i%24:i;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends $f{priority=60;parse(t,e,i){switch(e){case"m":return ab(Wf,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return lb(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setMinutes(i,0,0),t}incompatibleTokens=["t","T"]},s:new class extends $f{priority=50;parse(t,e,i){switch(e){case"s":return ab(Bf,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return lb(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setSeconds(i,0),t}incompatibleTokens=["t","T"]},S:new class extends $f{priority=30;parse(t,e){return nb(lb(e.length,t),(t=>Math.trunc(t*Math.pow(10,3-e.length))))}set(t,e,i){return t.setMilliseconds(i),t}incompatibleTokens=["t","T"]},X:new class extends $f{priority=10;parse(t,e){switch(e){case"X":return sb(Jf,t);case"XX":return sb(tb,t);case"XXXX":return sb(eb,t);case"XXXXX":return sb(ob,t);default:return sb(ib,t)}}set(t,e,i){return e.timestampIsSet?t:gg(t,t.getTime()-Pg(t)-i)}incompatibleTokens=["t","T","x"]},x:new class extends $f{priority=10;parse(t,e){switch(e){case"x":return sb(Jf,t);case"xx":return sb(tb,t);case"xxxx":return sb(eb,t);case"xxxxx":return sb(ob,t);default:return sb(ib,t)}}set(t,e,i){return e.timestampIsSet?t:gg(t,t.getTime()-Pg(t)-i)}incompatibleTokens=["t","T","X"]},t:new class extends $f{priority=40;parse(t){return rb(t)}set(t,e,i){return[gg(t,1e3*i),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends $f{priority=20;parse(t){return rb(t)}set(t,e,i){return[gg(t,i),{timestampIsSet:!0}]}incompatibleTokens="*"}},bb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yb=/^'([^]*?)'?$/,wb=/''/g,xb=/\S/,kb=/[a-zA-Z]/;function Tb(t,e,i,o){const n=Object.assign({},Sg()),a=o?.locale??n.locale??Qg,s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0;if(""===e)return""===t?_g(i):gg(i,NaN);const l={firstWeekContainsDate:s,weekStartsOn:r,locale:a},c=[new Lf],d=e.match(vb).map((t=>{const e=t[0];if(e in ff){return(0,ff[e])(t,a.formatLong)}return t})).join("").match(bb),h=[];for(let n of d){!o?.useAdditionalWeekYearTokens&&xf(n)&&kf(n,e,t),!o?.useAdditionalDayOfYearTokens&&wf(n)&&kf(n,e,t);const s=n[0],r=fb[s];if(r){const{incompatibleTokens:e}=r;if(Array.isArray(e)){const t=h.find((t=>e.includes(t.token)||t.token===s));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${n}\` at the same time`)}else if("*"===r.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);h.push({token:s,fullToken:n});const o=r.run(t,n,a.match,l);if(!o)return gg(i,NaN);c.push(o.setter),t=o.rest}else{if(s.match(kb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");if("''"===n?n="'":"'"===s&&(n=n.match(yb)[1].replace(wb,"'")),0!==t.indexOf(n))return gg(i,NaN);t=t.slice(n.length)}}if(t.length>0&&xb.test(t))return gg(i,NaN);const u=c.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,i)=>i.indexOf(t)===e)).map((t=>c.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let m=_g(i);if(isNaN(m.getTime()))return gg(i,NaN);const p={};for(const t of u){if(!t.validate(m,l))return gg(i,NaN);const e=t.set(m,p,l);Array.isArray(e)?(m=e[0],Object.assign(p,e[1])):m=e}return gg(i,m)}function Sb(t,e){const i=e?.additionalDigits??2,o=function(t){const e={},i=t.split(Mb.dateTimeDelimiter);let o;if(i.length>2)return e;/:/.test(i[0])?o=i[0]:(e.date=i[0],o=i[1],Mb.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Mb.timeZoneDelimiter)[0],o=t.substr(e.date.length,t.length)));if(o){const t=Mb.timezone.exec(o);t?(e.time=o.replace(t[1],""),e.timezone=t[1]):e.time=o}return e}(t);let n;if(o.date){const t=function(t,e){const i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};const n=o[1]?parseInt(o[1]):null,a=o[2]?parseInt(o[2]):null;return{year:null===a?n:100*a,restDateString:t.slice((o[1]||o[2]).length)}}(o.date,i);n=function(t,e){if(null===e)return new Date(NaN);const i=t.match(Db);if(!i)return new Date(NaN);const o=!!i[4],n=Pb(i[1]),a=Pb(i[2])-1,s=Pb(i[3]),r=Pb(i[4]),l=Pb(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,r,l)?function(t,e,i){const o=new Date(0);o.setUTCFullYear(t,0,4);const n=o.getUTCDay()||7,a=7*(e-1)+i+1-n;return o.setUTCDate(o.getUTCDate()+a),o}(e,r,l):new Date(NaN);{const t=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(Lb[e]||($b(t)?29:28))}(e,a,s)&&function(t,e){return e>=1&&e<=($b(t)?366:365)}(e,n)?(t.setUTCFullYear(e,a,Math.max(n,s)),t):new Date(NaN)}}(t.restDateString,t.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);const a=n.getTime();let s,r=0;if(o.time&&(r=function(t){const e=t.match(Cb);if(!e)return NaN;const i=Eb(e[1]),o=Eb(e[2]),n=Eb(e[3]);if(!function(t,e,i){if(24===t)return 0===e&&0===i;return i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,n))return NaN;return i*kg+o*xg+1e3*n}(o.time),isNaN(r)))return new Date(NaN);if(!o.timezone){const t=new Date(a+r),e=new Date(0);return e.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e}return s=function(t){if("Z"===t)return 0;const e=t.match(Ab);if(!e)return 0;const i="+"===e[1]?-1:1,o=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;if(!function(t,e){return e>=0&&e<=59}(0,n))return NaN;return i*(o*kg+n*xg)}(o.timezone),isNaN(s)?new Date(NaN):new Date(a+r+s)}const Mb={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Db=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Cb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ab=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Pb(t){return t?parseInt(t):1}function Eb(t){return t&&parseFloat(t.replace(",","."))||0}const Lb=[31,null,31,30,31,30,31,31,30,31,30,31];function $b(t){return t%400==0||t%4==0&&t%100!=0}const zb={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Lh._date.override({_id:"date-fns",formats:function(){return zb},parse:function(t,e){if(null==t)return null;const i=typeof t;return"number"===i||t instanceof Date?t=_g(t):"string"===i&&(t="string"==typeof e?Tb(t,e,new Date,this.options):Sb(t,this.options)),$g(t)?t.getTime():null},format:function(t,e){return function(t,e,i){const o=Sg(),n=i?.locale??o.locale??Qg,a=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,r=_g(t);if(!$g(r))throw new RangeError("Invalid time value");let l=e.match(Sf).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,ff[e])(t,n.formatLong):t})).join("").match(Tf).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:Af(t)};if(hf[e])return{isToken:!0,value:t};if(e.match(Cf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));n.localize.preprocessor&&(l=n.localize.preprocessor(r,l));const c={firstWeekContainsDate:a,weekStartsOn:s,locale:n};return l.map((o=>{if(!o.isToken)return o.value;const a=o.value;return(!i?.useAdditionalWeekYearTokens&&xf(a)||!i?.useAdditionalDayOfYearTokens&&wf(a))&&kf(a,e,String(t)),(0,hf[a[0]])(r,a,n.localize,c)})).join("")}(t,e,this.options)},add:function(t,e,i){switch(i){case"millisecond":return vg(t,e);case"second":return function(t,e){return vg(t,1e3*e)}(t,e);case"minute":return function(t,e){return vg(t,e*xg)}(t,e);case"hour":return function(t,e){return vg(t,e*kg)}(t,e);case"day":return fg(t,e);case"week":return function(t,e){return fg(t,7*e)}(t,e);case"month":return bg(t,e);case"quarter":return function(t,e){return bg(t,3*e)}(t,e);case"year":return function(t,e){return bg(t,12*e)}(t,e);default:return t}},diff:function(t,e,i){switch(i){case"millisecond":return Hg(t,e);case"second":return function(t,e,i){const o=Hg(t,e)/1e3;return Vg(i?.roundingMethod)(o)}(t,e);case"minute":return function(t,e,i){const o=Hg(t,e)/xg;return Vg(i?.roundingMethod)(o)}(t,e);case"hour":return function(t,e,i){const o=Hg(t,e)/kg;return Vg(i?.roundingMethod)(o)}(t,e);case"day":return zg(t,e);case"week":return function(t,e,i){const o=zg(t,e)/7;return Vg(i?.roundingMethod)(o)}(t,e);case"month":return Ng(t,e);case"quarter":return function(t,e,i){const o=Ng(t,e)/3;return Vg(i?.roundingMethod)(o)}(t,e);case"year":return Fg(t,e);default:return 0}},startOf:function(t,e,i){switch(e){case"second":return function(t){const e=_g(t);return e.setMilliseconds(0),e}(t);case"minute":return function(t){const e=_g(t);return e.setSeconds(0,0),e}(t);case"hour":return function(t){const e=_g(t);return e.setMinutes(0,0,0),e}(t);case"day":return Ag(t);case"week":return Mg(t);case"isoWeek":return Mg(t,{weekStartsOn:+i});case"month":return function(t){const e=_g(t);return e.setDate(1),e.setHours(0,0,0,0),e}(t);case"quarter":return function(t){const e=_g(t),i=e.getMonth(),o=i-i%3;return e.setMonth(o,1),e.setHours(0,0,0,0),e}(t);case"year":return Wg(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){const e=_g(t);return e.setMilliseconds(999),e}(t);case"minute":return function(t){const e=_g(t);return e.setSeconds(59,999),e}(t);case"hour":return function(t){const e=_g(t);return e.setMinutes(59,59,999),e}(t);case"day":return Rg(t);case"week":return function(t,e){const i=Sg(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,n=_g(t),a=n.getDay(),s=6+(at.schema)),o=Object.assign({},...i);return e?Yn(o):Bn(o)}(Bn({index:jn(Wn()),view_index:jn(Wn()),view_layout:Rn(),type:Un()}),Bn({entity:jn(Un()),name:jn(Un()),icon:jn(Un()),autoStartStopEnableEntity:jn(Un()),powerEntity:jn(Un()),visibility:jn(Rn())}),Bn({disable_name:jn(Nn()),disable_window:jn(Nn()),disable_autoStartStop:jn(Nn()),disable_overpowering:jn(Nn()),disable_heat:jn(Nn()),disable_cool:jn(Nn()),disable_heat_cool:jn(Nn()),disable_auto:jn(Nn()),disable_dry:jn(Nn()),disable_fan_only:jn(Nn()),disable_off:jn(Nn()),disable_sleep:jn(Nn()),disable_safety_warning:jn(Nn()),disable_power_infos:jn(Nn()),disable_auto_fan_infos:jn(Nn()),disable_target_icon:jn(Nn()),set_current_as_main:jn(Nn()),eco_temperature:jn(Wn()),disable_menu:jn(Nn()),disable_buttons:jn(Nn()),allow_lock_toggle:jn(Nn()),disable_presets:jn(Nn()),theme:jn(qn([Fn("classic"),Fn("vtherm"),Fn("uncolored"),Fn("gunmalmg")])),disable_timed_preset:jn(Nn()),use_manual_duration_input:jn(Nn()),allow_preset_modification:jn(Nn()),show_status_text:jn(Nn()),show_background_gradient_on_active:jn(Nn()),show_regulation_chart:jn(Nn())}));var Hb;const Rb=["icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],Ib=t=>{var e,i;customElements.get("ha-form")&&(customElements.get("hui-action-editor")||((t,e,i,o)=>{const[n,a,s]=t.split(".",3);return Number(n)>e||Number(n)===e&&(void 0===o?Number(a)>=i:Number(a)>i)||void 0!==o&&Number(n)===e&&Number(a)===i&&Number(s)>=o})(t,2022,11))||null===(e=customElements.get("hui-button-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-entity-picker")||null===(i=customElements.get("hui-entities-card"))||void 0===i||i.getConfigElement()},Nb=["theme","autoStartStopEnableEntity","powerEntity","section_all_themes","section_classic_only","disable_name","disable_window","disable_autoStartStop","disable_overpowering","disable_heat","disable_cool","disable_heat_cool","disable_auto","disable_dry","disable_fan_only","disable_off","disable_sleep","disable_menu","disable_safety_warning","disable_buttons","set_current_as_main","disable_power_infos","disable_auto_fan_infos","disable_target_icon","allow_lock_toggle","disable_presets","disable_timed_preset","use_manual_duration_input","allow_preset_modification","show_status_text","show_background_gradient_on_active","show_regulation_chart"],Fb=xn(((t,e)=>[{name:"entity",selector:{entity:{domain:["climate"]}}},{name:"name",selector:{text:{}}},{name:"theme",selector:{select:{options:t}}},{type:"grid",name:"",schema:[{name:"autoStartStopEnableEntity",selector:{entity:{domain:["switch"]}}},{name:"powerEntity",selector:{entity:{domain:["sensor","input_number"]}}}]},{type:"expandable",name:"section_all_themes",icon:"mdi:cog",schema:[{name:"disable_name",selector:{boolean:{}}},{name:"disable_safety_warning",selector:{boolean:{}}},{name:"set_current_as_main",selector:{boolean:{}}},{name:"allow_lock_toggle",selector:{boolean:{}}},{name:"disable_timed_preset",selector:{boolean:{}}},{name:"use_manual_duration_input",selector:{boolean:{}}},{name:"allow_preset_modification",selector:{boolean:{}}},{name:"show_regulation_chart",selector:{boolean:{}}}]},...e?[]:[{type:"expandable",name:"section_classic_only",icon:"mdi:palette-outline",schema:[{name:"disable_window",selector:{boolean:{}}},{name:"disable_autoStartStop",selector:{boolean:{}}},{name:"disable_overpowering",selector:{boolean:{}}},{name:"disable_heat",selector:{boolean:{}}},{name:"disable_cool",selector:{boolean:{}}},{name:"disable_heat_cool",selector:{boolean:{}}},{name:"disable_auto",selector:{boolean:{}}},{name:"disable_dry",selector:{boolean:{}}},{name:"disable_fan_only",selector:{boolean:{}}},{name:"disable_off",selector:{boolean:{}}},{name:"disable_sleep",selector:{boolean:{}}},{name:"disable_menu",selector:{boolean:{}}},{name:"disable_buttons",selector:{boolean:{}}},{name:"disable_power_infos",selector:{boolean:{}}},{name:"disable_auto_fan_infos",selector:{boolean:{}}},{name:"disable_target_icon",selector:{boolean:{}}},{name:"disable_presets",selector:{boolean:{}}},{name:"show_status_text",selector:{boolean:{}}},{name:"show_background_gradient_on_active",selector:{boolean:{}}}]}]]));let Wb=Hb=class extends rt{constructor(){super(...arguments),this._computeLabel=t=>{const e=fn(this.hass);return Rb.includes(t.name)?e(`editor.card.generic.${t.name}`):Nb.includes(t.name)?e(`editor.card.climate.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ib(this.hass.connection.haVersion)}setConfig(t){On(t,Vb),this._config=t}render(){var t;if(!this.hass||!this._config)return B``;const e=fn(this.hass),i=[{value:"classic",label:e("editor.card.climate.theme_classic")||"Classic"},{value:"vtherm",label:e("editor.card.climate.theme_vtherm")||"VTherm"},{value:"uncolored",label:e("editor.card.climate.theme_uncolored")||"Uncolored"},{value:"gunmalmg",label:e("editor.card.climate.theme_gunmalmg")||"Gunmalmg"}],o="gunmalmg"===(null===(t=this._config)||void 0===t?void 0:t.theme),n=Fb(i,o),a=Object.assign({},this._config),s={};for(const t of Hb.ALL_THEMES_KEYS)void 0!==this._config[t]&&(s[t]=this._config[t]),delete a[t];if(a.section_all_themes=s,!o){const t={};for(const e of Hb.CLASSIC_ONLY_KEYS)void 0!==this._config[e]&&(t[e]=this._config[e]),delete a[e];a.section_classic_only=t}return B` + `,nr,sr],Ar.additionalThemeStyles=[sr],t([pt({attribute:!1})],Ar.prototype,"hass",void 0),t([pt({type:Number})],Ar.prototype,"value",void 0),t([mt()],Ar.prototype,"_selectTargetTemperature",void 0),t([pt({type:Number})],Ar.prototype,"current",void 0),t([pt({type:Number})],Ar.prototype,"humidity",void 0),t([pt({type:Number})],Ar.prototype,"temperature",void 0),t([pt({type:Number})],Ar.prototype,"min",void 0),t([pt({type:Number})],Ar.prototype,"max",void 0),t([pt({type:Number})],Ar.prototype,"step",void 0),t([pt({type:Number})],Ar.prototype,"powerPercent",void 0),t([pt({type:Number})],Ar.prototype,"meanCyclePower",void 0),t([pt({type:Number})],Ar.prototype,"valveOpenPercent",void 0),t([pt({type:Number})],Ar.prototype,"devicePower",void 0),t([pt({type:Number})],Ar.prototype,"regulatedTargetTemperature",void 0),t([pt({type:Boolean})],Ar.prototype,"isOn",void 0),t([pt({type:Boolean})],Ar.prototype,"window",void 0),t([pt({type:Boolean})],Ar.prototype,"windowByPass",void 0),t([pt({type:Boolean})],Ar.prototype,"presence",void 0),t([pt({type:Boolean})],Ar.prototype,"motion",void 0),t([pt({type:Boolean})],Ar.prototype,"overpowering",void 0),t([pt({type:Boolean})],Ar.prototype,"isDeviceActive",void 0),t([pt({type:Boolean})],Ar.prototype,"isSleeping",void 0),t([pt({type:Boolean})],Ar.prototype,"isRegulated",void 0),t([pt({type:Boolean})],Ar.prototype,"isRecalculateScheduled",void 0),t([pt({type:String})],Ar.prototype,"windowState",void 0),t([pt({type:String})],Ar.prototype,"windowAutoState",void 0),t([pt({type:String})],Ar.prototype,"overpoweringState",void 0),t([pt({type:String})],Ar.prototype,"presenceState",void 0),t([pt({type:String})],Ar.prototype,"motionState",void 0),t([pt({type:String})],Ar.prototype,"safetyState",void 0),t([pt({type:String})],Ar.prototype,"status",void 0),t([pt({type:String})],Ar.prototype,"hvacMode",void 0),t([pt({type:String})],Ar.prototype,"hvacAction",void 0),t([pt({type:String})],Ar.prototype,"preset",void 0),t([pt({type:String})],Ar.prototype,"autoRegulationMode",void 0),t([pt({type:String})],Ar.prototype,"currentAutoFanMode",void 0),t([pt({type:String})],Ar.prototype,"autoFanMode",void 0),t([pt({type:String})],Ar.prototype,"fanMode",void 0),t([pt({type:String})],Ar.prototype,"hvacModeReason",void 0),t([pt({type:Boolean,reflect:!0})],Ar.prototype,"dragging",void 0),t([pt({type:String})],Ar.prototype,"name",void 0),t([mt()],Ar.prototype,"changingHigh",void 0),t([mt()],Ar.prototype,"_hasError",void 0),t([mt()],Ar.prototype,"_config",void 0),t([mt()],Ar.prototype,"_showThemeMenu",void 0),t([mt()],Ar.prototype,"_showClassicPopup",void 0),t([pt({type:String})],Ar.prototype,"theme",void 0),t([mt()],Ar.prototype,"isLocked",void 0),t([mt()],Ar.prototype,"isUserLocked",void 0),t([mt()],Ar.prototype,"isAutomationLocked",void 0),t([mt()],Ar.prototype,"showDigicodeModal",void 0),t([mt()],Ar.prototype,"enteredCode",void 0),t([mt()],Ar.prototype,"codeError",void 0),t([mt()],Ar.prototype,"isLocking",void 0),t([mt()],Ar.prototype,"timedPresetDuration",void 0),t([mt()],Ar.prototype,"timedPresetActive",void 0),t([mt()],Ar.prototype,"timedPresetRemainingTime",void 0),t([mt()],Ar.prototype,"timedPresetPreset",void 0),t([mt()],Ar.prototype,"_presetsPanelOpen",void 0),t([mt()],Ar.prototype,"_regulationChartOpen",void 0),t([mt()],Ar.prototype,"_presetTempEntities",void 0),t([mt()],Ar.prototype,"_autoStartStopEditMode",void 0),Ar=t([dt("versatile-thermostat-ui-card")],Ar);const Er=(t,e,i)=>Math.max(Math.min(t,i),e);function Lr(t){return Er(Pr(2.55*t),0,255)}function $r(t){return Er(Pr(255*t),0,255)}function zr(t){return Er(Pr(t/2.55)/100,0,1)}function Or(t){return Er(Pr(100*t),0,100)}const Vr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Hr=[..."0123456789ABCDEF"],Ir=t=>Hr[15&t],Rr=t=>Hr[(240&t)>>4]+Hr[15&t],Fr=t=>(240&t)>>4==(15&t);function Nr(t){var e=(t=>Fr(t.r)&&Fr(t.g)&&Fr(t.b)&&Fr(t.a))(t)?Ir:Rr;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const jr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Wr(t,e,i){const o=e*Math.min(i,1-i),a=(e,a=(e+t/30)%12)=>i-o*Math.max(Math.min(a-3,9-a,1),-1);return[a(0),a(8),a(4)]}function Br(t,e,i){const o=(o,a=(o+t/60)%6)=>i-i*e*Math.max(Math.min(a,4-a,1),0);return[o(5),o(3),o(1)]}function Ur(t,e,i){const o=Wr(t,1,.5);let a;for(e+i>1&&(a=1/(e+i),e*=a,i*=a),a=0;a<3;a++)o[a]*=1-e-i,o[a]+=e;return o}function Yr(t){const e=t.r/255,i=t.g/255,o=t.b/255,a=Math.max(e,i,o),n=Math.min(e,i,o),s=(a+n)/2;let r,l,c;return a!==n&&(c=a-n,l=s>.5?c/(2-a-n):c/(a+n),r=function(t,e,i,o,a){return t===a?(e-i)/o+(e>16&255,n>>8&255,255&n]}return t}(),Jr.transparent=[0,0,0,0]);const e=Jr[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const el=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const il=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,ol=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function al(t,e,i){if(t){let o=Yr(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*i,0===e?360:1)),o=Zr(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function nl(t,e){return t?Object.assign(e||{},t):t}function sl(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=$r(t[3]))):(e=nl(t,{r:0,g:0,b:0,a:1})).a=$r(e.a),e}function rl(t){return"r"===t.charAt(0)?function(t){const e=el.exec(t);let i,o,a,n=255;if(e){if(e[7]!==i){const t=+e[7];n=e[8]?Lr(t):Er(255*t,0,255)}return i=+e[1],o=+e[3],a=+e[5],i=255&(e[2]?Lr(i):Er(i,0,255)),o=255&(e[4]?Lr(o):Er(o,0,255)),a=255&(e[6]?Lr(a):Er(a,0,255)),{r:i,g:o,b:a,a:n}}}(t):Kr(t)}class ll{constructor(t){if(t instanceof ll)return t;const e=typeof t;let i;var o,a,n;"object"===e?i=sl(t):"string"===e&&(n=(o=t).length,"#"===o[0]&&(4===n||5===n?a={r:255&17*Vr[o[1]],g:255&17*Vr[o[2]],b:255&17*Vr[o[3]],a:5===n?17*Vr[o[4]]:255}:7!==n&&9!==n||(a={r:Vr[o[1]]<<4|Vr[o[2]],g:Vr[o[3]]<<4|Vr[o[4]],b:Vr[o[5]]<<4|Vr[o[6]],a:9===n?Vr[o[7]]<<4|Vr[o[8]]:255})),i=a||tl(t)||rl(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=nl(this._rgb);return t&&(t.a=zr(t.a)),t}set rgb(t){this._rgb=sl(t)}rgbString(){return this._valid?function(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${zr(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}(this._rgb):void 0}hexString(){return this._valid?Nr(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Yr(t),i=e[0],o=Or(e[1]),a=Or(e[2]);return t.a<255?`hsla(${i}, ${o}%, ${a}%, ${zr(t.a)})`:`hsl(${i}, ${o}%, ${a}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,o=t.rgb;let a;const n=e===a?.5:e,s=2*n-1,r=i.a-o.a,l=((s*r==-1?s:(s+r)/(1+s*r))+1)/2;a=1-l,i.r=255&l*i.r+a*o.r+.5,i.g=255&l*i.g+a*o.g+.5,i.b=255&l*i.b+a*o.b+.5,i.a=n*i.a+(1-n)*o.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const o=ol(zr(t.r)),a=ol(zr(t.g)),n=ol(zr(t.b));return{r:$r(il(o+i*(ol(zr(e.r))-o))),g:$r(il(a+i*(ol(zr(e.g))-a))),b:$r(il(n+i*(ol(zr(e.b))-n))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new ll(this.rgb)}alpha(t){return this._rgb.a=$r(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Pr(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return al(this._rgb,2,t),this}darken(t){return al(this._rgb,2,-t),this}saturate(t){return al(this._rgb,1,t),this}desaturate(t){return al(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Yr(t);i[0]=Xr(i[0]+e),i=Zr(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function cl(){}const dl=(()=>{let t=0;return()=>t++})();function hl(t){return null==t}function ul(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function pl(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function ml(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function _l(t,e){return ml(t)?t:e}function fl(t,e){return void 0===t?e:t}const gl=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function bl(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function vl(t,e,i,o){let a,n,s;if(ul(t))for(n=t.length,a=0;at,x:t=>t.x,y:t=>t.y};function Cl(t,e){const i=Dl[e]||(Dl[e]=function(t){const e=function(t){const e=t.split("."),i=[];let o="";for(const t of e)o+=t,o.endsWith("\\")?o=o.slice(0,-1)+".":(i.push(o),o="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function Al(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Pl=t=>void 0!==t,El=t=>"function"==typeof t,Ll=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const $l=Math.PI,zl=2*$l,Ol=zl+$l,Vl=Number.POSITIVE_INFINITY,Hl=$l/180,Il=$l/2,Rl=$l/4,Fl=2*$l/3,Nl=Math.log10,jl=Math.sign;function Wl(t,e,i){return Math.abs(t-e)l&&c=Math.min(e,i)-o&&t<=Math.max(e,i)+o}function oc(t,e,i){i=i||(i=>t[i]1;)o=n+a>>1,i(o)?n=o:a=o;return{lo:n,hi:a}}const ac=(t,e,i,o)=>oc(t,i,o?o=>{const a=t[o][e];return at[o][e]oc(t,i,(o=>t[o][e]>=i));const sc=["push","pop","shift","splice","unshift"];function rc(t,e){const i=t._chartjs;if(!i)return;const o=i.listeners,a=o.indexOf(e);-1!==a&&o.splice(a,1),o.length>0||(sc.forEach((e=>{delete t[e]})),delete t._chartjs)}function lc(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const cc="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function dc(t,e){let i=[],o=!1;return function(...a){i=a,o||(o=!0,cc.call(window,(()=>{o=!1,t.apply(e,i)})))}}const hc=t=>"start"===t?"left":"end"===t?"right":"center",uc=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function pc(t,e,i){const o=e.length;let a=0,n=o;if(t._sorted){const{iScale:s,vScale:r,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=s.axis,{min:h,max:u,minDefined:p,maxDefined:m}=s.getUserBounds();if(p){if(a=Math.min(ac(l,d,h).lo,i?o:ac(e,d,s.getPixelForValue(h)).lo),c){const t=l.slice(0,a+1).reverse().findIndex((t=>!hl(t[r.axis])));a-=Math.max(0,t)}a=ec(a,0,o-1)}if(m){let t=Math.max(ac(l,s.axis,u,!0).hi+1,i?0:ac(e,d,s.getPixelForValue(u),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!hl(t[r.axis])));t+=Math.max(0,e)}n=ec(t,a,o)-a}else n=o-a}return{start:a,count:n}}function mc(t){const{xScale:e,yScale:i,_scaleRanges:o}=t,a={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!o)return t._scaleRanges=a,!0;const n=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==i.min||o.ymax!==i.max;return Object.assign(o,a),n}const _c=t=>0===t||1===t,fc=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*zl/i),gc=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*zl/i)+1,bc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Il),easeOutSine:t=>Math.sin(t*Il),easeInOutSine:t=>-.5*(Math.cos($l*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>_c(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>_c(t)?t:fc(t,.075,.3),easeOutElastic:t=>_c(t)?t:gc(t,.075,.3),easeInOutElastic(t){const e=.1125;return _c(t)?t:t<.5?.5*fc(2*t,e,.45):.5+.5*gc(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-bc.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*bc.easeInBounce(2*t):.5*bc.easeOutBounce(2*t-1)+.5};function vc(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function yc(t){return vc(t)?t:new ll(t)}function wc(t){return vc(t)?t:new ll(t).saturate(.5).darken(.1).hexString()}const xc=["x","y","borderWidth","radius","tension"],kc=["color","borderColor","backgroundColor"];const Sc=new Map;function Tc(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let o=Sc.get(i);return o||(o=new Intl.NumberFormat(t,e),Sc.set(i,o)),o}(e,i).format(t)}const Mc={values:t=>ul(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const o=this.chart.options.locale;let a,n=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(a="scientific"),n=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=Nl(Math.abs(n)),r=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:a,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Tc(t,o,l)},logarithmic(t,e,i){if(0===t)return"0";const o=i[e].significand||t/Math.pow(10,Math.floor(Nl(t)));return[1,2,3,5,10,15].includes(o)||e>.8*i.length?Mc.numeric.call(this,t,e,i):""}};var Dc={formatters:Mc};const Cc=Object.create(null),Ac=Object.create(null);function Pc(t,e){if(!e)return t;const i=e.split(".");for(let e=0,o=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>wc(e.backgroundColor),this.hoverBorderColor=(t,e)=>wc(e.borderColor),this.hoverColor=(t,e)=>wc(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ec(this,t,e)}get(t){return Pc(this,t)}describe(t,e){return Ec(Ac,t,e)}override(t,e){return Ec(Cc,t,e)}route(t,e,i,o){const a=Pc(this,t),n=Pc(this,i),s="_"+e;Object.defineProperties(a,{[s]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=n[o];return pl(t)?Object.assign({},e,t):fl(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach((t=>t(this)))}}var $c=new Lc({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:kc},numbers:{type:"number",properties:xc}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Dc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function zc(t,e,i,o,a){let n=e[a];return n||(n=e[a]=t.measureText(a).width,i.push(a)),n>o&&(o=n),o}function Oc(t,e,i,o){let a=(o=o||{}).data=o.data||{},n=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(a=o.data={},n=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let s=0;const r=i.length;let l,c,d,h,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Fc(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==n.strokeColor;let l,c;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),hl(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,n),l=0;l+t||0;function Jc(t,e){const i={},o=pl(e),a=o?Object.keys(e):e,n=pl(t)?o?i=>fl(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of a)i[t]=Qc(n(t));return i}function td(t){return Jc(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ed(t){return Jc(t,["topLeft","topRight","bottomLeft","bottomRight"])}function id(t){const e=td(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function od(t,e){t=t||{},e=e||$c.font;let i=fl(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let o=fl(t.style,e.style);o&&!(""+o).match(Kc)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const a={family:fl(t.family,e.family),lineHeight:Gc(fl(t.lineHeight,e.lineHeight),i),size:i,style:o,weight:fl(t.weight,e.weight),string:""};return a.string=function(t){return!t||hl(t.size)||hl(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(a),a}function ad(t,e,i,o){let a,n,s;for(a=0,n=t.length;at[0])){const n=i||t;void 0===o&&(o=gd("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:o,_getTarget:a,override:i=>sd([i,...t],e,n,o)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,o)=>hd(i,o,(()=>function(t,e,i,o){let a;for(const n of e)if(a=gd(cd(n,t),i),void 0!==a)return dd(t,a)?_d(i,o,t,a):a}(o,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>bd(t).includes(e),ownKeys:t=>bd(t),set(t,e,i){const o=t._storage||(t._storage=a());return t[e]=o[e]=i,delete t._keys,!0}})}function rd(t,e,i,o){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ld(t,o),setContext:e=>rd(t,e,i,o),override:a=>rd(t.override(a),e,i,o)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>hd(t,e,(()=>function(t,e,i){const{_proxy:o,_context:a,_subProxy:n,_descriptors:s}=t;let r=o[e];El(r)&&s.isScriptable(e)&&(r=function(t,e,i,o){const{_proxy:a,_context:n,_subProxy:s,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(n,s||o);r.delete(t),dd(t,l)&&(l=_d(a._scopes,a,t,l));return l}(e,r,t,i));ul(r)&&r.length&&(r=function(t,e,i,o){const{_proxy:a,_context:n,_subProxy:s,_descriptors:r}=i;if(void 0!==n.index&&o(t))return e[n.index%e.length];if(pl(e[0])){const i=e,o=a._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=_d(o,a,t,l);e.push(rd(i,n,s&&s[t],r))}}return e}(e,r,t,s.isIndexable));dd(e,r)&&(r=rd(r,a,n&&n[e],s));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,o)=>(t[i]=o,delete e[i],!0)})}function ld(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:o=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:o,isScriptable:El(i)?i:()=>i,isIndexable:El(o)?o:()=>o}}const cd=(t,e)=>t?t+Al(e):e,dd=(t,e)=>pl(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function hd(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const o=i();return t[e]=o,o}function ud(t,e,i){return El(t)?t(e,i):t}const pd=(t,e)=>!0===t?e:"string"==typeof t?Cl(e,t):void 0;function md(t,e,i,o,a){for(const n of e){const e=pd(i,n);if(e){t.add(e);const n=ud(e._fallback,i,a);if(void 0!==n&&n!==i&&n!==o)return n}else if(!1===e&&void 0!==o&&i!==o)return null}return!1}function _d(t,e,i,o){const a=e._rootScopes,n=ud(e._fallback,i,o),s=[...t,...a],r=new Set;r.add(o);let l=fd(r,s,i,n||i,o);return null!==l&&((void 0===n||n===i||(l=fd(r,s,n,l,o),null!==l))&&sd(Array.from(r),[""],a,n,(()=>function(t,e,i){const o=t._getTarget();e in o||(o[e]={});const a=o[e];if(ul(a)&&pl(i))return i;return a||{}}(e,i,o))))}function fd(t,e,i,o,a){for(;i;)i=md(t,e,i,o,a);return i}function gd(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function bd(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function vd(t,e,i,o){const{iScale:a}=t,{key:n="r"}=this._parsing,s=new Array(o);let r,l,c,d;for(r=0,l=o;re"x"===t?"y":"x";function kd(t,e,i,o){const a=t.skip?e:t,n=e,s=i.skip?e:i,r=Gl(n,a),l=Gl(s,n);let c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const h=o*c,u=o*d;return{previous:{x:n.x-h*(s.x-a.x),y:n.y-h*(s.y-a.y)},next:{x:n.x+u*(s.x-a.x),y:n.y+u*(s.y-a.y)}}}function Sd(t,e="x"){const i=xd(e),o=t.length,a=Array(o).fill(0),n=Array(o);let s,r,l,c=wd(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Sd(t,a);else{let i=o?t[t.length-1]:t[0];for(n=0,s=t.length;nt.ownerDocument.defaultView.getComputedStyle(t,null);const Ed=["top","right","bottom","left"];function Ld(t,e,i){const o={};i=i?"-"+i:"";for(let a=0;a<4;a++){const n=Ed[a];o[n]=parseFloat(t[e+"-"+n+i])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const $d=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function zd(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:o}=e,a=Pd(i),n="border-box"===a.boxSizing,s=Ld(a,"padding"),r=Ld(a,"border","width"),{x:l,y:c,box:d}=function(t,e){const i=t.touches,o=i&&i.length?i[0]:t,{offsetX:a,offsetY:n}=o;let s,r,l=!1;if($d(a,n,t.target))s=a,r=n;else{const t=e.getBoundingClientRect();s=o.clientX-t.left,r=o.clientY-t.top,l=!0}return{x:s,y:r,box:l}}(t,i),h=s.left+(d&&r.left),u=s.top+(d&&r.top);let{width:p,height:m}=e;return n&&(p-=s.width+r.width,m-=s.height+r.height),{x:Math.round((l-h)/p*i.width/o),y:Math.round((c-u)/m*i.height/o)}}const Od=t=>Math.round(10*t)/10;function Vd(t,e,i,o){const a=Pd(t),n=Ld(a,"margin"),s=Ad(a.maxWidth,t,"clientWidth")||Vl,r=Ad(a.maxHeight,t,"clientHeight")||Vl,l=function(t,e,i){let o,a;if(void 0===e||void 0===i){const n=t&&Cd(t);if(n){const t=n.getBoundingClientRect(),s=Pd(n),r=Ld(s,"border","width"),l=Ld(s,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,o=Ad(s.maxWidth,n,"clientWidth"),a=Ad(s.maxHeight,n,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:o||Vl,maxHeight:a||Vl}}(t,e,i);let{width:c,height:d}=l;if("content-box"===a.boxSizing){const t=Ld(a,"border","width"),e=Ld(a,"padding");c-=e.width+t.width,d-=e.height+t.height}c=Math.max(0,c-n.width),d=Math.max(0,o?c/o:d-n.height),c=Od(Math.min(c,s,l.maxWidth)),d=Od(Math.min(d,r,l.maxHeight)),c&&!d&&(d=Od(c/2));return(void 0!==e||void 0!==i)&&o&&l.height&&d>l.height&&(d=l.height,c=Od(Math.floor(d*o))),{width:c,height:d}}function Hd(t,e,i){const o=e||1,a=Od(t.height*o),n=Od(t.width*o);t.height=Od(t.height),t.width=Od(t.width);const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==o||s.height!==a||s.width!==n)&&(t.currentDevicePixelRatio=o,s.height=a,s.width=n,t.ctx.setTransform(o,0,0,o,0,0),!0)}const Id=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Dd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Rd(t,e){const i=function(t,e){return Pd(t).getPropertyValue(e)}(t,e),o=i&&i.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Fd(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Nd(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:"middle"===o?i<.5?t.y:e.y:"after"===o?i<1?t.y:e.y:i>0?e.y:t.y}}function jd(t,e,i,o){const a={x:t.cp2x,y:t.cp2y},n={x:e.cp1x,y:e.cp1y},s=Fd(t,a,i),r=Fd(a,n,i),l=Fd(n,e,i),c=Fd(s,r,i),d=Fd(r,l,i);return Fd(c,d,i)}function Wd(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Bd(t,e){let i,o;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,o=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Ud(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Yd(t){return"angle"===t?{between:tc,compare:Ql,normalize:Jl}:{between:ic,compare:(t,e)=>t-e,normalize:t=>t}}function qd({start:t,end:e,count:i,loop:o,style:a}){return{start:t%i,end:e%i,loop:o&&(e-t+1)%i==0,style:a}}function Zd(t,e,i){if(!i)return[t];const{property:o,start:a,end:n}=i,s=e.length,{compare:r,between:l,normalize:c}=Yd(o),{start:d,end:h,loop:u,style:p}=function(t,e,i){const{property:o,start:a,end:n}=i,{between:s,normalize:r}=Yd(o),l=e.length;let c,d,{start:h,end:u,loop:p}=t;if(p){for(h+=l,u+=l,c=0,d=l;cb||l(a,g,_)&&0!==r(a,g),w=()=>!b||0===r(n,_)||l(n,g,_);for(let t=d,i=d;t<=h;++t)f=e[t%s],f.skip||(_=c(f[o]),_!==g&&(b=l(_,a,n),null===v&&y()&&(v=0===r(_,a)?t:i),null!==v&&w()&&(m.push(qd({start:v,end:t,loop:u,count:s,style:p})),v=null),i=t,g=_));return null!==v&&m.push(qd({start:v,end:h,loop:u,count:s,style:p})),m}function Xd(t,e){const i=[],o=t.segments;for(let a=0;ao({chart:t,initial:e.initial,numSteps:n,currentStep:Math.min(i-e.start,n)})))}_refresh(){this._request||(this._running=!0,this._request=cc.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,o)=>{if(!i.running||!i.items.length)return;const a=i.items;let n,s=a.length-1,r=!1;for(;s>=0;--s)n=a[s],n._active?(n._total>i.duration&&(i.duration=n._total),n.tick(t),r=!0):(a[s]=a[a.length-1],a.pop());r&&(o.draw(),this._notify(o,i,t,"progress")),a.length||(i.running=!1,this._notify(o,i,t,"complete"),i.initial=!1),e+=a.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let o=i.length-1;for(;o>=0;--o)i[o].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ih=new eh;const oh="transparent",ah={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const o=yc(t||oh),a=o.valid&&yc(e||oh);return a&&a.valid?a.mix(o,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class nh{constructor(t,e,i,o){const a=e[i];o=ad([t.to,o,a,t.from]);const n=ad([t.from,a,o]);this._active=!0,this._fn=t.fn||ah[t.type||typeof n],this._easing=bc[t.easing]||bc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=n,this._to=o,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const o=this._target[this._prop],a=i-this._start,n=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=ad([t.to,e,o,t.from]),this._from=ad([t.from,o,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,o=this._prop,a=this._from,n=this._loop,s=this._to;let r;if(this._active=a!==s&&(n||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[o]=this._fn(a,s,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t{const a=t[o];if(!pl(a))return;const n={};for(const t of e)n[t]=a[t];(ul(a.properties)&&a.properties||[o]).forEach((t=>{t!==o&&i.has(t)||i.set(t,n)}))}))}_animateOptions(t,e){const i=e.options,o=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!o)return[];const a=this._createAnimations(o,i);return i.$shared&&function(t,e){const i=[],o=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),a}_createAnimations(t,e){const i=this._properties,o=[],a=t.$animations||(t.$animations={}),n=Object.keys(e),s=Date.now();let r;for(r=n.length-1;r>=0;--r){const l=n[r];if("$"===l.charAt(0))continue;if("options"===l){o.push(...this._animateOptions(t,e));continue}const c=e[l];let d=a[l];const h=i.get(l);if(d){if(h&&d.active()){d.update(h,c,s);continue}d.cancel()}h&&h.duration?(a[l]=d=new nh(h,t,l,c),o.push(d)):t[l]=c}return o}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ih.add(this._chart,i),!0):void 0}}function rh(t,e){const i=t&&t.options||{},o=i.reverse,a=void 0===i.min?e:0,n=void 0===i.max?e:0;return{start:o?n:a,end:o?a:n}}function lh(t,e){const i=[],o=t._getSortedDatasetMetas(e);let a,n;for(a=0,n=o.length;a0||!i&&e<0)return a.index}return null}function ph(t,e){const{chart:i,_cachedMeta:o}=t,a=i._stacks||(i._stacks={}),{iScale:n,vScale:s,index:r}=o,l=n.axis,c=s.axis,d=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(n,s,o),h=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function _h(t,e){const i=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[o]||void 0===e[o][i])return;delete e[o][i],void 0!==e[o]._visualValues&&void 0!==e[o]._visualValues[i]&&delete e[o]._visualValues[i]}}}const fh=t=>"reset"===t||"none"===t,gh=(t,e)=>e?t:Object.assign({},t);class bh{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=dh(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&_h(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),o=(t,e,i,o)=>"x"===t?e:"r"===t?o:i,a=e.xAxisID=fl(i.xAxisID,mh(t,"x")),n=e.yAxisID=fl(i.yAxisID,mh(t,"y")),s=e.rAxisID=fl(i.rAxisID,mh(t,"r")),r=e.indexAxis,l=e.iAxisID=o(r,a,n,s),c=e.vAxisID=o(r,n,a,s);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&rc(this._data,this),t._stacked&&_h(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(pl(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:o}=e,a="x"===i.axis?"x":"y",n="x"===o.axis?"x":"y",s=Object.keys(t),r=new Array(s.length);let l,c,d;for(l=0,c=s.length;l{const i="_onData"+Al(e),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const a=o.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),a}})})))}(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let o=!1;this._dataCheck();const a=e._stacked;e._stacked=dh(e.vScale,e),e.stack!==i.stack&&(o=!0,_h(e),e.stack=i.stack),this._resyncElements(t),(o||a!==e._stacked)&&(ph(this,e._parsed),e._stacked=dh(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:o}=this,{iScale:a,_stacked:n}=i,s=a.axis;let r,l,c,d=0===t&&e===o.length||i._sorted,h=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=o,i._sorted=!0,c=o;else{c=ul(o[t])?this.parseArrayData(i,o,t,e):pl(o[t])?this.parseObjectData(i,o,t,e):this.parsePrimitiveData(i,o,t,e);const a=()=>null===l[s]||h&&l[s]t&&!e.hidden&&e._stacked&&{keys:lh(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:i,minDefined:o,maxDefined:a}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:a?i:Number.POSITIVE_INFINITY}}(s);let h,u;function p(){u=o[h];const e=u[s.axis];return!ml(u[t.axis])||c>e||d=0;--h)if(!p()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let o,a,n;for(o=0,a=e.length;o=0&&tthis.getContext(i,o,e)),d);return p.$shared&&(p.$shared=r,a[n]=Object.freeze(gh(p,r))),p}_resolveAnimations(t,e,i){const o=this.chart,a=this._cachedDataOpts,n=`animation-${e}`,s=a[n];if(s)return s;let r;if(!1!==o.options.animation){const o=this.chart.config,a=o.datasetAnimationScopeKeys(this._type,e),n=o.getOptionScopes(this.getDataset(),a);r=o.createResolver(n,this.getContext(t,i,e))}const l=new sh(o,r&&r.animations);return r&&r._cacheable&&(a[n]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||fh(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),o=this._sharedOptions,a=this.getSharedOptions(i),n=this.includeOptions(e,a)||a!==o;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:n}}updateElement(t,e,i,o){fh(o)?Object.assign(t,i):this._resolveAnimations(e,o).update(t,i)}updateSharedOptions(t,e,i){t&&!fh(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,o){t.active=o;const a=this.getStyle(e,o);this._resolveAnimations(e,i,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const o=i.length,a=e.length,n=Math.min(a,o);n&&this.parse(0,n),a>o?this._insertElements(o,a-o,t):a{for(t.length+=e,s=t.length-1;s>=n;s--)t[s]=t[s-e]};for(r(a),s=t;st-e)))}return t._cache.$bar}(e,t.type);let o,a,n,s,r=e._length;const l=()=>{32767!==n&&-32768!==n&&(Pl(s)&&(r=Math.min(r,Math.abs(n-s)||r)),s=n)};for(o=0,a=i.length;oMath.abs(r)&&(l=r,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:a,end:n,min:s,max:r}}(t,e,i,o):e[i.axis]=i.parse(t,o),e}function wh(t,e,i,o){const a=t.iScale,n=t.vScale,s=a.getLabels(),r=a===n,l=[];let c,d,h,u;for(c=i,d=i+o;ct.x,i="left",o="right"):(e=t.baset.controller.options.grouped)),a=i.options.stacked,n=[],s=this._cachedMeta.controller.getParsed(e),r=s&&s[i.axis],l=t=>{const e=t._parsed.find((t=>t[i.axis]===r)),o=e&&e[t.vScale.axis];if(hl(o)||isNaN(o))return!0};for(const i of o)if((void 0===e||!l(i))&&((!1===a||-1===n.indexOf(i.stack)||void 0===a&&void 0===i.stack)&&n.push(i.stack),i.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter((i=>t[i].axis===e)).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[fl("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const o=this._getStacks(t,i),a=void 0!==e?o.indexOf(e):-1;return-1===a?o.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,o=[];let a,n;for(a=0,n=e.data.length;a=i?1:-1)}(h,e,s)*n,u===s&&(f-=h/2);const t=e.getPixelForDecimal(0),a=e.getPixelForDecimal(1),l=Math.min(t,a),p=Math.max(t,a);f=Math.max(Math.min(f,p),l),d=f+h,i&&!c&&(r._stacks[e.axis]._visualValues[o]=e.getValueForPixel(d)-e.getValueForPixel(f))}if(f===e.getPixelForValue(s)){const t=jl(h)*e.getLineWidthForValue(s)/2;f+=t,h-=t}return{size:h,base:f,head:d,center:d+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,o=this.options,a=o.skipNull,n=fl(o.maxBarThickness,1/0);let s,r;const l=this._getAxisCount();if(e.grouped){const i=a?this._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,o){const a=e.pixels,n=a[t];let s=t>0?a[t-1]:null,r=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:o,yScale:a}=e,n=this.getParsed(t),s=o.getLabelForValue(n.x),r=a.getLabelForValue(n.y),l=n._custom;return{label:i[t]||"",value:"("+s+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,o){const a="reset"===o,{iScale:n,vScale:s}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,o),c=n.axis,d=s.axis;for(let h=e;h"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:o,color:a,useBorderRadius:n,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map(((e,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(r),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:o,pointStyle:i,borderRadius:n&&(s||l.borderRadius),index:r}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,o=this._cachedMeta;if(!1===this._parsing)o._parsed=i;else{let a,n,s=t=>+i[t];if(pl(i[t])){const{key:t="value"}=this._parsing;s=e=>+Cl(i[e],t)}for(a=t,n=t+e;atc(t,r,l,!0)?1:Math.max(e,e*i,o,o*i),m=(t,e,o)=>tc(t,r,l,!0)?-1:Math.min(e,e*i,o,o*i),_=p(0,c,h),f=p(Il,d,u),g=m($l,c,h),b=m($l+Il,d,u);o=(_-g)/2,a=(f-b)/2,n=-(_+g)/2,s=-(f+b)/2}return{ratioX:o,ratioY:a,offsetX:n,offsetY:s}}(u,h,r),g=(i.width-n)/p,b=(i.height-n)/m,v=Math.max(Math.min(g,b)/2,0),y=gl(this.options.radius,v),w=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=_*y,this.offsetY=f*y,o.total=this.calculateTotal(),this.outerRadius=y-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*d,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,o=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*a/zl)}updateElements(t,e,i,o){const a="reset"===o,n=this.chart,s=n.chartArea,r=n.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=a&&r.animateScale,h=d?0:this.innerRadius,u=d?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(e,o);let _,f=this._getRotation();for(_=0;_0&&!isNaN(t)?zl*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,o=i.data.labels||[],a=Tc(e._parsed[t],i.options.locale);return{label:o[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let o,a,n,s,r;if(!t)for(o=0,a=i.data.datasets.length;o0&&this.getParsed(e-1);for(let i=0;i=g){b.skip=!0;continue}const y=this.getParsed(i),w=hl(y[u]),x=b[h]=n.getPixelForValue(y[h],i),k=b[u]=a||w?s.getBasePixel():s.getPixelForValue(r?this.applyStack(s,y,r):y[u],i);b.skip=isNaN(x)||isNaN(k)||w,b.stop=i>0&&Math.abs(y[h]-v[h])>_,m&&(b.parsed=y,b.raw=l.data[i]),d&&(b.options=c||this.resolveDataElementOptions(i,p.active?"active":o)),f||this.updateElement(p,i,b,o),v=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,o=t.data||[];if(!o.length)return i;const a=o[0].size(this.resolveDataElementOptions(0)),n=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(i,a,n)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class Eh extends bh{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:o}}=t.legend.options;return e.labels.map(((e,a)=>{const n=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,fontColor:o,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,o=i.data.labels||[],a=Tc(e._parsed[t].r,i.options.locale);return{label:o[t]||"",value:a}}parseObjectData(t,e,i,o){return vd.bind(this)(t,e,i,o)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(oe.max&&(e.max=o))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,o=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(o/2,0),n=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-n*this.index,this.innerRadius=this.outerRadius-n}updateElements(t,e,i,o){const a="reset"===o,n=this.chart,s=n.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,c=r.yCenter,d=r.getIndexAngle(0)-.5*$l;let h,u=d;const p=360/this.countVisibleElements();for(h=0;h{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?ql(this.resolveDataElementOptions(t,e).angle||i):0}}class Lh extends Ah{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class $h extends bh{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,o){return vd.bind(this)(t,e,i,o)}update(t){const e=this._cachedMeta,i=e.dataset,o=e.data||[],a=e.iScale.getLabels();if(i.points=o,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const n={_loop:!0,_fullLoop:a.length===o.length,options:e};this.updateElement(i,void 0,n,t)}this.updateElements(o,0,o.length,t)}updateElements(t,e,i,o){const a=this._cachedMeta.rScale,n="reset"===o;for(let s=e;s0&&this.getParsed(e-1);for(let c=e;c0&&Math.abs(i[u]-b[u])>f,_&&(m.parsed=i,m.raw=l.data[c]),h&&(m.options=d||this.resolveDataElementOptions(c,e.active?"active":o)),g||this.updateElement(e,c,m,o),b=i}this.updateSharedOptions(d,o,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,o=i.options&&i.options.borderWidth||0;if(!e.length)return o;const a=e[0].size(this.resolveDataElementOptions(0)),n=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,a,n)/2}}var Oh=Object.freeze({__proto__:null,BarController:Dh,BubbleController:Ch,DoughnutController:Ah,LineController:Ph,PieController:Lh,PolarAreaController:Eh,RadarController:$h,ScatterController:zh});function Vh(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Hh{static override(t){Object.assign(Hh.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Vh()}parse(){return Vh()}format(){return Vh()}add(){return Vh()}diff(){return Vh()}startOf(){return Vh()}endOf(){return Vh()}}var Ih={_date:Hh};function Rh(t,e,i,o){const{controller:a,data:n,_sorted:s}=t,r=a._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&"r"!==e&&s&&n.length){const s=r._reversePixels?nc:ac;if(!o){const o=s(n,e,i);if(l){const{vScale:e}=a._cachedMeta,{_parsed:i}=t,n=i.slice(0,o.lo+1).reverse().findIndex((t=>!hl(t[e.axis])));o.lo-=Math.max(0,n);const s=i.slice(o.hi).findIndex((t=>!hl(t[e.axis])));o.hi+=Math.max(0,s)}return o}if(a._sharedOptions){const t=n[0],o="function"==typeof t.getRange&&t.getRange(e);if(o){const t=s(n,e,i-o),a=s(n,e,i+o);return{lo:t.lo,hi:a.hi}}}}return{lo:0,hi:n.length-1}}function Fh(t,e,i,o,a){const n=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=n.length;t{t[s]&&t[s](e[i],a)&&(n.push({element:t,datasetIndex:o,index:l}),r=r||t.inRange(e.x,e.y,a))})),o&&!r?[]:n}var Uh={evaluateInteractionItems:Fh,modes:{index(t,e,i,o){const a=zd(e,t),n=i.axis||"x",s=i.includeInvisible||!1,r=i.intersect?Nh(t,a,n,o,s):Wh(t,a,n,!1,o,s),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,o){const a=zd(e,t),n=i.axis||"xy",s=i.includeInvisible||!1;let r=i.intersect?Nh(t,a,n,o,s):Wh(t,a,n,!1,o,s);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tNh(t,zd(e,t),i.axis||"xy",o,i.includeInvisible||!1),nearest(t,e,i,o){const a=zd(e,t),n=i.axis||"xy",s=i.includeInvisible||!1;return Wh(t,a,n,i.intersect,o,s)},x:(t,e,i,o)=>Bh(t,zd(e,t),"x",i.intersect,o),y:(t,e,i,o)=>Bh(t,zd(e,t),"y",i.intersect,o)}};const Yh=["left","top","right","bottom"];function qh(t,e){return t.filter((t=>t.pos===e))}function Zh(t,e){return t.filter((t=>-1===Yh.indexOf(t.pos)&&t.box.axis===e))}function Xh(t,e){return t.sort(((t,i)=>{const o=e?i:t,a=e?t:i;return o.weight===a.weight?o.index-a.index:o.weight-a.weight}))}function Kh(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:o,stackWeight:a}=i;if(!t||!Yh.includes(o))continue;const n=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});n.count++,n.weight+=a}return e}(t),{vBoxMaxWidth:o,hBoxMaxHeight:a}=e;let n,s,r;for(n=0,s=t.length;n{o[t]=Math.max(e[t],i[t])})),o}return o(t?["left","right"]:["top","bottom"])}function eu(t,e,i,o){const a=[];let n,s,r,l,c,d;for(n=0,s=t.length,c=0;nt.box.fullSize)),!0),o=Xh(qh(e,"left"),!0),a=Xh(qh(e,"right")),n=Xh(qh(e,"top"),!0),s=Xh(qh(e,"bottom")),r=Zh(e,"x"),l=Zh(e,"y");return{fullSize:i,leftAndTop:o.concat(n),rightAndBottom:a.concat(l).concat(s).concat(r),chartArea:qh(e,"chartArea"),vertical:o.concat(a).concat(l),horizontal:n.concat(s).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;vl(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const d=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,h=Object.freeze({outerWidth:e,outerHeight:i,padding:a,availableWidth:n,availableHeight:s,vBoxMaxWidth:n/2/d,hBoxMaxHeight:s/2}),u=Object.assign({},a);Qh(u,id(o));const p=Object.assign({maxPadding:u,w:n,h:s,x:a.left,y:a.top},a),m=Kh(l.concat(c),h);eu(r.fullSize,p,h,m),eu(l,p,h,m),eu(c,p,h,m)&&eu(l,p,h,m),function(t){const e=t.maxPadding;function i(i){const o=Math.max(e[i]-t[i],0);return t[i]+=o,o}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),ou(r.leftAndTop,p,h,m),p.x+=p.w,p.y+=p.h,ou(r.rightAndBottom,p,h,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},vl(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class nu{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,o){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,o?Math.floor(e/o):i)}}isAttached(t){return!0}updateConfig(t){}}class su extends nu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ru="$chartjs",lu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cu=t=>null===t||""===t;const du=!!Id&&{passive:!0};function hu(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,du)}function uu(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function pu(t,e,i){const o=t.canvas,a=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||uu(i.addedNodes,o),e=e&&!uu(i.removedNodes,o);e&&i()}));return a.observe(document,{childList:!0,subtree:!0}),a}function mu(t,e,i){const o=t.canvas,a=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||uu(i.removedNodes,o),e=e&&!uu(i.addedNodes,o);e&&i()}));return a.observe(document,{childList:!0,subtree:!0}),a}const _u=new Map;let fu=0;function gu(){const t=window.devicePixelRatio;t!==fu&&(fu=t,_u.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function bu(t,e,i){const o=t.canvas,a=o&&Cd(o);if(!a)return;const n=dc(((t,e)=>{const o=a.clientWidth;i(t,e),o{const e=t[0],i=e.contentRect.width,o=e.contentRect.height;0===i&&0===o||n(i,o)}));return s.observe(a),function(t,e){_u.size||window.addEventListener("resize",gu),_u.set(t,e)}(t,n),s}function vu(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){_u.delete(t),_u.size||window.removeEventListener("resize",gu)}(t)}function yu(t,e,i){const o=t.canvas,a=dc((e=>{null!==t.ctx&&i(function(t,e){const i=lu[t.type]||t.type,{x:o,y:a}=zd(t,e);return{type:i,chart:e,native:t,x:void 0!==o?o:null,y:void 0!==a?a:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,du)}(o,e,a),a}class wu extends nu{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,o=t.getAttribute("height"),a=t.getAttribute("width");if(t[ru]={initial:{height:o,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",cu(a)){const e=Rd(t,"width");void 0!==e&&(t.width=e)}if(cu(o))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Rd(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[ru])return!1;const i=e[ru].initial;["height","width"].forEach((t=>{const o=i[t];hl(o)?e.removeAttribute(t):e.setAttribute(t,o)}));const o=i.style||{};return Object.keys(o).forEach((t=>{e.style[t]=o[t]})),e.width=e.width,delete e[ru],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const o=t.$proxies||(t.$proxies={}),a={attach:pu,detach:mu,resize:bu}[e]||yu;o[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),o=i[e];if(!o)return;({attach:vu,detach:vu,resize:vu}[e]||hu)(t,e,o),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,o){return Vd(t,e,i,o)}isAttached(t){const e=t&&Cd(t);return!(!e||!e.isConnected)}}function xu(t){return!Dd()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?su:wu}class ku{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Ul(this.x)&&Ul(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const o={};return t.forEach((t=>{o[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),o}}function Su(t,e){const i=t.options.ticks,o=function(t){const e=t.options.offset,i=t._tickSize(),o=t._length/i+(e?0:1),a=t._maxLength/i;return Math.floor(Math.min(o,a))}(t),a=Math.min(i.maxTicksLimit||o,o),n=i.major.enabled?function(t){const e=[];let i,o;for(i=0,o=t.length;ia)return function(t,e,i,o){let a,n=0,s=i[0];for(o=Math.ceil(o),a=0;at-e)).pop(),e}(o);for(let t=0,e=n.length-1;ta)return e}return Math.max(a,1)}(n,e,a);if(s>0){let t,i;const o=s>1?Math.round((l-r)/(s-1)):null;for(Tu(e,c,d,hl(o)?0:r-o,r),t=0,i=s-1;t"top"===e||"left"===e?t[e]+i:t[e]-i,Du=(t,e)=>Math.min(e||t,t);function Cu(t,e){const i=[],o=t.length/e,a=t.length;let n=0;for(;ns+r)))return c}function Pu(t){return t.drawTicks?t.tickLength:0}function Eu(t,e){if(!t.display)return 0;const i=od(t.font,e),o=id(t.padding);return(ul(t.text)?t.text.length:1)*i.lineHeight+o.height}function Lu(t,e,i){let o=hc(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class $u extends ku{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:o}=this;return t=_l(t,Number.POSITIVE_INFINITY),e=_l(e,Number.NEGATIVE_INFINITY),i=_l(i,Number.POSITIVE_INFINITY),o=_l(o,Number.NEGATIVE_INFINITY),{min:_l(t,i),max:_l(e,o),minDefined:ml(t),maxDefined:ml(e)}}getMinMax(t){let e,{min:i,max:o,minDefined:a,maxDefined:n}=this.getUserBounds();if(a&&n)return{min:i,max:o};const s=this.getMatchingVisibleMetas();for(let r=0,l=s.length;ro?o:i,o=a&&i>o?i:o,{min:_l(i,_l(o,i)),max:_l(o,_l(i,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){bl(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:o,grace:a,ticks:n}=this.options,s=n.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:o,max:a}=t,n=gl(e,(a-o)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(o,-Math.abs(n)),max:s(a,n)}}(this,a,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=s=a||i<=1||!this.isHorizontal())return void(this.labelRotation=o);const c=this._getLabelSizes(),d=c.widest.width,h=c.highest.height,u=ec(this.chart.width-d,0,this.maxWidth);n=t.offset?this.maxWidth/i:u/(i-1),d+6>n&&(n=u/(i-(t.offset?.5:1)),s=this.maxHeight-Pu(t.grid)-e.padding-Eu(t.title,this.chart.options.font),r=Math.sqrt(d*d+h*h),l=Zl(Math.min(Math.asin(ec((c.highest.height+6)/n,-1,1)),Math.asin(ec(s/r,-1,1))-Math.asin(ec(h/r,-1,1)))),l=Math.max(o,Math.min(a,l))),this.labelRotation=l}afterCalculateLabelRotation(){bl(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){bl(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:o,grid:a}}=this,n=this._isVisible(),s=this.isHorizontal();if(n){const n=Eu(o,e.options.font);if(s?(t.width=this.maxWidth,t.height=Pu(a)+n):(t.height=this.maxHeight,t.width=Pu(a)+n),i.display&&this.ticks.length){const{first:e,last:o,widest:a,highest:n}=this._getLabelSizes(),r=2*i.padding,l=ql(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(s){const e=i.mirror?0:d*a.width+c*n.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:c*a.width+d*n.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,o,d,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,o){const{ticks:{align:a,padding:n},position:s}=this.options,r=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;r?l?(d=o*t.width,h=i*e.height):(d=i*t.height,h=o*e.width):"start"===a?h=e.width:"end"===a?d=t.width:"inner"!==a&&(d=t.width/2,h=e.width/2),this.paddingLeft=Math.max((d-s+n)*this.width/(this.width-s),0),this.paddingRight=Math.max((h-c+n)*this.width/(this.width-c),0)}else{let i=e.height/2,o=t.height/2;"start"===a?(i=0,o=t.height):"end"===a&&(i=e.height,o=0),this.paddingTop=i+n,this.paddingBottom=o+n}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){bl(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,o=i.length/2;let a;if(o>e){for(a=0;a({width:n[t]||0,height:s[t]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(x),widths:n,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ec(this._alignToPixels?Vc(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*o?s/i:r/o:r*o0}_computeGridLineItems(t){const e=this.axis,i=this.chart,o=this.options,{grid:a,position:n,border:s}=o,r=a.offset,l=this.isHorizontal(),c=this.ticks.length+(r?1:0),d=Pu(a),h=[],u=s.setContext(this.getContext()),p=u.display?u.width:0,m=p/2,_=function(t){return Vc(i,t,p)};let f,g,b,v,y,w,x,k,S,T,M,D;if("top"===n)f=_(this.bottom),w=this.bottom-d,k=f-m,T=_(t.top)+m,D=t.bottom;else if("bottom"===n)f=_(this.top),T=t.top,D=_(t.bottom)-m,w=f+m,k=this.top+d;else if("left"===n)f=_(this.right),y=this.right-d,x=f-m,S=_(t.left)+m,M=t.right;else if("right"===n)f=_(this.left),S=t.left,M=_(t.right)-m,y=f+m,x=this.left+d;else if("x"===e){if("center"===n)f=_((t.top+t.bottom)/2+.5);else if(pl(n)){const t=Object.keys(n)[0],e=n[t];f=_(this.chart.scales[t].getPixelForValue(e))}T=t.top,D=t.bottom,w=f+m,k=w+d}else if("y"===e){if("center"===n)f=_((t.left+t.right)/2);else if(pl(n)){const t=Object.keys(n)[0],e=n[t];f=_(this.chart.scales[t].getPixelForValue(e))}y=f-m,x=y-d,S=t.left,M=t.right}const C=fl(o.ticks.maxTicksLimit,c),A=Math.max(1,Math.ceil(c/C));for(g=0;g0&&(n-=o/2)}h={left:n,top:a,width:o+e.width,height:i+e.height,color:t.backdropColor}}_.push({label:v,font:S,textOffset:D,options:{rotation:m,color:i,strokeColor:r,strokeWidth:c,textAlign:u,textBaseline:C,translation:[y,w],backdrop:h}})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ql(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:o,padding:a}}=this.options,n=t+a,s=this._getLabelSizes().widest.width;let r,l;return"left"===e?o?(l=this.right+a,"near"===i?r="left":"center"===i?(r="center",l+=s/2):(r="right",l+=s)):(l=this.right-n,"near"===i?r="right":"center"===i?(r="center",l-=s/2):(r="left",l=this.left)):"right"===e?o?(l=this.left+a,"near"===i?r="right":"center"===i?(r="center",l-=s/2):(r="left",l-=s)):(l=this.left+n,"near"===i?r="left":"center"===i?(r="center",l+=s/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:o,width:a,height:n}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,o,a,n),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,n;const s=(t,e,o)=>{o.width&&o.color&&(i.save(),i.lineWidth=o.width,i.strokeStyle=o.color,i.setLineDash(o.borderDash||[]),i.lineDashOffset=o.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(a=0,n=o.length;a{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[];let a,n;for(a=0,n=e.length;a{const o=i.split("."),a=o.pop(),n=[t].concat(o).join("."),s=e[i].split("."),r=s.pop(),l=s.join(".");$c.route(n,a,l,r)}))}(e,t.defaultRoutes);t.descriptors&&$c.describe(e,t.descriptors)}(t,n,i),this.override&&$c.override(t.id,t.overrides)),n}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,o=this.scope;i in e&&delete e[i],o&&i in $c[o]&&(delete $c[o][i],this.override&&delete Cc[i])}}class Ou{constructor(){this.controllers=new zu(bh,"datasets",!0),this.elements=new zu(ku,"elements"),this.plugins=new zu(Object,"plugins"),this.scales=new zu($u,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const o=i||this._getRegistryForType(e);i||o.isForType(e)||o===this.plugins&&e.id?this._exec(t,o,e):vl(e,(e=>{const o=i||this._getRegistryForType(e);this._exec(t,o,e)}))}))}_exec(t,e,i){const o=Al(t);bl(i["before"+o],[],i),e[t](i),bl(i["after"+o],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(o(e,i),t,"stop"),this._notify(o(i,e),t,"start")}}function Iu(t,e){return e||!1!==t?!0===t?{}:t:null}function Ru(t,{plugin:e,local:i},o,a){const n=t.pluginScopeKeys(e),s=t.getOptionScopes(o,n);return i&&e.defaults&&s.push(e.defaults),t.createResolver(s,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Fu(t,e){const i=$c.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Nu(t){if("x"===t||"y"===t||"r"===t)return t}function ju(t,...e){if(Nu(t))return t;for(const o of e){const e=o.axis||("top"===(i=o.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&Nu(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Wu(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Bu(t,e){const i=Cc[t.type]||{scales:{}},o=e.scales||{},a=Fu(t.type,e),n=Object.create(null);return Object.keys(o).forEach((e=>{const s=o[e];if(!pl(s))return console.error(`Invalid scale configuration for scale: ${e}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=ju(e,s,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Wu(t,"x",i[0])||Wu(t,"y",i[0])}return{}}(e,t),$c.scales[s.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,a),c=i.scales||{};n[e]=Tl(Object.create(null),[{axis:r},s,c[r],c[l]])})),t.data.datasets.forEach((i=>{const a=i.type||t.type,s=i.indexAxis||Fu(a,e),r=(Cc[a]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,s),a=i[e+"AxisID"]||e;n[a]=n[a]||Object.create(null),Tl(n[a],[{axis:e},o[a],r[t]])}))})),Object.keys(n).forEach((t=>{const e=n[t];Tl(e,[$c.scales[e.type],$c.scale])})),n}function Uu(t){const e=t.options||(t.options={});e.plugins=fl(e.plugins,{}),e.scales=Bu(t,e)}function Yu(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const qu=new Map,Zu=new Set;function Xu(t,e){let i=qu.get(t);return i||(i=e(),qu.set(t,i),Zu.add(i)),i}const Ku=(t,e,i)=>{const o=Cl(e,i);void 0!==o&&t.add(o)};class Gu{constructor(t){this._config=function(t){return(t=t||{}).data=Yu(t.data),Uu(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Yu(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Uu(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Xu(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Xu(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Xu(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Xu(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let o=i.get(t);return o&&!e||(o=new Map,i.set(t,o)),o}getOptionScopes(t,e,i){const{options:o,type:a}=this,n=this._cachedScopes(t,i),s=n.get(e);if(s)return s;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Ku(r,t,e)))),e.forEach((t=>Ku(r,o,t))),e.forEach((t=>Ku(r,Cc[a]||{},t))),e.forEach((t=>Ku(r,$c,t))),e.forEach((t=>Ku(r,Ac,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Zu.has(e)&&n.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Cc[e]||{},$c.datasets[e]||{},{type:e},$c,Ac]}resolveNamedOptions(t,e,i,o=[""]){const a={$shared:!0},{resolver:n,subPrefixes:s}=Qu(this._resolverCache,t,o);let r=n;if(function(t,e){const{isScriptable:i,isIndexable:o}=ld(t);for(const a of e){const e=i(a),n=o(a),s=(n||e)&&t[a];if(e&&(El(s)||Ju(s))||n&&ul(s))return!0}return!1}(n,e)){a.$shared=!1;r=rd(n,i=El(i)?i():i,this.createResolver(t,i,s))}for(const t of e)a[t]=r[t];return a}createResolver(t,e,i=[""],o){const{resolver:a}=Qu(this._resolverCache,t,i);return pl(e)?rd(a,e,void 0,o):a}}function Qu(t,e,i){let o=t.get(e);o||(o=new Map,t.set(e,o));const a=i.join();let n=o.get(a);if(!n){n={resolver:sd(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},o.set(a,n)}return n}const Ju=t=>pl(t)&&Object.getOwnPropertyNames(t).some((e=>El(t[e])));const tp=["top","bottom","left","right","chartArea"];function ep(t,e){return"top"===t||"bottom"===t||-1===tp.indexOf(t)&&"x"===e}function ip(t,e){return function(i,o){return i[t]===o[t]?i[e]-o[e]:i[t]-o[t]}}function op(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),bl(i&&i.onComplete,[t],e)}function ap(t){const e=t.chart,i=e.options.animation;bl(i&&i.onProgress,[t],e)}function np(t){return Dd()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const sp={},rp=t=>{const e=np(t);return Object.values(sp).filter((t=>t.canvas===e)).pop()};function lp(t,e,i){const o=Object.keys(t);for(const a of o){const o=+a;if(o>=e){const n=t[a];delete t[a],(i>0||o>e)&&(t[o+i]=n)}}}class cp{static defaults=$c;static instances=sp;static overrides=Cc;static registry=Vu;static version="4.5.1";static getChart=rp;static register(...t){Vu.add(...t),dp()}static unregister(...t){Vu.remove(...t),dp()}constructor(t,e){const i=this.config=new Gu(e),o=np(t),a=rp(o);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const n=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||xu(o)),this.platform.updateConfig(i);const s=this.platform.acquireContext(o,n.aspectRatio),r=s&&s.canvas,l=r&&r.height,c=r&&r.width;this.id=dl(),this.ctx=s,this.canvas=r,this.width=c,this.height=l,this._options=n,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Hu,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...o){return e?(clearTimeout(i),i=setTimeout(t,e,o)):t.apply(this,o),e}}((t=>this.update(t)),n.resizeDelay||0),this._dataChanges=[],sp[this.id]=this,s&&r?(ih.listen(this,"complete",op),ih.listen(this,"progress",ap),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:o,_aspectRatio:a}=this;return hl(t)?e&&a?a:o?i/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Vu}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hd(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Hc(this.canvas,this.ctx),this}stop(){return ih.stop(this),this}resize(t,e){ih.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,o=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,n=this.platform.getMaximumSize(o,t,e,a),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,Hd(this,s,!0)&&(this.notifyPlugins("resize",{size:n}),bl(i.onResize,[this,n],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){vl(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,o=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let a=[];e&&(a=a.concat(Object.keys(e).map((t=>{const i=e[t],o=ju(t,i),a="r"===o,n="x"===o;return{options:i,dposition:a?"chartArea":n?"bottom":"left",dtype:a?"radialLinear":n?"category":"linear"}})))),vl(a,(e=>{const a=e.options,n=a.id,s=ju(n,a),r=fl(a.type,e.dtype);void 0!==a.position&&ep(a.position,s)===ep(e.dposition)||(a.position=e.dposition),o[n]=!0;let l=null;if(n in i&&i[n].type===r)l=i[n];else{l=new(Vu.getScale(r))({id:n,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(a,t)})),vl(o,((t,e)=>{t||delete i[e]})),vl(i,(t=>{au.configure(this,t,t.options),au.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,o;for(this._removeUnreferencedMetasets(),i=0,o=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ip("z","_idx"));const{_active:s,_lastEvent:r}=this;r?this._eventHandler(r,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){vl(this.scales,(t=>{au.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Ll(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:o,count:a}of e){lp(t,o,"_removeElements"===i?-a:a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),o=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;au.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],vl(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},o=th(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(o&&Nc(e,o),t.controller.draw(),o&&jc(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Fc(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,o){const a=Uh.modes[e];return"function"==typeof a?a(this,t,i,o):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let o=i.filter((t=>t&&t._dataset===e)).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(o)),o}getContext(){return this.$context||(this.$context=nd(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const o=i?"show":"hide",a=this.getDatasetMeta(t),n=a.controller._resolveAnimations(void 0,o);Pl(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(a,{visible:i}),this.update((e=>e.datasetIndex===t?o:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ih.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,o),t[i]=o},o=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};vl(this.options.events,(t=>i(t,o)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,o)=>{e.addEventListener(this,i,o),t[i]=o},o=(i,o)=>{t[i]&&(e.removeEventListener(this,i,o),delete t[i])},a=(t,e)=>{this.canvas&&this.resize(t,e)};let n;const s=()=>{o("attach",s),this.attached=!0,this.resize(),i("resize",a),i("detach",n)};n=()=>{this.attached=!1,o("resize",a),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():n()}unbindEvents(){vl(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},vl(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const o=i?"set":"remove";let a,n,s,r;for("dataset"===e&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),s=0,r=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!yl(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const o=this.options.hover,a=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),n=a(e,t),s=i?t:a(t,e);n.length&&this.updateHoverStyle(n,o.mode,!1),s.length&&o.mode&&this.updateHoverStyle(s,o.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},o=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,o))return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,o),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:o=[],options:a}=this,n=e,s=this._getActiveElements(t,o,i,n),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,o){return i&&"mouseout"!==t.type?o?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,bl(a.onHover,[t,s,this],this),r&&bl(a.onClick,[t,s,this],this));const c=!yl(s,o);return(c||e)&&(this._active=s,this._updateHoverStyles(s,o,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,o){if("mouseout"===t.type)return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}function dp(){return vl(cp.instances,(t=>t._plugins.invalidate()))}function hp(t,e,i,o){const a=Jc(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const n=(i-e)/2,s=Math.min(n,o*e/2),r=t=>{const e=(i-Math.min(n,t))*o/2;return ec(t,0,Math.min(n,e))};return{outerStart:r(a.outerStart),outerEnd:r(a.outerEnd),innerStart:ec(a.innerStart,0,s),innerEnd:ec(a.innerEnd,0,s)}}function up(t,e,i,o){return{x:i+t*Math.cos(e),y:o+t*Math.sin(e)}}function pp(t,e,i,o,a,n){const{x:s,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=e,h=Math.max(e.outerRadius+o+i-c,0),u=d>0?d+o+i+c:0;let p=0;const m=a-l;if(o){const t=((d>0?d-o:0)+(h>0?h-o:0))/2;p=(m-(0!==t?m*t/(t+o):m))/2}const _=(m-Math.max(.001,m*h-i/$l)/h)/2,f=l+_+p,g=a-_-p,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:w}=hp(e,u,h,g-f),x=h-b,k=h-v,S=f+b/x,T=g-v/k,M=u+y,D=u+w,C=f+y/M,A=g-w/D;if(t.beginPath(),n){const e=(S+T)/2;if(t.arc(s,r,h,S,e),t.arc(s,r,h,e,T),v>0){const e=up(k,T,s,r);t.arc(e.x,e.y,v,T,g+Il)}const i=up(D,g,s,r);if(t.lineTo(i.x,i.y),w>0){const e=up(D,A,s,r);t.arc(e.x,e.y,w,g+Il,A+Math.PI)}const o=(g-w/u+(f+y/u))/2;if(t.arc(s,r,u,g-w/u,o,!0),t.arc(s,r,u,o,f+y/u,!0),y>0){const e=up(M,C,s,r);t.arc(e.x,e.y,y,C+Math.PI,f-Il)}const a=up(x,f,s,r);if(t.lineTo(a.x,a.y),b>0){const e=up(x,S,s,r);t.arc(e.x,e.y,b,f-Il,S)}}else{t.moveTo(s,r);const e=Math.cos(S)*h+s,i=Math.sin(S)*h+r;t.lineTo(e,i);const o=Math.cos(T)*h+s,a=Math.sin(T)*h+r;t.lineTo(o,a)}t.closePath()}function mp(t,e,i,o,a){const{fullCircles:n,startAngle:s,circumference:r,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:h,borderDashOffset:u,borderRadius:p}=l,m="inner"===l.borderAlign;if(!c)return;t.setLineDash(h||[]),t.lineDashOffset=u,m?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let _=e.endAngle;if(n){pp(t,e,i,o,_,a);for(let e=0;ea?(c=a/l,t.arc(n,s,l,i+c,o-c,!0)):t.arc(n,s,a,i+Il,o-Il),t.closePath(),t.clip()}(t,e,_),l.selfJoin&&_-s>=$l&&0===p&&"miter"!==d&&function(t,e,i){const{startAngle:o,x:a,y:n,outerRadius:s,innerRadius:r,options:l}=e,{borderWidth:c,borderJoinStyle:d}=l,h=Math.min(c/s,Jl(o-i));if(t.beginPath(),t.arc(a,n,s-c/2,o+h/2,i-h/2),r>0){const e=Math.min(c/r,Jl(o-i));t.arc(a,n,r+c/2,i-e/2,o+e/2,!0)}else{const e=Math.min(c/2,s*Jl(o-i));if("round"===d)t.arc(a,n,e,i-$l/2,o+$l/2,!0);else if("bevel"===d){const s=2*e*e,r=-s*Math.cos(i+$l/2)+a,l=-s*Math.sin(i+$l/2)+n,c=s*Math.cos(o+$l/2)+a,d=s*Math.sin(o+$l/2)+n;t.lineTo(r,l),t.lineTo(c,d)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,_),n||(pp(t,e,i,o,_,a),t.stroke())}class _p extends ku{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const o=this.getProps(["x","y"],i),{angle:a,distance:n}=Kl(o,{x:t,y:e}),{startAngle:s,endAngle:r,innerRadius:l,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,u=fl(d,r-s),p=tc(a,s,r)&&s!==r,m=u>=zl||p,_=ic(n,l+h,c+h);return m&&_}getCenterPoint(t){const{x:e,y:i,startAngle:o,endAngle:a,innerRadius:n,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,c=(o+a)/2,d=(n+s+l+r)/2;return{x:e+Math.cos(c)*d,y:i+Math.sin(c)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,o=(e.offset||0)/4,a=(e.spacing||0)/2,n=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>zl?Math.floor(i/zl):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*o,Math.sin(s)*o);const r=o*(1-Math.sin(Math.min($l,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,o,a){const{fullCircles:n,startAngle:s,circumference:r}=e;let l=e.endAngle;if(n){pp(t,e,i,o,l,a);for(let e=0;er&&n>r;return{count:o,start:l,loop:e.loop,ilen:c(s+(c?r-t:t))%n,v=()=>{p!==m&&(t.lineTo(f,m),t.lineTo(f,p),t.lineTo(f,_))};for(l&&(h=a[b(0)],t.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=a[b(d)],h.skip)continue;const e=h.x,i=h.y,o=0|e;o===u?(im&&(m=i),f=(g*f+e)/++g):(v(),t.lineTo(e,i),u=o,g=0,p=m=i),_=i}v()}function wp(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?yp:vp}const xp="function"==typeof Path2D;function kp(t,e,i,o){xp&&!e.options.segment?function(t,e,i,o){let a=e._path;a||(a=e._path=new Path2D,e.path(a,i,o)&&a.closePath()),fp(t,e.options),t.stroke(a)}(t,e,i,o):function(t,e,i,o){const{segments:a,options:n}=e,s=wp(e);for(const r of a)fp(t,n,r.style),t.beginPath(),s(t,e,r,{start:i,end:i+o-1})&&t.closePath(),t.stroke()}(t,e,i,o)}class Sp extends ku{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const o=i.spanGaps?this._loop:this._fullLoop;Md(this._points,i,t,o,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,o=t.options.spanGaps,a=i.length;if(!a)return[];const n=!!t._loop,{start:s,end:r}=function(t,e,i,o){let a=0,n=e-1;if(i&&!o)for(;aa&&t[n%e].skip;)n--;return n%=e,{start:a,end:n}}(i,a,n,o);return Kd(t,!0===o?[{start:s,end:r,loop:n}]:function(t,e,i,o){const a=t.length,n=[];let s,r=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%a];i.skip||i.stop?l.skip||(o=!1,n.push({start:e%a,end:(s-1)%a,loop:o}),e=r=i.stop?s:null):(r=s,l.skip&&(e=s)),l=i}return null!==r&&n.push({start:e%a,end:r%a,loop:o}),n}(i,s,rt.replace("rgb(","rgba(").replace(")",", 0.5)")));function Hp(t){return Op[t%Op.length]}function Ip(t){return Vp[t%Vp.length]}function Rp(t){let e=0;return(i,o)=>{const a=t.getDatasetMeta(o).controller;a instanceof Ah?e=function(t,e){return t.backgroundColor=t.data.map((()=>Hp(e++))),e}(i,e):a instanceof Eh?e=function(t,e){return t.backgroundColor=t.data.map((()=>Ip(e++))),e}(i,e):a&&(e=function(t,e){return t.borderColor=Hp(e),t.backgroundColor=Ip(e),++e}(i,e))}}function Fp(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Np={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:o},options:a}=t.config,{elements:n}=a,s=Fp(o)||(r=a)&&(r.borderColor||r.backgroundColor)||n&&Fp(n)||"rgba(0,0,0,0.1)"!==$c.borderColor||"rgba(0,0,0,0.1)"!==$c.backgroundColor;var r;if(!i.forceOverride&&s)return;const l=Rp(t);o.forEach(l)}};function jp(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Wp(t){t.data.datasets.forEach((t=>{jp(t)}))}var Bp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Wp(t);const o=t.width;t.data.datasets.forEach(((e,a)=>{const{_data:n,indexAxis:s}=e,r=t.getDatasetMeta(a),l=n||e.data;if("y"===ad([s,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:d,count:h}=function(t,e){const i=e.length;let o,a=0;const{iScale:n}=t,{min:s,max:r,minDefined:l,maxDefined:c}=n.getUserBounds();return l&&(a=ec(ac(e,n.axis,s).lo,0,i-1)),o=c?ec(ac(e,n.axis,r).hi+1,a,i)-a:i-a,{start:a,count:o}}(r,l);if(h<=(i.threshold||4*o))return void jp(e);let u;switch(hl(n)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,o,a){const n=a.samples||o;if(n>=i)return t.slice(e,e+i);const s=[],r=(i-2)/(n-2);let l=0;const c=e+i-1;let d,h,u,p,m,_=e;for(s[l++]=t[_],d=0;du&&(u=p,h=t[o],m=o);s[l++]=h,_=m}return s[l++]=t[c],s}(l,d,h,o,i);break;case"min-max":u=function(t,e,i,o){let a,n,s,r,l,c,d,h,u,p,m=0,_=0;const f=[],g=e+i-1,b=t[e].x,v=t[g].x-b;for(a=e;ap&&(p=r,d=a),m=(_*m+n.x)/++_;else{const i=a-1;if(!hl(c)&&!hl(d)){const e=Math.min(c,d),o=Math.max(c,d);e!==h&&e!==i&&f.push({...t[e],x:m}),o!==h&&o!==i&&f.push({...t[o],x:m})}a>0&&i!==h&&f.push(t[i]),f.push(n),l=e,_=0,u=p=r,c=d=h=a}}return f}(l,d,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Wp(t)}};function Up(t,e,i,o){if(o)return;let a=e[t],n=i[t];return"angle"===t&&(a=Jl(a),n=Jl(n)),{property:t,start:a,end:n}}function Yp(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function qp(t,e,i,o){return t&&e?o(t[i],e[i]):t?t[i]:e?e[i]:0}function Zp(t,e){let i=[],o=!1;return ul(t)?(o=!0,i=t):i=function(t,e){const{x:i=null,y:o=null}=t||{},a=e.points,n=[];return e.segments.forEach((({start:t,end:e})=>{e=Yp(t,e,a);const s=a[t],r=a[e];null!==o?(n.push({x:s.x,y:o}),n.push({x:r.x,y:o})):null!==i&&(n.push({x:i,y:s.y}),n.push({x:i,y:r.y}))})),n}(t,e),i.length?new Sp({points:i,options:{tension:0},_loop:o,_fullLoop:o}):null}function Xp(t){return t&&!1!==t.fill}function Kp(t,e,i){let o=t[e].fill;const a=[e];let n;if(!i)return o;for(;!1!==o&&-1===a.indexOf(o);){if(!ml(o))return o;if(n=t[o],!n)return!1;if(n.visible)return o;a.push(o),o=n.fill}return!1}function Gp(t,e,i){const o=function(t){const e=t.options,i=e.fill;let o=fl(i&&i.target,i);void 0===o&&(o=!!e.backgroundColor);if(!1===o||null===o)return!1;if(!0===o)return"origin";return o}(t);if(pl(o))return!isNaN(o.value)&&o;let a=parseFloat(o);return ml(a)&&Math.floor(a)===a?function(t,e,i,o){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=o)return!1;return i}(o[0],e,a,i):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Qp(t,e,i){const o=[];for(let a=0;a=0;--e){const i=a[e].$filler;i&&(i.line.updateControlPoints(n,i.axis),o&&i.fill&&im(t.ctx,i,n))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const o=t.getSortedVisibleDatasetMetas();for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;Xp(i)&&im(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const o=e.meta.$filler;Xp(o)&&"beforeDatasetDraw"===i.drawTime&&im(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const cm=(t,e)=>{let{boxHeight:i=e,boxWidth:o=e}=t;return t.usePointStyle&&(i=Math.min(i,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:i,itemHeight:Math.max(e,i)}};class dm extends ku{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=bl(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,o=od(i.font),a=o.size,n=this._computeTitleHeight(),{boxWidth:s,itemHeight:r}=cm(i,a);let l,c;e.font=o.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(n,a,s,r)+10):(c=this.maxHeight,l=this._fitCols(n,o,s,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,o){const{ctx:a,maxWidth:n,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],c=o+s;let d=t;a.textAlign="left",a.textBaseline="middle";let h=-1,u=-c;return this.legendItems.forEach(((t,p)=>{const m=i+e/2+a.measureText(t.text).width;(0===p||l[l.length-1]+m+2*s>n)&&(d+=c,l[l.length-(p>0?0:1)]=0,u+=c,h++),r[p]={left:0,top:u,row:h,width:m,height:o},l[l.length-1]+=m+s})),d}_fitCols(t,e,i,o){const{ctx:a,maxHeight:n,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],c=n-t;let d=s,h=0,u=0,p=0,m=0;return this.legendItems.forEach(((t,n)=>{const{itemWidth:_,itemHeight:f}=function(t,e,i,o,a){const n=function(t,e,i,o){let a=t.text;a&&"string"!=typeof a&&(a=a.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+o.measureText(a).width}(o,t,e,i),s=function(t,e,i){let o=t;"string"!=typeof e.text&&(o=hm(e,i));return o}(a,o,e.lineHeight);return{itemWidth:n,itemHeight:s}}(i,e,a,t,o);n>0&&u+f+2*s>c&&(d+=h+s,l.push({width:h,height:u}),p+=h+s,m++,h=u=0),r[n]={left:p,top:u,col:m,width:_,height:f},h=Math.max(h,_),u+=f+s})),d+=h,l.push({width:h,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:o},rtl:a}}=this,n=Wd(a,this.left,this.width);if(this.isHorizontal()){let a=0,s=uc(i,this.left+o,this.right-this.lineWidths[a]);for(const r of e)a!==r.row&&(a=r.row,s=uc(i,this.left+o,this.right-this.lineWidths[a])),r.top+=this.top+t+o,r.left=n.leftForLtr(n.x(s),r.width),s+=r.width+o}else{let a=0,s=uc(i,this.top+t+o,this.bottom-this.columnSizes[a].height);for(const r of e)r.col!==a&&(a=r.col,s=uc(i,this.top+t+o,this.bottom-this.columnSizes[a].height)),r.top=s,r.left+=this.left+o,r.left=n.leftForLtr(n.x(r.left),r.width),s+=r.height+o}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Nc(t,this),this._draw(),jc(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:o}=this,{align:a,labels:n}=t,s=$c.color,r=Wd(t.rtl,this.left,this.width),l=od(n.font),{padding:c}=n,d=l.size,h=d/2;let u;this.drawTitle(),o.textAlign=r.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=l.string;const{boxWidth:p,boxHeight:m,itemHeight:_}=cm(n,d),f=this.isHorizontal(),g=this._computeTitleHeight();u=f?{x:uc(a,this.left+c,this.right-i[0]),y:this.top+c+g,line:0}:{x:this.left+c,y:uc(a,this.top+g+c,this.bottom-e[0].height),line:0},Bd(this.ctx,t.textDirection);const b=_+c;this.legendItems.forEach(((v,y)=>{o.strokeStyle=v.fontColor,o.fillStyle=v.fontColor;const w=o.measureText(v.text).width,x=r.textAlign(v.textAlign||(v.textAlign=n.textAlign)),k=p+h+w;let S=u.x,T=u.y;r.setWidth(this.width),f?y>0&&S+k+c>this.right&&(T=u.y+=b,u.line++,S=u.x=uc(a,this.left+c,this.right-i[u.line])):y>0&&T+b>this.bottom&&(S=u.x=S+e[u.line].width+c,u.line++,T=u.y=uc(a,this.top+g+c,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;o.save();const a=fl(i.lineWidth,1);if(o.fillStyle=fl(i.fillStyle,s),o.lineCap=fl(i.lineCap,"butt"),o.lineDashOffset=fl(i.lineDashOffset,0),o.lineJoin=fl(i.lineJoin,"miter"),o.lineWidth=a,o.strokeStyle=fl(i.strokeStyle,s),o.setLineDash(fl(i.lineDash,[])),n.usePointStyle){const s={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:a},l=r.xPlus(t,p/2);Rc(o,s,l,e+h,n.pointStyleWidth&&p)}else{const n=e+Math.max((d-m)/2,0),s=r.leftForLtr(t,p),l=ed(i.borderRadius);o.beginPath(),Object.values(l).some((t=>0!==t))?Zc(o,{x:s,y:n,w:p,h:m,radius:l}):o.rect(s,n,p,m),o.fill(),0!==a&&o.stroke()}o.restore()}(r.x(S),T,v),S=((t,e,i,o)=>t===(o?"left":"right")?i:"center"===t?(e+i)/2:e)(x,S+p+h,f?S+k:this.right,t.rtl),function(t,e,i){qc(o,i.text,t,e+_/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(S),T,v),f)u.x+=k+c;else if("string"!=typeof v.text){const t=l.lineHeight;u.y+=hm(v,t)+c}else u.y+=b})),Ud(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=od(e.font),o=id(e.padding);if(!e.display)return;const a=Wd(t.rtl,this.left,this.width),n=this.ctx,s=e.position,r=i.size/2,l=o.top+r;let c,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,d=uc(t.align,d,this.right-h);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+uc(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=uc(s,d,d+h);n.textAlign=a.textAlign(hc(s)),n.textBaseline="middle",n.strokeStyle=e.color,n.fillStyle=e.color,n.font=i.string,qc(n,e.text,u,c,i)}_computeTitleHeight(){const t=this.options.title,e=od(t.font),i=id(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,o,a;if(ic(t,this.left,this.right)&&ic(e,this.top,this.bottom))for(a=this.legendHitBoxes,i=0;inull!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index)(o,i);o&&!a&&bl(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!a&&bl(e.onHover,[t,i,this],this)}else i&&bl(e.onClick,[t,i,this],this)}}function hm(t,e){return e*(t.text?t.text.length:0)}var um={id:"legend",_element:dm,start(t,e,i){const o=t.legend=new dm({ctx:t.ctx,options:i,chart:t});au.configure(t,o,i),au.addBox(t,o)},stop(t){au.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const o=t.legend;au.configure(t,o,i),o.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const o=e.datasetIndex,a=i.chart;a.isDatasetVisible(o)?(a.hide(o),e.hidden=!0):(a.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:o,textAlign:a,color:n,useBorderRadius:s,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),c=id(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:n,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:o||l.pointStyle,rotation:l.rotation,textAlign:a||l.textAlign,borderRadius:s&&(r||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class pm extends ku{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const o=ul(i.text)?i.text.length:1;this._padding=id(i.padding);const a=o*od(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:o,right:a,options:n}=this,s=n.align;let r,l,c,d=0;return this.isHorizontal()?(l=uc(s,i,a),c=e+t,r=a-i):("left"===n.position?(l=i+t,c=uc(s,o,e),d=-.5*$l):(l=a-t,c=uc(s,e,o),d=.5*$l),r=o-e),{titleX:l,titleY:c,maxWidth:r,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=od(e.font),o=i.lineHeight/2+this._padding.top,{titleX:a,titleY:n,maxWidth:s,rotation:r}=this._drawArgs(o);qc(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:r,textAlign:hc(e.align),textBaseline:"middle",translation:[a,n]})}}var mm={id:"title",_element:pm,start(t,e,i){!function(t,e){const i=new pm({ctx:t.ctx,options:e,chart:t});au.configure(t,i,e),au.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;au.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const o=t.titleBlock;au.configure(t,o,i),o.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _m=new WeakMap;var fm={id:"subtitle",start(t,e,i){const o=new pm({ctx:t.ctx,options:i,chart:t});au.configure(t,o,i),au.addBox(t,o),_m.set(t,o)},stop(t){au.removeBox(t,_m.get(t)),_m.delete(t)},beforeUpdate(t,e,i){const o=_m.get(t);au.configure(t,o,i),o.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const gm={average(t){if(!t.length)return!1;let e,i,o=new Set,a=0,n=0;for(e=0,i=t.length;et+e))/o.size;return{x:s,y:a/n}},nearest(t,e){if(!t.length)return!1;let i,o,a,n=e.x,s=e.y,r=Number.POSITIVE_INFINITY;for(i=0,o=t.length;i-1?t.split("\n"):t}function ym(t,e){const{element:i,datasetIndex:o,index:a}=e,n=t.getDatasetMeta(o).controller,{label:s,value:r}=n.getLabelAndValue(a);return{chart:t,label:s,parsed:n.getParsed(a),raw:t.data.datasets[o].data[a],formattedValue:r,dataset:n.getDataset(),dataIndex:a,datasetIndex:o,element:i}}function wm(t,e){const i=t.chart.ctx,{body:o,footer:a,title:n}=t,{boxWidth:s,boxHeight:r}=e,l=od(e.bodyFont),c=od(e.titleFont),d=od(e.footerFont),h=n.length,u=a.length,p=o.length,m=id(e.padding);let _=m.height,f=0,g=o.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(g+=t.beforeBody.length+t.afterBody.length,h&&(_+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),g){_+=p*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(g-p)*l.lineHeight+(g-1)*e.bodySpacing}u&&(_+=e.footerMarginTop+u*d.lineHeight+(u-1)*e.footerSpacing);let b=0;const v=function(t){f=Math.max(f,i.measureText(t).width+b)};return i.save(),i.font=c.string,vl(t.title,v),i.font=l.string,vl(t.beforeBody.concat(t.afterBody),v),b=e.displayColors?s+2+e.boxPadding:0,vl(o,(t=>{vl(t.before,v),vl(t.lines,v),vl(t.after,v)})),b=0,i.font=d.string,vl(t.footer,v),i.restore(),f+=m.width,{width:f,height:_}}function xm(t,e,i,o){const{x:a,width:n}=i,{width:s,chartArea:{left:r,right:l}}=t;let c="center";return"center"===o?c=a<=(r+l)/2?"left":"right":a<=n/2?c="left":a>=s-n/2&&(c="right"),function(t,e,i,o){const{x:a,width:n}=o,s=i.caretSize+i.caretPadding;return"left"===t&&a+n+s>e.width||"right"===t&&a-n-s<0||void 0}(c,t,e,i)&&(c="center"),c}function km(t,e,i){const o=i.yAlign||e.yAlign||function(t,e){const{y:i,height:o}=e;return it.height-o/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||xm(t,e,i,o),yAlign:o}}function Sm(t,e,i,o){const{caretSize:a,caretPadding:n,cornerRadius:s}=t,{xAlign:r,yAlign:l}=i,c=a+n,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:p}=ed(s);let m=function(t,e){let{x:i,width:o}=t;return"right"===e?i-=o:"center"===e&&(i-=o/2),i}(e,r);const _=function(t,e,i){let{y:o,height:a}=t;return"top"===e?o+=i:o-="bottom"===e?a+i:a/2,o}(e,l,c);return"center"===l?"left"===r?m+=c:"right"===r&&(m-=c):"left"===r?m-=Math.max(d,u)+a:"right"===r&&(m+=Math.max(h,p)+a),{x:ec(m,0,o.width-e.width),y:ec(_,0,o.height-e.height)}}function Tm(t,e,i){const o=id(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-o.right:t.x+o.left}function Mm(t){return bm([],vm(t))}function Dm(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Cm={beforeTitle:cl,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,o=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex{const e={before:[],lines:[],after:[]},a=Dm(i,t);bm(e.before,vm(Am(a,"beforeLabel",this,t))),bm(e.lines,Am(a,"label",this,t)),bm(e.after,vm(Am(a,"afterLabel",this,t))),o.push(e)})),o}getAfterBody(t,e){return Mm(Am(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,o=Am(i,"beforeFooter",this,t),a=Am(i,"footer",this,t),n=Am(i,"afterFooter",this,t);let s=[];return s=bm(s,vm(o)),s=bm(s,vm(a)),s=bm(s,vm(n)),s}_createItems(t){const e=this._active,i=this.chart.data,o=[],a=[],n=[];let s,r,l=[];for(s=0,r=e.length;st.filter(e,o,a,i)))),t.itemSort&&(l=l.sort(((e,o)=>t.itemSort(e,o,i)))),vl(l,(e=>{const i=Dm(t.callbacks,e);o.push(Am(i,"labelColor",this,e)),a.push(Am(i,"labelPointStyle",this,e)),n.push(Am(i,"labelTextColor",this,e))})),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=n,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),o=this._active;let a,n=[];if(o.length){const t=gm[i.position].call(this,o,this._eventPosition);n=this._createItems(i),this.title=this.getTitle(n,i),this.beforeBody=this.getBeforeBody(n,i),this.body=this.getBody(n,i),this.afterBody=this.getAfterBody(n,i),this.footer=this.getFooter(n,i);const e=this._size=wm(this,i),s=Object.assign({},t,e),r=km(this.chart,i,s),l=Sm(i,s,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,a={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(a={opacity:0});this._tooltipItems=n,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,o){const a=this.getCaretPosition(t,i,o);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:o,yAlign:a}=this,{caretSize:n,cornerRadius:s}=i,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:d}=ed(s),{x:h,y:u}=t,{width:p,height:m}=e;let _,f,g,b,v,y;return"center"===a?(v=u+m/2,"left"===o?(_=h,f=_-n,b=v+n,y=v-n):(_=h+p,f=_+n,b=v-n,y=v+n),g=_):(f="left"===o?h+Math.max(r,c)+n:"right"===o?h+p-Math.max(l,d)-n:this.caretX,"top"===a?(b=u,v=b-n,_=f-n,g=f+n):(b=u+m,v=b+n,_=f+n,g=f-n),y=b),{x1:_,x2:f,x3:g,y1:b,y2:v,y3:y}}drawTitle(t,e,i){const o=this.title,a=o.length;let n,s,r;if(a){const l=Wd(i.rtl,this.x,this.width);for(t.x=Tm(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",n=od(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=n.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Zc(t,{x:e,y:p,w:l,h:r,radius:s}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),Zc(t,{x:i,y:p+1,w:l-2,h:r-2,radius:s}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,p,l,r),t.strokeRect(e,p,l,r),t.fillStyle=n.backgroundColor,t.fillRect(i,p+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:o}=this,{bodySpacing:a,bodyAlign:n,displayColors:s,boxHeight:r,boxWidth:l,boxPadding:c}=i,d=od(i.bodyFont);let h=d.lineHeight,u=0;const p=Wd(i.rtl,this.x,this.width),m=function(i){e.fillText(i,p.x(t.x+u),t.y+h/2),t.y+=h+a},_=p.textAlign(n);let f,g,b,v,y,w,x;for(e.textAlign=n,e.textBaseline="middle",e.font=d.string,t.x=Tm(this,_,i),e.fillStyle=i.bodyColor,vl(this.beforeBody,m),u=s&&"right"!==_?"center"===n?l/2+c:l+2+c:0,v=0,w=o.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,o=i&&i.x,a=i&&i.y;if(o||a){const i=gm[t.position].call(this,this._active,this._eventPosition);if(!i)return;const n=this._size=wm(this,t),s=Object.assign({},i,this._size),r=km(e,t,s),l=Sm(t,s,r,e);o._to===l.x&&a._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=n.width,this.height=n.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const o={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const n=id(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,o,e),Bd(t,e.textDirection),a.y+=n.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),Ud(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,o=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),a=!yl(i,o),n=this._positionChanged(o,e);(a||n)&&(this._active=o,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,a=this._active||[],n=this._getActiveElements(t,a,e,i),s=this._positionChanged(n,t),r=e||!yl(n,a)||s;return r&&(this._active=n,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,o){const a=this.options;if("mouseout"===t.type)return[];if(!o)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const n=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&n.reverse(),n}_positionChanged(t,e){const{caretX:i,caretY:o,options:a}=this,n=gm[a.position].call(this,t,e);return!1!==n&&(i!==n.x||o!==n.y)}}var Em={id:"tooltip",_element:Pm,positioners:gm,afterInit(t,e,i){i&&(t.tooltip=new Pm({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Cm},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Lm=Object.freeze({__proto__:null,Colors:Np,Decimation:Bp,Filler:lm,Legend:um,SubTitle:fm,Title:mm,Tooltip:Em});function $m(t,e,i,o){const a=t.indexOf(e);if(-1===a)return((t,e,i,o)=>("string"==typeof e?(i=t.push(e)-1,o.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,o);return a!==t.lastIndexOf(e)?i:a}function zm(t){const e=this.getLabels();return t>=0&&tnull===t?null:ec(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:$m(i,t,fl(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:o}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(o=this.getLabels().length-1)),this.min=i,this.max=o}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,o=[];let a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)o.push({value:i});return o}getLabelForValue(t){return zm.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Vm(t,e){const i=[],{bounds:o,step:a,min:n,max:s,precision:r,count:l,maxTicks:c,maxDigits:d,includeBounds:h}=t,u=a||1,p=c-1,{min:m,max:_}=e,f=!hl(n),g=!hl(s),b=!hl(l),v=(_-m)/(d+1);let y,w,x,k,S=Bl((_-m)/p/u)*u;if(S<1e-14&&!f&&!g)return[{value:m},{value:_}];k=Math.ceil(_/S)-Math.floor(m/S),k>p&&(S=Bl(k*S/p/u)*u),hl(r)||(y=Math.pow(10,r),S=Math.ceil(S*y)/y),"ticks"===o?(w=Math.floor(m/S)*S,x=Math.ceil(_/S)*S):(w=m,x=_),f&&g&&a&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-n)/a,S/1e3)?(k=Math.round(Math.min((s-n)/S,c)),S=(s-n)/k,w=n,x=s):b?(w=f?n:w,x=g?s:x,k=l-1,S=(x-w)/k):(k=(x-w)/S,k=Wl(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const T=Math.max(Xl(S),Xl(w));y=Math.pow(10,hl(r)?T:r),w=Math.round(w*y)/y,x=Math.round(x*y)/y;let M=0;for(f&&(h&&w!==n?(i.push({value:n}),ws)break;i.push({value:t})}return g&&h&&x!==s?i.length&&Wl(i[i.length-1].value,s,Hm(s,v,t))?i[i.length-1].value=s:i.push({value:s}):g&&x!==s||i.push({value:x}),i}function Hm(t,e,{horizontal:i,minRotation:o}){const a=ql(o),n=(i?Math.sin(a):Math.cos(a))||.001,s=.75*e*(""+t).length;return Math.min(e/n,s)}class Im extends $u{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return hl(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:o,max:a}=this;const n=t=>o=e?o:t,s=t=>a=i?a:t;if(t){const t=jl(o),e=jl(a);t<0&&e<0?s(0):t>0&&e>0&&n(0)}if(o===a){let e=0===a?1:Math.abs(.05*a);s(a+e),t||n(o-e)}this.min=o,this.max=a}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:o}=t;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const o=Vm({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Yl(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const o=(i-e)/Math.max(t.length-1,1)/2;e-=o,i+=o}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Tc(t,this.chart.options.locale,this.options.ticks.format)}}class Rm extends Im{static id="linear";static defaults={ticks:{callback:Dc.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ml(t)?t:0,this.max=ml(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=ql(this.options.ticks.minRotation),o=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Fm=t=>Math.floor(Nl(t)),Nm=(t,e)=>Math.pow(10,Fm(t)+e);function jm(t){return 1===t/Math.pow(10,Fm(t))}function Wm(t,e,i){const o=Math.pow(10,i),a=Math.floor(t/o);return Math.ceil(e/o)-a}function Bm(t,{min:e,max:i}){e=_l(t.min,e);const o=[],a=Fm(e);let n=function(t,e){let i=Fm(e-t);for(;Wm(t,e,i)>10;)i++;for(;Wm(t,e,i)<10;)i--;return Math.min(i,Fm(t))}(e,i),s=n<0?Math.pow(10,Math.abs(n)):1;const r=Math.pow(10,n),l=a>n?Math.pow(10,a):0,c=Math.round((e-l)*s)/s,d=Math.floor((e-l)/r/10)*r*10;let h=Math.floor((c-d)/Math.pow(10,n)),u=_l(t.min,Math.round((l+d+h*Math.pow(10,n))*s)/s);for(;u=10?h=h<15?15:20:h++,h>=20&&(n++,h=2,s=n>=0?1:s),u=Math.round((l+d+h*Math.pow(10,n))*s)/s;const p=_l(t.max,u);return o.push({value:p,major:jm(p),significand:h}),o}class Um extends $u{static id="logarithmic";static defaults={ticks:{callback:Dc.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Im.prototype.parse.apply(this,[t,e]);if(0!==i)return ml(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ml(t)?Math.max(0,t):null,this.max=ml(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ml(this._userMin)&&(this.min=t===Nm(this.min,0)?Nm(this.min,-1):Nm(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,o=this.max;const a=e=>i=t?i:e,n=t=>o=e?o:t;i===o&&(i<=0?(a(1),n(10)):(a(Nm(i,-1)),n(Nm(o,1)))),i<=0&&a(Nm(o,-1)),o<=0&&n(Nm(i,1)),this.min=i,this.max=o}buildTicks(){const t=this.options,e=Bm({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Yl(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Tc(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Nl(t),this._valueRange=Nl(this.max)-Nl(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Nl(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Ym(t){const e=t.ticks;if(e.display&&t.display){const t=id(e.backdropPadding);return fl(e.font&&e.font.size,$c.font.size)+t.height}return 0}function qm(t,e,i,o,a){return t===o||t===a?{start:e-i/2,end:e+i/2}:ta?{start:e-i,end:e}:{start:e,end:e+i}}function Zm(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),o=[],a=[],n=t._pointLabels.length,s=t.options.pointLabels,r=s.centerPointLabels?$l/n:0;for(let h=0;he.r&&(r=(o.end-e.r)/n,t.r=Math.max(t.r,e.r+r)),a.starte.b&&(l=(a.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function Km(t,e,i){const o=t.drawingArea,{extra:a,additionalAngle:n,padding:s,size:r}=i,l=t.getPointPosition(e,o+a+s,n),c=Math.round(Zl(Jl(l.angle+Il))),d=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,r.h,c),h=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(c),u=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,r.w,h);return{visible:!0,x:l.x,y:d,textAlign:h,left:u,top:d,right:u+r.w,bottom:d+r.h}}function Gm(t,e){if(!e)return!0;const{left:i,top:o,right:a,bottom:n}=t;return!(Fc({x:i,y:o},e)||Fc({x:i,y:n},e)||Fc({x:a,y:o},e)||Fc({x:a,y:n},e))}function Qm(t,e,i){const{left:o,top:a,right:n,bottom:s}=i,{backdropColor:r}=e;if(!hl(r)){const i=ed(e.borderRadius),l=id(e.backdropPadding);t.fillStyle=r;const c=o-l.left,d=a-l.top,h=n-o+l.width,u=s-a+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),Zc(t,{x:c,y:d,w:h,h:u,radius:i}),t.fill()):t.fillRect(c,d,h,u)}}function Jm(t,e,i,o){const{ctx:a}=t;if(i)a.arc(t.xCenter,t.yCenter,e,0,zl);else{let i=t.getPointPosition(0,e);a.moveTo(i.x,i.y);for(let n=1;nt,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=id(Ym(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ml(t)&&!isNaN(t)?t:0,this.max=ml(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ym(this.options))}generateTickLabels(t){Im.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=bl(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Zm(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,o){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-o)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,o))}getIndexAngle(t){return Jl(t*(zl/(this._pointLabels.length||1))+ql(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(hl(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(hl(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;a--){const e=t._pointLabelItems[a];if(!e.visible)continue;const n=o.setContext(t.getPointLabelContext(a));Qm(i,n,e);const s=od(n.font),{x:r,y:l,textAlign:c}=e;qc(i,t._pointLabels[a],r,l+s.lineHeight/2,s,{color:n.color,textAlign:c,textBaseline:"middle"})}}(this,n),o.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),s=o.setContext(i),l=a.setContext(i);!function(t,e,i,o,a){const n=t.ctx,s=e.circular,{color:r,lineWidth:l}=e;!s&&!o||!r||!l||i<0||(n.save(),n.strokeStyle=r,n.lineWidth=l,n.setLineDash(a.dash||[]),n.lineDashOffset=a.dashOffset,n.beginPath(),Jm(t,i,s,o),n.closePath(),n.stroke(),n.restore())}(this,s,r,n,l)}})),i.display){for(t.save(),s=n-1;s>=0;s--){const o=i.setContext(this.getPointLabelContext(s)),{color:a,lineWidth:n}=o;n&&a&&(t.lineWidth=n,t.strokeStyle=a,t.setLineDash(o.borderDash),t.lineDashOffset=o.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const o=this.getIndexAngle(0);let a,n;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((o,s)=>{if(0===s&&this.min>=0&&!e.reverse)return;const r=i.setContext(this.getContext(s)),l=od(r.font);if(a=this.getDistanceFromCenterForValue(this.ticks[s].value),r.showLabelBackdrop){t.font=l.string,n=t.measureText(o.label).width,t.fillStyle=r.backdropColor;const e=id(r.backdropPadding);t.fillRect(-n/2-e.left,-a-l.size/2-e.top,n+e.width,l.size+e.height)}qc(t,o.label,0,-a,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})})),t.restore()}drawTitle(){}}const e_={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},i_=Object.keys(e_);function o_(t,e){return t-e}function a_(t,e){if(hl(e))return null;const i=t._adapter,{parser:o,round:a,isoWeekday:n}=t._parseOpts;let s=e;return"function"==typeof o&&(s=o(s)),ml(s)||(s="string"==typeof o?i.parse(s,o):i.parse(s)),null===s?null:(a&&(s="week"!==a||!Ul(n)&&!0!==n?i.startOf(s,a):i.startOf(s,"isoWeek",n)),+s)}function n_(t,e,i,o){const a=i_.length;for(let n=i_.indexOf(t);n=e?i[o]:i[a]]=!0}}else t[e]=!0}function r_(t,e,i){const o=[],a={},n=e.length;let s,r;for(s=0;s=0&&(e[l].major=!0);return e}(t,o,a,i):o}class l_ extends $u{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),o=this._adapter=new Ih._date(t.adapters.date);o.init(e),Tl(i.displayFormats,o.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:a_(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:o,max:a,minDefined:n,maxDefined:s}=this.getUserBounds();function r(t){n||isNaN(t.min)||(o=Math.min(o,t.min)),s||isNaN(t.max)||(a=Math.max(a,t.max))}n&&s||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),o=ml(o)&&!isNaN(o)?o:+e.startOf(Date.now(),i),a=ml(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,o="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const a=this.min,n=function(t,e,i){let o=0,a=t.length;for(;oo&&t[a-1]>i;)a--;return o>0||a=i_.indexOf(i);n--){const i=i_[n];if(e_[i].common&&t._adapter.diff(a,o,i)>=e-1)return i}return i_[i?i_.indexOf(i):0]}(this,n.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=i_.indexOf(t)+1,i=i_.length;e+t.value)))}initOffsets(t=[]){let e,i,o=0,a=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),o=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),a=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const n=t.length<3?.5:.25;o=ec(o,0,n),a=ec(a,0,n),this._offsets={start:o,end:a,factor:1/(o+1+a)}}_generate(){const t=this._adapter,e=this.min,i=this.max,o=this.options,a=o.time,n=a.unit||n_(a.minUnit,e,i,this._getLabelCapacity(e)),s=fl(o.ticks.stepSize,1),r="week"===n&&a.isoWeekday,l=Ul(r)||!0===r,c={};let d,h,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":n),t.diff(i,e,n)>1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+n);const p="data"===o.ticks.source&&this.getDataTimestamps();for(d=u,h=0;d+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,o=this._unit,a=e||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,o){const a=this.options,n=a.ticks.callback;if(n)return bl(n,[t,e,i],this);const s=a.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&s[r],d=l&&s[l],h=i[e],u=l&&d&&h&&h.major;return this._adapter.format(t,o||(u?d:c))}generateTickLabels(t){let e,i,o;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(t=0,e=o.length;t=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=ac(t,"pos",e)),({pos:o,time:n}=t[r]),({pos:a,time:s}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=ac(t,"time",e)),({time:o,pos:n}=t[r]),({time:a,pos:s}=t[l]));const c=a-o;return c?n+(s-n)*(e-o)/c:n}class d_ extends l_{static id="timeseries";static defaults=l_.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=c_(e,this.min),this._tableRange=c_(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,o=[],a=[];let n,s,r,l,c;for(n=0,s=t.length;n=e&&l<=i&&o.push(l);if(o.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(n=0,s=o.length;nt-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(c_(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return c_(this._table,i*this._tableRange+this._minPos,!0)}}var h_=Object.freeze({__proto__:null,CategoryScale:Om,LinearScale:Rm,LogarithmicScale:Um,RadialLinearScale:t_,TimeScale:l_,TimeSeriesScale:d_});const u_=[Oh,zp,Lm,h_];var p_=Object.freeze({__proto__:null,Animation:nh,Animations:sh,ArcElement:_p,BarController:Dh,BarElement:$p,BasePlatform:nu,BasicPlatform:su,BubbleController:Ch,CategoryScale:Om,Chart:cp,Colors:Np,DatasetController:bh,Decimation:Bp,DomPlatform:wu,DoughnutController:Ah,Element:ku,Filler:lm,Interaction:Uh,Legend:um,LineController:Ph,LineElement:Sp,LinearScale:Rm,LogarithmicScale:Um,PieController:Lh,PointElement:Mp,PolarAreaController:Eh,RadarController:$h,RadialLinearScale:t_,Scale:$u,ScatterController:zh,SubTitle:fm,Ticks:Dc,TimeScale:l_,TimeSeriesScale:d_,Title:mm,Tooltip:Em,_adapters:Ih,_detectPlatform:xu,animator:ih,controllers:Oh,defaults:$c,elements:zp,layouts:au,plugins:Lm,registerables:u_,registry:Vu,scales:h_});function m_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var __,f_={exports:{}};var g_,b_=(__||(__=1,g_=f_,function(t,e,i,o){var a,n=["","webkit","Moz","MS","ms","o"],s=e.createElement("div"),r="function",l=Math.round,c=Math.abs,d=Date.now;function h(t,e,i){return setTimeout(b(t,i),e)}function u(t,e,i){return!!Array.isArray(t)&&(p(t,i[e],i),!0)}function p(t,e,i){var a;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==o)for(a=0;a\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",n=t.console&&(t.console.warn||t.console.log);return n&&n.call(t.console,a,o),e.apply(this,arguments)}}a="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1}function T(t){return t.trim().split(/\s+/g)}function M(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]})),o}function A(t,e){for(var i,a,s=e[0].toUpperCase()+e.slice(1),r=0;r1&&!i.firstMultiple?i.firstMultiple=J(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,l=r?r.center:s.center,h=e.center=tt(a);e.timeStamp=d(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=at(l,h),e.distance=ot(l,h),function(t,e){var i=e.center,o=t.offsetDelta||{},a=t.prevDelta||{},n=t.prevInput||{};e.eventType!==I&&n.eventType!==R||(a=t.prevDelta={x:n.deltaX||0,y:n.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=a.x+(i.x-o.x),e.deltaY=a.y+(i.y-o.y)}(i,e),e.offsetDirection=it(e.deltaX,e.deltaY);var u,p,m=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=m.x,e.overallVelocityY=m.y,e.overallVelocity=c(m.x)>c(m.y)?m.x:m.y,e.scale=r?(u=r.pointers,ot((p=a)[0],p[1],K)/ot(u[0],u[1],K)):1,e.rotation=r?function(t,e){return at(e[1],e[0],K)+at(t[1],t[0],K)}(r.pointers,a):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,a,n,s,r=t.lastInterval||e,l=e.timeStamp-r.timeStamp;if(e.eventType!=F&&(l>H||r.velocity===o)){var d=e.deltaX-r.deltaX,h=e.deltaY-r.deltaY,u=et(l,d,h);a=u.x,n=u.y,i=c(u.x)>c(u.y)?u.x:u.y,s=it(d,h),t.lastInterval=e}else i=r.velocity,a=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=a,e.velocityY=n,e.direction=s}(i,e);var _=t.element;k(e.srcEvent.target,_)&&(_=e.srcEvent.target),e.target=_}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function J(t){for(var e=[],i=0;i=c(e)?t<0?j:W:e<0?B:U}function ot(t,e,i){i||(i=X);var o=e[i[0]]-t[i[0]],a=e[i[1]]-t[i[1]];return Math.sqrt(o*o+a*a)}function at(t,e,i){i||(i=X);var o=e[i[0]]-t[i[0]],a=e[i[1]]-t[i[1]];return 180*Math.atan2(a,o)/Math.PI}G.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(E(this.element),this.evWin,this.domHandler)}};var nt={mousedown:I,mousemove:2,mouseup:R},st="mousedown",rt="mousemove mouseup";function lt(){this.evEl=st,this.evWin=rt,this.pressed=!1,G.apply(this,arguments)}g(lt,G,{handler:function(t){var e=nt[t.type];e&I&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=R),this.pressed&&(e&R&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:V,srcEvent:t}))}});var ct={pointerdown:I,pointermove:2,pointerup:R,pointercancel:F,pointerout:F},dt={2:O,3:"pen",4:V,5:"kinect"},ht="pointerdown",ut="pointermove pointerup pointercancel";function pt(){this.evEl=ht,this.evWin=ut,G.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ht="MSPointerDown",ut="MSPointerMove MSPointerUp MSPointerCancel"),g(pt,G,{handler:function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),a=ct[o],n=dt[t.pointerType]||t.pointerType,s=n==O,r=M(e,t.pointerId,"pointerId");a&I&&(0===t.button||s)?r<0&&(e.push(t),r=e.length-1):a&(R|F)&&(i=!0),r<0||(e[r]=t,this.callback(this.manager,a,{pointers:e,changedPointers:[t],pointerType:n,srcEvent:t}),i&&e.splice(r,1))}});var mt={touchstart:I,touchmove:2,touchend:R,touchcancel:F};function _t(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,G.apply(this,arguments)}function ft(t,e){var i=D(t.touches),o=D(t.changedTouches);return e&(R|F)&&(i=C(i.concat(o),"identifier")),[i,o]}g(_t,G,{handler:function(t){var e=mt[t.type];if(e===I&&(this.started=!0),this.started){var i=ft.call(this,t,e);e&(R|F)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:O,srcEvent:t})}}});var gt={touchstart:I,touchmove:2,touchend:R,touchcancel:F},bt="touchstart touchmove touchend touchcancel";function vt(){this.evTarget=bt,this.targetIds={},G.apply(this,arguments)}function yt(t,e){var i=D(t.touches),o=this.targetIds;if(e&(2|I)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a,n,s=D(t.changedTouches),r=[],l=this.target;if(n=i.filter((function(t){return k(t.target,l)})),e===I)for(a=0;a-1&&o.splice(t,1)}),wt)}}function Tt(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+Rt(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+Rt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Ht},canEmit:function(){for(var t=0;te.threshold&&a&e.direction},attrTest:function(t){return jt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ft(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),g(Bt,jt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),g(Ut,It,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[At]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(R|F)&&!a)this.reset();else if(t.eventType&I)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&R)return 8;return Ht},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&R?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),g(Yt,jt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),g(qt,jt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Y|q,pointers:1},getTouchAction:function(){return Wt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Y|q)?e=t.overallVelocity:i&Y?e=t.overallVelocityX:i&q&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&t.eventType&R},emit:function(t){var e=Ft(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),g(Zt,It,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Pt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancet&&t.enabled&&t.modifierKey,w_=(t,e)=>t&&e[t+"Key"],x_=(t,e)=>t&&!e[t+"Key"];function k_(t,e,i){return void 0===t||("string"==typeof t?-1!==t.indexOf(e):"function"==typeof t&&-1!==t({chart:i}).indexOf(e))}function S_(t,e){return"function"==typeof t&&(t=t({chart:e})),"string"==typeof t?{x:-1!==t.indexOf("x"),y:-1!==t.indexOf("y")}:{x:!1,y:!1}}function T_(t,e,i){const{mode:o="xy",scaleMode:a,overScaleMode:n}=t||{},s=function({x:t,y:e},i){const o=i.scales,a=Object.keys(o);for(let i=0;i=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right)return n}return null}(e,i),r=S_(o,i),l=S_(a,i);if(n){const t=S_(n,i);for(const e of["x","y"])t[e]&&(l[e]=r[e],r[e]=!1)}if(s&&l[s.axis])return[s];const c=[];return vl(i.scales,(function(t){r[t.axis]&&c.push(t)})),c}const M_=new WeakMap;function D_(t){let e=M_.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},M_.set(t,e)),e}function C_(t,e,i,o){const a=Math.max(0,Math.min(1,(t-e)/i||0));return{min:o*a,max:o*(1-a)}}function A_(t,e){const i=t.isHorizontal()?e.x:e.y;return t.getValueForPixel(i)}function P_(t,e,i){const o=t.max-t.min,a=o*(e-1);return C_(A_(t,i),t.min,o,a)}function E_(t,e,i,o,a){let n=i[o];if("original"===n){const i=t.originalScaleLimits[e.id][o];n=fl(i.options,i.scale)}return fl(n,a)}function L_(t,{min:e,max:i},o,a=!1){const n=D_(t.chart),{options:s}=t,r=function(t,e){return e&&(e[t.id]||e[t.axis])||{}}(t,o),{minRange:l=0}=r,c=E_(n,t,r,"min",-1/0),d=E_(n,t,r,"max",1/0);if("pan"===a&&(ed))return!0;const h=t.max-t.min,u=a?Math.max(i-e,l):h;if(a&&u===l&&h<=l)return!0;const p=function(t,{min:e,max:i,minLimit:o,maxLimit:a},n){const s=(t-i+e)/2;e-=s,i+=s;const r=n.min.options??n.min.scale,l=n.max.options??n.max.scale,c=t/1e6;return Wl(e,r,c)&&(e=r),Wl(i,l,c)&&(i=l),ea&&(i=a,e=Math.max(a-t,o)),{min:e,max:i}}(u,{min:e,max:i,minLimit:c,maxLimit:d},n.originalScaleLimits[t.id]);return s.min=p.min,s.max=p.max,n.updatedScaleLimits[t.id]=p,t.parse(p.min)!==t.min||t.parse(p.max)!==t.max}const $_=t=>0===t||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);const z_={second:500,minute:3e4,hour:18e5,day:432e5,week:3024e5,month:1296e6,quarter:5184e6,year:157248e5};function O_(t,e,i,o=!1){const{min:a,max:n,options:s}=t,r=s.time&&s.time.round,l=z_[r]||0,c=t.getValueForPixel(t.getPixelForValue(a+l)-e),d=t.getValueForPixel(t.getPixelForValue(n+l)-e);return!(!isNaN(c)&&!isNaN(d))||L_(t,{min:c,max:d},i,!!o&&"pan")}function V_(t,e,i){return O_(t,e,i,!0)}const H_={category:function(t,e,i,o){const a=P_(t,e,i);return t.min===t.max&&e<1&&function(t){const e=t.getLabels().length-1;t.min>0&&(t.min-=1),t.maxr&&(a=Math.max(0,a-l),n=1===s?a:a+s,c=0===a),L_(t,{min:a,max:n},i)||c},default:O_,logarithmic:V_,timeseries:V_};function F_(t,e){vl(t,((i,o)=>{e[o]||delete t[o]}))}function N_(t,e){const{scales:i}=t,{originalScaleLimits:o,updatedScaleLimits:a}=e;return vl(i,(function(t){(function(t,e,i){const{id:o,options:{min:a,max:n}}=t;if(!e[o]||!i[o])return!0;const s=i[o];return s.min!==a||s.max!==n})(t,o,a)&&(o[t.id]={min:{scale:t.min,options:t.options.min},max:{scale:t.max,options:t.options.max}})})),F_(o,i),F_(a,i),o}function j_(t,e,i,o){bl(H_[t.type]||H_.default,[t,e,i,o])}function W_(t,e,i,o){bl(I_[t.type]||I_.default,[t,e,i,o])}function B_(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function U_(t,e,i="none",o="api"){const{x:a=1,y:n=1,focalPoint:s=B_(t)}="number"==typeof e?{x:e,y:e}:e,r=D_(t),{options:{limits:l,zoom:c}}=r;N_(t,r);const d=1!==a,h=1!==n;vl(T_(c,s,t)||t.scales,(function(t){t.isHorizontal()&&d?j_(t,a,s,l):!t.isHorizontal()&&h&&j_(t,n,s,l)})),t.update(i),bl(c.onZoom,[{chart:t,trigger:o}])}function Y_(t,e,i,o="none",a="api"){const n=D_(t),{options:{limits:s,zoom:r}}=n,{mode:l="xy"}=r;N_(t,n);const c=k_(l,"x",t),d=k_(l,"y",t);vl(t.scales,(function(t){t.isHorizontal()&&c?W_(t,e.x,i.x,s):!t.isHorizontal()&&d&&W_(t,e.y,i.y,s)})),t.update(o),bl(r.onZoom,[{chart:t,trigger:a}])}function q_(t,e,i,o="none",a="api"){const n=D_(t);N_(t,n);L_(t.scales[e],i,void 0,!0),t.update(o),bl(n.options.zoom?.onZoom,[{chart:t,trigger:a}])}function Z_(t,e="default"){const i=D_(t),o=N_(t,i);vl(t.scales,(function(t){const e=t.options;o[t.id]?(e.min=o[t.id].min.options,e.max=o[t.id].max.options):(delete e.min,delete e.max),delete i.updatedScaleLimits[t.id]})),t.update(e),bl(i.options.zoom.onZoomComplete,[{chart:t}])}function X_(t){const e=D_(t);let i=1,o=1;return vl(t.scales,(function(t){const a=function(t,e){const i=t.originalScaleLimits[e];if(!i)return;const{min:o,max:a}=i;return fl(a.options,a.scale)-fl(o.options,o.scale)}(e,t.id);if(a){const e=Math.round(a/(t.max-t.min)*100)/100;i=Math.min(i,e),o=Math.max(o,e)}})),i<1?i:o}function K_(t,e,i,o){const{panDelta:a}=o,n=a[t.id]||0;jl(n)===jl(e)&&(e+=n);bl(R_[t.type]||R_.default,[t,e,i])?a[t.id]=0:a[t.id]=e}function G_(t,e,i,o="none"){const{x:a=0,y:n=0}="number"==typeof e?{x:e,y:e}:e,s=D_(t),{options:{pan:r,limits:l}}=s,{onPan:c}=r||{};N_(t,s);const d=0!==a,h=0!==n;vl(i||t.scales,(function(t){t.isHorizontal()&&d?K_(t,a,l,s):!t.isHorizontal()&&h&&K_(t,n,l,s)})),t.update(o),bl(c,[{chart:t}])}function Q_(t){const e=D_(t);N_(t,e);const i={};for(const o of Object.keys(t.scales)){const{min:t,max:a}=e.originalScaleLimits[o]||{min:{},max:{}};i[o]={min:t.scale,max:a.scale}}return i}function J_(t){const e=D_(t);return e.panning||e.dragging}const tf=(t,e,i)=>Math.min(i,Math.max(e,t));function ef(t,e){const{handlers:i}=D_(t),o=i[e];o&&o.target&&(o.target.removeEventListener(e,o),delete i[e])}function of(t,e,i,o){const{handlers:a,options:n}=D_(t),s=a[i];if(s&&s.target===e)return;ef(t,i),a[i]=e=>o(t,e,n),a[i].target=e;const r="wheel"!==i&&void 0;e.addEventListener(i,a[i],{passive:r})}function af(t,e){const i=D_(t);i.dragStart&&(i.dragging=!0,i.dragEnd=e,t.update("none"))}function nf(t,e){const i=D_(t);i.dragStart&&"Escape"===e.key&&(ef(t,"keydown"),i.dragging=!1,i.dragStart=i.dragEnd=null,t.update("none"))}function sf(t,e){if(t.target!==e.canvas){const i=e.canvas.getBoundingClientRect();return{x:t.clientX-i.left,y:t.clientY-i.top}}return zd(t,e)}function rf(t,e,i){const{onZoomStart:o,onZoomRejected:a}=i;if(o){if(!1===bl(o,[{chart:t,event:e,point:sf(e,t)}]))return bl(a,[{chart:t,event:e}]),!1}}function lf(t,e){if(t.legend){if(Fc(zd(e,t),t.legend))return}const i=D_(t),{pan:o,zoom:a={}}=i.options;if(0!==e.button||w_(y_(o),e)||x_(y_(a.drag),e))return bl(a.onZoomRejected,[{chart:t,event:e}]);!1!==rf(t,e,a)&&(i.dragStart=e,of(t,t.canvas.ownerDocument,"mousemove",af),of(t,window.document,"keydown",nf))}function cf(t,e,i,{min:o,max:a,prop:n}){t[o]=tf(Math.min(i.begin[n],i.end[n]),e[o],e[a]),t[a]=tf(Math.max(i.begin[n],i.end[n]),e[o],e[a])}function df(t,e,i){const o={begin:sf(e.dragStart,t),end:sf(e.dragEnd,t)};if(i){!function({begin:t,end:e},i){let o=e.x-t.x,a=e.y-t.y;const n=Math.abs(o/a);n>i?o=Math.sign(o)*Math.abs(a*i):n=0?2-1/(1-n):1+n;U_(t,{x:s,y:s,focalPoint:{x:e.clientX-a.left,y:e.clientY-a.top}},"zoom","wheel"),bl(i,[{chart:t}])}function mf(t,e,i,o){i&&(D_(t).handlers[e]=function(t,e){let i;return function(){return clearTimeout(i),i=setTimeout(t,e),e}}((()=>bl(i,[{chart:t}])),o))}function _f(t,e){return function(i,o){const{pan:a,zoom:n={}}=e.options;if(!a||!a.enabled)return!1;const s=o&&o.srcEvent;return!s||(!(!e.panning&&"mouse"===o.pointerType&&(x_(y_(a),s)||w_(y_(n.drag),s)))||(bl(a.onPanRejected,[{chart:t,event:o}]),!1))}}function ff(t,e,i){if(e.scale){const{center:o,pointers:a}=i,n=1/e.scale*i.scale,s=i.target.getBoundingClientRect(),r=function(t,e){const i=Math.abs(t.clientX-e.clientX),o=Math.abs(t.clientY-e.clientY),a=i/o;let n,s;return a>.3&&a<1.7?n=s=!0:i>o?n=!0:s=!0,{x:n,y:s}}(a[0],a[1]),l=e.options.zoom.mode;U_(t,{x:r.x&&k_(l,"x",t)?n:1,y:r.y&&k_(l,"y",t)?n:1,focalPoint:{x:o.x-s.left,y:o.y-s.top}},"zoom","pinch"),e.scale=i.scale}}function gf(t,e,i){const o=e.delta;o&&(e.panning=!0,G_(t,{x:i.deltaX-o.x,y:i.deltaY-o.y},e.panScales),e.delta={x:i.deltaX,y:i.deltaY})}const bf=new WeakMap;function vf(t,e){const i=D_(t),o=t.canvas,{pan:a,zoom:n}=e,s=new v_.Manager(o);n&&n.pinch.enabled&&(s.add(new v_.Pinch),s.on("pinchstart",(e=>function(t,e,i){if(e.options.zoom.pinch.enabled){const o=zd(i,t);!1===bl(e.options.zoom.onZoomStart,[{chart:t,event:i,point:o}])?(e.scale=null,bl(e.options.zoom.onZoomRejected,[{chart:t,event:i}])):e.scale=1}}(t,i,e))),s.on("pinch",(e=>ff(t,i,e))),s.on("pinchend",(e=>function(t,e,i){e.scale&&(ff(t,e,i),e.scale=null,bl(e.options.zoom.onZoomComplete,[{chart:t}]))}(t,i,e)))),a&&a.enabled&&(s.add(new v_.Pan({threshold:a.threshold,enable:_f(t,i)})),s.on("panstart",(e=>function(t,e,i){const{enabled:o,onPanStart:a,onPanRejected:n}=e.options.pan;if(!o)return;const s=i.target.getBoundingClientRect(),r={x:i.center.x-s.left,y:i.center.y-s.top};if(!1===bl(a,[{chart:t,event:i,point:r}]))return bl(n,[{chart:t,event:i}]);e.panScales=T_(e.options.pan,r,t),e.delta={x:0,y:0},gf(t,e,i)}(t,i,e))),s.on("panmove",(e=>gf(t,i,e))),s.on("panend",(()=>function(t,e){e.delta=null,e.panning&&(e.panning=!1,e.filterNextClick=!0,bl(e.options.pan.onPanComplete,[{chart:t}]))}(t,i)))),bf.set(t,s)}function yf(t){const e=bf.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),bf.delete(t))}function wf(t,e,i){const o=i.zoom.drag,{dragStart:a,dragEnd:n}=D_(t);if(o.drawTime!==e||!n)return;const{left:s,top:r,width:l,height:c}=hf(t,i.zoom.mode,{dragStart:a,dragEnd:n},o.maintainAspectRatio),d=t.ctx;d.save(),d.beginPath(),d.fillStyle=o.backgroundColor||"rgba(225,225,225,0.3)",d.fillRect(s,r,l,c),o.borderWidth>0&&(d.lineWidth=o.borderWidth,d.strokeStyle=o.borderColor||"rgba(225,225,225)",d.strokeRect(s,r,l,c)),d.restore()}var xf={id:"zoom",version:"2.2.0",defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(t,e,i){D_(t).options=i,Object.prototype.hasOwnProperty.call(i.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(i.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(i.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),v_&&vf(t,i),t.pan=(e,i,o)=>G_(t,e,i,o),t.zoom=(e,i)=>U_(t,e,i),t.zoomRect=(e,i,o)=>Y_(t,e,i,o),t.zoomScale=(e,i,o)=>q_(t,e,i,o),t.resetZoom=e=>Z_(t,e),t.getZoomLevel=()=>X_(t),t.getInitialScaleBounds=()=>Q_(t),t.getZoomedScaleBounds=()=>function(t){const e=D_(t),i={};for(const o of Object.keys(t.scales))i[o]=e.updatedScaleLimits[o];return i}(t),t.isZoomedOrPanned=()=>function(t){const e=Q_(t);for(const i of Object.keys(t.scales)){const{min:o,max:a}=e[i];if(void 0!==o&&t.scales[i].min!==o)return!0;if(void 0!==a&&t.scales[i].max!==a)return!0}return!1}(t),t.isZoomingOrPanning=()=>J_(t)},beforeEvent(t,{event:e}){if(J_(t))return!1;if("click"===e.type||"mouseup"===e.type){const e=D_(t);if(e.filterNextClick)return e.filterNextClick=!1,!1}},beforeUpdate:function(t,e,i){const o=D_(t),a=o.options;o.options=i,function(t,e){const{pan:i,zoom:o}=t,{pan:a,zoom:n}=e;return o?.zoom?.pinch?.enabled!==n?.zoom?.pinch?.enabled||i?.enabled!==a?.enabled||i?.threshold!==a?.threshold}(a,i)&&(yf(t),vf(t,i)),function(t,e){const i=t.canvas,{wheel:o,drag:a,onZoomComplete:n}=e.zoom;o.enabled?(of(t,i,"wheel",pf),mf(t,"onZoomComplete",n,250)):ef(t,"wheel"),a.enabled?(of(t,i,"mousedown",lf),of(t,i.ownerDocument,"mouseup",uf)):(ef(t,"mousedown"),ef(t,"mousemove"),ef(t,"mouseup"),ef(t,"keydown"))}(t,i)},beforeDatasetsDraw(t,e,i){wf(t,"beforeDatasetsDraw",i)},afterDatasetsDraw(t,e,i){wf(t,"afterDatasetsDraw",i)},beforeDraw(t,e,i){wf(t,"beforeDraw",i)},afterDraw(t,e,i){wf(t,"afterDraw",i)},stop:function(t){!function(t){ef(t,"mousedown"),ef(t,"mousemove"),ef(t,"mouseup"),ef(t,"wheel"),ef(t,"click"),ef(t,"keydown")}(t),v_&&yf(t),function(t){M_.delete(t)}(t)},panFunctions:R_,zoomFunctions:H_,zoomRectFunctions:I_},kf=Object.freeze({__proto__:null,default:xf,pan:G_,resetZoom:Z_,zoom:U_,zoomRect:Y_,zoomScale:q_});function Sf(t){const e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new t.constructor(+t):"number"==typeof t||"[object Number]"===e||"string"==typeof t||"[object String]"===e?new Date(t):new Date(NaN)}function Tf(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function Mf(t,e){const i=Sf(t);return isNaN(e)?Tf(t,NaN):e?(i.setDate(i.getDate()+e),i):i}function Df(t,e){const i=Sf(t);if(isNaN(e))return Tf(t,NaN);if(!e)return i;const o=i.getDate(),a=Tf(t,i.getTime());a.setMonth(i.getMonth()+e+1,0);return o>=a.getDate()?a:(i.setFullYear(a.getFullYear(),a.getMonth(),o),i)}function Cf(t,e){return Tf(t,+Sf(t)+e)}const Af=6048e5,Pf=864e5,Ef=6e4,Lf=36e5;let $f={};function zf(){return $f}function Of(t,e){const i=zf(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=Sf(t),n=a.getDay(),s=(n=a.getTime()?i+1:e.getTime()>=s.getTime()?i:i-1}function If(t){const e=Sf(t);return e.setHours(0,0,0,0),e}function Rf(t){const e=Sf(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Ff(t,e){const i=If(t),o=If(e),a=+i-Rf(i),n=+o-Rf(o);return Math.round((a-n)/Pf)}function Nf(t,e){const i=Sf(t),o=Sf(e),a=i.getTime()-o.getTime();return a<0?-1:a>0?1:a}function jf(t){if(!(e=t,e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)||"number"==typeof t))return!1;var e;const i=Sf(t);return!isNaN(Number(i))}function Wf(t,e){const i=Sf(t),o=Sf(e),a=Bf(i,o),n=Math.abs(Ff(i,o));i.setDate(i.getDate()-a*n);const s=a*(n-Number(Bf(i,o)===-a));return 0===s?0:s}function Bf(t,e){const i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function Uf(t){return e=>{const i=(t?Math[t]:Math.trunc)(e);return 0===i?0:i}}function Yf(t,e){return+Sf(t)-+Sf(e)}function qf(t){const e=Sf(t);return e.setHours(23,59,59,999),e}function Zf(t){const e=Sf(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Xf(t,e){const i=Sf(t),o=Sf(e),a=Nf(i,o),n=Math.abs(function(t,e){const i=Sf(t),o=Sf(e);return 12*(i.getFullYear()-o.getFullYear())+(i.getMonth()-o.getMonth())}(i,o));let s;if(n<1)s=0;else{1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*n);let e=Nf(i,o)===-a;(function(t){const e=Sf(t);return+qf(e)==+Zf(e)})(Sf(t))&&1===n&&1===Nf(t,o)&&(e=!1),s=a*(n-Number(e))}return 0===s?0:s}function Kf(t,e){const i=Sf(t),o=Sf(e),a=Nf(i,o),n=Math.abs(function(t,e){const i=Sf(t),o=Sf(e);return i.getFullYear()-o.getFullYear()}(i,o));i.setFullYear(1584),o.setFullYear(1584);const s=a*(n-+(Nf(i,o)===-a));return 0===s?0:s}function Gf(t){const e=Sf(t),i=Tf(t,0);return i.setFullYear(e.getFullYear(),0,1),i.setHours(0,0,0,0),i}const Qf={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Jf(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const tg={date:Jf({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Jf({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Jf({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ig(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,a=i?.width?String(i.width):e;o=t.formattingValues[a]||t.formattingValues[e]}else{const e=t.defaultWidth,a=i?.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}const og={ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:ig({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ig({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:ig({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ig({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ig({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function ag(t){return(e,i={})=>{const o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],n=e.match(a);if(!n)return null;const s=n[0],r=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(r)?function(t,e){for(let i=0;it.test(s))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(r,(t=>t.test(s)));let c;c=t.valueCallback?t.valueCallback(l):l,c=i.valueCallback?i.valueCallback(c):c;return{value:c,rest:e.slice(s.length)}}}const ng={ordinalNumber:(sg={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(sg.matchPattern);if(!i)return null;const o=i[0],a=t.match(sg.parsePattern);if(!a)return null;let n=sg.valueCallback?sg.valueCallback(a[0]):a[0];return n=e.valueCallback?e.valueCallback(n):n,{value:n,rest:t.slice(o.length)}}),era:ag({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ag({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:ag({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ag({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ag({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var sg;const rg={code:"en-US",formatDistance:(t,e,i)=>{let o;const a=Qf[t];return o="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:tg,formatRelative:(t,e,i,o)=>eg[t],localize:og,match:ng,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lg(t){const e=Sf(t),i=+Vf(e)-+function(t){const e=Hf(t),i=Tf(t,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Vf(i)}(e);return Math.round(i/Af)+1}function cg(t,e){const i=Sf(t),o=i.getFullYear(),a=zf(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=Tf(t,0);s.setFullYear(o+1,0,n),s.setHours(0,0,0,0);const r=Of(s,e),l=Tf(t,0);l.setFullYear(o,0,n),l.setHours(0,0,0,0);const c=Of(l,e);return i.getTime()>=r.getTime()?o+1:i.getTime()>=c.getTime()?o:o-1}function dg(t,e){const i=Sf(t),o=+Of(i,e)-+function(t,e){const i=zf(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=cg(t,e),n=Tf(t,0);return n.setFullYear(a,0,o),n.setHours(0,0,0,0),Of(n,e)}(i,e);return Math.round(o/Af)+1}function hg(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const ug={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return hg("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):hg(i+1,2)},d:(t,e)=>hg(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>hg(t.getHours()%12||12,e.length),H:(t,e)=>hg(t.getHours(),e.length),m:(t,e)=>hg(t.getMinutes(),e.length),s:(t,e)=>hg(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return hg(Math.trunc(o*Math.pow(10,i-3)),e.length)}},pg="midnight",mg="noon",_g="morning",fg="afternoon",gg="evening",bg="night",vg={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return ug.y(t,e)},Y:function(t,e,i,o){const a=cg(t,o),n=a>0?a:1-a;if("YY"===e){return hg(n%100,2)}return"Yo"===e?i.ordinalNumber(n,{unit:"year"}):hg(n,e.length)},R:function(t,e){return hg(Hf(t),e.length)},u:function(t,e){return hg(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return hg(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return hg(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return ug.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return hg(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const a=dg(t,o);return"wo"===e?i.ordinalNumber(a,{unit:"week"}):hg(a,e.length)},I:function(t,e,i){const o=lg(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):hg(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):ug.d(t,e)},D:function(t,e,i){const o=function(t){const e=Sf(t);return Ff(e,Gf(e))+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):hg(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const a=t.getDay(),n=(a-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(n);case"ee":return hg(n,2);case"eo":return i.ordinalNumber(n,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const a=t.getDay(),n=(a-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(n);case"cc":return hg(n,e.length);case"co":return i.ordinalNumber(n,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),a=0===o?7:o;switch(e){case"i":return String(a);case"ii":return hg(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let a;switch(a=12===o?mg:0===o?pg:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let a;switch(a=o>=17?gg:o>=12?fg:o>=4?_g:bg,e){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return ug.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):ug.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):hg(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):hg(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):ug.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):ug.s(t,e)},S:function(t,e){return ug.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return wg(o);case"XXXX":case"XX":return xg(o);default:return xg(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return wg(o);case"xxxx":case"xx":return xg(o);default:return xg(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+yg(o,":");default:return"GMT"+xg(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+yg(o,":");default:return"GMT"+xg(o,":")}},t:function(t,e,i){return hg(Math.trunc(t.getTime()/1e3),e.length)},T:function(t,e,i){return hg(t.getTime(),e.length)}};function yg(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),a=Math.trunc(o/60),n=o%60;return 0===n?i+String(a):i+String(a)+e+hg(n,2)}function wg(t,e){if(t%60==0){return(t>0?"-":"+")+hg(Math.abs(t)/60,2)}return xg(t,e)}function xg(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+hg(Math.trunc(o/60),2)+e+hg(o%60,2)}const kg=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Sg=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Tg={p:Sg,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],a=i[2];if(!a)return kg(t,e);let n;switch(o){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",kg(o,e)).replace("{{time}}",Sg(a,e))}},Mg=/^D+$/,Dg=/^Y+$/,Cg=["D","DD","YY","YYYY"];function Ag(t){return Mg.test(t)}function Pg(t){return Dg.test(t)}function Eg(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),Cg.includes(t))throw new RangeError(o)}const Lg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$g=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zg=/^'([^]*?)'?$/,Og=/''/g,Vg=/[a-zA-Z]/;function Hg(t){const e=t.match(zg);return e?e[1].replace(Og,"'"):t}class Ig{subPriority=0;validate(t,e){return!0}}class Rg extends Ig{constructor(t,e,i,o,a){super(),this.value=t,this.validateValue=e,this.setValue=i,this.priority=o,a&&(this.subPriority=a)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,i){return this.setValue(t,e,this.value,i)}}class Fg extends Ig{priority=10;subPriority=-1;set(t,e){return e.timestampIsSet?t:Tf(t,function(t,e){const i=e instanceof Date?Tf(e,0):new e(0);return i.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i}(t,Date))}}class Ng{run(t,e,i,o){const a=this.parse(t,e,i,o);return a?{setter:new Rg(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(t,e,i){return!0}}const jg=/^(1[0-2]|0?\d)/,Wg=/^(3[0-1]|[0-2]?\d)/,Bg=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ug=/^(5[0-3]|[0-4]?\d)/,Yg=/^(2[0-3]|[0-1]?\d)/,qg=/^(2[0-4]|[0-1]?\d)/,Zg=/^(1[0-1]|0?\d)/,Xg=/^(1[0-2]|0?\d)/,Kg=/^[0-5]?\d/,Gg=/^[0-5]?\d/,Qg=/^\d/,Jg=/^\d{1,2}/,tb=/^\d{1,3}/,eb=/^\d{1,4}/,ib=/^-?\d+/,ob=/^-?\d/,ab=/^-?\d{1,2}/,nb=/^-?\d{1,3}/,sb=/^-?\d{1,4}/,rb=/^([+-])(\d{2})(\d{2})?|Z/,lb=/^([+-])(\d{2})(\d{2})|Z/,cb=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,db=/^([+-])(\d{2}):(\d{2})|Z/,hb=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ub(t,e){return t?{value:e(t.value),rest:t.rest}:t}function pb(t,e){const i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function mb(t,e){const i=e.match(t);if(!i)return null;if("Z"===i[0])return{value:0,rest:e.slice(1)};const o="+"===i[1]?1:-1,a=i[2]?parseInt(i[2],10):0,n=i[3]?parseInt(i[3],10):0,s=i[5]?parseInt(i[5],10):0;return{value:o*(a*Lf+n*Ef+1e3*s),rest:e.slice(i[0].length)}}function _b(t){return pb(ib,t)}function fb(t,e){switch(t){case 1:return pb(Qg,e);case 2:return pb(Jg,e);case 3:return pb(tb,e);case 4:return pb(eb,e);default:return pb(new RegExp("^\\d{1,"+t+"}"),e)}}function gb(t,e){switch(t){case 1:return pb(ob,e);case 2:return pb(ab,e);case 3:return pb(nb,e);case 4:return pb(sb,e);default:return pb(new RegExp("^-?\\d{1,"+t+"}"),e)}}function bb(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function vb(t,e){const i=e>0,o=i?e:1-e;let a;if(o<=50)a=t||100;else{const e=o+50;a=t+100*Math.trunc(e/100)-(t>=e%100?100:0)}return i?a:1-a}function yb(t){return t%400==0||t%4==0&&t%100!=0}const wb=[31,28,31,30,31,30,31,31,30,31,30,31],xb=[31,29,31,30,31,30,31,31,30,31,30,31];function kb(t,e,i){const o=zf(),a=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Sf(t),s=n.getDay(),r=7-a;return Mf(n,e<0||e>6?e-(s+r)%7:((e%7+7)%7+r)%7-(s+r)%7)}function Sb(t,e){const i=Sf(t),o=function(t){let e=Sf(t).getDay();return 0===e&&(e=7),e}(i);return Mf(i,e-o)}const Tb={G:new class extends Ng{priority=140;parse(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}set(t,e,i){return e.era=i,t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]},y:new class extends Ng{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,i){const o=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return ub(fb(4,t),o);case"yo":return ub(i.ordinalNumber(t,{unit:"year"}),o);default:return ub(fb(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i){const o=t.getFullYear();if(i.isTwoDigitYear){const e=vb(i.year,o);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}const a="era"in e&&1!==e.era?1-i.year:i.year;return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}},Y:new class extends Ng{priority=130;parse(t,e,i){const o=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return ub(fb(4,t),o);case"Yo":return ub(i.ordinalNumber(t,{unit:"year"}),o);default:return ub(fb(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i,o){const a=cg(t,o);if(i.isTwoDigitYear){const e=vb(i.year,a);return t.setFullYear(e,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Of(t,o)}const n="era"in e&&1!==e.era?1-i.year:i.year;return t.setFullYear(n,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Of(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends Ng{priority=130;parse(t,e){return gb("R"===e?4:e.length,t)}set(t,e,i){const o=Tf(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Vf(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends Ng{priority=130;parse(t,e){return gb("u"===e?4:e.length,t)}set(t,e,i){return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends Ng{priority=120;parse(t,e,i){switch(e){case"Q":case"QQ":return fb(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setMonth(3*(i-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends Ng{priority=120;parse(t,e,i){switch(e){case"q":case"qq":return fb(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setMonth(3*(i-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends Ng{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,i){const o=t=>t-1;switch(e){case"M":return ub(pb(jg,t),o);case"MM":return ub(fb(2,t),o);case"Mo":return ub(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}},L:new class extends Ng{priority=110;parse(t,e,i){const o=t=>t-1;switch(e){case"L":return ub(pb(jg,t),o);case"LL":return ub(fb(2,t),o);case"Lo":return ub(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends Ng{priority=100;parse(t,e,i){switch(e){case"w":return pb(Ug,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return fb(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i,o){return Of(function(t,e,i){const o=Sf(t),a=dg(o,i)-e;return o.setDate(o.getDate()-7*a),o}(t,i,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends Ng{priority=100;parse(t,e,i){switch(e){case"I":return pb(Ug,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return fb(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i){return Vf(function(t,e){const i=Sf(t),o=lg(i)-e;return i.setDate(i.getDate()-7*o),i}(t,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends Ng{priority=90;subPriority=1;parse(t,e,i){switch(e){case"d":return pb(Wg,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return fb(e.length,t)}}validate(t,e){const i=yb(t.getFullYear()),o=t.getMonth();return i?e>=1&&e<=xb[o]:e>=1&&e<=wb[o]}set(t,e,i){return t.setDate(i),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends Ng{priority=90;subpriority=1;parse(t,e,i){switch(e){case"D":case"DD":return pb(Bg,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return fb(e.length,t)}}validate(t,e){return yb(t.getFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,i){return t.setMonth(0,i),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends Ng{priority=90;parse(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=kb(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends Ng{priority=90;parse(t,e,i,o){const a=t=>{const e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ub(fb(e.length,t),a);case"eo":return ub(i.ordinalNumber(t,{unit:"day"}),a);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=kb(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends Ng{priority=90;parse(t,e,i,o){const a=t=>{const e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ub(fb(e.length,t),a);case"co":return ub(i.ordinalNumber(t,{unit:"day"}),a);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=kb(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends Ng{priority=90;parse(t,e,i){const o=t=>0===t?7:t;switch(e){case"i":case"ii":return fb(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return ub(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return ub(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ub(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return ub(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,e){return e>=1&&e<=7}set(t,e,i){return(t=Sb(t,i)).setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends Ng{priority=80;parse(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(bb(i),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends Ng{priority=80;parse(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(bb(i),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends Ng{priority=80;parse(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(bb(i),0,0,0),t}incompatibleTokens=["a","b","t","T"]},h:new class extends Ng{priority=70;parse(t,e,i){switch(e){case"h":return pb(Xg,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return fb(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,i){const o=t.getHours()>=12;return o&&i<12?t.setHours(i+12,0,0,0):o||12!==i?t.setHours(i,0,0,0):t.setHours(0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]},H:new class extends Ng{priority=70;parse(t,e,i){switch(e){case"H":return pb(Yg,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return fb(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,i){return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends Ng{priority=70;parse(t,e,i){switch(e){case"K":return pb(Zg,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return fb(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.getHours()>=12&&i<12?t.setHours(i+12,0,0,0):t.setHours(i,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]},k:new class extends Ng{priority=70;parse(t,e,i){switch(e){case"k":return pb(qg,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return fb(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,i){const o=i<=24?i%24:i;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends Ng{priority=60;parse(t,e,i){switch(e){case"m":return pb(Kg,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return fb(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setMinutes(i,0,0),t}incompatibleTokens=["t","T"]},s:new class extends Ng{priority=50;parse(t,e,i){switch(e){case"s":return pb(Gg,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return fb(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setSeconds(i,0),t}incompatibleTokens=["t","T"]},S:new class extends Ng{priority=30;parse(t,e){return ub(fb(e.length,t),(t=>Math.trunc(t*Math.pow(10,3-e.length))))}set(t,e,i){return t.setMilliseconds(i),t}incompatibleTokens=["t","T"]},X:new class extends Ng{priority=10;parse(t,e){switch(e){case"X":return mb(rb,t);case"XX":return mb(lb,t);case"XXXX":return mb(cb,t);case"XXXXX":return mb(hb,t);default:return mb(db,t)}}set(t,e,i){return e.timestampIsSet?t:Tf(t,t.getTime()-Rf(t)-i)}incompatibleTokens=["t","T","x"]},x:new class extends Ng{priority=10;parse(t,e){switch(e){case"x":return mb(rb,t);case"xx":return mb(lb,t);case"xxxx":return mb(cb,t);case"xxxxx":return mb(hb,t);default:return mb(db,t)}}set(t,e,i){return e.timestampIsSet?t:Tf(t,t.getTime()-Rf(t)-i)}incompatibleTokens=["t","T","X"]},t:new class extends Ng{priority=40;parse(t){return _b(t)}set(t,e,i){return[Tf(t,1e3*i),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends Ng{priority=20;parse(t){return _b(t)}set(t,e,i){return[Tf(t,i),{timestampIsSet:!0}]}incompatibleTokens="*"}},Mb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Db=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Cb=/^'([^]*?)'?$/,Ab=/''/g,Pb=/\S/,Eb=/[a-zA-Z]/;function Lb(t,e,i,o){const a=Object.assign({},zf()),n=o?.locale??a.locale??rg,s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,r=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(""===e)return""===t?Sf(i):Tf(i,NaN);const l={firstWeekContainsDate:s,weekStartsOn:r,locale:n},c=[new Fg],d=e.match(Db).map((t=>{const e=t[0];if(e in Tg){return(0,Tg[e])(t,n.formatLong)}return t})).join("").match(Mb),h=[];for(let a of d){!o?.useAdditionalWeekYearTokens&&Pg(a)&&Eg(a,e,t),!o?.useAdditionalDayOfYearTokens&&Ag(a)&&Eg(a,e,t);const s=a[0],r=Tb[s];if(r){const{incompatibleTokens:e}=r;if(Array.isArray(e)){const t=h.find((t=>e.includes(t.token)||t.token===s));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${a}\` at the same time`)}else if("*"===r.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${a}\` and any other token at the same time`);h.push({token:s,fullToken:a});const o=r.run(t,a,n.match,l);if(!o)return Tf(i,NaN);c.push(o.setter),t=o.rest}else{if(s.match(Eb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");if("''"===a?a="'":"'"===s&&(a=a.match(Cb)[1].replace(Ab,"'")),0!==t.indexOf(a))return Tf(i,NaN);t=t.slice(a.length)}}if(t.length>0&&Pb.test(t))return Tf(i,NaN);const u=c.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,i)=>i.indexOf(t)===e)).map((t=>c.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let p=Sf(i);if(isNaN(p.getTime()))return Tf(i,NaN);const m={};for(const t of u){if(!t.validate(p,l))return Tf(i,NaN);const e=t.set(p,m,l);Array.isArray(e)?(p=e[0],Object.assign(m,e[1])):p=e}return Tf(i,p)}function $b(t,e){const i=e?.additionalDigits??2,o=function(t){const e={},i=t.split(zb.dateTimeDelimiter);let o;if(i.length>2)return e;/:/.test(i[0])?o=i[0]:(e.date=i[0],o=i[1],zb.timeZoneDelimiter.test(e.date)&&(e.date=t.split(zb.timeZoneDelimiter)[0],o=t.substr(e.date.length,t.length)));if(o){const t=zb.timezone.exec(o);t?(e.time=o.replace(t[1],""),e.timezone=t[1]):e.time=o}return e}(t);let a;if(o.date){const t=function(t,e){const i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};const a=o[1]?parseInt(o[1]):null,n=o[2]?parseInt(o[2]):null;return{year:null===n?a:100*n,restDateString:t.slice((o[1]||o[2]).length)}}(o.date,i);a=function(t,e){if(null===e)return new Date(NaN);const i=t.match(Ob);if(!i)return new Date(NaN);const o=!!i[4],a=Ib(i[1]),n=Ib(i[2])-1,s=Ib(i[3]),r=Ib(i[4]),l=Ib(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,r,l)?function(t,e,i){const o=new Date(0);o.setUTCFullYear(t,0,4);const a=o.getUTCDay()||7,n=7*(e-1)+i+1-a;return o.setUTCDate(o.getUTCDate()+n),o}(e,r,l):new Date(NaN);{const t=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(Fb[e]||(Nb(t)?29:28))}(e,n,s)&&function(t,e){return e>=1&&e<=(Nb(t)?366:365)}(e,a)?(t.setUTCFullYear(e,n,Math.max(a,s)),t):new Date(NaN)}}(t.restDateString,t.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const n=a.getTime();let s,r=0;if(o.time&&(r=function(t){const e=t.match(Vb);if(!e)return NaN;const i=Rb(e[1]),o=Rb(e[2]),a=Rb(e[3]);if(!function(t,e,i){if(24===t)return 0===e&&0===i;return i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,a))return NaN;return i*Lf+o*Ef+1e3*a}(o.time),isNaN(r)))return new Date(NaN);if(!o.timezone){const t=new Date(n+r),e=new Date(0);return e.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e}return s=function(t){if("Z"===t)return 0;const e=t.match(Hb);if(!e)return 0;const i="+"===e[1]?-1:1,o=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;if(!function(t,e){return e>=0&&e<=59}(0,a))return NaN;return i*(o*Lf+a*Ef)}(o.timezone),isNaN(s)?new Date(NaN):new Date(n+r+s)}const zb={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ob=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Vb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Hb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ib(t){return t?parseInt(t):1}function Rb(t){return t&&parseFloat(t.replace(",","."))||0}const Fb=[31,null,31,30,31,30,31,31,30,31,30,31];function Nb(t){return t%400==0||t%4==0&&t%100!=0}const jb={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Ih._date.override({_id:"date-fns",formats:function(){return jb},parse:function(t,e){if(null==t)return null;const i=typeof t;return"number"===i||t instanceof Date?t=Sf(t):"string"===i&&(t="string"==typeof e?Lb(t,e,new Date,this.options):$b(t,this.options)),jf(t)?t.getTime():null},format:function(t,e){return function(t,e,i){const o=zf(),a=i?.locale??o.locale??rg,n=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,r=Sf(t);if(!jf(r))throw new RangeError("Invalid time value");let l=e.match($g).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,Tg[e])(t,a.formatLong):t})).join("").match(Lg).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:Hg(t)};if(vg[e])return{isToken:!0,value:t};if(e.match(Vg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));a.localize.preprocessor&&(l=a.localize.preprocessor(r,l));const c={firstWeekContainsDate:n,weekStartsOn:s,locale:a};return l.map((o=>{if(!o.isToken)return o.value;const n=o.value;return(!i?.useAdditionalWeekYearTokens&&Pg(n)||!i?.useAdditionalDayOfYearTokens&&Ag(n))&&Eg(n,e,String(t)),(0,vg[n[0]])(r,n,a.localize,c)})).join("")}(t,e,this.options)},add:function(t,e,i){switch(i){case"millisecond":return Cf(t,e);case"second":return function(t,e){return Cf(t,1e3*e)}(t,e);case"minute":return function(t,e){return Cf(t,e*Ef)}(t,e);case"hour":return function(t,e){return Cf(t,e*Lf)}(t,e);case"day":return Mf(t,e);case"week":return function(t,e){return Mf(t,7*e)}(t,e);case"month":return Df(t,e);case"quarter":return function(t,e){return Df(t,3*e)}(t,e);case"year":return function(t,e){return Df(t,12*e)}(t,e);default:return t}},diff:function(t,e,i){switch(i){case"millisecond":return Yf(t,e);case"second":return function(t,e,i){const o=Yf(t,e)/1e3;return Uf(i?.roundingMethod)(o)}(t,e);case"minute":return function(t,e,i){const o=Yf(t,e)/Ef;return Uf(i?.roundingMethod)(o)}(t,e);case"hour":return function(t,e,i){const o=Yf(t,e)/Lf;return Uf(i?.roundingMethod)(o)}(t,e);case"day":return Wf(t,e);case"week":return function(t,e,i){const o=Wf(t,e)/7;return Uf(i?.roundingMethod)(o)}(t,e);case"month":return Xf(t,e);case"quarter":return function(t,e,i){const o=Xf(t,e)/3;return Uf(i?.roundingMethod)(o)}(t,e);case"year":return Kf(t,e);default:return 0}},startOf:function(t,e,i){switch(e){case"second":return function(t){const e=Sf(t);return e.setMilliseconds(0),e}(t);case"minute":return function(t){const e=Sf(t);return e.setSeconds(0,0),e}(t);case"hour":return function(t){const e=Sf(t);return e.setMinutes(0,0,0),e}(t);case"day":return If(t);case"week":return Of(t);case"isoWeek":return Of(t,{weekStartsOn:+i});case"month":return function(t){const e=Sf(t);return e.setDate(1),e.setHours(0,0,0,0),e}(t);case"quarter":return function(t){const e=Sf(t),i=e.getMonth(),o=i-i%3;return e.setMonth(o,1),e.setHours(0,0,0,0),e}(t);case"year":return Gf(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){const e=Sf(t);return e.setMilliseconds(999),e}(t);case"minute":return function(t){const e=Sf(t);return e.setSeconds(59,999),e}(t);case"hour":return function(t){const e=Sf(t);return e.setMinutes(59,59,999),e}(t);case"day":return qf(t);case"week":return function(t,e){const i=zf(),o=i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=Sf(t),n=a.getDay(),s=6+(nt.schema)),o=Object.assign({},...i);return e?Ua(o):ja(o)}(ja({index:Wa(Na()),view_index:Wa(Na()),view_layout:Ha(),type:Ba()}),ja({entity:Wa(Ba()),name:Wa(Ba()),icon:Wa(Ba()),autoStartStopEnableEntity:Wa(Ba()),autoStartStopStopModeEntity:Wa(Ba()),autoFanEnableEntity:Wa(Ba()),powerEntity:Wa(Ba()),visibility:Wa(Ha())}),ja({disable_name:Wa(Ra()),disable_window:Wa(Ra()),disable_autoStartStop:Wa(Ra()),disable_overpowering:Wa(Ra()),disable_heat:Wa(Ra()),disable_cool:Wa(Ra()),disable_heat_cool:Wa(Ra()),disable_auto:Wa(Ra()),disable_dry:Wa(Ra()),disable_fan_only:Wa(Ra()),disable_off:Wa(Ra()),disable_sleep:Wa(Ra()),disable_safety_warning:Wa(Ra()),disable_power_infos:Wa(Ra()),disable_auto_fan_infos:Wa(Ra()),disable_target_icon:Wa(Ra()),set_current_as_main:Wa(Ra()),eco_temperature:Wa(Na()),disable_menu:Wa(Ra()),disable_buttons:Wa(Ra()),allow_lock_toggle:Wa(Ra()),disable_presets:Wa(Ra()),theme:Wa(Ya([Fa("classic"),Fa("vtherm"),Fa("uncolored"),Fa("gunmalmg")])),disable_timed_preset:Wa(Ra()),use_manual_duration_input:Wa(Ra()),allow_preset_modification:Wa(Ra()),show_status_text:Wa(Ra()),show_background_gradient_on_active:Wa(Ra()),show_regulation_chart:Wa(Ra())}));var Ub;const Yb=["icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],qb=t=>{var e,i;customElements.get("ha-form")&&(customElements.get("hui-action-editor")||((t,e,i,o)=>{const[a,n,s]=t.split(".",3);return Number(a)>e||Number(a)===e&&(void 0===o?Number(n)>=i:Number(n)>i)||void 0!==o&&Number(a)===e&&Number(n)===i&&Number(s)>=o})(t,2022,11))||null===(e=customElements.get("hui-button-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-entity-picker")||null===(i=customElements.get("hui-entities-card"))||void 0===i||i.getConfigElement()},Zb=["theme","autoStartStopEnableEntity","autoStartStopStopModeEntity","autoFanEnableEntity","powerEntity","section_all_themes","section_classic_only","disable_name","disable_window","disable_autoStartStop","disable_overpowering","disable_heat","disable_cool","disable_heat_cool","disable_auto","disable_dry","disable_fan_only","disable_off","disable_sleep","disable_menu","disable_safety_warning","disable_buttons","set_current_as_main","disable_power_infos","disable_auto_fan_infos","disable_target_icon","allow_lock_toggle","disable_presets","disable_timed_preset","use_manual_duration_input","allow_preset_modification","show_status_text","show_background_gradient_on_active","show_regulation_chart"],Xb=wa(((t,e)=>[{name:"entity",selector:{entity:{domain:["climate"]}}},{name:"name",selector:{text:{}}},{name:"theme",selector:{select:{options:t}}},{type:"grid",name:"",schema:[{name:"autoStartStopEnableEntity",selector:{entity:{domain:["switch"]}}},{name:"autoStartStopStopModeEntity",selector:{entity:{domain:["select"]}}},{name:"autoFanEnableEntity",selector:{entity:{domain:["switch"]}}},{name:"powerEntity",selector:{entity:{domain:["sensor","input_number"]}}}]},{type:"expandable",name:"section_all_themes",icon:"mdi:cog",schema:[{name:"disable_name",selector:{boolean:{}}},{name:"disable_safety_warning",selector:{boolean:{}}},{name:"set_current_as_main",selector:{boolean:{}}},{name:"allow_lock_toggle",selector:{boolean:{}}},{name:"disable_timed_preset",selector:{boolean:{}}},{name:"use_manual_duration_input",selector:{boolean:{}}},{name:"allow_preset_modification",selector:{boolean:{}}},{name:"show_regulation_chart",selector:{boolean:{}}}]},...e?[]:[{type:"expandable",name:"section_classic_only",icon:"mdi:palette-outline",schema:[{name:"disable_window",selector:{boolean:{}}},{name:"disable_autoStartStop",selector:{boolean:{}}},{name:"disable_overpowering",selector:{boolean:{}}},{name:"disable_heat",selector:{boolean:{}}},{name:"disable_cool",selector:{boolean:{}}},{name:"disable_heat_cool",selector:{boolean:{}}},{name:"disable_auto",selector:{boolean:{}}},{name:"disable_dry",selector:{boolean:{}}},{name:"disable_fan_only",selector:{boolean:{}}},{name:"disable_off",selector:{boolean:{}}},{name:"disable_sleep",selector:{boolean:{}}},{name:"disable_menu",selector:{boolean:{}}},{name:"disable_buttons",selector:{boolean:{}}},{name:"disable_power_infos",selector:{boolean:{}}},{name:"disable_auto_fan_infos",selector:{boolean:{}}},{name:"disable_target_icon",selector:{boolean:{}}},{name:"disable_presets",selector:{boolean:{}}},{name:"show_status_text",selector:{boolean:{}}},{name:"show_background_gradient_on_active",selector:{boolean:{}}}]}]]));let Kb=Ub=class extends lt{constructor(){super(...arguments),this._computeLabel=t=>{const e=fa(this.hass);return Yb.includes(t.name)?e(`editor.card.generic.${t.name}`):Zb.includes(t.name)?e(`editor.card.climate.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),qb(this.hass.connection.haVersion)}setConfig(t){za(t,Bb),this._config=t}render(){var t;if(!this.hass||!this._config)return W``;const e=fa(this.hass),i=[{value:"classic",label:e("editor.card.climate.theme_classic")||"Classic"},{value:"vtherm",label:e("editor.card.climate.theme_vtherm")||"VTherm"},{value:"uncolored",label:e("editor.card.climate.theme_uncolored")||"Uncolored"},{value:"gunmalmg",label:e("editor.card.climate.theme_gunmalmg")||"Gunmalmg"}],o="gunmalmg"===(null===(t=this._config)||void 0===t?void 0:t.theme),a=Xb(i,o),n=Object.assign({},this._config),s={};for(const t of Ub.ALL_THEMES_KEYS)void 0!==this._config[t]&&(s[t]=this._config[t]),delete n[t];if(n.section_all_themes=s,!o){const t={};for(const e of Ub.CLASSIC_ONLY_KEYS)void 0!==this._config[e]&&(t[e]=this._config[e]),delete n[e];n.section_classic_only=t}return W` - `}_valueChanged(t){const e=t.detail.value,{section_all_themes:i,section_classic_only:o}=e,n=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n