diff --git a/.HA_VERSION b/.HA_VERSION index 022bbf3..75431fe 100644 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -2022.12.6 \ No newline at end of file +2022.12.8 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 26b8339..1851256 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ home-assistant.log home-assistant.log.1 home-assistant.log.fault +/custom_components/* +/tts/* +/blueprints/* # Example .gitignore file for your config dir. # An * ensures that everything will be ignored. diff --git a/automations.yaml b/automations.yaml index 1fbf4d6..7058399 100644 --- a/automations.yaml +++ b/automations.yaml @@ -142,8 +142,8 @@ trigger: - platform: device type: turned_off - device_id: 800c3462cb0da0ee95bfcf8c5154278c - entity_id: light.lamp_sfeer_dimmer_1 + device_id: bc61b8f4ddf2fc04d3a0a6001ea7c7c8 + entity_id: light.lamp_sfeer_woonkamer domain: light condition: - condition: time @@ -631,3 +631,217 @@ target: entity_id: scene.tuin_uit mode: single +- id: '1671571758539' + alias: deurbel - test + description: '' + trigger: + - type: turned_on + platform: device + device_id: 7c1ced4c0307f87bc9a1b16401d6c4cd + entity_id: binary_sensor.voordeur_person_detected + domain: binary_sensor + condition: [] + action: + - data: {} + entity_id: all + service: sonos.snapshot + - service: media_player.volume_set + data: + volume_level: 0.1 + target: + device_id: 2025ba7cc40315fb7a2a617c6264c1e3 + - service: media_player.play_media + data: + media_content_id: media-source://media_source/local/Ding-dong.mp3 + media_content_type: music + target: + device_id: 2025ba7cc40315fb7a2a617c6264c1e3 + - data: {} + entity_id: all + service: sonos.restore + mode: single +- id: '1671659606183' + alias: Alles uit + description: '' + trigger: + - platform: device + domain: mqtt + device_id: c976ab1909dcc67895eccdce5708b0dc + type: action + subtype: brightness_move_down_1 + discovery_id: 0x60a423fffe28320f action_brightness_move_down_1 + condition: [] + action: + - service: scene.turn_on + data: {} + target: + entity_id: scene.beneden_alles_uit + mode: single +- id: '1672422599074' + alias: '[BP] Slaapkamer tim schakelaar' + description: '' + use_blueprint: + path: mfarad/zigbee2mqtt-ikea-remote-styrbar-type-e2001-e2002.yaml + input: + action_sensor: sensor.schakelaar_slaapkamer_tim_action + brightness_down_action: + - service: scene.turn_on + data: + transition: 2 + target: + entity_id: scene.slaapkamer_tim_blauw + brightness_up_action: + - type: toggle + device_id: 1834f301f21c8a1d8a7a16fe8ee2b6b2 + entity_id: light.0xdc8e95fffefec1f0 + domain: light + brightness_up_long_action: + - device_id: 1834f301f21c8a1d8a7a16fe8ee2b6b2 + domain: light + entity_id: light.0xdc8e95fffefec1f0 + type: brightness_increase + arrow_right_action: + - service: scene.turn_on + data: + transition: 2 + target: + entity_id: scene.slaapkamer_tim_rood + arrow_left_action: + - service: scene.turn_on + data: + transition: 2 + target: + entity_id: scene.slaapkamer_tim_groen +- id: '1672424581965' + alias: slaapkamer tim - schakelaar (Actions) + description: '' + trigger: + - platform: device + domain: mqtt + device_id: d0236404a6f4ecea5d6ad618510c9bc1 + type: action + subtype: arrow_left_click + discovery_id: 0x003c84fffe32c0c0 action_arrow_left_click + id: arrow_left_click + - platform: device + domain: mqtt + device_id: d0236404a6f4ecea5d6ad618510c9bc1 + type: action + subtype: arrow_right_click + discovery_id: 0x003c84fffe32c0c0 action_arrow_right_click + id: arrow_right_click + - platform: device + domain: mqtt + device_id: d0236404a6f4ecea5d6ad618510c9bc1 + type: action + subtype: 'off' + discovery_id: 0x003c84fffe32c0c0 action_off + id: off_action + - platform: device + domain: mqtt + device_id: d0236404a6f4ecea5d6ad618510c9bc1 + type: action + subtype: 'on' + discovery_id: 0x003c84fffe32c0c0 action_on + id: on_action + - platform: device + domain: mqtt + device_id: d0236404a6f4ecea5d6ad618510c9bc1 + type: action + subtype: brightness_move_up + discovery_id: 0x003c84fffe32c0c0 action_brightness_move_up + id: brightness_move_up + - platform: device + domain: mqtt + device_id: d0236404a6f4ecea5d6ad618510c9bc1 + type: action + subtype: brightness_move_down + discovery_id: 0x003c84fffe32c0c0 action_brightness_move_down + id: brightness_move_down + condition: [] + action: + - choose: + - conditions: + - condition: trigger + id: arrow_right_click + sequence: + - service: light.turn_on + target: + entity_id: light.rgb_slaapkamer_tim + data: + color_temp: '{% if state_attr("light.rgb_slaapkamer_tim","color_temp") is + none %} 454 {% elif state_attr("light.rgb_slaapkamer_tim","color_temp")|int + > 350 %} 333 {% elif state_attr("light.rgb_slaapkamer_tim","color_temp")|int + > 332 %} 285 {% elif state_attr("light.rgb_slaapkamer_tim","color_temp")|int + > 284 %} 244 {% else %} 370 {% endif %} + + ' + - conditions: + - condition: trigger + id: off_action + sequence: + - type: turn_off + device_id: 1834f301f21c8a1d8a7a16fe8ee2b6b2 + entity_id: light.rgb_slaapkamer_tim + domain: light + - conditions: + - condition: trigger + id: arrow_left_click + sequence: + - service: light.turn_on + data: + rgb_color: + - '{{ (range(0, 255)|random) }}' + - '{{ (range(0, 255)|random) }}' + - '{{ (range(0, 255)|random) }}' + target: + entity_id: light.rgb_slaapkamer_tim + - conditions: + - condition: trigger + id: on_action + sequence: + - type: turn_on + device_id: 1834f301f21c8a1d8a7a16fe8ee2b6b2 + entity_id: light.rgb_slaapkamer_tim + domain: light + - conditions: + - condition: trigger + id: brightness_move_up + sequence: + - service: light.turn_on + target: + entity_id: light.rgb_slaapkamer_tim + data: + brightness: '{% if state_attr("light.rgb_slaapkamer_tim","brightness") is + none %} 8 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + < 9 %} 16 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + < 17 %} 32 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + < 33 %} 64 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + < 65 %} 128 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + < 129 %} 160 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + < 161 %} 192 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + < 193 %} 224 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + < 225 %} 255 {% else %} 10 {% endif %} + + ' + - conditions: + - condition: trigger + id: brightness_move_down + sequence: + - service: light.turn_on + target: + entity_id: light.rgb_slaapkamer_tim + data: + brightness: '{% if state_attr("light.rgb_slaapkamer_tim","brightness") is + none %} 32 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + > 254 %} 224 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + > 223 %} 192 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + > 191 %} 160 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + > 159 %} 128 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + > 127 %} 64 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + > 63 %} 32 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + > 31 %} 16 {% elif state_attr("light.rgb_slaapkamer_tim","brightness")|int + > 15 %} 8 {% else %} 128 {% endif %} + + ' + mode: single diff --git a/configuration.yaml b/configuration.yaml index 8e46fd9..0f4f4d0 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -4,5 +4,6 @@ scene: !include scenes.yaml homeassistant: #packages: !include_dir_named packages/ packages: !include_dir_named "integrations" - - + + media_dirs: + media: /media \ No newline at end of file diff --git a/custom_components/hacs/__pycache__/__init__.cpython-310.pyc b/custom_components/hacs/__pycache__/__init__.cpython-310.pyc index 7b8f123..7ef9ddf 100644 Binary files a/custom_components/hacs/__pycache__/__init__.cpython-310.pyc and b/custom_components/hacs/__pycache__/__init__.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/base.cpython-310.pyc b/custom_components/hacs/__pycache__/base.cpython-310.pyc index 9c129ab..123adac 100644 Binary files a/custom_components/hacs/__pycache__/base.cpython-310.pyc and b/custom_components/hacs/__pycache__/base.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/config_flow.cpython-310.pyc b/custom_components/hacs/__pycache__/config_flow.cpython-310.pyc index 421958c..d42b25e 100644 Binary files a/custom_components/hacs/__pycache__/config_flow.cpython-310.pyc and b/custom_components/hacs/__pycache__/config_flow.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/const.cpython-310.pyc b/custom_components/hacs/__pycache__/const.cpython-310.pyc index b0a88d7..25aafc9 100644 Binary files a/custom_components/hacs/__pycache__/const.cpython-310.pyc and b/custom_components/hacs/__pycache__/const.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/diagnostics.cpython-310.pyc b/custom_components/hacs/__pycache__/diagnostics.cpython-310.pyc index 43a4d57..43c32a9 100644 Binary files a/custom_components/hacs/__pycache__/diagnostics.cpython-310.pyc and b/custom_components/hacs/__pycache__/diagnostics.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/entity.cpython-310.pyc b/custom_components/hacs/__pycache__/entity.cpython-310.pyc index 294cea8..0d1e5fb 100644 Binary files a/custom_components/hacs/__pycache__/entity.cpython-310.pyc and b/custom_components/hacs/__pycache__/entity.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/enums.cpython-310.pyc b/custom_components/hacs/__pycache__/enums.cpython-310.pyc index 5ee7ee7..f448eeb 100644 Binary files a/custom_components/hacs/__pycache__/enums.cpython-310.pyc and b/custom_components/hacs/__pycache__/enums.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/exceptions.cpython-310.pyc b/custom_components/hacs/__pycache__/exceptions.cpython-310.pyc index 8fc5139..7f5f01b 100644 Binary files a/custom_components/hacs/__pycache__/exceptions.cpython-310.pyc and b/custom_components/hacs/__pycache__/exceptions.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/frontend.cpython-310.pyc b/custom_components/hacs/__pycache__/frontend.cpython-310.pyc index 11e097d..676f4ae 100644 Binary files a/custom_components/hacs/__pycache__/frontend.cpython-310.pyc and b/custom_components/hacs/__pycache__/frontend.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/sensor.cpython-310.pyc b/custom_components/hacs/__pycache__/sensor.cpython-310.pyc index 50f4f01..612589f 100644 Binary files a/custom_components/hacs/__pycache__/sensor.cpython-310.pyc and b/custom_components/hacs/__pycache__/sensor.cpython-310.pyc differ diff --git a/custom_components/hacs/__pycache__/system_health.cpython-310.pyc b/custom_components/hacs/__pycache__/system_health.cpython-310.pyc index a0a709e..74a2273 100644 Binary files a/custom_components/hacs/__pycache__/system_health.cpython-310.pyc and b/custom_components/hacs/__pycache__/system_health.cpython-310.pyc differ diff --git a/custom_components/hacs/base.py b/custom_components/hacs/base.py index 5179dbd..31b7ed9 100644 --- a/custom_components/hacs/base.py +++ b/custom_components/hacs/base.py @@ -32,7 +32,7 @@ from homeassistant.helpers.issue_registry import async_create_issue, IssueSeveri from homeassistant.loader import Integration from homeassistant.util import dt -from .const import DOMAIN, TV +from .const import DOMAIN, TV, URL_BASE from .enums import ( ConfigurationType, HacsCategory, @@ -164,6 +164,8 @@ class HacsStatus: startup: bool = True new: bool = False + active_frontend_endpoint_plugin: bool = False + active_frontend_endpoint_theme: bool = False @dataclass @@ -984,3 +986,43 @@ class HacsBase: if was_installed: self.log.critical("Restarting Home Assistant") self.hass.async_create_task(self.hass.async_stop(100)) + + @callback + def async_setup_frontend_endpoint_plugin(self) -> None: + """Setup the http endpoints for plugins if its not already handled.""" + if self.status.active_frontend_endpoint_plugin or not os.path.exists( + self.hass.config.path("www/community") + ): + return + + self.log.info("Setting up plugin endpoint") + use_cache = self.core.lovelace_mode == "storage" + self.log.info( + " %s mode, cache for /hacsfiles/: %s", + self.core.lovelace_mode, + use_cache, + ) + + self.hass.http.register_static_path( + URL_BASE, + self.hass.config.path("www/community"), + cache_headers=use_cache, + ) + + self.status.active_frontend_endpoint_plugin = True + + @callback + def async_setup_frontend_endpoint_themes(self) -> None: + """Setup the http endpoints for themes if its not already handled.""" + if ( + self.configuration.experimental + or self.status.active_frontend_endpoint_theme + or not os.path.exists(self.hass.config.path("themes")) + ): + return + + self.log.info("Setting up themes endpoint") + # Register themes + self.hass.http.register_static_path(f"{URL_BASE}/themes", self.hass.config.path("themes")) + + self.status.active_frontend_endpoint_theme = True diff --git a/custom_components/hacs/const.py b/custom_components/hacs/const.py index da19d3f..2097056 100644 --- a/custom_components/hacs/const.py +++ b/custom_components/hacs/const.py @@ -6,7 +6,9 @@ from aiogithubapi.common.const import ACCEPT_HEADERS NAME_SHORT = "HACS" DOMAIN = "hacs" CLIENT_ID = "395a8e669c5de9f7c6e8" -MINIMUM_HA_VERSION = "2022.10.0" +MINIMUM_HA_VERSION = "2022.11.0" + +URL_BASE = "/hacsfiles" TV = TypeVar("TV") diff --git a/custom_components/hacs/frontend.py b/custom_components/hacs/frontend.py index 3d20d6b..b37e577 100644 --- a/custom_components/hacs/frontend.py +++ b/custom_components/hacs/frontend.py @@ -7,14 +7,13 @@ from aiohttp import web from homeassistant.components.http import HomeAssistantView from homeassistant.core import HomeAssistant, callback -from .const import DOMAIN +from .const import DOMAIN, URL_BASE from .hacs_frontend import locate_dir, VERSION as FE_VERSION from .hacs_frontend_experimental import ( locate_dir as experimental_locate_dir, VERSION as EXPERIMENTAL_FE_VERSION, ) -URL_BASE = "/hacsfiles" if TYPE_CHECKING: from .base import HacsBase @@ -24,8 +23,8 @@ if TYPE_CHECKING: def async_register_frontend(hass: HomeAssistant, hacs: HacsBase) -> None: """Register the frontend.""" - # Register themes - hass.http.register_static_path(f"{URL_BASE}/themes", hass.config.path("themes")) + # Setup themes endpoint if needed + hacs.async_setup_frontend_endpoint_themes() # Register frontend if hacs.configuration.frontend_repo_url: @@ -50,20 +49,6 @@ def async_register_frontend(hass: HomeAssistant, hacs: HacsBase) -> None: hass.data["frontend_extra_module_url"] = set() hass.data["frontend_extra_module_url"].add(f"{URL_BASE}/iconset.js") - # Register www/community for all other files - use_cache = hacs.core.lovelace_mode == "storage" - hacs.log.info( - " %s mode, cache for /hacsfiles/: %s", - hacs.core.lovelace_mode, - use_cache, - ) - - hass.http.register_static_path( - URL_BASE, - hass.config.path("www/community"), - cache_headers=use_cache, - ) - hacs.frontend_version = ( FE_VERSION if not hacs.configuration.experimental else EXPERIMENTAL_FE_VERSION ) @@ -86,6 +71,9 @@ def async_register_frontend(hass: HomeAssistant, hacs: HacsBase) -> None: require_admin=True, ) + # Setup plugin endpoint if needed + hacs.async_setup_frontend_endpoint_plugin() + class HacsFrontendDev(HomeAssistantView): """Dev View Class for HACS.""" diff --git a/custom_components/hacs/hacs_frontend/__pycache__/__init__.cpython-310.pyc b/custom_components/hacs/hacs_frontend/__pycache__/__init__.cpython-310.pyc index ddc08ad..f5ed2a8 100644 Binary files a/custom_components/hacs/hacs_frontend/__pycache__/__init__.cpython-310.pyc and b/custom_components/hacs/hacs_frontend/__pycache__/__init__.cpython-310.pyc differ diff --git a/custom_components/hacs/hacs_frontend/__pycache__/__init__.cpython-311.pyc b/custom_components/hacs/hacs_frontend/__pycache__/__init__.cpython-311.pyc index 6363267..0b0728e 100644 Binary files a/custom_components/hacs/hacs_frontend/__pycache__/__init__.cpython-311.pyc and b/custom_components/hacs/hacs_frontend/__pycache__/__init__.cpython-311.pyc differ diff --git a/custom_components/hacs/hacs_frontend/__pycache__/version.cpython-310.pyc b/custom_components/hacs/hacs_frontend/__pycache__/version.cpython-310.pyc index 3c5c26e..d080200 100644 Binary files a/custom_components/hacs/hacs_frontend/__pycache__/version.cpython-310.pyc and b/custom_components/hacs/hacs_frontend/__pycache__/version.cpython-310.pyc differ diff --git a/custom_components/hacs/hacs_frontend/__pycache__/version.cpython-311.pyc b/custom_components/hacs/hacs_frontend/__pycache__/version.cpython-311.pyc index d1e7f15..5d484ad 100644 Binary files a/custom_components/hacs/hacs_frontend/__pycache__/version.cpython-311.pyc and b/custom_components/hacs/hacs_frontend/__pycache__/version.cpython-311.pyc differ diff --git a/custom_components/hacs/hacs_frontend_experimental/__pycache__/__init__.cpython-310.pyc b/custom_components/hacs/hacs_frontend_experimental/__pycache__/__init__.cpython-310.pyc index b7cdb53..77d94ce 100644 Binary files a/custom_components/hacs/hacs_frontend_experimental/__pycache__/__init__.cpython-310.pyc and b/custom_components/hacs/hacs_frontend_experimental/__pycache__/__init__.cpython-310.pyc differ diff --git a/custom_components/hacs/hacs_frontend_experimental/__pycache__/__init__.cpython-311.pyc b/custom_components/hacs/hacs_frontend_experimental/__pycache__/__init__.cpython-311.pyc index 648cc5d..5cbbf8b 100644 Binary files a/custom_components/hacs/hacs_frontend_experimental/__pycache__/__init__.cpython-311.pyc and b/custom_components/hacs/hacs_frontend_experimental/__pycache__/__init__.cpython-311.pyc differ diff --git a/custom_components/hacs/hacs_frontend_experimental/__pycache__/version.cpython-310.pyc b/custom_components/hacs/hacs_frontend_experimental/__pycache__/version.cpython-310.pyc index 1d89bdc..846c9d4 100644 Binary files a/custom_components/hacs/hacs_frontend_experimental/__pycache__/version.cpython-310.pyc and b/custom_components/hacs/hacs_frontend_experimental/__pycache__/version.cpython-310.pyc differ diff --git a/custom_components/hacs/hacs_frontend_experimental/__pycache__/version.cpython-311.pyc b/custom_components/hacs/hacs_frontend_experimental/__pycache__/version.cpython-311.pyc index 3474b74..ae8b123 100644 Binary files a/custom_components/hacs/hacs_frontend_experimental/__pycache__/version.cpython-311.pyc and b/custom_components/hacs/hacs_frontend_experimental/__pycache__/version.cpython-311.pyc differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.05172f3d.js b/custom_components/hacs/hacs_frontend_experimental/c.05172f3d.js deleted file mode 100644 index 9dd3bf0..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.05172f3d.js +++ /dev/null @@ -1 +0,0 @@ -const t=(t,e,n)=>t(`component.${e}.title`)||(null==n?void 0:n.name)||e,e=(t,e)=>t.callWS({type:"manifest/get",integration:e});export{t as d,e as f}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.06557919.js b/custom_components/hacs/hacs_frontend_experimental/c.06557919.js deleted file mode 100644 index bcd1076..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.06557919.js +++ /dev/null @@ -1,850 +0,0 @@ -import{_ as t,j as e,y as i,Y as a,d as o,n as r,e as s,t as n,E as d,G as c,a7 as l,O as p,eL as h,i as m,k as u,aW as g,aD as _,eM as b,C as f,a6 as v,aE as y,eN as x,eO as w,a4 as k,aa as $}from"./main-c66a9a06.js";import{b as z}from"./c.41d13611.js";import"./c.b914d43e.js";import{L as I}from"./c.cb071af8.js";import{B as S,d as O,a as j}from"./c.10b44dbb.js";import"./c.24287846.js";import{c as C}from"./c.708f0e16.js";import{s as M,d as D}from"./c.a5550d10.js";import{M as T,g as E,B as H,b as R}from"./c.163f08fb.js";import{U as L}from"./c.811f664e.js";import{a as P}from"./c.4b0dc107.js";import{i as A}from"./c.b0145069.js";import{i as W,b as U,e as B}from"./c.07e395f8.js";import{d as G}from"./c.4f015773.js";import"./c.997c429c.js";import"./c.6ada13f5.js";import"./c.070412a6.js";import{c as F}from"./c.874c8cfd.js";import{t as N}from"./c.a0946910.js";import"./c.a6328fdc.js";function q(t){return"horizontal"===t?"row":"column"}t([r("ha-header-bar")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"method",key:"render",value:function(){return i`
-
- - -
-
`}},{kind:"get",static:!0,key:"styles",value:function(){return[a("/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/material-components/material-components-web/blob/master/LICENSE\n */\n.mdc-top-app-bar{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);color:white;display:flex;position:fixed;flex-direction:column;justify-content:space-between;box-sizing:border-box;width:100%;z-index:4}.mdc-top-app-bar .mdc-top-app-bar__action-item,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-top-app-bar .mdc-top-app-bar__action-item::before,.mdc-top-app-bar .mdc-top-app-bar__action-item::after,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon::after{background-color:#fff;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-primary, #fff))}.mdc-top-app-bar .mdc-top-app-bar__action-item:hover::before,.mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-surface--hover::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon:hover::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-upgraded--background-focused::before,.mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded):focus::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded--background-focused::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded)::after,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded):active::after,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-upgraded,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-top-app-bar__row{display:flex;position:relative;box-sizing:border-box;width:100%;height:64px}.mdc-top-app-bar__section{display:inline-flex;flex:1 1 auto;align-items:center;min-width:0;padding:8px 12px;z-index:1}.mdc-top-app-bar__section--align-start{justify-content:flex-start;order:-1}.mdc-top-app-bar__section--align-end{justify-content:flex-end;order:1}.mdc-top-app-bar__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit);padding-left:20px;padding-right:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;z-index:1}[dir=rtl] .mdc-top-app-bar__title,.mdc-top-app-bar__title[dir=rtl]{padding-left:0;padding-right:20px}.mdc-top-app-bar--short-collapsed{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:24px;border-bottom-left-radius:0}[dir=rtl] .mdc-top-app-bar--short-collapsed,.mdc-top-app-bar--short-collapsed[dir=rtl]{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:24px}.mdc-top-app-bar--short{top:0;right:auto;left:0;width:100%;transition:width 250ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-top-app-bar--short,.mdc-top-app-bar--short[dir=rtl]{right:0;left:auto}.mdc-top-app-bar--short .mdc-top-app-bar__row{height:56px}.mdc-top-app-bar--short .mdc-top-app-bar__section{padding:4px}.mdc-top-app-bar--short .mdc-top-app-bar__title{transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.mdc-top-app-bar--short-collapsed{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0,0,0,.12);width:56px;transition:width 300ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__title{display:none}.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__action-item{transition:padding 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item{width:112px}.mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end{padding-left:0;padding-right:12px}[dir=rtl] .mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end,.mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end[dir=rtl]{padding-left:12px;padding-right:0}.mdc-top-app-bar--dense .mdc-top-app-bar__row{height:48px}.mdc-top-app-bar--dense .mdc-top-app-bar__section{padding:0 4px}.mdc-top-app-bar--dense .mdc-top-app-bar__title{padding-left:12px;padding-right:0}[dir=rtl] .mdc-top-app-bar--dense .mdc-top-app-bar__title,.mdc-top-app-bar--dense .mdc-top-app-bar__title[dir=rtl]{padding-left:0;padding-right:12px}.mdc-top-app-bar--prominent .mdc-top-app-bar__row{height:128px}.mdc-top-app-bar--prominent .mdc-top-app-bar__title{align-self:flex-end;padding-bottom:2px}.mdc-top-app-bar--prominent .mdc-top-app-bar__action-item,.mdc-top-app-bar--prominent .mdc-top-app-bar__navigation-icon{align-self:flex-start}.mdc-top-app-bar--fixed{transition:box-shadow 200ms linear}.mdc-top-app-bar--fixed-scrolled{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0,0,0,.12);transition:box-shadow 200ms linear}.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__row{height:96px}.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__section{padding:0 12px}.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title{padding-left:20px;padding-right:0;padding-bottom:9px}[dir=rtl] .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title,.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title[dir=rtl]{padding-left:0;padding-right:20px}.mdc-top-app-bar--fixed-adjust{padding-top:64px}.mdc-top-app-bar--dense-fixed-adjust{padding-top:48px}.mdc-top-app-bar--short-fixed-adjust{padding-top:56px}.mdc-top-app-bar--prominent-fixed-adjust{padding-top:128px}.mdc-top-app-bar--dense-prominent-fixed-adjust{padding-top:96px}@media(max-width: 599px){.mdc-top-app-bar__row{height:56px}.mdc-top-app-bar__section{padding:4px}.mdc-top-app-bar--short{transition:width 200ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar--short-collapsed{transition:width 250ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end{padding-left:0;padding-right:12px}[dir=rtl] .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end,.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end[dir=rtl]{padding-left:12px;padding-right:0}.mdc-top-app-bar--prominent .mdc-top-app-bar__title{padding-bottom:6px}.mdc-top-app-bar--fixed-adjust{padding-top:56px}}\n\n/*# sourceMappingURL=mdc.top-app-bar.min.css.map*/"),o` - .mdc-top-app-bar { - position: static; - color: var(--mdc-theme-on-primary, #fff); - } - `]}}]}}),e);class K extends S{constructor(){super(...arguments),this._itemSize={},this._gaps={},this._padding={}}get _defaultConfig(){return Object.assign({},super._defaultConfig,{itemSize:{width:"300px",height:"300px"},gap:"8px",padding:"match-gap"})}get _gap(){return this._gaps.row}get _idealSize(){return this._itemSize[O(this.direction)]}get _idealSize1(){return this._itemSize[O(this.direction)]}get _idealSize2(){return this._itemSize[j(this.direction)]}get _gap1(){return this._gaps[(t=this.direction,"horizontal"===t?"column":"row")];var t}get _gap2(){return this._gaps[q(this.direction)]}get _padding1(){const t=this._padding,[e,i]="horizontal"===this.direction?["left","right"]:["top","bottom"];return[t[e],t[i]]}get _padding2(){const t=this._padding,[e,i]="horizontal"===this.direction?["top","bottom"]:["left","right"];return[t[e],t[i]]}set itemSize(t){const e=this._itemSize,i=parseInt(t.width),a=parseInt(t.height);i!==e.width&&(e.width=i,this._triggerReflow()),a!==e.height&&(e.height=a,this._triggerReflow())}_setGap(t){const e=t.split(" ").map((t=>function(t){return"auto"===t?1/0:parseInt(t)}(t))),i=this._gaps;e[0]!==i.row&&(i.row=e[0],this._triggerReflow()),void 0===e[1]?e[0]!==i.column&&(i.column=e[0],this._triggerReflow()):e[1]!==i.column&&(i.column=e[1],this._triggerReflow())}set padding(t){const e=this._padding,i=t.split(" ").map((t=>function(t){return"match-gap"===t?1/0:parseInt(t)}(t)));1===i.length?e.top=e.right=e.bottom=e.left=i[0]:2===i.length?(e.top=e.bottom=i[0],e.right=e.left=i[1]):3===i.length?(e.top=i[0],e.right=e.left=i[1],e.bottom=i[2]):4===i.length&&["top","right","bottom","left"].forEach(((t,a)=>e[t]=i[a]))}}class V extends K{constructor(){super(...arguments),this._metrics=null,this.flex=null,this.justify=null}get _defaultConfig(){return Object.assign({},super._defaultConfig,{flex:!1,justify:"start"})}set gap(t){this._setGap(t)}_updateLayout(){const t=this.justify,[e,i]=this._padding1,[a,o]=this._padding2;["_gap1","_gap2"].forEach((e=>{const i=this[e];if(i===1/0&&!["space-between","space-around","space-evenly"].includes(t))throw new Error("grid layout: gap can only be set to 'auto' when justify is set to 'space-between', 'space-around' or 'space-evenly'");if(i===1/0&&"_gap2"===e)throw new Error(`grid layout: ${q(this.direction)}-gap cannot be set to 'auto' when direction is set to ${this.direction}`)}));const r={rolumns:-1,itemSize1:-1,itemSize2:-1,gap1:this._gap1===1/0?-1:this._gap1,gap2:this._gap2,padding1:{start:e===1/0?this._gap1:e,end:i===1/0?this._gap1:i},padding2:{start:a===1/0?this._gap2:a,end:o===1/0?this._gap2:o},positions:[]};let s=this._viewDim2;this.flex||["start","center","end"].includes(t)?(s-=r.padding2.start,s-=r.padding2.end):"space-between"===t?s+=r.gap2:"space-evenly"===t&&(s-=r.gap2);const n=s/(this._idealSize2+r.gap2);if(this.flex){r.rolumns=Math.round(n),r.itemSize2=Math.round((s-r.gap2*(r.rolumns-1))/r.rolumns);switch(!0===this.flex?"area":this.flex.preserve){case"aspect-ratio":r.itemSize1=Math.round(this._idealSize1/this._idealSize2*r.itemSize2);break;case O(this.direction):r.itemSize1=Math.round(this._idealSize1);break;default:r.itemSize1=Math.round(this._idealSize1*this._idealSize2/r.itemSize2)}}else r.itemSize1=this._idealSize1,r.itemSize2=this._idealSize2,r.rolumns=Math.floor(n);let d,c;if(this.flex||["start","center","end"].includes(t)){const e=r.rolumns*r.itemSize2+(r.rolumns-1)*r.gap2;d=this.flex||"start"===t?r.padding2.start:"end"===t?this._viewDim2-r.padding2.end-e:Math.round(this._viewDim2/2-e/2),c=r.gap2}else{const a=s-r.rolumns*r.itemSize2;"space-between"===t?(c=Math.round(a/(r.rolumns-1)),d=0):"space-around"===t?(c=Math.round(a/r.rolumns),d=Math.round(c/2)):(c=Math.round(a/(r.rolumns+1)),d=c),this._gap1===1/0&&(r.gap1=c,e===1/0&&(r.padding1.start=d),i===1/0&&(r.padding1.end=d))}for(let t=0;tt.callWS({type:"media_source/browse_media",media_content_id:e}),J=t=>t.startsWith("media-source://media_source"),Q=async(t,e,i)=>{const a=new FormData;a.append("media_content_id",e),a.append("file",i);const o=await t.fetchWithAuth("/api/media_source/local_source/upload",{method:"POST",body:a});if(413===o.status)throw new Error(`Uploaded file is too large (${i.name})`);if(200!==o.status)throw new Error("Unknown error");return o.json()},X=async(t,e)=>t.callWS({type:"media_source/local_source/remove",media_content_id:e}),Z=t=>{const e=[];if(!t)return e;const i=new Set;for(const[a]of t.languages){if(i.has(a))continue;i.add(a);let t=a;if(a in N.translations)t=N.translations[a].nativeName;else{const[e,i]=a.split("-");e in N.translations&&(t=`${N.translations[e].nativeName}`,e.toLowerCase()!==i.toLowerCase()&&(t+=` (${i})`))}e.push([a,t])}return e.sort(((t,e)=>F(t[1],e[1])))},tt=(t,e,i)=>{const a=[];if(!e)return a;for(const[o,r]of e.languages)o===t&&a.push([r,"male"===r||"female"===r?i(`ui.panel.config.cloud.account.tts.${r}`):r]);return a.sort(((t,e)=>F(t[1],e[1])))};t([r("ha-browse-media-tts")],(function(t,e){class a extends e{constructor(...e){super(...e),t(this)}}return{F:a,d:[{kind:"field",decorators:[s()],key:"hass",value:void 0},{kind:"field",decorators:[s()],key:"item",value:void 0},{kind:"field",decorators:[s()],key:"action",value:void 0},{kind:"field",decorators:[n()],key:"_cloudDefaultOptions",value:void 0},{kind:"field",decorators:[n()],key:"_cloudOptions",value:void 0},{kind:"field",decorators:[n()],key:"_cloudTTSInfo",value:void 0},{kind:"field",decorators:[I("cloudTtsTryMessage",!0,!1)],key:"_message",value:void 0},{kind:"method",key:"render",value:function(){var t;return i` -
- - - ${this._cloudDefaultOptions?this._renderCloudOptions():""} -
-
- ${!this._cloudDefaultOptions||this._cloudDefaultOptions[0]===this._cloudOptions[0]&&this._cloudDefaultOptions[1]===this._cloudOptions[1]?i``:i` - - `} - - - ${this.hass.localize(`ui.components.media-browser.tts.action_${this.action}`)} - -
-
`}},{kind:"method",key:"_renderCloudOptions",value:function(){if(!this._cloudTTSInfo||!this._cloudOptions)return"";const t=this.getLanguages(this._cloudTTSInfo),e=this._cloudOptions,a=this.getSupportedGenders(e[0],this._cloudTTSInfo,this.hass.localize);return i` -
- - ${t.map((([t,e])=>i`${e}`))} - - - - ${a.map((([t,e])=>i`${e}`))} - -
- `}},{kind:"method",key:"willUpdate",value:function(t){var e,i;if(d(c(a.prototype),"willUpdate",this).call(this,t),t.has("item")){if(this.item.media_content_id){const t=new URLSearchParams(this.item.media_content_id.split("?")[1]),e=t.get("message"),i=t.get("language"),a=t.get("gender");e&&(this._message=e),i&&a&&(this._cloudOptions=[i,a])}this.isCloudItem&&!this._cloudTTSInfo&&((i=this.hass,i.callWS({type:"cloud/tts/info"})).then((t=>{this._cloudTTSInfo=t})),(t=>t.callWS({type:"cloud/status"}))(this.hass).then((t=>{t.logged_in&&(this._cloudDefaultOptions=t.prefs.tts_default_voice,this._cloudOptions||(this._cloudOptions={...this._cloudDefaultOptions}))})))}if(t.has("message"))return;const o=null===(e=this.shadowRoot.querySelector("ha-textarea"))||void 0===e?void 0:e.value;void 0!==o&&o!==this._message&&(this._message=o)}},{kind:"method",key:"_handleLanguageChange",value:async function(t){t.target.value!==this._cloudOptions[0]&&(this._cloudOptions=[t.target.value,this._cloudOptions[1]])}},{kind:"method",key:"_handleGenderChange",value:async function(t){t.target.value!==this._cloudOptions[1]&&(this._cloudOptions=[this._cloudOptions[0],t.target.value])}},{kind:"field",key:"getLanguages",value:()=>l(Z)},{kind:"field",key:"getSupportedGenders",value:()=>l(tt)},{kind:"get",key:"isCloudItem",value:function(){return this.item.media_content_id.startsWith("media-source://tts/cloud")}},{kind:"method",key:"_ttsClicked",value:async function(){const t=this.shadowRoot.querySelector("ha-textarea").value;this._message=t;const e={...this.item},i=new URLSearchParams;i.append("message",t),this._cloudOptions&&(i.append("language",this._cloudOptions[0]),i.append("gender",this._cloudOptions[1])),e.media_content_id=`${e.media_content_id.split("?")[0]}?${i.toString()}`,e.can_play=!0,e.title=t,p(this,"tts-picked",{item:e})}},{kind:"method",key:"_storeDefaults",value:async function(){const t=this._cloudDefaultOptions;this._cloudDefaultOptions=[...this._cloudOptions];try{await(e=this.hass,i={tts_default_voice:this._cloudDefaultOptions},e.callWS({type:"cloud/update_prefs",...i}))}catch(e){this._cloudDefaultOptions=t,P(this,{text:this.hass.localize("ui.components.media-browser.tts.faild_to_store_defaults",{error:e.message||e})})}var e,i}},{kind:"field",static:!0,key:"styles",value:()=>[h,o` - :host { - margin: 16px auto; - padding: 0 8px; - display: flex; - flex-direction: column; - max-width: 400px; - } - .cloud-options { - margin-top: 16px; - display: flex; - justify-content: space-between; - } - .cloud-options ha-select { - width: 48%; - } - ha-textarea { - width: 100%; - } - button.link { - color: var(--primary-color); - } - .card-actions { - display: flex; - justify-content: space-between; - } - `]}]}}),e),t([r("ha-media-player-browse")],(function(t,e){class a extends e{constructor(...e){super(...e),t(this)}}return{F:a,d:[{kind:"field",decorators:[s({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[s()],key:"entityId",value:void 0},{kind:"field",decorators:[s()],key:"action",value:()=>"play"},{kind:"field",decorators:[s({type:Boolean})],key:"dialog",value:()=>!1},{kind:"field",decorators:[s()],key:"navigateIds",value:void 0},{kind:"field",decorators:[s({type:Boolean,attribute:"narrow",reflect:!0})],key:"_narrow",value:()=>!1},{kind:"field",decorators:[s({type:Boolean,attribute:"scroll",reflect:!0})],key:"_scrolled",value:()=>!1},{kind:"field",decorators:[n()],key:"_error",value:void 0},{kind:"field",decorators:[n()],key:"_parentItem",value:void 0},{kind:"field",decorators:[n()],key:"_currentItem",value:void 0},{kind:"field",decorators:[m(".header")],key:"_header",value:void 0},{kind:"field",decorators:[m(".content")],key:"_content",value:void 0},{kind:"field",decorators:[m("lit-virtualizer")],key:"_virtualizer",value:void 0},{kind:"field",key:"_observed",value:()=>!1},{kind:"field",key:"_headerOffsetHeight",value:()=>0},{kind:"field",key:"_resizeObserver",value:void 0},{kind:"method",key:"connectedCallback",value:function(){d(c(a.prototype),"connectedCallback",this).call(this),this.updateComplete.then((()=>this._attachResizeObserver()))}},{kind:"method",key:"disconnectedCallback",value:function(){this._resizeObserver&&this._resizeObserver.disconnect()}},{kind:"method",key:"refresh",value:async function(){const t=this.navigateIds[this.navigateIds.length-1];try{this._currentItem=await this._fetchData(this.entityId,t.media_content_id,t.media_content_type),p(this,"media-browsed",{ids:this.navigateIds,current:this._currentItem})}catch(t){this._setError(t)}}},{kind:"method",key:"play",value:function(){var t;null!==(t=this._currentItem)&&void 0!==t&&t.can_play&&this._runAction(this._currentItem)}},{kind:"method",key:"willUpdate",value:function(t){var e;if(d(c(a.prototype),"willUpdate",this).call(this,t),t.has("entityId"))this._setError(void 0);else if(!t.has("navigateIds"))return;this._setError(void 0);const i=t.get("navigateIds"),o=this.navigateIds;null===(e=this._content)||void 0===e||e.scrollTo(0,0),this._scrolled=!1;const r=this._currentItem,s=this._parentItem;this._currentItem=void 0,this._parentItem=void 0;const n=o[o.length-1],l=o.length>1?o[o.length-2]:void 0;let h,m;t.has("entityId")||(i&&o.length===i.length+1&&i.every(((t,e)=>{const i=o[e];return i.media_content_id===t.media_content_id&&i.media_content_type===t.media_content_type}))?m=Promise.resolve(r):i&&o.length===i.length-1&&o.every(((t,e)=>{const a=i[e];return t.media_content_id===a.media_content_id&&t.media_content_type===a.media_content_type}))&&(h=Promise.resolve(s))),h||(h=this._fetchData(this.entityId,n.media_content_id,n.media_content_type)),h.then((t=>{this._currentItem=t,p(this,"media-browsed",{ids:o,current:t})}),(e=>{var a;i&&t.has("entityId")&&o.length===i.length&&i.every(((t,e)=>o[e].media_content_id===t.media_content_id&&o[e].media_content_type===t.media_content_type))?p(this,"media-browsed",{ids:[{media_content_id:void 0,media_content_type:void 0}],replace:!0}):"entity_not_found"===e.code&&L.includes(null===(a=this.hass.states[this.entityId])||void 0===a?void 0:a.state)?this._setError({message:this.hass.localize("ui.components.media-browser.media_player_unavailable"),code:"entity_not_found"}):this._setError(e)})),m||void 0===l||(m=this._fetchData(this.entityId,l.media_content_id,l.media_content_type)),m&&m.then((t=>{this._parentItem=t}))}},{kind:"method",key:"shouldUpdate",value:function(t){if(t.size>1||!t.has("hass"))return!0;const e=t.get("hass");return void 0===e||e.localize!==this.hass.localize}},{kind:"method",key:"firstUpdated",value:function(){this._measureCard(),this._attachResizeObserver()}},{kind:"method",key:"updated",value:function(t){if(d(c(a.prototype),"updated",this).call(this,t),t.has("_scrolled"))this._animateHeaderHeight();else if(t.has("_currentItem")){var e;if(this._setHeaderHeight(),this._observed)return;const t=null===(e=this._virtualizer)||void 0===e?void 0:e._virtualizer;t&&(this._observed=!0,setTimeout((()=>t._observeMutations()),0))}}},{kind:"method",key:"render",value:function(){if(this._error)return i` -
- - ${this._renderError(this._error)} - -
- `;if(!this._currentItem)return i``;const t=this._currentItem,e=this.hass.localize(`ui.components.media-browser.class.${t.media_class}`),a=t.children||[],o=T[t.media_class],r=t.children_media_class?T[t.children_media_class]:T.directory,s=t.thumbnail?this._getSignedThumbnail(t.thumbnail).then((t=>`url(${t})`)):"none";return i` - ${t.can_play?i` -
-
- ${t.thumbnail?i` -
- ${this._narrow&&null!=t&&t.can_play?i` - - - ${this.hass.localize(`ui.components.media-browser.${this.action}`)} - - `:""} -
- `:i``} -
- - ${!t.can_play||t.thumbnail&&this._narrow?"":i` - - - ${this.hass.localize(`ui.components.media-browser.${this.action}`)} - - `} -
-
-
- `:""} -
- ${this._error?i` -
- - ${this._renderError(this._error)} - -
- `:(d=t.media_content_id,d.startsWith("media-source://tts/")?i` - - `:a.length||t.not_shown?"grid"===r.layout?i` - - ${t.not_shown?i` -
-
- ${this.hass.localize("ui.components.media-browser.not_shown",{count:t.not_shown})} -
-
- `:""} - `:i` - - - ${t.not_shown?i` - - - ${this.hass.localize("ui.components.media-browser.not_shown",{count:t.not_shown})} - - - `:""} - - `:i` -
- ${"media-source://media_source/local/."===t.media_content_id?i` -
- - - - - ${this.hass.localize("ui.components.media-browser.file_management.highlight_button")} - -
- `:this.hass.localize("ui.components.media-browser.no_items")} -
- `)} -
- - - `;var n,d}},{kind:"field",key:"_renderGridItem",value(){return t=>{const e=t.thumbnail?this._getSignedThumbnail(t.thumbnail).then((t=>`url(${t})`)):"none";return i` -
- -
- ${t.thumbnail?i` -
- `:i` -
- -
- `} - ${t.can_play?i` - - `:""} -
-
- ${t.title} - ${t.title} -
-
-
- `}}},{kind:"field",key:"_renderListItem",value(){return t=>{const e=this._currentItem,a=T[e.media_class],o=a.show_list_images&&t.thumbnail?this._getSignedThumbnail(t.thumbnail).then((t=>`url(${t})`)):"none";return i` - -
- -
- ${t.title} -
- `}}},{kind:"method",key:"_getSignedThumbnail",value:async function(t){if(!t)return"";if(t.startsWith("/"))return(await E(this.hass,t)).path;var e;W(t)&&(t=U({domain:B(t),type:"icon",useFallback:!0,darkOptimized:null===(e=this.hass.themes)||void 0===e?void 0:e.darkMode}));return t}},{kind:"field",key:"_actionClicked",value(){return t=>{t.stopPropagation();const e=t.currentTarget.item;this._runAction(e)}}},{kind:"method",key:"_runAction",value:function(t){p(this,"media-picked",{item:t,navigateIds:this.navigateIds})}},{kind:"method",key:"_ttsPicked",value:function(t){t.stopPropagation();const e=this.navigateIds.slice(0,-1);e.push(t.detail.item),p(this,"media-picked",{...t.detail,navigateIds:e})}},{kind:"field",key:"_childClicked",value(){return async t=>{const e=t.currentTarget.item;e&&(e.can_expand?p(this,"media-browsed",{ids:[...this.navigateIds,e]}):this._runAction(e))}}},{kind:"method",key:"_fetchData",value:async function(t,e,i){return t!==H?R(this.hass,t,e,i):Y(this.hass,e)}},{kind:"method",key:"_measureCard",value:function(){this._narrow=(this.dialog?window.innerWidth:this.offsetWidth)<450}},{kind:"method",key:"_attachResizeObserver",value:async function(){this._resizeObserver||(await A(),this._resizeObserver=new ResizeObserver(D((()=>this._measureCard()),250,!1))),this._resizeObserver.observe(this)}},{kind:"method",key:"_closeDialogAction",value:function(){p(this,"close-dialog")}},{kind:"method",key:"_setError",value:function(t){this.dialog?t&&(this._closeDialogAction(),P(this,{title:this.hass.localize("ui.components.media-browser.media_browsing_error"),text:this._renderError(t)})):this._error=t}},{kind:"method",key:"_renderError",value:function(t){return"Media directory does not exist."===t.message?i` -

- ${this.hass.localize("ui.components.media-browser.no_local_media_found")} -

-

- ${this.hass.localize("ui.components.media-browser.no_media_folder")} -
- ${this.hass.localize("ui.components.media-browser.setup_local_help","documentation",i`${this.hass.localize("ui.components.media-browser.documentation")}`)} -
- ${this.hass.localize("ui.components.media-browser.local_media_files")} -

- `:i`${t.message}`}},{kind:"method",key:"_setHeaderHeight",value:async function(){await this.updateComplete;const t=this._header,e=this._content;t&&e&&(this._headerOffsetHeight=t.offsetHeight,e.style.marginTop=`${this._headerOffsetHeight}px`,e.style.maxHeight=`calc(var(--media-browser-max-height, 100%) - ${this._headerOffsetHeight}px)`)}},{kind:"method",key:"_animateHeaderHeight",value:function(){let t;const e=i=>{void 0===t&&(t=i);const a=i-t;this._setHeaderHeight(),a<400&&requestAnimationFrame(e)};requestAnimationFrame(e)}},{kind:"method",decorators:[v({passive:!0})],key:"_scroll",value:function(t){const e=t.currentTarget;!this._scrolled&&e.scrollTop>this._headerOffsetHeight?this._scrolled=!0:this._scrolled&&e.scrollTop0},{kind:"method",key:"render",value:function(){return this.currentItem&&J(this.currentItem.media_content_id||"")?i` - - - - `:i``}},{kind:"method",key:"_manage",value:function(){var t,e;t=this,e={currentItem:this.currentItem,onClose:()=>p(this,"media-refresh")},p(t,"show-dialog",{dialogTag:"dialog-media-manage",dialogImport:()=>import("./c.7a7e2d53.js"),dialogParams:e})}},{kind:"field",static:!0,key:"styles",value:()=>o` - mwc-button { - /* We use icon + text to show disabled state */ - --mdc-button-disabled-ink-color: --mdc-theme-primary; - } - - ha-svg-icon[slot="icon"], - ha-circular-progress[slot="icon"] { - vertical-align: middle; - } - - ha-svg-icon[slot="icon"] { - margin-inline-start: 0px; - margin-inline-end: 8px; - direction: var(--direction); - } - `}]}}),e),t([r("dialog-media-player-browse")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[s({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[n()],key:"_currentItem",value:void 0},{kind:"field",decorators:[n()],key:"_navigateIds",value:void 0},{kind:"field",decorators:[n()],key:"_params",value:void 0},{kind:"field",decorators:[m("ha-media-player-browse")],key:"_browser",value:void 0},{kind:"method",key:"showDialog",value:function(t){this._params=t,this._navigateIds=t.navigateIds||[{media_content_id:void 0,media_content_type:void 0}]}},{kind:"method",key:"closeDialog",value:function(){this._params=void 0,this._navigateIds=void 0,this._currentItem=void 0,p(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){return this._params&&this._navigateIds?i` - - - ${this._navigateIds.length>1?i` - - `:""} - - ${this._currentItem?this._currentItem.title:this.hass.localize("ui.components.media-browser.media-player-browser")} - - - - - - - - `:i``}},{kind:"method",key:"_goBack",value:function(){var t;this._navigateIds=null===(t=this._navigateIds)||void 0===t?void 0:t.slice(0,-1),this._currentItem=void 0}},{kind:"method",key:"_mediaBrowsed",value:function(t){this._navigateIds=t.detail.ids,this._currentItem=t.detail.current}},{kind:"method",key:"_mediaPicked",value:function(t){this._params.mediaPickedCallback(t.detail),"play"!==this._action&&this.closeDialog()}},{kind:"get",key:"_action",value:function(){return this._params.action||"play"}},{kind:"method",key:"_refreshMedia",value:function(){this._browser.refresh()}},{kind:"get",static:!0,key:"styles",value:function(){return[$,o` - ha-dialog { - --dialog-z-index: 8; - --dialog-content-padding: 0; - } - - ha-media-player-browse { - --media-browser-max-height: calc(100vh - 65px); - height: calc(100vh - 65px); - direction: ltr; - } - - @media (min-width: 800px) { - ha-dialog { - --mdc-dialog-max-width: 800px; - --dialog-surface-position: fixed; - --dialog-surface-top: 40px; - --mdc-dialog-max-height: calc(100vh - 72px); - } - ha-media-player-browse { - position: initial; - --media-browser-max-height: 100vh - 137px; - height: 100vh - 137px; - width: 700px; - } - } - - ha-header-bar { - --mdc-theme-on-primary: var(--primary-text-color); - --mdc-theme-primary: var(--mdc-theme-surface); - flex-shrink: 0; - border-bottom: 1px solid var(--divider-color, rgba(0, 0, 0, 0.12)); - } - - ha-media-manage-button { - --mdc-theme-primary: var(--mdc-theme-on-primary); - } - `]}}]}}),e);var et=Object.freeze({__proto__:null});export{Y as b,et as d,J as i,X as r,Q as u}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.06557919.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.06557919.js.gz deleted file mode 100644 index 3952b86..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.06557919.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.070412a6.js b/custom_components/hacs/hacs_frontend_experimental/c.070412a6.js deleted file mode 100644 index a6e258c..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.070412a6.js +++ /dev/null @@ -1,33 +0,0 @@ -import{f as e,h as t,e as a,t as o,a6 as i,j as d,R as r,y as n,k as p,d as c,_ as s,E as l,G as m,n as x}from"./main-c66a9a06.js";class b extends d{constructor(){super(...arguments),this.mini=!1,this.exited=!1,this.disabled=!1,this.extended=!1,this.showIconAtEnd=!1,this.reducedTouchTarget=!1,this.icon="",this.label="",this.shouldRenderRipple=!1,this.useStateLayerCustomProperties=!1,this.rippleHandlers=new r((()=>(this.shouldRenderRipple=!0,this.ripple)))}render(){const e=this.mini&&!this.reducedTouchTarget,t={"mdc-fab--mini":this.mini,"mdc-fab--touch":e,"mdc-fab--exited":this.exited,"mdc-fab--extended":this.extended,"icon-end":this.showIconAtEnd},a=this.label?this.label:this.icon;return n``}renderIcon(){return n``}renderTouchTarget(){const e=this.mini&&!this.reducedTouchTarget;return n`${e?n`
`:""}`}renderLabel(){const e=""!==this.label&&this.extended;return n`${e?n`${this.label}`:""}`}renderBeforeRipple(){return n``}renderRipple(){return this.shouldRenderRipple?n``:""}handleRippleActivate(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.handleRippleStartPress(e)}handleRippleStartPress(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}b.shadowRootOptions={mode:"open",delegatesFocus:!0},e([t("mwc-ripple")],b.prototype,"ripple",void 0),e([a({type:Boolean})],b.prototype,"mini",void 0),e([a({type:Boolean})],b.prototype,"exited",void 0),e([a({type:Boolean})],b.prototype,"disabled",void 0),e([a({type:Boolean})],b.prototype,"extended",void 0),e([a({type:Boolean})],b.prototype,"showIconAtEnd",void 0),e([a({type:Boolean})],b.prototype,"reducedTouchTarget",void 0),e([a()],b.prototype,"icon",void 0),e([a()],b.prototype,"label",void 0),e([o()],b.prototype,"shouldRenderRipple",void 0),e([o()],b.prototype,"useStateLayerCustomProperties",void 0),e([i({passive:!0})],b.prototype,"handleRippleStartPress",null);const f=c`:host .mdc-fab .material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{outline:none;--mdc-ripple-color: currentcolor;user-select:none;-webkit-tap-highlight-color:transparent;display:inline-flex;-webkit-tap-highlight-color:transparent;display:inline-flex;outline:none;user-select:none}:host .mdc-touch-target-wrapper{display:inline}:host .mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}:host .mdc-fab--extended .mdc-fab__ripple{border-radius:24px}:host .mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] :host .mdc-fab--extended .mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] :host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}:host .mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}:host .mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host .mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}:host .mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}:host .mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}:host .mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px}:host .mdc-fab,:host .mdc-fab:not(:disabled) .mdc-fab__icon,:host .mdc-fab:not(:disabled) .mdc-fab__label,:host .mdc-fab:disabled .mdc-fab__icon,:host .mdc-fab:disabled .mdc-fab__label{color:#fff;color:var(--mdc-theme-on-secondary, #fff)}:host .mdc-fab:not(.mdc-fab--extended){border-radius:50%}:host .mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:50%}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}:host .mdc-fab--extended .mdc-fab__ripple{border-radius:24px}:host .mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] :host .mdc-fab--extended .mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] :host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}:host .mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}:host .mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host .mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}:host .mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}:host .mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}:host .mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab .ripple{overflow:hidden}:host .mdc-fab:not(.mdc-fab--extended) .ripple{border-radius:50%}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:24px}:host .mdc-fab .mdc-fab__label{z-index:0}:host .mdc-fab .mdc-fab__icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}:host .mdc-fab--extended.mdc-fab--exited .mdc-fab__icon ::slotted(*){transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab{padding-top:0px;padding-top:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-right:0px;padding-right:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-bottom:0px;padding-bottom:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-left:0px;padding-left:max(0px, var(--mdc-fab-focus-outline-width, 0px));box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12))}:host .mdc-fab:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(:disabled):not(.mdc-ripple-upgraded):focus{border-color:initial;border-color:var(--mdc-fab-focus-outline-color, initial)}:host .mdc-fab:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(:disabled):not(.mdc-ripple-upgraded):focus{border-style:solid;border-width:var(--mdc-fab-focus-outline-width, 0px);padding-top:0px;padding-top:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-right:0px;padding-right:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-bottom:0px;padding-bottom:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-left:0px;padding-left:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1))}:host .mdc-fab:hover,:host .mdc-fab:focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}:host .mdc-fab:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12))}:host .mdc-fab .ripple{overflow:hidden}:host .mdc-fab .mdc-fab__label{z-index:0}:host .mdc-fab:not(.mdc-fab--extended) .ripple{border-radius:50%}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:24px}:host .mdc-fab .mdc-fab__icon{width:24px;width:var(--mdc-icon-size, 24px);height:24px;height:var(--mdc-icon-size, 24px);font-size:24px;font-size:var(--mdc-icon-size, 24px);transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform;display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab.mdc-fab--extended{padding-top:0px;padding-top:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-right:20px;padding-right:max(var(--mdc-fab-extended-label-padding, 20px), var(--mdc-fab-focus-outline-width, 0px));padding-bottom:0px;padding-bottom:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-left:20px;padding-left:max(var(--mdc-fab-extended-label-padding, 20px), var(--mdc-fab-focus-outline-width, 0px))}:host .mdc-fab.mdc-fab--extended:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab.mdc-fab--extended:not(:disabled):not(.mdc-ripple-upgraded):focus{border-style:solid;border-width:var(--mdc-fab-focus-outline-width, 0px);padding-top:0px;padding-top:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-right:20px;padding-right:max(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-bottom:0px;padding-bottom:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-left:20px;padding-left:max(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)) * -1))}:host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon{margin-left:12px;margin-left:var(--mdc-fab-extended-icon-padding, 12px);margin-right:calc(12px - 20px);margin-right:calc(var(--mdc-fab-extended-icon-padding, 12px) - var(--mdc-fab-extended-label-padding, 20px))}[dir=rtl] :host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon,:host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-left:calc(var(--mdc-fab-extended-icon-padding, 12px) - var(--mdc-fab-extended-label-padding, 20px));margin-right:12px;margin-right:var(--mdc-fab-extended-icon-padding, 12px)}`;s([x("ha-fab")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"method",key:"firstUpdated",value:function(e){l(m(a.prototype),"firstUpdated",this).call(this,e),this.style.setProperty("--mdc-theme-secondary","var(--primary-color)")}},{kind:"field",static:!0,key:"styles",value:()=>[f,c` - :host .mdc-fab--extended .mdc-fab__icon { - margin-inline-start: -8px; - margin-inline-end: 12px; - direction: var(--direction); - } - `,"rtl"===document.dir?c` - :host .mdc-fab--extended .mdc-fab__icon { - direction: rtl; - } - `:c``]}]}}),b); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.070412a6.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.070412a6.js.gz deleted file mode 100644 index 62e1932..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.070412a6.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.08837419.js b/custom_components/hacs/hacs_frontend_experimental/c.08837419.js deleted file mode 100644 index ebc2f8f..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.08837419.js +++ /dev/null @@ -1,94 +0,0 @@ -import{P as e,Q as t,_ as o,j as i,e as n,y as a,d as r,n as l}from"./main-c66a9a06.js";e({_template:t` - - - -`,is:"paper-item-body"}),o([l("ha-settings-row")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[n({type:Boolean,reflect:!0})],key:"narrow",value:void 0},{kind:"field",decorators:[n({type:Boolean,attribute:"three-line"})],key:"threeLine",value:()=>!1},{kind:"method",key:"render",value:function(){return a` -
- - - -
-
-
-
- `}},{kind:"get",static:!0,key:"styles",value:function(){return r` - :host { - display: flex; - padding: 0 16px; - align-content: normal; - align-self: auto; - align-items: center; - } - paper-item-body { - padding: 8px 16px 8px 0; - } - paper-item-body[two-line] { - min-height: calc( - var(--paper-item-body-two-line-min-height, 72px) - 16px - ); - flex: 1; - } - .content { - display: contents; - } - :host(:not([narrow])) .content { - display: var(--settings-row-content-display, flex); - justify-content: flex-end; - flex: 1; - padding: 16px 0; - } - .content ::slotted(*) { - width: var(--settings-row-content-width); - } - :host([narrow]) { - align-items: normal; - flex-direction: column; - border-top: 1px solid var(--divider-color); - padding-bottom: 8px; - } - ::slotted(ha-switch) { - padding: 16px 0; - } - div[secondary] { - white-space: normal; - } - .prefix-wrap { - display: var(--settings-row-prefix-display); - } - :host([narrow]) .prefix-wrap { - display: flex; - align-items: center; - } - `}}]}}),i); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.08837419.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.08837419.js.gz deleted file mode 100644 index b0f4f0e..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.08837419.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.10453141.js b/custom_components/hacs/hacs_frontend_experimental/c.10453141.js deleted file mode 100644 index 2223630..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.10453141.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as t,H as e,e as i,a7 as o,y as s,n as r}from"./main-c66a9a06.js";import{m as a}from"./c.ba59af11.js";import"./c.e8169f76.js";import"./c.73c7fa75.js";import"./c.743a15a1.js";import"./c.b914d43e.js";import"./c.8e28b461.js";let d=t([r("hacs-generic-dialog")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[i({type:Boolean})],key:"markdown",value:()=>!1},{kind:"field",decorators:[i()],key:"repository",value:void 0},{kind:"field",decorators:[i()],key:"header",value:void 0},{kind:"field",decorators:[i()],key:"content",value:void 0},{kind:"field",key:"_getRepository",value:()=>o(((t,e)=>null==t?void 0:t.find((t=>String(t.id)===e))))},{kind:"method",key:"render",value:function(){if(!this.active||!this.repository)return s``;const t=this._getRepository(this.hacs.repositories,this.repository);return s` - -
${this.header||""}
- ${this.markdown?this.repository?a.html(this.content||"",t):a.html(this.content||""):this.content||""} -
- `}}]}}),e);export{d as HacsGenericDialog}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.10453141.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.10453141.js.gz deleted file mode 100644 index bf64b3d..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.10453141.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.10c7d0ce.js b/custom_components/hacs/hacs_frontend_experimental/c.10c7d0ce.js index 02ef2e1..7925fdd 100644 --- a/custom_components/hacs/hacs_frontend_experimental/c.10c7d0ce.js +++ b/custom_components/hacs/hacs_frontend_experimental/c.10c7d0ce.js @@ -1 +1 @@ -let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let e=1;ee)return t[i-1]<=e;return!1}function i(t){return t>=127462&&t<=127487}function n(t,e,i=!0,n=!0){return(i?s:r)(t,e,n)}function s(t,n,s){if(n==t.length)return n;n&&o(t.charCodeAt(n))&&l(t.charCodeAt(n-1))&&n--;let r=h(t,n);for(n+=c(r);n=0&&i(h(t,s));)e++,s-=2;if(e%2==0)break;n+=2}}}return n}function r(t,e,i){for(;e>0;){let n=s(t,e-2,i);if(n=56320&&t<57344}function l(t){return t>=55296&&t<56320}function h(t,e){let i=t.charCodeAt(e);if(!l(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return o(n)?n-56320+(i-55296<<10)+65536:i}function a(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function c(t){return t<65536?1:2}function u(t,e,i=t.length){let s=0;for(let r=0;r=e)return s;if(s==t.length)break;r+=9==t.charCodeAt(s)?i-r%i:1,s=n(t,s)}return!0===s?-1:t.length}class d{constructor(){}lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),m.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){let i=[];return this.decompose(t,e,i,0),m.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new w(this),s=new w(t);for(let t=e,r=e;;){if(n.next(t),s.next(t),t=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(r+=n.value.length,n.done||r>=i)return!0}}iter(t=1){return new w(this,t)}iterRange(t,e=this.length){return new y(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new b(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new p(t):m.from(p.split(t,[])):d.empty}}class p extends d{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.text[s],o=n+r.length;if((e?i:o)>=t)return new x(n,o,i,r);n=o+1,i++}}decompose(t,e,i,n){let s=t<=0&&e>=this.length?this:new p(v(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&n){let t=i.pop(),e=g(s.text,t.text.slice(),0,s.length);if(e.length<=32)i.push(new p(e,t.length+s.length));else{let t=e.length>>1;i.push(new p(e.slice(0,t)),new p(e.slice(t)))}}else i.push(s)}replace(t,e,i){if(!(i instanceof p))return super.replace(t,e,i);let n=g(this.text,g(i.text,v(this.text,0,t)),e),s=this.length+i.length-(e-t);return n.length<=32?new p(n,s):m.from(p.split(n,[]),s)}sliceString(t,e=this.length,i="\n"){let n="";for(let s=0,r=0;s<=e&&rt&&r&&(n+=i),ts&&(n+=o.slice(Math.max(0,t-s),e-s)),s=l+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let s of t)i.push(s),n+=s.length+1,32==i.length&&(e.push(new p(i,n)),i=[],n=-1);return n>-1&&e.push(new p(i,n)),e}}class m extends d{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.children[s],o=n+r.length,l=i+r.lines-1;if((e?l:o)>=t)return r.lineInner(t,e,i,n);n=o+1,i=l+1}}decompose(t,e,i,n){for(let s=0,r=0;r<=e&&s=r){let s=n&((r<=t?1:0)|(l>=e?2:0));r>=t&&l<=e&&!s?i.push(o):o.decompose(t-r,e-r,i,s)}r=l+1}}replace(t,e,i){if(i.lines=s&&e<=o){let l=r.replace(t-s,e-s,i),h=this.lines-r.lines+l.lines;if(l.lines>4&&l.lines>h>>6){let s=this.children.slice();return s[n]=l,new m(s,this.length-(e-t)+i.length)}return super.replace(s,o,l)}s=o+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){let n="";for(let s=0,r=0;st&&s&&(n+=i),tr&&(n+=o.sliceString(t-r,e-r,i)),r=l+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof m))return 0;let i=0,[n,s,r,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,s+=e){if(n==r||s==o)return i;let l=this.children[n],h=t.children[s];if(l!=h)return i+l.scanIdentical(h,e);i+=l.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new p(i,e)}let n=Math.max(32,i>>5),s=n<<1,r=n>>1,o=[],l=0,h=-1,a=[];function c(t){let e;if(t.lines>s&&t instanceof m)for(let e of t.children)c(e);else t.lines>r&&(l>r||!l)?(u(),o.push(t)):t instanceof p&&l&&(e=a[a.length-1])instanceof p&&t.lines+e.lines<=32?(l+=t.lines,h+=t.length+1,a[a.length-1]=new p(e.text.concat(t.text),e.length+1+t.length)):(l+t.lines>n&&u(),l+=t.lines,h+=t.length+1,a.push(t))}function u(){0!=l&&(o.push(1==a.length?a[0]:m.from(a,h)),h=-1,l=a.length=0)}for(let e of t)c(e);return u(),1==o.length?o[0]:new m(o,e)}}function g(t,e,i=0,n=1e9){for(let s=0,r=0,o=!0;r=i&&(h>n&&(l=l.slice(0,n-s)),s0?1:(t instanceof p?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],r=s>>1,o=n instanceof p?n.text.length:n.children.length;if(r==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(n instanceof p){let s=n.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let s=n.children[r+(e<0?-1:0)];t>s.length?(t-=s.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(s),this.offsets.push(e>0?1:(s instanceof p?s.text.length:s.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class y{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new w(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class b{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(d.prototype[Symbol.iterator]=function(){return this.iter()},w.prototype[Symbol.iterator]=y.prototype[Symbol.iterator]=b.prototype[Symbol.iterator]=function(){return this});class x{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}}const k=/\r\n?|\n/;var S=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(S||(S={}));class A{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return s+(t-n);s+=o}else{if(i!=S.Simple&&h>=t&&(i==S.TrackDel&&nt||i==S.TrackBefore&&nt))return null;if(h>t||h==t&&e<0&&!o)return t==n||e<0?s:s+l;s+=l}n=h}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return s}touchesRange(t,e=t){for(let i=0,n=0;i=0&&n<=e&&s>=t)return!(ne)||"cover";n=s}return!1}toString(){let t="";for(let e=0;e=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new A(t)}}class C extends A{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return O(this,((e,i,n,s,r)=>t=t.replace(n,n+(i-e),r)),!1),t}mapDesc(t,e=!1){return T(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let n=0,s=0;n=0){e[n]=o,e[n+1]=r;let l=n>>1;for(;i.length0&&D(i,e,s.text),s.forward(t),o+=t}let h=t[r++];for(;o>1].toJSON()))}return t}static of(t,e,i){let n=[],s=[],r=0,o=null;function l(t=!1){if(!t&&!n.length)return;ro||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let c=a?"string"==typeof a?d.of(a.split(i||k)):a:d.empty,u=c.length;if(t==o&&0==u)return;tr&&M(n,t-r,-1),M(n,o-t,u),D(s,n,c),r=o}}(t),l(!o),o}static empty(t){return new C(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let n=0;ne&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)e.push(s[0],0);else{for(;i.length=0&&i<=0&&i==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=i:n?(t[s]+=e,t[s+1]+=i):t.push(e,i)}function D(t,e,i){if(0==i.length)return;let n=e.length-2>>1;if(n>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],h=t.sections[o++];e(s,a,r,c,u),s=a,r=c}}}function T(t,e,i,n=!1){let s=[],r=n?[]:null,o=new E(t),l=new E(e);for(let t=0,e=0;;)if(-1==o.ins)t+=o.len,o.next();else if(-1==l.ins&&e=0&&(o.done||ee&&!o.done&&t+o.len=0)){if(o.done&&l.done)return r?new C(s,r):new A(s);throw new Error("Mismatched change set lengths")}{let i=0,n=t+o.len;for(;;)if(l.ins>=0&&e>t&&e+l.lene||o.ins>=0&&o.len>e)&&(t||n.length>i),r.forward2(e),o.forward(e)}}else M(n,0,o.ins,t),s&&D(s,n,o.text),o.next()}}class E{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?d.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?d.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class L{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let t=3&this.flags;return 3==t?null:t}get goalColumn(){let t=this.flags>>5;return 33554431==t?void 0:t}map(t,e=-1){let i,n;return this.empty?i=n=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),n=t.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new L(i,n,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return B.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return B.range(this.anchor,i)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return B.range(t.anchor,t.head)}}class B{constructor(t,e=0){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:B.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let e=0;et.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new B(t.ranges.map((t=>L.fromJSON(t))),t.main)}static single(t,e=t){return new B([B.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;nt?4:0))}}function P(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let i=1;in.head?B.range(o,r):B.range(r,o))}}return new B(t,e)}function N(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let I=0;class V{constructor(t,e,i,n,s){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.extensions=s,this.id=I++,this.default=t([])}static define(t={}){return new V(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:H),!!t.static,t.enables)}of(t){return new W([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new W(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new W(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function H(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class W{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=I++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,s=this.id,r=t[s]>>1,o=2==this.type,l=!1,h=!1,a=[];for(let i of this.dependencies)"doc"==i?l=!0:"selection"==i?h=!0:0==(1&(null!==(e=t[i.id])&&void 0!==e?e:1))&&a.push(t[i.id]);return{create:t=>(t.values[r]=i(t),1),update(t,e){if(l&&e.docChanged||h&&(e.docChanged||e.selection)||a.some((e=>(1&et(t,e))>0))){let e=i(t);if(o?!z(e,t.values[r],n):!n(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure(t,e){let l=i(t),h=e.config.address[s];if(null!=h){let i=it(e,h);if(o?z(l,i,n):n(l,i))return t.values[r]=i,0}return t.values[r]=l,1}}}}function z(t,e,i){if(t.length!=e.length)return!1;for(let n=0;nt[e.id])),s=i.map((t=>t.type)),r=n.filter((t=>!(1&t))),o=t[e.id]>>1;function l(t){let i=[];for(let e=0;e1&et(t,e))))return 0;let n=l(t);return e.compare(n,t.values[o])?0:(t.values[o]=n,1)},reconfigure(t,s){let r=n.some((e=>1&et(t,e))),h=s.config.facets[e.id],a=s.facet(e);if(h&&!r&&H(i,h))return t.values[o]=a,0;let c=l(t);return e.compare(c,a)?(t.values[o]=a,0):(t.values[o]=c,1)}}}const q=V.define({static:!0});class _{constructor(t,e,i,n,s){this.id=t,this.createF=e,this.updateF=i,this.compareF=n,this.spec=s,this.provides=void 0}static define(t){let e=new _(I++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(q).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let n=t.values[e],s=this.updateF(n,i);return this.compareF(n,s)?0:(t.values[e]=s,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,q.of({field:this,create:t})]}get extension(){return this}}const j=4,U=3,$=2,K=1,G=0;function J(t){return e=>new X(e,t)}const Y={lowest:J(j),low:J(U),default:J($),high:J(K),highest:J(G),fallback:J(j),extend:J(K),override:J(G)};class X{constructor(t,e){this.inner=t,this.prec=e}}class Q{of(t){return new Z(this,t)}reconfigure(t){return Q.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Z{constructor(t,e){this.compartment=t,this.inner=e}}class tt{constructor(t,e,i,n,s,r){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,i){let n=[],s=Object.create(null),r=new Map;for(let i of function(t,e,i){let n=[[],[],[],[],[]],s=new Map;function r(t,o){let l=s.get(t);if(null!=l){if(l>=o)return;let e=n[l].indexOf(t);e>-1&&n[l].splice(e,1),t instanceof Z&&i.delete(t.compartment)}if(s.set(t,o),Array.isArray(t))for(let e of t)r(e,o);else if(t instanceof Z){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=e.get(t.compartment)||t.inner;i.set(t.compartment,n),r(n,o)}else if(t instanceof X)r(t.inner,t.prec);else if(t instanceof _)n[o].push(t),t.provides&&r(t.provides,o);else if(t instanceof W)n[o].push(t),t.facet.extensions&&r(t.facet.extensions,o);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,o)}}return r(t,$),n.reduce(((t,e)=>t.concat(e)))}(t,e,r))i instanceof _?n.push(i):(s[i.facet.id]||(s[i.facet.id]=[])).push(i);let o=Object.create(null),l=[],h=[];for(let t of n)o[t.id]=h.length<<1,h.push((e=>t.slot(e)));let a=null==i?void 0:i.config.facets;for(let t in s){let e=s[t],n=e[0].facet,r=a&&a[t]||[];if(e.every((t=>0==t.type)))if(o[n.id]=l.length<<1|1,H(r,e))l.push(i.facet(n));else{let t=n.combine(e.map((t=>t.value)));l.push(i&&n.compare(t,i.facet(n))?i.facet(n):t)}else{for(let t of e)0==t.type?(o[t.id]=l.length<<1|1,l.push(t.value)):(o[t.id]=h.length<<1,h.push((e=>t.dynamicSlot(e))));o[n.id]=h.length<<1,h.push((t=>F(t,n,e)))}}let c=h.map((t=>t(o)));return new tt(t,r,c,o,l,s)}}function et(t,e){if(1&e)return 2;let i=e>>1,n=t.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;t.status[i]=4;let s=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|s}function it(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const nt=V.define(),st=V.define({combine:t=>t.some((t=>t)),static:!0}),rt=V.define({combine:t=>t.length?t[0]:void 0,static:!0}),ot=V.define(),lt=V.define(),ht=V.define(),at=V.define({combine:t=>!!t.length&&t[0]});class ct{constructor(t,e){this.type=t,this.value=e}static define(){return new ut}}class ut{of(t){return new ct(this,t)}}class ft{constructor(t){this.map=t}of(t){return new dt(this,t)}}class dt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new dt(this.type,e)}is(t){return this.type==t}static define(t={}){return new ft(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let t=n.map(e);t&&i.push(t)}return i}}dt.reconfigure=dt.define(),dt.appendConfig=dt.define();class pt{constructor(t,e,i,n,s,r){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,i&&N(i,e.newLength),s.some((t=>t.type==pt.time))||(this.annotations=s.concat(pt.time.of(Date.now())))}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(pt.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function mt(t,e){let i=[];for(let n=0,s=0;;){let r,o;if(n=t[n]))r=t[n++],o=t[n++];else{if(!(s=0;s--){let r=i[s](t);r&&Object.keys(r).length&&(n=gt(t,vt(e,r,t.changes.newLength),!0))}return n==t?t:new pt(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let n of e.facet(ot)){let e=n(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:mt(i,e))}if(!0!==i){let n,s;if(!1===i)s=t.changes.invertedDesc,n=C.empty(e.doc.length);else{let e=t.changes.filter(i);n=e.changes,s=e.filtered.invertedDesc}t=new pt(e,n,t.selection&&t.selection.map(s),dt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let n=e.facet(lt);for(let i=n.length-1;i>=0;i--){let s=n[i](t);t=s instanceof pt?s:Array.isArray(s)&&1==s.length&&s[0]instanceof pt?s[0]:wt(e,bt(s),!1)}return t}(s):s)}pt.time=ct.define(),pt.userEvent=ct.define(),pt.addToHistory=ct.define(),pt.remote=ct.define();const yt=[];function bt(t){return null==t?yt:Array.isArray(t)?t:[t]}var xt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(xt||(xt={}));const kt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let St;try{St=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function At(t){return e=>{if(!/\S/.test(e))return xt.Space;if(function(t){if(St)return St.test(t);for(let e=0;e"€"&&(i.toUpperCase()!=i.toLowerCase()||kt.test(i)))return!0}return!1}(e))return xt.Word;for(let i=0;i-1)return xt.Word;return xt.Other}}class Ct{constructor(t,e,i,n,s,r){this.config=t,this.doc=e,this.selection=i,this.values=n,this.status=t.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let t=0;ts.set(e,t))),i=null),s.set(e.value.compartment,e.value.extension)):e.is(dt.reconfigure)?(i=null,n=e.value):e.is(dt.appendConfig)&&(i=null,n=bt(n).concat(e.value));if(i)e=t.startState.values.slice();else{i=tt.resolve(n,s,this),e=new Ct(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values}new Ct(i,t.newDoc,t.newSelection,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:B.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),s=[i.range],r=bt(i.effects);for(let i=1;is.spec.fromJSON(r,t))))}return Ct.create({doc:t.doc,selection:B.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let e=tt.resolve(t.extensions||[],new Map),i=t.doc instanceof d?t.doc:d.of((t.doc||"").split(e.staticFacet(Ct.lineSeparator)||k)),n=t.selection?t.selection instanceof B?t.selection:B.single(t.selection.anchor,t.selection.head):B.single(0);return N(n,i.length),e.staticFacet(st)||(n=n.asSingle()),new Ct(e,i,n,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(Ct.tabSize)}get lineBreak(){return this.facet(Ct.lineSeparator)||"\n"}get readOnly(){return this.facet(at)}phrase(t){for(let e of this.facet(Ct.phrases))if(Object.prototype.hasOwnProperty.call(e,t))return e[t];return t}languageDataAt(t,e,i=-1){let n=[];for(let s of this.facet(nt))for(let r of s(this,e,i))Object.prototype.hasOwnProperty.call(r,t)&&n.push(r[t]);return n}charCategorizer(t){return At(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:s}=this.doc.lineAt(t),r=this.charCategorizer(t),o=t-i,l=t-i;for(;o>0;){let t=n(e,o,!1);if(r(e.slice(t,o))!=xt.Word)break;o=t}for(;lt.length?t[0]:4}),Ct.lineSeparator=rt,Ct.readOnly=at,Ct.phrases=V.define(),Ct.languageData=nt,Ct.changeFilter=ot,Ct.transactionFilter=lt,Ct.transactionExtender=ht,Q.reconfigure=dt.define();const Dt="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Ot="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Tt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Rt{constructor(t,e){this.rules=[];let{finish:i}=e||{};function n(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function s(t,e,r,o){let l=[],h=/^@(\w+)\b/.exec(t[0]),a=h&&"keyframes"==h[1];if(h&&null==e)return r.push(t[0]+";");for(let i in e){let o=e[i];if(/&/.test(i))s(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),o,r);else if(o&&"object"==typeof o){if(!h)throw new RangeError("The value of a property ("+i+") should be a primitive value.");s(n(i),o,l,a)}else null!=o&&l.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+o+";")}(l.length||a)&&r.push((!i||h||o?t:t.map(i)).join(", ")+" {"+l.join(" ")+"}")}for(let e in t)s(n(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Tt[Dt]||1;return Tt[Dt]=t+1,"ͼ"+t.toString(36)}static mount(t,e){(t[Ot]||new Lt(t)).mount(Array.isArray(e)?e:[e])}}let Et=null;class Lt{constructor(t){if(!t.head&&t.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(Et)return t.adoptedStyleSheets=[Et.sheet].concat(t.adoptedStyleSheets),t[Ot]=Et;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),Et=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");let e=t.head||t;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],t[Ot]=this}mount(t){let e=this.sheet,i=0,n=0;for(let s=0;s-1&&(this.modules.splice(o,1),n--,o=-1),-1==o){if(this.modules.splice(n++,0,r),e)for(let t=0;t>1,l=s[n]-t||(i?this.value[n].endSide:this.value[n].startSide)-e;if(n==r)return l>=0?r:o;l>=0?o=n:r=n+1}}between(t,e,i,n){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(i,1e9,!1,s);sa||h==a&&c.startSide>0&&c.endSide<=0)continue;(a-h||c.endSide-c.startSide)<0||(r<0&&(r=h),c.point&&(o=Math.max(o,a-h)),i.push(c),n.push(h-r),s.push(a-r))}return{mapped:i.length?new It(n,s,i,o):null,pos:r}}}class Vt{constructor(t,e,i=Vt.empty,n){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=n}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(i&&(e=e.slice().sort(Nt)),this.isEmpty)return e.length?Vt.of(e):this;let o=new zt(this,null,-1).goto(0),l=0,h=[],a=new Ht;for(;o.value||l=0){let t=e[l++];a.addInner(t.from,t.to,t.value)||h.push(t)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return Ft.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Ft.from(t).goto(e)}static compare(t,e,i,n,s=-1){let r=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),o=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),l=Wt(r,o,i),h=new _t(r,l,s),a=new _t(o,l,s);i.iterGaps(((t,e,i)=>jt(h,t,a,e,i,n))),i.empty&&0==i.length&&jt(h,0,a,0,0,n)}static eq(t,e,i=0,n){null==n&&(n=1e9);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=Wt(s,r),l=new _t(s,o,0).goto(i),h=new _t(r,o,0).goto(i);for(;;){if(l.to!=h.to||!Ut(l.active,h.active)||l.point&&(!h.point||!l.point.eq(h.point)))return!1;if(l.to>n)return!0;l.next(),h.next()}}static spans(t,e,i,n,s=-1){var r;let o=new _t(t,null,s,null===(r=n.filterPoint)||void 0===r?void 0:r.bind(n)).goto(e),l=e,h=o.openStart;for(;;){let t=Math.min(o.to,i);if(o.point?(n.point(l,t,o.point,o.activeForPoint(o.to),h),h=o.openEnd(t)+(o.to>t?1:0)):t>l&&(n.span(l,t,o.active,h),h=o.openEnd(t)),o.to>i)break;l=o.to,o.next()}return h}static of(t,e=!1){let i=new Ht;for(let n of t instanceof Pt?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i0)return t.slice().sort(Nt);e=n}return t}(t):t)i.add(n.from,n.to,n.value);return i.finish()}}Vt.empty=new Vt([],[],null,-1),Vt.empty.nextLayer=Vt.empty;class Ht{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(t){this.chunks.push(new It(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new Ht)).add(t,e,i)}addInner(t,e,i){let n=t-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(Vt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=new Vt(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Wt(t,e,i){let n=new Map;for(let e of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new zt(r,e,i,s));return 1==n.length?n[0]:new Ft(n)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)qt(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)qt(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),qt(this.heap,0)}}}function qt(t,e){for(let i=t[e];;){let n=1+(e<<1);if(n>=t.length)break;let s=t[n];if(n+1=0&&(s=t[n+1],n++),i.compare(s)<0)break;t[n]=i,t[e]=s,e=n}}class _t{constructor(t,e,i,n=(()=>!0)){this.minPoint=i,this.filterPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ft.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){$t(this.active,t),$t(this.activeTo,t),$t(this.activeRank,t),this.minActive=Gt(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:n,rank:s}=this.cursor;for(;e-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&$t(i,s)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let s=this.cursor.value;if(s.point)if(e&&this.cursor.to==this.to&&this.cursor.from=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function jt(t,e,i,n,s,r){t.goto(e),i.goto(n);let o=n+s,l=n,h=n-e;for(;;){let e=t.to+h-i.to||t.endSide-i.endSide,n=e<0?t.to+h:i.to,s=Math.min(n,o);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&Ut(t.activeForPoint(t.to+h),i.activeForPoint(i.to))||r.comparePoint(l,s,t.point,i.point):s>l&&!Ut(t.active,i.active)&&r.compareRange(l,s,t.active,i.active),n>o)break;l=n,e<=0&&t.next(),e>=0&&i.next()}}function Ut(t,e){if(t.length!=e.length)return!1;for(let i=0;i=e;i--)t[i+1]=t[i];t[e]=i}function Gt(t,e){let i=-1,n=1e9;for(let s=0;s",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Xt="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent);"undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent);for(var Qt="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Zt="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),te=Qt||Xt&&+Xt[1]<57,ee=0;ee<10;ee++)Jt[48+ee]=Jt[96+ee]=String(ee);for(ee=1;ee<=24;ee++)Jt[ee+111]="F"+ee;for(ee=65;ee<=90;ee++)Jt[ee]=String.fromCharCode(ee+32),Yt[ee]=String.fromCharCode(ee);for(var ie in Jt)Yt.hasOwnProperty(ie)||(Yt[ie]=Jt[ie]);function ne(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function se(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function re(t,e){if(!e.anchorNode)return!1;try{return se(t,e.anchorNode)}catch(t){return!1}}function oe(t){return 3==t.nodeType?we(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function le(t,e,i,n){return!!i&&(ae(t,e,i,n,-1)||ae(t,e,i,n,1))}function he(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function ae(t,e,i,n,s){for(;;){if(t==i&&e==n)return!0;if(e==(s<0?0:ce(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=he(t)+(s<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(s<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=s<0?ce(t):0}}}function ce(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}const ue={left:0,right:0,top:0,bottom:0};function fe(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function de(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}class pe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}}let me,ge=null;function ve(t){if(t.setActive)return t.setActive();if(ge)return t.focus(ge);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==ge?{get preventScroll(){return ge={preventScroll:!0},!0}}:void 0),!ge){ge=!1;for(let t=0;te)return i.domBoundsAround(t,e,h);if(c>=t&&-1==n&&(n=l,s=h),h>e&&i.dom.parentNode==this.dom){r=l,o=a;break}a=c,h=c+i.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r=0?this.children[r].dom:null}}markDirty(t=!1){this.dirty|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}setDOM(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=ke){this.markDirty();for(let i=t;ithis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Me(t,e,i,n,s,r,o,l,h){let{children:a}=t,c=a.length?a[e]:null,u=r.length?r[r.length-1]:null,f=u?u.breakAfter:o;if(!(e==n&&c&&!o&&!f&&r.length<2&&c.merge(i,s,r.length?u:null,0==i,l,h))){if(n0&&(!o&&r.length&&c.merge(i,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(i2);var We={mac:He||/Mac/.test(Oe.platform),windows:/Win/.test(Oe.platform),linux:/Linux|X11/.test(Oe.platform),ie:Be,ie_version:Ee?Te.documentMode||6:Le?+Le[1]:Re?+Re[1]:0,gecko:Pe,gecko_version:Pe?+(/Firefox\/(\d+)/.exec(Oe.userAgent)||[0,0])[1]:0,chrome:!!Ne,chrome_version:Ne?+Ne[1]:0,ios:He,android:/Android\b/.test(Oe.userAgent),webkit:Ie,safari:Ve,webkit_version:Ie?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=Te.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class ze extends Se{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return(!i||i instanceof ze&&!(this.length-(e-t)+i.length>256))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new ze(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new xe(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return qe(this.dom,t,e)}}class Fe extends Se{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let t of e)t.setParent(this)}setAttrs(t){if(be(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.dirty|=6)}sync(t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t)}merge(t,e,i,n,s,r){return(!i||!(!(i instanceof Fe&&i.mark.eq(this.mark))||t&&s<=0||et&&e.push(i=t&&(n=s),i=o,s++}let r=this.length-t;return this.length=t,n>-1&&(this.children.length=n,this.markDirty()),new Fe(this.mark,e,r)}domAtPos(t){return Ge(this.dom,this.children,t)}coordsAt(t,e){return Ye(this,t,e)}}function qe(t,e,i){let n=t.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;0==e&&i<0||e==n&&i>=0?We.chrome||We.gecko||(e?(s--,o=1):(r++,o=-1)):i<0?s--:r++;let l=we(t,s,r).getClientRects();if(!l.length)return ue;let h=l[(o?o<0:i>=0)?0:l.length-1];return We.safari&&!o&&0==h.width&&(h=Array.prototype.find.call(l,(t=>t.width))||h),o?fe(h,o<0):h||null}class _e extends Se{constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}static create(t,e,i){return new(t.customView||_e)(t,e,i)}split(t){let e=_e.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(){this.dom&&this.widget.updateDOM(this.dom)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof _e&&this.widget.compare(i.widget))||t>0&&s<=0||e0?i.length-1:0;n=i[e],!(t>0?0==e:e==i.length-1||n.top0?-1:1);return 0==t&&e>0||t==this.length&&e<=0?n:fe(n,0==t)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class je extends _e{domAtPos(t){let{topView:e,text:i}=this.widget;return e?Ue(t,0,e,i,((t,e)=>t.domAtPos(e)),(t=>new xe(i,Math.min(t,i.nodeValue.length)))):new xe(i,Math.min(t,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(t,e){let{topView:i,text:n}=this.widget;return i?$e(t,e,i,n):Math.min(e,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(t,e){let{topView:i,text:n}=this.widget;return i?Ue(t,e,i,n,((t,e,i)=>t.coordsAt(e,i)),((t,e)=>qe(n,t,e))):qe(n,t,e)}destroy(){var t;super.destroy(),null===(t=this.widget.topView)||void 0===t||t.destroy()}get isEditable(){return!0}}function Ue(t,e,i,n,s,r){if(i instanceof Fe){for(let o of i.children){let i=se(o.dom,n),l=i?n.nodeValue.length:o.length;if(t=0;)if(e<0?n>0:n0?-1:1);return i&&i.tope.top?{left:e.left,right:e.right,top:i.top,bottom:i.bottom}:e}get overrideDOMText(){return d.empty}}function Ge(t,e,i){let n=0;for(let s=0;ns&&i0;n--){let i=e[n-1].dom;if(i.parentNode==t)return xe.after(i)}return new xe(t,0)}function Je(t,e,i){let n,{children:s}=t;i>0&&e instanceof Fe&&s.length&&(n=s[s.length-1])instanceof Fe&&n.mark.eq(e.mark)?Je(n,e.children[0],i-1):(s.push(e),e.setParent(t)),t.length+=e.length}function Ye(t,e,i){for(let n=0,s=0;s0?l>=e:l>e)&&(e0)){let t=0;if(l==n){if(o.getSide()<=0)continue;t=i=-o.getSide()}let s=o.coordsAt(Math.max(0,e-n),i);return t&&s?fe(s,i<0):s}n=l}let n=t.dom.lastChild;if(!n)return t.dom.getBoundingClientRect();let s=oe(n);return s[s.length-1]||null}function Xe(t,e){for(let i in t)"class"==i&&e.class?e.class+=" "+t.class:"style"==i&&e.style?e.style+=";"+t.style:e[i]=t[i];return e}function Qe(t,e){if(t==e)return!0;if(!t||!e)return!1;let i=Object.keys(t),n=Object.keys(e);if(i.length!=n.length)return!1;for(let s of i)if(-1==n.indexOf(s)||t[s]!==e[s])return!1;return!0}function Ze(t,e,i){if(e)for(let n in e)i&&n in i||t.removeAttribute(n);if(i)for(let n in i)e&&e[n]==i[n]||t.setAttribute(n,i[n])}ze.prototype.children=_e.prototype.children=Ke.prototype.children=ke;class ti{eq(t){return!1}updateDOM(t){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}ignoreEvent(t){return!0}get customView(){return null}destroy(t){}}var ei=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(ei||(ei={}));class ii extends Bt{constructor(t,e,i,n){super(),this.startSide=t,this.endSide=e,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(t){return new ni(t)}static widget(t){let e=t.side||0,i=!!t.block;return e+=i?e>0?3e8:-4e8:e>0?1e8:-1e8,new ri(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,n=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:s,end:r}=oi(t,n);e=(s?n?-3e8:-1:5e8)-1,i=1+(r?n?2e8:1:-6e8)}return new ri(t,e,i,n,t.widget||null,!0)}static line(t){return new si(t)}static set(t,e=!1){return Vt.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}ii.none=Vt.empty;class ni extends ii{constructor(t){let{start:e,end:i}=oi(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){return this==t||t instanceof ni&&this.tagName==t.tagName&&this.class==t.class&&Qe(this.attrs,t.attrs)}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}ni.prototype.point=!1;class si extends ii{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof si&&Qe(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}si.prototype.mapMode=S.TrackBefore,si.prototype.point=!0;class ri extends ii{constructor(t,e,i,n,s,r){super(e,i,s,t),this.block=n,this.isReplace=r,this.mapMode=n?e<=0?S.TrackBefore:S.TrackAfter:S.TrackDel}get type(){return this.startSide=5}eq(t){return t instanceof ri&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function oi(t,e=!1){let{inclusiveStart:i,inclusiveEnd:n}=t;return null==i&&(i=t.inclusive),null==n&&(n=t.inclusive),{start:null!=i?i:e,end:null!=n?n:e}}function li(t,e,i,n=0){let s=i.length-1;s>=0&&i[s]+n>=t?i[s]=Math.max(i[s],e):i.push(t,e)}ri.prototype.point=!0;class hi extends Se{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,n,s,r){if(i){if(!(i instanceof hi))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),De(this,t,e,i?i.children:[],s,r),!0}split(t){let e=new hi;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:i,off:n}=this.childPos(t);n&&(e.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let t=i;t0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){Qe(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){Je(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=Xe(e,this.attrs||{})),i&&(this.attrs=Xe({class:i},this.attrs||{}))}domAtPos(t){return Ge(this.dom,this.children,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.dirty|=6)}sync(t){var e;this.dom?4&this.dirty&&(be(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Ze(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t);let i=this.dom.lastChild;for(;i&&Se.get(i)instanceof Fe;)i=i.lastChild;if(!(i&&this.length&&("BR"==i.nodeName||0!=(null===(e=Se.get(i))||void 0===e?void 0:e.isEditable)||We.ios&&this.children.some((t=>t instanceof ze))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t=0;for(let e of this.children){if(!(e instanceof ze))return null;let i=oe(e.dom);if(1!=i.length)return null;t+=i[0].width}return{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}}coordsAt(t,e){return Ye(this,t,e)}become(t){return!1}get type(){return ei.Text}static find(t,e){for(let i=0,n=0;i=e){if(s instanceof hi)return s;if(r>e)break}n=r+s.breakAfter}return null}}class ai extends Se{constructor(t,e,i){super(),this.widget=t,this.length=e,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof ai&&this.widget.compare(i.widget))||t>0&&s<=0||e0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,t--;continue}this.text=e,this.textOff=0}let n=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(0,i)),this.getLine().append(ui(new ze(this.text.slice(this.textOff,this.textOff+n)),e),i),this.atCursorPos=!0,this.textOff+=n,t-=n,i=0}}span(t,e,i,n){this.buildText(e-t,i,n),this.pos=e,this.openStart<0&&(this.openStart=n)}point(t,e,i,n,s){let r=e-t;if(i instanceof ri)if(i.block){let{type:t}=i;t!=ei.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new ai(i.widget||new fi("div"),r,t))}else{let o=_e.create(i.widget||new fi("span"),r,i.startSide),l=this.atCursorPos&&!o.isEditable&&s<=n.length&&(t0),h=!o.isEditable&&(tthis.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}return!0}static build(t,e,i,n,s){let r=new ci(t,e,i,s);return r.openEnd=Vt.spans(n,e,i,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function ui(t,e){for(let i of e)t=new Fe(i,[t],t.length);return t}class fi extends ti{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}}const di=[],pi=V.define(),mi=V.define(),gi=V.define(),vi=V.define(),wi=V.define(),yi=V.define(),bi=dt.define({map:(t,e)=>t.map(e)}),xi=dt.define({map:(t,e)=>t.map(e)});class ki{constructor(t,e="nearest",i="nearest",n=5,s=5){this.range=t,this.y=e,this.x=i,this.yMargin=n,this.xMargin=s}map(t){return t.empty?this:new ki(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin)}}const Si=dt.define({map:(t,e)=>t.map(e)});function Ai(t,e,i){let n=t.facet(vi);n.length?n[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const Ci=V.define({combine:t=>!t.length||t[0]});class Mi{constructor(t,e){this.field=t,this.get=e}}class Di{from(t){return new Mi(this,t)}static define(){return new Di}}Di.decorations=Di.define(),Di.atomicRanges=Di.define(),Di.scrollMargins=Di.define();let Oi=0;const Ti=V.define();class Ri{constructor(t,e,i){this.id=t,this.create=e,this.fields=i,this.extension=Ti.of(this)}static define(t,e){let{eventHandlers:i,provide:n,decorations:s}=e||{},r=[];if(n)for(let t of Array.isArray(n)?n:[n])r.push(t);return i&&r.push(Ei.from((t=>({plugin:t,handlers:i})))),s&&r.push(Di.decorations.from(s)),new Ri(Oi++,t,r)}static fromClass(t,e){return Ri.define((e=>new t(e)),e)}}const Ei=Di.define();class Li{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}takeField(t,e){if(this.spec)for(let{field:i,get:n}of this.spec.fields)i==t&&e.push(n(this.value))}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(Ai(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){Ai(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){Ai(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Bi=V.define(),Pi=V.define(),Ni=V.define(),Ii=V.define();class Vi{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new Vi(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAa)break;s+=2}if(!l)return i;new Vi(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),r=l.toA,o=l.toB}}}class Hi{constructor(t,e,i=di){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=C.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let n=[];this.changes.iterChangedRanges(((t,e,i,s)=>n.push(new Vi(t,e,i,s)))),this.changedRanges=n;let s=t.hasFocus;s!=t.inputState.notifiedFocused&&(t.inputState.notifiedFocused=s,this.flags|=1)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var Wi=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Wi||(Wi={}));const zi=Wi.LTR,Fi=Wi.RTL;function qi(t){let e=[];for(let i=0;i=e){if(o.level==i)return r;(s<0||(0!=n?n<0?o.frome:t[s].level>o.level))&&(s=r)}}if(s<0)throw new RangeError("Index out of range");return s}}const Ji=[];function Yi(t){return[new Gi(0,t,0)]}let Xi="";function Qi(t,e,i,s,r){var o;let l=s.head-t.from,h=-1;if(0==l){if(!r||!t.length)return null;e[0].level!=i&&(l=e[0].side(!1,i),h=0)}else if(l==t.length){if(r)return null;let t=e[e.length-1];t.level!=i&&(l=t.side(!0,i),h=e.length-1)}h<0&&(h=Gi.find(e,l,null!==(o=s.bidiLevel)&&void 0!==o?o:-1,s.assoc));let a=e[h];l==a.side(r,i)&&(a=e[h+=r?1:-1],l=a.side(!r,i));let c=r==(a.dir==i),u=n(t.text,l,c);if(Xi=t.text.slice(Math.min(l,u),Math.max(l,u)),u!=a.side(r,i))return B.cursor(u+t.from,c?-1:1,a.level);let f=h==(r?e.length-1:0)?null:e[h+(r?1:-1)];return f||a.level==i?f&&f.level1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=o-1);i=r+o}}readNode(t){if(t.cmIgnore)return;let e=Se.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+Math.min(e,i.offset))}}function tn(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class en{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class nn extends Se{constructor(t){super(),this.view=t,this.compositionDeco=ii.none,this.decorations=[],this.pluginDecorationLength=0,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new hi],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Vi(0,0,0,t.state.doc.length)],0)}get root(){return this.view.root}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(t){let e=t.changedRanges;this.minWidth>0&&e.length&&(e.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=ii.none:(t.transactions.length||this.dirty)&&(this.compositionDeco=function(t,e){let i=rn(t);if(!i)return ii.none;let{from:n,to:s,node:r,text:o}=i,l=e.mapPos(n,1),h=Math.max(l,e.mapPos(s,-1)),{state:a}=t,c=3==r.nodeType?r.nodeValue:new Zi([],a).readRange(r.firstChild,null).text;if(h-l{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.minWidth=this.minWidth?this.minWidth+"px":"";let t=We.chrome||We.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(t),this.dirty=0,t&&(t.written||i.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""}));let n=[];if(this.view.viewport.from||this.view.viewport.to=0?t[e]:null;if(!n)break;let{fromA:s,toA:r,fromB:o,toB:l}=n,{content:h,breakAtStart:a,openStart:c,openEnd:u}=ci.build(this.view.state.doc,o,l,this.decorations,this.pluginDecorationLength),{i:f,off:d}=i.findPos(r,1),{i:p,off:m}=i.findPos(s,-1);Me(this,p,m,f,d,h,a,c,u)}}updateSelection(t=!1,e=!1){if(t&&this.view.observer.readSelectionRange(),!e&&!this.mayControlSelection()||We.ios&&this.view.inputState.rapidCompositionStart)return;let i=this.forceSelection;this.forceSelection=!1;let n=this.view.state.selection.main,s=this.domAtPos(n.anchor),r=n.empty?s:this.domAtPos(n.head);if(We.gecko&&n.empty&&(1==(o=s).node.nodeType&&o.node.firstChild&&(0==o.offset||"false"==o.node.childNodes[o.offset-1].contentEditable)&&(o.offset==o.node.childNodes.length||"false"==o.node.childNodes[o.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(t,s.node.childNodes[s.offset]||null))),s=r=new xe(t,0),i=!0}var o;let l=this.view.observer.selectionRange;!i&&l.focusNode&&le(s.node,s.offset,l.anchorNode,l.anchorOffset)&&le(r.node,r.offset,l.focusNode,l.focusOffset)||(this.view.observer.ignore((()=>{We.android&&We.chrome&&this.dom.contains(l.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=ne(this.root);if(n.empty){if(We.gecko){let t=(e=s.node,i=s.offset,1!=e.nodeType?0:(i&&"false"==e.childNodes[i-1].contentEditable?1:0)|(in.head&&([s,r]=[r,s]),e.setEnd(r.node,r.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}var e,i})),this.view.observer.setSelectionRange(s,r)),this.impreciseAnchor=s.precise?null:new xe(l.anchorNode,l.anchorOffset),this.impreciseHead=r.precise?null:new xe(l.focusNode,l.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let t=this.view.state.selection.main,e=ne(this.root);if(!t.empty||!t.assoc||!e.modify)return;let i=hi.find(this,t.head);if(!i)return;let n=i.posAtStart;if(t.head==n||t.head==n+i.length)return;let s=this.coordsAt(t.head,-1),r=this.coordsAt(t.head,1);if(!s||!r||s.bottom>r.top)return;let o=this.domAtPos(t.head+t.assoc);e.collapse(o.node,o.offset),e.modify("move",t.assoc<0?"forward":"backward","lineboundary")}mayControlSelection(){return this.view.state.facet(Ci)?this.root.activeElement==this.dom:re(this.dom,this.view.observer.selectionRange)}nearest(t){for(let e=t;e;){let t=Se.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;er||t==r&&s.type!=ei.WidgetBefore&&s.type!=ei.WidgetAfter&&(!n||2==e||this.children[n-1].breakAfter||this.children[n-1].type==ei.WidgetBefore&&e>-2))return s.coordsAt(t-r,e);i=r}}measureVisibleLineHeights(){let t=[],{from:e,to:i}=this.view.viewState.viewport,n=this.view.contentDOM.clientWidth,s=n>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,r=-1;for(let o=0,l=0;li)break;if(o>=e){let e=h.dom.getBoundingClientRect();if(t.push(e.height),s){let t=h.dom.lastChild,i=t?oe(t):[];if(i.length){let t=i[i.length-1],s=this.view.textDirection==Wi.LTR?t.right-e.left:e.right-t.left;s>r&&(r=s,this.minWidth=n,this.minWidthFrom=o,this.minWidthTo=a)}}}o=a+h.breakAfter}return t}measureTextSize(){for(let t of this.children)if(t instanceof hi){let e=t.measureTextSize();if(e)return e}let t,e,i=document.createElement("div");return i.className="cm-line",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(i);let n=oe(i.firstChild)[0];t=i.getBoundingClientRect().height,e=n?n.width/27:7,i.remove()})),{lineHeight:t,charWidth:e}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new Ce(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let s=n==e.viewports.length?null:e.viewports[n],r=s?s.from-1:this.length;if(r>i){let n=e.lineBlockAt(r).bottom-e.lineBlockAt(i).top;t.push(ii.replace({widget:new sn(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,r))}if(!s)break;i=s.to+1}return ii.set(t)}updateDeco(){let t=this.view.pluginField(Di.decorations);return this.pluginDecorationLength=t.length,this.decorations=[...t,...this.view.state.facet(Ni),this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(t){let e,{range:i}=t,n=this.coordsAt(i.head,i.empty?i.assoc:i.head>i.anchor?-1:1);if(!n)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,e.left),top:Math.min(n.top,e.top),right:Math.max(n.right,e.right),bottom:Math.max(n.bottom,e.bottom)});let s=0,r=0,o=0,l=0;for(let t of this.view.pluginField(Di.scrollMargins))if(t){let{left:e,right:i,top:n,bottom:h}=t;null!=e&&(s=Math.max(s,e)),null!=i&&(r=Math.max(r,i)),null!=n&&(o=Math.max(o,n)),null!=h&&(l=Math.max(l,h))}let h={left:n.left-s,top:n.top-o,right:n.right+r,bottom:n.bottom+l};!function(t,e,i,n,s,r,o,l){let h=t.ownerDocument,a=h.defaultView;for(let c=t;c;)if(1==c.nodeType){let t,u=c==h.body;if(u)t=de(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}let e=c.getBoundingClientRect();t={left:e.left,right:e.left+c.clientWidth,top:e.top,bottom:e.top+c.clientHeight}}let f=0,d=0;if("nearest"==s)e.top0&&e.bottom>t.bottom+d&&(d=e.bottom-t.bottom+d+o)):e.bottom>t.bottom&&(d=e.bottom-t.bottom+o,i<0&&e.top-d0&&e.right>t.right+f&&(f=e.right-t.right+f+r)):e.right>t.right&&(f=e.right-t.right+r,i<0&&e.left0&&i<=0)e=ce(t=t.childNodes[e-1]);else{if(!(1==t.nodeType&&e=0))return null;t=t.childNodes[e],e=0}}}class hn{constructor(){this.changes=[]}compareRange(t,e){li(t,e,this.changes)}comparePoint(t,e){li(t,e,this.changes)}}function an(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function cn(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function un(t,e){return t.tope.top+1}function fn(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function pn(t,e,i){let n,s,r,o,l,h,a,c;for(let u=t.firstChild;u;u=u.nextSibling){let t=oe(u);for(let f=0;fm||o==m&&r>p)&&(n=u,s=d,r=p,o=m),0==p?i>d.bottom&&(!a||a.bottomd.top)&&(h=u,c=d):a&&un(a,d)?a=dn(a,d.bottom):c&&un(c,d)&&(c=fn(c,d.top))}}if(a&&a.bottom>=i?(n=l,s=a):c&&c.top<=i&&(n=h,s=c),!n)return{node:t,offset:0};let u=Math.max(s.left,Math.min(s.right,e));return 3==n.nodeType?mn(n,u,i):r||"true"!=n.contentEditable?{node:t,offset:Array.prototype.indexOf.call(t.childNodes,n)+(e>=(s.left+s.right)/2?1:0)}:pn(n,u,i)}function mn(t,e,i){let n=t.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;li?a.top-i:i-a.bottom)-1;if(a.left-1<=e&&a.right+1>=e&&c=(a.left+a.right)/2,n=i;if(We.chrome||We.gecko){we(t,l).getBoundingClientRect().left==a.right&&(n=!i)}if(c<=0)return{node:t,offset:l+(n?1:0)};s=l+(n?1:0),r=c}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function gn(t,{x:e,y:i},n,s=-1){var r;let o,l=t.contentDOM.getBoundingClientRect(),h=l.top+t.viewState.paddingTop,{docHeight:a}=t.viewState,c=i-h;if(c<0)return 0;if(c>a)return t.state.doc.length;for(let e=t.defaultLineHeight/2,i=!1;o=t.elementAtHeight(c),o.type!=ei.Text;)for(;c=s>0?o.bottom+e:o.top-e,!(c>=0&&c<=a);){if(i)return n?null:0;i=!0,s=-s}i=h+c;let u=o.from;if(ut.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:vn(t,l,o,e,i);let f=t.dom.ownerDocument,d=t.root.elementFromPoint?t.root:f,p=d.elementFromPoint(e,i);p&&!t.contentDOM.contains(p)&&(p=null),p||(e=Math.max(l.left+1,Math.min(l.right-1,e)),p=d.elementFromPoint(e,i),p&&!t.contentDOM.contains(p)&&(p=null));let m,g=-1;if(p&&0!=(null===(r=t.docView.nearest(p))||void 0===r?void 0:r.isEditable))if(f.caretPositionFromPoint){let t=f.caretPositionFromPoint(e,i);t&&({offsetNode:m,offset:g}=t)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(e,i);t&&(({startContainer:m,startOffset:g}=t),We.safari&&function(t,e,i){let n;if(3!=t.nodeType||e!=(n=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return we(t,n-1,n).getBoundingClientRect().left>i}(m,g,e)&&(m=void 0))}if(!m||!t.docView.dom.contains(m)){let n=hi.find(t.docView,u);if(!n)return c>o.top+o.height/2?o.to:o.from;({node:m,offset:g}=pn(n.dom,e,i))}return t.docView.posFromDOM(m,g)}function vn(t,e,i,n,s){let r=Math.round((n-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&i.height>1.5*t.defaultLineHeight){r+=Math.floor((s-i.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(i.from,i.to);return i.from+f(o,r,t.state.tabSize)}function wn(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=t.bidiSpans(s);for(let o=e,l=null;;){let e=Qi(s,r,t.textDirection,o,i),h=Xi;if(!e){if(s.number==(i?t.state.doc.lines:1))return o;h="\n",s=t.state.doc.line(s.number+(i?1:-1)),r=t.bidiSpans(s),e=B.cursor(i?s.from:s.to)}if(l){if(!l(h))return o}else{if(!n)return e;l=n(h)}o=e}}function yn(t,e,i){let n=t.pluginField(Di.atomicRanges);for(;;){let t=!1;for(let s of n)s.between(i.from-1,i.from+1,((n,s,r)=>{i.from>n&&i.fromi.from?B.cursor(n,1):B.cursor(s,-1),t=!0)}));if(!t)return i}}class bn{constructor(t){this.lastKeyCode=0,this.lastKeyTime=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let e in Cn){let i=Cn[e];t.contentDOM.addEventListener(e,(n=>{An(t,n)&&!this.ignoreDuringComposition(n)&&("keydown"==e&&this.keydown(t,n)||(this.mustFlushObserver(n)&&t.observer.forceFlush(),this.runCustomHandlers(e,t,n)?n.preventDefault():i(t,n)))})),this.registeredEvents.push(e)}this.notifiedFocused=t.hasFocus,this.ensureHandlers(t),We.safari&&t.contentDOM.addEventListener("input",(()=>null))}setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}ensureHandlers(t){let e=this.customHandlers=t.pluginField(Ei);for(let i of e)for(let e in i.handlers)this.registeredEvents.indexOf(e)<0&&"scroll"!=e&&(this.registeredEvents.push(e),t.contentDOM.addEventListener(e,(i=>{An(t,i)&&this.runCustomHandlers(e,t,i)&&i.preventDefault()})))}runCustomHandlers(t,e,i){for(let n of this.customHandlers){let s=n.handlers[t];if(s)try{if(s.call(n.plugin,i,e)||i.defaultPrevented)return!0}catch(t){Ai(e.state,t)}}return!1}runScrollHandlers(t,e){for(let i of this.customHandlers){let n=i.handlers.scroll;if(n)try{n.call(i.plugin,e,t)}catch(e){Ai(t.state,e)}}}keydown(t,e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()t.keyCode==e.keyCode)))||e.ctrlKey||e.altKey||e.metaKey||e.synthetic)&&(this.pendingIOSKey=i,setTimeout((()=>this.flushIOSKey(t)),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,ye(t.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(We.safari&&Date.now()-this.compositionEndedAt<500)&&(this.compositionEndedAt=0,!0))}mustFlushObserver(t){return"keydown"==t.type&&229!=t.keyCode||"compositionend"==t.type&&!We.ios}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.mouseSelection&&this.mouseSelection.update(t),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const xn=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],kn=[16,17,18,20,91,92,224,225];class Sn{constructor(t,e,i,n){this.view=t,this.style=i,this.mustSelect=n,this.lastEvent=e;let s=t.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(Ct.allowMultipleSelections)&&function(t,e){let i=t.state.facet(pi);return i.length?i[0](e):We.mac?e.metaKey:e.ctrlKey}(t,e),this.dragMove=function(t,e){let i=t.state.facet(mi);return i.length?i[0](e):We.mac?!e.altKey:!e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let n=ne(t.root);if(0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let t=0;t=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(t,e)||1!=Hn(e))&&null,!1===this.dragging&&(e.preventDefault(),this.select(e))}move(t){if(0==t.buttons)return this.destroy();!1===this.dragging&&this.select(this.lastEvent=t)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}select(t){let e=this.style.get(t,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer",scrollIntoView:!0}),this.mustSelect=!1}update(t){t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}function An(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,n=e.target;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=Se.get(n))&&i.ignoreEvent(e))return!1;return!0}const Cn=Object.create(null),Mn=We.ie&&We.ie_version<15||We.ios&&We.webkit_version<604;function Dn(t,e){let i,{state:n}=t,s=1,r=n.toText(e),o=r.lines==n.selection.ranges.length;if(null!=zn&&n.selection.ranges.every((t=>t.empty))&&zn==r.toString()){let t=-1;i=n.changeByRange((i=>{let l=n.doc.lineAt(i.from);if(l.from==t)return{range:i};t=l.from;let h=n.toText((o?r.line(s++).text:e)+n.lineBreak);return{changes:{from:l.from,insert:h},range:B.cursor(i.from+h.length)}}))}else i=o?n.changeByRange((t=>{let e=r.line(s++);return{changes:{from:t.from,to:t.to,insert:e.text},range:B.cursor(t.from+e.length)}})):n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Cn.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select"),27==e.keyCode?t.inputState.lastEscPress=Date.now():kn.indexOf(e.keyCode)<0&&(t.inputState.lastEscPress=0)};let On=0;function Tn(t,e,i,s){if(1==s)return B.cursor(e,i);if(2==s)return function(t,e,i=1){let s=t.charCategorizer(e),r=t.doc.lineAt(e),o=e-r.from;if(0==r.length)return B.cursor(e);0==o?i=1:o==r.length&&(i=-1);let l=o,h=o;i<0?l=n(r.text,o,!1):h=n(r.text,o);let a=s(r.text.slice(l,h));for(;l>0;){let t=n(r.text,l,!1);if(s(r.text.slice(t,l))!=a)break;l=t}for(;h{On=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Cn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Cn.mousedown=(t,e)=>{if(t.observer.flush(),On>Date.now()-2e3&&1==Hn(e))return;let i=null;for(let n of t.state.facet(gi))if(i=n(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=Bn(t,e),n=Hn(e),s=t.state.selection,r=i,o=e;return{update(t){t.docChanged&&(i&&(i.pos=t.changes.mapPos(i.pos)),s=s.map(t.changes),o=null)},get(e,l,h){let a;if(o&&e.clientX==o.clientX&&e.clientY==o.clientY?a=r:(a=r=Bn(t,e),o=e),!a||!i)return s;let c=Tn(t,a.pos,a.bias,n);if(i.pos!=a.pos&&!l){let e=Tn(t,i.pos,i.bias,n),s=Math.min(e.from,c.from),r=Math.max(e.to,c.to);c=sve(t.contentDOM))),t.inputState.startMouseSelection(new Sn(t,e,i,n))}};let Rn=(t,e)=>t>=e.top&&t<=e.bottom,En=(t,e,i)=>Rn(e,i)&&t>=i.left&&t<=i.right;function Ln(t,e,i,n){let s=hi.find(t.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(0==r)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&En(i,n,o))return-1;let l=s.coordsAt(r,1);return l&&En(i,n,l)?1:o&&Rn(n,o)?-1:1}function Bn(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:Ln(t,i,e.clientX,e.clientY)}}const Pn=We.ie&&We.ie_version<=11;let Nn=null,In=0,Vn=0;function Hn(t){if(!Pn)return t.detail;let e=Nn,i=Vn;return Nn=t,Vn=Date.now(),In=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(In+1)%3:1}function Wn(t,e,i,n){if(!i)return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:r}=t.inputState,o=n&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,l={from:s,insert:i},h=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:h,selection:{anchor:h.mapPos(s,-1),head:h.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}Cn.dragstart=(t,e)=>{let{selection:{main:i}}=t.state,{mouseSelection:n}=t.inputState;n&&(n.dragging=i),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(i.from,i.to)),e.dataTransfer.effectAllowed="copyMove")},Cn.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let i=e.dataTransfer.files;if(i&&i.length){e.preventDefault();let n=Array(i.length),s=0,r=()=>{++s==i.length&&Wn(t,e,n.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(n[t]=e.result),r()},e.readAsText(i[t])}}else Wn(t,e,e.dataTransfer.getData("Text"),!0)},Cn.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let i=Mn?null:e.clipboardData;i?(Dn(t,i.getData("text/plain")),e.preventDefault()):function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),Dn(t,i.value)}),50)}(t)};let zn=null;function Fn(t,e){if(t.docView.compositionDeco.size){t.inputState.rapidCompositionStart=e;try{t.update([])}finally{t.inputState.rapidCompositionStart=!1}}}Cn.copy=Cn.cut=(t,e)=>{let{text:i,ranges:n,linewise:s}=function(t){let e=[],i=[],n=!1;for(let n of t.selection.ranges)n.empty||(e.push(t.sliceDoc(n.from,n.to)),i.push(n));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let r=t.doc.lineAt(n);r.number>s&&(e.push(r.text),i.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})),s=r.number}n=!0}return{text:e.join(t.lineBreak),ranges:i,linewise:n}}(t.state);if(!i&&!s)return;zn=s?i:null;let r=Mn?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",i)):function(t,e){let i=t.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout((()=>{n.remove(),t.focus()}),50)}(t,i),"cut"!=e.type||t.state.readOnly||t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"})},Cn.focus=Cn.blur=t=>{setTimeout((()=>{t.hasFocus!=t.inputState.notifiedFocused&&t.update([])}),10)},Cn.compositionstart=Cn.compositionupdate=t=>{null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0,t.docView.compositionDeco.size&&(t.observer.flush(),Fn(t,!0)))},Cn.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,setTimeout((()=>{t.inputState.composing<0&&Fn(t,!1)}),50)},Cn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Cn.beforeinput=(t,e)=>{var i;let n;if(We.chrome&&We.android&&(n=xn.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let e=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}};const qn=["pre-wrap","normal","pre-line","break-spaces"];class _n{constructor(){this.doc=d.empty,this.lineWrapping=!1,this.direction=Wi.LTR,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength)),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForStyle(t,e){return qn.indexOf(t)>-1!=this.lineWrapping||this.direction!=e}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,l=Math.round(i)!=Math.round(this.lineHeight)||this.lineWrapping!=o||this.direction!=e;if(this.lineWrapping=o,this.direction=e,this.lineHeight=i,this.charWidth=n,this.lineLength=s,l){this.heightSamples={};for(let t=0;te.moveY(t))):this.type):this}}var $n=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}($n||($n={}));class Kn{constructor(t,e,i=2){this.length=t,this.height=e,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(t.heightChanged=!0),this.height=e)}replace(t,e,i){return Kn.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,n){let s=this;for(let r=n.length-1;r>=0;r--){let{fromA:o,toA:l,fromB:h,toB:a}=n[r],c=s.lineAt(o,$n.ByPosNoHeight,e,0,0),u=c.to>=l?c:s.lineAt(l,$n.ByPosNoHeight,e,0,0);for(a+=u.to-l,l=u.to;r>0&&c.from<=n[r-1].toA;)o=n[r-1].fromA,h=n[r-1].fromB,r--,o2*s){let s=t[e-1];s.break?t.splice(--e,1,s.left,null,s.right):t.splice(--e,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,s-=e.size}}else if(n0){let t=i[i.length-1];t instanceof Yn?i[i.length-1]=new Yn(t.length+n):i.push(null,new Yn(n-1))}if(t>0){let e=i[0];e instanceof Yn?i[0]=new Yn(t+e.length):i.unshift(new Yn(t-1),null)}return Kn.of(i)}decomposeLeft(t,e){e.push(new Yn(t-1),null)}decomposeRight(t,e){e.push(null,new Yn(this.length-t-1))}updateHeight(t,e=0,i=!1,n){let s=e+this.length;if(n&&n.from<=e+this.length&&n.more){let i=[],r=Math.max(e,n.from),o=-1,l=t.heightChanged;for(n.from>e&&i.push(new Yn(n.from-e-1).updateHeight(t,e));r<=s&&n.more;){let e=t.doc.lineAt(r).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==o?o=s:Math.abs(s-o)>=.001&&(o=-2);let l=new Jn(e,s);l.outdated=!1,i.push(l),r+=e+1}r<=s&&i.push(null,new Yn(s-r).updateHeight(t,r));let h=Kn.of(i);return t.heightChanged=l||o<0||Math.abs(h.height-this.height)>=.001||Math.abs(o-this.lines(t.doc,e).lineHeight)>=.001,h}return(i||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Xn extends Kn{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,n){let s=i+this.left.height;return to))return h;let a=e==$n.ByPosNoHeight?$n.ByPosNoHeight:$n.ByPos;return l?h.join(this.right.lineAt(o,a,i,r,o)):this.left.lineAt(o,a,i,n,s).join(h)}forEachLine(t,e,i,n,s,r){let o=n+this.left.height,l=s+this.left.length+this.break;if(this.break)t=l&&this.right.forEachLine(t,e,i,o,l,r);else{let h=this.lineAt(l,$n.ByPos,i,n,s);t=t&&h.from<=e&&r(h),e>h.to&&this.right.forEachLine(h.to+1,e,i,o,l,r)}}replace(t,e,i){let n=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-n,e-n,i));let s=[];t>0&&this.decomposeLeft(t,s);let r=s.length;for(let t of i)s.push(t);if(t>0&&Qn(s,r-1),e=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,n=i+this.break;if(t>=n)return this.right.decomposeRight(t-n,e);t2*e.size||e.size>2*t.size?Kn.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,n){let{left:s,right:r}=this,o=e+s.length+this.break,l=null;return n&&n.from<=e+s.length&&n.more?l=s=s.updateHeight(t,e,i,n):s.updateHeight(t,e,i),n&&n.from<=o+r.length&&n.more?l=r=r.updateHeight(t,o,i,n):r.updateHeight(t,o,i),l?this.balanced(s,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Qn(t,e){let i,n;null==t[e]&&(i=t[e-1])instanceof Yn&&(n=t[e+1])instanceof Yn&&t.splice(e-1,3,new Yn(i.length+1+n.length))}class Zn{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Jn?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Jn(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(n,s)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Jn(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new Yn(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Jn)return t;let e=new Jn(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine(),t.type!=ei.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=ei.WidgetBefore&&(this.covering=t)}addLineDeco(t,e){let i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,t),this.writtenTo=this.pos=this.pos+e}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Jn||this.isCovered?(this.writtenTot.clientHeight||t.scrollWidth>t.clientWidth)&&"visible"!=i.overflow){let e=t.getBoundingClientRect();n=Math.max(n,e.left),s=Math.min(s,e.right),r=Math.max(r,e.top),o=Math.min(o,e.bottom)}e="absolute"==i.position||"fixed"==i.position?t.offsetParent:t.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-i.left,right:Math.max(n,s)-i.left,top:r-(i.top+e),bottom:Math.max(r,o)-(i.top+e)}}function is(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class ns{constructor(t,e,i){this.from=t,this.to=e,this.size=i}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;it.draw(!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let n=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>n>=t&&n<=e))){let{from:e,to:i}=this.lineBlockAt(n);t.push(new os(e,i))}}this.viewports=t.sort(((t,e)=>t.from-e.from)),this.scaler=this.heightMap.height<=7e6?fs:new ds(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(t=>{this.viewportLines.push(1==this.scaler.scale?t:ps(t,this.scaler))}))}update(t,e=null){let i=this.state;this.state=t.state;let n=this.state.facet(Ni),s=t.changedRanges,r=Vi.extendWithRanges(s,function(t,e,i){let n=new ts;return Vt.compare(t,e,i,n,0),n.changes}(t.startState.facet(Ni),n,t?t.changes:C.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(n,i.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(t.flags|=2);let l=r.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,e));let h=!t.changes.empty||2&t.flags||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),h&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),n=this.heightOracle,s=i.whiteSpace,r="rtl"==i.direction?Wi.RTL:Wi.LTR,o=this.heightOracle.mustRefreshForStyle(s,r),l=o||this.mustMeasureContent||this.contentDOMHeight!=e.clientHeight,h=0,a=0;if(this.editorWidth!=t.scrollDOM.clientWidth&&(n.lineWrapping&&(l=!0),this.editorWidth=t.scrollDOM.clientWidth,h|=8),l){this.mustMeasureContent=!1,this.contentDOMHeight=e.clientHeight;let t=parseInt(i.paddingTop)||0,n=parseInt(i.paddingBottom)||0;this.paddingTop==t&&this.paddingBottom==n||(h|=8,this.paddingTop=t,this.paddingBottom=n)}let c=(this.printing?is:es)(e,this.paddingTop),u=c.top-this.pixelViewport.top,f=c.bottom-this.pixelViewport.bottom;this.pixelViewport=c;let d=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(d!=this.inView&&(this.inView=d,d&&(l=!0)),!this.inView)return 0;let p=e.clientWidth;if(this.contentDOMWidth==p&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=p,this.editorHeight=t.scrollDOM.clientHeight,h|=8),l){let e=t.docView.measureVisibleLineHeights();if(n.mustRefreshForHeights(e)&&(o=!0),o||n.lineWrapping&&Math.abs(p-this.contentDOMWidth)>n.charWidth){let{lineHeight:i,charWidth:l}=t.docView.measureTextSize();o=n.refresh(s,r,i,l,p/l,e),o&&(t.docView.minWidth=0,h|=8)}u>0&&f>0?a=Math.max(u,f):u<0&&f<0&&(a=Math.min(u,f)),n.heightChanged=!1,this.heightMap=this.heightMap.updateHeight(n,0,o,new jn(this.viewport.from,e)),n.heightChanged&&(h|=2)}let m=!this.viewportIsAppropriate(this.viewport,a)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return m&&(this.viewport=this.getViewport(a,this.scrollTarget)),this.updateForViewport(),(2&h||m)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),n=this.heightMap,s=this.state.doc,{visibleTop:r,visibleBottom:o}=this,l=new os(n.lineAt(r-1e3*i,$n.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-i),$n.ByHeight,s,0,0).to);if(e){let{head:t}=e.range;if(tl.to){let i,r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=n.lineAt(t,$n.ByPos,s,0,0);i="center"==e.y?(o.top+o.bottom)/2-r/2:"start"==e.y||"nearest"==e.y&&t=o+Math.max(10,Math.min(i,250)))&&n>r-2e3&&si.from&&o.push({from:i.from,to:n}),s=i.from&&l.from<=i.to&&cs(o,l.from-10,l.from+10),!l.empty&&l.to>=i.from&&l.to<=i.to&&cs(o,l.to-10,l.to+10);for(let{from:n,to:s}of o)s-n>1e3&&e.push(us(t,(t=>t.from>=i.from&&t.to<=i.to&&Math.abs(t.from-n)<1e3&&Math.abs(t.to-s)<1e3))||new ns(n,s,this.gapSize(i,n,s,r)))}return e}gapSize(t,e,i,n){let s=as(n,i)-as(n,e);return this.heightOracle.lineWrapping?t.height*s:n.total*this.heightOracle.charWidth*s}updateLineGaps(t){ns.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=ii.set(t.map((t=>t.draw(this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.state.facet(Ni);this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];Vt.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||ps(this.heightMap.lineAt(t,$n.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(t){return ps(this.heightMap.lineAt(this.scaler.fromDOM(t),$n.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(t){return ps(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class os{constructor(t,e){this.from=t,this.to=e}}function ls(t,e,i){let n=[],s=t,r=0;return Vt.spans(i.facet(Ni),t,e,{span(){},point(t,e){t>s&&(n.push({from:s,to:t}),r+=t-s),s=e}},20),s=1)return e[e.length-1].to;let n=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:s}=e[t],r=s-i;if(n<=r)return i+n;n-=r}}function as(t,e){let i=0;for(let{from:n,to:s}of t.ranges){if(e<=s){i+=e-n;break}i+=s-n}return i/t.total}function cs(t,e,i){for(let n=0;ne){let r=[];s.fromi&&r.push({from:i,to:s.to}),t.splice(n,1,...r),n+=r.length-1}}}function us(t,e){for(let i of t)if(e(i))return i}const fs={toDOM:t=>t,fromDOM:t=>t,scale:1};class ds{constructor(t,e,i){let n=0,s=0,r=0;this.viewports=i.map((({from:i,to:s})=>{let r=e.lineAt(i,$n.ByPos,t,0,0).top,o=e.lineAt(s,$n.ByPos,t,0,0).bottom;return n+=o-r,{from:i,to:s,top:r,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(e.height-n);for(let t of this.viewports)t.domTop=r+(t.top-s)*this.scale,r=t.domBottom=t.domTop+(t.bottom-t.top),s=t.bottom}toDOM(t){for(let e=0,i=0,n=0;;e++){let s=eps(t,e))):t.type)}const ms=V.define({combine:t=>t.join(" ")}),gs=V.define({combine:t=>t.indexOf(!0)>-1}),vs=Rt.newName(),ws=Rt.newName(),ys=Rt.newName(),bs={"&light":"."+ws,"&dark":"."+ys};function xs(t,e,i){return new Rt(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const ks=xs("."+vs,{"&.cm-editor":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere"},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},".cm-cursor, .cm-dropCursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},bs),Ss={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},As=We.ie&&We.ie_version<=11;class Cs{constructor(t,e,i){this.view=t,this.onChange=e,this.onScrollChanged=i,this.active=!1,this.selectionRange=new pe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(We.ie&&We.ie_version<=11||We.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),As&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),window.addEventListener("resize",this.onResize=this.onResize.bind(this)),"function"==typeof ResizeObserver&&(this.resize=new ResizeObserver((()=>{this.view.docView.lastUpdate{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange(),this.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:e}=this,i=this.selectionRange;if(e.state.facet(Ci)?e.root.activeElement!=this.dom:!re(e.dom,i))return;let n=i.anchorNode&&e.docView.nearest(i.anchorNode);n&&n.ignoreEvent(t)||((We.ie&&We.ie_version<=11||We.android&&We.chrome)&&!e.state.selection.main.empty&&i.focusNode&&le(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1))}readSelectionRange(){let{root:t}=this.view,e=ne(t),i=We.safari&&11==t.nodeType&&function(){let t=document.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}()==this.view.contentDOM&&function(t){let e=null;function i(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",i,!0),document.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),!e)return null;let n=e.startContainer,s=e.startOffset,r=e.endContainer,o=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);le(l.node,l.offset,r,o)&&([n,s,r,o]=[r,o,n,s]);return{anchorNode:n,anchorOffset:s,focusNode:r,focusOffset:o}}(this.view)||e;return!this.selectionRange.eq(i)&&(this.selectionRange.setRange(i),this.selectionChanged=!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;)if(1==i.nodeType)!e&&t{let t=this.delayedAndroidKey;this.delayedAndroidKey=null;let e=this.view.state;ye(this.view.contentDOM,t.key,t.keyCode)?this.processRecords():this.flush(),this.view.state==e&&this.view.update([])})),this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e})}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=window.setTimeout((()=>{this.delayedFlush=-1,this.flush()}),20))}forceFlush(){this.delayedFlush>=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1,this.flush())}processRecords(){let t=this.queue;for(let e of this.observer.takeRecords())t.push(e);t.length&&(this.queue=[]);let e=-1,i=-1,n=!1;for(let s of t){let t=this.readMutation(s);t&&(t.typeOver&&(n=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:n}}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return;t&&this.readSelectionRange();let{from:e,to:i,typeOver:n}=this.processRecords(),s=this.selectionChanged&&re(this.dom,this.selectionRange);if(e<0&&!s)return;this.selectionChanged=!1;let r=this.view.state;this.onChange(e,i,n),this.view.state==r&&this.view.update([])}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.dirty|=4),"childList"==t.type){let i=Ms(e,t.previousSibling||t.target.previousSibling,-1),n=Ms(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:n?e.posBefore(n):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resize)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);window.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onResize),window.removeEventListener("beforeprint",this.onPrint),this.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}function Ms(t,e,i){for(;e;){let n=Se.get(e);if(n&&n.parent==t)return n;let s=e.parentNode;e=s!=t.dom?s:i>0?e.nextSibling:e.previousSibling}return null}function Ds(t,e,i,n){let s,r,o=t.state.selection.main;if(e>-1){let n=t.docView.domBoundsAround(e,i,0);if(!n||t.state.readOnly)return;let{from:l,to:h}=n,a=t.docView.impreciseHead||t.docView.impreciseAnchor?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=t.observer.selectionRange;i&&(e.push(new en(i,n)),s==i&&r==n||e.push(new en(s,r)));return e}(t),c=new Zi(a,t.state);c.readRange(n.startDOM,n.endDOM);let u=o.from,f=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||We.android&&c.text.length0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if("end"==n){i-=o+Math.max(0,r-Math.min(o,l))-r}if(o=o?r-i:0,l=r+(l-o),o=r}else if(l=l?r-i:0,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}(t.state.doc.sliceString(l,h,"￿"),c.text,u-l,f);p&&(We.chrome&&13==t.inputState.lastKeyCode&&p.toB==p.from+2&&"￿￿"==c.text.slice(p.from,p.toB)&&p.toB--,s={from:l+p.from,to:l+p.toA,insert:d.of(c.text.slice(p.from,p.toB).split("￿"))}),r=function(t,e){if(0==t.length)return null;let i=t[0].pos,n=2==t.length?t[1].pos:i;return i>-1&&n>-1?B.single(i+e,n+e):null}(a,l)}else if(t.hasFocus||!t.state.facet(Ci)){let e=t.observer.selectionRange,{impreciseHead:i,impreciseAnchor:n}=t.docView,s=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!se(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),l=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!se(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset);s==o.head&&l==o.anchor||(r=B.single(l,s))}if(s||r)if(!s&&n&&!o.empty&&r&&r.main.empty?s={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:s&&s.from>=o.from&&s.to<=o.to&&(s.from!=o.from||s.to!=o.to)&&o.to-o.from-(s.to-s.from)<=4&&(s={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,s.from).append(s.insert).append(t.state.doc.slice(s.to,o.to))}),s){let e=t.state;if(We.ios&&t.inputState.flushIOSKey(t))return;if(We.android&&(s.from==o.from&&s.to==o.to&&1==s.insert.length&&2==s.insert.lines&&ye(t.contentDOM,"Enter",13)||s.from==o.from-1&&s.to==o.to&&0==s.insert.length&&ye(t.contentDOM,"Backspace",8)||s.from==o.from&&s.to==o.to+1&&0==s.insert.length&&ye(t.contentDOM,"Delete",46)))return;let i,n=s.insert.toString();if(t.state.facet(yi).some((e=>e(t,s.from,s.to,n))))return;if(t.inputState.composing>=0&&t.inputState.composing++,s.from>=o.from&&s.to<=o.to&&s.to-s.from>=(o.to-o.from)/3&&(!r||r.main.empty&&r.main.from==s.from+s.insert.length)&&t.inputState.composing<0){let n=o.froms.to?e.sliceDoc(s.to,o.to):"";i=e.replaceSelection(t.state.toText(n+s.insert.sliceString(0,void 0,t.state.lineBreak)+r))}else{let n=e.changes(s),l=r&&!e.selection.main.eq(r.main)&&r.main.to<=n.newLength?r.main:void 0;if(e.selection.ranges.length>1&&t.inputState.composing>=0&&s.to<=o.to&&s.to>=o.to-10){let r=t.state.sliceDoc(s.from,s.to),h=rn(t)||t.state.doc.lineAt(o.head),a=o.to-s.to,c=o.to-o.from;i=e.changeByRange((i=>{if(i.from==o.from&&i.to==o.to)return{changes:n,range:l||i.map(n)};let u=i.to-a,f=u-r.length;if(i.to-i.from!=c||t.state.sliceDoc(f,u)!=r||h&&i.to>=h.from&&i.from<=h.to)return{range:i};let d=e.changes({from:f,to:u,insert:s.insert}),p=i.to-o.to;return{changes:d,range:l?B.range(Math.max(0,l.anchor+p),Math.max(0,l.head+p)):i.map(d)}}))}else i={changes:n,selection:l&&e.selection.replaceRange(l)}}let l="input.type";t.composing&&(l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(i,{scrollIntoView:!0,userEvent:l})}else if(r&&!r.main.eq(o)){let e=!1,i="select";t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:i})}}class Os{constructor(t={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=t.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this.root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new rs(t.state||Ct.create()),this.plugins=this.state.facet(Ti).map((t=>new Li(t)));for(let t of this.plugins)t.update(this);this.observer=new Cs(this,((t,e,i)=>{Ds(this,t,e,i)}),(t=>{this.inputState.runScrollHandlers(this,t),this.observer.intersecting&&this.measure()})),this.inputState=new bn(this),this.docView=new nn(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),t.parent&&t.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}dispatch(...t){this._dispatch(1==t.length&&t[0]instanceof pt?t[0]:this.state.update(...t))}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,n=this.state;for(let e of t){if(e.startState!=n)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");n=e.state}if(this.destroyed)return void(this.viewState.state=n);if(n.facet(Ct.phrases)!=this.state.facet(Ct.phrases))return this.setState(n);e=new Hi(this,n,t);let s=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(s&&(s=s.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;s=new ki(t.empty?t:B.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(bi)?s=new ki(t.value):t.is(xi)?s=new ki(t.value,"center"):t.is(Si)&&(s=t.value)}this.viewState.update(e,s),this.bidiCache=Ls.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(Ii)!=this.styleModules&&this.mountStyles(),this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(ms)!=e.state.facet(ms)&&(this.viewState.mustMeasureContent=!0),(i||s||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!e.empty)for(let t of this.state.facet(wi))t(e)}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new rs(t),this.plugins=t.facet(Ti).map((t=>new Li(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView=new nn(this),this.inputState.ensureHandlers(this),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Ti),i=t.state.facet(Ti);if(e!=i){let n=[];for(let s of i){let i=e.indexOf(s);if(i<0)n.push(new Li(s));else{let e=this.plugins[i];e.mustUpdate=t,n.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=n,this.pluginMap.clear(),this.inputState.ensureHandlers(this)}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,t&&this.observer.flush();let e=null;try{for(let t=0;;t++){this.updateState=1;let i=this.viewport,n=this.viewState.measure(this);if(!n&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&n||([this.measureRequests,s]=[s,this.measureRequests]);let r=s.map((t=>{try{return t.read(this)}catch(t){return Ai(this.state,t),Es}})),o=new Hi(this,this.state),l=!1,h=!1;o.flags|=n,e?e.flags|=n:e=o,this.updateState=2,o.empty||(this.updatePlugins(o),this.inputState.update(o),this.updateAttrs(),l=this.docView.update(o));for(let t=0;t{Ze(this.contentDOM,this.contentAttrs,e),Ze(this.dom,this.editorAttrs,t)})),this.editorAttrs=t,this.contentAttrs=e}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(Os.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Ii),Rt.mount(this.root,this.styleModules.concat(ks).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame((()=>this.measure()))),t){if(null!=t.key)for(let e=0;ee.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}blockAtHeight(t,e){let i=Rs(e,this);return this.elementAtHeight(t-i).moveY(i)}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}visualLineAtHeight(t,e){let i=Rs(e,this);return this.lineBlockAtHeight(t-i).moveY(i)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}viewportLines(t,e){let i=Rs(e,this);for(let e of this.viewportLineBlocks)t(e.moveY(i))}get viewportLineBlocks(){return this.viewState.viewportLines}visualLineAt(t,e=0){return this.lineBlockAt(t).moveY(e+this.viewState.paddingTop)}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return yn(this,t,wn(this,t,e,i))}moveByGroup(t,e){return yn(this,t,wn(this,t,e,(e=>function(t,e,i){let n=t.state.charCategorizer(e),s=n(i);return t=>{let e=n(t);return s==xt.Space&&(s=e),s==e}}(this,t.head,e))))}moveToLineBoundary(t,e,i=!0){return function(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=n&&t.lineWrapping?t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),n=t.posAtCoords({x:i==(t.textDirection==Wi.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=n)return B.cursor(n,i?-1:1)}let o=hi.find(t.docView,e.head),l=o?i?o.posAtEnd:o.posAtStart:i?s.to:s.from;return B.cursor(l,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return yn(this,t,function(t,e,i,n){let s=e.head,r=i?1:-1;if(s==(i?t.state.doc.length:0))return B.cursor(s,e.assoc);let o,l=e.goalColumn,h=t.contentDOM.getBoundingClientRect(),a=t.coordsAtPos(s),c=t.documentTop;if(a)null==l&&(l=a.left-h.left),o=r<0?a.top:a.bottom;else{let e=t.viewState.lineBlockAt(s-c);null==l&&(l=Math.min(h.right-h.left,t.defaultCharacterWidth*(s-e.from))),o=(r<0?e.top:e.bottom)+c}let u=h.left+l,f=null!=n?n:t.defaultLineHeight>>1;for(let i=0;;i+=10){let n=o+(f+i)*r,a=gn(t,{x:u,y:n},!1,r);if(nh.bottom||(r<0?as))return B.cursor(a,e.assoc,void 0,l)}}(this,t,e,i))}scrollPosIntoView(t){this.dispatch({effects:bi.of(B.cursor(t))})}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),gn(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let i=this.docView.coordsAt(t,e);if(!i||i.left==i.right)return i;let n=this.state.doc.lineAt(t),s=this.bidiSpans(n);return fe(i,s[Gi.find(s,t-n.from,-1,e)].dir==Wi.LTR==e>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.heightOracle.direction}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>Ts)return Yi(t.length);let e=this.textDirection;for(let i of this.bidiCache)if(i.from==t.from&&i.dir==e)return i.order;let i=function(t,e){let i=t.length,n=e==zi?1:2,s=e==zi?2:1;if(!t||1==n&&!Ki.test(t))return Yi(i);for(let e=0,s=n,o=n;e=0;t-=3)if($i[t+1]==-r){let e=$i[t+2],i=2&e?n:4&e?1&e?s:n:0;i&&(Ji[l]=Ji[$i[t]]=i),h=t;break}}else{if(189==$i.length)break;$i[h++]=l,$i[h++]=e,$i[h++]=a}else if(2==(o=Ji[l])||1==o){let t=o==n;a=t?0:1;for(let e=h-3;e>=0;e-=3){let i=$i[e+2];if(2&i)break;if(t)$i[e+2]|=2;else{if(4&i)break;$i[e+2]|=4}}}for(let t=0;te;){let t=i,n=2!=Ji[--i];for(;i>e&&n==(2!=Ji[i-1]);)i--;o.push(new Gi(i,t,n?2:1))}else o.push(new Gi(e,t,0))}else for(let t=0;tDate.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{ve(this.contentDOM),this.docView.updateSelection()}))}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Si.of(new ki("number"==typeof t?B.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}static domEventHandlers(t){return Ri.define((()=>({})),{eventHandlers:t})}static theme(t,e){let i=Rt.newName(),n=[ms.of(i),Ii.of(xs(`.${i}`,t))];return e&&e.dark&&n.push(gs.of(!0)),n}static baseTheme(t){return Y.lowest(Ii.of(xs("."+vs,t,bs)))}}Os.scrollTo=bi,Os.centerOn=xi,Os.styleModule=Ii,Os.inputHandler=yi,Os.exceptionSink=vi,Os.updateListener=wi,Os.editable=Ci,Os.mouseSelectionStyle=gi,Os.dragMovesSelection=mi,Os.clickAddsSelectionRange=pi,Os.decorations=Ni,Os.darkTheme=gs,Os.contentAttributes=Pi,Os.editorAttributes=Bi,Os.lineWrapping=Os.contentAttributes.of({class:"cm-lineWrapping"}),Os.announce=dt.define();const Ts=4096;function Rs(t,e){return(null==t?e.contentDOM.getBoundingClientRect().top:t)+e.viewState.paddingTop}const Es={};class Ls{constructor(t,e,i,n){this.from=t,this.to=e,this.dir=i,this.order=n}static update(t,e){if(e.empty)return t;let i=[],n=t.length?t[t.length-1].dir:Wi.LTR;for(let s=Math.max(0,t.length-10);s=0;s--){let e=n[s],r="function"==typeof e?e(t):e;r&&Xe(r,i)}return i}const Ps=We.mac?"mac":We.windows?"win":We.linux?"linux":"key";function Ns(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const Is=Os.domEventHandlers({keydown:(t,e)=>Fs(Ws(e.state),t,e,"editor")}),Vs=V.define({enables:Is}),Hs=new WeakMap;function Ws(t){let e=t.facet(Vs),i=Hs.get(e);return i||Hs.set(e,i=function(t,e=Ps){let i=Object.create(null),n=Object.create(null),s=(t,e)=>{let i=n[t];if(null==i)n[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},r=(t,n,r,o)=>{let l=i[t]||(i[t]=Object.create(null)),h=n.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let n,s,r,o,l=i[i.length-1];"Space"==l&&(l=" ");for(let t=0;t{let n=zs={view:e,prefix:i,scope:t};return setTimeout((()=>{zs==n&&(zs=null)}),4e3),!0}]})}let a=h.join(" ");s(a,!1);let c=l[a]||(l[a]={preventDefault:!1,commands:[]});c.commands.push(r),o&&(c.preventDefault=!0)};for(let i of t){let t=i[e]||i.key;if(t)for(let e of i.scope?i.scope.split(" "):["editor"])r(e,t,i.run,i.preventDefault),i.shift&&r(e,"Shift-"+t,i.shift,i.preventDefault)}return i}(e.reduce(((t,e)=>t.concat(e)),[]))),i}let zs=null;function Fs(t,e,i,n){let s=function(t){var e=!(te&&(t.ctrlKey||t.altKey||t.metaKey)||Zt&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Yt:Jt)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),r=1==s.length&&" "!=s,o="",l=!1;zs&&zs.view==i&&zs.scope==n&&(o=zs.prefix+" ",(l=kn.indexOf(e.keyCode)<0)&&(zs=null));let h,a=t=>{if(t){for(let e of t.commands)if(e(i))return!0;t.preventDefault&&(l=!0)}return!1},c=t[n];if(c){if(a(c[o+Ns(s,e,!r)]))return!0;if(r&&(e.shiftKey||e.altKey||e.metaKey)&&(h=Jt[e.keyCode])&&h!=s){if(a(c[o+Ns(h,e,!0)]))return!0}else if(r&&e.shiftKey&&a(c[o+Ns(s,e,!0)]))return!0}return l}const qs=!We.ios,_s=V.define({combine:t=>Mt(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function js(t={}){return[_s.of(t),$s,Gs]}class Us{constructor(t,e,i,n,s){this.left=t,this.top=e,this.width=i,this.height=n,this.className=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width>=0&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}}const $s=Ri.fromClass(class{constructor(t){this.view=t,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=t.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=t.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),t.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){this.cursorLayer.style.animationDuration=this.view.state.facet(_s).cursorBlinkRate+"ms"}update(t){let e=t.startState.facet(_s)!=t.state.facet(_s);(e||t.selectionSet||t.geometryChanged||t.viewportChanged)&&this.view.requestMeasure(this.measureReq),t.transactions.some((t=>t.scrollIntoView))&&(this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}readPos(){let{state:t}=this.view,e=t.facet(_s),i=t.selection.ranges.map((t=>t.empty?[]:function(t,e){if(e.to<=t.viewport.from||e.from>=t.viewport.to)return[];let i=Math.max(e.from,t.viewport.from),n=Math.min(e.to,t.viewport.to),s=t.textDirection==Wi.LTR,r=t.contentDOM,o=r.getBoundingClientRect(),l=Js(t),h=window.getComputedStyle(r.firstChild),a=o.left+parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)),c=o.right-parseInt(h.paddingRight),u=Xs(t,i),f=Xs(t,n),d=u.type==ei.Text?u:null,p=f.type==ei.Text?f:null;t.lineWrapping&&(d&&(d=Ys(t,i,d)),p&&(p=Ys(t,n,p)));if(d&&p&&d.from==p.from)return g(v(e.from,e.to,d));{let i=d?v(e.from,null,d):w(u,!1),n=p?v(null,e.to,p):w(f,!0),s=[];return(d||u).to<(p||f).from-1?s.push(m(a,i.bottom,c,n.top)):i.bottomu&&n.from=r)break;l>s&&h(Math.max(t,s),null==e&&t<=u,Math.min(l,r),null==i&&l>=f,o.dir)}if(s=n.to+1,s>=r)break}return 0==l.length&&h(u,null==e,f,null==i,t.textDirection),{top:r,bottom:o,horizontal:l}}function w(t,e){let i=o.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(this.view,t))).reduce(((t,e)=>t.concat(e))),n=[];for(let i of t.selection.ranges){let s=i==t.selection.main;if(i.empty?!s||qs:e.drawRangeCursor){let t=Qs(this.view,i,s);t&&n.push(t)}}return{rangePieces:i,cursors:n}}drawSel({rangePieces:t,cursors:e}){if(t.length!=this.rangePieces.length||t.some(((t,e)=>!t.eq(this.rangePieces[e])))){this.selectionLayer.textContent="";for(let e of t)this.selectionLayer.appendChild(e.draw());this.rangePieces=t}if(e.length!=this.cursors.length||e.some(((t,e)=>!t.eq(this.cursors[e])))){let t=this.cursorLayer.children;if(t.length!==e.length){this.cursorLayer.textContent="";for(const t of e)this.cursorLayer.appendChild(t.draw())}else e.forEach(((e,i)=>e.adjust(t[i])));this.cursors=e}}destroy(){this.selectionLayer.remove(),this.cursorLayer.remove()}}),Ks={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};qs&&(Ks[".cm-line"].caretColor="transparent !important");const Gs=Y.highest(Os.theme(Ks));function Js(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Wi.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function Ys(t,e,i){let n=B.cursor(e);return{from:Math.max(i.from,t.moveToLineBoundary(n,!1,!0).from),to:Math.min(i.to,t.moveToLineBoundary(n,!0,!0).from),type:ei.Text}}function Xs(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let t of i.type)if(t.to>e||t.to==e&&(t.to==i.to||t.type==ei.Text))return t;return i}function Qs(t,e,i){let n=t.coordsAtPos(e.head,e.assoc||1);if(!n)return null;let s=Js(t);return new Us(n.left-s.left,n.top-s.top,-1,n.bottom-n.top,i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}function Zs(){return er}const tr=ii.line({class:"cm-activeLine"}),er=Ri.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let n of t.state.selection.ranges){if(!n.empty)return ii.none;let s=t.lineBlockAt(n.head);s.from>e&&(i.push(tr.range(s.from)),e=s.from)}return ii.set(i)}},{decorations:t=>t.decorations}),ir=1024;let nr=0;class sr{constructor(t,e){this.from=t,this.to=e}}class rr{constructor(t={}){this.id=nr++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=lr.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}rr.closedBy=new rr({deserialize:t=>t.split(" ")}),rr.openedBy=new rr({deserialize:t=>t.split(" ")}),rr.group=new rr({deserialize:t=>t.split(" ")}),rr.contextHash=new rr({perNode:!0}),rr.lookAhead=new rr({perNode:!0}),rr.mounted=new rr({perNode:!0});const or=Object.create(null);class lr{constructor(t,e,i,n=0){this.name=t,this.props=e,this.id=i,this.flags=n}static define(t){let e=t.props&&t.props.length?Object.create(null):or,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),n=new lr(t.name||"",e,t.id,i);if(t.props)for(let i of t.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[i[0].id]=i[1]}return n}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(rr.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let n of i.split(" "))e[n]=t[i];return t=>{for(let i=t.prop(rr.group),n=-1;n<(i?i.length:0);n++){let s=e[n<0?t.name:i[n]];if(s)return s}}}}lr.none=new lr("",Object.create(null),0,8);class hr{constructor(t){this.types=t;for(let e=0;et.node;;){let o=!1;if(t.from<=s&&t.to>=n&&(t.type.isAnonymous||!1!==e(t.type,t.from,t.to,r))){if(t.firstChild())continue;t.type.isAnonymous||(o=!0)}for(;o&&i&&i(t.type,t.from,t.to,r),o=t.type.isAnonymous,!t.nextSibling();){if(!t.parent())return;o=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:Cr(lr.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,i)=>new ur(this.type,t,e,i,this.propValues)),t.makeTree||((t,e,i)=>new ur(lr.none,t,e,i)))}static build(t){return function(t){var e;let{buffer:i,nodeSet:n,maxBufferLength:s=ir,reused:r=[],minRepeatType:o=n.types.length}=t,l=Array.isArray(i)?new fr(i,i.length):i,h=n.types,a=0,c=0;function u(t,e,i,v,w){let{id:y,start:b,end:x,size:k}=l,S=c;for(;k<0;){if(l.next(),-1==k){let e=r[y];return i.push(e),void v.push(b-t)}if(-3==k)return void(a=y);if(-4==k)return void(c=y);throw new RangeError(`Unrecognized record size: ${k}`)}let A,C,M=h[y],D=b-t;if(x-b<=s&&(C=m(l.pos-e,w))){let e=new Uint16Array(C.size-C.skip),i=l.pos-C.size,s=e.length;for(;l.pos>i;)s=g(C.start,e,s);A=new dr(e,x-C.start,n),D=C.start-t}else{let t=l.pos-k;l.next();let e=[],i=[],n=y>=o?y:-1,r=0,h=x;for(;l.pos>t;)n>=0&&l.id==n&&l.size>=0?(l.end<=h-s&&(d(e,i,b,r,l.end,h,n,S),r=e.length,h=l.end),l.next()):u(b,t,e,i,n);if(n>=0&&r>0&&r-1&&r>0){let t=f(M);A=Cr(M,e,i,0,e.length,0,x-b,t,t)}else A=p(M,e,i,x-b,S-x)}i.push(A),v.push(D)}function f(t){return(e,i,n)=>{let s,r,o=0,l=e.length-1;if(l>=0&&(s=e[l])instanceof ur){if(!l&&s.type==t&&s.length==n)return s;(r=s.prop(rr.lookAhead))&&(o=i[l]+s.length+r)}return p(t,e,i,n,o)}}function d(t,e,i,s,r,o,l,h){let a=[],c=[];for(;t.length>s;)a.push(t.pop()),c.push(e.pop()+i-r);t.push(p(n.types[l],a,c,o-r,h-o)),e.push(r-i)}function p(t,e,i,n,s=0,r){if(a){let t=[rr.contextHash,a];r=r?[t].concat(r):[t]}if(s>25){let t=[rr.lookAhead,s];r=r?[t].concat(r):[t]}return new ur(t,e,i,n,r)}function m(t,e){let i=l.fork(),n=0,r=0,h=0,a=i.end-s,c={size:0,start:0,skip:0};t:for(let s=i.pos-t;i.pos>s;){let t=i.size;if(i.id==e&&t>=0){c.size=n,c.start=r,c.skip=h,h+=4,n+=4,i.next();continue}let l=i.pos-t;if(t<0||l=o?4:0,f=i.start;for(i.next();i.pos>l;){if(i.size<0){if(-3!=i.size)break t;u+=4}else i.id>=o&&(u+=4);i.next()}r=f,n+=t,h+=u}return(e<0||n==t)&&(c.size=n,c.start=r,c.skip=h),c.size>4?c:void 0}function g(t,e,i){let{id:n,start:s,end:r,size:h}=l;if(l.next(),h>=0&&n4){let n=l.pos-(h-4);for(;l.pos>n;)i=g(t,e,i)}e[--i]=o,e[--i]=r-t,e[--i]=s-t,e[--i]=n}else-3==h?a=n:-4==h&&(c=n);return i}let v=[],w=[];for(;l.pos>0;)u(t.start||0,t.bufferStart||0,v,w,-1);let y=null!==(e=t.length)&&void 0!==e?e:v.length?w[0]+v[0].length:0;return new ur(h[t.topID],v.reverse(),w.reverse(),y)}(t)}}ur.empty=new ur(lr.none,[],[],0);class fr{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new fr(this.buffer,this.index)}}class dr{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return lr.none}toString(){let t=[];for(let e=0;e0));l=r[l+3]);return o}slice(t,e,i,n){let s=this.buffer,r=new Uint16Array(e-t);for(let n=t,o=0;n=e&&ie;case 1:return i<=e&&n>e;case 2:return n>e;case 4:return!0}}function mr(t,e){let i=t.childBefore(e);for(;i;){let e=i.lastChild;if(!e||e.to!=i.to)break;e.type.isError&&e.from==e.to?(t=i,i=e.prevSibling):i=e}return t}function gr(t,e,i,n){for(var s;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to0?o.length:-1;t!=h;t+=e){let h=o[t],a=l[t]+r._from;if(pr(n,i,a,a+h.length))if(h instanceof dr){if(2&s)continue;let o=h.findChild(0,h.buffer.length,e,i-a,n);if(o>-1)return new br(new yr(r,h,t,a),null,o)}else if(1&s||!h.type.isAnonymous||kr(h)){let o;if(!(1&s)&&h.props&&(o=h.prop(rr.mounted))&&!o.overlay)return new vr(o.tree,a,t,r);let l=new vr(h,a,t,r);return 1&s||!l.type.isAnonymous?l:l.nextChild(e<0?h.children.length-1:0,e,i,n)}}if(1&s||!r.type.isAnonymous)return null;if(t=r.index>=0?r.index+e:e<0?-1:r._parent.node.children.length,r=r._parent,!r)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this.node.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this.node.children.length-1,-1,t,-2)}enter(t,e,i=!0,n=!0){let s;if(i&&(s=this.node.prop(rr.mounted))&&s.overlay){let i=t-this.from;for(let{from:t,to:n}of s.overlay)if((e>0?t<=i:t=i:n>i))return new vr(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,n?0:2)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get cursor(){return new xr(this)}get tree(){return this.node}toTree(){return this.node}resolve(t,e=0){return gr(this,t,e,!1)}resolveInner(t,e=0){return gr(this,t,e,!0)}enterUnfinishedNodesBefore(t){return mr(this,t)}getChild(t,e=null,i=null){let n=wr(this,t,e,i);return n.length?n[0]:null}getChildren(t,e=null,i=null){return wr(this,t,e,i)}toString(){return this.node.toString()}}function wr(t,e,i,n){let s=t.cursor,r=[];if(!s.firstChild())return r;if(null!=i)for(;!s.type.is(i);)if(!s.nextSibling())return r;for(;;){if(null!=n&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return null==n?r:[]}}class yr{constructor(t,e,i,n){this.parent=t,this.buffer=e,this.index=i,this.start=n}}class br{constructor(t,e,i){this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}child(t,e,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.context.start,i);return s<0?null:new br(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,i,n=!0){if(!n)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return r<0?null:new br(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new br(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new br(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get cursor(){return new xr(this)}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let r=i.buffer[this.index+1],o=i.buffer[this.index+2];t.push(i.slice(n,s,r,o)),e.push(0)}return new ur(this.type,t,e,this.to-this.from)}resolve(t,e=0){return gr(this,t,e,!1)}resolveInner(t,e=0){return gr(this,t,e,!0)}enterUnfinishedNodesBefore(t){return mr(this,t)}toString(){return this.context.buffer.childString(this.index)}getChild(t,e=null,i=null){let n=wr(this,t,e,i);return n.length?n[0]:null}getChildren(t,e=null,i=null){return wr(this,t,e,i)}}class xr{constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof vr)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}get name(){return this.type.name}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:i,buffer:n}=this.buffer;return this.type=e||n.set.types[n.buffer[t]],this.from=i+n.buffer[t+1],this.to=i+n.buffer[t+2],!0}yield(t){return!!t&&(t instanceof vr?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree.node.children.length-1:0,t,e,i,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.buffer.start,i);return!(s<0)&&(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=!0,n=!0){return this.buffer?!!n&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i&&!(1&this.mode),n))}parent(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let t=i<0?0:this.stack[i]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(t)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:n}=this;if(n){if(t>0){if(this.index-1)for(let n=e+t,s=t<0?-1:i.node.children.length;n!=s;n+=t){let t=i.node.children[n];if(1&this.mode||t instanceof dr||!t.type.isAnonymous||kr(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let r=t;r;r=r._parent)if(r.index==n){if(n==this.index)return r;e=r,i=s+1;break t}n=this.stack[--s]}for(let t=i;tt instanceof dr||!t.type.isAnonymous||kr(t)))}const Sr=new WeakMap;function Ar(t,e){if(!t.isAnonymous||e instanceof dr||e.type!=t)return 1;let i=Sr.get(e);if(null==i){i=1;for(let n of e.children){if(n.type!=t||!(n instanceof ur)){i=1;break}i+=Ar(t,n)}Sr.set(e,i)}return i}function Cr(t,e,i,n,s,r,o,l,h){let a=0;for(let i=n;i=c)break;p+=e}if(a==s+1){if(p>c){let t=i[s];e(t.children,t.positions,0,t.children.length,n[s]+l);continue}u.push(i[s])}else{let e=n[a-1]+i[a-1].length-d;u.push(Cr(t,i,n,s,a,d,e,null,h))}f.push(d+l-r)}}(e,i,n,s,0),(l||h)(u,f,o)}class Mr{constructor(t,e,i,n,s=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=n,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let n=[new Mr(0,t.length,t,0,!1,i)];for(let i of e)i.to>t.length&&n.push(i);return n}static applyChanges(t,e,i=128){if(!e.length)return t;let n=[],s=1,r=t.length?t[0]:null;for(let o=0,l=0,h=0;;o++){let a=o=i)for(;r&&r.from=e.from||c<=e.to||h){let t=Math.max(e.from,l)-h,i=Math.min(e.to,c)-h;e=t>=i?null:new Mr(t,i,e.tree,e.offset+h,o>0,!!a)}if(e&&n.push(e),r.to>c)break;r=snew sr(t.from,t.to))):[new sr(0,0)]:[new sr(0,t.length)],this.createParse(t,e||[],i)}parse(t,e,i){let n=this.startParse(t,e,i);for(;;){let t=n.advance();if(t)return t}}}class Or{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}var Tr;new rr({perNode:!0});const Rr=new rr;class Er{constructor(t,e,i,n=[]){this.data=t,this.topNode=i,Ct.prototype.hasOwnProperty("tree")||Object.defineProperty(Ct.prototype,"tree",{get(){return Br(this)}}),this.parser=e,this.extension=[qr.of(this),Ct.languageData.of(((t,e,i)=>t.facet(Lr(t,e,i))))].concat(n)}isActiveAt(t,e,i=-1){return Lr(t,e,i)==this.data}findRegions(t){let e=t.facet(qr);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],n=(t,e)=>{if(t.prop(Rr)==this.data)return void i.push({from:e,to:e+t.length});let s=t.prop(rr.mounted);if(s){if(s.tree.prop(Rr)==this.data){if(s.overlay)for(let t of s.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(s.overlay){let t=i.length;if(n(s.tree,s.overlay[0].from+e),i.length>t)return}}for(let i=0;i=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let Nr=null;class Ir{constructor(t,e,i=[],n,s,r,o,l){this.parser=t,this.state=e,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}startParse(){return this.parser.startParse(new Pr(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=ur.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(Mr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=Nr;Nr=this;try{return t()}finally{Nr=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Vr(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:n,treeLen:s,viewport:r,skipped:o}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,n,s)=>e.push({fromA:t,toA:i,fromB:n,toB:s}))),i=Mr.applyChanges(i,e),n=ur.empty,s=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){o=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);it.from&&(this.fragments=Vr(this.fragments,i,n),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends Dr{createParse(e,i,n){let s=n[0].from,r=n[n.length-1].to;return{parsedPos:s,advance(){let e=Nr;if(e){for(let t of n)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new ur(lr.none,[],[],r-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return Nr}}function Vr(t,e,i){return Mr.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class Hr{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new Hr(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=new Ir(t.facet(qr).parser,t,[],ur.empty,0,{from:0,to:e},[],null);return i.work(20,e)||i.takeTree(),new Hr(i)}}Er.state=_.define({create:Hr.init,update(t,e){for(let t of e.effects)if(t.is(Er.setState))return t.value;return e.startState.facet(qr)!=e.state.facet(qr)?Hr.init(e.state):t.apply(e)}});let Wr=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(Wr=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const zr="undefined"!=typeof navigator&&(null===(Tr=navigator.scheduling)||void 0===Tr?void 0:Tr.isInputPending)?()=>navigator.scheduling.isInputPending():null,Fr=Ri.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(Er.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(Er.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=Wr(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndn+1e3,l=s.context.work((()=>zr&&zr()||Date.now()>r),n+(o?0:1e5));this.chunkBudget-=Date.now()-e,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Er.setState.of(new Hr(s.context))})),this.chunkBudget>0&&(!l||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>Ai(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),qr=V.define({combine:t=>t.length?t[0]:null,enables:[Er.state,Fr]}),_r=V.define(),jr=V.define({combine:t=>{if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function Ur(t){let e=t.facet(jr);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function $r(t,e){let i="",n=t.tabSize;if(9==t.facet(jr).charCodeAt(0))for(;e>=n;)i+="\t",e-=n;for(let t=0;t=i.from&&n<=i.to?s&&n==t?{text:"",from:t}:(e<0?n-1&&(s+=r-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,e=t.length){return u(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:n}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(n);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Jr=new rr;function Yr(t){let e=t.type.prop(Jr);if(e)return e;let i,n=t.firstChild;if(n&&(i=n.type.prop(rr.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>function(t,e,i,n,s){let r=t.textAfter,o=r.match(/^\s*/)[0].length,l=n&&r.slice(o,o+n.length)==n||s==t.pos+o,h=e?function(t){let e=t.node,i=e.childAfter(e.from),n=e.lastChild;if(!i)return null;let s=t.options.simulateBreak,r=t.state.doc.lineAt(i.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let t=i.to;;){let s=e.childAfter(t);if(!s||s==n)return null;if(!s.type.isSkipped)return s.from-1&&n%2==(e<0?1:0))return[i[n+e]]}return null}function io(t,e,i,n={}){let s=n.maxScanDistance||1e4,r=n.brackets||"()[]{}",o=Br(t),l=o.resolveInner(e,i);for(let n=l;n;n=n.parent){let s=eo(n.type,i,r);if(s&&n.from0)return null;let a={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),u=0;for(let t=0;!c.next().done&&t<=r;){let r=c.value;i<0&&(t+=r.length);let l=e+t*i;for(let t=i>0?0:r.length-1,e=i>0?r.length:-1;t!=e;t+=i){let e=o.indexOf(r[t]);if(!(e<0||n.resolve(l+t,1).type!=s))if(e%2==0==i>0)u++;else{if(1==u)return{start:a,end:{from:l+t,to:l+t+1},matched:e>>1==h>>1};u--}}i>0&&(t+=r.length)}return c.done?{start:a,matched:!1}:null}(t,e,i,o,l.type,s,r)}function no(t,e,i,n,s,r){let o=n.parent,l={from:n.from,to:n.to},h=0,a=null==o?void 0:o.cursor;if(a&&(i<0?a.childBefore(n.from):a.childAfter(n.to)))do{if(i<0?a.to<=n.from:a.from>=n.to){if(0==h&&s.indexOf(a.type.name)>-1&&a.fromi.empty?t.moveByChar(i,e):lo(i,e)))}const ao=t=>ho(t,t.textDirection!=Wi.LTR),co=t=>ho(t,t.textDirection==Wi.LTR);function uo(t,e){return oo(t,(i=>i.empty?t.moveByGroup(i,e):lo(i,e)))}function fo(t,e,i){if(e.type.prop(i))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function po(t,e,i){let n,s,r=Br(t).resolveInner(e.head),o=i?rr.closedBy:rr.openedBy;for(let n=e.head;;){let e=i?r.childAfter(n):r.childBefore(n);if(!e)break;fo(t,e,o)?r=e:n=i?e.to:e.from}return s=r.type.prop(o)&&(n=i?io(t,r.from,1):io(t,r.to,-1))&&n.matched?i?n.end.to:n.end.from:i?r.to:r.from,B.cursor(s,i?-1:1)}function mo(t,e){return oo(t,(i=>{if(!i.empty)return lo(i,e);let n=t.moveVertically(i,e);return n.head!=i.head?n:t.moveToLineBoundary(i,e)}))}const go=t=>mo(t,!1),vo=t=>mo(t,!0);function wo(t,e){let{state:i}=t,n=so(i.selection,(i=>i.empty?t.moveVertically(i,e,t.dom.clientHeight):lo(i,e)));if(n.eq(i.selection))return!1;let s=t.coordsAtPos(i.selection.main.head),r=t.scrollDOM.getBoundingClientRect();return t.dispatch(ro(i,n),{effects:s&&s.top>r.top&&s.bottomwo(t,!1),bo=t=>wo(t,!0);function xo(t,e,i){let n=t.lineBlockAt(e.head),s=t.moveToLineBoundary(e,i);if(s.head==e.head&&s.head!=(i?n.to:n.from)&&(s=t.moveToLineBoundary(e,i,!1)),!i&&s.head==n.from&&n.length){let i=/^\s*/.exec(t.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&e.head!=n.from+i&&(s=B.cursor(n.from+i))}return s}const ko=t=>oo(t,(e=>xo(t,e,!0))),So=t=>oo(t,(e=>xo(t,e,!1)));function Ao(t,e){let i=so(t.state.selection,(t=>{let i=e(t);return B.range(t.anchor,i.head,i.goalColumn)}));return!i.eq(t.state.selection)&&(t.dispatch(ro(t.state,i)),!0)}function Co(t,e){return Ao(t,(i=>t.moveByChar(i,e)))}const Mo=t=>Co(t,t.textDirection!=Wi.LTR),Do=t=>Co(t,t.textDirection==Wi.LTR);function Oo(t,e){return Ao(t,(i=>t.moveByGroup(i,e)))}function To(t,e){return Ao(t,(i=>t.moveVertically(i,e)))}const Ro=t=>To(t,!1),Eo=t=>To(t,!0);function Lo(t,e){return Ao(t,(i=>t.moveVertically(i,e,t.dom.clientHeight)))}const Bo=t=>Lo(t,!1),Po=t=>Lo(t,!0),No=t=>Ao(t,(e=>xo(t,e,!0))),Io=t=>Ao(t,(e=>xo(t,e,!1))),Vo=({state:t,dispatch:e})=>(e(ro(t,{anchor:0})),!0),Ho=({state:t,dispatch:e})=>(e(ro(t,{anchor:t.doc.length})),!0),Wo=({state:t,dispatch:e})=>(e(ro(t,{anchor:t.selection.main.anchor,head:0})),!0),zo=({state:t,dispatch:e})=>(e(ro(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function Fo({state:t,dispatch:e},i){if(t.readOnly)return!1;let n="delete.selection",s=t.changeByRange((t=>{let{from:e,to:s}=t;if(e==s){let t=i(e);te&&(n="delete.forward"),e=Math.min(e,t),s=Math.max(s,t)}return e==s?{range:t}:{changes:{from:e,to:s},range:B.cursor(e)}}));return!s.changes.empty&&(e(t.update(s,{scrollIntoView:!0,userEvent:n})),!0)}function qo(t,e,i){if(t instanceof Os)for(let n of t.pluginField(Di.atomicRanges))n.between(e,e,((t,n)=>{te&&(e=i?n:t)}));return e}const _o=(t,e)=>Fo(t,(i=>{let s,r,{state:o}=t,l=o.doc.lineAt(i);if(!e&&i>l.from&&i_o(t,!1),Uo=t=>_o(t,!0),$o=(t,e)=>Fo(t,(i=>{let s=i,{state:r}=t,o=r.doc.lineAt(s),l=r.charCategorizer(s);for(let t=null;;){if(s==(e?o.to:o.from)){s==i&&o.number!=(e?r.doc.lines:1)&&(s+=e?1:-1);break}let h=n(o.text,s-o.from,e)+o.from,a=o.text.slice(Math.min(s,h)-o.from,Math.max(s,h)-o.from),c=l(a);if(null!=t&&c!=t)break;" "==a&&s==i||(t=c),s=h}return qo(t,s,e)})),Ko=t=>$o(t,!1),Go=t=>Fo(t,(e=>{let i=t.lineBlockAt(e).to;return qo(t,e=s.number){let t=e[e.length-1];t.to=r.to,t.ranges.push(n)}else e.push({from:s.from,to:r.to,ranges:[n]});i=r.number+1}return e}function Yo(t,e,i){if(t.readOnly)return!1;let n=[],s=[];for(let e of Jo(t)){if(i?e.to==t.doc.length:0==e.from)continue;let r=t.doc.lineAt(i?e.to+1:e.from-1),o=r.length+1;if(i){n.push({from:e.to,to:r.to},{from:e.from,insert:r.text+t.lineBreak});for(let i of e.ranges)s.push(B.range(Math.min(t.doc.length,i.anchor+o),Math.min(t.doc.length,i.head+o)))}else{n.push({from:r.from,to:e.from},{from:e.to,insert:t.lineBreak+r.text});for(let t of e.ranges)s.push(B.range(t.anchor-o,t.head-o))}}return!!n.length&&(e(t.update({changes:n,scrollIntoView:!0,selection:B.create(s,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Xo(t,e,i){if(t.readOnly)return!1;let n=[];for(let e of Jo(t))i?n.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):n.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Qo=Zo(!1);function Zo(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let n=e.changeByRange((i=>{let{from:n,to:s}=i,r=e.doc.lineAt(n),o=!t&&n==s&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,n=Br(t).resolveInner(e),s=n.childBefore(e),r=n.childAfter(e);return s&&r&&s.to<=e&&r.from>=e&&(i=s.type.prop(rr.closedBy))&&i.indexOf(r.name)>-1&&t.doc.lineAt(s.to).from==t.doc.lineAt(r.from).from?{from:s.to,to:r.from}:null}(e,n);t&&(n=s=(s<=r.to?r:e.doc.lineAt(s)).to);let l=new Gr(e,{simulateBreak:n,simulateDoubleBreak:!!o}),h=Kr(l,n);for(null==h&&(h=/^\s*/.exec(e.doc.lineAt(n).text)[0].length);sr.from&&n{let s=[];for(let r=n.from;r<=n.to;){let o=t.doc.lineAt(r);o.number>i&&(n.empty||n.to>o.from)&&(e(o,s,n),i=o.number),r=o.to+1}let r=t.changes(s);return{changes:s,range:B.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}}))}const el=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(tl(t,((e,i)=>{i.push({from:e.from,insert:t.facet(jr)})})),{userEvent:"input.indent"})),!0),il=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(tl(t,((e,i)=>{let n=/^\s*/.exec(e.text)[0];if(!n)return;let s=u(n,t.tabSize),r=0,o=$r(t,Math.max(0,s-Ur(t)));for(;roo(t,(e=>po(t.state,e,t.textDirection!=Wi.LTR))),shift:t=>Ao(t,(e=>po(t.state,e,t.textDirection!=Wi.LTR)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>oo(t,(e=>po(t.state,e,t.textDirection==Wi.LTR))),shift:t=>Ao(t,(e=>po(t.state,e,t.textDirection==Wi.LTR)))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Yo(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>Xo(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Yo(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>Xo(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,n=null;return i.ranges.length>1?n=B.create([i.main]):i.main.empty||(n=B.create([B.cursor(i.main.head)])),!!n&&(e(ro(t,n)),!0)}},{key:"Mod-Enter",run:Zo(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=Jo(t).map((({from:e,to:i})=>B.range(e,Math.min(i+1,t.doc.length))));return e(t.update({selection:B.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=so(t.selection,(e=>{var i;let n=Br(t).resolveInner(e.head,1);for(;!(n.from=e.to||n.to>e.to&&n.from<=e.from)&&(null===(i=n.parent)||void 0===i?void 0:i.parent);)n=n.parent;return B.range(n.to,n.from)}));return e(ro(t,i)),!0},preventDefault:!0},{key:"Mod-[",run:il},{key:"Mod-]",run:el},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),n=new Gr(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),s=tl(t,((e,s,r)=>{let o=Kr(n,e.from);if(null==o)return;/\S/.test(e.text)||(o=0);let l=/^\s*/.exec(e.text)[0],h=$r(t,o);(l!=h||r.from{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(Jo(e).map((({from:t,to:i})=>(t>0?t--:it.moveVertically(e,!0))).map(i);return t.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,i){let n=!1,s=so(t.selection,(e=>{let s=io(t,e.head,-1)||io(t,e.head,1)||e.head>0&&io(t,e.head-1,1)||e.headuo(t,t.textDirection!=Wi.LTR),shift:t=>Oo(t,t.textDirection!=Wi.LTR)},{mac:"Cmd-ArrowLeft",run:So,shift:Io},{key:"ArrowRight",run:co,shift:Do,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>uo(t,t.textDirection==Wi.LTR),shift:t=>Oo(t,t.textDirection==Wi.LTR)},{mac:"Cmd-ArrowRight",run:ko,shift:No},{key:"ArrowUp",run:go,shift:Ro,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Vo,shift:Wo},{mac:"Ctrl-ArrowUp",run:yo,shift:Bo},{key:"ArrowDown",run:vo,shift:Eo,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Ho,shift:zo},{mac:"Ctrl-ArrowDown",run:bo,shift:Po},{key:"PageUp",run:yo,shift:Bo},{key:"PageDown",run:bo,shift:Po},{key:"Home",run:So,shift:Io},{key:"Mod-Home",run:Vo,shift:Wo},{key:"End",run:ko,shift:No},{key:"Mod-End",run:Ho,shift:zo},{key:"Enter",run:Qo},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:jo,shift:jo},{key:"Delete",run:Uo},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ko},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>$o(t,!0)},{mac:"Mod-Backspace",run:t=>Fo(t,(e=>{let i=t.lineBlockAt(e).from;return qo(t,e>i?i:Math.max(0,e-1),!1)}))},{mac:"Mod-Delete",run:Go}].concat([{key:"Ctrl-b",run:ao,shift:Mo,preventDefault:!0},{key:"Ctrl-f",run:co,shift:Do},{key:"Ctrl-p",run:go,shift:Ro},{key:"Ctrl-n",run:vo,shift:Eo},{key:"Ctrl-a",run:t=>oo(t,(e=>B.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>Ao(t,(e=>B.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>oo(t,(e=>B.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>Ao(t,(e=>B.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:Uo},{key:"Ctrl-h",run:jo},{key:"Ctrl-k",run:Go},{key:"Ctrl-Alt-h",run:Ko},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:d.of(["",""])},range:B.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,s=t.doc.lineAt(i),r=i==s.from?i-1:n(s.text,i-s.from,!1)+s.from,o=i==s.to?i+1:n(s.text,i-s.from,!0)+s.from;return{changes:{from:r,to:o,insert:t.doc.slice(i,o).append(t.doc.slice(r,i))},range:B.cursor(o)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:bo}].map((t=>({mac:t.key,run:t.run,shift:t.shift})))));let sl=0;class rl{constructor(t,e,i){this.set=t,this.base=e,this.modified=i,this.id=sl++}static define(t){if(null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let e=new rl([],null,[]);if(e.set.push(e),t)for(let i of t.set)e.set.push(i);return e}static defineModifier(){let t=new ll;return e=>e.modified.indexOf(t)>-1?e:ll.get(e.base||e,e.modified.concat(t).sort(((t,e)=>t.id-e.id)))}}let ol=0;class ll{constructor(){this.instances=[],this.id=ol++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find((i=>{return i.base==t&&(n=e,s=i.modified,n.length==s.length&&n.every(((t,e)=>t==s[e])));var n,s}));if(i)return i;let n=[],s=new rl(n,t,e);for(let t of e)t.instances.push(s);let r=hl(e);for(let e of t.set)for(let t of r)n.push(ll.get(e,t));return s}}function hl(t){let e=[t];for(let i=0;i0&&e+3==t.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!n)throw new RangeError("Invalid path: "+t);if(i.push("*"==n[0]?null:'"'==n[0][0]?JSON.parse(n[0]):n[0]),e+=n[0].length,e==t.length)break;let o=t[e++];if(e==t.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+t);r=t.slice(e)}let o=i.length-1,l=i[o];if(!l)throw new RangeError("Invalid path: "+t);let h=new pl(n,s,o>0?i.slice(0,o):null);e[l]=h.sort(e[l])}}return cl.add(e)}const cl=new rr,ul=V.define({combine:t=>t.length?ml.combinedMatch(t):null}),fl=V.define({combine:t=>t.length?t[0].match:null});function dl(t){return t.facet(ul)||t.facet(fl)}class pl{constructor(t,e,i,n){this.tags=t,this.mode=e,this.context=i,this.next=n}sort(t){return!t||t.deptht.facet(Os.darkTheme)==("dark"==e.themeType)?[this]:[]))),this.fallback=s.concat(fl.of(this))}match(t,e){if(this.scope&&e!=this.scope)return null;for(let e of t.set){let i=this.map[e.id];if(void 0!==i)return e!=t&&(this.map[t.id]=i),i}return this.map[t.id]=this.all}static combinedMatch(t){if(1==t.length)return t[0].match;let e=t.some((t=>t.scope))?void 0:Object.create(null);return(i,n)=>{let s=e&&e[i.id];if(void 0!==s)return s;let r=null;for(let e of t){let t=e.match(i,n);t&&(r=r?r+" "+t:t)}return e&&(e[i.id]=r),r}}static define(t,e){return new ml(t,e||{})}static get(t,e,i){let n=dl(t);return n&&n(e,i||lr.none)}}class gl{constructor(t){this.markCache=Object.create(null),this.tree=Br(t.state),this.decorations=this.buildDeco(t,dl(t.state))}update(t){let e=Br(t.state),i=dl(t.state),n=i!=t.startState.facet(ul);e.length{i.add(t,e,this.markCache[n]||(this.markCache[n]=ii.mark({class:n})))}));return i.finish()}}const vl=Y.high(Ri.fromClass(gl,{decorations:t=>t.decorations})),wl=[""];class yl{constructor(t,e,i){this.at=t,this.style=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,n,s,r){let{type:o,from:l,to:h}=t;if(l>=i||h<=e)return;wl[s]=o.name,o.isTop&&(r=o);let a=n,c=o.prop(cl),u=!1;for(;c;){if(!c.context||xl(c.context,wl,s)){for(let t of c.tags){let e=this.style(t,r);e&&(a&&(a+=" "),a+=e,1==c.mode?n+=(n?" ":"")+e:0==c.mode&&(u=!0))}break}c=c.next}if(this.startSpan(t.from,a),u)return;let f=t.tree&&t.tree.prop(rr.mounted);if(f&&f.overlay){let o=t.node.enter(f.overlay[0].from+l,1),c=t.firstChild();for(let u=0,d=l;;u++){let p=u=m)&&t.nextSibling()););if(!p||m>i)break;d=p.to+l,d>e&&(this.highlightRange(o.cursor,Math.max(e,p.from+l),Math.min(i,d),n,s,f.tree.type),this.startSpan(d,a))}c&&t.parent()}else if(t.firstChild()){do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,n,s+1,r),this.startSpan(Math.min(i,t.to),a)}}while(t.nextSibling());t.parent()}}}function bl(t,e,i,n,s){let r=new yl(e,n,s);r.highlightRange(t.cursor(),e,i,"",0,t.type),r.flush(i)}function xl(t,e,i){if(t.length>i-1)return!1;for(let n=i-1,s=t.length-1;s>=0;s--,n--){let i=t[s];if(i&&i!=e[n])return!1}return!0}const kl=rl.define,Sl=kl(),Al=kl(),Cl=kl(Al),Ml=kl(Al),Dl=kl(),Ol=kl(Dl),Tl=kl(Dl),Rl=kl(),El=kl(Rl),Ll=kl(),Bl=kl(),Pl=kl(),Nl=kl(Pl),Il=kl(),Vl={comment:Sl,lineComment:kl(Sl),blockComment:kl(Sl),docComment:kl(Sl),name:Al,variableName:kl(Al),typeName:Cl,tagName:kl(Cl),propertyName:Ml,attributeName:kl(Ml),className:kl(Al),labelName:kl(Al),namespace:kl(Al),macroName:kl(Al),literal:Dl,string:Ol,docString:kl(Ol),character:kl(Ol),attributeValue:kl(Ol),number:Tl,integer:kl(Tl),float:kl(Tl),bool:kl(Dl),regexp:kl(Dl),escape:kl(Dl),color:kl(Dl),url:kl(Dl),keyword:Ll,self:kl(Ll),null:kl(Ll),atom:kl(Ll),unit:kl(Ll),modifier:kl(Ll),operatorKeyword:kl(Ll),controlKeyword:kl(Ll),definitionKeyword:kl(Ll),moduleKeyword:kl(Ll),operator:Bl,derefOperator:kl(Bl),arithmeticOperator:kl(Bl),logicOperator:kl(Bl),bitwiseOperator:kl(Bl),compareOperator:kl(Bl),updateOperator:kl(Bl),definitionOperator:kl(Bl),typeOperator:kl(Bl),controlOperator:kl(Bl),punctuation:Pl,separator:kl(Pl),bracket:Nl,angleBracket:kl(Nl),squareBracket:kl(Nl),paren:kl(Nl),brace:kl(Nl),content:Rl,heading:El,heading1:kl(El),heading2:kl(El),heading3:kl(El),heading4:kl(El),heading5:kl(El),heading6:kl(El),contentSeparator:kl(Rl),list:kl(Rl),quote:kl(Rl),emphasis:kl(Rl),strong:kl(Rl),link:kl(Rl),monospace:kl(Rl),strikethrough:kl(Rl),inserted:kl(),deleted:kl(),changed:kl(),invalid:kl(),meta:Il,documentMeta:kl(Il),annotation:kl(Il),processingInstruction:kl(Il),definition:rl.defineModifier(),constant:rl.defineModifier(),function:rl.defineModifier(),standard:rl.defineModifier(),local:rl.defineModifier(),special:rl.defineModifier()};Vl.link,Vl.heading,Vl.emphasis,Vl.strong,Vl.strikethrough,Vl.keyword,Vl.atom,Vl.bool,Vl.url,Vl.contentSeparator,Vl.labelName,Vl.literal,Vl.inserted,Vl.string,Vl.deleted,Vl.regexp,Vl.escape,Vl.string,Vl.variableName,Vl.variableName,Vl.typeName,Vl.namespace,Vl.className,Vl.variableName,Vl.macroName,Vl.propertyName,Vl.comment,Vl.meta,Vl.invalid,Vl.link,Vl.heading,Vl.emphasis,Vl.strong,Vl.keyword,Vl.atom,Vl.bool,Vl.url,Vl.labelName,Vl.inserted,Vl.deleted,Vl.literal,Vl.string,Vl.number,Vl.regexp,Vl.escape,Vl.string,Vl.variableName,Vl.variableName,Vl.variableName,Vl.variableName,Vl.propertyName,Vl.typeName,Vl.namespace,Vl.className,Vl.macroName,Vl.propertyName,Vl.operator,Vl.comment,Vl.meta,Vl.invalid,Vl.punctuation;var Hl=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","plural"],Wl=/^[+\-*&%=<>!?|~^]/,zl=/^[:\[\(\{]/,Fl=["true","false"],ql=/^(\d[+\-\*\/])?\d+(\.\d+)?/;function _l(t,e){var i=t.peek();if(e.incomment)return t.skipTo("#}")?(t.eatWhile(/\#|}/),e.incomment=!1):t.skipToEnd(),"comment";if(e.intag){if(e.operator){if(e.operator=!1,t.match(Fl))return"atom";if(t.match(ql))return"number"}if(e.sign){if(e.sign=!1,t.match(Fl))return"atom";if(t.match(ql))return"number"}if(e.instring)return i==e.instring&&(e.instring=!1),t.next(),"string";if("'"==i||'"'==i)return e.instring=i,t.next(),"string";if(t.match(e.intag+"}")||t.eat("-")&&t.match(e.intag+"}"))return e.intag=!1,"tag";if(t.match(Wl))return e.operator=!0,"operator";if(t.match(zl))e.sign=!0;else if(t.eat(" ")||t.sol()){if(t.match(Hl))return"keyword";if(t.match(Fl))return"atom";if(t.match(ql))return"number";t.sol()&&t.next()}else t.next();return"variable"}if(t.eat("{")){if(t.eat("#"))return e.incomment=!0,t.skipTo("#}")?(t.eatWhile(/\#|}/),e.incomment=!1):t.skipToEnd(),"comment";if(i=t.eat(/\{|%/))return e.intag=i,"{"==i&&(e.intag="}"),t.eat("-"),"tag"}t.next()}Hl=new RegExp("(("+Hl.join(")|(")+"))\\b"),Fl=new RegExp("(("+Fl.join(")|(")+"))\\b");const jl={startState:function(){return{tokenize:_l}},token:function(t,e){return e.tokenize(t,e)},languageData:{commentTokens:{block:{open:"{#",close:"#}"}}}};var Ul=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");const $l={token:function(t,e){var i=t.peek(),n=e.escaped;if(e.escaped=!1,"#"==i&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==i?e.inlinePairs++:"}"==i?e.inlinePairs--:"["==i?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!n&&","==i)return t.next(),"meta";if(e.inlinePairs>0&&!n&&","==i)return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(0==e.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(Ul))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped="\\"==i,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};function Kl(t,e,i,n=0,s=0){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);let r=s;for(let s=n;s=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?t.toLowerCase():t;return n(this.string.substr(this.pos,t.length))==n(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function Jl(t){if("object"!=typeof t)return t;let e={};for(let i in t){let n=t[i];e[i]=n instanceof Array?n.slice():n}return e}class Yl extends Er{constructor(t){let e=(i=t.languageData,V.define({combine:i?t=>t.concat(i):void 0}));var i;let n,s={token:(r=t).token,blankLine:r.blankLine||(()=>{}),startState:r.startState||(()=>!0),copyState:r.copyState||Jl,indent:r.indent||(()=>null),languageData:r.languageData||{},tokenTable:r.tokenTable||eh};var r;super(e,new class extends Dr{createParse(t,e,i){return new Zl(n,t,e,i)}},function(t){let e=lr.define({id:ih.length,name:"Document",props:[Rr.add((()=>t))]});return ih.push(e),e}(e),[_r.of(((t,e)=>this.getIndent(t,e)))]),n=this,this.streamParser=s,this.stateAfter=new rr({perNode:!0}),this.tokenTable=t.tokenTable?new oh(s.tokenTable):lh}static define(t){return new Yl(t)}getIndent(t,e){let i=Br(t.state),n=i.resolve(e);for(;n&&n.type!=this.topNode;)n=n.parent;if(!n)return null;let s,r,o=Xl(this,i,0,n.from,e);if(o?(r=o.state,s=o.pos+1):(r=this.streamParser.startState(t.unit),s=0),e-s>1e4)return null;for(;s=n&&i+e.length<=s&&e.prop(t.stateAfter);if(r)return{state:t.streamParser.copyState(r),pos:i+e.length};for(let r=e.children.length-1;r>=0;r--){let o=e.children[r],l=i+e.positions[r],h=o instanceof ur&&l=e.length)return e;s||e.type!=t.topNode||(s=!0);for(let r=e.children.length-1;r>=0;r--){let o,l=e.positions[r],h=e.children[r];if(li&&Xl(t,n.tree,0-n.offset,i,r);if(o&&(e=Ql(t,n.tree,i+n.offset,o.pos+n.offset,!1)))return{state:o.state,tree:e}}return{state:t.streamParser.startState(n?Ur(n):4),tree:ur.empty}}(t,i,r,null==s?void 0:s.state);this.state=o,this.parsedPos=this.chunkStart=r+l.length;for(let t=0;t=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let t=e.indexOf("\n");t>-1&&(e=e.slice(0,t))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),i=t+e.length;for(let t=this.rangeIndex;;){let n=this.ranges[t].to;if(n>=i)break;if(e=e.slice(0,n-(i-e.length)),t++,t==this.ranges.length)break;let s=this.ranges[t].from,r=this.lineAfter(s);e+=r,i=s+r.length}return{line:e,end:i}}skipGapsTo(t,e,i){for(;;){let n=this.ranges[this.rangeIndex].to,s=t+e;if(i>0?n>s:n>=s)break;e+=this.ranges[++this.rangeIndex].from-n}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){e+=s=this.skipGapsTo(e,s,1);let t=this.chunk.length;i+=s=this.skipGapsTo(i,s,-1),n+=this.chunk.length-t}return this.chunk.push(t,e,i,n),s}parseLine(t){let{line:e,end:i}=this.nextLine(),n=0,{streamParser:s}=this.lang,r=new Gl(e,t?t.state.tabSize:4,t?Ur(t.state):2);if(r.eol())s.blankLine(this.state,r.indentUnit);else for(;!r.eol();){let t=th(s.token,r,this.state);if(t&&(n=this.emitToken(this.lang.tokenTable.resolve(t),this.parsedPos+r.start,this.parsedPos+r.pos,4,n)),r.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return n}throw new Error("Stream parser failed to advance stream.")}const eh=Object.create(null),ih=[lr.none],nh=new hr(ih),sh=[],rh=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","typeName"],["attribute","propertyName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])rh[t]=ah(eh,e);class oh{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),rh)}resolve(t){return t?this.table[t]||(this.table[t]=ah(this.extra,t)):0}}const lh=new oh(eh);function hh(t,e){sh.indexOf(t)>-1||(sh.push(t),console.warn(e))}function ah(t,e){let i=null;for(let n of e.split(".")){let e=t[n]||Vl[n];e?"function"==typeof e?i?i=e(i):hh(n,`Modifier ${n} used at start of tag`):i?hh(n,`Tag ${n} used as modifier`):i=e:hh(n,`Unknown highlighting tag ${n}`)}if(!i)return 0;let n=e.replace(/ /g,"_"),s=lr.define({id:ih.length,name:n,props:[al({[n]:i})]});return ih.push(s),s.id}class ch extends Bt{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}ch.prototype.elementClass="",ch.prototype.toDOM=void 0,ch.prototype.mapMode=S.TrackBefore,ch.prototype.startSide=ch.prototype.endSide=-1,ch.prototype.point=!0;const uh=V.define(),fh=V.define(),dh=Os.baseTheme({".cm-gutters":{display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#999",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"}}),ph=V.define({combine:t=>t.some((t=>t))});function mh(t){let e=[gh,dh];return t&&!1===t.fixed&&e.push(ph.of(!0)),e}const gh=Ri.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(fh).map((e=>new bh(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(ph),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,n=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(ph)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=Vt.iter(this.view.state.facet(uh),this.view.viewport.from),n=[],s=this.gutters.map((t=>new yh(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks){let e;if(Array.isArray(t.type)){for(let i of t.type)if(i.type==ei.Text){e=i;break}}else e=t.type==ei.Text?t:void 0;if(e){n.length&&(n=[]),wh(i,n,t.from);for(let t of s)t.line(this.view,e,n)}}for(let t of s)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(fh),i=t.state.facet(fh),n=t.docChanged||t.heightChanged||t.viewportChanged||!Vt.eq(t.startState.facet(uh),t.state.facet(uh),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(n=!0);else{n=!0;let s=[];for(let n of i){let i=e.indexOf(n);i<0?s.push(new bh(this.view,n)):(this.gutters[i].update(t),s.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),s.indexOf(t)<0&&t.destroy();for(let t of s)this.dom.appendChild(t.dom);this.gutters=s}return n}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:Di.scrollMargins.from((t=>0!=t.gutters.length&&t.fixed?t.view.textDirection==Wi.LTR?{left:t.dom.offsetWidth}:{right:t.dom.offsetWidth}:null))});function vh(t){return Array.isArray(t)?t:[t]}function wh(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class yh{constructor(t,e,i){this.gutter=t,this.height=i,this.localMarkers=[],this.i=0,this.cursor=Vt.iter(t.markers,e.from)}line(t,e,i){this.localMarkers.length&&(this.localMarkers=[]),wh(this.cursor,this.localMarkers,e.from);let n=i.length?this.localMarkers.concat(i):this.localMarkers,s=this.gutter.config.lineMarker(t,e,n);s&&n.unshift(s);let r=this.gutter;if(0==n.length&&!r.config.renderEmptyElements)return;let o=e.top-this.height;if(this.i==r.elements.length){let i=new xh(t,e.height,o,n);r.elements.push(i),r.dom.appendChild(i.dom)}else r.elements[this.i].update(t,e.height,o,n);this.height=e.bottom,this.i++}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class bh{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(n=>{let s=t.lineBlockAtHeight(n.clientY-t.documentTop);e.domEventHandlers[i](t,s,n)&&n.preventDefault()}));this.markers=vh(e.markers(t)),e.initialSpacer&&(this.spacer=new xh(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=vh(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!Vt.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class xh{constructor(t,e,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.update(t,e,i,n)}update(t,e,i,n){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;iMt(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let n=i[t],s=e[t];i[t]=n?(t,e,i)=>n(t,e,i)||s(t,e,i):s}return i}})});class Ah extends ch{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Ch(t,e){return t.state.facet(Sh).formatNumber(e,t.state)}const Mh=fh.compute([Sh],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(kh),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new Ah(Ch(t,t.state.doc.lineAt(e.from).number)),lineMarkerChange:t=>t.startState.facet(Sh)!=t.state.facet(Sh),initialSpacer:t=>new Ah(Ch(t,Oh(t.state.doc.lines))),updateSpacer(t,e){let i=Ch(e.view,Oh(e.view.state.doc.lines));return i==t.number?t:new Ah(i)},domEventHandlers:t.facet(Sh).domEventHandlers})));function Dh(t={}){return[Sh.of(t),mh(),Mh]}function Oh(t){let e=9;for(;eMt(t,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})});const Bh=_.define({create:()=>Jh.empty,update(t,e){let i=e.state.facet(Lh),n=e.annotation(Th);if(n){let s=e.docChanged?B.single(function(t){let e=0;return t.iterChangedRanges(((t,i)=>e=i)),e}(e.changes)):void 0,r=zh.fromTransaction(e,s),o=n.side,l=0==o?t.undone:t.done;return l=r?Fh(l,l.length,i.minDepth,r):jh(l,e.startState.selection),new Jh(0==o?n.rest:l,0==o?l:n.rest)}let s=e.annotation(Rh);if("full"!=s&&"before"!=s||(t=t.isolate()),!1===e.annotation(pt.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=zh.fromTransaction(e),o=e.annotation(pt.time),l=e.annotation(pt.userEvent);return r?t=t.addChanges(r,o,l,i.newGroupDelay,i.minDepth):e.selection&&(t=t.addSelection(e.startState.selection,o,l,i.newGroupDelay)),"full"!=s&&"after"!=s||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new Jh(t.done.map(zh.fromJSON),t.undone.map(zh.fromJSON))});function Ph(t={}){return[Bh,Lh.of(t),Os.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?Ih:"historyRedo"==t.inputType?Vh:null;return!!i&&(t.preventDefault(),i(e))}})]}function Nh(t,e){return function({state:i,dispatch:n}){if(!e&&i.readOnly)return!1;let s=i.field(Bh,!1);if(!s)return!1;let r=s.pop(t,i,e);return!!r&&(n(r),!0)}}const Ih=Nh(0,!1),Vh=Nh(1,!1),Hh=Nh(0,!0),Wh=Nh(1,!0);class zh{constructor(t,e,i,n,s){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new zh(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new zh(t.changes&&C.fromJSON(t.changes),[],t.mapped&&A.fromJSON(t.mapped),t.startSelection&&B.fromJSON(t.startSelection),t.selectionsAfter.map(B.fromJSON))}static fromTransaction(t,e){let i=_h;for(let e of t.startState.facet(Eh)){let n=e(t);n.length&&(i=i.concat(n))}return!i.length&&t.changes.empty?null:new zh(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,_h)}static selection(t){return new zh(void 0,_h,void 0,void 0,t)}}function Fh(t,e,i,n){let s=e+1>i+20?e-i-1:0,r=t.slice(s,e);return r.push(n),r}function qh(t,e){return t.length?e.length?t.concat(e):t:e}const _h=[];function jh(t,e){if(t.length){let i=t[t.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),Fh(t,t.length-1,1e9,i.setSelAfter(n)))}return[zh.selection([e])]}function Uh(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function $h(t,e){if(!t.length)return t;let i=t.length,n=_h;for(;i;){let s=Kh(t[i-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let e=t.slice(0,i);return e[i-1]=s,e}e=s.mapped,i--,n=s.selectionsAfter}return n.length?[zh.selection(n)]:_h}function Kh(t,e,i){let n=qh(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):_h,i);if(!t.changes)return zh.selection(n);let s=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new zh(s,dt.mapEffects(t.effects,e),o,t.startSelection.map(r),n)}const Gh=/^(input\.type|delete)($|\.)/;class Jh{constructor(t,e,i=0,n){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new Jh(this.done,this.undone):this}addChanges(t,e,i,n,s){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&t.changes&&(!i||Gh.test(i))&&(!o.selectionsAfter.length&&e-this.prevTimei.push(t,e))),e.iterChangedRanges(((t,e,s,r)=>{for(let t=0;t=e&&s<=o&&(n=!0)}})),n}(o.changes,t.changes)||"input.type.compose"==i)?Fh(r,r.length-1,s,new zh(t.changes.compose(o.changes),qh(t.effects,o.effects),o.mapped,o.startSelection,_h)):Fh(r,r.length,s,t),new Jh(r,_h,e,i)}addSelection(t,e,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:_h;return s.length>0&&e-this.prevTimet.empty!=o.ranges[e].empty)).length)?this:new Jh(jh(this.done,t),this.undone,e,i);var r,o}addMapping(t){return new Jh($h(this.done,t),$h(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let n=0==t?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1];if(i&&s.selectionsAfter.length)return e.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Th.of({side:t,rest:Uh(n)}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let i=1==n.length?_h:n.slice(0,n.length-1);return s.mapped&&(i=$h(i,s.mapped)),e.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Th.of({side:t,rest:i}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}Jh.empty=new Jh(_h,_h);const Yh=[{key:"Mod-z",run:Ih,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Vh,preventDefault:!0},{key:"Mod-u",run:Hh,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Wh,preventDefault:!0}];function Xh(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),n=t.state.doc.lineAt(i),s=i-n.from,r=s>2e3?-1:s==n.length?function(t,e){let i=t.coordsAtPos(t.viewport.from);return i?Math.round(Math.abs((i.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):u(n.text,t.state.tabSize,i-n.from);return{line:n.number,col:r,off:s}}function Qh(t,e){let i=Xh(t,e),n=t.state.selection;return i?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from),s=t.state.doc.lineAt(e);i={line:s.number,col:i.col,off:Math.min(i.off,s.length)},n=n.map(t.changes)}},get(e,s,r){let o=Xh(t,e);if(!o)return n;let l=function(t,e,i){let n=Math.min(e.line,i.line),s=Math.max(e.line,i.line),r=[];if(e.off>2e3||i.off>2e3||e.col<0||i.col<0){let o=Math.min(e.off,i.off),l=Math.max(e.off,i.off);for(let e=n;e<=s;e++){let i=t.doc.line(e);i.length<=l&&r.push(B.range(i.from+o,i.to+l))}}else{let o=Math.min(e.col,i.col),l=Math.max(e.col,i.col);for(let e=n;e<=s;e++){let i=t.doc.line(e),n=f(i.text,o,t.tabSize,!0);if(n>-1){let e=f(i.text,l,t.tabSize);r.push(B.range(i.from+n,i.from+e))}}}return r}(t.state,i,o);return l.length?r?B.create(l.concat(n.ranges)):B.create(l):n}}:null}function Zh(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return Os.mouseSelectionStyle.of(((t,i)=>e(i)?Qh(t,i):null))}const ta=V.define({combine(t){let e,i;for(let n of t)e=e||n.topContainer,i=i||n.bottomContainer;return{topContainer:e,bottomContainer:i}}});function ea(t,e){let i=t.plugin(ia),n=i?i.specs.indexOf(e):-1;return n>-1?i.panels[n]:null}const ia=Ri.fromClass(class{constructor(t){this.input=t.state.facet(oa),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(ta);this.top=new na(t,!0,e.topContainer),this.bottom=new na(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(ta);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new na(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new na(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(oa);if(i!=this.input){let e=i.filter((t=>t)),n=[],s=[],r=[],o=[];for(let i of e){let e,l=this.specs.indexOf(i);l<0?(e=i(t.view),o.push(e)):(e=this.panels[l],e.update&&e.update(t)),n.push(e),(e.top?s:r).push(e)}this.specs=e,this.panels=n,this.top.sync(s),this.bottom.sync(r);for(let t of o)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:Di.scrollMargins.from((t=>({top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()})))});class na{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=sa(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=sa(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function sa(t){let e=t.nextSibling;return t.remove(),e}const ra=Os.baseTheme({".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"}}),oa=V.define({enables:[ia,ra]});function la(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var s=i[n];"string"==typeof s?t.setAttribute(n,s):null!=s&&(t[n]=s)}e++}for(;et.normalize("NFKD"):t=>t;class ca{constructor(t,e,i=0,n=t.length,s){this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?t=>s(aa(t)):aa,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return h(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=a(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=c(t);let n=this.normalize(e);for(let t=0,s=i;;t++){let r=n.charCodeAt(t),o=this.match(r,s);if(o)return this.value=o,this;if(t==n.length-1)break;s==i&&tthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,n=i+e[0].length;if(this.matchPos=n+(i==n?1:0),i==this.curLine.length&&this.nextLine(),ithis.value.to)return this.value={from:i,to:n,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||n.to<=e){let n=new ma(e,t.sliceString(e,i));return pa.set(t,n),n}if(n.from==e&&n.to==i)return n;let{text:s,from:r}=n;return r>e&&(s=t.sliceString(e,r)+s,r=e),n.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e&&this.flat.tothis.flat.text.length-10&&(e=null),e){let t=this.flat.from+e.index,i=t+e[0].length;return this.value={from:t,to:i,match:e},this.matchPos=i+(t==i?1:0),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ma.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function va(t){let e=la("input",{class:"cm-textfield",name:"line"});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:n}=t,s=n.doc.lineAt(n.selection.main.head),[,r,o,l,h]=i,a=l?+l.slice(1):0,c=o?+o:s.number;if(o&&h){let t=c/100;r&&(t=t*("-"==r?-1:1)+s.number/n.doc.lines),c=Math.round(n.doc.lines*t)}else o&&r&&(c=c*("-"==r?-1:1)+s.number);let u=n.doc.line(Math.max(1,Math.min(n.doc.lines,c)));t.dispatch({effects:wa.of(!1),selection:B.cursor(u.from+Math.max(0,Math.min(a,u.length))),scrollIntoView:!0}),t.focus()}return{dom:la("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:wa.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),i())},onsubmit:t=>{t.preventDefault(),i()}},la("label",t.state.phrase("Go to line"),": ",e)," ",la("button",{class:"cm-button",type:"submit"},t.state.phrase("go"))),pos:-10}}"undefined"!=typeof Symbol&&(da.prototype[Symbol.iterator]=ga.prototype[Symbol.iterator]=function(){return this});const wa=dt.define(),ya=_.define({create:()=>!0,update(t,e){for(let i of e.effects)i.is(wa)&&(t=i.value);return t},provide:t=>oa.from(t,(t=>t?va:null))}),ba=Os.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),xa={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!0},ka=V.define({combine:t=>Mt(t,xa,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function Sa(t){let e=[Oa,Da];return t&&e.push(ka.of(t)),e}const Aa=ii.mark({class:"cm-selectionMatch"}),Ca=ii.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ma(t,e,i,n){return!(0!=i&&t(e.sliceDoc(i-1,i))==xt.Word||n!=e.doc.length&&t(e.sliceDoc(n,n+1))==xt.Word)}const Da=Ri.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(ka),{state:i}=t,n=i.selection;if(n.ranges.length>1)return ii.none;let s,r=n.main,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return ii.none;let t=i.wordAt(r.head);if(!t)return ii.none;o=i.charCategorizer(r.head),s=i.sliceDoc(t.from,t.to)}else{let t=r.to-r.from;if(t200)return ii.none;if(e.wholeWords){if(s=i.sliceDoc(r.from,r.to),o=i.charCategorizer(r.head),!Ma(o,i,r.from,r.to)||!function(t,e,i,n){return t(e.sliceDoc(i,i+1))==xt.Word&&t(e.sliceDoc(n-1,n))==xt.Word}(o,i,r.from,r.to))return ii.none}else if(s=i.sliceDoc(r.from,r.to).trim(),!s)return ii.none}let l=[];for(let n of t.visibleRanges){let t=new ca(i.doc,s,n.from,n.to);for(;!t.next().done;){let{from:n,to:s}=t.value;if((!o||Ma(o,i,n,s))&&(r.empty&&n<=r.from&&s>=r.to?l.push(Ca.range(n,s)):(n>=r.to||s<=r.from)&&l.push(Aa.range(n,s)),l.length>e.maxMatches))return ii.none}}return ii.set(l)}},{decorations:t=>t.decorations}),Oa=Os.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const Ta=V.define({combine(t){var e;return{top:t.reduce(((t,e)=>null!=t?t:e.top),void 0)||!1,caseSensitive:t.reduce(((t,e)=>null!=t?t:e.caseSensitive||e.matchCase),void 0)||!1,createPanel:(null===(e=t.find((t=>t.createPanel)))||void 0===e?void 0:e.createPanel)||(t=>new tc(t))}}});class Ra{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,fa),!0}catch(t){return!1}}(this.search)),this.unquoted=this.search.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp}create(){return this.regexp?new Na(this):new Ba(this)}getCursor(t,e=0,i=t.length){return this.regexp?Pa(this,t,e,i):La(this,t,e,i)}}class Ea{constructor(t){this.spec=t}}function La(t,e,i,n){return new ca(e,t.unquoted,i,n,t.caseSensitive?void 0:t=>t.toLowerCase())}class Ba extends Ea{constructor(t){super(t)}nextMatch(t,e,i){let n=La(this.spec,t,i,t.length).nextOverlapping();return n.done&&(n=La(this.spec,t,0,e).nextOverlapping()),n.done?null:n.value}prevMatchInRange(t,e,i){for(let n=i;;){let i=Math.max(e,n-1e4-this.spec.unquoted.length),s=La(this.spec,t,i,n),r=null;for(;!s.nextOverlapping().done;)r=s.value;if(r)return r;if(i==e)return null;n-=1e4}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.length)}getReplacement(t){return this.spec.replace}matchAll(t,e){let i=La(this.spec,t,0,t.length),n=[];for(;!i.next().done;){if(n.length>=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=La(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}function Pa(t,e,i,n){return new da(e,t.search,t.caseSensitive?void 0:{ignoreCase:!0},i,n)}class Na extends Ea{nextMatch(t,e,i){let n=Pa(this.spec,t,i,t.length).next();return n.done&&(n=Pa(this.spec,t,0,e).next()),n.done?null:n.value}prevMatchInRange(t,e,i){for(let n=1;;n++){let s=Math.max(e,i-1e4*n),r=Pa(this.spec,t,s,i),o=null;for(;!r.next().done;)o=r.value;if(o&&(s==e||o.from>s+10))return o;if(s==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.length)}getReplacement(t){return this.spec.replace.replace(/\$([$&\d+])/g,((e,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=Pa(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}const Ia=dt.define(),Va=dt.define(),Ha=_.define({create:t=>new Wa(Ya(t).create(),null),update(t,e){for(let i of e.effects)i.is(Ia)?t=new Wa(i.value.create(),t.panel):i.is(Va)&&(t=new Wa(t.query,i.value?Ja:null));return t},provide:t=>oa.from(t,(t=>t.panel))});class Wa{constructor(t,e){this.query=t,this.panel=e}}const za=ii.mark({class:"cm-searchMatch"}),Fa=ii.mark({class:"cm-searchMatch cm-searchMatch-selected"}),qa=Ri.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ha))}update(t){let e=t.state.field(Ha);(e!=t.startState.field(Ha)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ii.none;let{view:i}=this,n=new Ht;for(let e=0,s=i.visibleRanges,r=s.length;es[e+1].from-500;)l=s[++e].to;t.highlight(i.state.doc,o,l,((t,e)=>{let s=i.state.selection.ranges.some((i=>i.from==t&&i.to==e));n.add(t,e,s?Fa:za)}))}return n.finish()}},{decorations:t=>t.decorations});function _a(t){return e=>{let i=e.state.field(Ha,!1);return i&&i.query.spec.valid?t(e,i):Xa(e)}}const ja=_a(((t,{query:e})=>{let{from:i,to:n}=t.state.selection.main,s=e.nextMatch(t.state.doc,i,n);return!(!s||s.from==i&&s.to==n)&&(t.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:nc(t,s),userEvent:"select.search"}),!0)})),Ua=_a(((t,{query:e})=>{let{state:i}=t,{from:n,to:s}=i.selection.main,r=e.prevMatch(i.doc,n,s);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:nc(t,r),userEvent:"select.search"}),!0)})),$a=_a(((t,{query:e})=>{let i=e.matchAll(t.state.doc,1e3);return!(!i||!i.length)&&(t.dispatch({selection:B.create(i.map((t=>B.range(t.from,t.to)))),userEvent:"select.search.matches"}),!0)})),Ka=_a(((t,{query:e})=>{let{state:i}=t,{from:n,to:s}=i.selection.main;if(i.readOnly)return!1;let r=e.nextMatch(i.doc,n,n);if(!r)return!1;let o,l,h=[];if(r.from==n&&r.to==s&&(l=i.toText(e.getReplacement(r)),h.push({from:r.from,to:r.to,insert:l}),r=e.nextMatch(i.doc,r.from,r.to)),r){let t=0==h.length||h[0].from>=r.to?0:r.to-r.from-l.length;o={anchor:r.from-t,head:r.to-t}}return t.dispatch({changes:h,selection:o,scrollIntoView:!!o,effects:r?nc(t,r):void 0,userEvent:"input.replace"}),!0})),Ga=_a(((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state.doc,1e9).map((t=>{let{from:i,to:n}=t;return{from:i,to:n,insert:e.getReplacement(t)}}));return!!i.length&&(t.dispatch({changes:i,userEvent:"input.replace.all"}),!0)}));function Ja(t){return t.state.facet(Ta).createPanel(t)}function Ya(t,e){var i;let n=t.selection.main,s=n.empty||n.to>n.from+100?"":t.sliceDoc(n.from,n.to),r=null!==(i=null==e?void 0:e.caseSensitive)&&void 0!==i?i:t.facet(Ta).caseSensitive;return e&&!s?e:new Ra({search:s.replace(/\n/g,"\\n"),caseSensitive:r})}const Xa=t=>{let e=t.state.field(Ha,!1);if(e&&e.panel){let i=ea(t,Ja);if(!i)return!1;let n=i.dom.querySelector("[name=search]");if(n!=t.root.activeElement){let i=Ya(t.state,e.query.spec);i.valid&&t.dispatch({effects:Ia.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Va.of(!0),e?Ia.of(Ya(t.state,e.query.spec)):dt.appendConfig.of(rc)]});return!0},Qa=t=>{let e=t.state.field(Ha,!1);if(!e||!e.panel)return!1;let i=ea(t,Ja);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Va.of(!1)}),!0},Za=[{key:"Mod-f",run:Xa,scope:"editor search-panel"},{key:"F3",run:ja,shift:Ua,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ja,shift:Ua,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Qa,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:n,to:s}=i.main,r=[],o=0;for(let e=new ca(t.doc,t.sliceDoc(n,s));!e.next().done;){if(r.length>1e3)return!1;e.value.from==n&&(o=r.length),r.push(B.range(e.value.from,e.value.to))}return e(t.update({selection:B.create(r,o),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:t=>{let e=ea(t,va);if(!e){let i=[wa.of(!0)];null==t.state.field(ya,!1)&&i.push(dt.appendConfig.of([ya,ba])),t.dispatch({effects:i}),e=ea(t,va)}return e&&e.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,n=B.create(i.ranges.map((e=>t.wordAt(e.head)||B.cursor(e.head))),i.mainIndex);return!n.eq(i)&&(e(t.update({selection:n})),!0)})({state:t,dispatch:e});let n=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=n)))return!1;let s=function(t,e){let{main:i,ranges:n}=t.selection,s=t.wordAt(i.head),r=s&&s.from==i.from&&s.to==i.to;for(let i=!1,s=new ca(t.doc,e,n[n.length-1].to);;){if(s.next(),!s.done){if(i&&n.some((t=>t.from==s.value.from)))continue;if(r){let e=t.wordAt(s.value.from);if(!e||e.from!=s.value.from||e.to!=s.value.to)continue}return s.value}if(i)return null;s=new ca(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(t,n);return!!s&&(e(t.update({selection:t.selection.addRange(B.range(s.from,s.to),!1),effects:Os.scrollIntoView(s.to)})),!0)},preventDefault:!0}];class tc{constructor(t){this.view=t;let e=this.query=t.state.field(Ha).query.spec;function i(t,e,i){return la("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=la("input",{value:e.search,placeholder:ec(t,"Find"),"aria-label":ec(t,"Find"),class:"cm-textfield",name:"search",onchange:this.commit,onkeyup:this.commit}),this.replaceField=la("input",{value:e.replace,placeholder:ec(t,"Replace"),"aria-label":ec(t,"Replace"),class:"cm-textfield",name:"replace",onchange:this.commit,onkeyup:this.commit}),this.caseField=la("input",{type:"checkbox",name:"case",checked:e.caseSensitive,onchange:this.commit}),this.reField=la("input",{type:"checkbox",name:"re",checked:e.regexp,onchange:this.commit}),this.dom=la("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",(()=>ja(t)),[ec(t,"next")]),i("prev",(()=>Ua(t)),[ec(t,"previous")]),i("select",(()=>$a(t)),[ec(t,"all")]),la("label",null,[this.caseField,ec(t,"match case")]),la("label",null,[this.reField,ec(t,"regexp")]),...t.state.readOnly?[]:[la("br"),this.replaceField,i("replace",(()=>Ka(t)),[ec(t,"replace")]),i("replaceAll",(()=>Ga(t)),[ec(t,"replace all")]),la("button",{name:"close",onclick:()=>Qa(t),"aria-label":ec(t,"close"),type:"button"},["×"])]])}commit(){let t=new Ra({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Ia.of(t)}))}keydown(t){var e,i,n;e=this.view,i=t,n="search-panel",Fs(Ws(e.state),i,e,n)?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Ua:ja)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Ka(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(Ia)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ta).top}}function ec(t,e){return t.state.phrase(e)}const ic=/[\s\.,:;?!]/;function nc(t,{from:e,to:i}){let n=t.state.doc.lineAt(e).from,s=t.state.doc.lineAt(i).to,r=Math.max(n,e-30),o=Math.min(s,i+30),l=t.state.sliceDoc(r,o);if(r!=n)for(let t=0;t<30;t++)if(!ic.test(l[t+1])&&ic.test(l[t])){l=l.slice(t);break}if(o!=s)for(let t=l.length-1;t>l.length-30;t--)if(!ic.test(l[t-1])&&ic.test(l[t])){l=l.slice(0,t);break}return Os.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${t.state.doc.lineAt(e).number}`)}const sc=Os.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),rc=[Ha,Y.lowest(qa),sc],oc="undefined"!=typeof navigator&&!/Edge\/(\d+)/.exec(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2);class lc{constructor(t,e,i){this.facet=e,this.createTooltipView=i,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t)),this.tooltipViews=this.tooltips.map(i)}update(t){let e=t.state.facet(this.facet),i=e.filter((t=>t));if(e===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[];for(let e=0;e{var e,i,n;return{position:oc?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=t.find((t=>t.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||hc}}}),cc=Ri.fromClass(class{constructor(t){var e;this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let i=t.state.facet(ac);this.position=i.position,this.parent=i.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new lc(t,dc,(t=>this.createTooltip(t))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),null===(e=t.dom.ownerDocument.defaultView)||void 0===e||e.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t);e&&this.observeIntersection();let i=e||t.geometryChanged,n=t.state.facet(ac);if(n.position!=this.position){this.position=n.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;null===(t=this.view.dom.ownerDocument.defaultView)||void 0===t||t.removeEventListener("resize",this.measureSoon);for(let{dom:t}of this.manager.tooltipViews)t.remove();null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(ac).tooltipSpace(this.view)}}writeMeasure(t){let{editor:e,space:i}=t,n=[];for(let s=0;s=Math.min(e.bottom,i.bottom)||h.rightMath.min(e.right,i.right)+.1){l.style.top="-10000px";continue}let c=r.arrow?o.dom.querySelector(".cm-tooltip-arrow"):null,u=c?7:0,f=a.right-a.left,d=a.bottom-a.top,p=o.offset||fc,m=this.view.textDirection==Wi.LTR,g=a.width>i.right-i.left?m?i.left:i.right-a.width:m?Math.min(h.left-(c?14:0)+p.x,i.right-f):Math.max(i.left,h.left-f+(c?14:0)-p.x),v=!!r.above;!r.strictSide&&(v?h.top-(a.bottom-a.top)-p.yi.bottom)&&v==i.bottom-h.bottom>h.top-i.top&&(v=!v);let w=v?h.top-d-u-p.y:h.bottom+u+p.y,y=g+f;if(!0!==o.overlap)for(let t of n)t.leftg&&t.topw&&(w=v?t.top-d-2-u:t.bottom+u+2);"absolute"==this.position?(l.style.top=w-t.parent.top+"px",l.style.left=g-t.parent.left+"px"):(l.style.top=w+"px",l.style.left=g+"px"),c&&(c.style.left=h.left+(m?p.x:-p.x)-(g+14-7)+"px"),!0!==o.overlap&&n.push({left:g,top:w,right:y,bottom:w+d}),l.classList.toggle("cm-tooltip-above",v),l.classList.toggle("cm-tooltip-below",!v),o.positioned&&o.positioned()}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top="-10000px"}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),uc=Os.baseTheme({".cm-tooltip":{zIndex:100},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),fc={x:0,y:0},dc=V.define({enables:[cc,uc]});class pc{constructor(t,e,i){this.state=t,this.pos=e,this.explicit=i,this.abortListeners=[]}tokenBefore(t){let e=Br(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(yc(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(t,e){"abort"==t&&this.abortListeners&&this.abortListeners.push(e)}}function mc(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function gc(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,n]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:n}of t){e[n[0]]=!0;for(let t=1;t{let s=t.matchBefore(n);return s||t.explicit?{from:s?s.from:t.pos,options:e,span:i}:null}}class vc{constructor(t,e,i){this.completion=t,this.source=e,this.match=i}}function wc(t){return t.selection.main.head}function yc(t,e){var i;let{source:n}=t,s=e&&"^"!=n[0],r="$"!=n[n.length-1];return s||r?new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const bc=ct.define();function xc(t,e){let i=e.completion.apply||e.completion.label,n=e.source;"string"==typeof i?t.dispatch({changes:{from:n.from,to:n.to,insert:i},selection:{anchor:n.from+i.length},userEvent:"input.complete",annotations:bc.of(e.completion)}):i(t,e.completion,n.from,n.to)}const kc=new WeakMap;function Sc(t){if(!Array.isArray(t))return t;let e=kc.get(t);return e||kc.set(t,e=gc(t)),e}class Ac{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let e=0;e=48&&u<=57||u>=97&&u<=122?2:u>=65&&u<=90?1:0:(x=a(u))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!n||1==k&&w||0==b&&0!=k)&&(e[d]==u||i[d]==u&&(p=!0)?r[d++]=n:r.length&&(y=!1)),b=k,n+=c(u)}return d==l&&0==r[0]&&y?this.result((p?-200:0)-100,r,t):m==l&&0==g?[-200-t.length,0,v]:o>-1?[-700-t.length,o,o+this.pattern.length]:m==l?[-900-t.length,g,v]:d==l?this.result((p?-200:0)-100-700+(y?0:-1100),r,t):2==e.length?null:this.result((n[0]?-700:0)-200-1100,n,t)}result(t,e,i){let n=[t-i.length],s=1;for(let t of e){let e=t+(this.astral?c(h(i,t)):1);s>1&&n[s-1]==t?n[s-1]=e:(n[s++]=t,n[s++]=e)}return n}}const Cc=V.define({combine:t=>Mt(t,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[]},{defaultKeymap:(t,e)=>t&&e,icons:(t,e)=>t&&e,optionClass:(t,e)=>i=>function(t,e){return t?e?t+" "+e:t:e}(t(i),e(i)),addToOptions:(t,e)=>t.concat(e)})});function Mc(t,e,i){if(t<=i)return{from:0,to:t};if(e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let n=Math.floor((t-e)/i);return{from:t-(n+1)*i,to:t-n*i}}class Dc{constructor(t,e){this.view=t,this.stateField=e,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:t=>this.positionInfo(t),key:this};let i=t.state.field(e),{options:n,selected:s}=i.open,r=t.state.facet(Cc);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i){let n=document.createElement("span");n.className="cm-completionLabel";let{label:s}=t,r=0;for(let t=1;tr&&n.appendChild(document.createTextNode(s.slice(r,e)));let l=n.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(s.slice(e,o))),l.className="cm-completionMatchedText",r=o}return rt.position-e.position)).map((t=>t.render))}(r),this.optionClass=r.optionClass,this.range=Mc(n.length,s,r.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",(e=>{for(let i,s=e.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(i=/-(\d+)$/.exec(s.id))&&+i[1]{this.info&&this.view.requestMeasure(this.placeInfo)}))}mount(){this.updateSel()}update(t){t.state.field(this.stateField)!=t.startState.field(this.stateField)&&this.updateSel()}positioned(){this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected=this.range.to)&&(this.range=Mc(e.options.length,e.selected,this.view.state.facet(Cc).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e.options,t.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))),this.updateSelectedOption(e.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=e.options[e.selected],{info:n}=i;if(!n)return;let s="string"==typeof n?document.createTextNode(n):n(i);if(!s)return;"then"in s?s.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e)})).catch((t=>Ai(this.view.state,t,"completion info"))):this.addInfoPane(s)}}addInfoPane(t){let e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(t),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)n==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect();n.topi.bottom&&(t.scrollTop+=n.bottom-i.bottom)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=t.getBoundingClientRect();if(n.top>Math.min(innerHeight,e.bottom)-10||n.bottom=this.options.length?this:new Tc(this.options,Lc(e,t),this.tooltip,this.timestamp,t)}static build(t,e,i,n,s){let r=function(t,e){let i=[],n=0;for(let s of t)if(s.hasResult())if(!1===s.result.filter)for(let t of s.result.options)i.push(new vc(t,s,[1e9-n++]));else{let t,n=new Ac(e.sliceDoc(s.from,s.to));for(let e of s.result.options)(t=n.match(e.label))&&(null!=e.boost&&(t[0]+=e.boost),i.push(new vc(e,s,t)))}let s=[],r=null;for(let t of i.sort(Pc)){if(300==s.length)break;r&&r.label==t.completion.label&&r.detail==t.completion.detail&&r.type==t.completion.type&&r.apply==t.completion.apply?Oc(t.completion)>Oc(r)&&(s[s.length-1]=t):s.push(t),r=t.completion}return s}(t,e);if(!r.length)return null;let o=0;if(n&&n.selected){let t=n.options[n.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:(l=qc,t=>new Dc(t,l)),above:s.aboveCursor},n?n.timestamp:Date.now(),o);var l}map(t){return new Tc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}class Rc{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new Rc(Bc,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(Cc),n=(i.override||e.languageDataAt("autocomplete",wc(e)).map(Sc)).map((e=>(this.active.find((t=>t.source==e))||new Ic(e,this.active.some((t=>0!=t.state))?1:0)).update(t,i)));n.length==this.active.length&&n.every(((t,e)=>t==this.active[e]))&&(n=this.active);let s=t.selection||n.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,n=0;;){for(;i1!=t.state))&&n.some((t=>t.hasResult()))&&(n=n.map((t=>t.hasResult()?new Ic(t.source,0):t)));for(let e of t.effects)e.is(Fc)&&(s=s&&s.setSelected(e.value,this.id));return n==this.active&&s==this.open?this:new Rc(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Ec}}const Ec={"aria-autocomplete":"list"};function Lc(t,e){return{"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":t+"-"+e,"aria-controls":t}}const Bc=[];function Pc(t,e){let i=e.match[0]-t.match[0];return i||t.completion.label.localeCompare(e.completion.label)}function Nc(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Ic{constructor(t,e,i=-1){this.source=t,this.state=e,this.explicitPos=i}hasResult(){return!1}update(t,e){let i=Nc(t),n=this;i?n=n.handleUserEvent(t,i,e):t.docChanged?n=n.handleChange(t):t.selection&&0!=n.state&&(n=new Ic(n.source,0));for(let e of t.effects)if(e.is(Hc))n=new Ic(n.source,1,e.value?wc(t.state):-1);else if(e.is(Wc))n=new Ic(n.source,0);else if(e.is(zc))for(let t of e.value)t.source==n.source&&(n=t);return n}handleUserEvent(t,e,i){return"delete"!=e&&i.activateOnTyping?new Ic(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(wc(t.startState))?new Ic(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new Ic(this.source,this.state,t.mapPos(this.explicitPos))}}class Vc extends Ic{constructor(t,e,i,n,s,r){super(t,2,e),this.result=i,this.from=n,this.to=s,this.span=r}hasResult(){return!0}handleUserEvent(t,e,i){let n=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),r=wc(t.state);if((this.explicitPos<0?r<=n:rs||"delete"==e&&wc(t.startState)==this.from)return new Ic(this.source,"input"==e&&i.activateOnTyping?1:0);let o=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return this.span&&(n==s||this.span.test(t.state.sliceDoc(n,s)))?new Vc(this.source,o,this.result,n,s,this.span):new Ic(this.source,1,o)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new Ic(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new Vc(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1),this.span)}}const Hc=dt.define(),Wc=dt.define(),zc=dt.define({map:(t,e)=>t.map((t=>t.map(e)))}),Fc=dt.define(),qc=_.define({create:()=>Rc.start(),update:(t,e)=>t.update(e),provide:t=>[dc.from(t,(t=>t.tooltip)),Os.contentAttributes.from(t,(t=>t.attrs))]});function _c(t,e="option"){return i=>{let n=i.state.field(qc,!1);if(!n||!n.open||Date.now()-n.open.timestamp<75)return!1;let s,r=1;"page"==e&&(s=function(t,e){let i=t.plugin(cc);if(!i)return null;let n=i.manager.tooltips.indexOf(e);return n<0?null:i.manager.tooltipViews[n]}(i,n.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let o=n.open.selected+r*(t?1:-1),{length:l}=n.open.options;return o<0?o="page"==e?0:l-1:o>=l&&(o="page"==e?l-1:0),i.dispatch({effects:Fc.of(o)}),!0}}class jc{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const Uc=Ri.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(qc).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(qc);if(!t.selectionSet&&!t.docChanged&&t.startState.field(qc)==e)return;let i=t.transactions.some((t=>(t.selection||t.docChanged)&&!Nc(t)));for(let e=0;e50&&Date.now()-n.time>1e3){for(let t of n.context.abortListeners)try{t()}catch(t){Ai(this.view.state,t)}n.context.abortListeners=null,this.running.splice(e--,1)}else n.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let e of t.transactions)"input"==Nc(e)?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(qc);for(let t of e.active)1!=t.state||this.running.some((e=>e.active.source==t.source))||this.startQuery(t)}startQuery(t){let{state:e}=this.view,i=wc(e),n=new pc(e,i,t.explicitPos==i),s=new jc(t,n);this.running.push(s),Promise.resolve(t.source(n)).then((t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:Wc.of(null)}),Ai(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),50))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(Cc);for(let n=0;nt.source==s.active.source));if(r&&1==r.state)if(null==s.done){let t=new Ic(s.active.source,0);for(let e of s.updates)t=t.update(e,i);1!=t.state&&e.push(t)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:zc.of(e)})}},{eventHandlers:{compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Hc.of(!1)})),20),this.composing=0}}}),$c=Os.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});function Kc(t={}){return[qc,Cc.of(t),Uc,Jc,$c]}const Gc=[{key:"Ctrl-Space",run:t=>!!t.state.field(qc,!1)&&(t.dispatch({effects:Hc.of(!0)}),!0)},{key:"Escape",run:t=>{let e=t.state.field(qc,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:Wc.of(null)}),!0)}},{key:"ArrowDown",run:_c(!0)},{key:"ArrowUp",run:_c(!1)},{key:"PageDown",run:_c(!0,"page")},{key:"PageUp",run:_c(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(qc,!1);return!(t.state.readOnly||!e||!e.open||Date.now()-e.open.timestamp<75)&&(xc(t,e.open.options[e.open.selected]),!0)}}],Jc=Y.highest(Vs.computeN([Cc],(t=>t.facet(Cc).defaultKeymap?[Gc]:[]))),Yc={jinja2:Yl.define(jl),yaml:Yl.define($l)},Xc=new Q,Qc=new Q,Zc=[{key:"Tab",run:el},{key:"Shift-Tab",run:il}],tu=Os.theme({"&":{color:"var(--primary-text-color)",backgroundColor:"var(--code-editor-background-color, var(--mdc-text-field-fill-color, whitesmoke))","& ::selection":{backgroundColor:"rgba(var(--rgb-primary-color), 0.3)"},borderRadius:"var(--mdc-shape-small, 4px) var(--mdc-shape-small, 4px) 0px 0px",caretColor:"var(--secondary-text-color)",height:"var(--code-mirror-height, auto)",maxHeight:"var(--code-mirror-max-height, unset)"},"&.cm-editor.cm-focused":{outline:"none"},"&.cm-focused .cm-cursor":{borderLeftColor:"var(--secondary-text-color)"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground":{backgroundColor:"rgba(var(--rgb-primary-color), 0.3)"},".cm-activeLine":{backgroundColor:"rgba(var(--rgb-secondary-text-color), 0.1)"},".cm-scroller":{outline:"none"},".cm-content":{caretColor:"var(--secondary-text-color)",paddingTop:"16px"},".cm-panels":{backgroundColor:"var(--primary-background-color)",color:"var(--primary-text-color)"},".cm-panels.top":{borderBottom:"1px solid var(--divider-color)"},".cm-panels.bottom":{borderTop:"1px solid var(--divider-color)"},".cm-button":{border:"1px solid var(--primary-color)",padding:"0px 16px",textTransform:"uppercase",margin:"4px",background:"none",color:"var(--primary-color)",fontFamily:"var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif))",fontSize:"var(--mdc-typography-button-font-size, 0.875rem)",height:"36px",fontWeight:"var(--mdc-typography-button-font-weight, 500)",borderRadius:"4px",letterSpacing:"var(--mdc-typography-button-letter-spacing, 0.0892857em)"},".cm-textfield":{padding:"4px 0px 5px",borderRadius:"0",fontSize:"16px",color:"var(--primary-text-color)",border:"0",background:"none",fontFamily:"Roboto",borderBottom:"1px solid var(--paper-input-container-color, var(--secondary-text-color))",margin:"4px 4px 0","& ::placeholder":{color:"var(--paper-input-container-color, var(--secondary-text-color))"},"&:focus":{outline:"none",borderBottom:"2px solid var(--primary-color)",paddingBottom:"4px"}},".cm-tooltip":{color:"var(--primary-text-color)",backgroundColor:"var(--code-editor-background-color, var(--card-background-color))",border:"1px solid var(--divider-color)",borderRadius:"var(--mdc-shape-medium, 4px)",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%)"},"& .cm-tooltip.cm-tooltip-autocomplete > ul > li":{padding:"4px 8px"},"& .cm-tooltip-autocomplete ul li[aria-selected]":{background:"var(--primary-color)",color:"var(--text-primary-color)"},".cm-completionIcon":{display:"none"},".cm-completionDetail":{fontFamily:"Roboto",color:"var(--secondary-text-color)"},"li[aria-selected] .cm-completionDetail":{color:"var(--text-primary-color)"},"& .cm-completionInfo.cm-completionInfo-right":{left:"calc(100% + 4px)"},"& .cm-tooltip.cm-completionInfo":{padding:"4px 8px",marginTop:"-5px"},".cm-selectionMatch":{backgroundColor:"rgba(var(--rgb-primary-color), 0.1)"},".cm-searchMatch":{backgroundColor:"rgba(var(--rgb-accent-color), .2)",outline:"1px solid rgba(var(--rgb-accent-color), .4)"},".cm-searchMatch.selected":{backgroundColor:"rgba(var(--rgb-accent-color), .4)",outline:"1px solid var(--accent-color)"},".cm-gutters":{backgroundColor:"var(--code-editor-gutter-color, var(--mdc-text-field-fill-color, whitesmoke))",color:"var(--paper-dialog-color, var(--secondary-text-color))",border:"none",borderRight:"1px solid var(--paper-input-container-color, var(--secondary-text-color))",paddingRight:"1px"},"&.cm-focused .cm-gutters":{borderRight:"2px solid var(--paper-input-container-focus-color, var(--primary-color))",paddingRight:"0"},".cm-gutterElement.lineNumber":{color:"inherit"}}),eu=ml.define([{tag:Vl.keyword,color:"var(--codemirror-keyword, #6262FF)"},{tag:[Vl.name,Vl.deleted,Vl.character,Vl.propertyName,Vl.macroName],color:"var(--codemirror-property, #905)"},{tag:[Vl.function(Vl.variableName),Vl.labelName],color:"var(--codemirror-variable, #07a)"},{tag:[Vl.color,Vl.constant(Vl.name),Vl.standard(Vl.name)],color:"var(--codemirror-qualifier, #690)"},{tag:[Vl.definition(Vl.name),Vl.separator],color:"var(--codemirror-def, #8DA6CE)"},{tag:[Vl.typeName,Vl.className,Vl.number,Vl.changed,Vl.annotation,Vl.modifier,Vl.self,Vl.namespace],color:"var(--codemirror-number, #ca7841)"},{tag:[Vl.operator,Vl.operatorKeyword,Vl.url,Vl.escape,Vl.regexp,Vl.link,Vl.special(Vl.string)],color:"var(--codemirror-operator, #cda869)"},{tag:Vl.comment,color:"var(--codemirror-comment, #777)"},{tag:Vl.meta,color:"var(--codemirror-meta, var(--primary-text-color))"},{tag:Vl.strong,fontWeight:"bold"},{tag:Vl.emphasis,fontStyle:"italic"},{tag:Vl.link,color:"var(--primary-color)",textDecoration:"underline"},{tag:Vl.heading,fontWeight:"bold"},{tag:Vl.atom,color:"var(--codemirror-atom, #F90)"},{tag:Vl.bool,color:"var(--codemirror-atom, #F90)"},{tag:Vl.special(Vl.variableName),color:"var(--codemirror-variable-2, #690)"},{tag:Vl.processingInstruction,color:"var(--secondary-text-color)"},{tag:Vl.string,color:"var(--codemirror-string, #07a)"},{tag:Vl.inserted,color:"var(--codemirror-string2, #07a)"},{tag:Vl.invalid,color:"var(--error-color)"}]);export{Ct as EditorState,Os as EditorView,ml as HighlightStyle,Y as Prec,Kc as autocompletion,nl as defaultKeymap,js as drawSelection,Zs as highlightActiveLine,Sa as highlightSelectionMatches,eu as highlightStyle,Ph as history,Yh as historyKeymap,Vs as keymap,Xc as langCompartment,Yc as langs,Dh as lineNumbers,Qc as readonlyCompartment,Zh as rectangularSelection,Za as searchKeymap,Zc as tabKeyBindings,Vl as tags,tu as theme}; +let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let e=1;ee)return t[i-1]<=e;return!1}function i(t){return t>=127462&&t<=127487}function n(t,e,i=!0,n=!0){return(i?s:r)(t,e,n)}function s(t,n,s){if(n==t.length)return n;n&&o(t.charCodeAt(n))&&l(t.charCodeAt(n-1))&&n--;let r=h(t,n);for(n+=c(r);n=0&&i(h(t,s));)e++,s-=2;if(e%2==0)break;n+=2}}}return n}function r(t,e,i){for(;e>0;){let n=s(t,e-2,i);if(n=56320&&t<57344}function l(t){return t>=55296&&t<56320}function h(t,e){let i=t.charCodeAt(e);if(!l(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return o(n)?n-56320+(i-55296<<10)+65536:i}function a(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function c(t){return t<65536?1:2}function u(t,e,i=t.length){let s=0;for(let r=0;r=e)return s;if(s==t.length)break;r+=9==t.charCodeAt(s)?i-r%i:1,s=n(t,s)}return!0===s?-1:t.length}class d{constructor(){}lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),m.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){let i=[];return this.decompose(t,e,i,0),m.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new w(this),s=new w(t);for(let t=e,r=e;;){if(n.next(t),s.next(t),t=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(r+=n.value.length,n.done||r>=i)return!0}}iter(t=1){return new w(this,t)}iterRange(t,e=this.length){return new y(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new b(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new p(t):m.from(p.split(t,[])):d.empty}}class p extends d{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.text[s],o=n+r.length;if((e?i:o)>=t)return new x(n,o,i,r);n=o+1,i++}}decompose(t,e,i,n){let s=t<=0&&e>=this.length?this:new p(v(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&n){let t=i.pop(),e=g(s.text,t.text.slice(),0,s.length);if(e.length<=32)i.push(new p(e,t.length+s.length));else{let t=e.length>>1;i.push(new p(e.slice(0,t)),new p(e.slice(t)))}}else i.push(s)}replace(t,e,i){if(!(i instanceof p))return super.replace(t,e,i);let n=g(this.text,g(i.text,v(this.text,0,t)),e),s=this.length+i.length-(e-t);return n.length<=32?new p(n,s):m.from(p.split(n,[]),s)}sliceString(t,e=this.length,i="\n"){let n="";for(let s=0,r=0;s<=e&&rt&&r&&(n+=i),ts&&(n+=o.slice(Math.max(0,t-s),e-s)),s=l+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let s of t)i.push(s),n+=s.length+1,32==i.length&&(e.push(new p(i,n)),i=[],n=-1);return n>-1&&e.push(new p(i,n)),e}}class m extends d{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.children[s],o=n+r.length,l=i+r.lines-1;if((e?l:o)>=t)return r.lineInner(t,e,i,n);n=o+1,i=l+1}}decompose(t,e,i,n){for(let s=0,r=0;r<=e&&s=r){let s=n&((r<=t?1:0)|(l>=e?2:0));r>=t&&l<=e&&!s?i.push(o):o.decompose(t-r,e-r,i,s)}r=l+1}}replace(t,e,i){if(i.lines=s&&e<=o){let l=r.replace(t-s,e-s,i),h=this.lines-r.lines+l.lines;if(l.lines>4&&l.lines>h>>6){let s=this.children.slice();return s[n]=l,new m(s,this.length-(e-t)+i.length)}return super.replace(s,o,l)}s=o+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){let n="";for(let s=0,r=0;st&&s&&(n+=i),tr&&(n+=o.sliceString(t-r,e-r,i)),r=l+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof m))return 0;let i=0,[n,s,r,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,s+=e){if(n==r||s==o)return i;let l=this.children[n],h=t.children[s];if(l!=h)return i+l.scanIdentical(h,e);i+=l.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new p(i,e)}let n=Math.max(32,i>>5),s=n<<1,r=n>>1,o=[],l=0,h=-1,a=[];function c(t){let e;if(t.lines>s&&t instanceof m)for(let e of t.children)c(e);else t.lines>r&&(l>r||!l)?(u(),o.push(t)):t instanceof p&&l&&(e=a[a.length-1])instanceof p&&t.lines+e.lines<=32?(l+=t.lines,h+=t.length+1,a[a.length-1]=new p(e.text.concat(t.text),e.length+1+t.length)):(l+t.lines>n&&u(),l+=t.lines,h+=t.length+1,a.push(t))}function u(){0!=l&&(o.push(1==a.length?a[0]:m.from(a,h)),h=-1,l=a.length=0)}for(let e of t)c(e);return u(),1==o.length?o[0]:new m(o,e)}}function g(t,e,i=0,n=1e9){for(let s=0,r=0,o=!0;r=i&&(h>n&&(l=l.slice(0,n-s)),s0?1:(t instanceof p?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],r=s>>1,o=n instanceof p?n.text.length:n.children.length;if(r==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(n instanceof p){let s=n.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let s=n.children[r+(e<0?-1:0)];t>s.length?(t-=s.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(s),this.offsets.push(e>0?1:(s instanceof p?s.text.length:s.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class y{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new w(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class b{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(d.prototype[Symbol.iterator]=function(){return this.iter()},w.prototype[Symbol.iterator]=y.prototype[Symbol.iterator]=b.prototype[Symbol.iterator]=function(){return this});class x{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}}const k=/\r\n?|\n/;var S=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(S||(S={}));class A{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return s+(t-n);s+=o}else{if(i!=S.Simple&&h>=t&&(i==S.TrackDel&&nt||i==S.TrackBefore&&nt))return null;if(h>t||h==t&&e<0&&!o)return t==n||e<0?s:s+l;s+=l}n=h}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return s}touchesRange(t,e=t){for(let i=0,n=0;i=0&&n<=e&&s>=t)return!(ne)||"cover";n=s}return!1}toString(){let t="";for(let e=0;e=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new A(t)}}class C extends A{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return O(this,((e,i,n,s,r)=>t=t.replace(n,n+(i-e),r)),!1),t}mapDesc(t,e=!1){return T(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let n=0,s=0;n=0){e[n]=o,e[n+1]=r;let l=n>>1;for(;i.length0&&D(i,e,s.text),s.forward(t),o+=t}let h=t[r++];for(;o>1].toJSON()))}return t}static of(t,e,i){let n=[],s=[],r=0,o=null;function l(t=!1){if(!t&&!n.length)return;ro||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let c=a?"string"==typeof a?d.of(a.split(i||k)):a:d.empty,u=c.length;if(t==o&&0==u)return;tr&&M(n,t-r,-1),M(n,o-t,u),D(s,n,c),r=o}}(t),l(!o),o}static empty(t){return new C(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let n=0;ne&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)e.push(s[0],0);else{for(;i.length=0&&i<=0&&i==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=i:n?(t[s]+=e,t[s+1]+=i):t.push(e,i)}function D(t,e,i){if(0==i.length)return;let n=e.length-2>>1;if(n>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],h=t.sections[o++];e(s,a,r,c,u),s=a,r=c}}}function T(t,e,i,n=!1){let s=[],r=n?[]:null,o=new E(t),l=new E(e);for(let t=0,e=0;;)if(-1==o.ins)t+=o.len,o.next();else if(-1==l.ins&&e=0&&(o.done||ee&&!o.done&&t+o.len=0)){if(o.done&&l.done)return r?new C(s,r):new A(s);throw new Error("Mismatched change set lengths")}{let i=0,n=t+o.len;for(;;)if(l.ins>=0&&e>t&&e+l.lene||o.ins>=0&&o.len>e)&&(t||n.length>i),r.forward2(e),o.forward(e)}}else M(n,0,o.ins,t),s&&D(s,n,o.text),o.next()}}class E{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?d.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?d.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class L{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let t=3&this.flags;return 3==t?null:t}get goalColumn(){let t=this.flags>>5;return 33554431==t?void 0:t}map(t,e=-1){let i,n;return this.empty?i=n=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),n=t.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new L(i,n,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return B.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return B.range(this.anchor,i)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return B.range(t.anchor,t.head)}}class B{constructor(t,e=0){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:B.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let e=0;et.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new B(t.ranges.map((t=>L.fromJSON(t))),t.main)}static single(t,e=t){return new B([B.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;nt?4:0))}}function P(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let i=1;in.head?B.range(o,r):B.range(r,o))}}return new B(t,e)}function N(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let I=0;class V{constructor(t,e,i,n,s){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.extensions=s,this.id=I++,this.default=t([])}static define(t={}){return new V(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:H),!!t.static,t.enables)}of(t){return new W([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new W(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new W(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function H(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class W{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=I++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,s=this.id,r=t[s]>>1,o=2==this.type,l=!1,h=!1,a=[];for(let i of this.dependencies)"doc"==i?l=!0:"selection"==i?h=!0:0==(1&(null!==(e=t[i.id])&&void 0!==e?e:1))&&a.push(t[i.id]);return{create:t=>(t.values[r]=i(t),1),update(t,e){if(l&&e.docChanged||h&&(e.docChanged||e.selection)||a.some((e=>(1&et(t,e))>0))){let e=i(t);if(o?!z(e,t.values[r],n):!n(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure(t,e){let l=i(t),h=e.config.address[s];if(null!=h){let i=it(e,h);if(o?z(l,i,n):n(l,i))return t.values[r]=i,0}return t.values[r]=l,1}}}}function z(t,e,i){if(t.length!=e.length)return!1;for(let n=0;nt[e.id])),s=i.map((t=>t.type)),r=n.filter((t=>!(1&t))),o=t[e.id]>>1;function l(t){let i=[];for(let e=0;e1&et(t,e))))return 0;let n=l(t);return e.compare(n,t.values[o])?0:(t.values[o]=n,1)},reconfigure(t,s){let r=n.some((e=>1&et(t,e))),h=s.config.facets[e.id],a=s.facet(e);if(h&&!r&&H(i,h))return t.values[o]=a,0;let c=l(t);return e.compare(c,a)?(t.values[o]=a,0):(t.values[o]=c,1)}}}const q=V.define({static:!0});class _{constructor(t,e,i,n,s){this.id=t,this.createF=e,this.updateF=i,this.compareF=n,this.spec=s,this.provides=void 0}static define(t){let e=new _(I++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(q).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let n=t.values[e],s=this.updateF(n,i);return this.compareF(n,s)?0:(t.values[e]=s,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,q.of({field:this,create:t})]}get extension(){return this}}const j=4,U=3,$=2,K=1,G=0;function J(t){return e=>new X(e,t)}const Y={lowest:J(j),low:J(U),default:J($),high:J(K),highest:J(G),fallback:J(j),extend:J(K),override:J(G)};class X{constructor(t,e){this.inner=t,this.prec=e}}class Q{of(t){return new Z(this,t)}reconfigure(t){return Q.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Z{constructor(t,e){this.compartment=t,this.inner=e}}class tt{constructor(t,e,i,n,s,r){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,i){let n=[],s=Object.create(null),r=new Map;for(let i of function(t,e,i){let n=[[],[],[],[],[]],s=new Map;function r(t,o){let l=s.get(t);if(null!=l){if(l>=o)return;let e=n[l].indexOf(t);e>-1&&n[l].splice(e,1),t instanceof Z&&i.delete(t.compartment)}if(s.set(t,o),Array.isArray(t))for(let e of t)r(e,o);else if(t instanceof Z){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=e.get(t.compartment)||t.inner;i.set(t.compartment,n),r(n,o)}else if(t instanceof X)r(t.inner,t.prec);else if(t instanceof _)n[o].push(t),t.provides&&r(t.provides,o);else if(t instanceof W)n[o].push(t),t.facet.extensions&&r(t.facet.extensions,o);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,o)}}return r(t,$),n.reduce(((t,e)=>t.concat(e)))}(t,e,r))i instanceof _?n.push(i):(s[i.facet.id]||(s[i.facet.id]=[])).push(i);let o=Object.create(null),l=[],h=[];for(let t of n)o[t.id]=h.length<<1,h.push((e=>t.slot(e)));let a=null==i?void 0:i.config.facets;for(let t in s){let e=s[t],n=e[0].facet,r=a&&a[t]||[];if(e.every((t=>0==t.type)))if(o[n.id]=l.length<<1|1,H(r,e))l.push(i.facet(n));else{let t=n.combine(e.map((t=>t.value)));l.push(i&&n.compare(t,i.facet(n))?i.facet(n):t)}else{for(let t of e)0==t.type?(o[t.id]=l.length<<1|1,l.push(t.value)):(o[t.id]=h.length<<1,h.push((e=>t.dynamicSlot(e))));o[n.id]=h.length<<1,h.push((t=>F(t,n,e)))}}let c=h.map((t=>t(o)));return new tt(t,r,c,o,l,s)}}function et(t,e){if(1&e)return 2;let i=e>>1,n=t.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;t.status[i]=4;let s=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|s}function it(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const nt=V.define(),st=V.define({combine:t=>t.some((t=>t)),static:!0}),rt=V.define({combine:t=>t.length?t[0]:void 0,static:!0}),ot=V.define(),lt=V.define(),ht=V.define(),at=V.define({combine:t=>!!t.length&&t[0]});class ct{constructor(t,e){this.type=t,this.value=e}static define(){return new ut}}class ut{of(t){return new ct(this,t)}}class ft{constructor(t){this.map=t}of(t){return new dt(this,t)}}class dt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new dt(this.type,e)}is(t){return this.type==t}static define(t={}){return new ft(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let t=n.map(e);t&&i.push(t)}return i}}dt.reconfigure=dt.define(),dt.appendConfig=dt.define();class pt{constructor(t,e,i,n,s,r){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,i&&N(i,e.newLength),s.some((t=>t.type==pt.time))||(this.annotations=s.concat(pt.time.of(Date.now())))}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(pt.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function mt(t,e){let i=[];for(let n=0,s=0;;){let r,o;if(n=t[n]))r=t[n++],o=t[n++];else{if(!(s=0;s--){let r=i[s](t);r&&Object.keys(r).length&&(n=gt(t,vt(e,r,t.changes.newLength),!0))}return n==t?t:new pt(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let n of e.facet(ot)){let e=n(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:mt(i,e))}if(!0!==i){let n,s;if(!1===i)s=t.changes.invertedDesc,n=C.empty(e.doc.length);else{let e=t.changes.filter(i);n=e.changes,s=e.filtered.invertedDesc}t=new pt(e,n,t.selection&&t.selection.map(s),dt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let n=e.facet(lt);for(let i=n.length-1;i>=0;i--){let s=n[i](t);t=s instanceof pt?s:Array.isArray(s)&&1==s.length&&s[0]instanceof pt?s[0]:wt(e,bt(s),!1)}return t}(s):s)}pt.time=ct.define(),pt.userEvent=ct.define(),pt.addToHistory=ct.define(),pt.remote=ct.define();const yt=[];function bt(t){return null==t?yt:Array.isArray(t)?t:[t]}var xt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(xt||(xt={}));const kt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let St;try{St=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function At(t){return e=>{if(!/\S/.test(e))return xt.Space;if(function(t){if(St)return St.test(t);for(let e=0;e"€"&&(i.toUpperCase()!=i.toLowerCase()||kt.test(i)))return!0}return!1}(e))return xt.Word;for(let i=0;i-1)return xt.Word;return xt.Other}}class Ct{constructor(t,e,i,n,s,r){this.config=t,this.doc=e,this.selection=i,this.values=n,this.status=t.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let t=0;ts.set(e,t))),i=null),s.set(e.value.compartment,e.value.extension)):e.is(dt.reconfigure)?(i=null,n=e.value):e.is(dt.appendConfig)&&(i=null,n=bt(n).concat(e.value));if(i)e=t.startState.values.slice();else{i=tt.resolve(n,s,this),e=new Ct(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values}new Ct(i,t.newDoc,t.newSelection,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:B.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),s=[i.range],r=bt(i.effects);for(let i=1;is.spec.fromJSON(r,t))))}return Ct.create({doc:t.doc,selection:B.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let e=tt.resolve(t.extensions||[],new Map),i=t.doc instanceof d?t.doc:d.of((t.doc||"").split(e.staticFacet(Ct.lineSeparator)||k)),n=t.selection?t.selection instanceof B?t.selection:B.single(t.selection.anchor,t.selection.head):B.single(0);return N(n,i.length),e.staticFacet(st)||(n=n.asSingle()),new Ct(e,i,n,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(Ct.tabSize)}get lineBreak(){return this.facet(Ct.lineSeparator)||"\n"}get readOnly(){return this.facet(at)}phrase(t){for(let e of this.facet(Ct.phrases))if(Object.prototype.hasOwnProperty.call(e,t))return e[t];return t}languageDataAt(t,e,i=-1){let n=[];for(let s of this.facet(nt))for(let r of s(this,e,i))Object.prototype.hasOwnProperty.call(r,t)&&n.push(r[t]);return n}charCategorizer(t){return At(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:s}=this.doc.lineAt(t),r=this.charCategorizer(t),o=t-i,l=t-i;for(;o>0;){let t=n(e,o,!1);if(r(e.slice(t,o))!=xt.Word)break;o=t}for(;lt.length?t[0]:4}),Ct.lineSeparator=rt,Ct.readOnly=at,Ct.phrases=V.define(),Ct.languageData=nt,Ct.changeFilter=ot,Ct.transactionFilter=lt,Ct.transactionExtender=ht,Q.reconfigure=dt.define();const Dt="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Ot="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Tt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Rt{constructor(t,e){this.rules=[];let{finish:i}=e||{};function n(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function s(t,e,r,o){let l=[],h=/^@(\w+)\b/.exec(t[0]),a=h&&"keyframes"==h[1];if(h&&null==e)return r.push(t[0]+";");for(let i in e){let o=e[i];if(/&/.test(i))s(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),o,r);else if(o&&"object"==typeof o){if(!h)throw new RangeError("The value of a property ("+i+") should be a primitive value.");s(n(i),o,l,a)}else null!=o&&l.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+o+";")}(l.length||a)&&r.push((!i||h||o?t:t.map(i)).join(", ")+" {"+l.join(" ")+"}")}for(let e in t)s(n(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Tt[Dt]||1;return Tt[Dt]=t+1,"ͼ"+t.toString(36)}static mount(t,e){(t[Ot]||new Lt(t)).mount(Array.isArray(e)?e:[e])}}let Et=null;class Lt{constructor(t){if(!t.head&&t.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(Et)return t.adoptedStyleSheets=[Et.sheet].concat(t.adoptedStyleSheets),t[Ot]=Et;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),Et=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");let e=t.head||t;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],t[Ot]=this}mount(t){let e=this.sheet,i=0,n=0;for(let s=0;s-1&&(this.modules.splice(o,1),n--,o=-1),-1==o){if(this.modules.splice(n++,0,r),e)for(let t=0;t>1,l=s[n]-t||(i?this.value[n].endSide:this.value[n].startSide)-e;if(n==r)return l>=0?r:o;l>=0?o=n:r=n+1}}between(t,e,i,n){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(i,1e9,!1,s);sa||h==a&&c.startSide>0&&c.endSide<=0)continue;(a-h||c.endSide-c.startSide)<0||(r<0&&(r=h),c.point&&(o=Math.max(o,a-h)),i.push(c),n.push(h-r),s.push(a-r))}return{mapped:i.length?new It(n,s,i,o):null,pos:r}}}class Vt{constructor(t,e,i=Vt.empty,n){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=n}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(i&&(e=e.slice().sort(Nt)),this.isEmpty)return e.length?Vt.of(e):this;let o=new zt(this,null,-1).goto(0),l=0,h=[],a=new Ht;for(;o.value||l=0){let t=e[l++];a.addInner(t.from,t.to,t.value)||h.push(t)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return Ft.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Ft.from(t).goto(e)}static compare(t,e,i,n,s=-1){let r=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),o=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),l=Wt(r,o,i),h=new _t(r,l,s),a=new _t(o,l,s);i.iterGaps(((t,e,i)=>jt(h,t,a,e,i,n))),i.empty&&0==i.length&&jt(h,0,a,0,0,n)}static eq(t,e,i=0,n){null==n&&(n=1e9);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=Wt(s,r),l=new _t(s,o,0).goto(i),h=new _t(r,o,0).goto(i);for(;;){if(l.to!=h.to||!Ut(l.active,h.active)||l.point&&(!h.point||!l.point.eq(h.point)))return!1;if(l.to>n)return!0;l.next(),h.next()}}static spans(t,e,i,n,s=-1){var r;let o=new _t(t,null,s,null===(r=n.filterPoint)||void 0===r?void 0:r.bind(n)).goto(e),l=e,h=o.openStart;for(;;){let t=Math.min(o.to,i);if(o.point?(n.point(l,t,o.point,o.activeForPoint(o.to),h),h=o.openEnd(t)+(o.to>t?1:0)):t>l&&(n.span(l,t,o.active,h),h=o.openEnd(t)),o.to>i)break;l=o.to,o.next()}return h}static of(t,e=!1){let i=new Ht;for(let n of t instanceof Pt?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i0)return t.slice().sort(Nt);e=n}return t}(t):t)i.add(n.from,n.to,n.value);return i.finish()}}Vt.empty=new Vt([],[],null,-1),Vt.empty.nextLayer=Vt.empty;class Ht{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(t){this.chunks.push(new It(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new Ht)).add(t,e,i)}addInner(t,e,i){let n=t-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(Vt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=new Vt(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Wt(t,e,i){let n=new Map;for(let e of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new zt(r,e,i,s));return 1==n.length?n[0]:new Ft(n)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)qt(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)qt(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),qt(this.heap,0)}}}function qt(t,e){for(let i=t[e];;){let n=1+(e<<1);if(n>=t.length)break;let s=t[n];if(n+1=0&&(s=t[n+1],n++),i.compare(s)<0)break;t[n]=i,t[e]=s,e=n}}class _t{constructor(t,e,i,n=(()=>!0)){this.minPoint=i,this.filterPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ft.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){$t(this.active,t),$t(this.activeTo,t),$t(this.activeRank,t),this.minActive=Gt(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:n,rank:s}=this.cursor;for(;e-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&$t(i,s)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let s=this.cursor.value;if(s.point)if(e&&this.cursor.to==this.to&&this.cursor.from=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function jt(t,e,i,n,s,r){t.goto(e),i.goto(n);let o=n+s,l=n,h=n-e;for(;;){let e=t.to+h-i.to||t.endSide-i.endSide,n=e<0?t.to+h:i.to,s=Math.min(n,o);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&Ut(t.activeForPoint(t.to+h),i.activeForPoint(i.to))||r.comparePoint(l,s,t.point,i.point):s>l&&!Ut(t.active,i.active)&&r.compareRange(l,s,t.active,i.active),n>o)break;l=n,e<=0&&t.next(),e>=0&&i.next()}}function Ut(t,e){if(t.length!=e.length)return!1;for(let i=0;i=e;i--)t[i+1]=t[i];t[e]=i}function Gt(t,e){let i=-1,n=1e9;for(let s=0;s",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Xt="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent);"undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent);for(var Qt="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Zt="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),te=Qt||Xt&&+Xt[1]<57,ee=0;ee<10;ee++)Jt[48+ee]=Jt[96+ee]=String(ee);for(ee=1;ee<=24;ee++)Jt[ee+111]="F"+ee;for(ee=65;ee<=90;ee++)Jt[ee]=String.fromCharCode(ee+32),Yt[ee]=String.fromCharCode(ee);for(var ie in Jt)Yt.hasOwnProperty(ie)||(Yt[ie]=Jt[ie]);function ne(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function se(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function re(t,e){if(!e.anchorNode)return!1;try{return se(t,e.anchorNode)}catch(t){return!1}}function oe(t){return 3==t.nodeType?we(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function le(t,e,i,n){return!!i&&(ae(t,e,i,n,-1)||ae(t,e,i,n,1))}function he(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function ae(t,e,i,n,s){for(;;){if(t==i&&e==n)return!0;if(e==(s<0?0:ce(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=he(t)+(s<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(s<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=s<0?ce(t):0}}}function ce(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}const ue={left:0,right:0,top:0,bottom:0};function fe(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function de(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}class pe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}}let me,ge=null;function ve(t){if(t.setActive)return t.setActive();if(ge)return t.focus(ge);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==ge?{get preventScroll(){return ge={preventScroll:!0},!0}}:void 0),!ge){ge=!1;for(let t=0;te)return i.domBoundsAround(t,e,h);if(c>=t&&-1==n&&(n=l,s=h),h>e&&i.dom.parentNode==this.dom){r=l,o=a;break}a=c,h=c+i.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r=0?this.children[r].dom:null}}markDirty(t=!1){this.dirty|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}setDOM(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=ke){this.markDirty();for(let i=t;ithis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Me(t,e,i,n,s,r,o,l,h){let{children:a}=t,c=a.length?a[e]:null,u=r.length?r[r.length-1]:null,f=u?u.breakAfter:o;if(!(e==n&&c&&!o&&!f&&r.length<2&&c.merge(i,s,r.length?u:null,0==i,l,h))){if(n0&&(!o&&r.length&&c.merge(i,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(i2);var We={mac:He||/Mac/.test(Oe.platform),windows:/Win/.test(Oe.platform),linux:/Linux|X11/.test(Oe.platform),ie:Be,ie_version:Ee?Te.documentMode||6:Le?+Le[1]:Re?+Re[1]:0,gecko:Pe,gecko_version:Pe?+(/Firefox\/(\d+)/.exec(Oe.userAgent)||[0,0])[1]:0,chrome:!!Ne,chrome_version:Ne?+Ne[1]:0,ios:He,android:/Android\b/.test(Oe.userAgent),webkit:Ie,safari:Ve,webkit_version:Ie?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=Te.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class ze extends Se{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return(!i||i instanceof ze&&!(this.length-(e-t)+i.length>256))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new ze(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new xe(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return qe(this.dom,t,e)}}class Fe extends Se{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let t of e)t.setParent(this)}setAttrs(t){if(be(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.dirty|=6)}sync(t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t)}merge(t,e,i,n,s,r){return(!i||!(!(i instanceof Fe&&i.mark.eq(this.mark))||t&&s<=0||et&&e.push(i=t&&(n=s),i=o,s++}let r=this.length-t;return this.length=t,n>-1&&(this.children.length=n,this.markDirty()),new Fe(this.mark,e,r)}domAtPos(t){return Ge(this.dom,this.children,t)}coordsAt(t,e){return Ye(this,t,e)}}function qe(t,e,i){let n=t.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;0==e&&i<0||e==n&&i>=0?We.chrome||We.gecko||(e?(s--,o=1):(r++,o=-1)):i<0?s--:r++;let l=we(t,s,r).getClientRects();if(!l.length)return ue;let h=l[(o?o<0:i>=0)?0:l.length-1];return We.safari&&!o&&0==h.width&&(h=Array.prototype.find.call(l,(t=>t.width))||h),o?fe(h,o<0):h||null}class _e extends Se{constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}static create(t,e,i){return new(t.customView||_e)(t,e,i)}split(t){let e=_e.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(){this.dom&&this.widget.updateDOM(this.dom)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof _e&&this.widget.compare(i.widget))||t>0&&s<=0||e0?i.length-1:0;n=i[e],!(t>0?0==e:e==i.length-1||n.top0?-1:1);return 0==t&&e>0||t==this.length&&e<=0?n:fe(n,0==t)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class je extends _e{domAtPos(t){let{topView:e,text:i}=this.widget;return e?Ue(t,0,e,i,((t,e)=>t.domAtPos(e)),(t=>new xe(i,Math.min(t,i.nodeValue.length)))):new xe(i,Math.min(t,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(t,e){let{topView:i,text:n}=this.widget;return i?$e(t,e,i,n):Math.min(e,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(t,e){let{topView:i,text:n}=this.widget;return i?Ue(t,e,i,n,((t,e,i)=>t.coordsAt(e,i)),((t,e)=>qe(n,t,e))):qe(n,t,e)}destroy(){var t;super.destroy(),null===(t=this.widget.topView)||void 0===t||t.destroy()}get isEditable(){return!0}}function Ue(t,e,i,n,s,r){if(i instanceof Fe){for(let o of i.children){let i=se(o.dom,n),l=i?n.nodeValue.length:o.length;if(t=0;)if(e<0?n>0:n0?-1:1);return i&&i.tope.top?{left:e.left,right:e.right,top:i.top,bottom:i.bottom}:e}get overrideDOMText(){return d.empty}}function Ge(t,e,i){let n=0;for(let s=0;ns&&i0;n--){let i=e[n-1].dom;if(i.parentNode==t)return xe.after(i)}return new xe(t,0)}function Je(t,e,i){let n,{children:s}=t;i>0&&e instanceof Fe&&s.length&&(n=s[s.length-1])instanceof Fe&&n.mark.eq(e.mark)?Je(n,e.children[0],i-1):(s.push(e),e.setParent(t)),t.length+=e.length}function Ye(t,e,i){for(let n=0,s=0;s0?l>=e:l>e)&&(e0)){let t=0;if(l==n){if(o.getSide()<=0)continue;t=i=-o.getSide()}let s=o.coordsAt(Math.max(0,e-n),i);return t&&s?fe(s,i<0):s}n=l}let n=t.dom.lastChild;if(!n)return t.dom.getBoundingClientRect();let s=oe(n);return s[s.length-1]||null}function Xe(t,e){for(let i in t)"class"==i&&e.class?e.class+=" "+t.class:"style"==i&&e.style?e.style+=";"+t.style:e[i]=t[i];return e}function Qe(t,e){if(t==e)return!0;if(!t||!e)return!1;let i=Object.keys(t),n=Object.keys(e);if(i.length!=n.length)return!1;for(let s of i)if(-1==n.indexOf(s)||t[s]!==e[s])return!1;return!0}function Ze(t,e,i){if(e)for(let n in e)i&&n in i||t.removeAttribute(n);if(i)for(let n in i)e&&e[n]==i[n]||t.setAttribute(n,i[n])}ze.prototype.children=_e.prototype.children=Ke.prototype.children=ke;class ti{eq(t){return!1}updateDOM(t){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}ignoreEvent(t){return!0}get customView(){return null}destroy(t){}}var ei=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(ei||(ei={}));class ii extends Bt{constructor(t,e,i,n){super(),this.startSide=t,this.endSide=e,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(t){return new ni(t)}static widget(t){let e=t.side||0,i=!!t.block;return e+=i?e>0?3e8:-4e8:e>0?1e8:-1e8,new ri(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,n=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:s,end:r}=oi(t,n);e=(s?n?-3e8:-1:5e8)-1,i=1+(r?n?2e8:1:-6e8)}return new ri(t,e,i,n,t.widget||null,!0)}static line(t){return new si(t)}static set(t,e=!1){return Vt.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}ii.none=Vt.empty;class ni extends ii{constructor(t){let{start:e,end:i}=oi(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){return this==t||t instanceof ni&&this.tagName==t.tagName&&this.class==t.class&&Qe(this.attrs,t.attrs)}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}ni.prototype.point=!1;class si extends ii{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof si&&Qe(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}si.prototype.mapMode=S.TrackBefore,si.prototype.point=!0;class ri extends ii{constructor(t,e,i,n,s,r){super(e,i,s,t),this.block=n,this.isReplace=r,this.mapMode=n?e<=0?S.TrackBefore:S.TrackAfter:S.TrackDel}get type(){return this.startSide=5}eq(t){return t instanceof ri&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function oi(t,e=!1){let{inclusiveStart:i,inclusiveEnd:n}=t;return null==i&&(i=t.inclusive),null==n&&(n=t.inclusive),{start:null!=i?i:e,end:null!=n?n:e}}function li(t,e,i,n=0){let s=i.length-1;s>=0&&i[s]+n>=t?i[s]=Math.max(i[s],e):i.push(t,e)}ri.prototype.point=!0;class hi extends Se{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,n,s,r){if(i){if(!(i instanceof hi))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),De(this,t,e,i?i.children:[],s,r),!0}split(t){let e=new hi;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:i,off:n}=this.childPos(t);n&&(e.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let t=i;t0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){Qe(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){Je(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=Xe(e,this.attrs||{})),i&&(this.attrs=Xe({class:i},this.attrs||{}))}domAtPos(t){return Ge(this.dom,this.children,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.dirty|=6)}sync(t){var e;this.dom?4&this.dirty&&(be(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Ze(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t);let i=this.dom.lastChild;for(;i&&Se.get(i)instanceof Fe;)i=i.lastChild;if(!(i&&this.length&&("BR"==i.nodeName||0!=(null===(e=Se.get(i))||void 0===e?void 0:e.isEditable)||We.ios&&this.children.some((t=>t instanceof ze))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t=0;for(let e of this.children){if(!(e instanceof ze))return null;let i=oe(e.dom);if(1!=i.length)return null;t+=i[0].width}return{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}}coordsAt(t,e){return Ye(this,t,e)}become(t){return!1}get type(){return ei.Text}static find(t,e){for(let i=0,n=0;i=e){if(s instanceof hi)return s;if(r>e)break}n=r+s.breakAfter}return null}}class ai extends Se{constructor(t,e,i){super(),this.widget=t,this.length=e,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof ai&&this.widget.compare(i.widget))||t>0&&s<=0||e0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,t--;continue}this.text=e,this.textOff=0}let n=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(0,i)),this.getLine().append(ui(new ze(this.text.slice(this.textOff,this.textOff+n)),e),i),this.atCursorPos=!0,this.textOff+=n,t-=n,i=0}}span(t,e,i,n){this.buildText(e-t,i,n),this.pos=e,this.openStart<0&&(this.openStart=n)}point(t,e,i,n,s){let r=e-t;if(i instanceof ri)if(i.block){let{type:t}=i;t!=ei.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new ai(i.widget||new fi("div"),r,t))}else{let o=_e.create(i.widget||new fi("span"),r,i.startSide),l=this.atCursorPos&&!o.isEditable&&s<=n.length&&(t0),h=!o.isEditable&&(tthis.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}return!0}static build(t,e,i,n,s){let r=new ci(t,e,i,s);return r.openEnd=Vt.spans(n,e,i,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function ui(t,e){for(let i of e)t=new Fe(i,[t],t.length);return t}class fi extends ti{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}}const di=[],pi=V.define(),mi=V.define(),gi=V.define(),vi=V.define(),wi=V.define(),yi=V.define(),bi=dt.define({map:(t,e)=>t.map(e)}),xi=dt.define({map:(t,e)=>t.map(e)});class ki{constructor(t,e="nearest",i="nearest",n=5,s=5){this.range=t,this.y=e,this.x=i,this.yMargin=n,this.xMargin=s}map(t){return t.empty?this:new ki(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin)}}const Si=dt.define({map:(t,e)=>t.map(e)});function Ai(t,e,i){let n=t.facet(vi);n.length?n[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const Ci=V.define({combine:t=>!t.length||t[0]});class Mi{constructor(t,e){this.field=t,this.get=e}}class Di{from(t){return new Mi(this,t)}static define(){return new Di}}Di.decorations=Di.define(),Di.atomicRanges=Di.define(),Di.scrollMargins=Di.define();let Oi=0;const Ti=V.define();class Ri{constructor(t,e,i){this.id=t,this.create=e,this.fields=i,this.extension=Ti.of(this)}static define(t,e){let{eventHandlers:i,provide:n,decorations:s}=e||{},r=[];if(n)for(let t of Array.isArray(n)?n:[n])r.push(t);return i&&r.push(Ei.from((t=>({plugin:t,handlers:i})))),s&&r.push(Di.decorations.from(s)),new Ri(Oi++,t,r)}static fromClass(t,e){return Ri.define((e=>new t(e)),e)}}const Ei=Di.define();class Li{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}takeField(t,e){if(this.spec)for(let{field:i,get:n}of this.spec.fields)i==t&&e.push(n(this.value))}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(Ai(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){Ai(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){Ai(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Bi=V.define(),Pi=V.define(),Ni=V.define(),Ii=V.define();class Vi{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new Vi(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAa)break;s+=2}if(!l)return i;new Vi(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),r=l.toA,o=l.toB}}}class Hi{constructor(t,e,i=di){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=C.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let n=[];this.changes.iterChangedRanges(((t,e,i,s)=>n.push(new Vi(t,e,i,s)))),this.changedRanges=n;let s=t.hasFocus;s!=t.inputState.notifiedFocused&&(t.inputState.notifiedFocused=s,this.flags|=1)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var Wi=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Wi||(Wi={}));const zi=Wi.LTR,Fi=Wi.RTL;function qi(t){let e=[];for(let i=0;i=e){if(o.level==i)return r;(s<0||(0!=n?n<0?o.frome:t[s].level>o.level))&&(s=r)}}if(s<0)throw new RangeError("Index out of range");return s}}const Ji=[];function Yi(t){return[new Gi(0,t,0)]}let Xi="";function Qi(t,e,i,s,r){var o;let l=s.head-t.from,h=-1;if(0==l){if(!r||!t.length)return null;e[0].level!=i&&(l=e[0].side(!1,i),h=0)}else if(l==t.length){if(r)return null;let t=e[e.length-1];t.level!=i&&(l=t.side(!0,i),h=e.length-1)}h<0&&(h=Gi.find(e,l,null!==(o=s.bidiLevel)&&void 0!==o?o:-1,s.assoc));let a=e[h];l==a.side(r,i)&&(a=e[h+=r?1:-1],l=a.side(!r,i));let c=r==(a.dir==i),u=n(t.text,l,c);if(Xi=t.text.slice(Math.min(l,u),Math.max(l,u)),u!=a.side(r,i))return B.cursor(u+t.from,c?-1:1,a.level);let f=h==(r?e.length-1:0)?null:e[h+(r?1:-1)];return f||a.level==i?f&&f.level1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=o-1);i=r+o}}readNode(t){if(t.cmIgnore)return;let e=Se.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+Math.min(e,i.offset))}}function en(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class nn{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class sn extends Se{constructor(t){super(),this.view=t,this.compositionDeco=ii.none,this.decorations=[],this.pluginDecorationLength=0,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new hi],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Vi(0,0,0,t.state.doc.length)],0)}get root(){return this.view.root}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(t){let e=t.changedRanges;this.minWidth>0&&e.length&&(e.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=ii.none:(t.transactions.length||this.dirty)&&(this.compositionDeco=function(t,e){let i=on(t);if(!i)return ii.none;let{from:n,to:s,node:r,text:o}=i,l=e.mapPos(n,1),h=Math.max(l,e.mapPos(s,-1)),{state:a}=t,c=3==r.nodeType?r.nodeValue:new tn([],a).readRange(r.firstChild,null).text;if(h-l{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.minWidth=this.minWidth?this.minWidth+"px":"";let t=We.chrome||We.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(t),this.dirty=0,t&&(t.written||i.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""}));let n=[];if(this.view.viewport.from||this.view.viewport.to=0?t[e]:null;if(!n)break;let{fromA:s,toA:r,fromB:o,toB:l}=n,{content:h,breakAtStart:a,openStart:c,openEnd:u}=ci.build(this.view.state.doc,o,l,this.decorations,this.pluginDecorationLength),{i:f,off:d}=i.findPos(r,1),{i:p,off:m}=i.findPos(s,-1);Me(this,p,m,f,d,h,a,c,u)}}updateSelection(t=!1,e=!1){if(t&&this.view.observer.readSelectionRange(),!e&&!this.mayControlSelection()||We.ios&&this.view.inputState.rapidCompositionStart)return;let i=this.forceSelection;this.forceSelection=!1;let n=this.view.state.selection.main,s=this.domAtPos(n.anchor),r=n.empty?s:this.domAtPos(n.head);if(We.gecko&&n.empty&&(1==(o=s).node.nodeType&&o.node.firstChild&&(0==o.offset||"false"==o.node.childNodes[o.offset-1].contentEditable)&&(o.offset==o.node.childNodes.length||"false"==o.node.childNodes[o.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(t,s.node.childNodes[s.offset]||null))),s=r=new xe(t,0),i=!0}var o;let l=this.view.observer.selectionRange;!i&&l.focusNode&&le(s.node,s.offset,l.anchorNode,l.anchorOffset)&&le(r.node,r.offset,l.focusNode,l.focusOffset)||(this.view.observer.ignore((()=>{We.android&&We.chrome&&this.dom.contains(l.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=ne(this.root);if(n.empty){if(We.gecko){let t=(e=s.node,i=s.offset,1!=e.nodeType?0:(i&&"false"==e.childNodes[i-1].contentEditable?1:0)|(in.head&&([s,r]=[r,s]),e.setEnd(r.node,r.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}var e,i})),this.view.observer.setSelectionRange(s,r)),this.impreciseAnchor=s.precise?null:new xe(l.anchorNode,l.anchorOffset),this.impreciseHead=r.precise?null:new xe(l.focusNode,l.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let t=this.view.state.selection.main,e=ne(this.root);if(!t.empty||!t.assoc||!e.modify)return;let i=hi.find(this,t.head);if(!i)return;let n=i.posAtStart;if(t.head==n||t.head==n+i.length)return;let s=this.coordsAt(t.head,-1),r=this.coordsAt(t.head,1);if(!s||!r||s.bottom>r.top)return;let o=this.domAtPos(t.head+t.assoc);e.collapse(o.node,o.offset),e.modify("move",t.assoc<0?"forward":"backward","lineboundary")}mayControlSelection(){return this.view.state.facet(Ci)?this.root.activeElement==this.dom:re(this.dom,this.view.observer.selectionRange)}nearest(t){for(let e=t;e;){let t=Se.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;er||t==r&&s.type!=ei.WidgetBefore&&s.type!=ei.WidgetAfter&&(!n||2==e||this.children[n-1].breakAfter||this.children[n-1].type==ei.WidgetBefore&&e>-2))return s.coordsAt(t-r,e);i=r}}measureVisibleLineHeights(){let t=[],{from:e,to:i}=this.view.viewState.viewport,n=this.view.contentDOM.clientWidth,s=n>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,r=-1;for(let o=0,l=0;li)break;if(o>=e){let e=h.dom.getBoundingClientRect();if(t.push(e.height),s){let t=h.dom.lastChild,i=t?oe(t):[];if(i.length){let t=i[i.length-1],s=this.view.textDirection==Wi.LTR?t.right-e.left:e.right-t.left;s>r&&(r=s,this.minWidth=n,this.minWidthFrom=o,this.minWidthTo=a)}}}o=a+h.breakAfter}return t}measureTextSize(){for(let t of this.children)if(t instanceof hi){let e=t.measureTextSize();if(e)return e}let t,e,i=document.createElement("div");return i.className="cm-line",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(i);let n=oe(i.firstChild)[0];t=i.getBoundingClientRect().height,e=n?n.width/27:7,i.remove()})),{lineHeight:t,charWidth:e}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new Ce(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let s=n==e.viewports.length?null:e.viewports[n],r=s?s.from-1:this.length;if(r>i){let n=e.lineBlockAt(r).bottom-e.lineBlockAt(i).top;t.push(ii.replace({widget:new rn(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,r))}if(!s)break;i=s.to+1}return ii.set(t)}updateDeco(){let t=this.view.pluginField(Di.decorations);return this.pluginDecorationLength=t.length,this.decorations=[...t,...this.view.state.facet(Ni),this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(t){let e,{range:i}=t,n=this.coordsAt(i.head,i.empty?i.assoc:i.head>i.anchor?-1:1);if(!n)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,e.left),top:Math.min(n.top,e.top),right:Math.max(n.right,e.right),bottom:Math.max(n.bottom,e.bottom)});let s=0,r=0,o=0,l=0;for(let t of this.view.pluginField(Di.scrollMargins))if(t){let{left:e,right:i,top:n,bottom:h}=t;null!=e&&(s=Math.max(s,e)),null!=i&&(r=Math.max(r,i)),null!=n&&(o=Math.max(o,n)),null!=h&&(l=Math.max(l,h))}let h={left:n.left-s,top:n.top-o,right:n.right+r,bottom:n.bottom+l};!function(t,e,i,n,s,r,o,l){let h=t.ownerDocument,a=h.defaultView;for(let c=t;c;)if(1==c.nodeType){let t,u=c==h.body;if(u)t=de(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}let e=c.getBoundingClientRect();t={left:e.left,right:e.left+c.clientWidth,top:e.top,bottom:e.top+c.clientHeight}}let f=0,d=0;if("nearest"==s)e.top0&&e.bottom>t.bottom+d&&(d=e.bottom-t.bottom+d+o)):e.bottom>t.bottom&&(d=e.bottom-t.bottom+o,i<0&&e.top-d0&&e.right>t.right+f&&(f=e.right-t.right+f+r)):e.right>t.right&&(f=e.right-t.right+r,i<0&&e.left0&&i<=0)e=ce(t=t.childNodes[e-1]);else{if(!(1==t.nodeType&&e=0))return null;t=t.childNodes[e],e=0}}}class an{constructor(){this.changes=[]}compareRange(t,e){li(t,e,this.changes)}comparePoint(t,e){li(t,e,this.changes)}}function cn(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function un(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function fn(t,e){return t.tope.top+1}function dn(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function mn(t,e,i){let n,s,r,o,l,h,a,c;for(let u=t.firstChild;u;u=u.nextSibling){let t=oe(u);for(let f=0;fm||o==m&&r>p)&&(n=u,s=d,r=p,o=m),0==p?i>d.bottom&&(!a||a.bottomd.top)&&(h=u,c=d):a&&fn(a,d)?a=pn(a,d.bottom):c&&fn(c,d)&&(c=dn(c,d.top))}}if(a&&a.bottom>=i?(n=l,s=a):c&&c.top<=i&&(n=h,s=c),!n)return{node:t,offset:0};let u=Math.max(s.left,Math.min(s.right,e));return 3==n.nodeType?gn(n,u,i):r||"true"!=n.contentEditable?{node:t,offset:Array.prototype.indexOf.call(t.childNodes,n)+(e>=(s.left+s.right)/2?1:0)}:mn(n,u,i)}function gn(t,e,i){let n=t.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;li?a.top-i:i-a.bottom)-1;if(a.left-1<=e&&a.right+1>=e&&c=(a.left+a.right)/2,n=i;if(We.chrome||We.gecko){we(t,l).getBoundingClientRect().left==a.right&&(n=!i)}if(c<=0)return{node:t,offset:l+(n?1:0)};s=l+(n?1:0),r=c}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function vn(t,{x:e,y:i},n,s=-1){var r;let o,l=t.contentDOM.getBoundingClientRect(),h=l.top+t.viewState.paddingTop,{docHeight:a}=t.viewState,c=i-h;if(c<0)return 0;if(c>a)return t.state.doc.length;for(let e=t.defaultLineHeight/2,i=!1;o=t.elementAtHeight(c),o.type!=ei.Text;)for(;c=s>0?o.bottom+e:o.top-e,!(c>=0&&c<=a);){if(i)return n?null:0;i=!0,s=-s}i=h+c;let u=o.from;if(ut.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:wn(t,l,o,e,i);let f=t.dom.ownerDocument,d=t.root.elementFromPoint?t.root:f,p=d.elementFromPoint(e,i);p&&!t.contentDOM.contains(p)&&(p=null),p||(e=Math.max(l.left+1,Math.min(l.right-1,e)),p=d.elementFromPoint(e,i),p&&!t.contentDOM.contains(p)&&(p=null));let m,g=-1;if(p&&0!=(null===(r=t.docView.nearest(p))||void 0===r?void 0:r.isEditable))if(f.caretPositionFromPoint){let t=f.caretPositionFromPoint(e,i);t&&({offsetNode:m,offset:g}=t)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(e,i);t&&(({startContainer:m,startOffset:g}=t),We.safari&&function(t,e,i){let n;if(3!=t.nodeType||e!=(n=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return we(t,n-1,n).getBoundingClientRect().left>i}(m,g,e)&&(m=void 0))}if(!m||!t.docView.dom.contains(m)){let n=hi.find(t.docView,u);if(!n)return c>o.top+o.height/2?o.to:o.from;({node:m,offset:g}=mn(n.dom,e,i))}return t.docView.posFromDOM(m,g)}function wn(t,e,i,n,s){let r=Math.round((n-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&i.height>1.5*t.defaultLineHeight){r+=Math.floor((s-i.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(i.from,i.to);return i.from+f(o,r,t.state.tabSize)}function yn(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=t.bidiSpans(s);for(let o=e,l=null;;){let e=Qi(s,r,t.textDirection,o,i),h=Xi;if(!e){if(s.number==(i?t.state.doc.lines:1))return o;h="\n",s=t.state.doc.line(s.number+(i?1:-1)),r=t.bidiSpans(s),e=B.cursor(i?s.from:s.to)}if(l){if(!l(h))return o}else{if(!n)return e;l=n(h)}o=e}}function bn(t,e,i){let n=t.pluginField(Di.atomicRanges);for(;;){let t=!1;for(let s of n)s.between(i.from-1,i.from+1,((n,s,r)=>{i.from>n&&i.fromi.from?B.cursor(n,1):B.cursor(s,-1),t=!0)}));if(!t)return i}}class xn{constructor(t){this.lastKeyCode=0,this.lastKeyTime=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let e in Mn){let i=Mn[e];t.contentDOM.addEventListener(e,(n=>{Cn(t,n)&&!this.ignoreDuringComposition(n)&&("keydown"==e&&this.keydown(t,n)||(this.mustFlushObserver(n)&&t.observer.forceFlush(),this.runCustomHandlers(e,t,n)?n.preventDefault():i(t,n)))})),this.registeredEvents.push(e)}this.notifiedFocused=t.hasFocus,this.ensureHandlers(t),We.safari&&t.contentDOM.addEventListener("input",(()=>null))}setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}ensureHandlers(t){let e=this.customHandlers=t.pluginField(Ei);for(let i of e)for(let e in i.handlers)this.registeredEvents.indexOf(e)<0&&"scroll"!=e&&(this.registeredEvents.push(e),t.contentDOM.addEventListener(e,(i=>{Cn(t,i)&&this.runCustomHandlers(e,t,i)&&i.preventDefault()})))}runCustomHandlers(t,e,i){for(let n of this.customHandlers){let s=n.handlers[t];if(s)try{if(s.call(n.plugin,i,e)||i.defaultPrevented)return!0}catch(t){Ai(e.state,t)}}return!1}runScrollHandlers(t,e){for(let i of this.customHandlers){let n=i.handlers.scroll;if(n)try{n.call(i.plugin,e,t)}catch(e){Ai(t.state,e)}}}keydown(t,e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()t.keyCode==e.keyCode)))||e.ctrlKey||e.altKey||e.metaKey||e.synthetic)&&(this.pendingIOSKey=i,setTimeout((()=>this.flushIOSKey(t)),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,ye(t.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(We.safari&&Date.now()-this.compositionEndedAt<500)&&(this.compositionEndedAt=0,!0))}mustFlushObserver(t){return"keydown"==t.type&&229!=t.keyCode||"compositionend"==t.type&&!We.ios}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.mouseSelection&&this.mouseSelection.update(t),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const kn=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Sn=[16,17,18,20,91,92,224,225];class An{constructor(t,e,i,n){this.view=t,this.style=i,this.mustSelect=n,this.lastEvent=e;let s=t.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(Ct.allowMultipleSelections)&&function(t,e){let i=t.state.facet(pi);return i.length?i[0](e):We.mac?e.metaKey:e.ctrlKey}(t,e),this.dragMove=function(t,e){let i=t.state.facet(mi);return i.length?i[0](e):We.mac?!e.altKey:!e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let n=ne(t.root);if(0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let t=0;t=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(t,e)||1!=Wn(e))&&null,!1===this.dragging&&(e.preventDefault(),this.select(e))}move(t){if(0==t.buttons)return this.destroy();!1===this.dragging&&this.select(this.lastEvent=t)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}select(t){let e=this.style.get(t,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer",scrollIntoView:!0}),this.mustSelect=!1}update(t){t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}function Cn(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,n=e.target;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=Se.get(n))&&i.ignoreEvent(e))return!1;return!0}const Mn=Object.create(null),Dn=We.ie&&We.ie_version<15||We.ios&&We.webkit_version<604;function On(t,e){let i,{state:n}=t,s=1,r=n.toText(e),o=r.lines==n.selection.ranges.length;if(null!=Fn&&n.selection.ranges.every((t=>t.empty))&&Fn==r.toString()){let t=-1;i=n.changeByRange((i=>{let l=n.doc.lineAt(i.from);if(l.from==t)return{range:i};t=l.from;let h=n.toText((o?r.line(s++).text:e)+n.lineBreak);return{changes:{from:l.from,insert:h},range:B.cursor(i.from+h.length)}}))}else i=o?n.changeByRange((t=>{let e=r.line(s++);return{changes:{from:t.from,to:t.to,insert:e.text},range:B.cursor(t.from+e.length)}})):n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Mn.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select"),27==e.keyCode?t.inputState.lastEscPress=Date.now():Sn.indexOf(e.keyCode)<0&&(t.inputState.lastEscPress=0)};let Tn=0;function Rn(t,e,i,s){if(1==s)return B.cursor(e,i);if(2==s)return function(t,e,i=1){let s=t.charCategorizer(e),r=t.doc.lineAt(e),o=e-r.from;if(0==r.length)return B.cursor(e);0==o?i=1:o==r.length&&(i=-1);let l=o,h=o;i<0?l=n(r.text,o,!1):h=n(r.text,o);let a=s(r.text.slice(l,h));for(;l>0;){let t=n(r.text,l,!1);if(s(r.text.slice(t,l))!=a)break;l=t}for(;h{Tn=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Mn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Mn.mousedown=(t,e)=>{if(t.observer.flush(),Tn>Date.now()-2e3&&1==Wn(e))return;let i=null;for(let n of t.state.facet(gi))if(i=n(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=Pn(t,e),n=Wn(e),s=t.state.selection,r=i,o=e;return{update(t){t.docChanged&&(i&&(i.pos=t.changes.mapPos(i.pos)),s=s.map(t.changes),o=null)},get(e,l,h){let a;if(o&&e.clientX==o.clientX&&e.clientY==o.clientY?a=r:(a=r=Pn(t,e),o=e),!a||!i)return s;let c=Rn(t,a.pos,a.bias,n);if(i.pos!=a.pos&&!l){let e=Rn(t,i.pos,i.bias,n),s=Math.min(e.from,c.from),r=Math.max(e.to,c.to);c=sve(t.contentDOM))),t.inputState.startMouseSelection(new An(t,e,i,n))}};let En=(t,e)=>t>=e.top&&t<=e.bottom,Ln=(t,e,i)=>En(e,i)&&t>=i.left&&t<=i.right;function Bn(t,e,i,n){let s=hi.find(t.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(0==r)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Ln(i,n,o))return-1;let l=s.coordsAt(r,1);return l&&Ln(i,n,l)?1:o&&En(n,o)?-1:1}function Pn(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:Bn(t,i,e.clientX,e.clientY)}}const Nn=We.ie&&We.ie_version<=11;let In=null,Vn=0,Hn=0;function Wn(t){if(!Nn)return t.detail;let e=In,i=Hn;return In=t,Hn=Date.now(),Vn=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Vn+1)%3:1}function zn(t,e,i,n){if(!i)return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:r}=t.inputState,o=n&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,l={from:s,insert:i},h=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:h,selection:{anchor:h.mapPos(s,-1),head:h.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}Mn.dragstart=(t,e)=>{let{selection:{main:i}}=t.state,{mouseSelection:n}=t.inputState;n&&(n.dragging=i),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(i.from,i.to)),e.dataTransfer.effectAllowed="copyMove")},Mn.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let i=e.dataTransfer.files;if(i&&i.length){e.preventDefault();let n=Array(i.length),s=0,r=()=>{++s==i.length&&zn(t,e,n.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(n[t]=e.result),r()},e.readAsText(i[t])}}else zn(t,e,e.dataTransfer.getData("Text"),!0)},Mn.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let i=Dn?null:e.clipboardData;i?(On(t,i.getData("text/plain")),e.preventDefault()):function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),On(t,i.value)}),50)}(t)};let Fn=null;function qn(t,e){if(t.docView.compositionDeco.size){t.inputState.rapidCompositionStart=e;try{t.update([])}finally{t.inputState.rapidCompositionStart=!1}}}Mn.copy=Mn.cut=(t,e)=>{let{text:i,ranges:n,linewise:s}=function(t){let e=[],i=[],n=!1;for(let n of t.selection.ranges)n.empty||(e.push(t.sliceDoc(n.from,n.to)),i.push(n));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let r=t.doc.lineAt(n);r.number>s&&(e.push(r.text),i.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})),s=r.number}n=!0}return{text:e.join(t.lineBreak),ranges:i,linewise:n}}(t.state);if(!i&&!s)return;Fn=s?i:null;let r=Dn?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",i)):function(t,e){let i=t.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout((()=>{n.remove(),t.focus()}),50)}(t,i),"cut"!=e.type||t.state.readOnly||t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"})},Mn.focus=Mn.blur=t=>{setTimeout((()=>{t.hasFocus!=t.inputState.notifiedFocused&&t.update([])}),10)},Mn.compositionstart=Mn.compositionupdate=t=>{null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0,t.docView.compositionDeco.size&&(t.observer.flush(),qn(t,!0)))},Mn.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,setTimeout((()=>{t.inputState.composing<0&&qn(t,!1)}),50)},Mn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Mn.beforeinput=(t,e)=>{var i;let n;if(We.chrome&&We.android&&(n=kn.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let e=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}};const _n=["pre-wrap","normal","pre-line","break-spaces"];class jn{constructor(){this.doc=d.empty,this.lineWrapping=!1,this.direction=Wi.LTR,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength)),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForStyle(t,e){return _n.indexOf(t)>-1!=this.lineWrapping||this.direction!=e}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,l=Math.round(i)!=Math.round(this.lineHeight)||this.lineWrapping!=o||this.direction!=e;if(this.lineWrapping=o,this.direction=e,this.lineHeight=i,this.charWidth=n,this.lineLength=s,l){this.heightSamples={};for(let t=0;te.moveY(t))):this.type):this}}var Kn=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Kn||(Kn={}));const Gn=.001;class Jn{constructor(t,e,i=2){this.length=t,this.height=e,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t,e){this.height!=e&&(Math.abs(this.height-e)>Gn&&(t.heightChanged=!0),this.height=e)}replace(t,e,i){return Jn.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,n){let s=this;for(let r=n.length-1;r>=0;r--){let{fromA:o,toA:l,fromB:h,toB:a}=n[r],c=s.lineAt(o,Kn.ByPosNoHeight,e,0,0),u=c.to>=l?c:s.lineAt(l,Kn.ByPosNoHeight,e,0,0);for(a+=u.to-l,l=u.to;r>0&&c.from<=n[r-1].toA;)o=n[r-1].fromA,h=n[r-1].fromB,r--,o2*s){let s=t[e-1];s.break?t.splice(--e,1,s.left,null,s.right):t.splice(--e,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,s-=e.size}}else if(n0){let t=i[i.length-1];t instanceof Qn?i[i.length-1]=new Qn(t.length+n):i.push(null,new Qn(n-1))}if(t>0){let e=i[0];e instanceof Qn?i[0]=new Qn(t+e.length):i.unshift(new Qn(t-1),null)}return Jn.of(i)}decomposeLeft(t,e){e.push(new Qn(t-1),null)}decomposeRight(t,e){e.push(null,new Qn(this.length-t-1))}updateHeight(t,e=0,i=!1,n){let s=e+this.length;if(n&&n.from<=e+this.length&&n.more){let i=[],r=Math.max(e,n.from),o=-1,l=t.heightChanged;for(n.from>e&&i.push(new Qn(n.from-e-1).updateHeight(t,e));r<=s&&n.more;){let e=t.doc.lineAt(r).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==o?o=s:Math.abs(s-o)>=Gn&&(o=-2);let l=new Xn(e,s);l.outdated=!1,i.push(l),r+=e+1}r<=s&&i.push(null,new Qn(s-r).updateHeight(t,r));let h=Jn.of(i);return t.heightChanged=l||o<0||Math.abs(h.height-this.height)>=Gn||Math.abs(o-this.lines(t.doc,e).lineHeight)>=Gn,h}return(i||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Zn extends Jn{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,n){let s=i+this.left.height;return to))return h;let a=e==Kn.ByPosNoHeight?Kn.ByPosNoHeight:Kn.ByPos;return l?h.join(this.right.lineAt(o,a,i,r,o)):this.left.lineAt(o,a,i,n,s).join(h)}forEachLine(t,e,i,n,s,r){let o=n+this.left.height,l=s+this.left.length+this.break;if(this.break)t=l&&this.right.forEachLine(t,e,i,o,l,r);else{let h=this.lineAt(l,Kn.ByPos,i,n,s);t=t&&h.from<=e&&r(h),e>h.to&&this.right.forEachLine(h.to+1,e,i,o,l,r)}}replace(t,e,i){let n=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-n,e-n,i));let s=[];t>0&&this.decomposeLeft(t,s);let r=s.length;for(let t of i)s.push(t);if(t>0&&ts(s,r-1),e=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,n=i+this.break;if(t>=n)return this.right.decomposeRight(t-n,e);t2*e.size||e.size>2*t.size?Jn.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,n){let{left:s,right:r}=this,o=e+s.length+this.break,l=null;return n&&n.from<=e+s.length&&n.more?l=s=s.updateHeight(t,e,i,n):s.updateHeight(t,e,i),n&&n.from<=o+r.length&&n.more?l=r=r.updateHeight(t,o,i,n):r.updateHeight(t,o,i),l?this.balanced(s,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function ts(t,e){let i,n;null==t[e]&&(i=t[e-1])instanceof Qn&&(n=t[e+1])instanceof Qn&&t.splice(e-1,3,new Qn(i.length+1+n.length))}class es{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Xn?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Xn(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(n,s)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Xn(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new Qn(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Xn)return t;let e=new Xn(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine(),t.type!=ei.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=ei.WidgetBefore&&(this.covering=t)}addLineDeco(t,e){let i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,t),this.writtenTo=this.pos=this.pos+e}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Xn||this.isCovered?(this.writtenTot.clientHeight||t.scrollWidth>t.clientWidth)&&"visible"!=i.overflow){let e=t.getBoundingClientRect();n=Math.max(n,e.left),s=Math.min(s,e.right),r=Math.max(r,e.top),o=Math.min(o,e.bottom)}e="absolute"==i.position||"fixed"==i.position?t.offsetParent:t.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-i.left,right:Math.max(n,s)-i.left,top:r-(i.top+e),bottom:Math.max(r,o)-(i.top+e)}}function ss(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class rs{constructor(t,e,i){this.from=t,this.to=e,this.size=i}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;it.draw(!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let n=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>n>=t&&n<=e))){let{from:e,to:i}=this.lineBlockAt(n);t.push(new hs(e,i))}}this.viewports=t.sort(((t,e)=>t.from-e.from)),this.scaler=this.heightMap.height<=7e6?ps:new ms(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(t=>{this.viewportLines.push(1==this.scaler.scale?t:gs(t,this.scaler))}))}update(t,e=null){let i=this.state;this.state=t.state;let n=this.state.facet(Ni),s=t.changedRanges,r=Vi.extendWithRanges(s,function(t,e,i){let n=new is;return Vt.compare(t,e,i,n,0),n.changes}(t.startState.facet(Ni),n,t?t.changes:C.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(n,i.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(t.flags|=2);let l=r.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,e));let h=!t.changes.empty||2&t.flags||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),h&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),n=this.heightOracle,s=i.whiteSpace,r="rtl"==i.direction?Wi.RTL:Wi.LTR,o=this.heightOracle.mustRefreshForStyle(s,r),l=o||this.mustMeasureContent||this.contentDOMHeight!=e.clientHeight,h=0,a=0;if(this.editorWidth!=t.scrollDOM.clientWidth&&(n.lineWrapping&&(l=!0),this.editorWidth=t.scrollDOM.clientWidth,h|=8),l){this.mustMeasureContent=!1,this.contentDOMHeight=e.clientHeight;let t=parseInt(i.paddingTop)||0,n=parseInt(i.paddingBottom)||0;this.paddingTop==t&&this.paddingBottom==n||(h|=8,this.paddingTop=t,this.paddingBottom=n)}let c=(this.printing?ss:ns)(e,this.paddingTop),u=c.top-this.pixelViewport.top,f=c.bottom-this.pixelViewport.bottom;this.pixelViewport=c;let d=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(d!=this.inView&&(this.inView=d,d&&(l=!0)),!this.inView)return 0;let p=e.clientWidth;if(this.contentDOMWidth==p&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=p,this.editorHeight=t.scrollDOM.clientHeight,h|=8),l){let e=t.docView.measureVisibleLineHeights();if(n.mustRefreshForHeights(e)&&(o=!0),o||n.lineWrapping&&Math.abs(p-this.contentDOMWidth)>n.charWidth){let{lineHeight:i,charWidth:l}=t.docView.measureTextSize();o=n.refresh(s,r,i,l,p/l,e),o&&(t.docView.minWidth=0,h|=8)}u>0&&f>0?a=Math.max(u,f):u<0&&f<0&&(a=Math.min(u,f)),n.heightChanged=!1,this.heightMap=this.heightMap.updateHeight(n,0,o,new Un(this.viewport.from,e)),n.heightChanged&&(h|=2)}let m=!this.viewportIsAppropriate(this.viewport,a)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return m&&(this.viewport=this.getViewport(a,this.scrollTarget)),this.updateForViewport(),(2&h||m)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),n=this.heightMap,s=this.state.doc,{visibleTop:r,visibleBottom:o}=this,l=new hs(n.lineAt(r-1e3*i,Kn.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-i),Kn.ByHeight,s,0,0).to);if(e){let{head:t}=e.range;if(tl.to){let i,r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=n.lineAt(t,Kn.ByPos,s,0,0);i="center"==e.y?(o.top+o.bottom)/2-r/2:"start"==e.y||"nearest"==e.y&&t=o+Math.max(10,Math.min(i,250)))&&n>r-2e3&&si.from&&o.push({from:i.from,to:n}),s=i.from&&l.from<=i.to&&fs(o,l.from-10,l.from+10),!l.empty&&l.to>=i.from&&l.to<=i.to&&fs(o,l.to-10,l.to+10);for(let{from:n,to:s}of o)s-n>1e3&&e.push(ds(t,(t=>t.from>=i.from&&t.to<=i.to&&Math.abs(t.from-n)<1e3&&Math.abs(t.to-s)<1e3))||new rs(n,s,this.gapSize(i,n,s,r)))}return e}gapSize(t,e,i,n){let s=us(n,i)-us(n,e);return this.heightOracle.lineWrapping?t.height*s:n.total*this.heightOracle.charWidth*s}updateLineGaps(t){rs.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=ii.set(t.map((t=>t.draw(this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.state.facet(Ni);this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];Vt.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||gs(this.heightMap.lineAt(t,Kn.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(t){return gs(this.heightMap.lineAt(this.scaler.fromDOM(t),Kn.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(t){return gs(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class hs{constructor(t,e){this.from=t,this.to=e}}function as(t,e,i){let n=[],s=t,r=0;return Vt.spans(i.facet(Ni),t,e,{span(){},point(t,e){t>s&&(n.push({from:s,to:t}),r+=t-s),s=e}},20),s=1)return e[e.length-1].to;let n=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:s}=e[t],r=s-i;if(n<=r)return i+n;n-=r}}function us(t,e){let i=0;for(let{from:n,to:s}of t.ranges){if(e<=s){i+=e-n;break}i+=s-n}return i/t.total}function fs(t,e,i){for(let n=0;ne){let r=[];s.fromi&&r.push({from:i,to:s.to}),t.splice(n,1,...r),n+=r.length-1}}}function ds(t,e){for(let i of t)if(e(i))return i}const ps={toDOM:t=>t,fromDOM:t=>t,scale:1};class ms{constructor(t,e,i){let n=0,s=0,r=0;this.viewports=i.map((({from:i,to:s})=>{let r=e.lineAt(i,Kn.ByPos,t,0,0).top,o=e.lineAt(s,Kn.ByPos,t,0,0).bottom;return n+=o-r,{from:i,to:s,top:r,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(e.height-n);for(let t of this.viewports)t.domTop=r+(t.top-s)*this.scale,r=t.domBottom=t.domTop+(t.bottom-t.top),s=t.bottom}toDOM(t){for(let e=0,i=0,n=0;;e++){let s=egs(t,e))):t.type)}const vs=V.define({combine:t=>t.join(" ")}),ws=V.define({combine:t=>t.indexOf(!0)>-1}),ys=Rt.newName(),bs=Rt.newName(),xs=Rt.newName(),ks={"&light":"."+bs,"&dark":"."+xs};function Ss(t,e,i){return new Rt(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const As=Ss("."+ys,{"&.cm-editor":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere"},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},".cm-cursor, .cm-dropCursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ks),Cs={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ms=We.ie&&We.ie_version<=11;class Ds{constructor(t,e,i){this.view=t,this.onChange=e,this.onScrollChanged=i,this.active=!1,this.selectionRange=new pe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(We.ie&&We.ie_version<=11||We.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),Ms&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),window.addEventListener("resize",this.onResize=this.onResize.bind(this)),"function"==typeof ResizeObserver&&(this.resize=new ResizeObserver((()=>{this.view.docView.lastUpdate{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange(),this.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:e}=this,i=this.selectionRange;if(e.state.facet(Ci)?e.root.activeElement!=this.dom:!re(e.dom,i))return;let n=i.anchorNode&&e.docView.nearest(i.anchorNode);n&&n.ignoreEvent(t)||((We.ie&&We.ie_version<=11||We.android&&We.chrome)&&!e.state.selection.main.empty&&i.focusNode&&le(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1))}readSelectionRange(){let{root:t}=this.view,e=ne(t),i=We.safari&&11==t.nodeType&&function(){let t=document.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}()==this.view.contentDOM&&function(t){let e=null;function i(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",i,!0),document.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),!e)return null;let n=e.startContainer,s=e.startOffset,r=e.endContainer,o=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);le(l.node,l.offset,r,o)&&([n,s,r,o]=[r,o,n,s]);return{anchorNode:n,anchorOffset:s,focusNode:r,focusOffset:o}}(this.view)||e;return!this.selectionRange.eq(i)&&(this.selectionRange.setRange(i),this.selectionChanged=!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;)if(1==i.nodeType)!e&&t{let t=this.delayedAndroidKey;this.delayedAndroidKey=null;let e=this.view.state;ye(this.view.contentDOM,t.key,t.keyCode)?this.processRecords():this.flush(),this.view.state==e&&this.view.update([])})),this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e})}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=window.setTimeout((()=>{this.delayedFlush=-1,this.flush()}),20))}forceFlush(){this.delayedFlush>=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1,this.flush())}processRecords(){let t=this.queue;for(let e of this.observer.takeRecords())t.push(e);t.length&&(this.queue=[]);let e=-1,i=-1,n=!1;for(let s of t){let t=this.readMutation(s);t&&(t.typeOver&&(n=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:n}}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return;t&&this.readSelectionRange();let{from:e,to:i,typeOver:n}=this.processRecords(),s=this.selectionChanged&&re(this.dom,this.selectionRange);if(e<0&&!s)return;this.selectionChanged=!1;let r=this.view.state;this.onChange(e,i,n),this.view.state==r&&this.view.update([])}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.dirty|=4),"childList"==t.type){let i=Os(e,t.previousSibling||t.target.previousSibling,-1),n=Os(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:n?e.posBefore(n):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resize)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);window.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onResize),window.removeEventListener("beforeprint",this.onPrint),this.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}function Os(t,e,i){for(;e;){let n=Se.get(e);if(n&&n.parent==t)return n;let s=e.parentNode;e=s!=t.dom?s:i>0?e.nextSibling:e.previousSibling}return null}function Ts(t,e,i,n){let s,r,o=t.state.selection.main;if(e>-1){let n=t.docView.domBoundsAround(e,i,0);if(!n||t.state.readOnly)return;let{from:l,to:h}=n,a=t.docView.impreciseHead||t.docView.impreciseAnchor?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=t.observer.selectionRange;i&&(e.push(new nn(i,n)),s==i&&r==n||e.push(new nn(s,r)));return e}(t),c=new tn(a,t.state);c.readRange(n.startDOM,n.endDOM);let u=o.from,f=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||We.android&&c.text.length0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if("end"==n){i-=o+Math.max(0,r-Math.min(o,l))-r}if(o=o?r-i:0,l=r+(l-o),o=r}else if(l=l?r-i:0,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}(t.state.doc.sliceString(l,h,Zi),c.text,u-l,f);p&&(We.chrome&&13==t.inputState.lastKeyCode&&p.toB==p.from+2&&c.text.slice(p.from,p.toB)==Zi+Zi&&p.toB--,s={from:l+p.from,to:l+p.toA,insert:d.of(c.text.slice(p.from,p.toB).split(Zi))}),r=function(t,e){if(0==t.length)return null;let i=t[0].pos,n=2==t.length?t[1].pos:i;return i>-1&&n>-1?B.single(i+e,n+e):null}(a,l)}else if(t.hasFocus||!t.state.facet(Ci)){let e=t.observer.selectionRange,{impreciseHead:i,impreciseAnchor:n}=t.docView,s=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!se(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),l=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!se(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset);s==o.head&&l==o.anchor||(r=B.single(l,s))}if(s||r)if(!s&&n&&!o.empty&&r&&r.main.empty?s={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:s&&s.from>=o.from&&s.to<=o.to&&(s.from!=o.from||s.to!=o.to)&&o.to-o.from-(s.to-s.from)<=4&&(s={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,s.from).append(s.insert).append(t.state.doc.slice(s.to,o.to))}),s){let e=t.state;if(We.ios&&t.inputState.flushIOSKey(t))return;if(We.android&&(s.from==o.from&&s.to==o.to&&1==s.insert.length&&2==s.insert.lines&&ye(t.contentDOM,"Enter",13)||s.from==o.from-1&&s.to==o.to&&0==s.insert.length&&ye(t.contentDOM,"Backspace",8)||s.from==o.from&&s.to==o.to+1&&0==s.insert.length&&ye(t.contentDOM,"Delete",46)))return;let i,n=s.insert.toString();if(t.state.facet(yi).some((e=>e(t,s.from,s.to,n))))return;if(t.inputState.composing>=0&&t.inputState.composing++,s.from>=o.from&&s.to<=o.to&&s.to-s.from>=(o.to-o.from)/3&&(!r||r.main.empty&&r.main.from==s.from+s.insert.length)&&t.inputState.composing<0){let n=o.froms.to?e.sliceDoc(s.to,o.to):"";i=e.replaceSelection(t.state.toText(n+s.insert.sliceString(0,void 0,t.state.lineBreak)+r))}else{let n=e.changes(s),l=r&&!e.selection.main.eq(r.main)&&r.main.to<=n.newLength?r.main:void 0;if(e.selection.ranges.length>1&&t.inputState.composing>=0&&s.to<=o.to&&s.to>=o.to-10){let r=t.state.sliceDoc(s.from,s.to),h=on(t)||t.state.doc.lineAt(o.head),a=o.to-s.to,c=o.to-o.from;i=e.changeByRange((i=>{if(i.from==o.from&&i.to==o.to)return{changes:n,range:l||i.map(n)};let u=i.to-a,f=u-r.length;if(i.to-i.from!=c||t.state.sliceDoc(f,u)!=r||h&&i.to>=h.from&&i.from<=h.to)return{range:i};let d=e.changes({from:f,to:u,insert:s.insert}),p=i.to-o.to;return{changes:d,range:l?B.range(Math.max(0,l.anchor+p),Math.max(0,l.head+p)):i.map(d)}}))}else i={changes:n,selection:l&&e.selection.replaceRange(l)}}let l="input.type";t.composing&&(l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(i,{scrollIntoView:!0,userEvent:l})}else if(r&&!r.main.eq(o)){let e=!1,i="select";t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:i})}}class Rs{constructor(t={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=t.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this.root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new ls(t.state||Ct.create()),this.plugins=this.state.facet(Ti).map((t=>new Li(t)));for(let t of this.plugins)t.update(this);this.observer=new Ds(this,((t,e,i)=>{Ts(this,t,e,i)}),(t=>{this.inputState.runScrollHandlers(this,t),this.observer.intersecting&&this.measure()})),this.inputState=new xn(this),this.docView=new sn(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),t.parent&&t.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}dispatch(...t){this._dispatch(1==t.length&&t[0]instanceof pt?t[0]:this.state.update(...t))}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,n=this.state;for(let e of t){if(e.startState!=n)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");n=e.state}if(this.destroyed)return void(this.viewState.state=n);if(n.facet(Ct.phrases)!=this.state.facet(Ct.phrases))return this.setState(n);e=new Hi(this,n,t);let s=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(s&&(s=s.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;s=new ki(t.empty?t:B.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(bi)?s=new ki(t.value):t.is(xi)?s=new ki(t.value,"center"):t.is(Si)&&(s=t.value)}this.viewState.update(e,s),this.bidiCache=Ps.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(Ii)!=this.styleModules&&this.mountStyles(),this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(vs)!=e.state.facet(vs)&&(this.viewState.mustMeasureContent=!0),(i||s||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!e.empty)for(let t of this.state.facet(wi))t(e)}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new ls(t),this.plugins=t.facet(Ti).map((t=>new Li(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView=new sn(this),this.inputState.ensureHandlers(this),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Ti),i=t.state.facet(Ti);if(e!=i){let n=[];for(let s of i){let i=e.indexOf(s);if(i<0)n.push(new Li(s));else{let e=this.plugins[i];e.mustUpdate=t,n.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=n,this.pluginMap.clear(),this.inputState.ensureHandlers(this)}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,t&&this.observer.flush();let e=null;try{for(let t=0;;t++){this.updateState=1;let i=this.viewport,n=this.viewState.measure(this);if(!n&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&n||([this.measureRequests,s]=[s,this.measureRequests]);let r=s.map((t=>{try{return t.read(this)}catch(t){return Ai(this.state,t),Bs}})),o=new Hi(this,this.state),l=!1,h=!1;o.flags|=n,e?e.flags|=n:e=o,this.updateState=2,o.empty||(this.updatePlugins(o),this.inputState.update(o),this.updateAttrs(),l=this.docView.update(o));for(let t=0;t{Ze(this.contentDOM,this.contentAttrs,e),Ze(this.dom,this.editorAttrs,t)})),this.editorAttrs=t,this.contentAttrs=e}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(Rs.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Ii),Rt.mount(this.root,this.styleModules.concat(As).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame((()=>this.measure()))),t){if(null!=t.key)for(let e=0;ee.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}blockAtHeight(t,e){let i=Ls(e,this);return this.elementAtHeight(t-i).moveY(i)}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}visualLineAtHeight(t,e){let i=Ls(e,this);return this.lineBlockAtHeight(t-i).moveY(i)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}viewportLines(t,e){let i=Ls(e,this);for(let e of this.viewportLineBlocks)t(e.moveY(i))}get viewportLineBlocks(){return this.viewState.viewportLines}visualLineAt(t,e=0){return this.lineBlockAt(t).moveY(e+this.viewState.paddingTop)}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return bn(this,t,yn(this,t,e,i))}moveByGroup(t,e){return bn(this,t,yn(this,t,e,(e=>function(t,e,i){let n=t.state.charCategorizer(e),s=n(i);return t=>{let e=n(t);return s==xt.Space&&(s=e),s==e}}(this,t.head,e))))}moveToLineBoundary(t,e,i=!0){return function(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=n&&t.lineWrapping?t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),n=t.posAtCoords({x:i==(t.textDirection==Wi.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=n)return B.cursor(n,i?-1:1)}let o=hi.find(t.docView,e.head),l=o?i?o.posAtEnd:o.posAtStart:i?s.to:s.from;return B.cursor(l,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return bn(this,t,function(t,e,i,n){let s=e.head,r=i?1:-1;if(s==(i?t.state.doc.length:0))return B.cursor(s,e.assoc);let o,l=e.goalColumn,h=t.contentDOM.getBoundingClientRect(),a=t.coordsAtPos(s),c=t.documentTop;if(a)null==l&&(l=a.left-h.left),o=r<0?a.top:a.bottom;else{let e=t.viewState.lineBlockAt(s-c);null==l&&(l=Math.min(h.right-h.left,t.defaultCharacterWidth*(s-e.from))),o=(r<0?e.top:e.bottom)+c}let u=h.left+l,f=null!=n?n:t.defaultLineHeight>>1;for(let i=0;;i+=10){let n=o+(f+i)*r,a=vn(t,{x:u,y:n},!1,r);if(nh.bottom||(r<0?as))return B.cursor(a,e.assoc,void 0,l)}}(this,t,e,i))}scrollPosIntoView(t){this.dispatch({effects:bi.of(B.cursor(t))})}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),vn(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let i=this.docView.coordsAt(t,e);if(!i||i.left==i.right)return i;let n=this.state.doc.lineAt(t),s=this.bidiSpans(n);return fe(i,s[Gi.find(s,t-n.from,-1,e)].dir==Wi.LTR==e>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.heightOracle.direction}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>Es)return Yi(t.length);let e=this.textDirection;for(let i of this.bidiCache)if(i.from==t.from&&i.dir==e)return i.order;let i=function(t,e){let i=t.length,n=e==zi?1:2,s=e==zi?2:1;if(!t||1==n&&!Ki.test(t))return Yi(i);for(let e=0,s=n,o=n;e=0;t-=3)if($i[t+1]==-r){let e=$i[t+2],i=2&e?n:4&e?1&e?s:n:0;i&&(Ji[l]=Ji[$i[t]]=i),h=t;break}}else{if(189==$i.length)break;$i[h++]=l,$i[h++]=e,$i[h++]=a}else if(2==(o=Ji[l])||1==o){let t=o==n;a=t?0:1;for(let e=h-3;e>=0;e-=3){let i=$i[e+2];if(2&i)break;if(t)$i[e+2]|=2;else{if(4&i)break;$i[e+2]|=4}}}for(let t=0;te;){let t=i,n=2!=Ji[--i];for(;i>e&&n==(2!=Ji[i-1]);)i--;o.push(new Gi(i,t,n?2:1))}else o.push(new Gi(e,t,0))}else for(let t=0;tDate.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{ve(this.contentDOM),this.docView.updateSelection()}))}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Si.of(new ki("number"==typeof t?B.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}static domEventHandlers(t){return Ri.define((()=>({})),{eventHandlers:t})}static theme(t,e){let i=Rt.newName(),n=[vs.of(i),Ii.of(Ss(`.${i}`,t))];return e&&e.dark&&n.push(ws.of(!0)),n}static baseTheme(t){return Y.lowest(Ii.of(Ss("."+ys,t,ks)))}}Rs.scrollTo=bi,Rs.centerOn=xi,Rs.styleModule=Ii,Rs.inputHandler=yi,Rs.exceptionSink=vi,Rs.updateListener=wi,Rs.editable=Ci,Rs.mouseSelectionStyle=gi,Rs.dragMovesSelection=mi,Rs.clickAddsSelectionRange=pi,Rs.decorations=Ni,Rs.darkTheme=ws,Rs.contentAttributes=Pi,Rs.editorAttributes=Bi,Rs.lineWrapping=Rs.contentAttributes.of({class:"cm-lineWrapping"}),Rs.announce=dt.define();const Es=4096;function Ls(t,e){return(null==t?e.contentDOM.getBoundingClientRect().top:t)+e.viewState.paddingTop}const Bs={};class Ps{constructor(t,e,i,n){this.from=t,this.to=e,this.dir=i,this.order=n}static update(t,e){if(e.empty)return t;let i=[],n=t.length?t[t.length-1].dir:Wi.LTR;for(let s=Math.max(0,t.length-10);s=0;s--){let e=n[s],r="function"==typeof e?e(t):e;r&&Xe(r,i)}return i}const Is=We.mac?"mac":We.windows?"win":We.linux?"linux":"key";function Vs(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const Hs=Rs.domEventHandlers({keydown:(t,e)=>_s(Fs(e.state),t,e,"editor")}),Ws=V.define({enables:Hs}),zs=new WeakMap;function Fs(t){let e=t.facet(Ws),i=zs.get(e);return i||zs.set(e,i=function(t,e=Is){let i=Object.create(null),n=Object.create(null),s=(t,e)=>{let i=n[t];if(null==i)n[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},r=(t,n,r,o)=>{let l=i[t]||(i[t]=Object.create(null)),h=n.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let n,s,r,o,l=i[i.length-1];"Space"==l&&(l=" ");for(let t=0;t{let n=qs={view:e,prefix:i,scope:t};return setTimeout((()=>{qs==n&&(qs=null)}),4e3),!0}]})}let a=h.join(" ");s(a,!1);let c=l[a]||(l[a]={preventDefault:!1,commands:[]});c.commands.push(r),o&&(c.preventDefault=!0)};for(let i of t){let t=i[e]||i.key;if(t)for(let e of i.scope?i.scope.split(" "):["editor"])r(e,t,i.run,i.preventDefault),i.shift&&r(e,"Shift-"+t,i.shift,i.preventDefault)}return i}(e.reduce(((t,e)=>t.concat(e)),[]))),i}let qs=null;function _s(t,e,i,n){let s=function(t){var e=!(te&&(t.ctrlKey||t.altKey||t.metaKey)||Zt&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Yt:Jt)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),r=1==s.length&&" "!=s,o="",l=!1;qs&&qs.view==i&&qs.scope==n&&(o=qs.prefix+" ",(l=Sn.indexOf(e.keyCode)<0)&&(qs=null));let h,a=t=>{if(t){for(let e of t.commands)if(e(i))return!0;t.preventDefault&&(l=!0)}return!1},c=t[n];if(c){if(a(c[o+Vs(s,e,!r)]))return!0;if(r&&(e.shiftKey||e.altKey||e.metaKey)&&(h=Jt[e.keyCode])&&h!=s){if(a(c[o+Vs(h,e,!0)]))return!0}else if(r&&e.shiftKey&&a(c[o+Vs(s,e,!0)]))return!0}return l}const js=!We.ios,Us=V.define({combine:t=>Mt(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function $s(t={}){return[Us.of(t),Gs,Ys]}class Ks{constructor(t,e,i,n,s){this.left=t,this.top=e,this.width=i,this.height=n,this.className=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width>=0&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}}const Gs=Ri.fromClass(class{constructor(t){this.view=t,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=t.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=t.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),t.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){this.cursorLayer.style.animationDuration=this.view.state.facet(Us).cursorBlinkRate+"ms"}update(t){let e=t.startState.facet(Us)!=t.state.facet(Us);(e||t.selectionSet||t.geometryChanged||t.viewportChanged)&&this.view.requestMeasure(this.measureReq),t.transactions.some((t=>t.scrollIntoView))&&(this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}readPos(){let{state:t}=this.view,e=t.facet(Us),i=t.selection.ranges.map((t=>t.empty?[]:function(t,e){if(e.to<=t.viewport.from||e.from>=t.viewport.to)return[];let i=Math.max(e.from,t.viewport.from),n=Math.min(e.to,t.viewport.to),s=t.textDirection==Wi.LTR,r=t.contentDOM,o=r.getBoundingClientRect(),l=Xs(t),h=window.getComputedStyle(r.firstChild),a=o.left+parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)),c=o.right-parseInt(h.paddingRight),u=Zs(t,i),f=Zs(t,n),d=u.type==ei.Text?u:null,p=f.type==ei.Text?f:null;t.lineWrapping&&(d&&(d=Qs(t,i,d)),p&&(p=Qs(t,n,p)));if(d&&p&&d.from==p.from)return g(v(e.from,e.to,d));{let i=d?v(e.from,null,d):w(u,!1),n=p?v(null,e.to,p):w(f,!0),s=[];return(d||u).to<(p||f).from-1?s.push(m(a,i.bottom,c,n.top)):i.bottomu&&n.from=r)break;l>s&&h(Math.max(t,s),null==e&&t<=u,Math.min(l,r),null==i&&l>=f,o.dir)}if(s=n.to+1,s>=r)break}return 0==l.length&&h(u,null==e,f,null==i,t.textDirection),{top:r,bottom:o,horizontal:l}}function w(t,e){let i=o.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(this.view,t))).reduce(((t,e)=>t.concat(e))),n=[];for(let i of t.selection.ranges){let s=i==t.selection.main;if(i.empty?!s||js:e.drawRangeCursor){let t=tr(this.view,i,s);t&&n.push(t)}}return{rangePieces:i,cursors:n}}drawSel({rangePieces:t,cursors:e}){if(t.length!=this.rangePieces.length||t.some(((t,e)=>!t.eq(this.rangePieces[e])))){this.selectionLayer.textContent="";for(let e of t)this.selectionLayer.appendChild(e.draw());this.rangePieces=t}if(e.length!=this.cursors.length||e.some(((t,e)=>!t.eq(this.cursors[e])))){let t=this.cursorLayer.children;if(t.length!==e.length){this.cursorLayer.textContent="";for(const t of e)this.cursorLayer.appendChild(t.draw())}else e.forEach(((e,i)=>e.adjust(t[i])));this.cursors=e}}destroy(){this.selectionLayer.remove(),this.cursorLayer.remove()}}),Js={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};js&&(Js[".cm-line"].caretColor="transparent !important");const Ys=Y.highest(Rs.theme(Js));function Xs(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Wi.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function Qs(t,e,i){let n=B.cursor(e);return{from:Math.max(i.from,t.moveToLineBoundary(n,!1,!0).from),to:Math.min(i.to,t.moveToLineBoundary(n,!0,!0).from),type:ei.Text}}function Zs(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let t of i.type)if(t.to>e||t.to==e&&(t.to==i.to||t.type==ei.Text))return t;return i}function tr(t,e,i){let n=t.coordsAtPos(e.head,e.assoc||1);if(!n)return null;let s=Xs(t);return new Ks(n.left-s.left,n.top-s.top,-1,n.bottom-n.top,i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}function er(){return nr}const ir=ii.line({class:"cm-activeLine"}),nr=Ri.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let n of t.state.selection.ranges){if(!n.empty)return ii.none;let s=t.lineBlockAt(n.head);s.from>e&&(i.push(ir.range(s.from)),e=s.from)}return ii.set(i)}},{decorations:t=>t.decorations}),sr=1024;let rr=0;class or{constructor(t,e){this.from=t,this.to=e}}class lr{constructor(t={}){this.id=rr++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=ar.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}lr.closedBy=new lr({deserialize:t=>t.split(" ")}),lr.openedBy=new lr({deserialize:t=>t.split(" ")}),lr.group=new lr({deserialize:t=>t.split(" ")}),lr.contextHash=new lr({perNode:!0}),lr.lookAhead=new lr({perNode:!0}),lr.mounted=new lr({perNode:!0});const hr=Object.create(null);class ar{constructor(t,e,i,n=0){this.name=t,this.props=e,this.id=i,this.flags=n}static define(t){let e=t.props&&t.props.length?Object.create(null):hr,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),n=new ar(t.name||"",e,t.id,i);if(t.props)for(let i of t.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[i[0].id]=i[1]}return n}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(lr.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let n of i.split(" "))e[n]=t[i];return t=>{for(let i=t.prop(lr.group),n=-1;n<(i?i.length:0);n++){let s=e[n<0?t.name:i[n]];if(s)return s}}}}ar.none=new ar("",Object.create(null),0,8);class cr{constructor(t){this.types=t;for(let e=0;et.node;;){let o=!1;if(t.from<=s&&t.to>=n&&(t.type.isAnonymous||!1!==e(t.type,t.from,t.to,r))){if(t.firstChild())continue;t.type.isAnonymous||(o=!0)}for(;o&&i&&i(t.type,t.from,t.to,r),o=t.type.isAnonymous,!t.nextSibling();){if(!t.parent())return;o=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:Dr(ar.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,i)=>new dr(this.type,t,e,i,this.propValues)),t.makeTree||((t,e,i)=>new dr(ar.none,t,e,i)))}static build(t){return function(t){var e;let{buffer:i,nodeSet:n,maxBufferLength:s=sr,reused:r=[],minRepeatType:o=n.types.length}=t,l=Array.isArray(i)?new pr(i,i.length):i,h=n.types,a=0,c=0;function u(t,e,i,v,w){let{id:y,start:b,end:x,size:k}=l,S=c;for(;k<0;){if(l.next(),-1==k){let e=r[y];return i.push(e),void v.push(b-t)}if(-3==k)return void(a=y);if(-4==k)return void(c=y);throw new RangeError(`Unrecognized record size: ${k}`)}let A,C,M=h[y],D=b-t;if(x-b<=s&&(C=m(l.pos-e,w))){let e=new Uint16Array(C.size-C.skip),i=l.pos-C.size,s=e.length;for(;l.pos>i;)s=g(C.start,e,s);A=new mr(e,x-C.start,n),D=C.start-t}else{let t=l.pos-k;l.next();let e=[],i=[],n=y>=o?y:-1,r=0,h=x;for(;l.pos>t;)n>=0&&l.id==n&&l.size>=0?(l.end<=h-s&&(d(e,i,b,r,l.end,h,n,S),r=e.length,h=l.end),l.next()):u(b,t,e,i,n);if(n>=0&&r>0&&r-1&&r>0){let t=f(M);A=Dr(M,e,i,0,e.length,0,x-b,t,t)}else A=p(M,e,i,x-b,S-x)}i.push(A),v.push(D)}function f(t){return(e,i,n)=>{let s,r,o=0,l=e.length-1;if(l>=0&&(s=e[l])instanceof dr){if(!l&&s.type==t&&s.length==n)return s;(r=s.prop(lr.lookAhead))&&(o=i[l]+s.length+r)}return p(t,e,i,n,o)}}function d(t,e,i,s,r,o,l,h){let a=[],c=[];for(;t.length>s;)a.push(t.pop()),c.push(e.pop()+i-r);t.push(p(n.types[l],a,c,o-r,h-o)),e.push(r-i)}function p(t,e,i,n,s=0,r){if(a){let t=[lr.contextHash,a];r=r?[t].concat(r):[t]}if(s>25){let t=[lr.lookAhead,s];r=r?[t].concat(r):[t]}return new dr(t,e,i,n,r)}function m(t,e){let i=l.fork(),n=0,r=0,h=0,a=i.end-s,c={size:0,start:0,skip:0};t:for(let s=i.pos-t;i.pos>s;){let t=i.size;if(i.id==e&&t>=0){c.size=n,c.start=r,c.skip=h,h+=4,n+=4,i.next();continue}let l=i.pos-t;if(t<0||l=o?4:0,f=i.start;for(i.next();i.pos>l;){if(i.size<0){if(-3!=i.size)break t;u+=4}else i.id>=o&&(u+=4);i.next()}r=f,n+=t,h+=u}return(e<0||n==t)&&(c.size=n,c.start=r,c.skip=h),c.size>4?c:void 0}function g(t,e,i){let{id:n,start:s,end:r,size:h}=l;if(l.next(),h>=0&&n4){let n=l.pos-(h-4);for(;l.pos>n;)i=g(t,e,i)}e[--i]=o,e[--i]=r-t,e[--i]=s-t,e[--i]=n}else-3==h?a=n:-4==h&&(c=n);return i}let v=[],w=[];for(;l.pos>0;)u(t.start||0,t.bufferStart||0,v,w,-1);let y=null!==(e=t.length)&&void 0!==e?e:v.length?w[0]+v[0].length:0;return new dr(h[t.topID],v.reverse(),w.reverse(),y)}(t)}}dr.empty=new dr(ar.none,[],[],0);class pr{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new pr(this.buffer,this.index)}}class mr{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return ar.none}toString(){let t=[];for(let e=0;e0));l=r[l+3]);return o}slice(t,e,i,n){let s=this.buffer,r=new Uint16Array(e-t);for(let n=t,o=0;n=e&&ie;case 1:return i<=e&&n>e;case 2:return n>e;case 4:return!0}}function vr(t,e){let i=t.childBefore(e);for(;i;){let e=i.lastChild;if(!e||e.to!=i.to)break;e.type.isError&&e.from==e.to?(t=i,i=e.prevSibling):i=e}return t}function wr(t,e,i,n){for(var s;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to0?o.length:-1;t!=h;t+=e){let h=o[t],a=l[t]+r._from;if(gr(n,i,a,a+h.length))if(h instanceof mr){if(2&s)continue;let o=h.findChild(0,h.buffer.length,e,i-a,n);if(o>-1)return new kr(new xr(r,h,t,a),null,o)}else if(1&s||!h.type.isAnonymous||Ar(h)){let o;if(!(1&s)&&h.props&&(o=h.prop(lr.mounted))&&!o.overlay)return new yr(o.tree,a,t,r);let l=new yr(h,a,t,r);return 1&s||!l.type.isAnonymous?l:l.nextChild(e<0?h.children.length-1:0,e,i,n)}}if(1&s||!r.type.isAnonymous)return null;if(t=r.index>=0?r.index+e:e<0?-1:r._parent.node.children.length,r=r._parent,!r)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this.node.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this.node.children.length-1,-1,t,-2)}enter(t,e,i=!0,n=!0){let s;if(i&&(s=this.node.prop(lr.mounted))&&s.overlay){let i=t-this.from;for(let{from:t,to:n}of s.overlay)if((e>0?t<=i:t=i:n>i))return new yr(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,n?0:2)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get cursor(){return new Sr(this)}get tree(){return this.node}toTree(){return this.node}resolve(t,e=0){return wr(this,t,e,!1)}resolveInner(t,e=0){return wr(this,t,e,!0)}enterUnfinishedNodesBefore(t){return vr(this,t)}getChild(t,e=null,i=null){let n=br(this,t,e,i);return n.length?n[0]:null}getChildren(t,e=null,i=null){return br(this,t,e,i)}toString(){return this.node.toString()}}function br(t,e,i,n){let s=t.cursor,r=[];if(!s.firstChild())return r;if(null!=i)for(;!s.type.is(i);)if(!s.nextSibling())return r;for(;;){if(null!=n&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return null==n?r:[]}}class xr{constructor(t,e,i,n){this.parent=t,this.buffer=e,this.index=i,this.start=n}}class kr{constructor(t,e,i){this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}child(t,e,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.context.start,i);return s<0?null:new kr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,i,n=!0){if(!n)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return r<0?null:new kr(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new kr(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new kr(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get cursor(){return new Sr(this)}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let r=i.buffer[this.index+1],o=i.buffer[this.index+2];t.push(i.slice(n,s,r,o)),e.push(0)}return new dr(this.type,t,e,this.to-this.from)}resolve(t,e=0){return wr(this,t,e,!1)}resolveInner(t,e=0){return wr(this,t,e,!0)}enterUnfinishedNodesBefore(t){return vr(this,t)}toString(){return this.context.buffer.childString(this.index)}getChild(t,e=null,i=null){let n=br(this,t,e,i);return n.length?n[0]:null}getChildren(t,e=null,i=null){return br(this,t,e,i)}}class Sr{constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof yr)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}get name(){return this.type.name}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:i,buffer:n}=this.buffer;return this.type=e||n.set.types[n.buffer[t]],this.from=i+n.buffer[t+1],this.to=i+n.buffer[t+2],!0}yield(t){return!!t&&(t instanceof yr?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree.node.children.length-1:0,t,e,i,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.buffer.start,i);return!(s<0)&&(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=!0,n=!0){return this.buffer?!!n&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i&&!(1&this.mode),n))}parent(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let t=i<0?0:this.stack[i]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(t)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:n}=this;if(n){if(t>0){if(this.index-1)for(let n=e+t,s=t<0?-1:i.node.children.length;n!=s;n+=t){let t=i.node.children[n];if(1&this.mode||t instanceof mr||!t.type.isAnonymous||Ar(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let r=t;r;r=r._parent)if(r.index==n){if(n==this.index)return r;e=r,i=s+1;break t}n=this.stack[--s]}for(let t=i;tt instanceof mr||!t.type.isAnonymous||Ar(t)))}const Cr=new WeakMap;function Mr(t,e){if(!t.isAnonymous||e instanceof mr||e.type!=t)return 1;let i=Cr.get(e);if(null==i){i=1;for(let n of e.children){if(n.type!=t||!(n instanceof dr)){i=1;break}i+=Mr(t,n)}Cr.set(e,i)}return i}function Dr(t,e,i,n,s,r,o,l,h){let a=0;for(let i=n;i=c)break;p+=e}if(a==s+1){if(p>c){let t=i[s];e(t.children,t.positions,0,t.children.length,n[s]+l);continue}u.push(i[s])}else{let e=n[a-1]+i[a-1].length-d;u.push(Dr(t,i,n,s,a,d,e,null,h))}f.push(d+l-r)}}(e,i,n,s,0),(l||h)(u,f,o)}class Or{constructor(t,e,i,n,s=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=n,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let n=[new Or(0,t.length,t,0,!1,i)];for(let i of e)i.to>t.length&&n.push(i);return n}static applyChanges(t,e,i=128){if(!e.length)return t;let n=[],s=1,r=t.length?t[0]:null;for(let o=0,l=0,h=0;;o++){let a=o=i)for(;r&&r.from=e.from||c<=e.to||h){let t=Math.max(e.from,l)-h,i=Math.min(e.to,c)-h;e=t>=i?null:new Or(t,i,e.tree,e.offset+h,o>0,!!a)}if(e&&n.push(e),r.to>c)break;r=snew or(t.from,t.to))):[new or(0,0)]:[new or(0,t.length)],this.createParse(t,e||[],i)}parse(t,e,i){let n=this.startParse(t,e,i);for(;;){let t=n.advance();if(t)return t}}}class Rr{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}var Er;new lr({perNode:!0});const Lr=new lr;class Br{constructor(t,e,i,n=[]){this.data=t,this.topNode=i,Ct.prototype.hasOwnProperty("tree")||Object.defineProperty(Ct.prototype,"tree",{get(){return Nr(this)}}),this.parser=e,this.extension=[jr.of(this),Ct.languageData.of(((t,e,i)=>t.facet(Pr(t,e,i))))].concat(n)}isActiveAt(t,e,i=-1){return Pr(t,e,i)==this.data}findRegions(t){let e=t.facet(jr);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],n=(t,e)=>{if(t.prop(Lr)==this.data)return void i.push({from:e,to:e+t.length});let s=t.prop(lr.mounted);if(s){if(s.tree.prop(Lr)==this.data){if(s.overlay)for(let t of s.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(s.overlay){let t=i.length;if(n(s.tree,s.overlay[0].from+e),i.length>t)return}}for(let i=0;i=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let Vr=null;class Hr{constructor(t,e,i=[],n,s,r,o,l){this.parser=t,this.state=e,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}startParse(){return this.parser.startParse(new Ir(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=dr.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(Or.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=Vr;Vr=this;try{return t()}finally{Vr=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Wr(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:n,treeLen:s,viewport:r,skipped:o}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,n,s)=>e.push({fromA:t,toA:i,fromB:n,toB:s}))),i=Or.applyChanges(i,e),n=dr.empty,s=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){o=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);it.from&&(this.fragments=Wr(this.fragments,i,n),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends Tr{createParse(e,i,n){let s=n[0].from,r=n[n.length-1].to;return{parsedPos:s,advance(){let e=Vr;if(e){for(let t of n)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new dr(ar.none,[],[],r-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return Vr}}function Wr(t,e,i){return Or.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class zr{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new zr(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=new Hr(t.facet(jr).parser,t,[],dr.empty,0,{from:0,to:e},[],null);return i.work(20,e)||i.takeTree(),new zr(i)}}Br.state=_.define({create:zr.init,update(t,e){for(let t of e.effects)if(t.is(Br.setState))return t.value;return e.startState.facet(jr)!=e.state.facet(jr)?zr.init(e.state):t.apply(e)}});let Fr=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(Fr=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const qr="undefined"!=typeof navigator&&(null===(Er=navigator.scheduling)||void 0===Er?void 0:Er.isInputPending)?()=>navigator.scheduling.isInputPending():null,_r=Ri.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(Br.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(Br.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=Fr(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndn+1e3,l=s.context.work((()=>qr&&qr()||Date.now()>r),n+(o?0:1e5));this.chunkBudget-=Date.now()-e,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Br.setState.of(new zr(s.context))})),this.chunkBudget>0&&(!l||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>Ai(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),jr=V.define({combine:t=>t.length?t[0]:null,enables:[Br.state,_r]}),Ur=V.define(),$r=V.define({combine:t=>{if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function Kr(t){let e=t.facet($r);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Gr(t,e){let i="",n=t.tabSize;if(9==t.facet($r).charCodeAt(0))for(;e>=n;)i+="\t",e-=n;for(let t=0;t=i.from&&n<=i.to?s&&n==t?{text:"",from:t}:(e<0?n-1&&(s+=r-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,e=t.length){return u(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:n}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(n);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Xr=new lr;function Qr(t){let e=t.type.prop(Xr);if(e)return e;let i,n=t.firstChild;if(n&&(i=n.type.prop(lr.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>function(t,e,i,n,s){let r=t.textAfter,o=r.match(/^\s*/)[0].length,l=n&&r.slice(o,o+n.length)==n||s==t.pos+o,h=e?function(t){let e=t.node,i=e.childAfter(e.from),n=e.lastChild;if(!i)return null;let s=t.options.simulateBreak,r=t.state.doc.lineAt(i.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let t=i.to;;){let s=e.childAfter(t);if(!s||s==n)return null;if(!s.type.isSkipped)return s.from-1&&n%2==(e<0?1:0))return[i[n+e]]}return null}function so(t,e,i,n={}){let s=n.maxScanDistance||1e4,r=n.brackets||"()[]{}",o=Nr(t),l=o.resolveInner(e,i);for(let n=l;n;n=n.parent){let s=no(n.type,i,r);if(s&&n.from0)return null;let a={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),u=0;for(let t=0;!c.next().done&&t<=r;){let r=c.value;i<0&&(t+=r.length);let l=e+t*i;for(let t=i>0?0:r.length-1,e=i>0?r.length:-1;t!=e;t+=i){let e=o.indexOf(r[t]);if(!(e<0||n.resolve(l+t,1).type!=s))if(e%2==0==i>0)u++;else{if(1==u)return{start:a,end:{from:l+t,to:l+t+1},matched:e>>1==h>>1};u--}}i>0&&(t+=r.length)}return c.done?{start:a,matched:!1}:null}(t,e,i,o,l.type,s,r)}function ro(t,e,i,n,s,r){let o=n.parent,l={from:n.from,to:n.to},h=0,a=null==o?void 0:o.cursor;if(a&&(i<0?a.childBefore(n.from):a.childAfter(n.to)))do{if(i<0?a.to<=n.from:a.from>=n.to){if(0==h&&s.indexOf(a.type.name)>-1&&a.fromi.empty?t.moveByChar(i,e):ao(i,e)))}const uo=t=>co(t,t.textDirection!=Wi.LTR),fo=t=>co(t,t.textDirection==Wi.LTR);function po(t,e){return ho(t,(i=>i.empty?t.moveByGroup(i,e):ao(i,e)))}function mo(t,e,i){if(e.type.prop(i))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function go(t,e,i){let n,s,r=Nr(t).resolveInner(e.head),o=i?lr.closedBy:lr.openedBy;for(let n=e.head;;){let e=i?r.childAfter(n):r.childBefore(n);if(!e)break;mo(t,e,o)?r=e:n=i?e.to:e.from}return s=r.type.prop(o)&&(n=i?so(t,r.from,1):so(t,r.to,-1))&&n.matched?i?n.end.to:n.end.from:i?r.to:r.from,B.cursor(s,i?-1:1)}function vo(t,e){return ho(t,(i=>{if(!i.empty)return ao(i,e);let n=t.moveVertically(i,e);return n.head!=i.head?n:t.moveToLineBoundary(i,e)}))}const wo=t=>vo(t,!1),yo=t=>vo(t,!0);function bo(t,e){let{state:i}=t,n=oo(i.selection,(i=>i.empty?t.moveVertically(i,e,t.dom.clientHeight):ao(i,e)));if(n.eq(i.selection))return!1;let s=t.coordsAtPos(i.selection.main.head),r=t.scrollDOM.getBoundingClientRect();return t.dispatch(lo(i,n),{effects:s&&s.top>r.top&&s.bottombo(t,!1),ko=t=>bo(t,!0);function So(t,e,i){let n=t.lineBlockAt(e.head),s=t.moveToLineBoundary(e,i);if(s.head==e.head&&s.head!=(i?n.to:n.from)&&(s=t.moveToLineBoundary(e,i,!1)),!i&&s.head==n.from&&n.length){let i=/^\s*/.exec(t.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&e.head!=n.from+i&&(s=B.cursor(n.from+i))}return s}const Ao=t=>ho(t,(e=>So(t,e,!0))),Co=t=>ho(t,(e=>So(t,e,!1)));function Mo(t,e){let i=oo(t.state.selection,(t=>{let i=e(t);return B.range(t.anchor,i.head,i.goalColumn)}));return!i.eq(t.state.selection)&&(t.dispatch(lo(t.state,i)),!0)}function Do(t,e){return Mo(t,(i=>t.moveByChar(i,e)))}const Oo=t=>Do(t,t.textDirection!=Wi.LTR),To=t=>Do(t,t.textDirection==Wi.LTR);function Ro(t,e){return Mo(t,(i=>t.moveByGroup(i,e)))}function Eo(t,e){return Mo(t,(i=>t.moveVertically(i,e)))}const Lo=t=>Eo(t,!1),Bo=t=>Eo(t,!0);function Po(t,e){return Mo(t,(i=>t.moveVertically(i,e,t.dom.clientHeight)))}const No=t=>Po(t,!1),Io=t=>Po(t,!0),Vo=t=>Mo(t,(e=>So(t,e,!0))),Ho=t=>Mo(t,(e=>So(t,e,!1))),Wo=({state:t,dispatch:e})=>(e(lo(t,{anchor:0})),!0),zo=({state:t,dispatch:e})=>(e(lo(t,{anchor:t.doc.length})),!0),Fo=({state:t,dispatch:e})=>(e(lo(t,{anchor:t.selection.main.anchor,head:0})),!0),qo=({state:t,dispatch:e})=>(e(lo(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function _o({state:t,dispatch:e},i){if(t.readOnly)return!1;let n="delete.selection",s=t.changeByRange((t=>{let{from:e,to:s}=t;if(e==s){let t=i(e);te&&(n="delete.forward"),e=Math.min(e,t),s=Math.max(s,t)}return e==s?{range:t}:{changes:{from:e,to:s},range:B.cursor(e)}}));return!s.changes.empty&&(e(t.update(s,{scrollIntoView:!0,userEvent:n})),!0)}function jo(t,e,i){if(t instanceof Rs)for(let n of t.pluginField(Di.atomicRanges))n.between(e,e,((t,n)=>{te&&(e=i?n:t)}));return e}const Uo=(t,e)=>_o(t,(i=>{let s,r,{state:o}=t,l=o.doc.lineAt(i);if(!e&&i>l.from&&iUo(t,!1),Ko=t=>Uo(t,!0),Go=(t,e)=>_o(t,(i=>{let s=i,{state:r}=t,o=r.doc.lineAt(s),l=r.charCategorizer(s);for(let t=null;;){if(s==(e?o.to:o.from)){s==i&&o.number!=(e?r.doc.lines:1)&&(s+=e?1:-1);break}let h=n(o.text,s-o.from,e)+o.from,a=o.text.slice(Math.min(s,h)-o.from,Math.max(s,h)-o.from),c=l(a);if(null!=t&&c!=t)break;" "==a&&s==i||(t=c),s=h}return jo(t,s,e)})),Jo=t=>Go(t,!1),Yo=t=>_o(t,(e=>{let i=t.lineBlockAt(e).to;return jo(t,e=s.number){let t=e[e.length-1];t.to=r.to,t.ranges.push(n)}else e.push({from:s.from,to:r.to,ranges:[n]});i=r.number+1}return e}function Qo(t,e,i){if(t.readOnly)return!1;let n=[],s=[];for(let e of Xo(t)){if(i?e.to==t.doc.length:0==e.from)continue;let r=t.doc.lineAt(i?e.to+1:e.from-1),o=r.length+1;if(i){n.push({from:e.to,to:r.to},{from:e.from,insert:r.text+t.lineBreak});for(let i of e.ranges)s.push(B.range(Math.min(t.doc.length,i.anchor+o),Math.min(t.doc.length,i.head+o)))}else{n.push({from:r.from,to:e.from},{from:e.to,insert:t.lineBreak+r.text});for(let t of e.ranges)s.push(B.range(t.anchor-o,t.head-o))}}return!!n.length&&(e(t.update({changes:n,scrollIntoView:!0,selection:B.create(s,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Zo(t,e,i){if(t.readOnly)return!1;let n=[];for(let e of Xo(t))i?n.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):n.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const tl=el(!1);function el(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let n=e.changeByRange((i=>{let{from:n,to:s}=i,r=e.doc.lineAt(n),o=!t&&n==s&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,n=Nr(t).resolveInner(e),s=n.childBefore(e),r=n.childAfter(e);return s&&r&&s.to<=e&&r.from>=e&&(i=s.type.prop(lr.closedBy))&&i.indexOf(r.name)>-1&&t.doc.lineAt(s.to).from==t.doc.lineAt(r.from).from?{from:s.to,to:r.from}:null}(e,n);t&&(n=s=(s<=r.to?r:e.doc.lineAt(s)).to);let l=new Yr(e,{simulateBreak:n,simulateDoubleBreak:!!o}),h=Jr(l,n);for(null==h&&(h=/^\s*/.exec(e.doc.lineAt(n).text)[0].length);sr.from&&n{let s=[];for(let r=n.from;r<=n.to;){let o=t.doc.lineAt(r);o.number>i&&(n.empty||n.to>o.from)&&(e(o,s,n),i=o.number),r=o.to+1}let r=t.changes(s);return{changes:s,range:B.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}}))}const nl=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(il(t,((e,i)=>{i.push({from:e.from,insert:t.facet($r)})})),{userEvent:"input.indent"})),!0),sl=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(il(t,((e,i)=>{let n=/^\s*/.exec(e.text)[0];if(!n)return;let s=u(n,t.tabSize),r=0,o=Gr(t,Math.max(0,s-Kr(t)));for(;rho(t,(e=>go(t.state,e,t.textDirection!=Wi.LTR))),shift:t=>Mo(t,(e=>go(t.state,e,t.textDirection!=Wi.LTR)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>ho(t,(e=>go(t.state,e,t.textDirection==Wi.LTR))),shift:t=>Mo(t,(e=>go(t.state,e,t.textDirection==Wi.LTR)))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Qo(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>Zo(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Qo(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>Zo(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,n=null;return i.ranges.length>1?n=B.create([i.main]):i.main.empty||(n=B.create([B.cursor(i.main.head)])),!!n&&(e(lo(t,n)),!0)}},{key:"Mod-Enter",run:el(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=Xo(t).map((({from:e,to:i})=>B.range(e,Math.min(i+1,t.doc.length))));return e(t.update({selection:B.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=oo(t.selection,(e=>{var i;let n=Nr(t).resolveInner(e.head,1);for(;!(n.from=e.to||n.to>e.to&&n.from<=e.from)&&(null===(i=n.parent)||void 0===i?void 0:i.parent);)n=n.parent;return B.range(n.to,n.from)}));return e(lo(t,i)),!0},preventDefault:!0},{key:"Mod-[",run:sl},{key:"Mod-]",run:nl},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),n=new Yr(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),s=il(t,((e,s,r)=>{let o=Jr(n,e.from);if(null==o)return;/\S/.test(e.text)||(o=0);let l=/^\s*/.exec(e.text)[0],h=Gr(t,o);(l!=h||r.from{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(Xo(e).map((({from:t,to:i})=>(t>0?t--:it.moveVertically(e,!0))).map(i);return t.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,i){let n=!1,s=oo(t.selection,(e=>{let s=so(t,e.head,-1)||so(t,e.head,1)||e.head>0&&so(t,e.head-1,1)||e.headpo(t,t.textDirection!=Wi.LTR),shift:t=>Ro(t,t.textDirection!=Wi.LTR)},{mac:"Cmd-ArrowLeft",run:Co,shift:Ho},{key:"ArrowRight",run:fo,shift:To,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>po(t,t.textDirection==Wi.LTR),shift:t=>Ro(t,t.textDirection==Wi.LTR)},{mac:"Cmd-ArrowRight",run:Ao,shift:Vo},{key:"ArrowUp",run:wo,shift:Lo,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Wo,shift:Fo},{mac:"Ctrl-ArrowUp",run:xo,shift:No},{key:"ArrowDown",run:yo,shift:Bo,preventDefault:!0},{mac:"Cmd-ArrowDown",run:zo,shift:qo},{mac:"Ctrl-ArrowDown",run:ko,shift:Io},{key:"PageUp",run:xo,shift:No},{key:"PageDown",run:ko,shift:Io},{key:"Home",run:Co,shift:Ho},{key:"Mod-Home",run:Wo,shift:Fo},{key:"End",run:Ao,shift:Vo},{key:"Mod-End",run:zo,shift:qo},{key:"Enter",run:tl},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:$o,shift:$o},{key:"Delete",run:Ko},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Jo},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Go(t,!0)},{mac:"Mod-Backspace",run:t=>_o(t,(e=>{let i=t.lineBlockAt(e).from;return jo(t,e>i?i:Math.max(0,e-1),!1)}))},{mac:"Mod-Delete",run:Yo}].concat([{key:"Ctrl-b",run:uo,shift:Oo,preventDefault:!0},{key:"Ctrl-f",run:fo,shift:To},{key:"Ctrl-p",run:wo,shift:Lo},{key:"Ctrl-n",run:yo,shift:Bo},{key:"Ctrl-a",run:t=>ho(t,(e=>B.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>Mo(t,(e=>B.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>ho(t,(e=>B.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>Mo(t,(e=>B.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:Ko},{key:"Ctrl-h",run:$o},{key:"Ctrl-k",run:Yo},{key:"Ctrl-Alt-h",run:Jo},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:d.of(["",""])},range:B.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,s=t.doc.lineAt(i),r=i==s.from?i-1:n(s.text,i-s.from,!1)+s.from,o=i==s.to?i+1:n(s.text,i-s.from,!0)+s.from;return{changes:{from:r,to:o,insert:t.doc.slice(i,o).append(t.doc.slice(r,i))},range:B.cursor(o)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:ko}].map((t=>({mac:t.key,run:t.run,shift:t.shift})))));let ol=0;class ll{constructor(t,e,i){this.set=t,this.base=e,this.modified=i,this.id=ol++}static define(t){if(null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let e=new ll([],null,[]);if(e.set.push(e),t)for(let i of t.set)e.set.push(i);return e}static defineModifier(){let t=new al;return e=>e.modified.indexOf(t)>-1?e:al.get(e.base||e,e.modified.concat(t).sort(((t,e)=>t.id-e.id)))}}let hl=0;class al{constructor(){this.instances=[],this.id=hl++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find((i=>{return i.base==t&&(n=e,s=i.modified,n.length==s.length&&n.every(((t,e)=>t==s[e])));var n,s}));if(i)return i;let n=[],s=new ll(n,t,e);for(let t of e)t.instances.push(s);let r=cl(e);for(let e of t.set)for(let t of r)n.push(al.get(e,t));return s}}function cl(t){let e=[t];for(let i=0;i0&&e+3==t.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!n)throw new RangeError("Invalid path: "+t);if(i.push("*"==n[0]?null:'"'==n[0][0]?JSON.parse(n[0]):n[0]),e+=n[0].length,e==t.length)break;let o=t[e++];if(e==t.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+t);r=t.slice(e)}let o=i.length-1,l=i[o];if(!l)throw new RangeError("Invalid path: "+t);let h=new gl(n,s,o>0?i.slice(0,o):null);e[l]=h.sort(e[l])}}return fl.add(e)}const fl=new lr,dl=V.define({combine:t=>t.length?vl.combinedMatch(t):null}),pl=V.define({combine:t=>t.length?t[0].match:null});function ml(t){return t.facet(dl)||t.facet(pl)}class gl{constructor(t,e,i,n){this.tags=t,this.mode=e,this.context=i,this.next=n}sort(t){return!t||t.deptht.facet(Rs.darkTheme)==("dark"==e.themeType)?[this]:[]))),this.fallback=s.concat(pl.of(this))}match(t,e){if(this.scope&&e!=this.scope)return null;for(let e of t.set){let i=this.map[e.id];if(void 0!==i)return e!=t&&(this.map[t.id]=i),i}return this.map[t.id]=this.all}static combinedMatch(t){if(1==t.length)return t[0].match;let e=t.some((t=>t.scope))?void 0:Object.create(null);return(i,n)=>{let s=e&&e[i.id];if(void 0!==s)return s;let r=null;for(let e of t){let t=e.match(i,n);t&&(r=r?r+" "+t:t)}return e&&(e[i.id]=r),r}}static define(t,e){return new vl(t,e||{})}static get(t,e,i){let n=ml(t);return n&&n(e,i||ar.none)}}class wl{constructor(t){this.markCache=Object.create(null),this.tree=Nr(t.state),this.decorations=this.buildDeco(t,ml(t.state))}update(t){let e=Nr(t.state),i=ml(t.state),n=i!=t.startState.facet(dl);e.length{i.add(t,e,this.markCache[n]||(this.markCache[n]=ii.mark({class:n})))}));return i.finish()}}const yl=Y.high(Ri.fromClass(wl,{decorations:t=>t.decorations})),bl=[""];class xl{constructor(t,e,i){this.at=t,this.style=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,n,s,r){let{type:o,from:l,to:h}=t;if(l>=i||h<=e)return;bl[s]=o.name,o.isTop&&(r=o);let a=n,c=o.prop(fl),u=!1;for(;c;){if(!c.context||Sl(c.context,bl,s)){for(let t of c.tags){let e=this.style(t,r);e&&(a&&(a+=" "),a+=e,1==c.mode?n+=(n?" ":"")+e:0==c.mode&&(u=!0))}break}c=c.next}if(this.startSpan(t.from,a),u)return;let f=t.tree&&t.tree.prop(lr.mounted);if(f&&f.overlay){let o=t.node.enter(f.overlay[0].from+l,1),c=t.firstChild();for(let u=0,d=l;;u++){let p=u=m)&&t.nextSibling()););if(!p||m>i)break;d=p.to+l,d>e&&(this.highlightRange(o.cursor,Math.max(e,p.from+l),Math.min(i,d),n,s,f.tree.type),this.startSpan(d,a))}c&&t.parent()}else if(t.firstChild()){do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,n,s+1,r),this.startSpan(Math.min(i,t.to),a)}}while(t.nextSibling());t.parent()}}}function kl(t,e,i,n,s){let r=new xl(e,n,s);r.highlightRange(t.cursor(),e,i,"",0,t.type),r.flush(i)}function Sl(t,e,i){if(t.length>i-1)return!1;for(let n=i-1,s=t.length-1;s>=0;s--,n--){let i=t[s];if(i&&i!=e[n])return!1}return!0}const Al=ll.define,Cl=Al(),Ml=Al(),Dl=Al(Ml),Ol=Al(Ml),Tl=Al(),Rl=Al(Tl),El=Al(Tl),Ll=Al(),Bl=Al(Ll),Pl=Al(),Nl=Al(),Il=Al(),Vl=Al(Il),Hl=Al(),Wl={comment:Cl,lineComment:Al(Cl),blockComment:Al(Cl),docComment:Al(Cl),name:Ml,variableName:Al(Ml),typeName:Dl,tagName:Al(Dl),propertyName:Ol,attributeName:Al(Ol),className:Al(Ml),labelName:Al(Ml),namespace:Al(Ml),macroName:Al(Ml),literal:Tl,string:Rl,docString:Al(Rl),character:Al(Rl),attributeValue:Al(Rl),number:El,integer:Al(El),float:Al(El),bool:Al(Tl),regexp:Al(Tl),escape:Al(Tl),color:Al(Tl),url:Al(Tl),keyword:Pl,self:Al(Pl),null:Al(Pl),atom:Al(Pl),unit:Al(Pl),modifier:Al(Pl),operatorKeyword:Al(Pl),controlKeyword:Al(Pl),definitionKeyword:Al(Pl),moduleKeyword:Al(Pl),operator:Nl,derefOperator:Al(Nl),arithmeticOperator:Al(Nl),logicOperator:Al(Nl),bitwiseOperator:Al(Nl),compareOperator:Al(Nl),updateOperator:Al(Nl),definitionOperator:Al(Nl),typeOperator:Al(Nl),controlOperator:Al(Nl),punctuation:Il,separator:Al(Il),bracket:Vl,angleBracket:Al(Vl),squareBracket:Al(Vl),paren:Al(Vl),brace:Al(Vl),content:Ll,heading:Bl,heading1:Al(Bl),heading2:Al(Bl),heading3:Al(Bl),heading4:Al(Bl),heading5:Al(Bl),heading6:Al(Bl),contentSeparator:Al(Ll),list:Al(Ll),quote:Al(Ll),emphasis:Al(Ll),strong:Al(Ll),link:Al(Ll),monospace:Al(Ll),strikethrough:Al(Ll),inserted:Al(),deleted:Al(),changed:Al(),invalid:Al(),meta:Hl,documentMeta:Al(Hl),annotation:Al(Hl),processingInstruction:Al(Hl),definition:ll.defineModifier(),constant:ll.defineModifier(),function:ll.defineModifier(),standard:ll.defineModifier(),local:ll.defineModifier(),special:ll.defineModifier()};Wl.link,Wl.heading,Wl.emphasis,Wl.strong,Wl.strikethrough,Wl.keyword,Wl.atom,Wl.bool,Wl.url,Wl.contentSeparator,Wl.labelName,Wl.literal,Wl.inserted,Wl.string,Wl.deleted,Wl.regexp,Wl.escape,Wl.string,Wl.variableName,Wl.variableName,Wl.typeName,Wl.namespace,Wl.className,Wl.variableName,Wl.macroName,Wl.propertyName,Wl.comment,Wl.meta,Wl.invalid,Wl.link,Wl.heading,Wl.emphasis,Wl.strong,Wl.keyword,Wl.atom,Wl.bool,Wl.url,Wl.labelName,Wl.inserted,Wl.deleted,Wl.literal,Wl.string,Wl.number,Wl.regexp,Wl.escape,Wl.string,Wl.variableName,Wl.variableName,Wl.variableName,Wl.variableName,Wl.propertyName,Wl.typeName,Wl.namespace,Wl.className,Wl.macroName,Wl.propertyName,Wl.operator,Wl.comment,Wl.meta,Wl.invalid,Wl.punctuation;var zl=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","plural"],Fl=/^[+\-*&%=<>!?|~^]/,ql=/^[:\[\(\{]/,_l=["true","false"],jl=/^(\d[+\-\*\/])?\d+(\.\d+)?/;function Ul(t,e){var i=t.peek();if(e.incomment)return t.skipTo("#}")?(t.eatWhile(/\#|}/),e.incomment=!1):t.skipToEnd(),"comment";if(e.intag){if(e.operator){if(e.operator=!1,t.match(_l))return"atom";if(t.match(jl))return"number"}if(e.sign){if(e.sign=!1,t.match(_l))return"atom";if(t.match(jl))return"number"}if(e.instring)return i==e.instring&&(e.instring=!1),t.next(),"string";if("'"==i||'"'==i)return e.instring=i,t.next(),"string";if(t.match(e.intag+"}")||t.eat("-")&&t.match(e.intag+"}"))return e.intag=!1,"tag";if(t.match(Fl))return e.operator=!0,"operator";if(t.match(ql))e.sign=!0;else if(t.eat(" ")||t.sol()){if(t.match(zl))return"keyword";if(t.match(_l))return"atom";if(t.match(jl))return"number";t.sol()&&t.next()}else t.next();return"variable"}if(t.eat("{")){if(t.eat("#"))return e.incomment=!0,t.skipTo("#}")?(t.eatWhile(/\#|}/),e.incomment=!1):t.skipToEnd(),"comment";if(i=t.eat(/\{|%/))return e.intag=i,"{"==i&&(e.intag="}"),t.eat("-"),"tag"}t.next()}zl=new RegExp("(("+zl.join(")|(")+"))\\b"),_l=new RegExp("(("+_l.join(")|(")+"))\\b");const $l={startState:function(){return{tokenize:Ul}},token:function(t,e){return e.tokenize(t,e)},languageData:{commentTokens:{block:{open:"{#",close:"#}"}}}};var Kl=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");const Gl={token:function(t,e){var i=t.peek(),n=e.escaped;if(e.escaped=!1,"#"==i&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==i?e.inlinePairs++:"}"==i?e.inlinePairs--:"["==i?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!n&&","==i)return t.next(),"meta";if(e.inlinePairs>0&&!n&&","==i)return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(0==e.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(Kl))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped="\\"==i,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};function Jl(t,e,i,n=0,s=0){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);let r=s;for(let s=n;s=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?t.toLowerCase():t;return n(this.string.substr(this.pos,t.length))==n(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function Xl(t){if("object"!=typeof t)return t;let e={};for(let i in t){let n=t[i];e[i]=n instanceof Array?n.slice():n}return e}class Ql extends Br{constructor(t){let e=(i=t.languageData,V.define({combine:i?t=>t.concat(i):void 0}));var i;let n,s={token:(r=t).token,blankLine:r.blankLine||(()=>{}),startState:r.startState||(()=>!0),copyState:r.copyState||Xl,indent:r.indent||(()=>null),languageData:r.languageData||{},tokenTable:r.tokenTable||nh};var r;super(e,new class extends Tr{createParse(t,e,i){return new eh(n,t,e,i)}},function(t){let e=ar.define({id:sh.length,name:"Document",props:[Lr.add((()=>t))]});return sh.push(e),e}(e),[Ur.of(((t,e)=>this.getIndent(t,e)))]),n=this,this.streamParser=s,this.stateAfter=new lr({perNode:!0}),this.tokenTable=t.tokenTable?new hh(s.tokenTable):ah}static define(t){return new Ql(t)}getIndent(t,e){let i=Nr(t.state),n=i.resolve(e);for(;n&&n.type!=this.topNode;)n=n.parent;if(!n)return null;let s,r,o=Zl(this,i,0,n.from,e);if(o?(r=o.state,s=o.pos+1):(r=this.streamParser.startState(t.unit),s=0),e-s>1e4)return null;for(;s=n&&i+e.length<=s&&e.prop(t.stateAfter);if(r)return{state:t.streamParser.copyState(r),pos:i+e.length};for(let r=e.children.length-1;r>=0;r--){let o=e.children[r],l=i+e.positions[r],h=o instanceof dr&&l=e.length)return e;s||e.type!=t.topNode||(s=!0);for(let r=e.children.length-1;r>=0;r--){let o,l=e.positions[r],h=e.children[r];if(li&&Zl(t,n.tree,0-n.offset,i,r);if(o&&(e=th(t,n.tree,i+n.offset,o.pos+n.offset,!1)))return{state:o.state,tree:e}}return{state:t.streamParser.startState(n?Kr(n):4),tree:dr.empty}}(t,i,r,null==s?void 0:s.state);this.state=o,this.parsedPos=this.chunkStart=r+l.length;for(let t=0;t=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let t=e.indexOf("\n");t>-1&&(e=e.slice(0,t))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),i=t+e.length;for(let t=this.rangeIndex;;){let n=this.ranges[t].to;if(n>=i)break;if(e=e.slice(0,n-(i-e.length)),t++,t==this.ranges.length)break;let s=this.ranges[t].from,r=this.lineAfter(s);e+=r,i=s+r.length}return{line:e,end:i}}skipGapsTo(t,e,i){for(;;){let n=this.ranges[this.rangeIndex].to,s=t+e;if(i>0?n>s:n>=s)break;e+=this.ranges[++this.rangeIndex].from-n}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){e+=s=this.skipGapsTo(e,s,1);let t=this.chunk.length;i+=s=this.skipGapsTo(i,s,-1),n+=this.chunk.length-t}return this.chunk.push(t,e,i,n),s}parseLine(t){let{line:e,end:i}=this.nextLine(),n=0,{streamParser:s}=this.lang,r=new Yl(e,t?t.state.tabSize:4,t?Kr(t.state):2);if(r.eol())s.blankLine(this.state,r.indentUnit);else for(;!r.eol();){let t=ih(s.token,r,this.state);if(t&&(n=this.emitToken(this.lang.tokenTable.resolve(t),this.parsedPos+r.start,this.parsedPos+r.pos,4,n)),r.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return n}throw new Error("Stream parser failed to advance stream.")}const nh=Object.create(null),sh=[ar.none],rh=new cr(sh),oh=[],lh=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","typeName"],["attribute","propertyName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])lh[t]=uh(nh,e);class hh{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),lh)}resolve(t){return t?this.table[t]||(this.table[t]=uh(this.extra,t)):0}}const ah=new hh(nh);function ch(t,e){oh.indexOf(t)>-1||(oh.push(t),console.warn(e))}function uh(t,e){let i=null;for(let n of e.split(".")){let e=t[n]||Wl[n];e?"function"==typeof e?i?i=e(i):ch(n,`Modifier ${n} used at start of tag`):i?ch(n,`Tag ${n} used as modifier`):i=e:ch(n,`Unknown highlighting tag ${n}`)}if(!i)return 0;let n=e.replace(/ /g,"_"),s=ar.define({id:sh.length,name:n,props:[ul({[n]:i})]});return sh.push(s),s.id}class fh extends Bt{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}fh.prototype.elementClass="",fh.prototype.toDOM=void 0,fh.prototype.mapMode=S.TrackBefore,fh.prototype.startSide=fh.prototype.endSide=-1,fh.prototype.point=!0;const dh=V.define(),ph=V.define(),mh=Rs.baseTheme({".cm-gutters":{display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#999",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"}}),gh=V.define({combine:t=>t.some((t=>t))});function vh(t){let e=[wh,mh];return t&&!1===t.fixed&&e.push(gh.of(!0)),e}const wh=Ri.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(ph).map((e=>new kh(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(gh),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,n=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(gh)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=Vt.iter(this.view.state.facet(dh),this.view.viewport.from),n=[],s=this.gutters.map((t=>new xh(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks){let e;if(Array.isArray(t.type)){for(let i of t.type)if(i.type==ei.Text){e=i;break}}else e=t.type==ei.Text?t:void 0;if(e){n.length&&(n=[]),bh(i,n,t.from);for(let t of s)t.line(this.view,e,n)}}for(let t of s)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(ph),i=t.state.facet(ph),n=t.docChanged||t.heightChanged||t.viewportChanged||!Vt.eq(t.startState.facet(dh),t.state.facet(dh),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(n=!0);else{n=!0;let s=[];for(let n of i){let i=e.indexOf(n);i<0?s.push(new kh(this.view,n)):(this.gutters[i].update(t),s.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),s.indexOf(t)<0&&t.destroy();for(let t of s)this.dom.appendChild(t.dom);this.gutters=s}return n}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:Di.scrollMargins.from((t=>0!=t.gutters.length&&t.fixed?t.view.textDirection==Wi.LTR?{left:t.dom.offsetWidth}:{right:t.dom.offsetWidth}:null))});function yh(t){return Array.isArray(t)?t:[t]}function bh(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class xh{constructor(t,e,i){this.gutter=t,this.height=i,this.localMarkers=[],this.i=0,this.cursor=Vt.iter(t.markers,e.from)}line(t,e,i){this.localMarkers.length&&(this.localMarkers=[]),bh(this.cursor,this.localMarkers,e.from);let n=i.length?this.localMarkers.concat(i):this.localMarkers,s=this.gutter.config.lineMarker(t,e,n);s&&n.unshift(s);let r=this.gutter;if(0==n.length&&!r.config.renderEmptyElements)return;let o=e.top-this.height;if(this.i==r.elements.length){let i=new Sh(t,e.height,o,n);r.elements.push(i),r.dom.appendChild(i.dom)}else r.elements[this.i].update(t,e.height,o,n);this.height=e.bottom,this.i++}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class kh{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(n=>{let s=t.lineBlockAtHeight(n.clientY-t.documentTop);e.domEventHandlers[i](t,s,n)&&n.preventDefault()}));this.markers=yh(e.markers(t)),e.initialSpacer&&(this.spacer=new Sh(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=yh(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!Vt.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class Sh{constructor(t,e,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.update(t,e,i,n)}update(t,e,i,n){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;iMt(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let n=i[t],s=e[t];i[t]=n?(t,e,i)=>n(t,e,i)||s(t,e,i):s}return i}})});class Mh extends fh{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Dh(t,e){return t.state.facet(Ch).formatNumber(e,t.state)}const Oh=ph.compute([Ch],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Ah),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new Mh(Dh(t,t.state.doc.lineAt(e.from).number)),lineMarkerChange:t=>t.startState.facet(Ch)!=t.state.facet(Ch),initialSpacer:t=>new Mh(Dh(t,Rh(t.state.doc.lines))),updateSpacer(t,e){let i=Dh(e.view,Rh(e.view.state.doc.lines));return i==t.number?t:new Mh(i)},domEventHandlers:t.facet(Ch).domEventHandlers})));function Th(t={}){return[Ch.of(t),vh(),Oh]}function Rh(t){let e=9;for(;eMt(t,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})});const Nh=_.define({create:()=>Xh.empty,update(t,e){let i=e.state.facet(Ph),n=e.annotation(Eh);if(n){let s=e.docChanged?B.single(function(t){let e=0;return t.iterChangedRanges(((t,i)=>e=i)),e}(e.changes)):void 0,r=qh.fromTransaction(e,s),o=n.side,l=0==o?t.undone:t.done;return l=r?_h(l,l.length,i.minDepth,r):$h(l,e.startState.selection),new Xh(0==o?n.rest:l,0==o?l:n.rest)}let s=e.annotation(Lh);if("full"!=s&&"before"!=s||(t=t.isolate()),!1===e.annotation(pt.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=qh.fromTransaction(e),o=e.annotation(pt.time),l=e.annotation(pt.userEvent);return r?t=t.addChanges(r,o,l,i.newGroupDelay,i.minDepth):e.selection&&(t=t.addSelection(e.startState.selection,o,l,i.newGroupDelay)),"full"!=s&&"after"!=s||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new Xh(t.done.map(qh.fromJSON),t.undone.map(qh.fromJSON))});function Ih(t={}){return[Nh,Ph.of(t),Rs.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?Hh:"historyRedo"==t.inputType?Wh:null;return!!i&&(t.preventDefault(),i(e))}})]}function Vh(t,e){return function({state:i,dispatch:n}){if(!e&&i.readOnly)return!1;let s=i.field(Nh,!1);if(!s)return!1;let r=s.pop(t,i,e);return!!r&&(n(r),!0)}}const Hh=Vh(0,!1),Wh=Vh(1,!1),zh=Vh(0,!0),Fh=Vh(1,!0);class qh{constructor(t,e,i,n,s){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new qh(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new qh(t.changes&&C.fromJSON(t.changes),[],t.mapped&&A.fromJSON(t.mapped),t.startSelection&&B.fromJSON(t.startSelection),t.selectionsAfter.map(B.fromJSON))}static fromTransaction(t,e){let i=Uh;for(let e of t.startState.facet(Bh)){let n=e(t);n.length&&(i=i.concat(n))}return!i.length&&t.changes.empty?null:new qh(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,Uh)}static selection(t){return new qh(void 0,Uh,void 0,void 0,t)}}function _h(t,e,i,n){let s=e+1>i+20?e-i-1:0,r=t.slice(s,e);return r.push(n),r}function jh(t,e){return t.length?e.length?t.concat(e):t:e}const Uh=[];function $h(t,e){if(t.length){let i=t[t.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),_h(t,t.length-1,1e9,i.setSelAfter(n)))}return[qh.selection([e])]}function Kh(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function Gh(t,e){if(!t.length)return t;let i=t.length,n=Uh;for(;i;){let s=Jh(t[i-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let e=t.slice(0,i);return e[i-1]=s,e}e=s.mapped,i--,n=s.selectionsAfter}return n.length?[qh.selection(n)]:Uh}function Jh(t,e,i){let n=jh(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):Uh,i);if(!t.changes)return qh.selection(n);let s=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new qh(s,dt.mapEffects(t.effects,e),o,t.startSelection.map(r),n)}const Yh=/^(input\.type|delete)($|\.)/;class Xh{constructor(t,e,i=0,n){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new Xh(this.done,this.undone):this}addChanges(t,e,i,n,s){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&t.changes&&(!i||Yh.test(i))&&(!o.selectionsAfter.length&&e-this.prevTimei.push(t,e))),e.iterChangedRanges(((t,e,s,r)=>{for(let t=0;t=e&&s<=o&&(n=!0)}})),n}(o.changes,t.changes)||"input.type.compose"==i)?_h(r,r.length-1,s,new qh(t.changes.compose(o.changes),jh(t.effects,o.effects),o.mapped,o.startSelection,Uh)):_h(r,r.length,s,t),new Xh(r,Uh,e,i)}addSelection(t,e,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Uh;return s.length>0&&e-this.prevTimet.empty!=o.ranges[e].empty)).length)?this:new Xh($h(this.done,t),this.undone,e,i);var r,o}addMapping(t){return new Xh(Gh(this.done,t),Gh(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let n=0==t?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1];if(i&&s.selectionsAfter.length)return e.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Eh.of({side:t,rest:Kh(n)}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let i=1==n.length?Uh:n.slice(0,n.length-1);return s.mapped&&(i=Gh(i,s.mapped)),e.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Eh.of({side:t,rest:i}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}Xh.empty=new Xh(Uh,Uh);const Qh=[{key:"Mod-z",run:Hh,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Wh,preventDefault:!0},{key:"Mod-u",run:zh,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Fh,preventDefault:!0}],Zh=2e3;function ta(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),n=t.state.doc.lineAt(i),s=i-n.from,r=s>Zh?-1:s==n.length?function(t,e){let i=t.coordsAtPos(t.viewport.from);return i?Math.round(Math.abs((i.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):u(n.text,t.state.tabSize,i-n.from);return{line:n.number,col:r,off:s}}function ea(t,e){let i=ta(t,e),n=t.state.selection;return i?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from),s=t.state.doc.lineAt(e);i={line:s.number,col:i.col,off:Math.min(i.off,s.length)},n=n.map(t.changes)}},get(e,s,r){let o=ta(t,e);if(!o)return n;let l=function(t,e,i){let n=Math.min(e.line,i.line),s=Math.max(e.line,i.line),r=[];if(e.off>Zh||i.off>Zh||e.col<0||i.col<0){let o=Math.min(e.off,i.off),l=Math.max(e.off,i.off);for(let e=n;e<=s;e++){let i=t.doc.line(e);i.length<=l&&r.push(B.range(i.from+o,i.to+l))}}else{let o=Math.min(e.col,i.col),l=Math.max(e.col,i.col);for(let e=n;e<=s;e++){let i=t.doc.line(e),n=f(i.text,o,t.tabSize,!0);if(n>-1){let e=f(i.text,l,t.tabSize);r.push(B.range(i.from+n,i.from+e))}}}return r}(t.state,i,o);return l.length?r?B.create(l.concat(n.ranges)):B.create(l):n}}:null}function ia(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return Rs.mouseSelectionStyle.of(((t,i)=>e(i)?ea(t,i):null))}const na=V.define({combine(t){let e,i;for(let n of t)e=e||n.topContainer,i=i||n.bottomContainer;return{topContainer:e,bottomContainer:i}}});function sa(t,e){let i=t.plugin(ra),n=i?i.specs.indexOf(e):-1;return n>-1?i.panels[n]:null}const ra=Ri.fromClass(class{constructor(t){this.input=t.state.facet(aa),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(na);this.top=new oa(t,!0,e.topContainer),this.bottom=new oa(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(na);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new oa(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new oa(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(aa);if(i!=this.input){let e=i.filter((t=>t)),n=[],s=[],r=[],o=[];for(let i of e){let e,l=this.specs.indexOf(i);l<0?(e=i(t.view),o.push(e)):(e=this.panels[l],e.update&&e.update(t)),n.push(e),(e.top?s:r).push(e)}this.specs=e,this.panels=n,this.top.sync(s),this.bottom.sync(r);for(let t of o)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:Di.scrollMargins.from((t=>({top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()})))});class oa{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=la(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=la(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function la(t){let e=t.nextSibling;return t.remove(),e}const ha=Rs.baseTheme({".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"}}),aa=V.define({enables:[ra,ha]});function ca(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var s=i[n];"string"==typeof s?t.setAttribute(n,s):null!=s&&(t[n]=s)}e++}for(;et.normalize("NFKD"):t=>t;class da{constructor(t,e,i=0,n=t.length,s){this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?t=>s(fa(t)):fa,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return h(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=a(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=c(t);let n=this.normalize(e);for(let t=0,s=i;;t++){let r=n.charCodeAt(t),o=this.match(r,s);if(o)return this.value=o,this;if(t==n.length-1)break;s==i&&tthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,n=i+e[0].length;if(this.matchPos=n+(i==n?1:0),i==this.curLine.length&&this.nextLine(),ithis.value.to)return this.value={from:i,to:n,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||n.to<=e){let n=new wa(e,t.sliceString(e,i));return va.set(t,n),n}if(n.from==e&&n.to==i)return n;let{text:s,from:r}=n;return r>e&&(s=t.sliceString(e,r)+s,r=e),n.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e&&this.flat.tothis.flat.text.length-10&&(e=null),e){let t=this.flat.from+e.index,i=t+e[0].length;return this.value={from:t,to:i,match:e},this.matchPos=i+(t==i?1:0),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=wa.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function ba(t){let e=ca("input",{class:"cm-textfield",name:"line"});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:n}=t,s=n.doc.lineAt(n.selection.main.head),[,r,o,l,h]=i,a=l?+l.slice(1):0,c=o?+o:s.number;if(o&&h){let t=c/100;r&&(t=t*("-"==r?-1:1)+s.number/n.doc.lines),c=Math.round(n.doc.lines*t)}else o&&r&&(c=c*("-"==r?-1:1)+s.number);let u=n.doc.line(Math.max(1,Math.min(n.doc.lines,c)));t.dispatch({effects:xa.of(!1),selection:B.cursor(u.from+Math.max(0,Math.min(a,u.length))),scrollIntoView:!0}),t.focus()}return{dom:ca("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:xa.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),i())},onsubmit:t=>{t.preventDefault(),i()}},ca("label",t.state.phrase("Go to line"),": ",e)," ",ca("button",{class:"cm-button",type:"submit"},t.state.phrase("go"))),pos:-10}}"undefined"!=typeof Symbol&&(ga.prototype[Symbol.iterator]=ya.prototype[Symbol.iterator]=function(){return this});const xa=dt.define(),ka=_.define({create:()=>!0,update(t,e){for(let i of e.effects)i.is(xa)&&(t=i.value);return t},provide:t=>aa.from(t,(t=>t?ba:null))}),Sa=Rs.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Aa={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!0},Ca=V.define({combine:t=>Mt(t,Aa,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function Ma(t){let e=[Ea,Ra];return t&&e.push(Ca.of(t)),e}const Da=ii.mark({class:"cm-selectionMatch"}),Oa=ii.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ta(t,e,i,n){return!(0!=i&&t(e.sliceDoc(i-1,i))==xt.Word||n!=e.doc.length&&t(e.sliceDoc(n,n+1))==xt.Word)}const Ra=Ri.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Ca),{state:i}=t,n=i.selection;if(n.ranges.length>1)return ii.none;let s,r=n.main,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return ii.none;let t=i.wordAt(r.head);if(!t)return ii.none;o=i.charCategorizer(r.head),s=i.sliceDoc(t.from,t.to)}else{let t=r.to-r.from;if(t200)return ii.none;if(e.wholeWords){if(s=i.sliceDoc(r.from,r.to),o=i.charCategorizer(r.head),!Ta(o,i,r.from,r.to)||!function(t,e,i,n){return t(e.sliceDoc(i,i+1))==xt.Word&&t(e.sliceDoc(n-1,n))==xt.Word}(o,i,r.from,r.to))return ii.none}else if(s=i.sliceDoc(r.from,r.to).trim(),!s)return ii.none}let l=[];for(let n of t.visibleRanges){let t=new da(i.doc,s,n.from,n.to);for(;!t.next().done;){let{from:n,to:s}=t.value;if((!o||Ta(o,i,n,s))&&(r.empty&&n<=r.from&&s>=r.to?l.push(Oa.range(n,s)):(n>=r.to||s<=r.from)&&l.push(Da.range(n,s)),l.length>e.maxMatches))return ii.none}}return ii.set(l)}},{decorations:t=>t.decorations}),Ea=Rs.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const La=V.define({combine(t){var e;return{top:t.reduce(((t,e)=>null!=t?t:e.top),void 0)||!1,caseSensitive:t.reduce(((t,e)=>null!=t?t:e.caseSensitive||e.matchCase),void 0)||!1,createPanel:(null===(e=t.find((t=>t.createPanel)))||void 0===e?void 0:e.createPanel)||(t=>new nc(t))}}});class Ba{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,ma),!0}catch(t){return!1}}(this.search)),this.unquoted=this.search.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp}create(){return this.regexp?new Ha(this):new Ia(this)}getCursor(t,e=0,i=t.length){return this.regexp?Va(this,t,e,i):Na(this,t,e,i)}}class Pa{constructor(t){this.spec=t}}function Na(t,e,i,n){return new da(e,t.unquoted,i,n,t.caseSensitive?void 0:t=>t.toLowerCase())}class Ia extends Pa{constructor(t){super(t)}nextMatch(t,e,i){let n=Na(this.spec,t,i,t.length).nextOverlapping();return n.done&&(n=Na(this.spec,t,0,e).nextOverlapping()),n.done?null:n.value}prevMatchInRange(t,e,i){for(let n=i;;){let i=Math.max(e,n-1e4-this.spec.unquoted.length),s=Na(this.spec,t,i,n),r=null;for(;!s.nextOverlapping().done;)r=s.value;if(r)return r;if(i==e)return null;n-=1e4}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.length)}getReplacement(t){return this.spec.replace}matchAll(t,e){let i=Na(this.spec,t,0,t.length),n=[];for(;!i.next().done;){if(n.length>=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=Na(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}function Va(t,e,i,n){return new ga(e,t.search,t.caseSensitive?void 0:{ignoreCase:!0},i,n)}class Ha extends Pa{nextMatch(t,e,i){let n=Va(this.spec,t,i,t.length).next();return n.done&&(n=Va(this.spec,t,0,e).next()),n.done?null:n.value}prevMatchInRange(t,e,i){for(let n=1;;n++){let s=Math.max(e,i-1e4*n),r=Va(this.spec,t,s,i),o=null;for(;!r.next().done;)o=r.value;if(o&&(s==e||o.from>s+10))return o;if(s==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.length)}getReplacement(t){return this.spec.replace.replace(/\$([$&\d+])/g,((e,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=Va(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}const Wa=dt.define(),za=dt.define(),Fa=_.define({create:t=>new qa(Za(t).create(),null),update(t,e){for(let i of e.effects)i.is(Wa)?t=new qa(i.value.create(),t.panel):i.is(za)&&(t=new qa(t.query,i.value?Qa:null));return t},provide:t=>aa.from(t,(t=>t.panel))});class qa{constructor(t,e){this.query=t,this.panel=e}}const _a=ii.mark({class:"cm-searchMatch"}),ja=ii.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Ua=Ri.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Fa))}update(t){let e=t.state.field(Fa);(e!=t.startState.field(Fa)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ii.none;let{view:i}=this,n=new Ht;for(let e=0,s=i.visibleRanges,r=s.length;es[e+1].from-500;)l=s[++e].to;t.highlight(i.state.doc,o,l,((t,e)=>{let s=i.state.selection.ranges.some((i=>i.from==t&&i.to==e));n.add(t,e,s?ja:_a)}))}return n.finish()}},{decorations:t=>t.decorations});function $a(t){return e=>{let i=e.state.field(Fa,!1);return i&&i.query.spec.valid?t(e,i):tc(e)}}const Ka=$a(((t,{query:e})=>{let{from:i,to:n}=t.state.selection.main,s=e.nextMatch(t.state.doc,i,n);return!(!s||s.from==i&&s.to==n)&&(t.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:oc(t,s),userEvent:"select.search"}),!0)})),Ga=$a(((t,{query:e})=>{let{state:i}=t,{from:n,to:s}=i.selection.main,r=e.prevMatch(i.doc,n,s);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:oc(t,r),userEvent:"select.search"}),!0)})),Ja=$a(((t,{query:e})=>{let i=e.matchAll(t.state.doc,1e3);return!(!i||!i.length)&&(t.dispatch({selection:B.create(i.map((t=>B.range(t.from,t.to)))),userEvent:"select.search.matches"}),!0)})),Ya=$a(((t,{query:e})=>{let{state:i}=t,{from:n,to:s}=i.selection.main;if(i.readOnly)return!1;let r=e.nextMatch(i.doc,n,n);if(!r)return!1;let o,l,h=[];if(r.from==n&&r.to==s&&(l=i.toText(e.getReplacement(r)),h.push({from:r.from,to:r.to,insert:l}),r=e.nextMatch(i.doc,r.from,r.to)),r){let t=0==h.length||h[0].from>=r.to?0:r.to-r.from-l.length;o={anchor:r.from-t,head:r.to-t}}return t.dispatch({changes:h,selection:o,scrollIntoView:!!o,effects:r?oc(t,r):void 0,userEvent:"input.replace"}),!0})),Xa=$a(((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state.doc,1e9).map((t=>{let{from:i,to:n}=t;return{from:i,to:n,insert:e.getReplacement(t)}}));return!!i.length&&(t.dispatch({changes:i,userEvent:"input.replace.all"}),!0)}));function Qa(t){return t.state.facet(La).createPanel(t)}function Za(t,e){var i;let n=t.selection.main,s=n.empty||n.to>n.from+100?"":t.sliceDoc(n.from,n.to),r=null!==(i=null==e?void 0:e.caseSensitive)&&void 0!==i?i:t.facet(La).caseSensitive;return e&&!s?e:new Ba({search:s.replace(/\n/g,"\\n"),caseSensitive:r})}const tc=t=>{let e=t.state.field(Fa,!1);if(e&&e.panel){let i=sa(t,Qa);if(!i)return!1;let n=i.dom.querySelector("[name=search]");if(n!=t.root.activeElement){let i=Za(t.state,e.query.spec);i.valid&&t.dispatch({effects:Wa.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[za.of(!0),e?Wa.of(Za(t.state,e.query.spec)):dt.appendConfig.of(hc)]});return!0},ec=t=>{let e=t.state.field(Fa,!1);if(!e||!e.panel)return!1;let i=sa(t,Qa);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:za.of(!1)}),!0},ic=[{key:"Mod-f",run:tc,scope:"editor search-panel"},{key:"F3",run:Ka,shift:Ga,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Ka,shift:Ga,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:ec,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:n,to:s}=i.main,r=[],o=0;for(let e=new da(t.doc,t.sliceDoc(n,s));!e.next().done;){if(r.length>1e3)return!1;e.value.from==n&&(o=r.length),r.push(B.range(e.value.from,e.value.to))}return e(t.update({selection:B.create(r,o),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:t=>{let e=sa(t,ba);if(!e){let i=[xa.of(!0)];null==t.state.field(ka,!1)&&i.push(dt.appendConfig.of([ka,Sa])),t.dispatch({effects:i}),e=sa(t,ba)}return e&&e.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,n=B.create(i.ranges.map((e=>t.wordAt(e.head)||B.cursor(e.head))),i.mainIndex);return!n.eq(i)&&(e(t.update({selection:n})),!0)})({state:t,dispatch:e});let n=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=n)))return!1;let s=function(t,e){let{main:i,ranges:n}=t.selection,s=t.wordAt(i.head),r=s&&s.from==i.from&&s.to==i.to;for(let i=!1,s=new da(t.doc,e,n[n.length-1].to);;){if(s.next(),!s.done){if(i&&n.some((t=>t.from==s.value.from)))continue;if(r){let e=t.wordAt(s.value.from);if(!e||e.from!=s.value.from||e.to!=s.value.to)continue}return s.value}if(i)return null;s=new da(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(t,n);return!!s&&(e(t.update({selection:t.selection.addRange(B.range(s.from,s.to),!1),effects:Rs.scrollIntoView(s.to)})),!0)},preventDefault:!0}];class nc{constructor(t){this.view=t;let e=this.query=t.state.field(Fa).query.spec;function i(t,e,i){return ca("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=ca("input",{value:e.search,placeholder:sc(t,"Find"),"aria-label":sc(t,"Find"),class:"cm-textfield",name:"search",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ca("input",{value:e.replace,placeholder:sc(t,"Replace"),"aria-label":sc(t,"Replace"),class:"cm-textfield",name:"replace",onchange:this.commit,onkeyup:this.commit}),this.caseField=ca("input",{type:"checkbox",name:"case",checked:e.caseSensitive,onchange:this.commit}),this.reField=ca("input",{type:"checkbox",name:"re",checked:e.regexp,onchange:this.commit}),this.dom=ca("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",(()=>Ka(t)),[sc(t,"next")]),i("prev",(()=>Ga(t)),[sc(t,"previous")]),i("select",(()=>Ja(t)),[sc(t,"all")]),ca("label",null,[this.caseField,sc(t,"match case")]),ca("label",null,[this.reField,sc(t,"regexp")]),...t.state.readOnly?[]:[ca("br"),this.replaceField,i("replace",(()=>Ya(t)),[sc(t,"replace")]),i("replaceAll",(()=>Xa(t)),[sc(t,"replace all")]),ca("button",{name:"close",onclick:()=>ec(t),"aria-label":sc(t,"close"),type:"button"},["×"])]])}commit(){let t=new Ba({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Wa.of(t)}))}keydown(t){var e,i,n;e=this.view,i=t,n="search-panel",_s(Fs(e.state),i,e,n)?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Ga:Ka)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Ya(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(Wa)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(La).top}}function sc(t,e){return t.state.phrase(e)}const rc=/[\s\.,:;?!]/;function oc(t,{from:e,to:i}){let n=t.state.doc.lineAt(e).from,s=t.state.doc.lineAt(i).to,r=Math.max(n,e-30),o=Math.min(s,i+30),l=t.state.sliceDoc(r,o);if(r!=n)for(let t=0;t<30;t++)if(!rc.test(l[t+1])&&rc.test(l[t])){l=l.slice(t);break}if(o!=s)for(let t=l.length-1;t>l.length-30;t--)if(!rc.test(l[t-1])&&rc.test(l[t])){l=l.slice(0,t);break}return Rs.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${t.state.doc.lineAt(e).number}`)}const lc=Rs.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),hc=[Fa,Y.lowest(Ua),lc],ac="undefined"!=typeof navigator&&!/Edge\/(\d+)/.exec(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),cc="-10000px";class uc{constructor(t,e,i){this.facet=e,this.createTooltipView=i,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t)),this.tooltipViews=this.tooltips.map(i)}update(t){let e=t.state.facet(this.facet),i=e.filter((t=>t));if(e===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[];for(let e=0;e{var e,i,n;return{position:ac?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=t.find((t=>t.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||fc}}}),pc=Ri.fromClass(class{constructor(t){var e;this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let i=t.state.facet(dc);this.position=i.position,this.parent=i.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new uc(t,vc,(t=>this.createTooltip(t))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),null===(e=t.dom.ownerDocument.defaultView)||void 0===e||e.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t);e&&this.observeIntersection();let i=e||t.geometryChanged,n=t.state.facet(dc);if(n.position!=this.position){this.position=n.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=cc,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;null===(t=this.view.dom.ownerDocument.defaultView)||void 0===t||t.removeEventListener("resize",this.measureSoon);for(let{dom:t}of this.manager.tooltipViews)t.remove();null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(dc).tooltipSpace(this.view)}}writeMeasure(t){let{editor:e,space:i}=t,n=[];for(let s=0;s=Math.min(e.bottom,i.bottom)||h.rightMath.min(e.right,i.right)+.1){l.style.top=cc;continue}let c=r.arrow?o.dom.querySelector(".cm-tooltip-arrow"):null,u=c?7:0,f=a.right-a.left,d=a.bottom-a.top,p=o.offset||gc,m=this.view.textDirection==Wi.LTR,g=a.width>i.right-i.left?m?i.left:i.right-a.width:m?Math.min(h.left-(c?14:0)+p.x,i.right-f):Math.max(i.left,h.left-f+(c?14:0)-p.x),v=!!r.above;!r.strictSide&&(v?h.top-(a.bottom-a.top)-p.yi.bottom)&&v==i.bottom-h.bottom>h.top-i.top&&(v=!v);let w=v?h.top-d-u-p.y:h.bottom+u+p.y,y=g+f;if(!0!==o.overlap)for(let t of n)t.leftg&&t.topw&&(w=v?t.top-d-2-u:t.bottom+u+2);"absolute"==this.position?(l.style.top=w-t.parent.top+"px",l.style.left=g-t.parent.left+"px"):(l.style.top=w+"px",l.style.left=g+"px"),c&&(c.style.left=h.left+(m?p.x:-p.x)-(g+14-7)+"px"),!0!==o.overlap&&n.push({left:g,top:w,right:y,bottom:w+d}),l.classList.toggle("cm-tooltip-above",v),l.classList.toggle("cm-tooltip-below",!v),o.positioned&&o.positioned()}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=cc}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),mc=Rs.baseTheme({".cm-tooltip":{zIndex:100},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),gc={x:0,y:0},vc=V.define({enables:[pc,mc]});class wc{constructor(t,e,i){this.state=t,this.pos=e,this.explicit=i,this.abortListeners=[]}tokenBefore(t){let e=Nr(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(Sc(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(t,e){"abort"==t&&this.abortListeners&&this.abortListeners.push(e)}}function yc(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function bc(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,n]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:n}of t){e[n[0]]=!0;for(let t=1;t{let s=t.matchBefore(n);return s||t.explicit?{from:s?s.from:t.pos,options:e,span:i}:null}}class xc{constructor(t,e,i){this.completion=t,this.source=e,this.match=i}}function kc(t){return t.selection.main.head}function Sc(t,e){var i;let{source:n}=t,s=e&&"^"!=n[0],r="$"!=n[n.length-1];return s||r?new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const Ac=ct.define();function Cc(t,e){let i=e.completion.apply||e.completion.label,n=e.source;"string"==typeof i?t.dispatch({changes:{from:n.from,to:n.to,insert:i},selection:{anchor:n.from+i.length},userEvent:"input.complete",annotations:Ac.of(e.completion)}):i(t,e.completion,n.from,n.to)}const Mc=new WeakMap;function Dc(t){if(!Array.isArray(t))return t;let e=Mc.get(t);return e||Mc.set(t,e=bc(t)),e}class Oc{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let e=0;e=48&&u<=57||u>=97&&u<=122?2:u>=65&&u<=90?1:0:(x=a(u))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!n||1==k&&w||0==b&&0!=k)&&(e[d]==u||i[d]==u&&(p=!0)?r[d++]=n:r.length&&(y=!1)),b=k,n+=c(u)}return d==l&&0==r[0]&&y?this.result((p?-200:0)-100,r,t):m==l&&0==g?[-200-t.length,0,v]:o>-1?[-700-t.length,o,o+this.pattern.length]:m==l?[-900-t.length,g,v]:d==l?this.result((p?-200:0)-100-700+(y?0:-1100),r,t):2==e.length?null:this.result((n[0]?-700:0)-200-1100,n,t)}result(t,e,i){let n=[t-i.length],s=1;for(let t of e){let e=t+(this.astral?c(h(i,t)):1);s>1&&n[s-1]==t?n[s-1]=e:(n[s++]=t,n[s++]=e)}return n}}const Tc=V.define({combine:t=>Mt(t,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[]},{defaultKeymap:(t,e)=>t&&e,icons:(t,e)=>t&&e,optionClass:(t,e)=>i=>function(t,e){return t?e?t+" "+e:t:e}(t(i),e(i)),addToOptions:(t,e)=>t.concat(e)})});function Rc(t,e,i){if(t<=i)return{from:0,to:t};if(e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let n=Math.floor((t-e)/i);return{from:t-(n+1)*i,to:t-n*i}}class Ec{constructor(t,e){this.view=t,this.stateField=e,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:t=>this.positionInfo(t),key:this};let i=t.state.field(e),{options:n,selected:s}=i.open,r=t.state.facet(Tc);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i){let n=document.createElement("span");n.className="cm-completionLabel";let{label:s}=t,r=0;for(let t=1;tr&&n.appendChild(document.createTextNode(s.slice(r,e)));let l=n.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(s.slice(e,o))),l.className="cm-completionMatchedText",r=o}return rt.position-e.position)).map((t=>t.render))}(r),this.optionClass=r.optionClass,this.range=Rc(n.length,s,r.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",(e=>{for(let i,s=e.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(i=/-(\d+)$/.exec(s.id))&&+i[1]{this.info&&this.view.requestMeasure(this.placeInfo)}))}mount(){this.updateSel()}update(t){t.state.field(this.stateField)!=t.startState.field(this.stateField)&&this.updateSel()}positioned(){this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected=this.range.to)&&(this.range=Rc(e.options.length,e.selected,this.view.state.facet(Tc).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e.options,t.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))),this.updateSelectedOption(e.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=e.options[e.selected],{info:n}=i;if(!n)return;let s="string"==typeof n?document.createTextNode(n):n(i);if(!s)return;"then"in s?s.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e)})).catch((t=>Ai(this.view.state,t,"completion info"))):this.addInfoPane(s)}}addInfoPane(t){let e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(t),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)n==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect();n.topi.bottom&&(t.scrollTop+=n.bottom-i.bottom)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=t.getBoundingClientRect();if(n.top>Math.min(innerHeight,e.bottom)-10||n.bottom=this.options.length?this:new Bc(this.options,Ic(e,t),this.tooltip,this.timestamp,t)}static build(t,e,i,n,s){let r=function(t,e){let i=[],n=0;for(let s of t)if(s.hasResult())if(!1===s.result.filter)for(let t of s.result.options)i.push(new xc(t,s,[1e9-n++]));else{let t,n=new Oc(e.sliceDoc(s.from,s.to));for(let e of s.result.options)(t=n.match(e.label))&&(null!=e.boost&&(t[0]+=e.boost),i.push(new xc(e,s,t)))}let s=[],r=null;for(let t of i.sort(Hc)){if(300==s.length)break;r&&r.label==t.completion.label&&r.detail==t.completion.detail&&r.type==t.completion.type&&r.apply==t.completion.apply?Lc(t.completion)>Lc(r)&&(s[s.length-1]=t):s.push(t),r=t.completion}return s}(t,e);if(!r.length)return null;let o=0;if(n&&n.selected){let t=n.options[n.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:(l=$c,t=>new Ec(t,l)),above:s.aboveCursor},n?n.timestamp:Date.now(),o);var l}map(t){return new Bc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}class Pc{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new Pc(Vc,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(Tc),n=(i.override||e.languageDataAt("autocomplete",kc(e)).map(Dc)).map((e=>(this.active.find((t=>t.source==e))||new zc(e,this.active.some((t=>0!=t.state))?1:0)).update(t,i)));n.length==this.active.length&&n.every(((t,e)=>t==this.active[e]))&&(n=this.active);let s=t.selection||n.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,n=0;;){for(;i1!=t.state))&&n.some((t=>t.hasResult()))&&(n=n.map((t=>t.hasResult()?new zc(t.source,0):t)));for(let e of t.effects)e.is(Uc)&&(s=s&&s.setSelected(e.value,this.id));return n==this.active&&s==this.open?this:new Pc(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Nc}}const Nc={"aria-autocomplete":"list"};function Ic(t,e){return{"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":t+"-"+e,"aria-controls":t}}const Vc=[];function Hc(t,e){let i=e.match[0]-t.match[0];return i||t.completion.label.localeCompare(e.completion.label)}function Wc(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class zc{constructor(t,e,i=-1){this.source=t,this.state=e,this.explicitPos=i}hasResult(){return!1}update(t,e){let i=Wc(t),n=this;i?n=n.handleUserEvent(t,i,e):t.docChanged?n=n.handleChange(t):t.selection&&0!=n.state&&(n=new zc(n.source,0));for(let e of t.effects)if(e.is(qc))n=new zc(n.source,1,e.value?kc(t.state):-1);else if(e.is(_c))n=new zc(n.source,0);else if(e.is(jc))for(let t of e.value)t.source==n.source&&(n=t);return n}handleUserEvent(t,e,i){return"delete"!=e&&i.activateOnTyping?new zc(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(kc(t.startState))?new zc(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new zc(this.source,this.state,t.mapPos(this.explicitPos))}}class Fc extends zc{constructor(t,e,i,n,s,r){super(t,2,e),this.result=i,this.from=n,this.to=s,this.span=r}hasResult(){return!0}handleUserEvent(t,e,i){let n=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),r=kc(t.state);if((this.explicitPos<0?r<=n:rs||"delete"==e&&kc(t.startState)==this.from)return new zc(this.source,"input"==e&&i.activateOnTyping?1:0);let o=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return this.span&&(n==s||this.span.test(t.state.sliceDoc(n,s)))?new Fc(this.source,o,this.result,n,s,this.span):new zc(this.source,1,o)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new zc(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new Fc(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1),this.span)}}const qc=dt.define(),_c=dt.define(),jc=dt.define({map:(t,e)=>t.map((t=>t.map(e)))}),Uc=dt.define(),$c=_.define({create:()=>Pc.start(),update:(t,e)=>t.update(e),provide:t=>[vc.from(t,(t=>t.tooltip)),Rs.contentAttributes.from(t,(t=>t.attrs))]});function Kc(t,e="option"){return i=>{let n=i.state.field($c,!1);if(!n||!n.open||Date.now()-n.open.timestamp<75)return!1;let s,r=1;"page"==e&&(s=function(t,e){let i=t.plugin(pc);if(!i)return null;let n=i.manager.tooltips.indexOf(e);return n<0?null:i.manager.tooltipViews[n]}(i,n.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let o=n.open.selected+r*(t?1:-1),{length:l}=n.open.options;return o<0?o="page"==e?0:l-1:o>=l&&(o="page"==e?l-1:0),i.dispatch({effects:Uc.of(o)}),!0}}class Gc{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const Jc=Ri.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field($c).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field($c);if(!t.selectionSet&&!t.docChanged&&t.startState.field($c)==e)return;let i=t.transactions.some((t=>(t.selection||t.docChanged)&&!Wc(t)));for(let e=0;e50&&Date.now()-n.time>1e3){for(let t of n.context.abortListeners)try{t()}catch(t){Ai(this.view.state,t)}n.context.abortListeners=null,this.running.splice(e--,1)}else n.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let e of t.transactions)"input"==Wc(e)?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field($c);for(let t of e.active)1!=t.state||this.running.some((e=>e.active.source==t.source))||this.startQuery(t)}startQuery(t){let{state:e}=this.view,i=kc(e),n=new wc(e,i,t.explicitPos==i),s=new Gc(t,n);this.running.push(s),Promise.resolve(t.source(n)).then((t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:_c.of(null)}),Ai(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),50))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(Tc);for(let n=0;nt.source==s.active.source));if(r&&1==r.state)if(null==s.done){let t=new zc(s.active.source,0);for(let e of s.updates)t=t.update(e,i);1!=t.state&&e.push(t)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:jc.of(e)})}},{eventHandlers:{compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:qc.of(!1)})),20),this.composing=0}}}),Yc=Rs.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});function Xc(t={}){return[$c,Tc.of(t),Jc,Zc,Yc]}const Qc=[{key:"Ctrl-Space",run:t=>!!t.state.field($c,!1)&&(t.dispatch({effects:qc.of(!0)}),!0)},{key:"Escape",run:t=>{let e=t.state.field($c,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:_c.of(null)}),!0)}},{key:"ArrowDown",run:Kc(!0)},{key:"ArrowUp",run:Kc(!1)},{key:"PageDown",run:Kc(!0,"page")},{key:"PageUp",run:Kc(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field($c,!1);return!(t.state.readOnly||!e||!e.open||Date.now()-e.open.timestamp<75)&&(Cc(t,e.open.options[e.open.selected]),!0)}}],Zc=Y.highest(Ws.computeN([Tc],(t=>t.facet(Tc).defaultKeymap?[Qc]:[]))),tu={jinja2:Ql.define($l),yaml:Ql.define(Gl)},eu=new Q,iu=new Q,nu=[{key:"Tab",run:nl},{key:"Shift-Tab",run:sl}],su=Rs.theme({"&":{color:"var(--primary-text-color)",backgroundColor:"var(--code-editor-background-color, var(--mdc-text-field-fill-color, whitesmoke))","& ::selection":{backgroundColor:"rgba(var(--rgb-primary-color), 0.3)"},borderRadius:"var(--mdc-shape-small, 4px) var(--mdc-shape-small, 4px) 0px 0px",caretColor:"var(--secondary-text-color)",height:"var(--code-mirror-height, auto)",maxHeight:"var(--code-mirror-max-height, unset)"},"&.cm-editor.cm-focused":{outline:"none"},"&.cm-focused .cm-cursor":{borderLeftColor:"var(--secondary-text-color)"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground":{backgroundColor:"rgba(var(--rgb-primary-color), 0.3)"},".cm-activeLine":{backgroundColor:"rgba(var(--rgb-secondary-text-color), 0.1)"},".cm-scroller":{outline:"none"},".cm-content":{caretColor:"var(--secondary-text-color)",paddingTop:"16px"},".cm-panels":{backgroundColor:"var(--primary-background-color)",color:"var(--primary-text-color)"},".cm-panels.top":{borderBottom:"1px solid var(--divider-color)"},".cm-panels.bottom":{borderTop:"1px solid var(--divider-color)"},".cm-button":{border:"1px solid var(--primary-color)",padding:"0px 16px",textTransform:"uppercase",margin:"4px",background:"none",color:"var(--primary-color)",fontFamily:"var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif))",fontSize:"var(--mdc-typography-button-font-size, 0.875rem)",height:"36px",fontWeight:"var(--mdc-typography-button-font-weight, 500)",borderRadius:"4px",letterSpacing:"var(--mdc-typography-button-letter-spacing, 0.0892857em)"},".cm-textfield":{padding:"4px 0px 5px",borderRadius:"0",fontSize:"16px",color:"var(--primary-text-color)",border:"0",background:"none",fontFamily:"Roboto",borderBottom:"1px solid var(--paper-input-container-color, var(--secondary-text-color))",margin:"4px 4px 0","& ::placeholder":{color:"var(--paper-input-container-color, var(--secondary-text-color))"},"&:focus":{outline:"none",borderBottom:"2px solid var(--primary-color)",paddingBottom:"4px"}},".cm-tooltip":{color:"var(--primary-text-color)",backgroundColor:"var(--code-editor-background-color, var(--card-background-color))",border:"1px solid var(--divider-color)",borderRadius:"var(--mdc-shape-medium, 4px)",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%)"},"& .cm-tooltip.cm-tooltip-autocomplete > ul > li":{padding:"4px 8px"},"& .cm-tooltip-autocomplete ul li[aria-selected]":{background:"var(--primary-color)",color:"var(--text-primary-color)"},".cm-completionIcon":{display:"none"},".cm-completionDetail":{fontFamily:"Roboto",color:"var(--secondary-text-color)"},"li[aria-selected] .cm-completionDetail":{color:"var(--text-primary-color)"},"& .cm-completionInfo.cm-completionInfo-right":{left:"calc(100% + 4px)"},"& .cm-tooltip.cm-completionInfo":{padding:"4px 8px",marginTop:"-5px"},".cm-selectionMatch":{backgroundColor:"rgba(var(--rgb-primary-color), 0.1)"},".cm-searchMatch":{backgroundColor:"rgba(var(--rgb-accent-color), .2)",outline:"1px solid rgba(var(--rgb-accent-color), .4)"},".cm-searchMatch.selected":{backgroundColor:"rgba(var(--rgb-accent-color), .4)",outline:"1px solid var(--accent-color)"},".cm-gutters":{backgroundColor:"var(--code-editor-gutter-color, var(--mdc-text-field-fill-color, whitesmoke))",color:"var(--paper-dialog-color, var(--secondary-text-color))",border:"none",borderRight:"1px solid var(--paper-input-container-color, var(--secondary-text-color))",paddingRight:"1px"},"&.cm-focused .cm-gutters":{borderRight:"2px solid var(--paper-input-container-focus-color, var(--primary-color))",paddingRight:"0"},".cm-gutterElement.lineNumber":{color:"inherit"}}),ru=vl.define([{tag:Wl.keyword,color:"var(--codemirror-keyword, #6262FF)"},{tag:[Wl.name,Wl.deleted,Wl.character,Wl.propertyName,Wl.macroName],color:"var(--codemirror-property, #905)"},{tag:[Wl.function(Wl.variableName),Wl.labelName],color:"var(--codemirror-variable, #07a)"},{tag:[Wl.color,Wl.constant(Wl.name),Wl.standard(Wl.name)],color:"var(--codemirror-qualifier, #690)"},{tag:[Wl.definition(Wl.name),Wl.separator],color:"var(--codemirror-def, #8DA6CE)"},{tag:[Wl.typeName,Wl.className,Wl.number,Wl.changed,Wl.annotation,Wl.modifier,Wl.self,Wl.namespace],color:"var(--codemirror-number, #ca7841)"},{tag:[Wl.operator,Wl.operatorKeyword,Wl.url,Wl.escape,Wl.regexp,Wl.link,Wl.special(Wl.string)],color:"var(--codemirror-operator, #cda869)"},{tag:Wl.comment,color:"var(--codemirror-comment, #777)"},{tag:Wl.meta,color:"var(--codemirror-meta, var(--primary-text-color))"},{tag:Wl.strong,fontWeight:"bold"},{tag:Wl.emphasis,fontStyle:"italic"},{tag:Wl.link,color:"var(--primary-color)",textDecoration:"underline"},{tag:Wl.heading,fontWeight:"bold"},{tag:Wl.atom,color:"var(--codemirror-atom, #F90)"},{tag:Wl.bool,color:"var(--codemirror-atom, #F90)"},{tag:Wl.special(Wl.variableName),color:"var(--codemirror-variable-2, #690)"},{tag:Wl.processingInstruction,color:"var(--secondary-text-color)"},{tag:Wl.string,color:"var(--codemirror-string, #07a)"},{tag:Wl.inserted,color:"var(--codemirror-string2, #07a)"},{tag:Wl.invalid,color:"var(--error-color)"}]);export{Ct as EditorState,Rs as EditorView,vl as HighlightStyle,Y as Prec,Xc as autocompletion,rl as defaultKeymap,$s as drawSelection,er as highlightActiveLine,Ma as highlightSelectionMatches,ru as highlightStyle,Ih as history,Qh as historyKeymap,Ws as keymap,eu as langCompartment,tu as langs,Th as lineNumbers,iu as readonlyCompartment,ia as rectangularSelection,ic as searchKeymap,nu as tabKeyBindings,Wl as tags,su as theme}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.10c7d0ce.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.10c7d0ce.js.gz index 7ee6d89..6388ab1 100644 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.10c7d0ce.js.gz and b/custom_components/hacs/hacs_frontend_experimental/c.10c7d0ce.js.gz differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.10d2b054.js b/custom_components/hacs/hacs_frontend_experimental/c.10d2b054.js deleted file mode 100644 index 0e03a62..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.10d2b054.js +++ /dev/null @@ -1 +0,0 @@ -import{x as e}from"./main-c66a9a06.js";function n(e){return Intl.getCanonicalLocales(e)}function t(e){if("symbol"==typeof e)throw TypeError("Cannot convert a Symbol value to a string");return String(e)}function r(e){if(void 0===e)return NaN;if(null===e)return 0;if("boolean"==typeof e)return e?1:0;if("number"==typeof e)return e;if("symbol"==typeof e||"bigint"==typeof e)throw new TypeError("Cannot convert symbol/bigint to number");return Number(e)}function u(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)}function i(e,n){return Object.is?Object.is(e,n):e===n?0!==e||1/e==1/n:e!=e&&n!=n}function a(e){return new Array(e)}function o(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function c(e,n){return e-Math.floor(e/n)*n}function l(e){return Math.floor(e/864e5)}function s(e){return Date.UTC(e,0)/864e5}function f(e){return new Date(e).getUTCFullYear()}function D(e){return e%4!=0?365:e%100!=0?366:e%400!=0?365:366}function m(e){return l(e)-s(f(e))}function g(e){return 365===D(f(e))?0:1}function p(e){var n=m(e),t=g(e);if(n>=0&&n<31)return 0;if(n<59+t)return 1;if(n<90+t)return 2;if(n<120+t)return 3;if(n<151+t)return 4;if(n<181+t)return 5;if(n<212+t)return 6;if(n<243+t)return 7;if(n<273+t)return 8;if(n<304+t)return 9;if(n<334+t)return 10;if(n<365+t)return 11;throw new Error("Invalid time")}function d(e){return void 0===e?Object.create(null):u(e)}function y(e,n,t,r){if(void 0!==e){if(e=Number(e),isNaN(e)||et)throw new RangeError("".concat(e," is outside of range [").concat(n,", ").concat(t,"]"));return Math.floor(e)}return r}function F(e,n,t,r,u){return y(e[n],t,r,u)}function v(e,n,r,u,i){if("object"!=typeof e)throw new TypeError("Options must be an object");var a=e[n];if(void 0!==a){if("boolean"!==r&&"string"!==r)throw new TypeError("invalid type");if("boolean"===r&&(a=Boolean(a)),"string"===r&&(a=t(a)),void 0!==u&&!u.filter((function(e){return e==a})).length)throw new RangeError("".concat(a," is not within ").concat(u.join(", ")));return a}return i}var h=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"];function b(e){return e.slice(e.indexOf("-")+1)}var E=h.map(b);function C(e){return E.indexOf(e)>-1}var S=/[^A-Z]/;function w(e){return 3===(e=e.replace(/([a-z])/g,(function(e,n){return n.toUpperCase()}))).length&&!S.test(e)}function A(e){if(C(e=e.replace(/([A-Z])/g,(function(e,n){return n.toLowerCase()}))))return!0;var n=e.split("-per-");if(2!==n.length)return!1;var t=n[0],r=n[1];return!(!C(t)||!C(r))}function x(e){return Math.floor(Math.log(e)*Math.LOG10E)}function B(e,n){if("function"==typeof e.repeat)return e.repeat(n);for(var t=new Array(n),r=0;rm[m.length-1])return m[m.length-1].length-1;var g=m.indexOf(D);if(-1===g)return 0;var p=m[g];return"0"===s[p].other?0:p.length-s[p].other.match(/0+/)[0].length}}function T(e,n,t){var r,u,i,a,o=t;if(0===e)r=B("0",o),u=0,i=0;else{var c=e.toString(),l=c.indexOf("e"),s=c.split("e"),f=s[0],D=s[1],m=f.replace(".","");if(l>=0&&m.length<=o)u=+D,r=m+B("0",o-m.length),i=e;else{var g=(u=x(e))-o+1,p=Math.round(y(e,g));y(p,o-1)>=10&&(u+=1,p=Math.floor(p/10)),r=p.toString(),i=y(p,o-1-u)}}if(u>=o-1?(r+=B("0",u-o+1),a=u+1):u>=0?(r="".concat(r.slice(0,u+1),".").concat(r.slice(u+1)),a=u+1):(r="0.".concat(B("0",-u-1)).concat(r),a=1),r.indexOf(".")>=0&&t>n){for(var d=t-n;d>0&&"0"===r[r.length-1];)r=r.slice(0,-1),d--;"."===r[r.length-1]&&(r=r.slice(0,-1))}return{formattedString:r,roundedNumber:i,integerDigitsCount:a};function y(e,n){return n<0?e*Math.pow(10,-n):e/Math.pow(10,n)}}function k(e,n,t){var r,u,i=t,a=Math.round(e*Math.pow(10,i)),o=a/Math.pow(10,i);if(a<1e21)r=a.toString();else{var c=(r=a.toString()).split("e"),l=c[0],s=c[1];r=l.replace(".",""),r+=B("0",Math.max(+s-r.length+1,0))}if(0!==i){var f=r.length;if(f<=i)r=B("0",i+1-f)+r,f=i+1;var D=r.slice(0,f-i),m=r.slice(f-i);r="".concat(D,".").concat(m),u=D.length}else u=r.length;for(var g=t-n;g>0&&"0"===r[r.length-1];)r=r.slice(0,-1),g--;return"."===r[r.length-1]&&(r=r.slice(0,-1)),{formattedString:r,roundedNumber:o,integerDigitsCount:u}}function j(e,n){var t,r=n<0||i(n,-0);switch(r&&(n=-n),e.roundingType){case"significantDigits":t=T(n,e.minimumSignificantDigits,e.maximumSignificantDigits);break;case"fractionDigits":t=k(n,e.minimumFractionDigits,e.maximumFractionDigits);break;default:(t=T(n,1,2)).integerDigitsCount>1&&(t=k(n,0,0))}n=t.roundedNumber;var u=t.formattedString,a=t.integerDigitsCount,o=e.minimumIntegerDigits;a\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/,z=new RegExp("^".concat(R.source)),_=new RegExp("".concat(R.source,"$")),G=/[#0](?:[\.,][#0]+)*/g;function Y(e,n,t,r){var u,i,a=e.sign,o=e.exponent,c=e.magnitude,l=r.notation,s=r.style,f=r.numberingSystem,D=n.numbers.nu[0],m=null;if("compact"===l&&c&&(m=function(e,n,t,r,u,i,a){var o,c,l=e.roundedNumber,s=e.sign,f=e.magnitude,D=String(Math.pow(10,f)),m=t.numbers.nu[0];if("currency"===r&&"name"!==i){var g=null===(o=((p=t.numbers.currency)[a]||p[m]).short)||void 0===o?void 0:o[D];if(!g)return null;c=H(n,l,g)}else{var p,d=((p=t.numbers.decimal)[a]||p[m])[u][D];if(!d)return null;c=H(n,l,d)}if("0"===c)return null;return c=$(c,s).replace(/([^\s;\-\+\d¤]+)/g,"{c:$1}").replace(/0+/,"0")}(e,t,n,s,r.compactDisplay,r.currencyDisplay,f)),"currency"===s&&"name"!==r.currencyDisplay){var g=n.currencies[r.currency];if(g)switch(r.currencyDisplay){case"code":u=r.currency;break;case"symbol":u=g.symbol;break;default:u=g.narrow}else u=r.currency}if(m)i=m;else if("decimal"===s||"unit"===s||"currency"===s&&"name"===r.currencyDisplay)i=$((n.numbers.decimal[f]||n.numbers.decimal[D]).standard,a);else if("currency"===s){i=$((d=n.numbers.currency[f]||n.numbers.currency[D])[r.currencySign],a)}else{i=$(n.numbers.percent[f]||n.numbers.percent[D],a)}var p=G.exec(i)[0];if(i=i.replace(G,"{0}").replace(/'(.)'/g,"$1"),"currency"===s&&"name"!==r.currencyDisplay){var d,y=(d=n.numbers.currency[f]||n.numbers.currency[D]).currencySpacing.afterInsertBetween;y&&!_.test(u)&&(i=i.replace("¤{0}","¤".concat(y,"{0}")));var F=d.currencySpacing.beforeInsertBetween;F&&!z.test(u)&&(i=i.replace("{0}¤","{0}".concat(F,"¤")))}for(var v=i.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g),h=[],b=n.numbers.symbols[f]||n.numbers.symbols[D],E=0,C=v;E0?(f=c.slice(0,m),D=c.slice(m+1)):f=c,i&&("compact"!==t||l>=1e4)){var g=e.group,p=[],d=a.split(".")[0].split(","),y=3,F=3;d.length>1&&(y=d[d.length-1].length),d.length>2&&(F=d[d.length-2].length);var v=f.length-y;if(v>0){for(p.push(f.slice(v,v+y)),v-=F;v>0;v-=F)p.push(f.slice(v,v+F));p.push(f.slice(0,v+F))}else p.push(f);for(;p.length>0;){var h=p.pop();o.push({type:"integer",value:h}),p.length>0&&o.push({type:"group",value:g})}}else o.push({type:"integer",value:f});if(void 0!==D&&o.push({type:"decimal",value:e.decimal},{type:"fraction",value:D}),("scientific"===t||"engineering"===t)&&isFinite(l)){o.push({type:"exponentSeparator",value:e.exponential}),r<0&&(o.push({type:"exponentMinusSign",value:e.minusSign}),r=-r);var b=k(r,0,0);o.push({type:"exponentInteger",value:b.formattedString})}return o}function $(e,n){e.indexOf(";")<0&&(e="".concat(e,";-").concat(e));var t=e.split(";"),r=t[0],u=t[1];switch(n){case 0:return r;case-1:return u;default:return u.indexOf("-")>=0?u.replace(/-/g,"+"):"+".concat(r)}}function H(e,n,t){return t[e.select(n)]||t.other}function W(e,n,t){var r,u,a,o=t.getInternalSlots,c=o(e),l=c.pl,s=c.dataLocaleData,f=c.numberingSystem,D=s.numbers.symbols[f]||s.numbers.symbols[s.numbers.nu[0]],m=0,g=0;if(isNaN(n))u=D.nan;else if(isFinite(n)){"percent"===c.style&&(n*=100),g=(r=L(e,n,{getInternalSlots:o}))[0],m=r[1];var p=j(c,n=g<0?n*Math.pow(10,-g):n/Math.pow(10,g));u=p.formattedString,n=p.roundedNumber}else u=D.infinity;switch(c.signDisplay){case"never":a=0;break;case"auto":a=i(n,0)||n>0||isNaN(n)?0:-1;break;case"always":a=i(n,0)||n>0||isNaN(n)?1:-1;break;default:a=0===n||isNaN(n)?0:n>0?1:-1}return Y({roundedNumber:n,formattedString:u,exponent:g,magnitude:m,sign:a},c.dataLocaleData,l,c)}var V,q=/-u(?:-[0-9a-z]{2,8})+/gi;function J(e,n,t){if(void 0===t&&(t=Error),!e)throw new t(n)}function K(e,n){for(var t=n;;){if(e.has(t))return t;var r=t.lastIndexOf("-");if(!~r)return;r>=2&&"-"===t[r-2]&&(r-=2),t=t.slice(0,r)}}function Q(e,n){J(2===n.length,"key must have 2 elements");var t=e.length,r="-".concat(n,"-"),u=e.indexOf(r);if(-1!==u){for(var i=u+4,a=i,o=i,c=!1;!c;){var l=e.indexOf("-",o);2===(-1===l?t-o:l-o)?c=!0:-1===l?(a=t,c=!0):(a=l,o=l+1)}return e.slice(i,a)}if(r="-".concat(n),-1!==(u=e.indexOf(r))&&u+3===t)return""}function X(e,n,t,r,u,i){var a;a="lookup"===t.localeMatcher?function(e,n,t){for(var r={locale:""},u=0,i=n;u2){var v=o.indexOf("-x-");if(-1===v)o+=l;else{var h=o.slice(0,v),b=o.slice(v,o.length);o=h+l+b}o=Intl.getCanonicalLocales(o)[0]}return c.locale=o,c}function ee(e,n){for(var t=[],r=0,u=n;r-1;)I((r=e.indexOf("}",t))>t,"Invalid pattern ".concat(e)),t>u&&n.push({type:"literal",value:e.substring(u,t)}),n.push({type:e.substring(t+1,r),value:void 0}),u=r+1,t=e.indexOf("{",u);return u8640000000000001?NaN:function(e){var n=r(e);if(isNaN(n)||i(n,-0))return 0;if(isFinite(n))return n;var t=Math.floor(Math.abs(n));return n<0&&(t=-t),i(t,-0)?0:t}(e):NaN},ToObject:u,SameValue:i,ArrayCreate:a,HasOwnProperty:o,Type:function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":void 0},Day:l,WeekDay:function(e){return c(l(e)+4,7)},DayFromYear:s,TimeFromYear:function(e){return Date.UTC(e,0)},YearFromTime:f,DaysInYear:D,DayWithinYear:m,InLeapYear:g,MonthFromTime:p,DateFromTime:function(e){var n=m(e),t=p(e),r=g(e);if(0===t)return n+1;if(1===t)return n-30;if(2===t)return n-58-r;if(3===t)return n-89-r;if(4===t)return n-119-r;if(5===t)return n-150-r;if(6===t)return n-180-r;if(7===t)return n-211-r;if(8===t)return n-242-r;if(9===t)return n-272-r;if(10===t)return n-303-r;if(11===t)return n-333-r;throw new Error("Invalid time")},HourFromTime:function(e){return c(Math.floor(e/36e5),24)},MinFromTime:function(e){return c(Math.floor(e/6e4),60)},SecFromTime:function(e){return c(Math.floor(e/1e3),60)},OrdinaryHasInstance:function(e,n,t){if("function"!=typeof e)return!1;if(null==t?void 0:t.boundTargetFunction)return n instanceof(null==t?void 0:t.boundTargetFunction);if("object"!=typeof n)return!1;var r=e.prototype;if("object"!=typeof r)throw new TypeError("OrdinaryHasInstance called on an object with an invalid prototype property.");return Object.prototype.isPrototypeOf.call(r,n)},msFromTime:function(e){return c(e,1e3)}});export{re as l}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.10d2b054.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.10d2b054.js.gz deleted file mode 100644 index e991563..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.10d2b054.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.15496b0b.js b/custom_components/hacs/hacs_frontend_experimental/c.15496b0b.js deleted file mode 100644 index f956322..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.15496b0b.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e}from"./c.6eb9fcd4.js";import{d as t}from"./c.a5550d10.js";import{bN as s,a7 as i}from"./main-c66a9a06.js";import{s as a}from"./c.874c8cfd.js";const n=(t,s,i)=>t.name_by_user||t.name||i&&((t,s)=>{for(const i of s||[]){const s="string"==typeof i?i:i.entity_id,a=t.states[s];if(a)return e(a)}})(s,i)||s.localize("ui.panel.config.devices.unnamed_device","type",s.localize(`ui.panel.config.devices.type.${t.entry_type||"device"}`)),r=e=>e.sendMessagePromise({type:"config/device_registry/list"}),c=(e,s)=>e.subscribeEvents(t((()=>r(e).then((e=>s.setState(e,!0)))),500,!0),"device_registry_updated"),o=(e,t)=>s("_dr",r,c,e,t),d=(e,t)=>{const s={};for(const i of t){const t=e[i.entity_id];null!=t&&t.domain&&null!==i.device_id&&(s[i.device_id]||(s[i.device_id]=[]),s[i.device_id].push(t.domain))}return s},_=(t,s)=>{if(s.name)return s.name;const i=t.states[s.entity_id];return i?e(i):s.original_name?s.original_name:s.entity_id},y=e=>e.sendMessagePromise({type:"config/entity_registry/list"}),m=(e,s)=>e.subscribeEvents(t((()=>y(e).then((e=>s.setState(e,!0)))),500,!0),"entity_registry_updated"),f=(e,t)=>s("_entityRegistry",y,m,e,t),g=i((e=>{const t={};for(const s of Object.values(e))t[s.id]=s;return t})),p=(e,t)=>e.callWS({type:"config/area_registry/create",...t}),u=e=>e.sendMessagePromise({type:"config/area_registry/list"}).then((e=>e.sort(((e,t)=>a(e.name,t.name))))),l=(e,s)=>e.subscribeEvents(t((()=>u(e).then((e=>s.setState(e,!0)))),500,!0),"area_registry_updated"),v=(e,t)=>s("_areaRegistry",u,l,e,t);export{n as a,v as b,_ as c,f as d,g as e,p as f,d as g,o as s}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.15496b0b.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.15496b0b.js.gz deleted file mode 100644 index a3c49e1..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.15496b0b.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.163f08fb.js b/custom_components/hacs/hacs_frontend_experimental/c.163f08fb.js deleted file mode 100644 index eb10d6a..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.163f08fb.js +++ /dev/null @@ -1,113 +0,0 @@ -import{bw as a,bx as i,by as t,bz as e,bA as o,bB as l,bC as s,bD as d,bE as n,bF as r,bG as c,bH as u,bI as m,bJ as h,bK as v,bL as p,O as _,_ as b,j as g,e as y,t as k,y as f,k as x,aD as w,bM as $,d as z,n as j}from"./main-c66a9a06.js";import{s as U}from"./c.04ecc0ad.js";import{b as I,e as C}from"./c.07e395f8.js";import"./c.bbadaeea.js";const M=(a,i)=>a.callWS({type:"auth/sign_path",path:i}),q="browser",B={album:{icon:a,layout:"grid"},app:{icon:i,layout:"grid"},artist:{icon:t,layout:"grid",show_list_images:!0},channel:{icon:e,thumbnail_ratio:"portrait",layout:"grid"},composer:{icon:o,layout:"grid",show_list_images:!0},contributing_artist:{icon:t,layout:"grid",show_list_images:!0},directory:{icon:l,layout:"grid",show_list_images:!0},episode:{icon:e,layout:"grid",thumbnail_ratio:"portrait"},game:{icon:s,layout:"grid",thumbnail_ratio:"portrait"},genre:{icon:d,layout:"grid",show_list_images:!0},image:{icon:n,layout:"grid"},movie:{icon:r,thumbnail_ratio:"portrait",layout:"grid"},music:{icon:c},playlist:{icon:u,layout:"grid",show_list_images:!0},podcast:{icon:m,layout:"grid"},season:{icon:e,layout:"grid",thumbnail_ratio:"portrait"},track:{icon:h},tv_show:{icon:e,layout:"grid",thumbnail_ratio:"portrait"},url:{icon:v},video:{icon:p,layout:"grid"}},L=(a,i,t,e)=>a.callWS({type:"media_player/browse_media",entity_id:i,media_content_id:t,media_content_type:e}),W=[{name:"media_content_id",required:!1,selector:{text:{}}},{name:"media_content_type",required:!1,selector:{text:{}}}];let F=b([j("ha-selector-media")],(function(a,i){return{F:class extends i{constructor(...i){super(...i),a(this)}},d:[{kind:"field",decorators:[y({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[y({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[y({attribute:!1})],key:"value",value:void 0},{kind:"field",decorators:[y()],key:"label",value:void 0},{kind:"field",decorators:[y()],key:"helper",value:void 0},{kind:"field",decorators:[y({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[y({type:Boolean,reflect:!0})],key:"required",value:()=>!0},{kind:"field",decorators:[k()],key:"_thumbnailUrl",value:void 0},{kind:"method",key:"willUpdate",value:function(a){if(a.has("value")){var i,t,e,o;const s=null===(i=this.value)||void 0===i||null===(t=i.metadata)||void 0===t?void 0:t.thumbnail;if(s===(null===(e=a.get("value"))||void 0===e||null===(o=e.metadata)||void 0===o?void 0:o.thumbnail))return;if(s&&s.startsWith("/"))this._thumbnailUrl=void 0,M(this.hass,s).then((a=>{this._thumbnailUrl=a.path}));else if(s&&s.startsWith("https://brands.home-assistant.io")){var l;this._thumbnailUrl=I({domain:C(s),type:"icon",useFallback:!0,darkOptimized:null===(l=this.hass.themes)||void 0===l?void 0:l.darkMode})}else this._thumbnailUrl=s}}},{kind:"method",key:"render",value:function(){var a,i,t,e,o,l,s,d,n,r,c,u,m;const h=null!==(a=this.value)&&void 0!==a&&a.entity_id?this.hass.states[this.value.entity_id]:void 0,v=!(null!==(i=this.value)&&void 0!==i&&i.entity_id)||h&&U(h,131072);return f` - ${v?f` -
- ${null!==(s=this.value)&&void 0!==s&&null!==(d=s.metadata)&&void 0!==d&&d.thumbnail?f` -
- `:f` -
- -
- `} -
-
- ${null!==(u=this.value)&&void 0!==u&&u.media_content_id?(null===(m=this.value.metadata)||void 0===m?void 0:m.title)||this.value.media_content_id:this.hass.localize("ui.components.selectors.media.pick_media")} -
-
`:f` - ${this.hass.localize("ui.components.selectors.media.browse_not_supported")} - - `}`}},{kind:"field",key:"_computeLabelCallback",value(){return a=>this.hass.localize(`ui.components.selectors.media.${a.name}`)}},{kind:"method",key:"_entityChanged",value:function(a){a.stopPropagation(),_(this,"value-changed",{value:{entity_id:a.detail.value,media_content_id:"",media_content_type:""}})}},{kind:"method",key:"_pickMedia",value:function(){var a,i,t;i=this,t={action:"pick",entityId:this.value.entity_id,navigateIds:null===(a=this.value.metadata)||void 0===a?void 0:a.navigateIds,mediaPickedCallback:a=>{var i;_(this,"value-changed",{value:{...this.value,media_content_id:a.item.media_content_id,media_content_type:a.item.media_content_type,metadata:{title:a.item.title,thumbnail:a.item.thumbnail,media_class:a.item.media_class,children_media_class:a.item.children_media_class,navigateIds:null===(i=a.navigateIds)||void 0===i?void 0:i.map((a=>({media_content_type:a.media_content_type,media_content_id:a.media_content_id})))}}})}},_(i,"show-dialog",{dialogTag:"dialog-media-player-browse",dialogImport:()=>import("./c.06557919.js").then((function(a){return a.d})),dialogParams:t})}},{kind:"get",static:!0,key:"styles",value:function(){return z` - ha-entity-picker { - display: block; - margin-bottom: 16px; - } - mwc-button { - margin-top: 8px; - } - ha-alert { - display: block; - margin-bottom: 16px; - } - ha-card { - position: relative; - width: 200px; - box-sizing: border-box; - cursor: pointer; - } - ha-card.disabled { - pointer-events: none; - color: var(--disabled-text-color); - } - ha-card .thumbnail { - width: 100%; - position: relative; - box-sizing: border-box; - transition: padding-bottom 0.1s ease-out; - padding-bottom: 100%; - } - ha-card .thumbnail.portrait { - padding-bottom: 150%; - } - ha-card .image { - border-radius: 3px 3px 0 0; - } - .folder { - --mdc-icon-size: calc(var(--media-browse-item-size, 175px) * 0.4); - } - .title { - font-size: 16px; - padding-top: 16px; - overflow: hidden; - text-overflow: ellipsis; - margin-bottom: 16px; - padding-left: 16px; - padding-right: 4px; - white-space: nowrap; - } - .image { - position: absolute; - top: 0; - right: 0; - left: 0; - bottom: 0; - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - .centered-image { - margin: 0 8px; - background-size: contain; - } - .icon-holder { - display: flex; - justify-content: center; - align-items: center; - } - `}}]}}),g);var O=Object.freeze({__proto__:null,HaMediaSelector:F});export{q as B,B as M,L as b,M as g,O as h}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.163f08fb.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.163f08fb.js.gz deleted file mode 100644 index 08c64e8..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.163f08fb.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.19f4d198.js b/custom_components/hacs/hacs_frontend_experimental/c.19f4d198.js deleted file mode 100644 index c53e6d4..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.19f4d198.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,u as t}from"./c.743a15a1.js";import{x as n,eK as r}from"./main-c66a9a06.js";import{i as a,a as u,b as i}from"./c.3acef177.js";import"./c.2610e8cd.js";import"./c.a0946910.js";function o(e){return Intl.getCanonicalLocales(e)}function l(e){if("symbol"==typeof e)throw TypeError("Cannot convert a Symbol value to a string");return String(e)}function s(e){if(void 0===e)return NaN;if(null===e)return 0;if("boolean"==typeof e)return e?1:0;if("number"==typeof e)return e;if("symbol"==typeof e||"bigint"==typeof e)throw new TypeError("Cannot convert symbol/bigint to number");return Number(e)}function c(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)}function f(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}function m(e){return new Array(e)}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e,t){return e-Math.floor(e/t)*t}function g(e){return Math.floor(e/864e5)}function D(e){return Date.UTC(e,0)/864e5}function y(e){return new Date(e).getUTCFullYear()}function v(e){return e%4!=0?365:e%100!=0?366:e%400!=0?365:366}function h(e){return g(e)-D(y(e))}function b(e){return 365===v(y(e))?0:1}function F(e){var t=h(e),n=b(e);if(t>=0&&t<31)return 0;if(t<59+n)return 1;if(t<90+n)return 2;if(t<120+n)return 3;if(t<151+n)return 4;if(t<181+n)return 5;if(t<212+n)return 6;if(t<243+n)return 7;if(t<273+n)return 8;if(t<304+n)return 9;if(t<334+n)return 10;if(t<365+n)return 11;throw new Error("Invalid time")}function E(e){return void 0===e?Object.create(null):c(e)}function C(e,t,n,r){if(void 0!==e){if(e=Number(e),isNaN(e)||en)throw new RangeError("".concat(e," is outside of range [").concat(t,", ").concat(n,"]"));return Math.floor(e)}return r}function S(e,t,n,r,a){return C(e[t],n,r,a)}function w(e,t,n,r,a){if("object"!=typeof e)throw new TypeError("Options must be an object");var u=e[t];if(void 0!==u){if("boolean"!==n&&"string"!==n)throw new TypeError("invalid type");if("boolean"===n&&(u=Boolean(u)),"string"===n&&(u=l(u)),void 0!==r&&!r.filter((function(e){return e==u})).length)throw new RangeError("".concat(u," is not within ").concat(r.join(", ")));return u}return a}var T=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"];function A(e){return e.slice(e.indexOf("-")+1)}var M=T.map(A);function L(e){return M.indexOf(e)>-1}var I=/[^A-Z]/;function B(e){return 3===(e=e.replace(/([a-z])/g,(function(e,t){return t.toUpperCase()}))).length&&!I.test(e)}function N(e){if(L(e=e.replace(/([A-Z])/g,(function(e,t){return t.toLowerCase()}))))return!0;var t=e.split("-per-");if(2!==t.length)return!1;var n=t[0],r=t[1];return!(!L(n)||!L(r))}function O(e){return Math.floor(Math.log(e)*Math.LOG10E)}function k(e,t){if("function"==typeof e.repeat)return e.repeat(t);for(var n=new Array(t),r=0;rp[p.length-1])return p[p.length-1].length-1;var d=p.indexOf(m);if(-1===d)return 0;var g=p[d];return"0"===c[g].other?0:g.length-c[g].other.match(/0+/)[0].length}}function x(e,t,n){var r,a,u,i,o=n;if(0===e)r=k("0",o),a=0,u=0;else{var l=e.toString(),s=l.indexOf("e"),c=l.split("e"),f=c[0],m=c[1],p=f.replace(".","");if(s>=0&&p.length<=o)a=+m,r=p+k("0",o-p.length),u=e;else{var d=(a=O(e))-o+1,g=Math.round(y(e,d));y(g,o-1)>=10&&(a+=1,g=Math.floor(g/10)),r=g.toString(),u=y(g,o-1-a)}}if(a>=o-1?(r+=k("0",a-o+1),i=a+1):a>=0?(r="".concat(r.slice(0,a+1),".").concat(r.slice(a+1)),i=a+1):(r="0.".concat(k("0",-a-1)).concat(r),i=1),r.indexOf(".")>=0&&n>t){for(var D=n-t;D>0&&"0"===r[r.length-1];)r=r.slice(0,-1),D--;"."===r[r.length-1]&&(r=r.slice(0,-1))}return{formattedString:r,roundedNumber:u,integerDigitsCount:i};function y(e,t){return t<0?e*Math.pow(10,-t):e/Math.pow(10,t)}}function _(e,t,n){var r,a,u=n,i=Math.round(e*Math.pow(10,u)),o=i/Math.pow(10,u);if(i<1e21)r=i.toString();else{var l=(r=i.toString()).split("e"),s=l[0],c=l[1];r=s.replace(".",""),r+=k("0",Math.max(+c-r.length+1,0))}if(0!==u){var f=r.length;if(f<=u)r=k("0",u+1-f)+r,f=u+1;var m=r.slice(0,f-u),p=r.slice(f-u);r="".concat(m,".").concat(p),a=m.length}else a=r.length;for(var d=n-t;d>0&&"0"===r[r.length-1];)r=r.slice(0,-1),d--;return"."===r[r.length-1]&&(r=r.slice(0,-1)),{formattedString:r,roundedNumber:o,integerDigitsCount:a}}function z(e,t){var n,r=t<0||f(t,-0);switch(r&&(t=-t),e.roundingType){case"significantDigits":n=x(t,e.minimumSignificantDigits,e.maximumSignificantDigits);break;case"fractionDigits":n=_(t,e.minimumFractionDigits,e.maximumFractionDigits);break;default:(n=x(t,1,2)).integerDigitsCount>1&&(n=_(t,0,0))}t=n.roundedNumber;var a=n.formattedString,u=n.integerDigitsCount,i=e.minimumIntegerDigits;u\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/,Z=new RegExp("^".concat(W.source)),V=new RegExp("".concat(W.source,"$")),q=/[#0](?:[\.,][#0]+)*/g;function J(e,t,n,r){var a,u,i=e.sign,o=e.exponent,l=e.magnitude,s=r.notation,c=r.style,f=r.numberingSystem,m=t.numbers.nu[0],p=null;if("compact"===s&&l&&(p=function(e,t,n,r,a,u,i){var o,l,s=e.roundedNumber,c=e.sign,f=e.magnitude,m=String(Math.pow(10,f)),p=n.numbers.nu[0];if("currency"===r&&"name"!==u){var d=null===(o=((g=n.numbers.currency)[i]||g[p]).short)||void 0===o?void 0:o[m];if(!d)return null;l=$(t,s,d)}else{var g,D=((g=n.numbers.decimal)[i]||g[p])[a][m];if(!D)return null;l=$(t,s,D)}if("0"===l)return null;return l=X(l,c).replace(/([^\s;\-\+\d¤]+)/g,"{c:$1}").replace(/0+/,"0")}(e,n,t,c,r.compactDisplay,r.currencyDisplay,f)),"currency"===c&&"name"!==r.currencyDisplay){var d=t.currencies[r.currency];if(d)switch(r.currencyDisplay){case"code":a=r.currency;break;case"symbol":a=d.symbol;break;default:a=d.narrow}else a=r.currency}if(p)u=p;else if("decimal"===c||"unit"===c||"currency"===c&&"name"===r.currencyDisplay)u=X((t.numbers.decimal[f]||t.numbers.decimal[m]).standard,i);else if("currency"===c){u=X((D=t.numbers.currency[f]||t.numbers.currency[m])[r.currencySign],i)}else{u=X(t.numbers.percent[f]||t.numbers.percent[m],i)}var g=q.exec(u)[0];if(u=u.replace(q,"{0}").replace(/'(.)'/g,"$1"),"currency"===c&&"name"!==r.currencyDisplay){var D,y=(D=t.numbers.currency[f]||t.numbers.currency[m]).currencySpacing.afterInsertBetween;y&&!V.test(a)&&(u=u.replace("¤{0}","¤".concat(y,"{0}")));var v=D.currencySpacing.beforeInsertBetween;v&&!Z.test(a)&&(u=u.replace("{0}¤","{0}".concat(v,"¤")))}for(var h=u.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g),b=[],F=t.numbers.symbols[f]||t.numbers.symbols[m],E=0,C=h;E0?(f=l.slice(0,p),m=l.slice(p+1)):f=l,u&&("compact"!==n||s>=1e4)){var d=e.group,g=[],D=i.split(".")[0].split(","),y=3,v=3;D.length>1&&(y=D[D.length-1].length),D.length>2&&(v=D[D.length-2].length);var h=f.length-y;if(h>0){for(g.push(f.slice(h,h+y)),h-=v;h>0;h-=v)g.push(f.slice(h,h+v));g.push(f.slice(0,h+v))}else g.push(f);for(;g.length>0;){var b=g.pop();o.push({type:"integer",value:b}),g.length>0&&o.push({type:"group",value:d})}}else o.push({type:"integer",value:f});if(void 0!==m&&o.push({type:"decimal",value:e.decimal},{type:"fraction",value:m}),("scientific"===n||"engineering"===n)&&isFinite(s)){o.push({type:"exponentSeparator",value:e.exponential}),r<0&&(o.push({type:"exponentMinusSign",value:e.minusSign}),r=-r);var F=_(r,0,0);o.push({type:"exponentInteger",value:F.formattedString})}return o}function X(e,t){e.indexOf(";")<0&&(e="".concat(e,";-").concat(e));var n=e.split(";"),r=n[0],a=n[1];switch(t){case 0:return r;case-1:return a;default:return a.indexOf("-")>=0?a.replace(/-/g,"+"):"+".concat(r)}}function $(e,t,n){return n[e.select(t)]||n.other}function ee(e,t,n){var r,a,u,i=n.getInternalSlots,o=i(e),l=o.pl,s=o.dataLocaleData,c=o.numberingSystem,m=s.numbers.symbols[c]||s.numbers.symbols[s.numbers.nu[0]],p=0,d=0;if(isNaN(t))a=m.nan;else if(isFinite(t)){"percent"===o.style&&(t*=100),d=(r=U(e,t,{getInternalSlots:i}))[0],p=r[1];var g=z(o,t=d<0?t*Math.pow(10,-d):t/Math.pow(10,d));a=g.formattedString,t=g.roundedNumber}else a=m.infinity;switch(o.signDisplay){case"never":u=0;break;case"auto":u=f(t,0)||t>0||isNaN(t)?0:-1;break;case"always":u=f(t,0)||t>0||isNaN(t)?1:-1;break;default:u=0===t||isNaN(t)?0:t>0?1:-1}return J({roundedNumber:t,formattedString:a,exponent:d,magnitude:p,sign:u},o.dataLocaleData,l,o)}function te(e,t,n){void 0===t&&(t=Object.create(null));var r=(0,n.getInternalSlots)(e),a=w(t,"style","string",["decimal","percent","currency","unit"],"decimal");r.style=a;var u=w(t,"currency","string",void 0,void 0);if(void 0!==u&&!B(u))throw RangeError("Malformed currency code");if("currency"===a&&void 0===u)throw TypeError("currency cannot be undefined");var i=w(t,"currencyDisplay","string",["code","symbol","narrowSymbol","name"],"symbol"),o=w(t,"currencySign","string",["standard","accounting"],"standard"),l=w(t,"unit","string",void 0,void 0);if(void 0!==l&&!N(l))throw RangeError("Invalid unit argument for Intl.NumberFormat()");if("unit"===a&&void 0===l)throw TypeError("unit cannot be undefined");var s=w(t,"unitDisplay","string",["short","narrow","long"],"short");"currency"===a&&(r.currency=u.toUpperCase(),r.currencyDisplay=i,r.currencySign=o),"unit"===a&&(r.unit=l,r.unitDisplay=s)}function ne(e,t,n,r,a){var u=S(t,"minimumIntegerDigits",1,21,1),i=t.minimumFractionDigits,o=t.maximumFractionDigits,l=t.minimumSignificantDigits,s=t.maximumSignificantDigits;if(e.minimumIntegerDigits=u,void 0!==l||void 0!==s)e.roundingType="significantDigits",l=C(l,1,21,1),s=C(s,l,21,21),e.minimumSignificantDigits=l,e.maximumSignificantDigits=s;else if(void 0!==i||void 0!==o){e.roundingType="fractionDigits",i=C(i,0,20,n),o=C(o,i,20,Math.max(i,r)),e.minimumFractionDigits=i,e.maximumFractionDigits=o}else"compact"===a?e.roundingType="compactRounding":(e.roundingType="fractionDigits",e.minimumFractionDigits=n,e.maximumFractionDigits=r)}!function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="MISSING_LOCALE_DATA",t}n(t,e)}(Error),function(e){e.startRange="startRange",e.shared="shared",e.endRange="endRange"}(H||(H={}));var re=Object.freeze({__proto__:null,_formatToParts:J,getInternalSlot:function(e,t,n){return j(e,t,n)[n]},getMultiInternalSlots:j,isLiteralPart:function(e){return"literal"===e.type},setInternalSlot:P,setMultiInternalSlots:function(e,t,n){for(var r=0,a=Object.keys(n);r-1;)R((r=e.indexOf("}",n))>n,"Invalid pattern ".concat(e)),n>a&&t.push({type:"literal",value:e.substring(a,n)}),t.push({type:e.substring(n+1,r),value:void 0}),a=r+1,n=e.indexOf("{",a);return a8640000000000001?NaN:function(e){var t=s(e);if(isNaN(t)||f(t,-0))return 0;if(isFinite(t))return t;var n=Math.floor(Math.abs(t));return t<0&&(n=-n),f(n,-0)?0:n}(e):NaN},ToObject:c,SameValue:f,ArrayCreate:m,HasOwnProperty:p,Type:function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":void 0},Day:g,WeekDay:function(e){return d(g(e)+4,7)},DayFromYear:D,TimeFromYear:function(e){return Date.UTC(e,0)},YearFromTime:y,DaysInYear:v,DayWithinYear:h,InLeapYear:b,MonthFromTime:F,DateFromTime:function(e){var t=h(e),n=F(e),r=b(e);if(0===n)return t+1;if(1===n)return t-30;if(2===n)return t-58-r;if(3===n)return t-89-r;if(4===n)return t-119-r;if(5===n)return t-150-r;if(6===n)return t-180-r;if(7===n)return t-211-r;if(8===n)return t-242-r;if(9===n)return t-272-r;if(10===n)return t-303-r;if(11===n)return t-333-r;throw new Error("Invalid time")},HourFromTime:function(e){return d(Math.floor(e/36e5),24)},MinFromTime:function(e){return d(Math.floor(e/6e4),60)},SecFromTime:function(e){return d(Math.floor(e/1e3),60)},OrdinaryHasInstance:function(e,t,n){if("function"!=typeof e)return!1;if(null==n?void 0:n.boundTargetFunction)return t instanceof(null==n?void 0:n.boundTargetFunction);if("object"!=typeof t)return!1;var r=e.prototype;if("object"!=typeof r)throw new TypeError("OrdinaryHasInstance called on an object with an invalid prototype property.");return Object.prototype.isPrototypeOf.call(r,t)},msFromTime:function(e){return d(e,1e3)}}),ae=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.InitializeRelativeTimeFormat=void 0;var n=/^[a-z0-9]{3,8}(-[a-z0-9]{3,8})*$/i;t.InitializeRelativeTimeFormat=function(e,t,r,a){var u=a.getInternalSlots,o=a.availableLocales,l=a.relevantExtensionKeys,s=a.localeData,c=a.getDefaultLocale,f=u(e);f.initializedRelativeTimeFormat=!0;var m=(0,re.CanonicalizeLocaleList)(t),p=Object.create(null),d=(0,re.CoerceOptionsToObject)(r),g=(0,re.GetOption)(d,"localeMatcher","string",["best fit","lookup"],"best fit");p.localeMatcher=g;var D=(0,re.GetOption)(d,"numberingSystem","string",void 0,void 0);if(void 0!==D&&!n.test(D))throw new RangeError("Invalid numbering system ".concat(D));p.nu=D;var y=(0,i.ResolveLocale)(o,m,p,l,s,c),v=y.locale,h=y.nu;f.locale=v,f.style=(0,re.GetOption)(d,"style","string",["long","narrow","short"],"long"),f.numeric=(0,re.GetOption)(d,"numeric","string",["always","auto"],"always");var b=s[y.dataLocale];return(0,re.invariant)(!!b,"Missing locale data for ".concat(y.dataLocale)),f.fields=b,f.numberFormat=new Intl.NumberFormat(t),f.pluralRules=new Intl.PluralRules(t),f.numberingSystem=h,e}}));t(ae),ae.InitializeRelativeTimeFormat;var ue=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SingularRelativeTimeUnit=void 0,t.SingularRelativeTimeUnit=function(e){if((0,re.invariant)("String"===(0,re.Type)(e),"unit must be a string"),"seconds"===e)return"second";if("minutes"===e)return"minute";if("hours"===e)return"hour";if("days"===e)return"day";if("weeks"===e)return"week";if("months"===e)return"month";if("quarters"===e)return"quarter";if("years"===e)return"year";if("second"!==e&&"minute"!==e&&"hour"!==e&&"day"!==e&&"week"!==e&&"month"!==e&&"quarter"!==e&&"year"!==e)throw new RangeError("invalid unit");return e}}));t(ue),ue.SingularRelativeTimeUnit;var ie=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MakePartsList=void 0,t.MakePartsList=function(e,t,n){for(var r=[],a=0,u=(0,re.PartitionPattern)(e);aimport("./c.b5117688.js");e([s("ha-date-input")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"locale",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"method",key:"render",value:function(){return l` - - `}},{kind:"method",key:"_openDialog",value:function(){var e,a;this.disabled||(e=this,a={min:"1970-01-01",value:this.value,onChange:e=>this._valueChanged(e),locale:this.locale.language,firstWeekday:n(this.locale)},o(e,"show-dialog",{dialogTag:"ha-dialog-date-picker",dialogImport:c,dialogParams:a}))}},{kind:"method",key:"_valueChanged",value:function(e){this.value!==e&&(this.value=e,o(this,"change"),o(this,"value-changed",{value:e}))}},{kind:"get",static:!0,key:"styles",value:function(){return d` - ha-svg-icon { - color: var(--secondary-text-color); - } - `}}]}}),a); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.1cede1b9.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.1cede1b9.js.gz deleted file mode 100644 index 8240308..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.1cede1b9.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.2119319f.js b/custom_components/hacs/hacs_frontend_experimental/c.2119319f.js deleted file mode 100644 index 8a430b3..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.2119319f.js +++ /dev/null @@ -1,17 +0,0 @@ -import{_ as e,j as a,e as t,y as i,O as d,d as l,n as s}from"./main-c66a9a06.js";import"./c.bbadaeea.js";import"./c.6912e15e.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.930daaba.js";let o=e([s("ha-selector-boolean")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[t()],key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"disabled",value:()=>!1},{kind:"method",key:"render",value:function(){return i` - - - - ${this.helper?i`${this.helper}`:""} - `}},{kind:"method",key:"_handleChange",value:function(e){const a=e.target.checked;this.value!==a&&d(this,"value-changed",{value:a})}},{kind:"get",static:!0,key:"styles",value:function(){return l` - ha-formfield { - display: flex; - height: 56px; - align-items: center; - --mdc-typography-body2-font-size: 1em; - } - `}}]}}),a);export{o as HaBooleanSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.2119319f.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.2119319f.js.gz deleted file mode 100644 index db5d810..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.2119319f.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.22640678.js b/custom_components/hacs/hacs_frontend_experimental/c.22640678.js deleted file mode 100644 index d9ddfda..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.22640678.js +++ /dev/null @@ -1,13 +0,0 @@ -import{_ as e,j as a,e as l,y as i,O as d,n as o}from"./main-c66a9a06.js";let r=e([o("ha-selector-icon")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[l()],key:"hass",value:void 0},{kind:"field",decorators:[l()],key:"selector",value:void 0},{kind:"field",decorators:[l()],key:"value",value:void 0},{kind:"field",decorators:[l()],key:"label",value:void 0},{kind:"field",decorators:[l()],key:"helper",value:void 0},{kind:"field",decorators:[l({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[l({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){var e,a;return i` - - `}},{kind:"method",key:"_valueChanged",value:function(e){d(this,"value-changed",{value:e.detail.value})}}]}}),a);export{r as HaIconSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.22640678.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.22640678.js.gz deleted file mode 100644 index 681b964..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.22640678.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.24287846.js b/custom_components/hacs/hacs_frontend_experimental/c.24287846.js deleted file mode 100644 index 3bcb1b2..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.24287846.js +++ /dev/null @@ -1,176 +0,0 @@ -import{P as t,Q as i,S as a}from"./main-c66a9a06.js";t({_template:i` - - - -`,is:"paper-tooltip",hostAttributes:{role:"tooltip",tabindex:-1},properties:{for:{type:String,observer:"_findTarget"},manualMode:{type:Boolean,value:!1,observer:"_manualModeChanged"},position:{type:String,value:"bottom"},fitToVisibleBounds:{type:Boolean,value:!1},offset:{type:Number,value:14},marginTop:{type:Number,value:14},animationDelay:{type:Number,value:500,observer:"_delayChange"},animationEntry:{type:String,value:""},animationExit:{type:String,value:""},animationConfig:{type:Object,value:function(){return{entry:[{name:"fade-in-animation",node:this,timing:{delay:0}}],exit:[{name:"fade-out-animation",node:this}]}}},_showing:{type:Boolean,value:!1}},listeners:{webkitAnimationEnd:"_onAnimationEnd"},get target(){var t=a(this).parentNode,i=a(this).getOwnerRoot();return this.for?a(i).querySelector("#"+this.for):t.nodeType==Node.DOCUMENT_FRAGMENT_NODE?i.host:t},attached:function(){this._findTarget()},detached:function(){this.manualMode||this._removeListeners()},playAnimation:function(t){"entry"===t?this.show():"exit"===t&&this.hide()},cancelAnimation:function(){this.$.tooltip.classList.add("cancel-animation")},show:function(){if(!this._showing){if(""===a(this).textContent.trim()){for(var t=!0,i=a(this).getEffectiveChildNodes(),n=0;nwindow.innerWidth?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,i)+"px",this.style.right="auto"),n.top+a+o.height>window.innerHeight?(this.style.bottom=n.height-p+t+"px",this.style.top="auto"):(this.style.top=Math.max(-n.top,a)+"px",this.style.bottom="auto")):(this.style.left=i+"px",this.style.top=a+"px")}},_addListeners:function(){this._target&&(this.listen(this._target,"mouseenter","show"),this.listen(this._target,"focus","show"),this.listen(this._target,"mouseleave","hide"),this.listen(this._target,"blur","hide"),this.listen(this._target,"tap","hide")),this.listen(this.$.tooltip,"animationend","_onAnimationEnd"),this.listen(this,"mouseenter","hide")},_findTarget:function(){this.manualMode||this._removeListeners(),this._target=this.target,this.manualMode||this._addListeners()},_delayChange:function(t){500!==t&&this.updateStyles({"--paper-tooltip-delay-in":t+"ms"})},_manualModeChanged:function(){this.manualMode?this._removeListeners():this._addListeners()},_cancelAnimation:function(){this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add("hidden")},_onAnimationFinish:function(){this._showing&&(this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add(this._getAnimationType("exit")))},_onAnimationEnd:function(){this._animationPlaying=!1,this._showing||(this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.add("hidden"))},_getAnimationType:function(t){if("entry"===t&&""!==this.animationEntry)return this.animationEntry;if("exit"===t&&""!==this.animationExit)return this.animationExit;if(this.animationConfig[t]&&"string"==typeof this.animationConfig[t][0].name){if(this.animationConfig[t][0].timing&&this.animationConfig[t][0].timing.delay&&0!==this.animationConfig[t][0].timing.delay){var i=this.animationConfig[t][0].timing.delay;"entry"===t?this.updateStyles({"--paper-tooltip-delay-in":i+"ms"}):"exit"===t&&this.updateStyles({"--paper-tooltip-delay-out":i+"ms"})}return this.animationConfig[t][0].name}},_removeListeners:function(){this._target&&(this.unlisten(this._target,"mouseenter","show"),this.unlisten(this._target,"focus","show"),this.unlisten(this._target,"mouseleave","hide"),this.unlisten(this._target,"blur","hide"),this.unlisten(this._target,"tap","hide")),this.unlisten(this.$.tooltip,"animationend","_onAnimationEnd"),this.unlisten(this,"mouseenter","hide")}}); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.24287846.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.24287846.js.gz deleted file mode 100644 index f7480d7..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.24287846.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.271a0d49.js b/custom_components/hacs/hacs_frontend_experimental/c.271a0d49.js deleted file mode 100644 index fb87000..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.271a0d49.js +++ /dev/null @@ -1,56 +0,0 @@ -import{_ as e,j as a,e as o,y as t,aF as i,k as s,aE as l,d as n,n as r,a7 as c,aB as d,af as h,aw as p,ag as m,aG as u,aH as f,aI as g,aJ as b,ax as v,aK as y,a4 as _,ai as w,aL as k,aM as $}from"./main-c66a9a06.js";import"./c.41d13611.js";import"./c.24287846.js";import{g as z}from"./c.f2bb3724.js";import{s as x}from"./c.4b0dc107.js";e([r("ha-icon-overflow-menu")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[o({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[o({type:Array})],key:"items",value:()=>[]},{kind:"field",decorators:[o({type:Boolean})],key:"narrow",value:()=>!1},{kind:"method",key:"render",value:function(){return t` - ${this.narrow?t` - - - - ${this.items.map((e=>e.divider?t`
  • `:t` -
    - -
    - ${e.label} -
    `))} -
    `:t` - - ${this.items.map((e=>e.narrowOnly?"":e.divider?t`
    `:t`
    - ${e.tooltip?t` - ${e.tooltip} - `:""} - -
    `))} - `} - `}},{kind:"method",key:"_handleIconOverflowMenuOpened",value:function(e){e.stopPropagation();const a=this.closest(".mdc-data-table__row");a&&(a.style.zIndex="1")}},{kind:"method",key:"_handleIconOverflowMenuClosed",value:function(){const e=this.closest(".mdc-data-table__row");e&&(e.style.zIndex="")}},{kind:"get",static:!0,key:"styles",value:function(){return[l,n` - :host { - display: flex; - justify-content: flex-end; - } - li[role="separator"] { - border-bottom-color: var(--divider-color); - } - div[role="separator"] { - border-right: 1px solid var(--divider-color); - width: 1px; - } - `]}}]}}),a);const E=c(((e,a)=>[..."HACS-EXPERIMENTAL-PANEL"===e.nodeName?[{path:d,label:e.hacs.localize("common.show"),action:()=>h(`/hacs/repository/${a.id}`)}]:[],{path:p,label:e.hacs.localize("common.repository"),action:()=>m.open(`https://github.com/${a.full_name}`,"_blank","noreferrer=true")},{path:u,label:e.hacs.localize("repository_card.update_information"),action:async()=>{await f(e.hass,String(a.id))}},...a.installed_version?[{path:g,label:e.hacs.localize("repository_card.redownload"),action:()=>O(e,a.id),hideForUninstalled:!0}]:[],..."plugin"===a.category&&a.installed_version?[{path:b,label:e.hacs.localize("repository_card.open_source"),action:()=>m.open(`/hacsfiles/${a.local_path.split("/").pop()}/${a.file_name}`,"_blank","noreferrer=true")}]:[],{divider:!0},{path:v,label:e.hacs.localize("repository_card.open_issue"),action:()=>m.open(`https://github.com/${a.full_name}/issues`,"_blank","noreferrer=true")},..."172733314"!==a.id&&a.installed_version?[{path:y,label:e.hacs.localize("repository_card.report"),action:()=>m.open(`https://github.com/hacs/integration/issues/new?assignees=ludeeus&labels=flag&template=removal.yml&repo=${a.full_name}&title=Request for removal of ${a.full_name}`,"_blank","noreferrer=true"),warning:!0},{path:_,label:e.hacs.localize("common.remove"),action:async()=>{if("integration"===a.category&&a.config_flow){if((await z(e.hass)).some((e=>e.domain===a.domain))){if(await x(e,{title:e.hacs.localize("dialog.configured.title"),text:e.hacs.localize("dialog.configured.message",{name:a.name}),dismissText:e.hacs.localize("common.ignore"),confirmText:e.hacs.localize("common.navigate"),confirm:()=>{h("/config/integrations",{replace:!0})}}))return}}e.dispatchEvent(new CustomEvent("hacs-dialog",{detail:{type:"progress",title:e.hacs.localize("dialog.remove.title"),confirmText:e.hacs.localize("dialog.remove.title"),content:e.hacs.localize("dialog.remove.message",{name:a.name}),confirm:async()=>{await I(e,a)}},bubbles:!0,composed:!0}))},warning:!0}]:[]])),O=(e,a)=>{e.dispatchEvent(new CustomEvent("hacs-dialog",{detail:{type:"download",repository:a},bubbles:!0,composed:!0}))},I=async(e,a)=>{var o;if("plugin"===a.category&&"yaml"!==(null===(o=e.hacs.info)||void 0===o?void 0:o.lovelace_mode)){(await w(e.hass)).filter((e=>e.url.startsWith(`/hacsfiles/${a.full_name.split("/")[1]}/${a.file_name}`))).forEach((async a=>{await k(e.hass,String(a.id))}))}await $(e.hass,String(a.id)),"HACS-REPOSITORY-PANEL"===e.nodeName&&history.back()},S=e=>a=>({kind:"method",placement:"prototype",key:a.key,descriptor:{set(e){this[`__${String(a.key)}`]=e},get(){return this[`__${String(a.key)}`]},enumerable:!0,configurable:!0},finisher(o){const t=o.prototype.connectedCallback;o.prototype.connectedCallback=function(){if(t.call(this),this[a.key]){const o=this.renderRoot.querySelector(e);if(!o)return;o.scrollTop=this[a.key]}}}});export{E as a,S as r}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.271a0d49.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.271a0d49.js.gz deleted file mode 100644 index 72f0dee..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.271a0d49.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.279495d9.js b/custom_components/hacs/hacs_frontend_experimental/c.279495d9.js deleted file mode 100644 index 6412980..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.279495d9.js +++ /dev/null @@ -1 +0,0 @@ -import{I as e,J as s,L as t,N as r}from"./main-c66a9a06.js";import{m as l,u as n,r as o,p as i,a}from"./c.a5550d10.js";const u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},f=e(class extends s{constructor(e){if(super(e),e.type!==t.CHILD)throw Error("repeat() can only be used in text expressions")}ht(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],n=[];let o=0;for(const s of e)l[o]=r?r(s,o):o,n[o]=t(s,o),o++;return{values:n,keys:l}}render(e,s,t){return this.ht(e,s,t).values}update(e,[s,t,f]){var c;const h=l(e),{values:d,keys:p}=this.ht(s,t,f);if(!Array.isArray(h))return this.ut=p,d;const v=null!==(c=this.ut)&&void 0!==c?c:this.ut=[],y=[];let m,x,g=0,j=h.length-1,k=0,w=d.length-1;for(;g<=j&&k<=w;)if(null===h[g])g++;else if(null===h[j])j--;else if(v[g]===p[k])y[k]=n(h[g],d[k]),g++,k++;else if(v[j]===p[w])y[w]=n(h[j],d[w]),j--,w--;else if(v[g]===p[w])y[w]=n(h[g],d[w]),o(e,y[w+1],h[g]),g++,w--;else if(v[j]===p[k])y[k]=n(h[j],d[k]),o(e,h[g],h[j]),j--,k++;else if(void 0===m&&(m=u(p,k,w),x=u(v,g,j)),m.has(v[g]))if(m.has(v[j])){const s=x.get(p[k]),t=void 0!==s?h[s]:null;if(null===t){const s=o(e,h[g]);n(s,d[k]),y[k]=s}else y[k]=n(t,d[k]),o(e,h[g],t),h[s]=null;k++}else i(h[j]),j--;else i(h[g]),g++;for(;k<=w;){const s=o(e,y[w+1]);n(s,d[k]),y[k++]=s}for(;g<=j;){const e=h[g++];null!==e&&i(e)}return this.ut=p,a(e,y),r}});export{f as c}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.279495d9.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.279495d9.js.gz deleted file mode 100644 index 37efc34..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.279495d9.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.292020a1.js b/custom_components/hacs/hacs_frontend_experimental/c.292020a1.js deleted file mode 100644 index be1d7a0..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.292020a1.js +++ /dev/null @@ -1,24 +0,0 @@ -import{_ as e,j as t,e as a,y as i,eE as l,O as d,eF as r,d as s,n as o}from"./main-c66a9a06.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";let n=e([o("ha-selector-color_rgb")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[a({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[a({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[a()],key:"value",value:void 0},{kind:"field",decorators:[a()],key:"label",value:void 0},{kind:"field",decorators:[a()],key:"helper",value:void 0},{kind:"field",decorators:[a({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[a({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){return i` - - `}},{kind:"method",key:"_valueChanged",value:function(e){const t=e.target.value;d(this,"value-changed",{value:r(t)})}},{kind:"field",static:!0,key:"styles",value:()=>s` - :host { - display: flex; - justify-content: flex-end; - align-items: center; - } - ha-textfield { - --text-field-padding: 8px; - min-width: 75px; - flex-grow: 1; - margin: 0 4px; - } - `}]}}),t);export{n as HaColorRGBSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.292020a1.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.292020a1.js.gz deleted file mode 100644 index 4f5e35d..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.292020a1.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.2aa69e2c.js b/custom_components/hacs/hacs_frontend_experimental/c.2aa69e2c.js deleted file mode 100644 index 45d5c6c..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.2aa69e2c.js +++ /dev/null @@ -1,11 +0,0 @@ -import{_ as e,j as d,e as i,y as a,n as r}from"./main-c66a9a06.js";import"./c.1cede1b9.js";import"./c.31caccfc.js";import"./c.3acef177.js";import"./c.743a15a1.js";import"./c.2610e8cd.js";import"./c.a0946910.js";import"./c.d9d8b90e.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";let o=e([r("ha-selector-date")],(function(e,d){return{F:class extends d{constructor(...d){super(...d),e(this)}},d:[{kind:"field",decorators:[i()],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"selector",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){return a` - - - `}}]}}),d);export{o as HaDateSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.2aa69e2c.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.2aa69e2c.js.gz deleted file mode 100644 index c176fa4..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.2aa69e2c.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.306b0cf1.js b/custom_components/hacs/hacs_frontend_experimental/c.306b0cf1.js deleted file mode 100644 index c9b8514..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.306b0cf1.js +++ /dev/null @@ -1,29 +0,0 @@ -import{_ as e,j as t,e as i,y as a,d as s,O as l,n as d}from"./main-c66a9a06.js";import"./c.41d13611.js";import{s as r}from"./c.a5550d10.js";import"./c.8e28b461.js";e([d("ha-theme-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!1},{kind:"method",key:"render",value:function(){return a` - - ${this.hass.localize("ui.components.theme-picker.no_theme")} - ${Object.keys(this.hass.themes.themes).sort().map((e=>a`${e}`))} - - `}},{kind:"get",static:!0,key:"styles",value:function(){return s` - ha-select { - width: 100%; - } - `}},{kind:"method",key:"_changed",value:function(e){this.hass&&""!==e.target.value&&(this.value="remove"===e.target.value?void 0:e.target.value,l(this,"value-changed",{value:this.value}))}}]}}),t);let o=e([d("ha-selector-theme")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){return a` - - `}}]}}),t);export{o as HaThemeSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.306b0cf1.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.306b0cf1.js.gz deleted file mode 100644 index 89a5e37..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.306b0cf1.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.31caccfc.js b/custom_components/hacs/hacs_frontend_experimental/c.31caccfc.js deleted file mode 100644 index 1f8ed29..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.31caccfc.js +++ /dev/null @@ -1 +0,0 @@ -import{a7 as a}from"./main-c66a9a06.js";import{p as e}from"./c.3acef177.js";e&&await e,a((a=>new Intl.DateTimeFormat(a.language,{weekday:"long",month:"long",day:"numeric"})));const n=(a,e)=>m(e).format(a),m=a((a=>new Intl.DateTimeFormat(a.language,{year:"numeric",month:"long",day:"numeric"}))),t=(a,e)=>r(e).format(a),r=a((a=>new Intl.DateTimeFormat(a.language,{year:"numeric",month:"numeric",day:"numeric"})));a((a=>new Intl.DateTimeFormat(a.language,{day:"numeric",month:"short"}))),a((a=>new Intl.DateTimeFormat(a.language,{month:"long",year:"numeric"}))),a((a=>new Intl.DateTimeFormat(a.language,{month:"long"}))),a((a=>new Intl.DateTimeFormat(a.language,{year:"numeric"})));export{t as a,n as f}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.31caccfc.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.31caccfc.js.gz deleted file mode 100644 index 8cb1379..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.31caccfc.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.36dd0689.js b/custom_components/hacs/hacs_frontend_experimental/c.36dd0689.js deleted file mode 100644 index b91c992..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.36dd0689.js +++ /dev/null @@ -1,11 +0,0 @@ -import{_ as e,j as a,e as i,y as d,O as r,n as l}from"./main-c66a9a06.js";import"./c.6829e397.js";import"./c.bbadaeea.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.930daaba.js";let o=e([l("ha-selector-navigation")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[i()],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"selector",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){return d` - - `}},{kind:"method",key:"_valueChanged",value:function(e){r(this,"value-changed",{value:e.detail.value})}}]}}),a);export{o as HaNavigationSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.36dd0689.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.36dd0689.js.gz deleted file mode 100644 index 3911df2..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.36dd0689.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.39ffd18a.js b/custom_components/hacs/hacs_frontend_experimental/c.39ffd18a.js deleted file mode 100644 index 6de25b8..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.39ffd18a.js +++ /dev/null @@ -1,29 +0,0 @@ -import{_ as e,j as t,e as i,i as a,y as o,n as d,E as s,G as l,O as r}from"./main-c66a9a06.js";import{S as u}from"./c.baaad129.js";import{f as n}from"./c.d0468013.js";import"./c.bbadaeea.js";import"./c.708f0e16.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.31caccfc.js";import"./c.3acef177.js";import"./c.743a15a1.js";import"./c.2610e8cd.js";import"./c.a0946910.js";import"./c.e95db283.js";import"./c.930daaba.js";e([d("ha-entity-attribute-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"entityId",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"hide-attributes"})],key:"hideAttributes",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"autofocus",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[i({type:Boolean,attribute:"allow-custom-value"})],key:"allowCustomValue",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"_opened",value:()=>!1},{kind:"field",decorators:[a("ha-combo-box",!0)],key:"_comboBox",value:void 0},{kind:"method",key:"shouldUpdate",value:function(e){return!(!e.has("_opened")&&this._opened)}},{kind:"method",key:"updated",value:function(e){if(e.has("_opened")&&this._opened){const e=this.entityId?this.hass.states[this.entityId]:void 0;this._comboBox.items=e?Object.keys(e.attributes).filter((e=>{var t;return!(null!==(t=this.hideAttributes)&&void 0!==t&&t.includes(e))})).map((e=>({value:e,label:n(e)}))):[]}}},{kind:"method",key:"render",value:function(){var e;return this.hass?o` - - - `:o``}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_valueChanged",value:function(e){this.value=e.detail.value}}]}}),t);let c=e([d("ha-selector-attribute")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!0},{kind:"field",decorators:[i({attribute:!1})],key:"context",value:void 0},{kind:"method",key:"render",value:function(){var e,t,i;return o` - - `}},{kind:"method",key:"updated",value:function(e){var t;if(s(l(a.prototype),"updated",this).call(this,e),!this.value||null!==(t=this.selector.attribute)&&void 0!==t&&t.entity_id||!e.has("context"))return;const i=e.get("context");if(!this.context||(null==i?void 0:i.filter_entity)===this.context.filter_entity)return;let o=!1;if(this.context.filter_entity){const e=this.hass.states[this.context.filter_entity];e&&this.value in e.attributes||(o=!0)}else o=void 0!==this.value;o&&r(this,"value-changed",{value:void 0})}}]}}),u(t));export{c as HaSelectorAttribute}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.39ffd18a.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.39ffd18a.js.gz deleted file mode 100644 index 374f108..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.39ffd18a.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.3a821144.js b/custom_components/hacs/hacs_frontend_experimental/c.3a821144.js deleted file mode 100644 index 8d2a177..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.3a821144.js +++ /dev/null @@ -1,63 +0,0 @@ -import{_ as e,j as i,e as t,y as s,O as d,d as a,n as l,t as c,a7 as r,E as o,G as n}from"./main-c66a9a06.js";import{g as v,d as u}from"./c.15496b0b.js";import{f as h,b as k}from"./c.6f18200a.js";import{S as p}from"./c.baaad129.js";import"./c.9381c7ae.js";import"./c.6eb9fcd4.js";import"./c.1024e243.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.874c8cfd.js";import"./c.fa0ef026.js";import"./c.d2f13ac1.js";import"./c.bbadaeea.js";import"./c.930daaba.js";e([l("ha-devices-picker")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"disabled",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:void 0},{kind:"field",decorators:[t({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[t({type:Array,attribute:"exclude-domains"})],key:"excludeDomains",value:void 0},{kind:"field",decorators:[t({attribute:"picked-device-label"}),t({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",key:"pickedDeviceLabel",value:void 0},{kind:"field",decorators:[t({attribute:"pick-device-label"})],key:"pickDeviceLabel",value:void 0},{kind:"field",decorators:[t()],key:"deviceFilter",value:void 0},{kind:"method",key:"render",value:function(){if(!this.hass)return s``;const e=this._currentDevices;return s` - ${e.map((e=>s` -
    - -
    - `))} -
    - -
    - `}},{kind:"get",key:"_currentDevices",value:function(){return this.value||[]}},{kind:"method",key:"_updateDevices",value:async function(e){d(this,"value-changed",{value:e}),this.value=e}},{kind:"method",key:"_deviceChanged",value:function(e){e.stopPropagation();const i=e.currentTarget.curValue,t=e.detail.value;t!==i&&""===t&&(""===t?this._updateDevices(this._currentDevices.filter((e=>e!==i))):this._updateDevices(this._currentDevices.map((e=>e===i?t:e))))}},{kind:"method",key:"_addDevice",value:async function(e){e.stopPropagation();const i=e.detail.value;if(e.currentTarget.value="",!i)return;const t=this._currentDevices;t.includes(i)||this._updateDevices([...t,i])}},{kind:"field",static:!0,key:"styles",value:()=>a` - div { - margin-top: 8px; - } - `}]}}),i);let y=e([l("ha-selector-device")],(function(e,i){class d extends i{constructor(...i){super(...i),e(this)}}return{F:d,d:[{kind:"field",decorators:[t()],key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"selector",value:void 0},{kind:"field",decorators:[c()],key:"_entitySources",value:void 0},{kind:"field",decorators:[c()],key:"_entities",value:void 0},{kind:"field",decorators:[t()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:()=>!0},{kind:"field",key:"_deviceIntegrationLookup",value:()=>r(v)},{kind:"method",key:"hassSubscribe",value:function(){return[u(this.hass.connection,(e=>{this._entities=e.filter((e=>null!==e.device_id))}))]}},{kind:"method",key:"updated",value:function(e){var i;o(n(d.prototype),"updated",this).call(this,e),e.has("selector")&&null!==(i=this.selector.device)&&void 0!==i&&i.integration&&!this._entitySources&&h(this.hass).then((e=>{this._entitySources=e}))}},{kind:"method",key:"render",value:function(){var e,i,t,d,a,l,c,r;return null!==(e=this.selector.device)&&void 0!==e&&e.integration&&!this._entitySources?s``:null!==(i=this.selector.device)&&void 0!==i&&i.multiple?s` - ${this.label?s``:""} - - `:s` - - `}},{kind:"field",key:"_filterDevices",value(){return e=>{const i=this._entitySources&&this._entities?this._deviceIntegrationLookup(this._entitySources,this._entities):void 0;return!this.selector.device||k(this.selector.device,e,i)}}}]}}),p(i));export{y as HaDeviceSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.3a821144.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.3a821144.js.gz deleted file mode 100644 index d29561b..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.3a821144.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.3acef177.js b/custom_components/hacs/hacs_frontend_experimental/c.3acef177.js deleted file mode 100644 index cf19474..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.3acef177.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,u as n}from"./c.743a15a1.js";import"./c.2610e8cd.js";import{t as a}from"./c.a0946910.js";var r=/-u(?:-[0-9a-z]{2,8})+/gi;function t(e,n,a){if(void 0===a&&(a=Error),!e)throw new a(n)}function o(e,n){for(var a=n;;){if(e.has(a))return a;var r=a.lastIndexOf("-");if(!~r)return;r>=2&&"-"===a[r-2]&&(r-=2),a=a.slice(0,r)}}function s(e,n){t(2===n.length,"key must have 2 elements");var a=e.length,r="-".concat(n,"-"),o=e.indexOf(r);if(-1!==o){for(var s=o+4,l=s,i=s,f=!1;!f;){var c=e.indexOf("-",i);2===(-1===c?a-i:c-i)?f=!0:-1===c?(l=a,f=!0):(l=c,i=c+1)}return e.slice(s,l)}if(r="-".concat(n),-1!==(o=e.indexOf(r))&&o+3===a)return""}function l(e,n,a,l,i,f){var c;c="lookup"===a.localeMatcher?function(e,n,a){for(var t={locale:""},s=0,l=n;s2){var S=u.indexOf("-x-");if(-1===S)u+=m;else{var C=u.slice(0,S),y=u.slice(S,u.length);u=C+m+y}u=Intl.getCanonicalLocales(u)[0]}return d.locale=u,d}function i(e,n,a,r){return l(n.reduce((function(e,n){return e.add(n),e}),new Set),function(e){return Intl.getCanonicalLocales(e)}(e),{localeMatcher:(null==r?void 0:r.algorithm)||"best fit"},[],{},(function(){return a})).locale}var f=Object.freeze({__proto__:null,match:i,LookupSupportedLocales:function(e,n){for(var a=[],t=0,s=n;t=2&&"-"===a[r-2]&&(r-=2),a=a.slice(0,r)}}}));n(m),m.BestAvailableLocale;var h=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.LookupMatcher=void 0,n.LookupMatcher=function(e,n,a){for(var r={locale:""},t=0,o=n;t2){var S=l.indexOf("-x-");if(-1===S)l+=f;else{var C=l.slice(0,S),y=l.slice(S,l.length);l=C+f+y}l=Intl.getCanonicalLocales(l)[0]}return i.locale=l,i}}));n(g),g.ResolveLocale;var p=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.LookupSupportedLocales=void 0,n.LookupSupportedLocales=function(e,n){for(var a=[],r=0,t=n;re.toLowerCase()===n));return r||(e.includes("-")?I(e.split("-")[0]):void 0)}const G=new Set,N=[];"Locale"in Intl&&!function(){try{return"x-private"===new Intl.Locale("und-x-private").toString()}catch(e){return!0}}()||N.push(import("./c.f1209d78.js")),function(e){if(void 0===e&&(e="en"),!("PluralRules"in Intl)||"one"===new Intl.PluralRules("en",{minimumFractionDigits:2}).select(1)||!function(e){if(!e)return!0;var n=Array.isArray(e)?e:[e];return Intl.PluralRules.supportedLocalesOf(n).length===n.length}(e))return e?i([e],c,"en"):void 0}()&&(N.push(import("./c.d4f4fd7d.js")),N.push(import("./c.e23b0d0b.js"))),function(e){if(void 0===e&&(e="en"),!("RelativeTimeFormat"in Intl)||!function(e){if(!e)return!0;var n=Array.isArray(e)?e:[e];return Intl.RelativeTimeFormat.supportedLocalesOf(n).length===n.length}(e)||!function(e){try{return"numberingSystem"in new Intl.RelativeTimeFormat(e||"en",{numeric:"auto"}).resolvedOptions()}catch(e){return!1}}(e))return M([e],S,"en")}()&&N.push(import("./c.19f4d198.js")),function(e){if(void 0===e&&(e="en"),!("DateTimeFormat"in Intl)||!("formatToParts"in Intl.DateTimeFormat.prototype)||!("formatRange"in Intl.DateTimeFormat.prototype)||function(){try{return"dayPeriod"!==new Intl.DateTimeFormat("en",{hourCycle:"h11",hour:"numeric"}).formatToParts(0)[2].type}catch(e){return!1}}()||function(){try{return!!new Intl.DateTimeFormat("en",{dateStyle:"short",hour:"numeric"}).format(new Date(0))}catch(e){return!1}}()||!function(){try{return!!new Intl.DateTimeFormat(void 0,{dateStyle:"short"}).resolvedOptions().dateStyle}catch(e){return!1}}()||!function(e){if(!e)return!0;var n=Array.isArray(e)?e:[e];return Intl.DateTimeFormat.supportedLocalesOf(n).length===n.length}(e))return e?M([e],C,"en"):void 0}()&&(N.push(import("./c.ab66da21.js")),N.push(import("./c.ad739743.js")));const O=0===N.length?void 0:Promise.all(N).then((()=>T(function(){let e=null;if(y.selectedLanguage)try{const n=JSON.parse(y.selectedLanguage);if(n&&(e=I(n),e))return e}catch(e){}if(navigator.languages)for(const n of navigator.languages)if(e=I(n),e)return e;return e=I(navigator.language),e||"en"}()))),T=async e=>{if(!G.has(e)){G.add(e);try{if(Intl.NumberFormat&&"function"==typeof Intl.NumberFormat.__addLocaleData){const n=await fetch(`/static/locale-data/intl-numberformat/${e}.json`);Intl.NumberFormat.__addLocaleData(await n.json())}if(Intl.RelativeTimeFormat&&"function"==typeof Intl.RelativeTimeFormat.__addLocaleData){const n=await fetch(`/static/locale-data/intl-relativetimeformat/${e}.json`);Intl.RelativeTimeFormat.__addLocaleData(await n.json())}if(Intl.DateTimeFormat&&"function"==typeof Intl.DateTimeFormat.__addLocaleData){const n=await fetch(`/static/locale-data/intl-datetimeformat/${e}.json`);Intl.DateTimeFormat.__addLocaleData(await n.json())}}catch(e){}}};export{E as a,b,k as i,f as l,O as p}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.3acef177.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.3acef177.js.gz deleted file mode 100644 index 412040c..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.3acef177.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.3f62d98e.js b/custom_components/hacs/hacs_frontend_experimental/c.3f62d98e.js deleted file mode 100644 index d81d2b6..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.3f62d98e.js +++ /dev/null @@ -1 +0,0 @@ -function r(r){return void 0===r||Array.isArray(r)?r:[r]}export{r as e}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.41d13611.js b/custom_components/hacs/hacs_frontend_experimental/c.41d13611.js deleted file mode 100644 index 96be843..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.41d13611.js +++ /dev/null @@ -1,102 +0,0 @@ -import{l as t,o as e,f as i,i as s,h as n,e as o,t as r,j as a,R as d,y as c,k as l,d as h,n as m,M as p,B as u,p as g,q as f,u as y,v as _,x,z as v,A as E,C as b,D as I,_ as T,F as A,E as O,G as S}from"./main-c66a9a06.js";import{o as R}from"./c.8e28b461.js";function C(i,s,n){let o,r=i;return"object"==typeof i?(r=i.slot,o=i):o={flatten:s},n?t({slot:r,flatten:s,selector:n}):e({descriptor:t=>({get(){var t,e;const i="slot"+(r?`[name=${r}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}function w(t){const e=t.language||"en";return t.translationMetadata.translations[e]&&t.translationMetadata.translations[e].isRTL||!1}function F(t){return w(t)?"rtl":"ltr"}class N extends a{constructor(){super(...arguments),this.value="",this.group=null,this.tabindex=-1,this.disabled=!1,this.twoline=!1,this.activated=!1,this.graphic=null,this.multipleGraphics=!1,this.hasMeta=!1,this.noninteractive=!1,this.selected=!1,this.shouldRenderRipple=!1,this._managingList=null,this.boundOnClick=this.onClick.bind(this),this._firstChanged=!0,this._skipPropRequest=!1,this.rippleHandlers=new d((()=>(this.shouldRenderRipple=!0,this.ripple))),this.listeners=[{target:this,eventNames:["click"],cb:()=>{this.onClick()}},{target:this,eventNames:["mouseenter"],cb:this.rippleHandlers.startHover},{target:this,eventNames:["mouseleave"],cb:this.rippleHandlers.endHover},{target:this,eventNames:["focus"],cb:this.rippleHandlers.startFocus},{target:this,eventNames:["blur"],cb:this.rippleHandlers.endFocus},{target:this,eventNames:["mousedown","touchstart"],cb:t=>{const e=t.type;this.onDown("mousedown"===e?"mouseup":"touchend",t)}}]}get text(){const t=this.textContent;return t?t.trim():""}render(){const t=this.renderText(),e=this.graphic?this.renderGraphic():c``,i=this.hasMeta?this.renderMeta():c``;return c` - ${this.renderRipple()} - ${e} - ${t} - ${i}`}renderRipple(){return this.shouldRenderRipple?c` - - `:this.activated?c`
    `:""}renderGraphic(){const t={multi:this.multipleGraphics};return c` - - - `}renderMeta(){return c` - - - `}renderText(){const t=this.twoline?this.renderTwoline():this.renderSingleLine();return c` - - ${t} - `}renderSingleLine(){return c``}renderTwoline(){return c` - - - - - - - `}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(t,e){const i=()=>{window.removeEventListener(t,i),this.rippleHandlers.endPress()};window.addEventListener(t,i),this.rippleHandlers.startPress(e)}fireRequestSelected(t,e){if(this.noninteractive)return;const i=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:e,selected:t}});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const t of this.listeners)for(const e of t.eventNames)t.target.addEventListener(e,t.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const t of this.listeners)for(const e of t.eventNames)t.target.removeEventListener(e,t.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const t=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(t)}}i([s("slot")],N.prototype,"slotElement",void 0),i([n("mwc-ripple")],N.prototype,"ripple",void 0),i([o({type:String})],N.prototype,"value",void 0),i([o({type:String,reflect:!0})],N.prototype,"group",void 0),i([o({type:Number,reflect:!0})],N.prototype,"tabindex",void 0),i([o({type:Boolean,reflect:!0}),R((function(t){t?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}))],N.prototype,"disabled",void 0),i([o({type:Boolean,reflect:!0})],N.prototype,"twoline",void 0),i([o({type:Boolean,reflect:!0})],N.prototype,"activated",void 0),i([o({type:String,reflect:!0})],N.prototype,"graphic",void 0),i([o({type:Boolean})],N.prototype,"multipleGraphics",void 0),i([o({type:Boolean})],N.prototype,"hasMeta",void 0),i([o({type:Boolean,reflect:!0}),R((function(t){t?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")}))],N.prototype,"noninteractive",void 0),i([o({type:Boolean,reflect:!0}),R((function(t){const e=this.getAttribute("role"),i="gridcell"===e||"option"===e||"row"===e||"tab"===e;i&&t?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged?this._firstChanged=!1:this._skipPropRequest||this.fireRequestSelected(t,"property")}))],N.prototype,"selected",void 0),i([r()],N.prototype,"shouldRenderRipple",void 0),i([r()],N.prototype,"_managingList",void 0);const M=h`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`;let k=class extends N{};k.styles=[M],k=i([m("mwc-list-item")],k);var B={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"},L=new Set;L.add(B.BACKSPACE),L.add(B.ENTER),L.add(B.SPACEBAR),L.add(B.PAGE_UP),L.add(B.PAGE_DOWN),L.add(B.END),L.add(B.HOME),L.add(B.ARROW_LEFT),L.add(B.ARROW_UP),L.add(B.ARROW_RIGHT),L.add(B.ARROW_DOWN),L.add(B.DELETE),L.add(B.ESCAPE),L.add(B.TAB);var D=8,P=13,H=32,z=33,U=34,$=35,G=36,W=37,K=38,V=39,q=40,j=46,X=27,Q=9,Y=new Map;Y.set(D,B.BACKSPACE),Y.set(P,B.ENTER),Y.set(H,B.SPACEBAR),Y.set(z,B.PAGE_UP),Y.set(U,B.PAGE_DOWN),Y.set($,B.END),Y.set(G,B.HOME),Y.set(W,B.ARROW_LEFT),Y.set(K,B.ARROW_UP),Y.set(V,B.ARROW_RIGHT),Y.set(q,B.ARROW_DOWN),Y.set(j,B.DELETE),Y.set(X,B.ESCAPE),Y.set(Q,B.TAB);var Z,J,tt=new Set;function et(t){var e=t.key;if(L.has(e))return e;var i=Y.get(t.keyCode);return i||B.UNKNOWN}tt.add(B.PAGE_UP),tt.add(B.PAGE_DOWN),tt.add(B.END),tt.add(B.HOME),tt.add(B.ARROW_LEFT),tt.add(B.ARROW_UP),tt.add(B.ARROW_RIGHT),tt.add(B.ARROW_DOWN);var it="mdc-list-item--activated",st="mdc-list-item",nt="mdc-list-item--disabled",ot="mdc-list-item--selected",rt="mdc-list-item__text",at="mdc-list-item__primary-text",dt="mdc-list";(Z={})[""+it]="mdc-list-item--activated",Z[""+st]="mdc-list-item",Z[""+nt]="mdc-list-item--disabled",Z[""+ot]="mdc-list-item--selected",Z[""+at]="mdc-list-item__primary-text",Z[""+dt]="mdc-list";var ct=((J={})[""+it]="mdc-deprecated-list-item--activated",J[""+st]="mdc-deprecated-list-item",J[""+nt]="mdc-deprecated-list-item--disabled",J[""+ot]="mdc-deprecated-list-item--selected",J[""+rt]="mdc-deprecated-list-item__text",J[""+at]="mdc-deprecated-list-item__primary-text",J[""+dt]="mdc-deprecated-list",J),lt={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+st+" button:not(:disabled),\n ."+st+" a,\n ."+ct[st]+" button:not(:disabled),\n ."+ct[st]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+st+" button:not(:disabled),\n ."+st+" a,\n ."+st+' input[type="radio"]:not(:disabled),\n .'+st+' input[type="checkbox"]:not(:disabled),\n .'+ct[st]+" button:not(:disabled),\n ."+ct[st]+" a,\n ."+ct[st]+' input[type="radio"]:not(:disabled),\n .'+ct[st]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},ht={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300};const mt=(t,e)=>t-e,pt=["input","button","textarea","select"];function ut(t){return t instanceof Set}const gt=t=>{const e=t===ht.UNSET_INDEX?new Set:t;return ut(e)?new Set(e):new Set([e])};class ft extends p{constructor(t){super(Object.assign(Object.assign({},ft.defaultAdapter),t)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=ht.UNSET_INDEX,this.focusedItemIndex_=ht.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return lt}static get numbers(){return ht}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(t){this.wrapFocus_=t}setMulti(t){this.isMulti_=t;const e=this.selectedIndex_;if(t){if(!ut(e)){const t=e===ht.UNSET_INDEX;this.selectedIndex_=t?new Set:new Set([e])}}else if(ut(e))if(e.size){const t=Array.from(e).sort(mt);this.selectedIndex_=t[0]}else this.selectedIndex_=ht.UNSET_INDEX}setVerticalOrientation(t){this.isVertical_=t}setUseActivatedClass(t){this.useActivatedClass_=t}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(t){this.isIndexValid_(t)&&(this.isMulti_?this.setMultiSelectionAtIndex_(gt(t)):this.setSingleSelectionAtIndex_(t))}handleFocusIn(t,e){e>=0&&this.adapter.setTabIndexForElementIndex(e,0)}handleFocusOut(t,e){e>=0&&this.adapter.setTabIndexForElementIndex(e,-1),setTimeout((()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()}),0)}handleKeydown(t,e,i){const s="ArrowLeft"===et(t),n="ArrowUp"===et(t),o="ArrowRight"===et(t),r="ArrowDown"===et(t),a="Home"===et(t),d="End"===et(t),c="Enter"===et(t),l="Spacebar"===et(t);if(this.adapter.isRootFocused())return void(n||d?(t.preventDefault(),this.focusLastElement()):(r||a)&&(t.preventDefault(),this.focusFirstElement()));let h,m=this.adapter.getFocusedElementIndex();if(!(-1===m&&(m=i,m<0))){if(this.isVertical_&&r||!this.isVertical_&&o)this.preventDefaultEvent(t),h=this.focusNextElement(m);else if(this.isVertical_&&n||!this.isVertical_&&s)this.preventDefaultEvent(t),h=this.focusPrevElement(m);else if(a)this.preventDefaultEvent(t),h=this.focusFirstElement();else if(d)this.preventDefaultEvent(t),h=this.focusLastElement();else if((c||l)&&e){const e=t.target;if(e&&"A"===e.tagName&&c)return;this.preventDefaultEvent(t),this.setSelectedIndexOnAction_(m,!0)}this.focusedItemIndex_=m,void 0!==h&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}}handleSingleSelection(t,e,i){t!==ht.UNSET_INDEX&&(this.setSelectedIndexOnAction_(t,e,i),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)}focusNextElement(t){let e=t+1;if(e>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return t;e=0}return this.adapter.focusItemAtIndex(e),e}focusPrevElement(t){let e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter.getListItemCount()-1}return this.adapter.focusItemAtIndex(e),e}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const t=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(t),t}setEnabled(t,e){this.isIndexValid_(t)&&this.adapter.setDisabledStateForElementIndex(t,!e)}preventDefaultEvent(t){const e=`${t.target.tagName}`.toLowerCase();-1===pt.indexOf(e)&&t.preventDefault()}setSingleSelectionAtIndex_(t,e=!0){this.selectedIndex_!==t&&(this.selectedIndex_!==ht.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),e&&this.adapter.setSelectedStateForElementIndex(t,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(t,!0),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t,this.adapter.notifySelected(t))}setMultiSelectionAtIndex_(t,e=!0){const i=((t,e)=>{const i=Array.from(t),s=Array.from(e),n={added:[],removed:[]},o=i.sort(mt),r=s.sort(mt);let a=0,d=0;for(;a=0&&this.focusedItemIndex_!==t&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(t,0)}setTabindexToFirstSelectedItem_(){let t=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==ht.UNSET_INDEX?t=this.selectedIndex_:ut(this.selectedIndex_)&&this.selectedIndex_.size>0&&(t=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(t)}isIndexValid_(t){if(t instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===t.size)return!0;{let e=!1;for(const i of t)if(e=this.isIndexInRange_(i),e)break;return e}}if("number"==typeof t){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return t===ht.UNSET_INDEX||this.isIndexInRange_(t)}return!1}isIndexInRange_(t){const e=this.adapter.getListItemCount();return t>=0&&tt.hasAttribute("mwc-list-item");function _t(){const t=this.itemsReadyResolver;this.itemsReady=new Promise((t=>this.itemsReadyResolver=t)),t()}class xt extends u{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=ft,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const t=function(t,e=50){let i;return function(s=!0){clearTimeout(i),i=setTimeout((()=>{t(s)}),e)}}(this.layout.bind(this));this.debouncedLayout=(e=!0)=>{_t.call(this),t(e)}}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.itemsReady,t}get items(){return this.items_}updateItems(){var t;const e=null!==(t=this.assignedElements)&&void 0!==t?t:[],i=[];for(const t of e)yt(t)&&(i.push(t),t._managingList=this),t.hasAttribute("divider")&&!t.hasAttribute("role")&&t.setAttribute("role","separator");this.items_=i;const s=new Set;if(this.items_.forEach(((t,e)=>{this.itemRoles?t.setAttribute("role",this.itemRoles):t.removeAttribute("role"),t.selected&&s.add(e)})),this.multi)this.select(s);else{const t=s.size?s.entries().next().value[1]:-1;this.select(t)}const n=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(n)}get selected(){const t=this.index;if(!ut(t))return-1===t?null:this.items[t];const e=[];for(const i of t)e.push(this.items[i]);return e}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const t=null===this.innerRole?void 0:this.innerRole,e=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return c` - -
      - - ${this.renderPlaceholder()} -
    - `}renderPlaceholder(){var t;const e=null!==(t=this.assignedElements)&&void 0!==t?t:[];return void 0!==this.emptyMessage&&0===e.length?c` - ${this.emptyMessage} - `:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t);this.mdcFoundation.handleFocusIn(t,e)}}onFocusOut(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t);this.mdcFoundation.handleFocusOut(t,e)}}onKeydown(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t),i=t.target,s=yt(i);this.mdcFoundation.handleKeydown(t,s,e)}}onRequestSelected(t){if(this.mdcFoundation){let e=this.getIndexOfTarget(t);if(-1===e&&(this.layout(),e=this.getIndexOfTarget(t),-1===e))return;if(this.items[e].disabled)return;const i=t.detail.selected,s=t.detail.source;this.mdcFoundation.handleSingleSelection(e,"interaction"===s,i),t.stopPropagation()}}getIndexOfTarget(t){const e=this.items,i=t.composedPath();for(const t of i){let i=-1;if(f(t)&&yt(t)&&(i=e.indexOf(t)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(t,e)=>{if(!this.mdcRoot)return"";const i=this.items[t];return i?i.getAttribute(e):""},setAttributeForElementIndex:(t,e,i)=>{if(!this.mdcRoot)return;const s=this.items[t];s&&s.setAttribute(e,i)},focusItemAtIndex:t=>{const e=this.items[t];e&&e.focus()},setTabIndexForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.tabindex=e)},notifyAction:t=>{const e={bubbles:!0,composed:!0};e.detail={index:t};const i=new CustomEvent("action",e);this.dispatchEvent(i)},notifySelected:(t,e)=>{const i={bubbles:!0,composed:!0};i.detail={index:t,diff:e};const s=new CustomEvent("selected",i);this.dispatchEvent(s)},isFocusInsideList:()=>y(this),isRootFocused:()=>{const t=this.mdcRoot;return t.getRootNode().activeElement===t},setDisabledStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.disabled=e)},getDisabledStateForElementIndex:t=>{const e=this.items[t];return!!e&&e.disabled},setSelectedStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.selected=e)},getSelectedStateForElementIndex:t=>{const e=this.items[t];return!!e&&e.selected},setActivatedStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.activated=e)}},this.mdcAdapter}selectUi(t,e=!1){const i=this.items[t];i&&(i.selected=!0,i.activated=e)}deselectUi(t){const e=this.items[t];e&&(e.selected=!1,e.activated=!1)}select(t){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(t)}toggle(t,e){this.multi&&this.mdcFoundation.toggleMultiAtIndex(t,e)}onListItemConnected(t){const e=t.target;this.layout(-1===this.items.indexOf(e))}layout(t=!0){t&&this.updateItems();const e=this.items[0];for(const t of this.items)t.tabindex=-1;e&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=e):e.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const t=_();if(!t.length)return-1;for(let e=t.length-1;e>=0;e--){const i=t[e];if(yt(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(t){for(const t of this.items)if(0===t.tabindex){t.tabindex=-1;break}this.items[t].tabindex=0,this.items[t].focus()}focus(){const t=this.mdcRoot;t&&t.focus()}blur(){const t=this.mdcRoot;t&&t.blur()}}i([o({type:String})],xt.prototype,"emptyMessage",void 0),i([s(".mdc-deprecated-list")],xt.prototype,"mdcRoot",void 0),i([C("",!0,"*")],xt.prototype,"assignedElements",void 0),i([C("",!0,'[tabindex="0"]')],xt.prototype,"tabbableElements",void 0),i([o({type:Boolean}),R((function(t){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(t)}))],xt.prototype,"activatable",void 0),i([o({type:Boolean}),R((function(t,e){this.mdcFoundation&&this.mdcFoundation.setMulti(t),void 0!==e&&this.layout()}))],xt.prototype,"multi",void 0),i([o({type:Boolean}),R((function(t){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(t)}))],xt.prototype,"wrapFocus",void 0),i([o({type:String}),R((function(t,e){void 0!==e&&this.updateItems()}))],xt.prototype,"itemRoles",void 0),i([o({type:String})],xt.prototype,"innerRole",void 0),i([o({type:String})],xt.prototype,"innerAriaLabel",void 0),i([o({type:Boolean})],xt.prototype,"rootTabbable",void 0),i([o({type:Boolean,reflect:!0}),R((function(t){var e,i;if(t){const t=null!==(i=null===(e=this.tabbableElements)||void 0===e?void 0:e[0])&&void 0!==i?i:null;this.previousTabindex=t,t&&t.setAttribute("tabindex","-1")}else!t&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)}))],xt.prototype,"noninteractive",void 0);const vt=h`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`;let Et=class extends xt{};Et.styles=[vt],Et=i([m("mwc-list")],Et);var bt,It,Tt={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},At={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},Ot={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(bt||(bt={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(It||(It={}));var St=function(t){function e(i){var s=t.call(this,v(v({},e.defaultAdapter),i))||this;return s.isSurfaceOpen=!1,s.isQuickOpen=!1,s.isHoistedElement=!1,s.isFixedPosition=!1,s.isHorizontallyCenteredOnViewport=!1,s.maxHeight=0,s.openBottomBias=0,s.openAnimationEndTimerId=0,s.closeAnimationEndTimerId=0,s.animationRequestId=0,s.anchorCorner=It.TOP_START,s.originCorner=It.TOP_START,s.anchorMargin={top:0,right:0,bottom:0,left:0},s.position={x:0,y:0},s}return x(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Tt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return At},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ot},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return It},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){},notifyClosing:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,i=t.ROOT,s=t.OPEN;if(!this.adapter.hasClass(i))throw new Error(i+" class required in root element.");this.adapter.hasClass(s)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^bt.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.isFixed=function(){return this.isFixedPosition},e.prototype.setAbsolutePosition=function(t,e){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(e)?e:0},e.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.setMaxHeight=function(t){this.maxHeight=t},e.prototype.setOpenBottomBias=function(t){this.openBottomBias=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(e.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout((function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()}),Ot.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var i=this;if(void 0===t&&(t=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){i.adapter.removeClass(e.cssClasses.OPEN),i.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),i.closeAnimationEndTimerId=setTimeout((function(){i.closeAnimationEndTimerId=0,i.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),i.adapter.notifyClose()}),Ot.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},e.prototype.handleBodyClick=function(t){var e=t.target;this.adapter.isElementInContainer(e)||this.close()},e.prototype.handleKeydown=function(t){var e=t.keyCode;("Escape"===t.key||27===e)&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var i=this.getoriginCorner(),s=this.getMenuSurfaceMaxHeight(i),n=this.hasBit(i,bt.BOTTOM)?"bottom":"top",o=this.hasBit(i,bt.RIGHT)?"right":"left",r=this.getHorizontalOriginOffset(i),a=this.getVerticalOriginOffset(i),d=this.measurements,c=d.anchorSize,l=d.surfaceSize,h=((t={})[o]=r,t[n]=a,t);c.width/l.width>Ot.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(h),this.adapter.setTransformOrigin(o+" "+n),this.adapter.setPosition(h),this.adapter.setMaxHeight(s?s+"px":""),this.hasBit(i,bt.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),e=this.adapter.getBodyDimensions(),i=this.adapter.getWindowDimensions(),s=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:e,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:i.width-t.right,bottom:i.height-t.bottom,left:t.left},viewportSize:i,windowScroll:s}},e.prototype.getoriginCorner=function(){var t,i,s=this.originCorner,n=this.measurements,o=n.viewportDistance,r=n.anchorSize,a=n.surfaceSize,d=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,bt.BOTTOM)?(t=o.top-d+this.anchorMargin.bottom,i=o.bottom-d-this.anchorMargin.bottom):(t=o.top-d+this.anchorMargin.top,i=o.bottom-d+r.height-this.anchorMargin.top),!(i-a.height>0)&&t>i+this.openBottomBias&&(s=this.setBit(s,bt.BOTTOM));var c,l,h=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,bt.FLIP_RTL),p=this.hasBit(this.anchorCorner,bt.RIGHT)||this.hasBit(s,bt.RIGHT),u=!1;(u=h&&m?!p:p)?(c=o.left+r.width+this.anchorMargin.right,l=o.right-this.anchorMargin.right):(c=o.left+this.anchorMargin.left,l=o.right+r.width-this.anchorMargin.left);var g=c-a.width>0,f=l-a.width>0,y=this.hasBit(s,bt.FLIP_RTL)&&this.hasBit(s,bt.RIGHT);return f&&y&&h||!g&&y?s=this.unsetBit(s,bt.RIGHT):(g&&u&&h||g&&!u&&p||!f&&c>=l)&&(s=this.setBit(s,bt.RIGHT)),s},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var i=this.measurements.viewportDistance,s=0,n=this.hasBit(t,bt.BOTTOM),o=this.hasBit(this.anchorCorner,bt.BOTTOM),r=e.numbers.MARGIN_TO_EDGE;return n?(s=i.top+this.anchorMargin.top-r,o||(s+=this.measurements.anchorSize.height)):(s=i.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-r,o&&(s-=this.measurements.anchorSize.height)),s},e.prototype.getHorizontalOriginOffset=function(t){var e=this.measurements.anchorSize,i=this.hasBit(t,bt.RIGHT),s=this.hasBit(this.anchorCorner,bt.RIGHT);if(i){var n=s?e.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?n-(this.measurements.viewportSize.width-this.measurements.bodySize.width):n}return s?e.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var e=this.measurements.anchorSize,i=this.hasBit(t,bt.BOTTOM),s=this.hasBit(this.anchorCorner,bt.BOTTOM);return i?s?e.height-this.anchorMargin.top:-this.anchorMargin.bottom:s?e.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var e,i,s=this.measurements,n=s.windowScroll,o=s.viewportDistance,r=s.surfaceSize,a=s.viewportSize,d=Object.keys(t);try{for(var c=E(d),l=c.next();!l.done;l=c.next()){var h=l.value,m=t[h]||0;!this.isHorizontallyCenteredOnViewport||"left"!==h&&"right"!==h?(m+=o[h],this.isFixedPosition||("top"===h?m+=n.y:"bottom"===h?m-=n.y:"left"===h?m+=n.x:m-=n.x),t[h]=m):t[h]=(a.width-r.width)/2}}catch(t){e={error:t}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(e)throw e.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,e=this.adapter.isFocused(),i=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(e||i)&&setTimeout((function(){t.adapter.restoreFocus()}),Ot.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,e){return Boolean(t&e)},e.prototype.setBit=function(t,e){return t|e},e.prototype.unsetBit=function(t,e){return t^e},e.prototype.isFinite=function(t){return"number"==typeof t&&isFinite(t)},e}(p),Rt=St;const Ct={TOP_LEFT:It.TOP_LEFT,TOP_RIGHT:It.TOP_RIGHT,BOTTOM_LEFT:It.BOTTOM_LEFT,BOTTOM_RIGHT:It.BOTTOM_RIGHT,TOP_START:It.TOP_START,TOP_END:It.TOP_END,BOTTOM_START:It.BOTTOM_START,BOTTOM_END:It.BOTTOM_END};class wt extends u{constructor(){super(...arguments),this.mdcFoundationClass=Rt,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=It.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){const t={"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth},e={top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin};return c` -
    - -
    `}createAdapter(){return Object.assign(Object.assign({},I(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const t=new CustomEvent("closed",{bubbles:!0,composed:!0});this.open=!1,this.mdcRoot.dispatchEvent(t)},notifyClosing:()=>{const t=new CustomEvent("closing",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(t)},notifyOpen:()=>{const t=new CustomEvent("opened",{bubbles:!0,composed:!0});this.open=!0,this.mdcRoot.dispatchEvent(t)},isElementInContainer:()=>!1,isRtl:()=>!!this.mdcRoot&&"rtl"===getComputedStyle(this.mdcRoot).direction,setTransformOrigin:t=>{this.mdcRoot&&(this.styleTransformOrigin=t)},isFocused:()=>y(this),saveFocus:()=>{const t=_(),e=t.length;e||(this.previouslyFocused=null),this.previouslyFocused=t[e-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const t=this.mdcRoot;return t?{width:t.offsetWidth,height:t.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const t=this.anchor;return t?t.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:t=>{this.mdcRoot&&(this.styleLeft="left"in t?`${t.left}px`:"",this.styleRight="right"in t?`${t.right}px`:"",this.styleTop="top"in t?`${t.top}px`:"",this.styleBottom="bottom"in t?`${t.bottom}px`:"")},setMaxHeight:async t=>{this.mdcRoot&&(this.styleMaxHeight=t,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${t})`)}})}onKeydown(t){this.mdcFoundation&&this.mdcFoundation.handleKeydown(t)}onBodyClick(t){if(this.stayOpenOnBodyClick)return;-1===t.composedPath().indexOf(this)&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}close(){this.open=!1}show(){this.open=!0}}i([s(".mdc-menu-surface")],wt.prototype,"mdcRoot",void 0),i([s("slot")],wt.prototype,"slotElement",void 0),i([o({type:Boolean}),R((function(t){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(t)}))],wt.prototype,"absolute",void 0),i([o({type:Boolean})],wt.prototype,"fullwidth",void 0),i([o({type:Boolean}),R((function(t){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(t)}))],wt.prototype,"fixed",void 0),i([o({type:Number}),R((function(t){this.mdcFoundation&&null!==this.y&&null!==t&&(this.mdcFoundation.setAbsolutePosition(t,this.y),this.mdcFoundation.setAnchorMargin({left:t,top:this.y,right:-t,bottom:this.y}))}))],wt.prototype,"x",void 0),i([o({type:Number}),R((function(t){this.mdcFoundation&&null!==this.x&&null!==t&&(this.mdcFoundation.setAbsolutePosition(this.x,t),this.mdcFoundation.setAnchorMargin({left:this.x,top:t,right:-this.x,bottom:t}))}))],wt.prototype,"y",void 0),i([o({type:Boolean}),R((function(t){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(t)}))],wt.prototype,"quick",void 0),i([o({type:Boolean,reflect:!0}),R((function(t,e){this.mdcFoundation&&(t?this.mdcFoundation.open():void 0!==e&&this.mdcFoundation.close())}))],wt.prototype,"open",void 0),i([o({type:Boolean})],wt.prototype,"stayOpenOnBodyClick",void 0),i([r(),R((function(t){this.mdcFoundation&&this.mdcFoundation.setAnchorCorner(t)}))],wt.prototype,"bitwiseCorner",void 0),i([o({type:String}),R((function(t){if(this.mdcFoundation){const e="START"===t||"END"===t,i=null===this.previousMenuCorner,s=!i&&t!==this.previousMenuCorner,n=i&&"END"===t;e&&(s||n)&&(this.bitwiseCorner=this.bitwiseCorner^bt.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=t)}}))],wt.prototype,"menuCorner",void 0),i([o({type:String}),R((function(t){if(this.mdcFoundation&&t){let e=Ct[t];"END"===this.menuCorner&&(e^=bt.RIGHT),this.bitwiseCorner=e}}))],wt.prototype,"corner",void 0),i([r()],wt.prototype,"styleTop",void 0),i([r()],wt.prototype,"styleLeft",void 0),i([r()],wt.prototype,"styleRight",void 0),i([r()],wt.prototype,"styleBottom",void 0),i([r()],wt.prototype,"styleMaxHeight",void 0),i([r()],wt.prototype,"styleTransformOrigin",void 0);const Ft=h`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`;let Nt=class extends wt{};Nt.styles=[Ft],Nt=i([m("mwc-menu-surface")],Nt);var Mt,kt={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Bt={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},Lt={FOCUS_ROOT_INDEX:-1};!function(t){t[t.NONE=0]="NONE",t[t.LIST_ROOT=1]="LIST_ROOT",t[t.FIRST_ITEM=2]="FIRST_ITEM",t[t.LAST_ITEM=3]="LAST_ITEM"}(Mt||(Mt={}));var Dt=function(t){function e(i){var s=t.call(this,v(v({},e.defaultAdapter),i))||this;return s.closeAnimationEndTimerId=0,s.defaultFocusState=Mt.LIST_ROOT,s.selectedIndex=-1,s}return x(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return kt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Bt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Lt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var e=t.key,i=t.keyCode;("Tab"===e||9===i)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var e=this,i=this.adapter.getElementIndex(t);if(!(i<0)){this.adapter.notifySelected({index:i});var s="true"===this.adapter.getAttributeFromElementAtIndex(i,Bt.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(s),this.closeAnimationEndTimerId=setTimeout((function(){var i=e.adapter.getElementIndex(t);i>=0&&e.adapter.isSelectableItemAtIndex(i)&&e.setSelectedIndex(i)}),St.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case Mt.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case Mt.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case Mt.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter.getSelectedSiblingOfItemAtIndex(t);e>=0&&(this.adapter.removeAttributeFromElementAtIndex(e,Bt.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(e,kt.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,kt.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,Bt.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,e){this.validatedIndex(t),e?(this.adapter.removeClassFromElementAtIndex(t,nt),this.adapter.addAttributeToElementAtIndex(t,Bt.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,nt),this.adapter.addAttributeToElementAtIndex(t,Bt.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var e=this.adapter.getMenuItemCount();if(!(t>=0&&t - - - - `}createAdapter(){return{addClassToElementAtIndex:(t,e)=>{const i=this.listElement;if(!i)return;const s=i.items[t];s&&("mdc-menu-item--selected"===e?this.forceGroupSelection&&!s.selected&&i.toggle(t,!0):s.classList.add(e))},removeClassFromElementAtIndex:(t,e)=>{const i=this.listElement;if(!i)return;const s=i.items[t];s&&("mdc-menu-item--selected"===e?s.selected&&i.toggle(t,!1):s.classList.remove(e))},addAttributeToElementAtIndex:(t,e,i)=>{const s=this.listElement;if(!s)return;const n=s.items[t];n&&n.setAttribute(e,i)},removeAttributeFromElementAtIndex:(t,e)=>{const i=this.listElement;if(!i)return;const s=i.items[t];s&&s.removeAttribute(e)},getAttributeFromElementAtIndex:(t,e)=>{const i=this.listElement;if(!i)return null;const s=i.items[t];return s?s.getAttribute(e):null},elementContainsClass:(t,e)=>t.classList.contains(e),closeSurface:()=>{this.open=!1},getElementIndex:t=>{const e=this.listElement;return e?e.items.indexOf(t):-1},notifySelected:()=>{},getMenuItemCount:()=>{const t=this.listElement;return t?t.items.length:0},focusItemAtIndex:t=>{const e=this.listElement;if(!e)return;const i=e.items[t];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:t=>{const e=this.listElement;if(!e)return-1;const i=e.items[t];if(!i||!i.group)return-1;for(let s=0;s{const e=this.listElement;if(!e)return!1;const i=e.items[t];return!!i&&i.hasAttribute("group")}}}onKeydown(t){this.mdcFoundation&&this.mdcFoundation.handleKeydown(t)}onAction(t){const e=this.listElement;if(this.mdcFoundation&&e){const i=t.detail.index,s=e.items[i];s&&this.mdcFoundation.handleItemAction(s)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){await this._listUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const t=this.listElement;t&&(this._listUpdateComplete=t.updateComplete,await this._listUpdateComplete)}select(t){const e=this.listElement;e&&e.select(t)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const t=this.listElement;return t?t.getFocusedItemIndex():-1}focusItemAtIndex(t){const e=this.listElement;e&&e.focusItemAtIndex(t)}layout(t=!0){const e=this.listElement;e&&e.layout(t)}}i([s(".mdc-menu")],Pt.prototype,"mdcRoot",void 0),i([s("slot")],Pt.prototype,"slotElement",void 0),i([o({type:Object})],Pt.prototype,"anchor",void 0),i([o({type:Boolean,reflect:!0})],Pt.prototype,"open",void 0),i([o({type:Boolean})],Pt.prototype,"quick",void 0),i([o({type:Boolean})],Pt.prototype,"wrapFocus",void 0),i([o({type:String})],Pt.prototype,"innerRole",void 0),i([o({type:String})],Pt.prototype,"innerAriaLabel",void 0),i([o({type:String})],Pt.prototype,"corner",void 0),i([o({type:Number})],Pt.prototype,"x",void 0),i([o({type:Number})],Pt.prototype,"y",void 0),i([o({type:Boolean})],Pt.prototype,"absolute",void 0),i([o({type:Boolean})],Pt.prototype,"multi",void 0),i([o({type:Boolean})],Pt.prototype,"activatable",void 0),i([o({type:Boolean})],Pt.prototype,"fixed",void 0),i([o({type:Boolean})],Pt.prototype,"forceGroupSelection",void 0),i([o({type:Boolean})],Pt.prototype,"fullwidth",void 0),i([o({type:String})],Pt.prototype,"menuCorner",void 0),i([o({type:Boolean})],Pt.prototype,"stayOpenOnBodyClick",void 0),i([o({type:String}),R((function(t){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(Mt[t])}))],Pt.prototype,"defaultFocus",void 0);const Ht=h`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;let zt=class extends Pt{};zt.styles=[Ht],zt=i([m("mwc-menu")],zt),T([m("ha-button-menu")],(function(t,e){class i extends e{constructor(...e){super(...e),t(this)}}return{F:i,d:[{kind:"field",key:A,value:void 0},{kind:"field",decorators:[o()],key:"corner",value:()=>"TOP_START"},{kind:"field",decorators:[o()],key:"menuCorner",value:()=>"START"},{kind:"field",decorators:[o({type:Number})],key:"x",value:()=>null},{kind:"field",decorators:[o({type:Number})],key:"y",value:()=>null},{kind:"field",decorators:[o({type:Boolean})],key:"multi",value:()=>!1},{kind:"field",decorators:[o({type:Boolean})],key:"activatable",value:()=>!1},{kind:"field",decorators:[o({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[o({type:Boolean})],key:"fixed",value:()=>!1},{kind:"field",decorators:[s("mwc-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){var t;return null===(t=this._menu)||void 0===t?void 0:t.items}},{kind:"get",key:"selected",value:function(){var t;return null===(t=this._menu)||void 0===t?void 0:t.selected}},{kind:"method",key:"focus",value:function(){var t,e;null!==(t=this._menu)&&void 0!==t&&t.open?this._menu.focusItemAtIndex(0):null===(e=this._triggerButton)||void 0===e||e.focus()}},{kind:"method",key:"render",value:function(){return c` -
    - -
    - - - - `}},{kind:"method",key:"firstUpdated",value:function(t){O(S(i.prototype),"firstUpdated",this).call(this,t),"rtl"===document.dir&&this.updateComplete.then((()=>{this.querySelectorAll("mwc-list-item").forEach((t=>{const e=document.createElement("style");e.innerHTML="span.material-icons:first-of-type { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}",t.shadowRoot.appendChild(e)}))}))}},{kind:"method",key:"_handleClick",value:function(){this.disabled||(this._menu.anchor=this,this._menu.show())}},{kind:"get",key:"_triggerButton",value:function(){return this.querySelector('ha-icon-button[slot="trigger"], mwc-button[slot="trigger"]')}},{kind:"method",key:"_setTriggerAria",value:function(){this._triggerButton&&(this._triggerButton.ariaHasPopup="menu")}},{kind:"get",static:!0,key:"styles",value:function(){return h` - :host { - display: inline-block; - position: relative; - } - ::slotted([disabled]) { - color: var(--disabled-text-color); - } - `}}]}}),a);export{It as C,B as K,N as L,et as a,F as b,w as c,ht as n,C as o,M as s}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.41d13611.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.41d13611.js.gz deleted file mode 100644 index fed7552..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.41d13611.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.491a9306.js b/custom_components/hacs/hacs_frontend_experimental/c.491a9306.js deleted file mode 100644 index e217a2f..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.491a9306.js +++ /dev/null @@ -1,14 +0,0 @@ -import{_ as e,H as i,e as t,y as s,n as o}from"./main-c66a9a06.js";import"./c.e8169f76.js";import"./c.b914d43e.js";import"./c.8e28b461.js";let c=e([o("hacs-progress-dialog")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t()],key:"title",value:void 0},{kind:"field",decorators:[t()],key:"content",value:void 0},{kind:"field",decorators:[t()],key:"confirmText",value:void 0},{kind:"field",decorators:[t()],key:"confirm",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"_inProgress",value:()=>!1},{kind:"method",key:"shouldUpdate",value:function(e){return e.has("active")||e.has("title")||e.has("content")||e.has("confirmText")||e.has("confirm")||e.has("_inProgress")}},{kind:"method",key:"render",value:function(){return this.active?s` - -
    - ${this.content||""} -
    - - ${this.hacs.localize("common.cancel")} - - - ${this._inProgress?s``:this.confirmText||this.hacs.localize("common.yes")} - -
    - `:s``}},{kind:"method",key:"_confirmed",value:async function(){this._inProgress=!0,await this.confirm(),this._inProgress=!1,this._close()}},{kind:"method",key:"_close",value:function(){this.active=!1,this.dispatchEvent(new Event("hacs-dialog-closed",{bubbles:!0,composed:!0}))}}]}}),i);export{c as HacsProgressDialog}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.491a9306.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.491a9306.js.gz deleted file mode 100644 index 5fe654f..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.491a9306.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.4b0dc107.js b/custom_components/hacs/hacs_frontend_experimental/c.4b0dc107.js deleted file mode 100644 index c5a76de..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.4b0dc107.js +++ /dev/null @@ -1 +0,0 @@ -import{O as o}from"./main-c66a9a06.js";const a=()=>import("./c.5faead67.js"),i=(i,l,m)=>new Promise((n=>{const r=l.cancel,s=l.confirm;o(i,"show-dialog",{dialogTag:"dialog-box",dialogImport:a,dialogParams:{...l,...m,cancel:()=>{n(!(null==m||!m.prompt)&&null),r&&r()},confirm:o=>{n(null==m||!m.prompt||o),s&&s(o)}}})})),l=(o,a)=>i(o,a),m=(o,a)=>i(o,a,{confirmation:!0}),n=(o,a)=>i(o,a,{prompt:!0});export{l as a,n as b,m as s}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.4b0dc107.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.4b0dc107.js.gz deleted file mode 100644 index d248055..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.4b0dc107.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.4d0ce1f4.js b/custom_components/hacs/hacs_frontend_experimental/c.4d0ce1f4.js deleted file mode 100644 index f6d95ff..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.4d0ce1f4.js +++ /dev/null @@ -1,65 +0,0 @@ -import{_ as e,e as i,y as t,O as a,d as r,n as s,j as d,t as l,a7 as o}from"./main-c66a9a06.js";import{g as n,d as c}from"./c.15496b0b.js";import{f as u,a as h,b as v}from"./c.6f18200a.js";import{S as k}from"./c.baaad129.js";import"./c.a47e7fac.js";import"./c.6eb9fcd4.js";import"./c.1024e243.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.874c8cfd.js";import"./c.fa0ef026.js";import"./c.d2f13ac1.js";import"./c.4b0dc107.js";import"./c.bbadaeea.js";import"./c.930daaba.js";e([s("ha-areas-picker")],(function(e,s){return{F:class extends s{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i()],key:"placeholder",value:void 0},{kind:"field",decorators:[i({type:Boolean,attribute:"no-add"})],key:"noAdd",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"exclude-domains"})],key:"excludeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",decorators:[i()],key:"deviceFilter",value:void 0},{kind:"field",decorators:[i()],key:"entityFilter",value:void 0},{kind:"field",decorators:[i({attribute:"picked-area-label"})],key:"pickedAreaLabel",value:void 0},{kind:"field",decorators:[i({attribute:"pick-area-label"})],key:"pickAreaLabel",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:void 0},{kind:"method",key:"render",value:function(){if(!this.hass)return t``;const e=this._currentAreas;return t` - ${e.map((e=>t` -
    - -
    - `))} -
    - -
    - `}},{kind:"get",key:"_currentAreas",value:function(){return this.value||[]}},{kind:"method",key:"_updateAreas",value:async function(e){this.value=e,a(this,"value-changed",{value:e})}},{kind:"method",key:"_areaChanged",value:function(e){e.stopPropagation();const i=e.currentTarget.curValue,t=e.detail.value;if(t===i)return;const a=this._currentAreas;t&&!a.includes(t)?this._updateAreas(a.map((e=>e===i?t:e))):this._updateAreas(a.filter((e=>e!==i)))}},{kind:"method",key:"_addArea",value:function(e){e.stopPropagation();const i=e.detail.value;if(!i)return;e.currentTarget.value="";const t=this._currentAreas;t.includes(i)||this._updateAreas([...t,i])}},{kind:"field",static:!0,key:"styles",value:()=>r` - div { - margin-top: 8px; - } - `}]}}),k(d));let p=e([s("ha-selector-area")],(function(e,a){return{F:class extends a{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[i()],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"selector",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!0},{kind:"field",decorators:[l()],key:"_entitySources",value:void 0},{kind:"field",decorators:[l()],key:"_entities",value:void 0},{kind:"field",key:"_deviceIntegrationLookup",value:()=>o(n)},{kind:"method",key:"hassSubscribe",value:function(){return[c(this.hass.connection,(e=>{this._entities=e.filter((e=>null!==e.device_id))}))]}},{kind:"method",key:"updated",value:function(e){var i,t,a,r;e.has("selector")&&(null!==(i=this.selector.area)&&void 0!==i&&null!==(t=i.device)&&void 0!==t&&t.integration||null!==(a=this.selector.area)&&void 0!==a&&null!==(r=a.entity)&&void 0!==r&&r.integration)&&!this._entitySources&&u(this.hass).then((e=>{this._entitySources=e}))}},{kind:"method",key:"render",value:function(){var e,i,a,r,s;return(null!==(e=this.selector.area)&&void 0!==e&&null!==(i=e.device)&&void 0!==i&&i.integration||null!==(a=this.selector.area)&&void 0!==a&&null!==(r=a.entity)&&void 0!==r&&r.integration)&&!this._entitySources?t``:null!==(s=this.selector.area)&&void 0!==s&&s.multiple?t` - - `:t` - - `}},{kind:"field",key:"_filterEntities",value(){return e=>{var i;return null===(i=this.selector.area)||void 0===i||!i.entity||h(this.selector.area.entity,e,this._entitySources)}}},{kind:"field",key:"_filterDevices",value(){return e=>{var i;if(null===(i=this.selector.area)||void 0===i||!i.device)return!0;const t=this._entitySources&&this._entities?this._deviceIntegrationLookup(this._entitySources,this._entities):void 0;return v(this.selector.area.device,e,t)}}}]}}),k(d));export{p as HaAreaSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.4d0ce1f4.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.4d0ce1f4.js.gz deleted file mode 100644 index 8962254..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.4d0ce1f4.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.4efe37f4.js b/custom_components/hacs/hacs_frontend_experimental/c.4efe37f4.js deleted file mode 100644 index 4e29762..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.4efe37f4.js +++ /dev/null @@ -1,7 +0,0 @@ -import{_ as r,j as e,e as t,t as s,y as i,af as o,n as a}from"./main-c66a9a06.js";import{e as n,c}from"./c.50bfd408.js";const d={hacs_repository:{redirect:"/hacs/repository",params:{owner:"string",repository:"string",category:"string?"}}};r([a("hacs-my-redirect")],(function(r,e){return{F:class extends e{constructor(...e){super(...e),r(this)}},d:[{kind:"field",decorators:[t({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[t({attribute:!1})],key:"hacs",value:void 0},{kind:"field",decorators:[t({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[s()],key:"_error",value:void 0},{kind:"method",key:"firstUpdated",value:function(r){const e=this.route.path.indexOf("/",1),t=this.route.path.substr(e+1),s=d[t];if(!s)return void(this._error=this.hacs.localize("my.not_supported",{link:i` - ${this.hacs.localize("my.faq_link")} - `}));let a;try{a=this._createRedirectUrl(s)}catch(r){return void(this._error=this.hacs.localize("my.error"))}o(a,{replace:!0})}},{kind:"method",key:"render",value:function(){return this._error?i``:i``}},{kind:"method",key:"_createRedirectUrl",value:function(r){const e=this._createRedirectParams(r);return`${r.redirect}${e}`}},{kind:"method",key:"_createRedirectParams",value:function(r){const e=n();if(!r.params&&!Object.keys(e).length)return"";const t={};for(const[s,i]of Object.entries(r.params||{}))if(e[s]||!i.endsWith("?")){if(!e[s]||!this._checkParamType(i,e[s]))throw Error();t[s]=e[s]}return`?${c(t)}`}},{kind:"method",key:"_checkParamType",value:function(r,e){return"string"===r||"string?"===r}}]}}),e);export{d as REDIRECTS}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.4efe37f4.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.4efe37f4.js.gz deleted file mode 100644 index e9e8535..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.4efe37f4.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.4fe1a09a.js b/custom_components/hacs/hacs_frontend_experimental/c.4fe1a09a.js deleted file mode 100644 index 680f3da..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.4fe1a09a.js +++ /dev/null @@ -1,41 +0,0 @@ -import{_ as e,j as i,e as t,t as o,i as a,y as n,O as r,n as d,d as s}from"./main-c66a9a06.js";import"./c.41d13611.js";import{g as l}from"./c.f2bb3724.js";import{d as c}from"./c.05172f3d.js";import{c as u}from"./c.874c8cfd.js";import{b as h}from"./c.07e395f8.js";import"./c.bbadaeea.js";import"./c.8e28b461.js";import"./c.a5550d10.js";import"./c.930daaba.js";e([d("ha-config-entry-picker")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"integration",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"value",value:()=>""},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"field",decorators:[o()],key:"_configEntries",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[a("ha-combo-box")],key:"_comboBox",value:void 0},{kind:"method",key:"open",value:function(){var e;null===(e=this._comboBox)||void 0===e||e.open()}},{kind:"method",key:"focus",value:function(){var e;null===(e=this._comboBox)||void 0===e||e.focus()}},{kind:"method",key:"firstUpdated",value:function(){this._getConfigEntries()}},{kind:"field",key:"_rowRenderer",value(){return e=>{var i;return n` - ${e.title||this.hass.localize("ui.panel.config.integrations.config_entry.unnamed_entry")} - ${e.localized_domain_name} - - `}}},{kind:"method",key:"render",value:function(){return this._configEntries?n` - - `:n``}},{kind:"method",key:"_onImageLoad",value:function(e){e.target.style.visibility="initial"}},{kind:"method",key:"_onImageError",value:function(e){e.target.style.visibility="hidden"}},{kind:"method",key:"_getConfigEntries",value:async function(){l(this.hass,{type:["device","hub","service"],domain:this.integration}).then((e=>{this._configEntries=e.map((e=>({...e,localized_domain_name:c(this.hass.localize,e.domain)}))).sort(((e,i)=>u(e.localized_domain_name+e.title,i.localized_domain_name+i.title)))}))}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();const i=e.detail.value;i!==this._value&&this._setValue(i)}},{kind:"method",key:"_setValue",value:function(e){this.value=e,setTimeout((()=>{r(this,"value-changed",{value:e}),r(this,"change")}),0)}}]}}),i);let v=e([d("ha-selector-config_entry")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[t({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[t()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){var e;return n``}},{kind:"field",static:!0,key:"styles",value:()=>s` - ha-config-entry-picker { - width: 100%; - } - `}]}}),i);export{v as HaConfigEntrySelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.4fe1a09a.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.4fe1a09a.js.gz deleted file mode 100644 index e98b486..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.4fe1a09a.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.505101e3.js b/custom_components/hacs/hacs_frontend_experimental/c.505101e3.js deleted file mode 100644 index fa2f985..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.505101e3.js +++ /dev/null @@ -1,29 +0,0 @@ -import{a7 as e,_ as t,j as a,e as i,i as o,y as s,O as r,n}from"./main-c66a9a06.js";import{S as d}from"./c.baaad129.js";import{a as u,b as l,c,d as m,U as h}from"./c.811f664e.js";import{s as p}from"./c.468b43fb.js";import{f as _}from"./c.31caccfc.js";import{i as f,a as v,g as y,b,d as g}from"./c.d0468013.js";import{p as k}from"./c.3acef177.js";import{u as w}from"./c.e95db283.js";import{c as $}from"./c.d2f13ac1.js";import{a as j}from"./c.04ecc0ad.js";import{c as x}from"./c.fa0ef026.js";import"./c.bbadaeea.js";import"./c.708f0e16.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.2610e8cd.js";import"./c.743a15a1.js";import"./c.a0946910.js";import"./c.930daaba.js";const D={s:1,min:60,h:3600,d:86400};k&&await k;const I=(e,t)=>B(t).format(e),B=e((e=>new Intl.DateTimeFormat("en"!==e.language||w(e)?e.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:w(e)})));e((e=>new Intl.DateTimeFormat("en"!==e.language||w(e)?e.language:"en-u-hc-h23",{hour:w(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:w(e)}))),e((e=>new Intl.DateTimeFormat("en"!==e.language||w(e)?e.language:"en-u-hc-h23",{weekday:"long",hour:w(e)?"numeric":"2-digit",minute:"2-digit",hour12:w(e)}))),e((()=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1})));const T=(e,t,a,i)=>q(e,a,t.entity_id,t.attributes,void 0!==i?i:t.state),q=(e,t,a,i,o)=>{if(o===u||o===l)return e(`state.default.${o}`);if(f(i)){if("duration"===i.device_class&&i.unit_of_measurement&&D[i.unit_of_measurement])try{return s=o,r=i.unit_of_measurement,p(parseFloat(s)*D[r])||"0"}catch(e){}if("monetary"===i.device_class)try{return v(o,t,{style:"currency",currency:i.unit_of_measurement,minimumFractionDigits:2})}catch(e){}const e=i.unit_of_measurement?"%"===i.unit_of_measurement?(e=>{switch(e.language){case"cz":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}})(t)+"%":` ${i.unit_of_measurement}`:"";return`${v(o,t,y({state:o,attributes:i}))}${e}`}var s,r;const n=$(a);if("input_datetime"===n){if(void 0===o){let e;return i.has_date&&i.has_time?(e=new Date(i.year,i.month-1,i.day,i.hour,i.minute),b(e,t)):i.has_date?(e=new Date(i.year,i.month-1,i.day),_(e,t)):i.has_time?(e=new Date,e.setHours(i.hour,i.minute),I(e,t)):o}try{const e=o.split(" ");if(2===e.length)return b(new Date(e.join("T")),t);if(1===e.length){if(o.includes("-"))return _(new Date(`${o}T00:00`),t);if(o.includes(":")){const e=new Date;return I(new Date(`${e.toISOString().split("T")[0]}T${o}`),t)}}return o}catch(e){return o}}if("humidifier"===n&&"on"===o&&i.humidity)return`${i.humidity} %`;if("counter"===n||"number"===n||"input_number"===n)return v(o,t,y({state:o,attributes:i}));if("button"===n||"input_button"===n||"scene"===n||"sensor"===n&&"timestamp"===i.device_class)try{return b(new Date(o),t)}catch(e){return o}var d;return"update"===n?"on"===o?c(i)?j(i,m)&&"number"==typeof i.in_progress?e("ui.card.update.installing_with_progress",{progress:i.in_progress}):e("ui.card.update.installing"):i.latest_version:i.skipped_version===i.latest_version?null!==(d=i.latest_version)&&void 0!==d?d:e("state.default.unavailable"):e("ui.card.update.up_to_date"):i.device_class&&e(`component.${n}.state.${i.device_class}.${o}`)||e(`component.${n}.state._.${o}`)||o},F={alarm_control_panel:["armed_away","armed_custom_bypass","armed_home","armed_night","armed_vacation","arming","disarmed","disarming","pending","triggered"],automation:["on","off"],binary_sensor:["on","off"],button:[],calendar:["on","off"],camera:["idle","recording","streaming"],cover:["closed","closing","open","opening"],device_tracker:["home","not_home"],fan:["on","off"],humidifier:["on","off"],input_boolean:["on","off"],input_button:[],light:["on","off"],lock:["jammed","locked","locking","unlocked","unlocking"],media_player:["idle","off","paused","playing","standby"],person:["home","not_home"],remote:["on","off"],scene:[],schedule:["on","off"],script:["on","off"],siren:["on","off"],sun:["above_horizon","below_horizon"],switch:["on","off"],timer:["active","idle","paused"],update:["on","off"],vacuum:["cleaning","docked","error","idle","paused","returning"],weather:["clear-night","cloudy","exceptional","fog","hail","lightning-rainy","lightning","partlycloudy","pouring","rainy","snowy-rainy","snowy","sunny","windy-variant","windy"]},C={alarm_control_panel:{code_format:["number","text"]},binary_sensor:{device_class:["battery","battery_charging","co","cold","connectivity","door","garage_door","gas","heat","light","lock","moisture","motion","moving","occupancy","opening","plug","power","presence","problem","running","safety","smoke","sound","tamper","update","vibration","window"]},button:{device_class:["restart","update"]},camera:{frontend_stream_type:["hls","web_rtc"]},climate:{hvac_action:["off","idle","heating","cooling","drying","fan"]},cover:{device_class:["awning","blind","curtain","damper","door","garage","gate","shade","shutter","window"]},humidifier:{device_class:["humidifier","dehumidifier"]},media_player:{device_class:["tv","speaker","receiver"],media_content_type:["app","channel","episode","game","image","movie","music","playlist","tvshow","url","video"]},number:{device_class:["temperature"]},sensor:{device_class:["apparent_power","aqi","battery","carbon_dioxide","carbon_monoxide","current","date","duration","energy","frequency","gas","humidity","illuminance","monetary","nitrogen_dioxide","nitrogen_monoxide","nitrous_oxide","ozone","pm1","pm10","pm25","power_factor","power","pressure","reactive_power","signal_strength","sulphur_dioxide","temperature","timestamp","volatile_organic_compounds","voltage"],state_class:["measurement","total","total_increasing"]},switch:{device_class:["outlet","switch"]},update:{device_class:["firmware"]},water_heater:{away_mode:["on","off"]}};t([n("ha-entity-state-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"entityId",value:void 0},{kind:"field",decorators:[i()],key:"attribute",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"autofocus",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[i({type:Boolean,attribute:"allow-custom-value"})],key:"allowCustomValue",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"_opened",value:()=>!1},{kind:"field",decorators:[o("ha-combo-box",!0)],key:"_comboBox",value:void 0},{kind:"method",key:"shouldUpdate",value:function(e){return!(!e.has("_opened")&&this._opened)}},{kind:"method",key:"updated",value:function(e){if(e.has("_opened")&&this._opened){const e=this.entityId?this.hass.states[this.entityId]:void 0;this._comboBox.items=this.entityId&&e?((e,t)=>{const a=x(e),i=[];switch(!t&&a in F?i.push(...F[a]):t&&a in C&&t in C[a]&&i.push(...C[a][t]),a){case"climate":t?"fan_mode"===t?i.push(...e.attributes.fan_modes):"preset_mode"===t?i.push(...e.attributes.preset_modes):"swing_mode"===t&&i.push(...e.attributes.swing_modes):i.push(...e.attributes.hvac_modes);break;case"device_tracker":case"person":t||i.push("home","not_home");break;case"fan":"preset_mode"===t&&i.push(...e.attributes.preset_modes);break;case"humidifier":"mode"===t&&i.push(...e.attributes.available_modes);break;case"input_select":case"select":t||i.push(...e.attributes.options);break;case"light":"effect"===t&&e.attributes.effect_list?i.push(...e.attributes.effect_list):"color_mode"===t&&e.attributes.supported_color_modes&&i.push(...e.attributes.supported_color_modes);break;case"media_player":"sound_mode"===t?i.push(...e.attributes.sound_mode_list):"source"===t&&i.push(...e.attributes.source_list);break;case"remote":"current_activity"===t&&i.push(...e.attributes.activity_list);break;case"vacuum":"fan_speed"===t&&i.push(...e.attributes.fan_speed_list);break;case"water_heater":t&&"operation_mode"!==t||i.push(...e.attributes.operation_list)}return t||i.push(...h),[...new Set(i)]})(e,this.attribute).map((t=>({value:t,label:this.attribute?g(this.hass,t):T(this.hass.localize,e,this.hass.locale,t)}))):[]}}},{kind:"method",key:"render",value:function(){var e;return this.hass?s` - - - `:s``}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();const t=e.detail.value;t!==this._value&&this._setValue(t)}},{kind:"method",key:"_setValue",value:function(e){this.value=e,setTimeout((()=>{r(this,"value-changed",{value:e}),r(this,"change")}),0)}}]}}),a);let z=t([n("ha-selector-state")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i()],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"selector",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!0},{kind:"field",decorators:[i()],key:"context",value:void 0},{kind:"method",key:"render",value:function(){var e,t,a,i;return s` - - `}}]}}),d(a));export{z as HaSelectorState}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.505101e3.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.505101e3.js.gz deleted file mode 100644 index a990c5c..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.505101e3.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.56782cb7.js b/custom_components/hacs/hacs_frontend_experimental/c.56782cb7.js deleted file mode 100644 index f089409..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.56782cb7.js +++ /dev/null @@ -1,54 +0,0 @@ -import{_ as e,j as t,e as i,t as a,y as s,a8 as o,a9 as l,O as d,d as r,n}from"./main-c66a9a06.js";import"./c.a6328fdc.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";let h=e([n("ha-selector-text")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i()],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"name",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"placeholder",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i()],key:"selector",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!0},{kind:"field",decorators:[a()],key:"_unmaskedPassword",value:()=>!1},{kind:"method",key:"render",value:function(){var e,t,i,a,d,r,n;return null!==(e=this.selector.text)&&void 0!==e&&e.multiline?s``:s``:null===(a=this.selector.text)||void 0===a?void 0:a.suffix} - .required=${this.required} - .autocomplete=${null===(d=this.selector.text)||void 0===d?void 0:d.autocomplete} - > - ${"password"===(null===(r=this.selector.text)||void 0===r?void 0:r.type)?s``:""}`}},{kind:"method",key:"_toggleUnmaskedPassword",value:function(){this._unmaskedPassword=!this._unmaskedPassword}},{kind:"method",key:"_handleChange",value:function(e){let t=e.target.value;this.value!==t&&(""!==t||this.required||(t=void 0),d(this,"value-changed",{value:t}))}},{kind:"get",static:!0,key:"styles",value:function(){return r` - :host { - display: block; - position: relative; - } - ha-textarea, - ha-textfield { - width: 100%; - } - ha-icon-button { - position: absolute; - top: 10px; - right: 10px; - --mdc-icon-button-size: 36px; - --mdc-icon-size: 20px; - color: var(--secondary-text-color); - inset-inline-start: initial; - inset-inline-end: 10px; - direction: var(--direction); - } - `}}]}}),t);export{h as HaTextSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.56782cb7.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.56782cb7.js.gz deleted file mode 100644 index 76a1f91..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.56782cb7.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5853929c.js b/custom_components/hacs/hacs_frontend_experimental/c.5853929c.js deleted file mode 100644 index 557665f..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.5853929c.js +++ /dev/null @@ -1,266 +0,0 @@ -import{_ as e,e as i,t,i as a,y as d,eH as s,b2 as n,aD as c,k as r,eI as o,a4 as l,O as h,d as p,Y as u,n as v,j as _,a7 as m,E as y,G as k}from"./main-c66a9a06.js";import{b as g,s as f,d as b,a as $,g as x}from"./c.15496b0b.js";import{f as j,a as F,b as D}from"./c.6f18200a.js";import{S as z}from"./c.baaad129.js";import{c as C}from"./c.930daaba.js";import"./c.24287846.js";import{e as w}from"./c.3f62d98e.js";import{c as I}from"./c.d2f13ac1.js";import{c as P}from"./c.6eb9fcd4.js";import"./c.9381c7ae.js";import"./c.997c429c.js";import"./c.a47e7fac.js";import"./c.bbadaeea.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.874c8cfd.js";import"./c.fa0ef026.js";import"./c.1024e243.js";import"./c.d0c1a17e.js";import"./c.811f664e.js";import"./c.04ecc0ad.js";import"./c.2610e8cd.js";import"./c.4b0dc107.js";e([v("ha-target-picker")],(function(e,v){return{F:class extends v{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i({attribute:!1})],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",decorators:[i()],key:"deviceFilter",value:void 0},{kind:"field",decorators:[i()],key:"entityRegFilter",value:void 0},{kind:"field",decorators:[i()],key:"entityFilter",value:void 0},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"horizontal",value:()=>!1},{kind:"field",decorators:[t()],key:"_areas",value:void 0},{kind:"field",decorators:[t()],key:"_devices",value:void 0},{kind:"field",decorators:[t()],key:"_entities",value:void 0},{kind:"field",decorators:[t()],key:"_addMode",value:void 0},{kind:"field",decorators:[a("#input")],key:"_inputElement",value:void 0},{kind:"method",key:"hassSubscribe",value:function(){return[g(this.hass.connection,(e=>{const i={};for(const t of e)i[t.area_id]=t;this._areas=i})),f(this.hass.connection,(e=>{const i={};for(const t of e)i[t.id]=t;this._devices=i})),b(this.hass.connection,(e=>{this._entities=e}))]}},{kind:"method",key:"render",value:function(){return this._areas&&this._devices&&this._entities?d` - ${this.horizontal?d` -
    - ${this._renderChips()} ${this._renderPicker()} -
    - ${this._renderItems()} - `:d` -
    - ${this._renderItems()} ${this._renderPicker()} - ${this._renderChips()} -
    - `} - `:d``}},{kind:"method",key:"_renderItems",value:function(){var e,i,t;return d` -
    - ${null!==(e=this.value)&&void 0!==e&&e.area_id?w(this.value.area_id).map((e=>{const i=this._areas[e];return this._renderChip("area_id",e,(null==i?void 0:i.name)||e,void 0,s)})):""} - ${null!==(i=this.value)&&void 0!==i&&i.device_id?w(this.value.device_id).map((e=>{const i=this._devices[e];return this._renderChip("device_id",e,i?$(i,this.hass):e,void 0,n)})):""} - ${null!==(t=this.value)&&void 0!==t&&t.entity_id?w(this.value.entity_id).map((e=>{const i=this.hass.states[e];return this._renderChip("entity_id",e,i?P(i):e,i)})):""} -
    - `}},{kind:"method",key:"_renderChips",value:function(){return d` -
    -
    -
    - - - - ${this.hass.localize("ui.components.target-picker.add_area_id")} - - -
    -
    -
    - - - - ${this.hass.localize("ui.components.target-picker.add_device_id")} - - -
    -
    -
    - - - - ${this.hass.localize("ui.components.target-picker.add_entity_id")} - - -
    -
    - ${this.helper?d`${this.helper}`:""} - `}},{kind:"method",key:"_showPicker",value:async function(e){var i,t;this._addMode=e.currentTarget.type,await this.updateComplete,await(null===(i=this._inputElement)||void 0===i?void 0:i.focus()),await(null===(t=this._inputElement)||void 0===t?void 0:t.open())}},{kind:"method",key:"_renderChip",value:function(e,i,t,a,s){return d` -
    - ${s?d``:""} - ${a?d``:""} - - - ${t} - - - ${"entity_id"===e?"":d` - - ${this.hass.localize(`ui.components.target-picker.expand_${e}`)} - `} - - - ${this.hass.localize(`ui.components.target-picker.remove_${e}`)} - -
    - `}},{kind:"method",key:"_renderPicker",value:function(){switch(this._addMode){case"area_id":return d` - - `;case"device_id":return d` - - `;case"entity_id":return d` - - `}return d``}},{kind:"method",key:"_targetPicked",value:function(e){if(e.stopPropagation(),!e.detail.value)return;const i=e.detail.value,t=e.currentTarget;t.value="",this._addMode=void 0,h(this,"value-changed",{value:this.value?{...this.value,[t.type]:this.value[t.type]?[...w(this.value[t.type]),i]:i}:{[t.type]:i}})}},{kind:"method",key:"_handleExpand",value:function(e){const i=e.currentTarget,t=[],a=[];if("area_id"===i.type)Object.values(this._devices).forEach((e=>{var a;e.area_id!==i.id||null!==(a=this.value.device_id)&&void 0!==a&&a.includes(e.id)||!this._deviceMeetsFilter(e)||t.push(e.id)})),this._entities.forEach((e=>{var t;e.area_id!==i.id||null!==(t=this.value.entity_id)&&void 0!==t&&t.includes(e.entity_id)||!this._entityRegMeetsFilter(e)||a.push(e.entity_id)}));else{if("device_id"!==i.type)return;this._entities.forEach((e=>{var t;e.device_id!==i.id||null!==(t=this.value.entity_id)&&void 0!==t&&t.includes(e.entity_id)||!this._entityRegMeetsFilter(e)||a.push(e.entity_id)}))}let d=this.value;a.length&&(d=this._addItems(d,"entity_id",a)),t.length&&(d=this._addItems(d,"device_id",t)),d=this._removeItem(d,i.type,i.id),h(this,"value-changed",{value:d})}},{kind:"method",key:"_handleRemove",value:function(e){const i=e.currentTarget;h(this,"value-changed",{value:this._removeItem(this.value,i.type,i.id)})}},{kind:"method",key:"_addItems",value:function(e,i,t){return{...e,[i]:e[i]?w(e[i]).concat(t):t}}},{kind:"method",key:"_removeItem",value:function(e,i,t){const a=w(e[i]).filter((e=>String(e)!==t));if(a.length)return{...e,[i]:a};const d={...e};return delete d[i],Object.keys(d).length?d:void 0}},{kind:"method",key:"_deviceMeetsFilter",value:function(e){var i;const t=null===(i=this._entities)||void 0===i?void 0:i.filter((i=>i.device_id===e.id));if(this.includeDomains){if(!t||!t.length)return!1;if(!t.some((e=>this.includeDomains.includes(I(e.entity_id)))))return!1}if(this.includeDeviceClasses){if(!t||!t.length)return!1;if(!t.some((e=>{const i=this.hass.states[e.entity_id];return!!i&&(i.attributes.device_class&&this.includeDeviceClasses.includes(i.attributes.device_class))})))return!1}return!this.deviceFilter||this.deviceFilter(e)}},{kind:"method",key:"_entityRegMeetsFilter",value:function(e){if(e.entity_category)return!1;if(this.includeDomains&&!this.includeDomains.includes(I(e.entity_id)))return!1;if(this.includeDeviceClasses){const i=this.hass.states[e.entity_id];if(!i)return!1;if(!i.attributes.device_class||!this.includeDeviceClasses.includes(i.attributes.device_class))return!1}return!this.entityRegFilter||this.entityRegFilter(e)}},{kind:"get",static:!0,key:"styles",value:function(){return p` - ${u(C)} - .horizontal-container { - display: flex; - flex-wrap: wrap; - min-height: 56px; - align-items: center; - } - .mdc-chip { - color: var(--primary-text-color); - } - .items { - z-index: 2; - } - .mdc-chip-set { - padding: 4px 0; - } - .mdc-chip.add { - color: rgba(0, 0, 0, 0.87); - } - .mdc-chip:not(.add) { - cursor: default; - } - .mdc-chip ha-icon-button { - --mdc-icon-button-size: 24px; - display: flex; - align-items: center; - outline: none; - } - .mdc-chip ha-icon-button ha-svg-icon { - border-radius: 50%; - background: var(--secondary-text-color); - } - .mdc-chip__icon.mdc-chip__icon--trailing { - width: 16px; - height: 16px; - --mdc-icon-size: 14px; - color: var(--secondary-text-color); - margin-inline-start: 4px !important; - margin-inline-end: -4px !important; - direction: var(--direction); - } - .mdc-chip__icon--leading { - display: flex; - align-items: center; - justify-content: center; - --mdc-icon-size: 20px; - border-radius: 50%; - padding: 6px; - margin-left: -14px !important; - margin-inline-start: -14px !important; - margin-inline-end: 4px !important; - direction: var(--direction); - } - .expand-btn { - margin-right: 0; - } - .mdc-chip.area_id:not(.add) { - border: 2px solid #fed6a4; - background: var(--card-background-color); - } - .mdc-chip.area_id:not(.add) .mdc-chip__icon--leading, - .mdc-chip.area_id.add { - background: #fed6a4; - } - .mdc-chip.device_id:not(.add) { - border: 2px solid #a8e1fb; - background: var(--card-background-color); - } - .mdc-chip.device_id:not(.add) .mdc-chip__icon--leading, - .mdc-chip.device_id.add { - background: #a8e1fb; - } - .mdc-chip.entity_id:not(.add) { - border: 2px solid #d2e7b9; - background: var(--card-background-color); - } - .mdc-chip.entity_id:not(.add) .mdc-chip__icon--leading, - .mdc-chip.entity_id.add { - background: #d2e7b9; - } - .mdc-chip:hover { - z-index: 5; - } - paper-tooltip.expand { - min-width: 200px; - } - :host([disabled]) .mdc-chip { - opacity: var(--light-disabled-opacity); - pointer-events: none; - } - `}}]}}),z(_));let E=e([v("ha-selector-target")],(function(e,a){class s extends a{constructor(...i){super(...i),e(this)}}return{F:s,d:[{kind:"field",decorators:[i()],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"selector",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[t()],key:"_entitySources",value:void 0},{kind:"field",decorators:[t()],key:"_entities",value:void 0},{kind:"field",key:"_deviceIntegrationLookup",value:()=>m(x)},{kind:"method",key:"hassSubscribe",value:function(){return[b(this.hass.connection,(e=>{this._entities=e.filter((e=>null!==e.device_id))}))]}},{kind:"method",key:"updated",value:function(e){var i,t,a,d;y(k(s.prototype),"updated",this).call(this,e),e.has("selector")&&(null!==(i=this.selector.target)&&void 0!==i&&null!==(t=i.device)&&void 0!==t&&t.integration||null!==(a=this.selector.target)&&void 0!==a&&null!==(d=a.entity)&&void 0!==d&&d.integration)&&!this._entitySources&&j(this.hass).then((e=>{this._entitySources=e}))}},{kind:"method",key:"render",value:function(){var e,i,t,a;return(null!==(e=this.selector.target)&&void 0!==e&&null!==(i=e.device)&&void 0!==i&&i.integration||null!==(t=this.selector.target)&&void 0!==t&&null!==(a=t.entity)&&void 0!==a&&a.integration)&&!this._entitySources?d``:d``}},{kind:"field",key:"_filterEntities",value(){return e=>{var i;return null===(i=this.selector.target)||void 0===i||!i.entity||F(this.selector.target.entity,e,this._entitySources)}}},{kind:"field",key:"_filterDevices",value(){return e=>{var i;if(null===(i=this.selector.target)||void 0===i||!i.device)return!0;const t=this._entitySources&&this._entities?this._deviceIntegrationLookup(this._entitySources,this._entities):void 0;return D(this.selector.target.device,e,t)}}},{kind:"get",static:!0,key:"styles",value:function(){return p` - ha-target-picker { - display: block; - } - `}}]}}),z(_));export{E as HaTargetSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5853929c.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.5853929c.js.gz deleted file mode 100644 index b2273c2..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.5853929c.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5971c15f.js b/custom_components/hacs/hacs_frontend_experimental/c.5971c15f.js deleted file mode 100644 index 66a8fa5..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.5971c15f.js +++ /dev/null @@ -1,32 +0,0 @@ -import{_ as e,j as i,e as o,t as a,i as s,y as d,O as t,n,d as l}from"./main-c66a9a06.js";import{i as r}from"./c.21c042d4.js";import{s as c}from"./c.874c8cfd.js";import{a as u}from"./c.4b0dc107.js";const h=async e=>((e,i,o,a)=>{const[s,d,t]=e.split(".",3);return Number(s)>i||Number(s)===i&&(void 0===a?Number(d)>=o:Number(d)>o)||void 0!==a&&Number(s)===i&&Number(d)===o&&Number(t)>=a})(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/addons",method:"get"}):(await e.callApi("GET","hassio/addons")).data,v=e=>d` - ${e.name} - ${e.slug} - ${e.icon?d``:""} -`;e([n("ha-addon-picker")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",key:"hass",value:void 0},{kind:"field",decorators:[o()],key:"label",value:void 0},{kind:"field",decorators:[o()],key:"value",value:()=>""},{kind:"field",decorators:[o()],key:"helper",value:void 0},{kind:"field",decorators:[a()],key:"_addons",value:void 0},{kind:"field",decorators:[o({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[o({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[s("ha-combo-box")],key:"_comboBox",value:void 0},{kind:"method",key:"open",value:function(){var e;null===(e=this._comboBox)||void 0===e||e.open()}},{kind:"method",key:"focus",value:function(){var e;null===(e=this._comboBox)||void 0===e||e.focus()}},{kind:"method",key:"firstUpdated",value:function(){this._getAddons()}},{kind:"method",key:"render",value:function(){return this._addons?d` - - `:d``}},{kind:"method",key:"_getAddons",value:async function(){try{if(r(this.hass,"hassio")){const e=await h(this.hass);this._addons=e.addons.filter((e=>e.version)).sort(((e,i)=>c(e.name,i.name)))}else u(this,{title:this.hass.localize("ui.components.addon-picker.error.no_supervisor.title"),text:this.hass.localize("ui.components.addon-picker.error.no_supervisor.description")})}catch(e){u(this,{title:this.hass.localize("ui.components.addon-picker.error.fetch_addons.title"),text:this.hass.localize("ui.components.addon-picker.error.fetch_addons.description")})}}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_addonChanged",value:function(e){e.stopPropagation();const i=e.detail.value;i!==this._value&&this._setValue(i)}},{kind:"method",key:"_setValue",value:function(e){this.value=e,setTimeout((()=>{t(this,"value-changed",{value:e}),t(this,"change")}),0)}}]}}),i);let k=e([n("ha-selector-addon")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[o()],key:"hass",value:void 0},{kind:"field",decorators:[o()],key:"selector",value:void 0},{kind:"field",decorators:[o()],key:"value",value:void 0},{kind:"field",decorators:[o()],key:"label",value:void 0},{kind:"field",decorators:[o()],key:"helper",value:void 0},{kind:"field",decorators:[o({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[o({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){return d``}},{kind:"field",static:!0,key:"styles",value:()=>l` - ha-addon-picker { - width: 100%; - } - `}]}}),i);export{k as HaAddonSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5971c15f.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.5971c15f.js.gz deleted file mode 100644 index e0102bf..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.5971c15f.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5f671b2d.js b/custom_components/hacs/hacs_frontend_experimental/c.5f671b2d.js deleted file mode 100644 index ca382b6..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.5f671b2d.js +++ /dev/null @@ -1,204 +0,0 @@ -import{_ as t,j as o,e,E as a,G as i,y as s,a6 as r,d as n,n as h,t as c,ag as l,r as d,g as p,a7 as u,aN as f,aO as v,aP as y,aQ as b,aR as m,aS as k,c as g}from"./main-c66a9a06.js";import{e as _}from"./c.50bfd408.js";import"./c.930daaba.js";import"./c.070412a6.js";import{s as w}from"./c.4b0dc107.js";import{r as x,a as $}from"./c.271a0d49.js";import{c as z}from"./c.41d13611.js";import"./c.73c7fa75.js";import{f as j}from"./c.fe747ba2.js";import{m as L}from"./c.ba59af11.js";import"./c.24287846.js";import"./c.f2bb3724.js";import"./c.8e28b461.js";import"./c.743a15a1.js";t([h("hass-subpage")],(function(t,o){class h extends o{constructor(...o){super(...o),t(this)}}return{F:h,d:[{kind:"field",decorators:[e({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[e()],key:"header",value:void 0},{kind:"field",decorators:[e({type:Boolean,attribute:"main-page"})],key:"mainPage",value:()=>!1},{kind:"field",decorators:[e({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[e()],key:"backCallback",value:void 0},{kind:"field",decorators:[e({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[e({type:Boolean})],key:"supervisor",value:()=>!1},{kind:"field",decorators:[x(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"willUpdate",value:function(t){if(a(i(h.prototype),"willUpdate",this).call(this,t),!t.has("hass"))return;const o=t.get("hass");var e,s,r;o&&o.locale===this.hass.locale||(e=this,s="rtl",void 0!==(r=z(this.hass))&&(r=!!r),e.hasAttribute(s)?r||e.removeAttribute(s):!1!==r&&e.setAttribute(s,""))}},{kind:"method",key:"render",value:function(){var t;return s` -
    - ${this.mainPage||null!==(t=history.state)&&void 0!==t&&t.root?s` - - `:this.backPath?s` - - - - `:s` - - `} - -
    ${this.header}
    - -
    -
    -
    - -
    - `}},{kind:"method",decorators:[r({passive:!0})],key:"_saveScrollPos",value:function(t){this._savedScrollPos=t.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return n` - :host { - display: block; - height: 100%; - background-color: var(--primary-background-color); - } - - :host([narrow]) { - width: 100%; - position: fixed; - } - - .toolbar { - display: flex; - align-items: center; - font-size: 20px; - height: var(--header-height); - padding: 0 16px; - pointer-events: none; - background-color: var(--app-header-background-color); - font-weight: 400; - color: var(--app-header-text-color, white); - border-bottom: var(--app-header-border-bottom, none); - box-sizing: border-box; - } - .toolbar a { - color: var(--sidebar-text-color); - text-decoration: none; - } - - ha-menu-button, - ha-icon-button-arrow-prev, - ::slotted([slot="toolbar-icon"]) { - pointer-events: auto; - color: var(--sidebar-icon-color); - } - - .main-title { - margin: 0 0 0 24px; - line-height: 20px; - flex-grow: 1; - } - - .content { - position: relative; - width: 100%; - height: calc(100% - 1px - var(--header-height)); - overflow-y: auto; - overflow: auto; - -webkit-overflow-scrolling: touch; - } - - #fab { - position: fixed; - right: calc(16px + env(safe-area-inset-right)); - bottom: calc(16px + env(safe-area-inset-bottom)); - z-index: 1; - } - :host([narrow]) #fab.tabs { - bottom: calc(84px + env(safe-area-inset-bottom)); - } - #fab[is-wide] { - bottom: 24px; - right: 24px; - } - :host([rtl]) #fab { - right: auto; - left: calc(16px + env(safe-area-inset-left)); - } - :host([rtl][is-wide]) #fab { - bottom: 24px; - left: 24px; - right: auto; - } - `}}]}}),o);let C=t([h("hacs-repository-panel")],(function(t,o){class r extends o{constructor(...o){super(...o),t(this)}}return{F:r,d:[{kind:"field",decorators:[e({attribute:!1})],key:"hacs",value:void 0},{kind:"field",decorators:[e({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[e({attribute:!1})],key:"narrow",value:void 0},{kind:"field",decorators:[e({attribute:!1})],key:"isWide",value:void 0},{kind:"field",decorators:[e({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[e({attribute:!1})],key:"_repository",value:void 0},{kind:"field",decorators:[c()],key:"_error",value:void 0},{kind:"method",key:"connectedCallback",value:function(){a(i(r.prototype),"connectedCallback",this).call(this),document.body.addEventListener("keydown",this._generateMyLink)}},{kind:"method",key:"disconnectedCallback",value:function(){a(i(r.prototype),"disconnectedCallback",this).call(this),document.body.removeEventListener("keydown",this._generateMyLink)}},{kind:"field",key:"_generateMyLink",value(){return t=>{if(!(t.ctrlKey||t.shiftKey||t.metaKey||t.altKey)&&"m"===t.key&&l.location.pathname.startsWith("/hacs/repository/")){if(!this._repository)return;const t=new URLSearchParams({redirect:"hacs_repository",owner:this._repository.full_name.split("/")[0],repository:this._repository.full_name.split("/")[1],category:this._repository.category});window.open(`https://my.home-assistant.io/create-link/?${t.toString()}`,"_blank")}}}},{kind:"method",key:"firstUpdated",value:async function(t){a(i(r.prototype),"firstUpdated",this).call(this,t);const o=_();if(Object.entries(o).length){let t;const e=`${o.owner}/${o.repository}`;if(t=this.hacs.repositories.find((t=>t.full_name.toLocaleLowerCase()===e.toLocaleLowerCase())),!t&&o.category){if(!await w(this,{title:this.hacs.localize("my.add_repository_title"),text:this.hacs.localize("my.add_repository_description",{repository:e}),confirmText:this.hacs.localize("common.add"),dismissText:this.hacs.localize("common.cancel")}))return void(this._error=this.hacs.localize("my.repository_not_found",{repository:e}));try{await d(this.hass,e,o.category),this.hacs.repositories=await p(this.hass),t=this.hacs.repositories.find((t=>t.full_name.toLocaleLowerCase()===e.toLocaleLowerCase()))}catch(t){return void(this._error=t)}}t?this._fetchRepository(String(t.id)):this._error=this.hacs.localize("my.repository_not_found",{repository:e})}else{const t=this.route.path.indexOf("/",1),o=this.route.path.substr(t+1);if(!o)return void(this._error="Missing repositoryId from route");this._fetchRepository(o)}}},{kind:"method",key:"updated",value:function(t){a(i(r.prototype),"updated",this).call(this,t),t.has("repositories")&&this._repository&&this._fetchRepository()}},{kind:"method",key:"_fetchRepository",value:async function(t){try{this._repository=await j(this.hass,t||String(this._repository.id))}catch(t){this._error=null==t?void 0:t.message}}},{kind:"field",key:"_getAuthors",value:()=>u((t=>{const o=[];if(!t.authors)return o;if(t.authors.forEach((t=>o.push(t.replace("@","")))),0===o.length){const e=t.full_name.split("/")[0];if(["custom-cards","custom-components","home-assistant-community-themes"].includes(e))return o;o.push(e)}return o}))},{kind:"method",key:"render",value:function(){if(this._error)return s``;if(!this._repository)return s``;const t=this._getAuthors(this._repository);return s` - - - -
    -
    - ${this._repository.installed?s` - - - ${this._repository.installed_version} - - `:""} - ${t?t.map((t=>s` - - - @${t} - - `)):""} - ${this._repository.downloads?s` - - ${this._repository.downloads} - `:""} - - - ${this._repository.stars} - - - - - ${this._repository.issues} - - -
    - ${L.html(this._repository.additional_info||this.hacs.localize("dialog_info.no_info"),this._repository)} -
    - ${this._repository.installed_version?"":s` - - `} -
    - `}},{kind:"method",key:"_downloadRepositoryDialog",value:function(){this.dispatchEvent(new CustomEvent("hacs-dialog",{detail:{type:"download",repository:this._repository.id},bubbles:!0,composed:!0}))}},{kind:"get",static:!0,key:"styles",value:function(){return[g,n` - hass-loading-screen { - --app-header-background-color: var(--sidebar-background-color); - --app-header-text-color: var(--sidebar-text-color); - height: 100vh; - } - - hass-subpage { - position: absolute; - width: 100vw; - } - - ha-svg-icon { - color: var(--hcv-text-color-on-background); - } - - ha-fab { - position: fixed; - float: right; - right: calc(18px + env(safe-area-inset-right)); - bottom: calc(16px + env(safe-area-inset-bottom)); - z-index: 1; - } - - ha-fab.rtl { - float: left; - right: auto; - left: calc(18px + env(safe-area-inset-left)); - } - - .content { - padding: 12px; - margin-bottom: 64px; - } - - .chips { - display: flex; - flex-wrap: wrap; - padding-bottom: 8px; - gap: 4px; - } - - @media all and (max-width: 500px) { - .content { - margin: 8px 4px 64px; - } - } - `]}}]}}),o);export{C as HacsRepositoryPanel}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5f671b2d.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.5f671b2d.js.gz deleted file mode 100644 index eafae51..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.5f671b2d.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5faead67.js b/custom_components/hacs/hacs_frontend_experimental/c.5faead67.js deleted file mode 100644 index f8a2db5..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.5faead67.js +++ /dev/null @@ -1,78 +0,0 @@ -import{_ as i,j as a,e as t,t as s,i as o,y as e,eJ as r,p as l,k as n,O as d,d as c,n as m}from"./main-c66a9a06.js";import"./c.b914d43e.js";import"./c.6912e15e.js";import"./c.8e28b461.js";i([m("dialog-box")],(function(i,a){return{F:class extends a{constructor(...a){super(...a),i(this)}},d:[{kind:"field",decorators:[t({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[s()],key:"_params",value:void 0},{kind:"field",decorators:[o("ha-textfield")],key:"_textField",value:void 0},{kind:"method",key:"showDialog",value:async function(i){this._params=i}},{kind:"method",key:"closeDialog",value:function(){var i,a;return!(null!==(i=this._params)&&void 0!==i&&i.confirmation||null!==(a=this._params)&&void 0!==a&&a.prompt)&&(!this._params||(this._dismiss(),!0))}},{kind:"method",key:"render",value:function(){if(!this._params)return e``;const i=this._params.confirmation||this._params.prompt;return e` - `:""}${this._params.title?this._params.title:this._params.confirmation&&this.hass.localize("ui.dialogs.generic.default_confirmation_title")}`} - > -
    - ${this._params.text?e` -

    - ${this._params.text} -

    - `:""} - ${this._params.prompt?e` - - `:""} -
    - ${i&&e` - - ${this._params.dismissText?this._params.dismissText:this.hass.localize("ui.dialogs.generic.cancel")} - - `} - - ${this._params.confirmText?this._params.confirmText:this.hass.localize("ui.dialogs.generic.ok")} - -
    - `}},{kind:"method",key:"_dismiss",value:function(){var i;null!==(i=this._params)&&void 0!==i&&i.cancel&&this._params.cancel(),this._close()}},{kind:"method",key:"_confirm",value:function(){var i;this._params.confirm&&this._params.confirm(null===(i=this._textField)||void 0===i?void 0:i.value);this._close()}},{kind:"method",key:"_dialogClosed",value:function(i){"ignore"!==i.detail.action&&this._dismiss()}},{kind:"method",key:"_close",value:function(){this._params&&(this._params=void 0,d(this,"dialog-closed",{dialog:this.localName}))}},{kind:"get",static:!0,key:"styles",value:function(){return c` - :host([inert]) { - pointer-events: initial !important; - cursor: initial !important; - } - a { - color: var(--primary-color); - } - p { - margin: 0; - color: var(--primary-text-color); - } - .no-bottom-padding { - padding-bottom: 0; - } - .secondary { - color: var(--secondary-text-color); - } - .destructive { - --mdc-theme-primary: var(--error-color); - } - ha-dialog { - --mdc-dialog-heading-ink-color: var(--primary-text-color); - --mdc-dialog-content-ink-color: var(--primary-text-color); - /* Place above other dialogs */ - --dialog-z-index: 104; - } - @media all and (min-width: 600px) { - ha-dialog { - --mdc-dialog-min-width: 400px; - } - } - ha-textfield { - width: 100%; - } - `}}]}}),a); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5faead67.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.5faead67.js.gz deleted file mode 100644 index 2922dc8..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.5faead67.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.5fe2e3ab.js b/custom_components/hacs/hacs_frontend_experimental/c.5fe2e3ab.js index 394d5aa..a602972 100644 --- a/custom_components/hacs/hacs_frontend_experimental/c.5fe2e3ab.js +++ b/custom_components/hacs/hacs_frontend_experimental/c.5fe2e3ab.js @@ -1 +1 @@ -function e(e){return null==e}var t={isNothing:e,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(t){return Array.isArray(t)?t:e(t)?[]:[t]},repeat:function(e,t){var n,i="";for(n=0;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function a(e,n){return t.repeat(" ",n-e.length)+e}var l=function(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),"number"!=typeof n.indent&&(n.indent=1),"number"!=typeof n.linesBefore&&(n.linesBefore=3),"number"!=typeof n.linesAfter&&(n.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,l=[0],c=[],s=-1;i=r.exec(e.buffer);)c.push(i.index),l.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=l.length-2);s<0&&(s=l.length-1);var u,p,f="",d=Math.min(e.line+n.linesAfter,c.length).toString().length,h=n.maxLength-(n.indent+d+3);for(u=1;u<=n.linesBefore&&!(s-u<0);u++)p=o(e.buffer,l[s-u],c[s-u],e.position-(l[s]-l[s-u]),h),f=t.repeat(" ",n.indent)+a((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f;for(p=o(e.buffer,l[s],c[s],e.position,h),f+=t.repeat(" ",n.indent)+a((e.line+1).toString(),d)+" | "+p.str+"\n",f+=t.repeat("-",n.indent+d+3+p.pos)+"^\n",u=1;u<=n.linesAfter&&!(s+u>=c.length);u++)p=o(e.buffer,l[s+u],c[s+u],e.position-(l[s]-l[s+u]),h),f+=t.repeat(" ",n.indent)+a((e.line+u+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},c=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];var u=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===c.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===s.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function p(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function f(e){return this.extend(e)}f.prototype.extend=function(e){var t=[],n=[];if(e instanceof u)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof u))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof u))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(f.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=p(i,"implicit"),i.compiledExplicit=p(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),v=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var A=/^[-+]?[0-9]+e/;var w=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!v.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||t.isNegativeZero(e))},represent:function(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(e))return"-0.0";return i=e.toString(10),A.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),k=d.extend({implicit:[h,g,b,w]}),x=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),C=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var I=new u("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==x.exec(e)||null!==C.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null;if(null===(t=x.exec(e))&&(t=C.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var O=new u("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var S=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=j;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=j,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=j;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),T=Object.prototype.hasOwnProperty,N=Object.prototype.toString;var F=new u("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var J=new Array(256),H=new Array(256),X=0;X<256;X++)J[X]=Q(X)?1:0,H[X]=Q(X);function ee(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||q,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function te(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=l(n),new r(t,n)}function ne(e,t){throw te(e,t)}function ie(e,t){e.onWarning&&e.onWarning.call(null,te(e,t))}var re={YAML:function(e,t,n){var i,r,o;null!==e.version&&ne(e,"duplication of %YAML directive"),1!==n.length&&ne(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&ne(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&ne(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&ie(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&ne(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],B.test(i)||ne(e,"ill-formed tag handle (first argument) of the TAG directive"),D.call(e.tagMap,i)&&ne(e,'there is a previously declared suffix for "'+i+'" tag handle'),K.test(r)||ne(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){ne(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function oe(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=t.repeat("\n",n-1))}function fe(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ne(e,"tab characters must not be used in indentation")),45===i)&&G(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,se(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,ge(e,t,3,!1,!0),a.push(e.result),se(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)ne(e,"bad indentation of a sequence entry");else if(e.lineIndentn?g=1:e.lineIndent===n?g=0:e.lineIndentn?g=1:e.lineIndent===n?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),ge(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(le(e,f,d,h,g,m,a,l,c),h=g=m=null),se(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)ne(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?ne(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ne(e,"repeat of an indentation width identifier"):(p=n+o-1,u=!0)}if($(a)){do{a=e.input.charCodeAt(++e.position)}while($(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!P(a)&&0!==a)}for(;0!==a;){for(ce(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),P(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=Z(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:ne(e,"expected hexadecimal character");e.result+=z(o),e.position++}else ne(e,"unknown escape sequence");n=i=e.position}else P(l)?(oe(e,n,i,!0),pe(e,se(e,!1,t)),n=i=e.position):e.position===e.lineStart&&ue(e)?ne(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ne(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!G(i)&&!V(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ne(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),D.call(e.anchorMap,n)||ne(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],se(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result;if(G(u=e.input.charCodeAt(e.position))||V(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(G(i=e.input.charCodeAt(e.position+1))||n&&V(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(G(i=e.input.charCodeAt(e.position+1))||n&&V(i))break}else if(35===u){if(G(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&ue(e)||n&&V(u))break;if(P(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,se(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s;break}}a&&(oe(e,r,o,!1),pe(e,e.line-l),r=o=e.position,a=!1),$(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return oe(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||ne(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&fe(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ne(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s"),null!==e.result&&f.kind!==e.kind&&ne(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ne(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function me(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(se(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!G(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&ne(e,"directive name must not be less than one character in length");0!==r;){for(;$(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!P(r));break}if(P(r))break;for(t=e.position;0!==r&&!G(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&ce(e),D.call(re,n)?re[n](e,n,i):ie(e,'unknown document directive "'+n+'"')}se(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,se(e,!0,-1)):a&&ne(e,"directives end mark is expected"),ge(e,e.lineIndent-1,4,!1,!0),se(e,!0,-1),e.checkLineBreaks&&Y.test(e.input.slice(o,e.position))&&ie(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ue(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,se(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Le(e){return/^\n* /.test(e)}function Ee(e,t,n,i,r,o,a,l){var c,s,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=Te(s=Me(e,0))&&65279!==s&&!Se(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!Se(e)&&58!==e}(Me(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!Te(u=Me(e,c)))return 5;m=m&&Fe(u,p,l),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Me(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!Te(u))return 5;m=m&&Fe(u,p,l),p=u}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Le(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function _e(e,t,n,i,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==ke.indexOf(t)||xe.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=i||e.flowLevel>-1&&n>=e.flowLevel;switch(Ee(t,c,e.indent,l,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+qe(t,e.indent)+De(Oe(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,Ue(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],s=i[2];n=" "===s[0],o+=c+(a||n||""===s?"":"\n")+Ue(s,t),a=n}return o}(t,l),a));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=Me(e,r),!(t=we[i])&&Te(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Ce(i);return n}(t)+'"';default:throw new r("impossible error: invalid scalar style")}}()}function qe(e,t){var n=Le(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function De(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Ue(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function Ye(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=c.represent[s](t,s)}e.dump=i}return!0}return!1}function Be(e,t,n,i,o,a,l){e.tag=null,e.dump=n,Re(e,n,!1)||Re(e,n,!0);var c,s=ve.call(e.dump),u=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===s||"[object Array]"===s;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(o=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var o,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new r("sortKeys must be a boolean or a function");for(o=0,a=d.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=je(e,t)),Be(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,o),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Be(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?Ye(e,t-1,e.dump,o):Ye(e,t,e.dump,o),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=c+" "+e.dump)}return!0}function Ke(e,t){var n,i,r=[],o=[];for(We(e,r,o),n=0,i=o.length;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function a(e,n){return t.repeat(" ",n-e.length)+e}var l=function(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),"number"!=typeof n.indent&&(n.indent=1),"number"!=typeof n.linesBefore&&(n.linesBefore=3),"number"!=typeof n.linesAfter&&(n.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,l=[0],c=[],s=-1;i=r.exec(e.buffer);)c.push(i.index),l.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=l.length-2);s<0&&(s=l.length-1);var u,p,f="",d=Math.min(e.line+n.linesAfter,c.length).toString().length,h=n.maxLength-(n.indent+d+3);for(u=1;u<=n.linesBefore&&!(s-u<0);u++)p=o(e.buffer,l[s-u],c[s-u],e.position-(l[s]-l[s-u]),h),f=t.repeat(" ",n.indent)+a((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f;for(p=o(e.buffer,l[s],c[s],e.position,h),f+=t.repeat(" ",n.indent)+a((e.line+1).toString(),d)+" | "+p.str+"\n",f+=t.repeat("-",n.indent+d+3+p.pos)+"^\n",u=1;u<=n.linesAfter&&!(s+u>=c.length);u++)p=o(e.buffer,l[s+u],c[s+u],e.position-(l[s]-l[s+u]),h),f+=t.repeat(" ",n.indent)+a((e.line+u+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},c=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];var u=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===c.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===s.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function p(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function f(e){return this.extend(e)}f.prototype.extend=function(e){var t=[],n=[];if(e instanceof u)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof u))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof u))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(f.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=p(i,"implicit"),i.compiledExplicit=p(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),v=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var A=/^[-+]?[0-9]+e/;var w=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!v.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||t.isNegativeZero(e))},represent:function(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(e))return"-0.0";return i=e.toString(10),A.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),k=d.extend({implicit:[h,g,b,w]}),x=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),C=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var I=new u("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==x.exec(e)||null!==C.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null;if(null===(t=x.exec(e))&&(t=C.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var O=new u("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var S=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=j;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=j,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=j;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),T=Object.prototype.hasOwnProperty,N=Object.prototype.toString;var F=new u("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var J=new Array(256),H=new Array(256),X=0;X<256;X++)J[X]=Q(X)?1:0,H[X]=Q(X);function ee(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||q,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function te(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=l(n),new r(t,n)}function ne(e,t){throw te(e,t)}function ie(e,t){e.onWarning&&e.onWarning.call(null,te(e,t))}var re={YAML:function(e,t,n){var i,r,o;null!==e.version&&ne(e,"duplication of %YAML directive"),1!==n.length&&ne(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&ne(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&ne(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&ie(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&ne(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],B.test(i)||ne(e,"ill-formed tag handle (first argument) of the TAG directive"),D.call(e.tagMap,i)&&ne(e,'there is a previously declared suffix for "'+i+'" tag handle'),K.test(r)||ne(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){ne(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function oe(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=t.repeat("\n",n-1))}function fe(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ne(e,"tab characters must not be used in indentation")),45===i)&&G(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,se(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,ge(e,t,3,!1,!0),a.push(e.result),se(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)ne(e,"bad indentation of a sequence entry");else if(e.lineIndentn?g=1:e.lineIndent===n?g=0:e.lineIndentn?g=1:e.lineIndent===n?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),ge(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(le(e,f,d,h,g,m,a,l,c),h=g=m=null),se(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)ne(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?ne(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ne(e,"repeat of an indentation width identifier"):(p=n+o-1,u=!0)}if($(a)){do{a=e.input.charCodeAt(++e.position)}while($(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!P(a)&&0!==a)}for(;0!==a;){for(ce(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),P(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=Z(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:ne(e,"expected hexadecimal character");e.result+=z(o),e.position++}else ne(e,"unknown escape sequence");n=i=e.position}else P(l)?(oe(e,n,i,!0),pe(e,se(e,!1,t)),n=i=e.position):e.position===e.lineStart&&ue(e)?ne(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ne(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!G(i)&&!V(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ne(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),D.call(e.anchorMap,n)||ne(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],se(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result;if(G(u=e.input.charCodeAt(e.position))||V(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(G(i=e.input.charCodeAt(e.position+1))||n&&V(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(G(i=e.input.charCodeAt(e.position+1))||n&&V(i))break}else if(35===u){if(G(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&ue(e)||n&&V(u))break;if(P(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,se(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s;break}}a&&(oe(e,r,o,!1),pe(e,e.line-l),r=o=e.position,a=!1),$(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return oe(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||ne(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&fe(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ne(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s"),null!==e.result&&f.kind!==e.kind&&ne(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ne(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function me(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(se(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!G(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&ne(e,"directive name must not be less than one character in length");0!==r;){for(;$(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!P(r));break}if(P(r))break;for(t=e.position;0!==r&&!G(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&ce(e),D.call(re,n)?re[n](e,n,i):ie(e,'unknown document directive "'+n+'"')}se(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,se(e,!0,-1)):a&&ne(e,"directives end mark is expected"),ge(e,e.lineIndent-1,4,!1,!0),se(e,!0,-1),e.checkLineBreaks&&Y.test(e.input.slice(o,e.position))&&ie(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ue(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,se(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Ee(e){return/^\n* /.test(e)}function _e(e,t,n,i,r,o,a,l){var c,s,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=Ne(s=Le(e,0))&&s!==we&&!Te(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!Te(e)&&58!==e}(Le(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!Ne(u=Le(e,c)))return 5;m=m&&Me(u,p,l),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Le(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!Ne(u))return 5;m=m&&Me(u,p,l),p=u}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Ee(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function qe(e,t,n,i,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==xe.indexOf(t)||Ce.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=i||e.flowLevel>-1&&n>=e.flowLevel;switch(_e(t,c,e.indent,l,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+De(t,e.indent)+Ue(je(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,Ye(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],s=i[2];n=" "===s[0],o+=c+(a||n||""===s?"":"\n")+Ye(s,t),a=n}return o}(t,l),a));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=Le(e,r),!(t=ke[i])&&Ne(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Ie(i);return n}(t)+'"';default:throw new r("impossible error: invalid scalar style")}}()}function De(e,t){var n=Ee(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function Ue(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Ye(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function Re(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=c.represent[s](t,s)}e.dump=i}return!0}return!1}function Ke(e,t,n,i,o,a,l){e.tag=null,e.dump=n,Be(e,n,!1)||Be(e,n,!0);var c,s=ve.call(e.dump),u=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===s||"[object Array]"===s;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(o=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var o,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new r("sortKeys must be a boolean or a function");for(o=0,a=d.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=Se(e,t)),Ke(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,o),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ke(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?Re(e,t-1,e.dump,o):Re(e,t,e.dump,o),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=c+" "+e.dump)}return!0}function We(e,t){var n,i,r=[],o=[];for(Pe(e,r,o),n=0,i=o.length;ne.replace(/^_*(.)|_+(.)/g,((e,t,a)=>t?t.toUpperCase():" "+a.toUpperCase())),r=[],c=e=>n` - - - ${e.title||e.path} - ${e.path} - -`,u=(e,t,a)=>{var i,o,n;return{path:`/${e}/${null!==(i=t.path)&&void 0!==i?i:a}`,icon:null!==(o=t.icon)&&void 0!==o?o:"mdi:view-compact",title:null!==(n=t.title)&&void 0!==n?n:t.path?h(t.path):`${a}`}},v=(e,t)=>{var a;return{path:`/${t.url_path}`,icon:null!==(a=t.icon)&&void 0!==a?a:"mdi:view-dashboard",title:t.url_path===e.defaultPanel?e.localize("panel.states"):e.localize(`panel.${t.title}`)||t.title||(t.url_path?h(t.url_path):"")}};e([d("ha-navigation-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[a()],key:"hass",value:void 0},{kind:"field",decorators:[a()],key:"label",value:void 0},{kind:"field",decorators:[a()],key:"value",value:void 0},{kind:"field",decorators:[a()],key:"helper",value:void 0},{kind:"field",decorators:[a({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[a({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[i()],key:"_opened",value:()=>!1},{kind:"field",key:"navigationItemsLoaded",value:()=>!1},{kind:"field",key:"navigationItems",value:()=>r},{kind:"field",decorators:[o("ha-combo-box",!0)],key:"comboBox",value:void 0},{kind:"method",key:"render",value:function(){return n` - - - `}},{kind:"method",key:"_openedChanged",value:async function(e){this._opened=e.detail.value,this._opened&&!this.navigationItemsLoaded&&this._loadNavigationItems()}},{kind:"method",key:"_loadNavigationItems",value:async function(){this.navigationItemsLoaded=!0;const e=Object.entries(this.hass.panels).map((([e,t])=>({id:e,...t}))),t=e.filter((e=>"lovelace"===e.component_name)),a=await Promise.all(t.map((e=>{return(t=this.hass.connection,a="lovelace"===e.url_path?null:e.url_path,i=!0,t.sendMessagePromise({type:"lovelace/config",url_path:a,force:i})).then((t=>[e.id,t])).catch((t=>[e.id,void 0]));var t,a,i}))),i=new Map(a);this.navigationItems=[];for(const t of e){this.navigationItems.push(v(this.hass,t));const e=i.get(t.id);e&&e.views.forEach(((e,a)=>this.navigationItems.push(u(t.url_path,e,a))))}this.comboBox.filteredItems=this.navigationItems}},{kind:"method",key:"shouldUpdate",value:function(e){return!this._opened||e.has("_opened")}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation(),this._setValue(e.detail.value)}},{kind:"method",key:"_setValue",value:function(e){this.value=e,l(this,"value-changed",{value:this._value},{bubbles:!1,composed:!1})}},{kind:"method",key:"_filterChanged",value:function(e){const t=e.detail.value.toLowerCase();if(t.length>=2){const e=[];this.navigationItems.forEach((a=>{(a.path.toLowerCase().includes(t)||a.title.toLowerCase().includes(t))&&e.push(a)})),e.length>0?this.comboBox.filteredItems=e:this.comboBox.filteredItems=[]}else this.comboBox.filteredItems=this.navigationItems}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"get",static:!0,key:"styles",value:function(){return s` - ha-icon, - ha-svg-icon { - color: var(--primary-text-color); - position: relative; - bottom: 0px; - } - *[slot="prefix"] { - margin-right: 8px; - } - `}}]}}),t); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6829e397.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.6829e397.js.gz deleted file mode 100644 index 2e9ca38..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.6829e397.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6912e15e.js b/custom_components/hacs/hacs_frontend_experimental/c.6912e15e.js deleted file mode 100644 index 5e1f6cc..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.6912e15e.js +++ /dev/null @@ -1,50 +0,0 @@ -import{x as e,z as t,M as c,f as i,e as r,a5 as s,i as o,h as d,t as a,a6 as n,B as h,R as l,D as p,y as u,p as m,d as b,O as w,_ as k,E as v,G as f,n as _}from"./main-c66a9a06.js";import{o as y}from"./c.8e28b461.js";var g={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},C={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},x=function(c){function i(e){return c.call(this,t(t({},i.defaultAdapter),e))||this}return e(i,c),Object.defineProperty(i,"strings",{get:function(){return C},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cssClasses",{get:function(){return g},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!1,configurable:!0}),i.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked(e),this.updateCheckedStyling(e)},i.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(g.DISABLED):this.adapter.removeClass(g.DISABLED)},i.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked(t.checked),this.updateCheckedStyling(t.checked)},i.prototype.updateCheckedStyling=function(e){e?this.adapter.addClass(g.CHECKED):this.adapter.removeClass(g.CHECKED)},i.prototype.updateAriaChecked=function(e){this.adapter.setNativeControlAttr(C.ARIA_CHECKED_ATTR,""+!!e)},i}(c);class R extends h{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.shouldRenderRipple=!1,this.mdcFoundationClass=x,this.rippleHandlers=new l((()=>(this.shouldRenderRipple=!0,this.ripple)))}changeHandler(e){this.mdcFoundation.handleChange(e),this.checked=this.formElement.checked}createAdapter(){return Object.assign(Object.assign({},p(this.mdcRoot)),{setNativeControlChecked:e=>{this.formElement.checked=e},setNativeControlDisabled:e=>{this.formElement.disabled=e},setNativeControlAttr:(e,t)=>{this.formElement.setAttribute(e,t)}})}renderRipple(){return this.shouldRenderRipple?u` - - `:""}focus(){const e=this.formElement;e&&(this.rippleHandlers.startFocus(),e.focus())}blur(){const e=this.formElement;e&&(this.rippleHandlers.endFocus(),e.blur())}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}render(){return u` -
    -
    -
    - ${this.renderRipple()} -
    - -
    -
    -
    `}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}i([r({type:Boolean}),y((function(e){this.mdcFoundation.setChecked(e)}))],R.prototype,"checked",void 0),i([r({type:Boolean}),y((function(e){this.mdcFoundation.setDisabled(e)}))],R.prototype,"disabled",void 0),i([s,r({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0),i([s,r({attribute:"aria-labelledby"})],R.prototype,"ariaLabelledBy",void 0),i([o(".mdc-switch")],R.prototype,"mdcRoot",void 0),i([o("input")],R.prototype,"formElement",void 0),i([d("mwc-ripple")],R.prototype,"ripple",void 0),i([a()],R.prototype,"shouldRenderRipple",void 0),i([n({passive:!0})],R.prototype,"handleRippleMouseDown",null),i([n({passive:!0})],R.prototype,"handleRippleTouchStart",null);const E=b`.mdc-switch__thumb-underlay{left:-14px;right:initial;top:-17px;width:48px;height:48px}[dir=rtl] .mdc-switch__thumb-underlay,.mdc-switch__thumb-underlay[dir=rtl]{left:initial;right:-14px}.mdc-switch__native-control{width:64px;height:48px}.mdc-switch{display:inline-block;position:relative;outline:none;user-select:none}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:#000;background-color:var(--mdc-theme-on-surface, #000)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:#fff;background-color:var(--mdc-theme-surface, #fff);border-color:#fff;border-color:var(--mdc-theme-surface, #fff)}.mdc-switch__native-control{left:0;right:initial;position:absolute;top:0;margin:0;opacity:0;cursor:pointer;pointer-events:auto;transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-switch__native-control,.mdc-switch__native-control[dir=rtl]{left:initial;right:0}.mdc-switch__track{box-sizing:border-box;width:36px;height:14px;border:1px solid transparent;border-radius:7px;opacity:.38;transition:opacity 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb-underlay{display:flex;position:absolute;align-items:center;justify-content:center;transform:translateX(0);transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);box-sizing:border-box;width:20px;height:20px;border:10px solid;border-radius:50%;pointer-events:none;z-index:1}.mdc-switch--checked .mdc-switch__track{opacity:.54}.mdc-switch--checked .mdc-switch__thumb-underlay{transform:translateX(16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__thumb-underlay,.mdc-switch--checked .mdc-switch__thumb-underlay[dir=rtl]{transform:translateX(-16px)}.mdc-switch--checked .mdc-switch__native-control{transform:translateX(-16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__native-control,.mdc-switch--checked .mdc-switch__native-control[dir=rtl]{transform:translateX(16px)}.mdc-switch--disabled{opacity:.38;pointer-events:none}.mdc-switch--disabled .mdc-switch__thumb{border-width:1px}.mdc-switch--disabled .mdc-switch__native-control{cursor:default;pointer-events:none}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent}`;k([_("ha-switch")],(function(e,t){class c extends t{constructor(...t){super(...t),e(this)}}return{F:c,d:[{kind:"field",decorators:[r({type:Boolean})],key:"haptic",value:()=>!1},{kind:"method",key:"firstUpdated",value:function(){v(f(c.prototype),"firstUpdated",this).call(this),this.addEventListener("change",(()=>{this.haptic&&w(window,"haptic","light")}))}},{kind:"field",static:!0,key:"styles",value:()=>[E,b` - :host { - --mdc-theme-secondary: var(--switch-checked-color); - } - .mdc-switch.mdc-switch--checked .mdc-switch__thumb { - background-color: var(--switch-checked-button-color); - border-color: var(--switch-checked-button-color); - } - .mdc-switch.mdc-switch--checked .mdc-switch__track { - background-color: var(--switch-checked-track-color); - border-color: var(--switch-checked-track-color); - } - .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb { - background-color: var(--switch-unchecked-button-color); - border-color: var(--switch-unchecked-button-color); - } - .mdc-switch:not(.mdc-switch--checked) .mdc-switch__track { - background-color: var(--switch-unchecked-track-color); - border-color: var(--switch-unchecked-track-color); - } - `]}]}}),R); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6912e15e.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.6912e15e.js.gz deleted file mode 100644 index c796c0d..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.6912e15e.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6ada13f5.js b/custom_components/hacs/hacs_frontend_experimental/c.6ada13f5.js deleted file mode 100644 index 55344ee..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.6ada13f5.js +++ /dev/null @@ -1,63 +0,0 @@ -import{_ as r,j as a,e as o,d as e,y as d,n as t}from"./main-c66a9a06.js";r([t("ha-card")],(function(r,a){return{F:class extends a{constructor(...a){super(...a),r(this)}},d:[{kind:"field",decorators:[o()],key:"header",value:void 0},{kind:"field",decorators:[o({type:Boolean,reflect:!0})],key:"raised",value:()=>!1},{kind:"get",static:!0,key:"styles",value:function(){return e` - :host { - background: var( - --ha-card-background, - var(--card-background-color, white) - ); - box-shadow: var(--ha-card-box-shadow, none); - box-sizing: border-box; - border-radius: var(--ha-card-border-radius, 12px); - border-width: var(--ha-card-border-width, 1px); - border-style: solid; - border-color: var( - --ha-card-border-color, - var(--divider-color, #e0e0e0) - ); - color: var(--primary-text-color); - display: block; - transition: all 0.3s ease-out; - position: relative; - } - - :host([raised]) { - border: none; - box-shadow: var( - --ha-card-box-shadow, - 0px 2px 1px -1px rgba(0, 0, 0, 0.2), - 0px 1px 1px 0px rgba(0, 0, 0, 0.14), - 0px 1px 3px 0px rgba(0, 0, 0, 0.12) - ); - } - - .card-header, - :host ::slotted(.card-header) { - color: var(--ha-card-header-color, --primary-text-color); - font-family: var(--ha-card-header-font-family, inherit); - font-size: var(--ha-card-header-font-size, 24px); - letter-spacing: -0.012em; - line-height: 48px; - padding: 12px 16px 16px; - display: block; - margin-block-start: 0px; - margin-block-end: 0px; - font-weight: normal; - } - - :host ::slotted(.card-content:not(:first-child)), - slot:not(:first-child)::slotted(.card-content) { - padding-top: 0px; - margin-top: -8px; - } - - :host ::slotted(.card-content) { - padding: 16px; - } - - :host ::slotted(.card-actions) { - border-top: 1px solid var(--divider-color, #e8e8e8); - padding: 5px 16px; - } - `}},{kind:"method",key:"render",value:function(){return d` - ${this.header?d`

    ${this.header}

    `:d``} - - `}}]}}),a); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6ada13f5.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.6ada13f5.js.gz deleted file mode 100644 index 8c4c9d3..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.6ada13f5.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6b975dde.js b/custom_components/hacs/hacs_frontend_experimental/c.6b975dde.js deleted file mode 100644 index b3604c6..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.6b975dde.js +++ /dev/null @@ -1,11 +0,0 @@ -import{_ as e,j as i,e as a,y as d,n as t}from"./main-c66a9a06.js";import"./c.8250edc4.js";import"./c.e95db283.js";import"./c.2610e8cd.js";import"./c.bbadaeea.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.930daaba.js";let r=e([t("ha-selector-time")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[a({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[a({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[a()],key:"value",value:void 0},{kind:"field",decorators:[a()],key:"label",value:void 0},{kind:"field",decorators:[a()],key:"helper",value:void 0},{kind:"field",decorators:[a({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[a({type:Boolean})],key:"required",value:()=>!1},{kind:"method",key:"render",value:function(){return d` - - `}}]}}),i);export{r as HaTimeSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6b975dde.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.6b975dde.js.gz deleted file mode 100644 index 7218b17..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.6b975dde.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6d7c3206.js b/custom_components/hacs/hacs_frontend_experimental/c.6d7c3206.js deleted file mode 100644 index 06eddd6..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.6d7c3206.js +++ /dev/null @@ -1,100 +0,0 @@ -import{_ as e,j as i,e as t,y as a,bv as o,d as n,n as l,a7 as s,O as c}from"./main-c66a9a06.js";import{s as r}from"./c.a5550d10.js";import"./c.24287846.js";import"./c.7cf5fd2b.js";import"./c.6829e397.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.d2f13ac1.js";import"./c.1024e243.js";import"./c.05172f3d.js";import"./c.4f015773.js";import"./c.bbadaeea.js";import"./c.930daaba.js";import"./c.08837419.js";import"./c.89ace730.js";import"./c.5fe2e3ab.js";import"./c.c55c9f95.js";e([l("ha-help-tooltip")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"position",value:()=>"top"},{kind:"method",key:"render",value:function(){return a` - - ${this.label} - `}},{kind:"get",static:!0,key:"styles",value:function(){return n` - ha-svg-icon { - --mdc-icon-size: var(--ha-help-tooltip-size, 14px); - color: var(--ha-help-tooltip-color, var(--disabled-text-color)); - } - `}}]}}),i);const d=["more-info","toggle","navigate","url","call-service","none"];e([l("hui-action-editor")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t()],key:"config",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"actions",value:void 0},{kind:"field",decorators:[t()],key:"tooltipText",value:void 0},{kind:"field",decorators:[t()],key:"hass",value:void 0},{kind:"get",key:"_navigation_path",value:function(){const e=this.config;return(null==e?void 0:e.navigation_path)||""}},{kind:"get",key:"_url_path",value:function(){const e=this.config;return(null==e?void 0:e.url_path)||""}},{kind:"get",key:"_service",value:function(){const e=this.config;return(null==e?void 0:e.service)||""}},{kind:"field",key:"_serviceAction",value(){return s((e=>{var i;return{service:this._service,data:null!==(i=e.data)&&void 0!==i?i:e.service_data,target:e.target}}))}},{kind:"method",key:"render",value:function(){var e,i,t,o,n,l,s;if(!this.hass)return a``;const c=null!==(e=this.actions)&&void 0!==e?e:d;return a` - - ${"navigate"===(null===(o=this.config)||void 0===o?void 0:o.action)?a` - - `:""} - ${"url"===(null===(n=this.config)||void 0===n?void 0:n.action)?a` - - `:""} - ${"call-service"===(null===(l=this.config)||void 0===l?void 0:l.action)?a` - - `:""} - `}},{kind:"method",key:"_actionPicked",value:function(e){var i;if(e.stopPropagation(),!this.hass)return;const t=e.target.value;if((null===(i=this.config)||void 0===i?void 0:i.action)===t)return;if("default"===t)return void c(this,"value-changed",{value:void 0});let a;switch(t){case"url":a={url_path:this._url_path};break;case"call-service":a={service:this._service};break;case"navigate":a={navigation_path:this._navigation_path}}c(this,"value-changed",{value:{action:t,...a}})}},{kind:"method",key:"_valueChanged",value:function(e){if(e.stopPropagation(),!this.hass)return;const i=e.target,t=e.target.value;this[`_${i.configValue}`]!==t&&i.configValue&&c(this,"value-changed",{value:{...this.config,[i.configValue]:t}})}},{kind:"method",key:"_serviceValueChanged",value:function(e){e.stopPropagation();const i={...this.config,service:e.detail.value.service||"",data:e.detail.value.data||{},target:e.detail.value.target||{}};"service_data"in i&&delete i.service_data,c(this,"value-changed",{value:i})}},{kind:"method",key:"_navigateValueChanged",value:function(e){e.stopPropagation();const i={...this.config,navigation_path:e.detail.value};c(this,"value-changed",{value:i})}},{kind:"get",static:!0,key:"styles",value:function(){return n` - .dropdown { - position: relative; - } - ha-help-tooltip { - position: absolute; - right: 40px; - top: 16px; - inset-inline-start: initial; - inset-inline-end: 40px; - direction: var(--direction); - } - ha-select, - ha-textfield { - width: 100%; - } - ha-service-control, - ha-navigation-picker { - display: block; - } - ha-textfield, - ha-service-control, - ha-navigation-picker { - margin-top: 8px; - } - ha-service-control { - --service-control-padding: 0; - } - `}}]}}),i);let v=e([l("ha-selector-ui-action")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t()],key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"selector",value:void 0},{kind:"field",decorators:[t()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"method",key:"render",value:function(){var e;return a` - - `}},{kind:"method",key:"_valueChanged",value:function(e){c(this,"value-changed",{value:e.detail.value})}}]}}),i);export{v as HaSelectorUiAction}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.6d7c3206.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.6d7c3206.js.gz deleted file mode 100644 index 457e94a..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.6d7c3206.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.708f0e16.js b/custom_components/hacs/hacs_frontend_experimental/c.708f0e16.js deleted file mode 100644 index 003cec1..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.708f0e16.js +++ /dev/null @@ -1 +0,0 @@ -import{I as t,N as s}from"./main-c66a9a06.js";import{t as e}from"./c.a5550d10.js";import{c as i}from"./c.bbadaeea.js";class n{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class o{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){var t;null!==(t=this.Z)&&void 0!==t||(this.Z=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Z=this.q=void 0}}const r=t=>!e(t)&&"function"==typeof t.then;const c=t(class extends i{constructor(){super(...arguments),this._$Cwt=1073741823,this._$Cyt=[],this._$CK=new n(this),this._$CX=new o}render(...t){var e;return null!==(e=t.find((t=>!r(t))))&&void 0!==e?e:s}update(t,e){const i=this._$Cyt;let n=i.length;this._$Cyt=e;const o=this._$CK,c=this._$CX;this.isConnected||this.disconnected();for(let t=0;tthis._$Cwt);t++){const s=e[t];if(!r(s))return this._$Cwt=t,s;t{for(;c.get();)await c.get();const e=o.deref();if(void 0!==e){const i=e._$Cyt.indexOf(s);i>-1&&i!1},{kind:"field",decorators:[r({type:Boolean})],key:"parent",value:()=>!1},{kind:"field",decorators:[r()],key:"title",value:()=>""},{kind:"field",decorators:[r()],key:"url",value:void 0},{kind:"method",key:"render",value:function(){return n``}},{kind:"method",key:"_open",value:function(){var t;if(this.url.startsWith("/")&&!this.newtab)return void i(this.url,{replace:!0});const e=null===(t=this.url)||void 0===t?void 0:t.startsWith("http");let r="",n="_blank";e&&(r="noreferrer=true"),e||this.newtab||(n="_blank"),e||this.parent||(n="_parent"),a.open(this.url,n,r)}},{kind:"get",static:!0,key:"styles",value:function(){return o` - span { - cursor: pointer; - color: var(--hcv-text-color-link); - text-decoration: var(--hcv-text-decoration-link); - } - `}}]}}),e); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.73c7fa75.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.73c7fa75.js.gz deleted file mode 100644 index d88d023..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.73c7fa75.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.7a5e61ba.js b/custom_components/hacs/hacs_frontend_experimental/c.7a5e61ba.js deleted file mode 100644 index 141607c..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.7a5e61ba.js +++ /dev/null @@ -1,1242 +0,0 @@ -import{an as e,S as t,ao as i,ap as a,aq as o,P as s,Q as l,a7 as r,_ as n,j as c,e as d,i as h,y as u,ar as f,a4 as p,O as b,d as m,n as _,t as v,E as g,G as y,k,C as w,p as x,as as $,at as R,ae as z,a6 as C,au as T,h as S,R as D,av as H,ag as E,aw as F,ax as L,ay as M,az as P,aA as B,aB as j,aC as A,aD as O,af as N,aE as I,c as W}from"./main-c66a9a06.js";import{c as U,b as q}from"./c.41d13611.js";import{p as K}from"./c.3acef177.js";import{L as V}from"./c.cb071af8.js";import{d as G,s as Y}from"./c.a5550d10.js";import"./c.070412a6.js";import{b as X}from"./c.07e395f8.js";import{m as Q}from"./c.ba59af11.js";import{a as Z}from"./c.4b0dc107.js";import{r as J,a as ee}from"./c.271a0d49.js";import"./c.24287846.js";import{d as te}from"./c.10855172.js";import{i as ie}from"./c.21c042d4.js";import"./c.8e28b461.js";import"./c.743a15a1.js";import"./c.2610e8cd.js";import"./c.a0946910.js";import"./c.279495d9.js";import"./c.73c7fa75.js";import"./c.f2bb3724.js";var ae=new Set;const oe=[{properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(ae.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(t){this._notifyingDescendant?t.stopPropagation():e||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var i=t(e).rootTarget;i!==this&&(i.assignParentResizable(this),this._notifyDescendant(i),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function t(){document.removeEventListener("readystatechange",t),e()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(e){e!==this&&e._findParent()}),this):(ae.forEach((function(e){e!==this&&e._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?ae.delete(this):ae.add(this)}},{listeners:{"app-reset-layout":"_appResetLayoutHandler","iron-resize":"resetLayout"},attached:function(){this.fire("app-reset-layout")},_appResetLayoutHandler:function(e){t(e).path[0]!==this&&(this.resetLayout(),e.stopPropagation())},_updateLayoutStates:function(){console.error("unimplemented")},resetLayout:function(){var e=this._updateLayoutStates.bind(this);this._layoutDebouncer=i.debounce(this._layoutDebouncer,a,e),o(this._layoutDebouncer),this._notifyDescendantResize()},_notifyLayoutChanged:function(){var e=this;requestAnimationFrame((function(){e.fire("app-reset-layout")}))},_notifyDescendantResize:function(){this.isAttached&&this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this)}}],se={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(e,i){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),i)if("document"===e)this.scrollTarget=this._doc;else if("string"==typeof e){var a=this.domHost;this.scrollTarget=a&&a.$?a.$[e]:t(this.ownerDocument).querySelector("#"+e)}else this._isValidScrollTarget()&&(this._oldScrollTarget=e,this._toggleScrollListener(this._shouldHaveListener,e))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(e){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=e)},set _scrollLeft(e){this.scrollTarget===this._doc?window.scrollTo(e,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=e)},scroll:function(e,t){var i;"object"==typeof e?(i=e.left,t=e.top):i=e,i=i||0,t=t||0,this.scrollTarget===this._doc?window.scrollTo(i,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=i,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(e,t){var i=t===this._doc?window:t;e?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),i.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(i.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(e){this._shouldHaveListener=e,this._toggleScrollListener(e,this.scrollTarget)}},le={},re=[se,{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}},disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(e){},isOnScreen:function(){return!1},isContentBelow:function(){return!1},_effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},attached:function(){this._scrollStateChanged()},detached:function(){this._tearDownEffects()},createEffect:function(e,t){var i=le[e];if(!i)throw new ReferenceError(this._getUndefinedMsg(e));var a=this._boundEffect(i,t||{});return a.setUp(),a},_effectsChanged:function(e,t,i){this._tearDownEffects(),e&&i&&(e.split(" ").forEach((function(e){var i;""!==e&&((i=le[e])?this._effects.push(this._boundEffect(i,t[e])):console.warn(this._getUndefinedMsg(e)))}),this),this._setUpEffect())},_layoutIfDirty:function(){return this.offsetWidth},_boundEffect:function(e,t){t=t||{};var i=parseFloat(t.startsAt||0),a=parseFloat(t.endsAt||1),o=a-i,s=function(){},l=0===i&&1===a?e.run:function(t,a){e.run.call(this,Math.max(0,(t-i)/o),a)};return{setUp:e.setUp?e.setUp.bind(this,t):s,run:e.run?l.bind(this):s,tearDown:e.tearDown?e.tearDown.bind(this):s}},_setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach((function(e){!1!==e.setUp()&&this._effectsRunFn.push(e.run)}),this))},_tearDownEffects:function(){this._effects&&this._effects.forEach((function(e){e.tearDown()})),this._effectsRunFn=[],this._effects=[]},_runEffects:function(e,t){this._effectsRunFn&&this._effectsRunFn.forEach((function(i){i(e,t)}))},_scrollHandler:function(){this._scrollStateChanged()},_scrollStateChanged:function(){if(!this.disabled){var e=this._clampedScrollTop;this._updateScrollState(e),this.threshold>0&&this._setThresholdTriggered(e>=this.threshold)}},_getDOMRef:function(e){console.warn("_getDOMRef","`"+e+"` is undefined")},_getUndefinedMsg:function(e){return"Scroll effect `"+e+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+e+".html ?"}}];s({_template:l` - -
    - -
    -`,is:"app-header",behaviors:[re,oe],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["_configChanged(isAttached, condenses, fixed)"],_height:0,_dHeight:0,_stickyElTop:0,_stickyElRef:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+5},get _stickyEl(){if(this._stickyElRef)return this._stickyElRef;for(var e,i=t(this.$.slot).getDistributedNodes(),a=0;e=i[a];a++)if(e.nodeType===Node.ELEMENT_NODE){if(e.hasAttribute("sticky")){this._stickyElRef=e;break}this._stickyElRef||(this._stickyElRef=e)}return this._stickyElRef},_configChanged:function(){this.resetLayout(),this._notifyLayoutChanged()},_updateLayoutStates:function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var e=this._clampedScrollTop,t=0===this._height||0===e,i=this.disabled;this._height=this.offsetHeight,this._stickyElRef=null,this.disabled=!0,t||this._updateScrollState(0,!0),this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0,this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0,this._setUpEffect(),t?this._updateScrollState(e,!0):(this._updateScrollState(this._lastScrollTop,!0),this._layoutIfDirty()),this.disabled=i}},_updateScrollState:function(e,t){if(0!==this._height){var i=0,a=0,o=this._top;this._lastScrollTop;var s=this._maxHeaderTop,l=e-this._lastScrollTop,r=Math.abs(l),n=e>this._lastScrollTop,c=performance.now();if(this._mayMove()&&(a=this._clamp(this.reveals?o+l:e,0,s)),e>=this._dHeight&&(a=this.condenses&&!this.fixed?Math.max(this._dHeight,a):a,this.style.transitionDuration="0ms"),this.reveals&&!this.disabled&&r<100&&((c-this._initTimestamp>300||this._wasScrollingDown!==n)&&(this._initScrollTop=e,this._initTimestamp=c),e>=s))if(Math.abs(this._initScrollTop-e)>30||r>10){n&&e>=s?a=s:!n&&e>=this._dHeight&&(a=this.condenses&&!this.fixed?this._dHeight:0);var d=l/(c-this._lastTimestamp);this.style.transitionDuration=this._clamp((a-o)/d,0,300)+"ms"}else a=this._top;i=0===this._dHeight?e>0?1:0:a/this._dHeight,t||(this._lastScrollTop=e,this._top=a,this._wasScrollingDown=n,this._lastTimestamp=c),(t||i!==this._progress||o!==a||0===e)&&(this._progress=i,this._runEffects(i,a),this._transformHeader(a))}},_mayMove:function(){return this.condenses||!this.fixed},willCondense:function(){return this._dHeight>0&&this.condenses},isOnScreen:function(){return 0!==this._height&&this._top0:this._clampedScrollTop-this._maxHeaderTop>=0},_transformHeader:function(e){this.translate3d(0,-e+"px",0),this._stickyEl&&this.translate3d(0,this.condenses&&e>=this._stickyElTop?Math.min(e,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)},_clamp:function(e,t,i){return Math.min(i,Math.max(t,e))},_ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),t(this.root).insertBefore(this._bgContainer,this.$.contentContainer))},_getDOMRef:function(e){switch(e){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return t(this).querySelector("[main-title]");case"condensedTitle":return t(this).querySelector("[condensed-title]")}return null},getScrollState:function(){return{progress:this._progress,top:this._top}}});const ne={second:45,minute:45,hour:22,day:5,week:4,month:11};K&&await K;const ce=r((e=>new Intl.RelativeTimeFormat(e.language,{numeric:"auto"}))),de=(e,t,i,a=!0)=>{const o=function(e,t=Date.now(),i={}){const a={...ne,...i||{}},o=(+e-+t)/1e3;if(Math.abs(o)!1},{kind:"field",decorators:[d({type:Boolean})],key:"autofocus",value:()=>!1},{kind:"field",decorators:[d({type:String})],key:"label",value:void 0},{kind:"method",key:"focus",value:function(){var e;null===(e=this._input)||void 0===e||e.focus()}},{kind:"field",decorators:[h("ha-textfield",!0)],key:"_input",value:void 0},{kind:"method",key:"render",value:function(){return u` - - - - -
    - ${this.filter&&u` - - `} - -
    -
    - `}},{kind:"method",key:"_filterChanged",value:async function(e){b(this,"value-changed",{value:String(e)})}},{kind:"method",key:"_filterInputChanged",value:async function(e){this._filterChanged(e.target.value)}},{kind:"method",key:"_clearSearch",value:async function(){this._filterChanged("")}},{kind:"get",static:!0,key:"styles",value:function(){return m` - :host { - display: inline-flex; - } - ha-svg-icon, - ha-icon-button { - color: var(--primary-text-color); - } - ha-svg-icon { - outline: none; - } - .clear-button { - --mdc-icon-size: 20px; - } - ha-textfield { - display: inherit; - } - .trailing { - display: flex; - align-items: center; - } - `}}]}}),c);const he=Symbol("Comlink.proxy"),ue=Symbol("Comlink.endpoint"),fe=Symbol("Comlink.releaseProxy"),pe=Symbol("Comlink.thrown"),be=e=>"object"==typeof e&&null!==e||"function"==typeof e,me=new Map([["proxy",{canHandle:e=>be(e)&&e[he],serialize(e){const{port1:t,port2:i}=new MessageChannel;return _e(e,t),[i,[i]]},deserialize:e=>(e.start(),ge(e))}],["throw",{canHandle:e=>be(e)&&pe in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function _e(e,t=self){t.addEventListener("message",(function i(a){if(!a||!a.data)return;const{id:o,type:s,path:l}=Object.assign({path:[]},a.data),r=(a.data.argumentList||[]).map(Re);let n;try{const t=l.slice(0,-1).reduce(((e,t)=>e[t]),e),i=l.reduce(((e,t)=>e[t]),e);switch(s){case"GET":n=i;break;case"SET":t[l.slice(-1)[0]]=Re(a.data.value),n=!0;break;case"APPLY":n=i.apply(t,r);break;case"CONSTRUCT":n=function(e){return Object.assign(e,{[he]:!0})}(new i(...r));break;case"ENDPOINT":{const{port1:t,port2:i}=new MessageChannel;_e(e,i),n=function(e,t){return xe.set(e,t),e}(t,[t])}break;case"RELEASE":n=void 0;break;default:return}}catch(e){n={value:e,[pe]:0}}Promise.resolve(n).catch((e=>({value:e,[pe]:0}))).then((e=>{const[a,l]=$e(e);t.postMessage(Object.assign(Object.assign({},a),{id:o}),l),"RELEASE"===s&&(t.removeEventListener("message",i),ve(t))}))})),t.start&&t.start()}function ve(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function ge(e,t){return ke(e,[],t)}function ye(e){if(e)throw new Error("Proxy has been released and is not useable")}function ke(e,t=[],i=function(){}){let a=!1;const o=new Proxy(i,{get(i,s){if(ye(a),s===fe)return()=>ze(e,{type:"RELEASE",path:t.map((e=>e.toString()))}).then((()=>{ve(e),a=!0}));if("then"===s){if(0===t.length)return{then:()=>o};const i=ze(e,{type:"GET",path:t.map((e=>e.toString()))}).then(Re);return i.then.bind(i)}return ke(e,[...t,s])},set(i,o,s){ye(a);const[l,r]=$e(s);return ze(e,{type:"SET",path:[...t,o].map((e=>e.toString())),value:l},r).then(Re)},apply(i,o,s){ye(a);const l=t[t.length-1];if(l===ue)return ze(e,{type:"ENDPOINT"}).then(Re);if("bind"===l)return ke(e,t.slice(0,-1));const[r,n]=we(s);return ze(e,{type:"APPLY",path:t.map((e=>e.toString())),argumentList:r},n).then(Re)},construct(i,o){ye(a);const[s,l]=we(o);return ze(e,{type:"CONSTRUCT",path:t.map((e=>e.toString())),argumentList:s},l).then(Re)}});return o}function we(e){const t=e.map($e);return[t.map((e=>e[0])),(i=t.map((e=>e[1])),Array.prototype.concat.apply([],i))];var i}const xe=new WeakMap;function $e(e){for(const[t,i]of me)if(i.canHandle(e)){const[a,o]=i.serialize(e);return[{type:"HANDLER",name:t,value:a},o]}return[{type:"RAW",value:e},xe.get(e)||[]]}function Re(e){switch(e.type){case"HANDLER":return me.get(e.name).deserialize(e.value);case"RAW":return e.value}}function ze(e,t,i){return new Promise((a=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");e.addEventListener("message",(function t(i){i.data&&i.data.id&&i.data.id===o&&(e.removeEventListener("message",t),a(i.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:o},t),i)}))}let Ce;let Te=n([_("ha-data-table")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[d({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[d({type:Object})],key:"columns",value:()=>({})},{kind:"field",decorators:[d({type:Array})],key:"data",value:()=>[]},{kind:"field",decorators:[d({type:Boolean})],key:"selectable",value:()=>!1},{kind:"field",decorators:[d({type:Boolean})],key:"clickable",value:()=>!1},{kind:"field",decorators:[d({type:Boolean})],key:"hasFab",value:()=>!1},{kind:"field",decorators:[d({attribute:!1})],key:"appendRow",value:void 0},{kind:"field",decorators:[d({type:Boolean,attribute:"auto-height"})],key:"autoHeight",value:()=>!1},{kind:"field",decorators:[d({type:String})],key:"id",value:()=>"id"},{kind:"field",decorators:[d({type:String})],key:"noDataText",value:void 0},{kind:"field",decorators:[d({type:String})],key:"searchLabel",value:void 0},{kind:"field",decorators:[d({type:Boolean,attribute:"no-label-float"})],key:"noLabelFloat",value:()=>!1},{kind:"field",decorators:[d({type:String})],key:"filter",value:()=>""},{kind:"field",decorators:[v()],key:"_filterable",value:()=>!1},{kind:"field",decorators:[v()],key:"_filter",value:()=>""},{kind:"field",decorators:[v()],key:"_sortColumn",value:void 0},{kind:"field",decorators:[v()],key:"_sortDirection",value:()=>null},{kind:"field",decorators:[v()],key:"_filteredData",value:()=>[]},{kind:"field",decorators:[v()],key:"_headerHeight",value:()=>0},{kind:"field",decorators:[h("slot[name='header']")],key:"_header",value:void 0},{kind:"field",decorators:[v()],key:"_items",value:()=>[]},{kind:"field",key:"_checkableRowsCount",value:void 0},{kind:"field",key:"_checkedRows",value:()=>[]},{kind:"field",key:"_sortColumns",value:()=>({})},{kind:"field",key:"curRequest",value:()=>0},{kind:"field",decorators:[J(".scroller")],key:"_savedScrollPos",value:void 0},{kind:"field",key:"_debounceSearch",value(){return G((e=>{this._filter=e}),100,!1)}},{kind:"method",key:"clearSelection",value:function(){this._checkedRows=[],this._checkedRowsChanged()}},{kind:"method",key:"connectedCallback",value:function(){g(y(i.prototype),"connectedCallback",this).call(this),this._items.length&&(this._items=[...this._items])}},{kind:"method",key:"firstUpdated",value:function(){this.updateComplete.then((()=>this._calcTableHeight()))}},{kind:"method",key:"willUpdate",value:function(e){if(g(y(i.prototype),"willUpdate",this).call(this,e),e.has("columns")){this._filterable=Object.values(this.columns).some((e=>e.filterable));for(const e in this.columns)if(this.columns[e].direction){this._sortDirection=this.columns[e].direction,this._sortColumn=e;break}const e=te(this.columns);Object.values(e).forEach((e=>{delete e.title,delete e.type,delete e.template})),this._sortColumns=e}e.has("filter")&&this._debounceSearch(this.filter),e.has("data")&&(this._checkableRowsCount=this.data.filter((e=>!1!==e.selectable)).length),(e.has("data")||e.has("columns")||e.has("_filter")||e.has("_sortColumn")||e.has("_sortDirection"))&&this._sortFilterData()}},{kind:"method",key:"render",value:function(){return u` -
    - - ${this._filterable?u` -
    - -
    - `:""} -
    -
    -
    - ${this.selectable?u` -
    - - -
    - `:""} - ${Object.entries(this.columns).map((([e,t])=>{if(t.hidden)return"";const i=e===this._sortColumn,a={"mdc-data-table__header-cell--numeric":"numeric"===t.type,"mdc-data-table__header-cell--icon":"icon"===t.type,"mdc-data-table__header-cell--icon-button":"icon-button"===t.type,"mdc-data-table__header-cell--overflow-menu":"overflow-menu"===t.type,sortable:Boolean(t.sortable),"not-sorted":Boolean(t.sortable&&!i),grows:Boolean(t.grows)};return u` -
    - ${t.sortable?u` - - `:""} - ${t.title} -
    - `}))} -
    - ${this._filteredData.length?u` - - `:u` -
    -
    -
    - ${this.noDataText||"No data"} -
    -
    -
    - `} -
    -
    - `}},{kind:"field",key:"_renderRow",value(){return(e,t)=>e?e.append?u`
    ${e.content}
    `:e.empty?u`
    `:u` -
    - ${this.selectable?u` -
    - - -
    - `:""} - ${Object.entries(this.columns).map((([t,i])=>i.hidden?"":u` -
    - ${i.template?i.template(e[t],e):e[t]} -
    - `))} -
    - `:u``}},{kind:"method",key:"_sortFilterData",value:async function(){const e=(new Date).getTime();this.curRequest++;const t=this.curRequest;let i=this.data;this._filter&&(i=await this._memFilterData(this.data,this._sortColumns,this._filter));const a=this._sortColumn?(async(e,t,i,a)=>(Ce||(Ce=ge(new Worker(new URL("./sort_filter_worker",import.meta.url)))),Ce.sortData(e,t,i,a)))(i,this._sortColumns[this._sortColumn],this._sortDirection,this._sortColumn):i,[o]=await Promise.all([a,z]),s=(new Date).getTime()-e;if(s<100&&await new Promise((e=>setTimeout(e,100-s))),this.curRequest===t){if(this.appendRow||this.hasFab){const e=[...o];this.appendRow&&e.push({append:!0,content:this.appendRow}),this.hasFab&&e.push({empty:!0}),this._items=e}else this._items=o;this._filteredData=o}}},{kind:"field",key:"_memFilterData",value:()=>r((async(e,t,i)=>(async(e,t,i)=>(Ce||(Ce=ge(new Worker(new URL("./sort_filter_worker",import.meta.url)))),Ce.filterData(e,t,i)))(e,t,i)))},{kind:"method",key:"_handleHeaderClick",value:function(e){const t=e.currentTarget.columnId;this.columns[t].sortable&&(this._sortDirection&&this._sortColumn===t?"asc"===this._sortDirection?this._sortDirection="desc":this._sortDirection=null:this._sortDirection="asc",this._sortColumn=null===this._sortDirection?void 0:t,b(this,"sorting-changed",{column:t,direction:this._sortDirection}))}},{kind:"method",key:"_handleHeaderRowCheckboxClick",value:function(e){e.target.checked?(this._checkedRows=this._filteredData.filter((e=>!1!==e.selectable)).map((e=>e[this.id])),this._checkedRowsChanged()):(this._checkedRows=[],this._checkedRowsChanged())}},{kind:"field",key:"_handleRowCheckboxClick",value(){return e=>{const t=e.currentTarget,i=t.rowId;if(t.checked){if(this._checkedRows.includes(i))return;this._checkedRows=[...this._checkedRows,i]}else this._checkedRows=this._checkedRows.filter((e=>e!==i));this._checkedRowsChanged()}}},{kind:"field",key:"_handleRowClick",value(){return e=>{const t=e.target;if(["HA-CHECKBOX","MWC-BUTTON"].includes(t.tagName))return;const i=e.currentTarget.rowId;b(this,"row-click",{id:i},{bubbles:!1})}}},{kind:"method",key:"_checkedRowsChanged",value:function(){this._items.length&&(this._items=[...this._items]),b(this,"selection-changed",{value:this._checkedRows})}},{kind:"method",key:"_handleSearchChange",value:function(e){this.filter||this._debounceSearch(e.detail.value)}},{kind:"method",key:"_calcTableHeight",value:async function(){this.autoHeight||(await this.updateComplete,this._headerHeight=this._header.clientHeight)}},{kind:"method",decorators:[C({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"get",static:!0,key:"styles",value:function(){return[T,m` - /* default mdc styles, colors changed, without checkbox styles */ - :host { - height: 100%; - } - .mdc-data-table__content { - font-family: Roboto, sans-serif; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - font-size: 0.875rem; - line-height: 1.25rem; - font-weight: 400; - letter-spacing: 0.0178571429em; - text-decoration: inherit; - text-transform: inherit; - } - - .mdc-data-table { - background-color: var(--data-table-background-color); - border-radius: 4px; - border-width: 1px; - border-style: solid; - border-color: var(--divider-color); - display: inline-flex; - flex-direction: column; - box-sizing: border-box; - overflow: hidden; - } - - .mdc-data-table__row--selected { - background-color: rgba(var(--rgb-primary-color), 0.04); - } - - .mdc-data-table__row { - display: flex; - width: 100%; - height: 52px; - } - - .mdc-data-table__row ~ .mdc-data-table__row { - border-top: 1px solid var(--divider-color); - } - - .mdc-data-table__row.clickable:not(.mdc-data-table__row--selected):hover { - background-color: rgba(var(--rgb-primary-text-color), 0.04); - } - - .mdc-data-table__header-cell { - color: var(--primary-text-color); - } - - .mdc-data-table__cell { - color: var(--primary-text-color); - } - - .mdc-data-table__header-row { - height: 56px; - display: flex; - width: 100%; - border-bottom: 1px solid var(--divider-color); - overflow-x: auto; - } - - .mdc-data-table__header-row::-webkit-scrollbar { - display: none; - } - - .mdc-data-table__cell, - .mdc-data-table__header-cell { - padding-right: 16px; - padding-left: 16px; - align-self: center; - overflow: hidden; - text-overflow: ellipsis; - flex-shrink: 0; - box-sizing: border-box; - } - - .mdc-data-table__cell.mdc-data-table__cell--icon { - overflow: initial; - } - - .mdc-data-table__header-cell--checkbox, - .mdc-data-table__cell--checkbox { - /* @noflip */ - padding-left: 16px; - /* @noflip */ - padding-right: 0; - width: 60px; - } - :host([dir="rtl"]) .mdc-data-table__header-cell--checkbox, - :host([dir="rtl"]) .mdc-data-table__cell--checkbox { - /* @noflip */ - padding-left: 0; - /* @noflip */ - padding-right: 16px; - } - - .mdc-data-table__table { - height: 100%; - width: 100%; - border: 0; - white-space: nowrap; - } - - .mdc-data-table__cell { - font-family: Roboto, sans-serif; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - font-size: 0.875rem; - line-height: 1.25rem; - font-weight: 400; - letter-spacing: 0.0178571429em; - text-decoration: inherit; - text-transform: inherit; - } - - .mdc-data-table__cell a { - color: inherit; - text-decoration: none; - } - - .mdc-data-table__cell--numeric { - text-align: right; - } - :host([dir="rtl"]) .mdc-data-table__cell--numeric { - /* @noflip */ - text-align: left; - } - - .mdc-data-table__cell--icon { - color: var(--secondary-text-color); - text-align: center; - } - - .mdc-data-table__header-cell--icon, - .mdc-data-table__cell--icon { - width: 54px; - } - - .mdc-data-table__cell--icon img { - width: 24px; - height: 24px; - } - - .mdc-data-table__header-cell.mdc-data-table__header-cell--icon { - text-align: center; - } - - .mdc-data-table__header-cell.sortable.mdc-data-table__header-cell--icon:hover, - .mdc-data-table__header-cell.sortable.mdc-data-table__header-cell--icon:not(.not-sorted) { - text-align: left; - } - :host([dir="rtl"]) - .mdc-data-table__header-cell.sortable.mdc-data-table__header-cell--icon:hover, - :host([dir="rtl"]) - .mdc-data-table__header-cell.sortable.mdc-data-table__header-cell--icon:not(.not-sorted) { - text-align: right; - } - - .mdc-data-table__cell--icon:first-child ha-icon, - .mdc-data-table__cell--icon:first-child img, - .mdc-data-table__cell--icon:first-child ha-state-icon, - .mdc-data-table__cell--icon:first-child ha-svg-icon { - margin-left: 8px; - } - :host([dir="rtl"]) .mdc-data-table__cell--icon:first-child ha-icon, - :host([dir="rtl"]) - .mdc-data-table__cell--icon:first-child - ha-state-icon, - :host([dir="rtl"]) - .mdc-data-table__cell--icon:first-child - ha-svg-icon - :host([dir="rtl"]) - .mdc-data-table__cell--icon:first-child - img { - margin-left: auto; - margin-right: 8px; - } - - .mdc-data-table__cell--icon:first-child state-badge { - margin-right: -8px; - } - :host([dir="rtl"]) .mdc-data-table__cell--icon:first-child state-badge { - margin-right: auto; - margin-left: -8px; - } - - .mdc-data-table__cell--overflow-menu, - .mdc-data-table__header-cell--overflow-menu, - .mdc-data-table__header-cell--icon-button, - .mdc-data-table__cell--icon-button { - padding: 8px; - } - - .mdc-data-table__header-cell--icon-button, - .mdc-data-table__cell--icon-button { - width: 56px; - } - - .mdc-data-table__cell--overflow-menu, - .mdc-data-table__cell--icon-button { - color: var(--secondary-text-color); - text-overflow: clip; - } - - .mdc-data-table__header-cell--icon-button:first-child, - .mdc-data-table__cell--icon-button:first-child, - .mdc-data-table__header-cell--icon-button:last-child, - .mdc-data-table__cell--icon-button:last-child { - width: 64px; - } - - .mdc-data-table__cell--overflow-menu:first-child, - .mdc-data-table__header-cell--overflow-menu:first-child, - .mdc-data-table__header-cell--icon-button:first-child, - .mdc-data-table__cell--icon-button:first-child { - padding-left: 16px; - } - :host([dir="rtl"]) - .mdc-data-table__header-cell--overflow-menu:first-child, - :host([dir="rtl"]) .mdc-data-table__cell--overflow-menu:first-child, - :host([dir="rtl"]) - .mdc-data-table__header-cell--overflow-menu:first-child, - :host([dir="rtl"]) .mdc-data-table__cell--overflow-menu:first-child { - padding-left: 8px; - padding-right: 16px; - } - - .mdc-data-table__cell--overflow-menu:last-child, - .mdc-data-table__header-cell--overflow-menu:last-child, - .mdc-data-table__header-cell--icon-button:last-child, - .mdc-data-table__cell--icon-button:last-child { - padding-right: 16px; - } - :host([dir="rtl"]) - .mdc-data-table__header-cell--overflow-menu:last-child, - :host([dir="rtl"]) .mdc-data-table__cell--overflow-menu:last-child, - :host([dir="rtl"]) .mdc-data-table__header-cell--icon-button:last-child, - :host([dir="rtl"]) .mdc-data-table__cell--icon-button:last-child { - padding-right: 8px; - padding-left: 16px; - } - .mdc-data-table__cell--overflow-menu, - .mdc-data-table__header-cell--overflow-menu { - overflow: initial; - } - .mdc-data-table__cell--icon-button a { - color: var(--secondary-text-color); - } - - .mdc-data-table__header-cell { - font-family: Roboto, sans-serif; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - font-size: 0.875rem; - line-height: 1.375rem; - font-weight: 500; - letter-spacing: 0.0071428571em; - text-decoration: inherit; - text-transform: inherit; - text-align: left; - } - :host([dir="rtl"]) .mdc-data-table__header-cell { - /* @noflip */ - text-align: right; - } - - .mdc-data-table__header-cell--numeric { - text-align: right; - } - .mdc-data-table__header-cell--numeric.sortable:hover, - .mdc-data-table__header-cell--numeric.sortable:not(.not-sorted) { - text-align: left; - } - :host([dir="rtl"]) .mdc-data-table__header-cell--numeric { - /* @noflip */ - text-align: left; - } - :host([dir="rtl"]) .mdc-data-table__header-cell--numeric.sortable:hover, - :host([dir="rtl"]) - .mdc-data-table__header-cell--numeric.sortable:not(.not-sorted) { - text-align: right; - } - - /* custom from here */ - - :host { - display: block; - } - - .mdc-data-table { - display: block; - border-width: var(--data-table-border-width, 1px); - height: 100%; - } - .mdc-data-table__header-cell { - overflow: hidden; - position: relative; - } - .mdc-data-table__header-cell span { - position: relative; - left: 0px; - } - :host([dir="rtl"]) .mdc-data-table__header-cell span { - left: auto; - right: 0px; - } - - .mdc-data-table__header-cell.sortable { - cursor: pointer; - } - .mdc-data-table__header-cell > * { - transition: left 0.2s ease; - } - :host([dir="rtl"]) .mdc-data-table__header-cell > * { - transition: right 0.2s ease; - } - .mdc-data-table__header-cell ha-svg-icon { - top: -3px; - position: absolute; - } - .mdc-data-table__header-cell.not-sorted ha-svg-icon { - left: -20px; - } - :host([dir="rtl"]) .mdc-data-table__header-cell.not-sorted ha-svg-icon { - right: -20px; - } - .mdc-data-table__header-cell.sortable:not(.not-sorted) span, - .mdc-data-table__header-cell.sortable.not-sorted:hover span { - left: 24px; - } - :host([dir="rtl"]) - .mdc-data-table__header-cell.sortable:not(.not-sorted) - span, - :host([dir="rtl"]) - .mdc-data-table__header-cell.sortable.not-sorted:hover - span { - left: auto; - right: 24px; - } - .mdc-data-table__header-cell.sortable:not(.not-sorted) ha-svg-icon, - .mdc-data-table__header-cell.sortable:hover.not-sorted ha-svg-icon { - left: 12px; - } - :host([dir="rtl"]) - .mdc-data-table__header-cell.sortable:not(.not-sorted) - ha-svg-icon, - :host([dir="rtl"]) - .mdc-data-table__header-cell.sortable:hover.not-sorted - ha-svg-icon { - left: auto; - right: 12px; - } - .table-header { - border-bottom: 1px solid var(--divider-color); - } - search-input { - display: block; - flex: 1; - } - slot[name="header"] { - display: block; - } - .center { - text-align: center; - } - .secondary { - color: var(--secondary-text-color); - } - .scroller { - height: calc(100% - 57px); - overflow: overlay !important; - } - - .mdc-data-table__table.auto-height .scroller { - overflow-y: hidden !important; - } - .grows { - flex-grow: 1; - flex-shrink: 1; - } - .forceLTR { - direction: ltr; - } - .clickable { - cursor: pointer; - } - lit-virtualizer { - contain: size layout !important; - } - `]}}]}}),c);n([_("ha-tab")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[d({type:Boolean,reflect:!0})],key:"active",value:()=>!1},{kind:"field",decorators:[d({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[d()],key:"name",value:void 0},{kind:"field",decorators:[S("mwc-ripple")],key:"_ripple",value:void 0},{kind:"field",decorators:[v()],key:"_shouldRenderRipple",value:()=>!1},{kind:"method",key:"render",value:function(){return u` -
    - ${this.narrow?u``:""} - ${this.name} - ${this._shouldRenderRipple?u``:""} -
    - `}},{kind:"field",key:"_rippleHandlers",value(){return new D((()=>(this._shouldRenderRipple=!0,this._ripple)))}},{kind:"method",key:"_handleKeyDown",value:function(e){13===e.keyCode&&e.target.click()}},{kind:"method",decorators:[C({passive:!0})],key:"handleRippleActivate",value:function(e){this._rippleHandlers.startPress(e)}},{kind:"method",key:"handleRippleDeactivate",value:function(){this._rippleHandlers.endPress()}},{kind:"method",key:"handleRippleMouseEnter",value:function(){this._rippleHandlers.startHover()}},{kind:"method",key:"handleRippleMouseLeave",value:function(){this._rippleHandlers.endHover()}},{kind:"method",key:"handleRippleFocus",value:function(){this._rippleHandlers.startFocus()}},{kind:"method",key:"handleRippleBlur",value:function(){this._rippleHandlers.endFocus()}},{kind:"get",static:!0,key:"styles",value:function(){return m` - div { - padding: 0 32px; - display: flex; - flex-direction: column; - text-align: center; - box-sizing: border-box; - align-items: center; - justify-content: center; - width: 100%; - height: var(--header-height); - cursor: pointer; - position: relative; - outline: none; - } - - .name { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - max-width: 100%; - } - - :host([active]) { - color: var(--primary-color); - } - - :host(:not([narrow])[active]) div { - border-bottom: 2px solid var(--primary-color); - } - - :host([narrow]) { - min-width: 0; - display: flex; - justify-content: center; - overflow: hidden; - } - - :host([narrow]) div { - padding: 0 4px; - } - `}}]}}),c),n([_("hass-tabs-subpage")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[d({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[d({type:Boolean})],key:"supervisor",value:()=>!1},{kind:"field",decorators:[d({attribute:!1})],key:"localizeFunc",value:void 0},{kind:"field",decorators:[d({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[d()],key:"backCallback",value:void 0},{kind:"field",decorators:[d({type:Boolean,attribute:"main-page"})],key:"mainPage",value:()=>!1},{kind:"field",decorators:[d({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[d({attribute:!1})],key:"tabs",value:void 0},{kind:"field",decorators:[d({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[d({type:Boolean,reflect:!0,attribute:"is-wide"})],key:"isWide",value:()=>!1},{kind:"field",decorators:[d({type:Boolean,reflect:!0})],key:"rtl",value:()=>!1},{kind:"field",decorators:[v()],key:"_activeTab",value:void 0},{kind:"field",decorators:[J(".content")],key:"_savedScrollPos",value:void 0},{kind:"field",key:"_getTabs",value(){return r(((e,t,i,a,o,s,l)=>{const r=e.filter((e=>(!e.component||e.core||ie(this.hass,e.component))&&(!e.advancedOnly||i)));if(r.length<2){if(1===r.length){const e=r[0];return[e.translationKey?l(e.translationKey):e.name]}return[""]}return r.map((e=>u` - - - ${e.iconPath?u``:""} - - - `))}))}},{kind:"method",key:"willUpdate",value:function(e){if(e.has("route")&&(this._activeTab=this.tabs.find((e=>`${this.route.prefix}${this.route.path}`.includes(e.path)))),e.has("hass")){const t=e.get("hass");t&&t.language===this.hass.language||(this.rtl=U(this.hass))}g(y(i.prototype),"willUpdate",this).call(this,e)}},{kind:"method",key:"render",value:function(){var e,t;const i=this._getTabs(this.tabs,this._activeTab,null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced,this.hass.config.components,this.hass.language,this.narrow,this.localizeFunc||this.hass.localize),a=i.length>1;return u` -
    - ${this.mainPage||!this.backPath&&null!==(t=history.state)&&void 0!==t&&t.root?u` - - `:this.backPath?u` - - - - `:u` - - `} - ${this.narrow||!a?u`
    - ${a?"":i[0]} -
    `:""} - ${a?u` -
    - ${i} -
    - `:""} -
    - -
    -
    -
    - -
    -
    - -
    - `}},{kind:"method",decorators:[C({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return m` - :host { - display: block; - height: 100%; - background-color: var(--primary-background-color); - } - - :host([narrow]) { - width: 100%; - position: fixed; - } - - ha-menu-button { - margin-right: 24px; - } - - .toolbar { - display: flex; - align-items: center; - font-size: 20px; - height: var(--header-height); - background-color: var(--sidebar-background-color); - font-weight: 400; - border-bottom: 1px solid var(--divider-color); - padding: 0 16px; - box-sizing: border-box; - } - .toolbar a { - color: var(--sidebar-text-color); - text-decoration: none; - } - .bottom-bar a { - width: 25%; - } - - #tabbar { - display: flex; - font-size: 14px; - overflow: hidden; - } - - #tabbar > a { - overflow: hidden; - max-width: 45%; - } - - #tabbar.bottom-bar { - position: absolute; - bottom: 0; - left: 0; - padding: 0 16px; - box-sizing: border-box; - background-color: var(--sidebar-background-color); - border-top: 1px solid var(--divider-color); - justify-content: space-around; - z-index: 2; - font-size: 12px; - width: 100%; - padding-bottom: env(safe-area-inset-bottom); - } - - #tabbar:not(.bottom-bar) { - flex: 1; - justify-content: center; - } - - :host(:not([narrow])) #toolbar-icon { - min-width: 40px; - } - - ha-menu-button, - ha-icon-button-arrow-prev, - ::slotted([slot="toolbar-icon"]) { - display: flex; - flex-shrink: 0; - pointer-events: auto; - color: var(--sidebar-icon-color); - } - - .main-title { - flex: 1; - max-height: var(--header-height); - line-height: 20px; - color: var(--sidebar-text-color); - margin: var(--main-title-margin, 0 0 0 24px); - } - - .content { - position: relative; - width: calc( - 100% - env(safe-area-inset-left) - env(safe-area-inset-right) - ); - margin-left: env(safe-area-inset-left); - margin-right: env(safe-area-inset-right); - height: calc(100% - 1px - var(--header-height)); - height: calc( - 100% - 1px - var(--header-height) - env(safe-area-inset-bottom) - ); - overflow: auto; - -webkit-overflow-scrolling: touch; - } - - :host([narrow]) .content.tabs { - height: calc(100% - 2 * var(--header-height)); - height: calc( - 100% - 2 * var(--header-height) - env(safe-area-inset-bottom) - ); - } - - #fab { - position: fixed; - right: calc(16px + env(safe-area-inset-right)); - bottom: calc(16px + env(safe-area-inset-bottom)); - z-index: 1; - } - :host([narrow]) #fab.tabs { - bottom: calc(84px + env(safe-area-inset-bottom)); - } - #fab[is-wide] { - bottom: 24px; - right: 24px; - } - :host([rtl]) #fab { - right: auto; - left: calc(16px + env(safe-area-inset-left)); - } - :host([rtl][is-wide]) #fab { - bottom: 24px; - left: 24px; - right: auto; - } - `}}]}}),c);let Se=n([_("hass-tabs-subpage-data-table")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[d({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[d({attribute:!1})],key:"localizeFunc",value:void 0},{kind:"field",decorators:[d({type:Boolean})],key:"isWide",value:()=>!1},{kind:"field",decorators:[d({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[d({type:Boolean})],key:"supervisor",value:()=>!1},{kind:"field",decorators:[d({type:Boolean,attribute:"main-page"})],key:"mainPage",value:()=>!1},{kind:"field",decorators:[d({type:Object})],key:"columns",value:()=>({})},{kind:"field",decorators:[d({type:Array})],key:"data",value:()=>[]},{kind:"field",decorators:[d({type:Boolean})],key:"selectable",value:()=>!1},{kind:"field",decorators:[d({type:Boolean})],key:"clickable",value:()=>!1},{kind:"field",decorators:[d({type:Boolean})],key:"hasFab",value:()=>!1},{kind:"field",decorators:[d({attribute:!1})],key:"appendRow",value:void 0},{kind:"field",decorators:[d({type:String})],key:"id",value:()=>"id"},{kind:"field",decorators:[d({type:String})],key:"filter",value:()=>""},{kind:"field",decorators:[d()],key:"searchLabel",value:void 0},{kind:"field",decorators:[d({type:Array})],key:"activeFilters",value:void 0},{kind:"field",decorators:[d()],key:"hiddenLabel",value:void 0},{kind:"field",decorators:[d({type:Number})],key:"numHidden",value:()=>0},{kind:"field",decorators:[d({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[d()],key:"backCallback",value:void 0},{kind:"field",decorators:[d({type:String})],key:"noDataText",value:void 0},{kind:"field",decorators:[d()],key:"route",value:void 0},{kind:"field",decorators:[d()],key:"tabs",value:()=>[]},{kind:"field",decorators:[d({type:Boolean})],key:"hideFilterMenu",value:()=>!1},{kind:"field",decorators:[h("ha-data-table",!0)],key:"_dataTable",value:void 0},{kind:"method",key:"clearSelection",value:function(){this._dataTable.clearSelection()}},{kind:"method",key:"render",value:function(){const e=this.numHidden?this.hiddenLabel||this.hass.localize("ui.components.data-table.hidden","number",this.numHidden)||this.numHidden:void 0,t=this.activeFilters?u`${this.hass.localize("ui.components.data-table.filtering_by")} - ${this.activeFilters.join(", ")} - ${e?`(${e})`:""}`:e,i=u` - ${this.narrow?"":u`
    - ${t?u`
    - ${t} - - ${this.hass.localize("ui.components.data-table.clear")} - -
    `:""} - -
    `} -
    `;return u` - - ${this.hideFilterMenu?"":u` -
    - ${this.narrow?u` -
    - ${this.numHidden||this.activeFilters?u`${this.numHidden||"!"}`:""} - -
    - `:""} -
    - `} - ${this.narrow?u` -
    - -
    ${i}
    -
    -
    - `:""} - - ${this.narrow?u`
    `:u` -
    - -
    ${i}
    -
    -
    - `} -
    -
    -
    - `}},{kind:"method",key:"_preventDefault",value:function(e){e.preventDefault()}},{kind:"method",key:"_handleSearchChange",value:function(e){this.filter!==e.detail.value&&(this.filter=e.detail.value,b(this,"search-changed",{value:this.filter}))}},{kind:"method",key:"_clearFilter",value:function(){b(this,"clear-filter")}},{kind:"get",static:!0,key:"styles",value:function(){return m` - ha-data-table { - width: 100%; - height: 100%; - --data-table-border-width: 0; - } - :host(:not([narrow])) ha-data-table { - height: calc(100vh - 1px - var(--header-height)); - display: block; - } - :host([narrow]) hass-tabs-subpage { - --main-title-margin: 0; - } - .table-header { - display: flex; - align-items: center; - --mdc-shape-small: 0; - height: 56px; - } - .search-toolbar { - display: flex; - align-items: center; - color: var(--secondary-text-color); - } - search-input { - --mdc-text-field-fill-color: var(--sidebar-background-color); - --mdc-text-field-idle-line-color: var(--divider-color); - --text-field-overflow: visible; - z-index: 5; - } - .table-header search-input { - display: block; - position: absolute; - top: 0; - right: 0; - left: 0; - } - .search-toolbar search-input { - display: block; - width: 100%; - color: var(--secondary-text-color); - --mdc-ripple-color: transparant; - } - .filters { - --mdc-text-field-fill-color: var(--input-fill-color); - --mdc-text-field-idle-line-color: var(--input-idle-line-color); - --mdc-shape-small: 4px; - --text-field-overflow: initial; - display: flex; - justify-content: flex-end; - margin-right: 8px; - color: var(--primary-text-color); - } - .active-filters { - color: var(--primary-text-color); - position: relative; - display: flex; - align-items: center; - padding: 2px 2px 2px 8px; - margin-left: 4px; - font-size: 14px; - width: max-content; - cursor: initial; - } - .active-filters ha-svg-icon { - color: var(--primary-color); - } - .active-filters mwc-button { - margin-left: 8px; - } - .active-filters::before { - background-color: var(--primary-color); - opacity: 0.12; - border-radius: 4px; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - content: ""; - } - .badge { - min-width: 20px; - box-sizing: border-box; - border-radius: 50%; - font-weight: 400; - background-color: var(--primary-color); - line-height: 20px; - text-align: center; - padding: 0px 4px; - color: var(--text-primary-color); - position: absolute; - right: 0; - top: 4px; - font-size: 0.65em; - } - .filter-menu { - position: relative; - } - `}}]}}),c);const De=r(((e,t,i)=>(i=i.toUpperCase(),e.filter((e=>Object.entries(t).some((t=>{const[a,o]=t;return!(!o.filterable||!String(o.filterKey?e[o.valueColumn||a][o.filterKey]:e[o.valueColumn||a]).toUpperCase().includes(i))}))))))),He=r(((e,t,i,a)=>e.sort(((e,o)=>{let s=1;"desc"===i&&(s=-1);let l=t.filterKey?e[t.valueColumn||a][t.filterKey]:e[t.valueColumn||a],r=t.filterKey?o[t.valueColumn||a][t.filterKey]:o[t.valueColumn||a];return"string"==typeof l&&(l=l.toUpperCase()),"string"==typeof r&&(r=r.toUpperCase()),void 0===l&&void 0!==r?1:void 0===r&&void 0!==l?-1:lr?1*s:0}))));n([_("hacs-data-table")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"method",key:"_sortFilterData",value:async function(){const e=(new Date).getTime();this.curRequest++;const t=this.curRequest;let i=this.data;this._filter&&(i=await this._memFilterData(this.data,this._sortColumns,this._filter));const a=this._sortColumn?He(i,this._sortColumns[this._sortColumn],this._sortDirection,this._sortColumn):i,o=(new Date).getTime()-e;if(o<100&&await new Promise((e=>setTimeout(e,100-o))),this.curRequest===t){if(this.appendRow||this.hasFab){const e=[...a];this.appendRow&&e.push({append:!0,content:this.appendRow}),this.hasFab&&e.push({empty:!0}),this._items=e}else this._items=a;this._filteredData=a}}},{kind:"field",key:"_memFilterData",value:()=>r((async(e,t,i)=>De(e,t,i)))}]}}),Te),n([_("hacs-tabs-subpage-data-table")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"render",value:function(){const e=this.numHidden?this.hiddenLabel||this.hass.localize("ui.components.data-table.hidden","number",this.numHidden)||this.numHidden:void 0,t=this.activeFilters?u`${this.hass.localize("ui.components.data-table.filtering_by")} - ${this.activeFilters.join(", ")} ${e?`(${e})`:""}`:e,i=u` - ${this.narrow?"":u`
    - ${t?u`
    - ${t} - - ${this.hass.localize("ui.components.data-table.clear")} - -
    `:""} - -
    `} -
    `;return u` - - ${this.hideFilterMenu?"":u` -
    - ${this.narrow?u` -
    - ${this.numHidden||this.activeFilters?u`${this.numHidden||"!"}`:""} - -
    - `:""} -
    - `} - ${this.narrow?u` -
    - -
    ${i}
    -
    -
    - `:""} - - ${this.narrow?u`
    `:u` -
    - -
    ${i}
    -
    -
    - `} -
    -
    -
    - `}},{kind:"get",static:!0,key:"styles",value:function(){return[g(y(i),"styles",this),m` - hacs-data-table { - width: 100%; - height: 100%; - --data-table-border-width: 0; - } - :host(:not([narrow])) hacs-data-table { - height: calc(100vh - 1px - var(--header-height)); - display: block; - } - `]}}]}}),Se);const Ee={entry:{name:!0,downloads:!1,stars:!1,last_updated:!1,category:!0},explore:{name:!0,downloads:!1,stars:!1,last_updated:!1,category:!0}},Fe={title:"",hidden:!0,filterable:!0};let Le=n([_("hacs-experimental-panel")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[d({attribute:!1})],key:"hacs",value:void 0},{kind:"field",decorators:[d({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[d({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[d({type:Boolean,reflect:!0})],key:"narrow",value:void 0},{kind:"field",decorators:[d({type:Boolean})],key:"isWide",value:void 0},{kind:"field",decorators:[d({attribute:!1})],key:"section",value:void 0},{kind:"field",decorators:[V("hacs-table-filters",!0,!1)],key:"activeFilters",value:void 0},{kind:"field",decorators:[V("hacs-table-columns",!0,!1)],key:"_tableColumns",value:()=>Ee},{kind:"field",key:"render",value(){return()=>{var e;const t=this._filterRepositories(this.hacs.repositories,"entry"===this.section,this.activeFilters),i=t.filter((e=>e.new)),a=t.filter((e=>!e.new)),o="explore"===this.section&&0!==i.length;return u` - E.open("https://hacs.xyz/","_blank","noreferrer=true")},{path:F,label:"GitHub",action:()=>E.open("https://github.com/hacs","_blank","noreferrer=true")},{path:L,label:this.hacs.localize("menu.open_issue"),action:()=>E.open("https://hacs.xyz/docs/issues","_blank","noreferrer=true")},{path:M,disabled:Boolean(this.hacs.info.disabled_reason),label:this.hacs.localize("menu.custom_repositories"),action:()=>{this.dispatchEvent(new CustomEvent("hacs-dialog",{detail:{type:"custom-repositories",repositories:this.hacs.repositories},bubbles:!0,composed:!0}))}},o?{path:P,label:this.hacs.localize("menu.dismiss"),action:()=>{B(this.hass,this.hacs)}}:void 0,{path:j,label:this.hacs.localize("menu.about"),action:()=>{(async(e,t)=>{Z(e,{title:"Home Assistant Community Store",confirmText:t.localize("common.close"),text:Q.html(`\n **${t.localize("dialog_about.integration_version")}:** | ${t.info.version}\n --|--\n **${t.localize("dialog_about.frontend_version")}:** | 20221127144358\n **${t.localize("common.repositories")}:** | ${t.repositories.length}\n **${t.localize("dialog_about.downloaded_repositories")}:** | ${t.repositories.filter((e=>e.installed)).length}\n\n **${t.localize("dialog_about.useful_links")}:**\n\n - [General documentation](https://hacs.xyz/)\n - [Configuration](https://hacs.xyz/docs/configuration/start)\n - [FAQ](https://hacs.xyz/docs/faq/what)\n - [GitHub](https://github.com/hacs)\n - [Discord](https://discord.gg/apgchf8)\n - [Become a GitHub sponsor? ❤️](https://github.com/sponsors/ludeeus)\n - [BuyMe~~Coffee~~Beer? 🍺🙈](https://buymeacoffee.com/ludeeus)\n\n ***\n\n _Everything you find in HACS is **not** tested by Home Assistant, that includes HACS itself.\n The HACS and Home Assistant teams do not support **anything** you find here._`)})})(this,this.hacs)}}].filter((e=>void 0!==e))} - > - - ${this.narrow?" ":u` - - - - e.startsWith(`${this.hacs.localize("dialog_custom_repositories.category")}: `))))||""} - > - ${this.hacs.info.categories.map((e=>u` - - ${this.hacs.localize(`common.${e}`)} - - `))} - -
    - - ${Object.keys(Ee[this.section]).map((e=>u` - - ${this.hacs.localize(`column.${e}`)} - - `))} -
    `} - ${"entry"===this.section?u` - - - - `:""} -
    `}}},{kind:"field",key:"_filterRepositories",value(){return r(((e,t,i)=>e.filter((e=>!(i&&!i.includes(`${this.hacs.localize("dialog_custom_repositories.category")}: ${this.hacs.localize(`common.${e.category}`)}`))&&(!t&&!e.installed||t&&e.installed))).sort(((e,t)=>e.stars({icon:{title:"",label:this.hass.localize("ui.panel.config.lovelace.dashboards.picker.headers.icon"),hidden:this.narrow||"entry"!==this.section,type:"icon",template:(e,t)=>{var i;return u` - - `}},name:{...Fe,title:this.hacs.localize("column.name"),main:!0,sortable:!0,direction:"explore"===this.section||t?void 0:"asc",hidden:!i[this.section].name,grows:!0,template:(t,i)=>u` - ${i.new?u``:""}${t}
    -
    - ${e?this.hacs.localize(`common.${i.category}`):i.description} -
    - `},downloads:{...Fe,title:this.hacs.localize("column.downloads"),hidden:e||!i[this.section].downloads,sortable:!0,width:"10%",template:e=>u`${e||"-"}`},stars:{...Fe,title:this.hacs.localize("column.stars"),hidden:e||!i[this.section].stars,direction:"entry"===this.section||t?void 0:"desc",sortable:!0,width:"10%"},last_updated:{...Fe,title:this.hacs.localize("column.last_updated"),hidden:e||!i[this.section].last_updated,sortable:!0,width:"15%",template:e=>de(new Date(e),this.hass.locale)},category:{...Fe,title:this.hacs.localize("column.category"),hidden:e||!i[this.section].category,sortable:!0,width:"10%",template:e=>this.hacs.localize(`common.${e}`)},authors:Fe,description:Fe,domain:Fe,full_name:Fe,id:Fe,topics:Fe,actions:{title:"",width:this.narrow?void 0:"10%",hidden:"entry"!==this.section,type:"overflow-menu",template:(e,t)=>u` - - - `}})))}},{kind:"method",key:"_handleRowClicked",value:function(e){N(`/hacs/repository/${e.detail.id}`)}},{kind:"method",key:"_handleCategoryFilterChange",value:function(e){e.stopPropagation();const t=e.target.value;t&&(this.activeFilters=[t])}},{kind:"method",key:"_handleColumnChange",value:function(e){e.stopPropagation();const t={...this._tableColumns[this.section],[e.currentTarget.column]:e.detail.selected};this._tableColumns={...this._tableColumns,[this.section]:Object.keys(Ee[this.section]).reduce(((e,i)=>({...e,[i]:t[i]||Ee[this.section][i]})),{})}}},{kind:"method",key:"_handleClearFilter",value:function(){this.activeFilters=void 0}},{kind:"get",static:!0,key:"styles",value:function(){return[I,W,m` - .menu_header { - font-size: 14px; - margin: 8px; - } - .divider { - bottom: 112px; - padding: 10px 0px; - } - .divider::before { - content: " "; - display: block; - height: 1px; - background-color: var(--divider-color); - } - ha-select { - margin: 0 8px; - } - `]}}]}}),c);export{Le as HacsExperimentalPanel}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.7a5e61ba.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.7a5e61ba.js.gz deleted file mode 100644 index b03b813..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.7a5e61ba.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.7a7e2d53.js b/custom_components/hacs/hacs_frontend_experimental/c.7a7e2d53.js deleted file mode 100644 index f0c9702..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.7a7e2d53.js +++ /dev/null @@ -1,183 +0,0 @@ -import{I as t,L as e,Z as i,_ as s,j as o,e as n,t as a,y as r,eQ as l,O as d,d as h,n as c,a4 as m,m as p,aa as u}from"./main-c66a9a06.js";import{c as g}from"./c.bbadaeea.js";import{b as f}from"./c.41d13611.js";import{c as v}from"./c.279495d9.js";import{M as _}from"./c.163f08fb.js";import{i as y,u as b,r as k,b as w}from"./c.06557919.js";import{a as $,s as j}from"./c.4b0dc107.js";import"./c.b914d43e.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.930daaba.js";import"./c.04ecc0ad.js";import"./c.07e395f8.js";import"./c.cb071af8.js";import"./c.10b44dbb.js";import"./c.24287846.js";import"./c.708f0e16.js";import"./c.811f664e.js";import"./c.b0145069.js";import"./c.4f015773.js";import"./c.997c429c.js";import"./c.d2f13ac1.js";import"./c.6eb9fcd4.js";import"./c.1024e243.js";import"./c.874c8cfd.js";import"./c.d0c1a17e.js";import"./c.fa0ef026.js";import"./c.2610e8cd.js";import"./c.6ada13f5.js";import"./c.070412a6.js";import"./c.a0946910.js";import"./c.a6328fdc.js";const x=new WeakMap;let I=0;const A=new Map,C=new WeakSet,O=()=>new Promise((t=>requestAnimationFrame(t))),z=(t,e)=>{const i=t-e;return 0===i?void 0:i},S=(t,e)=>{const i=t/e;return 1===i?void 0:i},D={left:(t,e)=>{const i=z(t,e);return{value:i,transform:i&&`translateX(${i}px)`}},top:(t,e)=>{const i=z(t,e);return{value:i,transform:i&&`translateY(${i}px)`}},width:(t,e)=>{const i=S(t,e);return{value:i,transform:i&&`scaleX(${i})`}},height:(t,e)=>{const i=S(t,e);return{value:i,transform:i&&`scaleY(${i})`}}},F={duration:333,easing:"ease-in-out"},P=["left","top","width","height","opacity","color","background"],U=new WeakMap;const E=t(class extends g{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===e.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(t){return i}getController(){return x.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[e]){var i;const s=void 0===this.l;return s&&(this.l=null===(i=t.options)||void 0===i?void 0:i.host,this.l.addController(this),this.element=t.element,U.set(this.element,this)),this.optionsOrCallback=e,(s||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){var e,i;t=null!=t?t:{};const s=this.getController();void 0!==s&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(e=(i=t).properties)&&void 0!==e||(i.properties=P),this.options=t}v(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((s=>{var o;const n=null!==(o=e[s])&&void 0!==o?o:D[s]?void 0:i[s],a=Number(n);t[s]=isNaN(a)?n+"":a})),t}p(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,i)=>t===e[i])))return!1}else if(e===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await O;const e=this._(),i=this.A(this.options.keyframeOptions,e),s=this.v();if(void 0!==this.g){const{from:i,to:o}=this.O(this.g,s,e);this.log("measured",[this.g,s,i,o]),t=this.calculateKeyframes(i,o)}else{const i=A.get(this.options.inId);if(i){A.delete(this.options.inId);const{from:o,to:n}=this.O(i,s,e);t=this.calculateKeyframes(o,n),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,I++,t.forEach((t=>t.zIndex=I))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){var t;void 0!==this.P&&(this.element.setAttribute("style",null!==(t=this.P)&&void 0!==t?t:""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(e=this.webAnimation)||void 0===e||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&A.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await O(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const e=this.g.left-t.left,i=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===i||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==i&&(this.element.style.top=i+"px")}}const e=this.A(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null===(e=(t=this.options).onStart)||void 0===e||e.call(t,this)}didFinish(t){var e,i;t&&(null===(i=(e=this.options).onComplete)||void 0===i||i.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const i=U.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=C.has(this.l);return t||this.l.updateComplete.then((()=>{C.add(this.l)})),t}A(t,e=this._()){const i={...F};return e.forEach((t=>Object.assign(i,t.options.keyframeOptions))),Object.assign(i,t),i}O(t,e,i){t={...t},e={...e};const s=i.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let o=1,n=1;return void 0!==s&&(s.forEach((t=>{t.width&&(o/=t.width),t.height&&(n/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=o*t.left,e.left=o*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=n*t.top,e.top=n*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){var s;const o={},n={};let a=!1;const r={};for(const i in e){const l=t[i],d=e[i];if(i in D){const t=D[i];if(void 0===l||void 0===d)continue;const e=t(l,d);void 0!==e.transform&&(r[i]=e.value,a=!0,o.transform=`${null!==(s=o.transform)&&void 0!==s?s:""} ${e.transform}`)}else l!==d&&void 0!==l&&void 0!==d&&(a=!0,o[i]=l,n[i]=d)}return o.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=r,a?[o,n]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),i=!0,this.webAnimation=this.element.animate(t,e);const s=this.getController();null==s||s.add(this);try{await this.webAnimation.finished}catch(t){}null==s||s.remove(this)}return this.didFinish(i),i}isAnimating(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}});s([c("ha-media-upload-button")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[n({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[n()],key:"currentItem",value:void 0},{kind:"field",decorators:[a()],key:"_uploading",value:()=>0},{kind:"method",key:"render",value:function(){return this.currentItem&&y(this.currentItem.media_content_id||"")?r` - 0?this.hass.localize("ui.components.media-browser.file_management.uploading",{count:this._uploading}):this.hass.localize("ui.components.media-browser.file_management.add_media")} - .disabled=${this._uploading>0} - @click=${this._startUpload} - > - ${this._uploading>0?r` - - `:r` `} - - `:r``}},{kind:"method",key:"_startUpload",value:async function(){if(this._uploading>0)return;const t=document.createElement("input");t.type="file",t.accept="audio/*,video/*,image/*",t.multiple=!0,t.addEventListener("change",(async()=>{d(this,"uploading");const e=t.files;document.body.removeChild(t);const i=this.currentItem.media_content_id;for(let t=0;th` - mwc-button { - /* We use icon + text to show disabled state */ - --mdc-button-disabled-ink-color: --mdc-theme-primary; - } - - ha-svg-icon[slot="icon"], - ha-circular-progress[slot="icon"] { - vertical-align: middle; - } - - ha-svg-icon[slot="icon"] { - margin-inline-start: 0px; - margin-inline-end: 8px; - direction: var(--direction); - } - `}]}}),o),s([c("dialog-media-manage")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[n({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[a()],key:"_currentItem",value:void 0},{kind:"field",decorators:[a()],key:"_params",value:void 0},{kind:"field",decorators:[a()],key:"_uploading",value:()=>!1},{kind:"field",decorators:[a()],key:"_deleting",value:()=>!1},{kind:"field",decorators:[a()],key:"_selected",value:()=>new Set},{kind:"field",key:"_filesChanged",value:()=>!1},{kind:"method",key:"showDialog",value:function(t){this._params=t,this._refreshMedia()}},{kind:"method",key:"closeDialog",value:function(){this._filesChanged&&this._params.onClose&&this._params.onClose(),this._params=void 0,this._currentItem=void 0,this._uploading=!1,this._deleting=!1,this._filesChanged=!1,d(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){var t,e,i,s;if(!this._params)return r``;const o=(null===(t=this._currentItem)||void 0===t||null===(e=t.children)||void 0===e?void 0:e.filter((t=>!t.can_expand)))||[];let n=0;return r` - - - ${0===this._selected.size?r` - - ${this.hass.localize("ui.components.media-browser.file_management.title")} - - - - ${this._uploading?"":r` - - `} - `:r` - - - - - ${this._deleting?"":r` - - - - `} - `} - - ${this._currentItem?o.length?r` - - ${v(o,(t=>t.media_content_id),(t=>{const e=r` - - `;return r` - - ${e} ${t.title} - - `}))} - - `:r`
    -

    - ${this.hass.localize("ui.components.media-browser.file_management.no_items")} -

    - ${null!==(i=this._currentItem)&&void 0!==i&&null!==(s=i.children)&&void 0!==s&&s.length?r`${this.hass.localize("ui.components.media-browser.file_management.folders_not_supported")}`:""} -
    `:r` -
    - -
    - `} -
    - `}},{kind:"method",key:"_handleSelected",value:function(t){this._selected=t.detail.index}},{kind:"method",key:"_startUploading",value:function(){this._uploading=!0,this._filesChanged=!0}},{kind:"method",key:"_doneUploading",value:function(){this._uploading=!1,this._refreshMedia()}},{kind:"method",key:"_handleDeselectAll",value:function(){this._selected.size&&(this._selected=new Set)}},{kind:"method",key:"_handleDelete",value:async function(){if(!await j(this,{text:this.hass.localize("ui.components.media-browser.file_management.confirm_delete",{count:this._selected.size}),warning:!0}))return;this._filesChanged=!0,this._deleting=!0;const t=[];let e=0;this._currentItem.children.forEach((i=>{i.can_expand||this._selected.has(e++)&&t.push(i)}));try{await Promise.all(t.map((async t=>{await k(this.hass,t.media_content_id),this._currentItem={...this._currentItem,children:this._currentItem.children.filter((e=>e!==t))}})))}finally{this._deleting=!1,this._selected=new Set}}},{kind:"method",key:"_refreshMedia",value:async function(){this._selected=new Set,this._currentItem=void 0,this._currentItem=await w(this.hass,this._params.currentItem.media_content_id)}},{kind:"get",static:!0,key:"styles",value:function(){return[u,h` - ha-dialog { - --dialog-z-index: 8; - --dialog-content-padding: 0; - } - - @media (min-width: 800px) { - ha-dialog { - --mdc-dialog-max-width: 800px; - --dialog-surface-position: fixed; - --dialog-surface-top: 40px; - --mdc-dialog-max-height: calc(100vh - 72px); - } - } - - ha-header-bar { - --mdc-theme-on-primary: var(--primary-text-color); - --mdc-theme-primary: var(--mdc-theme-surface); - flex-shrink: 0; - border-bottom: 1px solid var(--divider-color, rgba(0, 0, 0, 0.12)); - } - - ha-media-upload-button, - mwc-button { - --mdc-theme-primary: var(--mdc-theme-on-primary); - } - - mwc-list { - direction: ltr; - } - - .danger { - --mdc-theme-primary: var(--error-color); - } - - ha-svg-icon[slot="icon"] { - vertical-align: middle; - } - - ha-svg-icon[slot="icon"] { - margin-inline-start: 0px !important; - margin-inline-end: 8px !important; - direction: var(--direction); - } - - .refresh { - display: flex; - height: 200px; - justify-content: center; - align-items: center; - } - - .no-items { - text-align: center; - padding: 16px; - } - .folders { - color: var(--secondary-text-color); - font-style: italic; - } - `]}}]}}),o); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.7a7e2d53.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.7a7e2d53.js.gz deleted file mode 100644 index cd6d8dc..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.7a7e2d53.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.7cf5fd2b.js b/custom_components/hacs/hacs_frontend_experimental/c.7cf5fd2b.js deleted file mode 100644 index 4591623..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.7cf5fd2b.js +++ /dev/null @@ -1,128 +0,0 @@ -import{_ as e,j as i,e as a,t,y as s,a7 as l,O as d,i as o,bv as n,d as r,n as v}from"./main-c66a9a06.js";import{c}from"./c.d2f13ac1.js";import{c as h}from"./c.1024e243.js";import{d as u,f as _}from"./c.05172f3d.js";import{d as f}from"./c.4f015773.js";import"./c.a5550d10.js";import"./c.bbadaeea.js";import"./c.08837419.js";import"./c.89ace730.js";const k=e=>s` - ${e.name} - ${e.name===e.service?"":e.service} -`;let p=e(null,(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[a({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[a({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[a()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"_filter",value:void 0},{kind:"method",key:"render",value:function(){return s` - - `}},{kind:"field",key:"_services",value:()=>l(((e,i)=>{if(!i)return[];const a=[];return Object.keys(i).sort().forEach((t=>{const s=Object.keys(i[t]).sort();for(const l of s)a.push({service:`${t}.${l}`,name:`${u(e,t)}: ${i[t][l].name||l}`})})),a}))},{kind:"field",key:"_filteredServices",value(){return l(((e,i,a)=>{if(!i)return[];const t=this._services(e,i);return a?t.filter((e=>{var i;return e.service.toLowerCase().includes(a)||(null===(i=e.name)||void 0===i?void 0:i.toLowerCase().includes(a))})):t}))}},{kind:"method",key:"_filterChanged",value:function(e){this._filter=e.detail.value.toLowerCase()}},{kind:"method",key:"_valueChanged",value:function(e){this.value=e.detail.value,d(this,"change"),d(this,"value-changed",{value:this.value})}}]}}),i);customElements.define("ha-service-picker",p);const y=e=>e.selector&&!e.required&&!("boolean"in e.selector&&e.default);e([v("ha-service-control")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[a({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[a({attribute:!1})],key:"value",value:void 0},{kind:"field",decorators:[a({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[a({reflect:!0,type:Boolean})],key:"narrow",value:void 0},{kind:"field",decorators:[a({type:Boolean})],key:"showAdvanced",value:void 0},{kind:"field",decorators:[t()],key:"_value",value:void 0},{kind:"field",decorators:[t()],key:"_checkedKeys",value:()=>new Set},{kind:"field",decorators:[t()],key:"_manifest",value:void 0},{kind:"field",decorators:[o("ha-yaml-editor")],key:"_yamlEditor",value:void 0},{kind:"method",key:"willUpdate",value:function(e){var i,a,t,s,l,o,n,r,v,h,u;if(!e.has("value"))return;const _=e.get("value");(null==_?void 0:_.service)!==(null===(i=this.value)||void 0===i?void 0:i.service)&&(this._checkedKeys=new Set);const f=this._getServiceInfo(null===(a=this.value)||void 0===a?void 0:a.service,this.hass.services);var k;null!==(t=this.value)&&void 0!==t&&t.service?null!=_&&_.service&&c(this.value.service)===c(_.service)||this._fetchManifest(c(null===(k=this.value)||void 0===k?void 0:k.service)):this._manifest=void 0;if(f&&"target"in f&&(null!==(s=this.value)&&void 0!==s&&null!==(l=s.data)&&void 0!==l&&l.entity_id||null!==(o=this.value)&&void 0!==o&&null!==(n=o.data)&&void 0!==n&&n.area_id||null!==(r=this.value)&&void 0!==r&&null!==(v=r.data)&&void 0!==v&&v.device_id)){var p,y,g;const e={...this.value.target};!this.value.data.entity_id||null!==(p=this.value.target)&&void 0!==p&&p.entity_id||(e.entity_id=this.value.data.entity_id),!this.value.data.area_id||null!==(y=this.value.target)&&void 0!==y&&y.area_id||(e.area_id=this.value.data.area_id),!this.value.data.device_id||null!==(g=this.value.target)&&void 0!==g&&g.device_id||(e.device_id=this.value.data.device_id),this._value={...this.value,target:e,data:{...this.value.data}},delete this._value.data.entity_id,delete this._value.data.device_id,delete this._value.data.area_id}else this._value=this.value;if((null==_?void 0:_.service)!==(null===(h=this.value)||void 0===h?void 0:h.service)){let e=!1;this._value&&f&&(this._value.data||(this._value.data={}),f.fields.forEach((i=>{i.selector&&i.required&&void 0===i.default&&"boolean"in i.selector&&void 0===this._value.data[i.key]&&(e=!0,this._value.data[i.key]=!1)}))),e&&d(this,"value-changed",{value:{...this._value}})}if(null!==(u=this._value)&&void 0!==u&&u.data){const e=this._yamlEditor;e&&e.value!==this._value.data&&e.setValue(this._value.data)}}},{kind:"field",key:"_getServiceInfo",value:()=>l(((e,i)=>{if(!e||!i)return;const a=c(e),t=h(e);if(!(a in i))return;if(!(t in i[a]))return;const s=Object.entries(i[a][t].fields).map((([e,i])=>({key:e,...i,selector:i.selector})));return{...i[a][t],fields:s,hasSelector:s.length?s.filter((e=>e.selector)).map((e=>e.key)):[]}}))},{kind:"method",key:"render",value:function(){var e,i,a,t,l,d,o;const r=this._getServiceInfo(null===(e=this._value)||void 0===e?void 0:e.service,this.hass.services),v=(null==r?void 0:r.fields.length)&&!r.hasSelector.length||r&&Object.keys((null===(i=this._value)||void 0===i?void 0:i.data)||{}).some((e=>!r.hasSelector.includes(e))),c=v&&(null==r?void 0:r.fields.find((e=>"entity_id"===e.key))),h=Boolean(!v&&(null==r?void 0:r.fields.some((e=>y(e)))));return s` -
    - ${null!=r&&r.description?s`

    ${null==r?void 0:r.description}

    `:""} - ${this._manifest?s` - - `:""} -
    - ${r&&"target"in r?s` - ${h?s`
    `:""} - ${this.hass.localize("ui.components.service-control.target")} - ${this.hass.localize("ui.components.service-control.target_description")}
    `:c?s``:""} - ${v?s``:null==r?void 0:r.fields.map((e=>{var i,a,t,l;const d=y(e);return e.selector&&(!e.advanced||this.showAdvanced||null!==(i=this._value)&&void 0!==i&&i.data&&void 0!==this._value.data[e.key])?s` - ${d?s``:h?s`
    `:""} - ${e.name||e.key} - ${null==e?void 0:e.description} - -
    `:""}))}`}},{kind:"method",key:"_checkboxChanged",value:function(e){const i=e.currentTarget.checked,a=e.currentTarget.key;let t;if(i){var s,l,o;this._checkedKeys.add(a);const e=null===(s=this._getServiceInfo(null===(o=this._value)||void 0===o?void 0:o.service,this.hass.services))||void 0===s||null===(l=s.fields.find((e=>e.key===a)))||void 0===l?void 0:l.default;var n;if(e)t={...null===(n=this._value)||void 0===n?void 0:n.data,[a]:e}}else{var r;this._checkedKeys.delete(a),t={...null===(r=this._value)||void 0===r?void 0:r.data},delete t[a]}t&&d(this,"value-changed",{value:{...this._value,data:t}}),this.requestUpdate("_checkedKeys")}},{kind:"method",key:"_serviceChanged",value:function(e){var i;e.stopPropagation(),e.detail.value!==(null===(i=this._value)||void 0===i?void 0:i.service)&&d(this,"value-changed",{value:{service:e.detail.value||""}})}},{kind:"method",key:"_entityPicked",value:function(e){var i,a,t;e.stopPropagation();const s=e.detail.value;if((null===(i=this._value)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.entity_id)===s)return;let l;var o;!s&&null!==(t=this._value)&&void 0!==t&&t.data?(l={...this._value},delete l.data.entity_id):l={...this._value,data:{...null===(o=this._value)||void 0===o?void 0:o.data,entity_id:e.detail.value}};d(this,"value-changed",{value:l})}},{kind:"method",key:"_targetChanged",value:function(e){var i;e.stopPropagation();const a=e.detail.value;if((null===(i=this._value)||void 0===i?void 0:i.target)===a)return;let t;a?t={...this._value,target:e.detail.value}:(t={...this._value},delete t.target),d(this,"value-changed",{value:t})}},{kind:"method",key:"_serviceDataChanged",value:function(e){var i,a,t,s,l;e.stopPropagation();const o=e.currentTarget.key,n=e.detail.value;if((null===(i=this._value)||void 0===i||null===(a=i.data)||void 0===a?void 0:a[o])===n||(null===(t=this._value)||void 0===t||null===(s=t.data)||void 0===s||!s[o])&&(""===n||void 0===n))return;const r={...null===(l=this._value)||void 0===l?void 0:l.data,[o]:n};""!==n&&void 0!==n||delete r[o],d(this,"value-changed",{value:{...this._value,data:r}})}},{kind:"method",key:"_dataChanged",value:function(e){e.stopPropagation(),e.detail.isValid&&d(this,"value-changed",{value:{...this._value,data:e.detail.value}})}},{kind:"method",key:"_fetchManifest",value:async function(e){this._manifest=void 0;try{this._manifest=await _(this.hass,e)}catch(e){}}},{kind:"get",static:!0,key:"styles",value:function(){return r` - ha-settings-row { - padding: var(--service-control-padding, 0 16px); - } - ha-settings-row { - --paper-time-input-justify-content: flex-end; - --settings-row-content-width: 100%; - --settings-row-prefix-display: contents; - border-top: var( - --service-control-items-border-top, - 1px solid var(--divider-color) - ); - } - ha-service-picker, - ha-entity-picker, - ha-yaml-editor { - display: block; - margin: var(--service-control-padding, 0 16px); - } - ha-yaml-editor { - padding: 16px 0; - } - p { - margin: var(--service-control-padding, 0 16px); - padding: 16px 0; - } - .checkbox-spacer { - width: 32px; - } - ha-checkbox { - margin-left: -16px; - } - .help-icon { - color: var(--secondary-text-color); - } - .description { - justify-content: space-between; - display: flex; - align-items: center; - padding-right: 2px; - } - `}}]}}),i); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.7cf5fd2b.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.7cf5fd2b.js.gz deleted file mode 100644 index 08f186c..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.7cf5fd2b.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.802fce44.js b/custom_components/hacs/hacs_frontend_experimental/c.802fce44.js deleted file mode 100644 index 415da5b..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.802fce44.js +++ /dev/null @@ -1,90 +0,0 @@ -import{_ as s,H as o,e as t,t as a,y as e,m as i,w as r,a as c,r as d,g as h,b as n,s as l,c as p,d as m,n as u}from"./main-c66a9a06.js";import{c as v}from"./c.41d13611.js";import"./c.bbadaeea.js";import"./c.08837419.js";import"./c.e8169f76.js";import"./c.8e28b461.js";import"./c.a5550d10.js";import"./c.930daaba.js";import"./c.b914d43e.js";let g=s([u("hacs-custom-repositories-dialog")],(function(s,o){return{F:class extends o{constructor(...o){super(...o),s(this)}},d:[{kind:"field",decorators:[t()],key:"_error",value:void 0},{kind:"field",decorators:[a()],key:"_progress",value:()=>!1},{kind:"field",decorators:[a()],key:"_addRepositoryData",value:()=>({category:void 0,repository:void 0})},{kind:"field",decorators:[a()],key:"_customRepositories",value:void 0},{kind:"method",key:"shouldUpdate",value:function(s){return s.has("narrow")||s.has("active")||s.has("_error")||s.has("_addRepositoryData")||s.has("_customRepositories")||s.has("_progress")}},{kind:"method",key:"render",value:function(){var s,o;if(!this.active)return e``;const t=[{name:"repository",selector:{text:{}}},{name:"category",selector:{select:{mode:"dropdown",options:this.hacs.info.categories.map((s=>({value:s,label:this.hacs.localize(`common.${s}`)})))}}}];return e` - -
    -
    - ${null!==(s=this._error)&&void 0!==s&&s.message?e` - ${this._error.message} - `:""} - ${null===(o=this._customRepositories)||void 0===o?void 0:o.filter((s=>this.hacs.info.categories.includes(s.category))).map((s=>e`this.active=!1} - > - - ${s.name} - ${s.full_name} (${s.category}) - - {o.preventDefault(),this._removeRepository(String(s.id))}} - > - - - - `))} -
    - "category"===s.name?this.hacs.localize("dialog_custom_repositories.category"):this.hacs.localize("common.repository")} - @value-changed=${this._valueChanged} - > - -
    - - ${this._progress?e``:this.hacs.localize("common.add")} - -
    - `}},{kind:"method",key:"firstUpdated",value:function(){var s;r(this.hass,(s=>this._error=s),c.ERROR),this._customRepositories=null===(s=this.hacs.repositories)||void 0===s?void 0:s.filter((s=>s.custom))}},{kind:"method",key:"_valueChanged",value:function(s){this._addRepositoryData=s.detail.value}},{kind:"method",key:"_addRepository",value:async function(){if(this._error=void 0,this._progress=!0,!this._addRepositoryData.category)return void(this._error={message:this.hacs.localize("dialog_custom_repositories.no_category")});if(!this._addRepositoryData.repository)return void(this._error={message:this.hacs.localize("dialog_custom_repositories.no_repository")});await d(this.hass,this._addRepositoryData.repository,this._addRepositoryData.category);const s=await h(this.hass);this.dispatchEvent(new CustomEvent("update-hacs",{detail:{repositories:s},bubbles:!0,composed:!0})),this._customRepositories=s.filter((s=>s.custom)),this._progress=!1}},{kind:"method",key:"_removeRepository",value:async function(s){this._error=void 0,await n(this.hass,s);const o=await h(this.hass);this.dispatchEvent(new CustomEvent("update-hacs",{detail:{repositories:o},bubbles:!0,composed:!0})),this._customRepositories=o.filter((s=>s.custom))}},{kind:"get",static:!0,key:"styles",value:function(){return[l,p,m` - .list { - position: relative; - max-height: calc(100vh - 500px); - overflow: auto; - } - a { - all: unset; - } - ha-form { - display: block; - padding: 25px 0; - } - ha-form[narrow] { - background-color: var(--card-background-color); - bottom: 0; - position: absolute; - width: calc(100% - 48px); - } - ha-svg-icon { - --mdc-icon-size: 36px; - } - ha-svg-icon:not(.delete) { - margin-right: 4px; - } - ha-settings-row { - cursor: pointer; - padding: 0; - } - .list[narrow] > ha-settings-row:last-of-type { - margin-bottom: 162px; - } - .delete { - color: var(--hcv-color-error); - } - - @media all and (max-width: 450px), all and (max-height: 500px) { - .list { - max-height: calc(100vh - 162px); - } - } - `]}}]}}),o);export{g as HacsCustomRepositoriesDialog}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.802fce44.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.802fce44.js.gz deleted file mode 100644 index 091122c..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.802fce44.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.811f664e.js b/custom_components/hacs/hacs_frontend_experimental/c.811f664e.js deleted file mode 100644 index 997a966..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.811f664e.js +++ /dev/null @@ -1 +0,0 @@ -import{a}from"./c.04ecc0ad.js";const s="unavailable",n="unknown",r=["unavailable","unknown"],e=4,o=s=>a(s,4)&&"number"==typeof s.in_progress,t=a=>(a=>o(a.attributes))(a)||!!a.attributes.in_progress,i=a=>o(a)||!!a.in_progress;export{r as U,n as a,s as b,i as c,e as d,t as u}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.811f664e.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.811f664e.js.gz deleted file mode 100644 index 6a767a8..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.811f664e.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.8250edc4.js b/custom_components/hacs/hacs_frontend_experimental/c.8250edc4.js deleted file mode 100644 index 5471da2..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.8250edc4.js +++ /dev/null @@ -1,15 +0,0 @@ -import{_ as e,j as t,e as a,y as i,O as d,n as o}from"./main-c66a9a06.js";import{u as l}from"./c.e95db283.js";import"./c.bbadaeea.js";e([o("ha-time-input")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[a({attribute:!1})],key:"locale",value:void 0},{kind:"field",decorators:[a()],key:"value",value:void 0},{kind:"field",decorators:[a()],key:"label",value:void 0},{kind:"field",decorators:[a()],key:"helper",value:void 0},{kind:"field",decorators:[a({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[a({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[a({type:Boolean,attribute:"enable-second"})],key:"enableSecond",value:()=>!1},{kind:"method",key:"render",value:function(){var e;const t=l(this.locale),a=(null===(e=this.value)||void 0===e?void 0:e.split(":"))||[];let d=a[0];const o=Number(a[0]);return o&&t&&o>12&&o<24&&(d=String(o-12).padStart(2,"0")),t&&0===o&&(d="12"),i` - =12?"PM":"AM"} - .disabled=${this.disabled} - @value-changed=${this._timeChanged} - .enableSecond=${this.enableSecond} - .required=${this.required} - .helper=${this.helper} - > - `}},{kind:"method",key:"_timeChanged",value:function(e){e.stopPropagation();const t=e.detail.value,a=l(this.locale);let i=t.hours||0;t&&a&&("PM"===t.amPm&&i<12&&(i+=12),"AM"===t.amPm&&12===i&&(i=0));const o=`${i.toString().padStart(2,"0")}:${t.minutes?t.minutes.toString().padStart(2,"0"):"00"}:${t.seconds?t.seconds.toString().padStart(2,"0"):"00"}`;o!==this.value&&(this.value=o,d(this,"change"),d(this,"value-changed",{value:o}))}}]}}),t); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.8250edc4.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.8250edc4.js.gz deleted file mode 100644 index c329a4f..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.8250edc4.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.83c82798.js b/custom_components/hacs/hacs_frontend_experimental/c.83c82798.js deleted file mode 100644 index 796ea2b..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.83c82798.js +++ /dev/null @@ -1,139 +0,0 @@ -import{_ as e,j as i,e as t,t as a,i as l,E as d,G as n,y as o,k as s,a4 as r,O as c,d as u,n as h,eG as f}from"./main-c66a9a06.js";import{a as p}from"./c.4b0dc107.js";import{b as v}from"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";e([h("ha-file-upload")],(function(e,i){class h extends i{constructor(...i){super(...i),e(this)}}return{F:h,d:[{kind:"field",decorators:[t({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"accept",value:void 0},{kind:"field",decorators:[t()],key:"icon",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"value",value:()=>null},{kind:"field",decorators:[t({type:Boolean})],key:"uploading",value:()=>!1},{kind:"field",decorators:[t({type:Boolean,attribute:"auto-open-file-dialog"})],key:"autoOpenFileDialog",value:()=>!1},{kind:"field",decorators:[a()],key:"_drag",value:()=>!1},{kind:"field",decorators:[l("#input")],key:"_input",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){d(n(h.prototype),"firstUpdated",this).call(this,e),this.autoOpenFileDialog&&this._openFilePicker()}},{kind:"method",key:"render",value:function(){var e;return o` - ${this.uploading?o``:o` - - `} - `}},{kind:"method",key:"_openFilePicker",value:function(){var e;null===(e=this._input)||void 0===e||e.click()}},{kind:"method",key:"_handleDrop",value:function(e){var i;e.preventDefault(),e.stopPropagation(),null!==(i=e.dataTransfer)&&void 0!==i&&i.files&&c(this,"file-picked",{files:e.dataTransfer.files}),this._drag=!1}},{kind:"method",key:"_handleDragStart",value:function(e){e.preventDefault(),e.stopPropagation(),this._drag=!0}},{kind:"method",key:"_handleDragEnd",value:function(e){e.preventDefault(),e.stopPropagation(),this._drag=!1}},{kind:"method",key:"_handleFilePicked",value:function(e){c(this,"file-picked",{files:e.target.files})}},{kind:"method",key:"_clearValue",value:function(e){e.preventDefault(),this.value=null,c(this,"change")}},{kind:"get",static:!0,key:"styles",value:function(){return[v,u` - :host { - display: block; - } - .mdc-text-field--filled { - height: auto; - padding-top: 16px; - cursor: pointer; - } - .mdc-text-field--filled.mdc-text-field--with-trailing-icon { - padding-top: 28px; - } - .mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon { - color: var(--secondary-text-color); - } - .mdc-text-field--filled.mdc-text-field--with-trailing-icon - .mdc-text-field__icon { - align-self: flex-end; - } - .mdc-text-field__icon--leading { - margin-bottom: 12px; - inset-inline-start: initial; - inset-inline-end: 0px; - direction: var(--direction); - } - .mdc-text-field--filled .mdc-floating-label--float-above { - transform: scale(0.75); - top: 8px; - } - .mdc-floating-label { - inset-inline-start: 16px !important; - inset-inline-end: initial !important; - direction: var(--direction); - } - .mdc-text-field--filled .mdc-floating-label { - inset-inline-start: 48px !important; - inset-inline-end: initial !important; - direction: var(--direction); - } - .dragged:before { - position: var(--layout-fit_-_position); - top: var(--layout-fit_-_top); - right: var(--layout-fit_-_right); - bottom: var(--layout-fit_-_bottom); - left: var(--layout-fit_-_left); - background: currentColor; - content: ""; - opacity: var(--dark-divider-opacity); - pointer-events: none; - border-radius: 4px; - } - .value { - width: 100%; - } - input.file { - display: none; - } - img { - max-width: 100%; - max-height: 125px; - } - ha-icon-button { - --mdc-icon-button-size: 24px; - --mdc-icon-size: 20px; - } - ha-circular-progress { - display: block; - text-align-last: center; - } - `]}}]}}),i);let m=e([h("ha-selector-file")],(function(e,i){class l extends i{constructor(...i){super(...i),e(this)}}return{F:l,d:[{kind:"field",decorators:[t()],key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"selector",value:void 0},{kind:"field",decorators:[t()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:()=>!0},{kind:"field",decorators:[a()],key:"_filename",value:void 0},{kind:"field",decorators:[a()],key:"_busy",value:()=>!1},{kind:"method",key:"render",value:function(){var e,i;return o` - - `}},{kind:"method",key:"willUpdate",value:function(e){d(n(l.prototype),"willUpdate",this).call(this,e),e.has("value")&&this._filename&&this.value!==this._filename.fileId&&(this._filename=void 0)}},{kind:"method",key:"_uploadFile",value:async function(e){this._busy=!0;const i=e.detail.files[0];try{const e=await(async(e,i)=>{const t=new FormData;t.append("file",i);const a=await e.fetchWithAuth("/api/file_upload",{method:"POST",body:t});if(413===a.status)throw new Error(`Uploaded file is too large (${i.name})`);if(200!==a.status)throw new Error("Unknown error");return(await a.json()).file_id})(this.hass,i);this._filename={fileId:e,name:i.name},c(this,"value-changed",{value:e})}catch(e){p(this,{text:this.hass.localize("ui.components.selectors.file.upload_failed",{reason:e.message||e})})}finally{this._busy=!1}}},{kind:"field",key:"_removeFile",value(){return async()=>{this._busy=!0;try{await(async(e,i)=>e.callApi("DELETE","file_upload",{file_id:i}))(this.hass,this.value)}catch(e){}finally{this._busy=!1}this._filename=void 0,c(this,"value-changed",{value:""})}}}]}}),i);export{m as HaFileSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.83c82798.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.83c82798.js.gz deleted file mode 100644 index ccddf34..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.83c82798.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.86b125b8.js b/custom_components/hacs/hacs_frontend_experimental/c.86b125b8.js index 219e1d5..25241d7 100644 --- a/custom_components/hacs/hacs_frontend_experimental/c.86b125b8.js +++ b/custom_components/hacs/hacs_frontend_experimental/c.86b125b8.js @@ -1 +1 @@ -import{u as e,c as t,a as n}from"./c.743a15a1.js";var r=t((function(e,t){function r(e,t,...n){if(!e)throw new TypeError(a(t,n))}function a(e,t){let n=0;return e.replace(/%[os]/gu,(()=>o(t[n++])))}function o(e){return"object"!=typeof e||null===e?String(e):Object.prototype.toString.call(e)}let i;Object.defineProperty(t,"__esModule",{value:!0});const s="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n?n:"undefined"!=typeof globalThis?globalThis:void 0;let l;class c{constructor(e,t){this.code=e,this.message=t}warn(...e){var t;try{if(l)return void l({...this,args:e});const n=(null!==(t=(new Error).stack)&&void 0!==t?t:"").replace(/^(?:.+?\n){2}/gu,"\n");console.warn(this.message,...e,n)}catch(e){}}}const u=new c("W01","Unable to initialize event under dispatching."),p=new c("W02","Assigning any falsy value to 'cancelBubble' property has no effect."),g=new c("W03","Assigning any truthy value to 'returnValue' property has no effect."),f=new c("W04","Unable to preventDefault on non-cancelable events."),b=new c("W05","Unable to preventDefault inside passive event listener invocation."),d=new c("W06","An event listener wasn't added because it has been added already: %o, %o"),E=new c("W07","The %o option value was abandoned because the event listener wasn't added as duplicated."),v=new c("W08","The 'callback' argument must be a function or an object that has 'handleEvent' method: %o"),h=new c("W09","Event attribute handler must be a function: %o");class y{static get NONE(){return m}static get CAPTURING_PHASE(){return R}static get AT_TARGET(){return T}static get BUBBLING_PHASE(){return P}constructor(e,t){Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=null!=t?t:{};w.set(this,{type:String(e),bubbles:Boolean(n.bubbles),cancelable:Boolean(n.cancelable),composed:Boolean(n.composed),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1,inPassiveListenerFlag:!1,dispatchFlag:!1,timeStamp:Date.now()})}get type(){return _(this).type}get target(){return _(this).target}get srcElement(){return _(this).target}get currentTarget(){return _(this).currentTarget}composedPath(){const e=_(this).currentTarget;return e?[e]:[]}get NONE(){return m}get CAPTURING_PHASE(){return R}get AT_TARGET(){return T}get BUBBLING_PHASE(){return P}get eventPhase(){return _(this).dispatchFlag?2:0}stopPropagation(){_(this).stopPropagationFlag=!0}get cancelBubble(){return _(this).stopPropagationFlag}set cancelBubble(e){e?_(this).stopPropagationFlag=!0:p.warn()}stopImmediatePropagation(){const e=_(this);e.stopPropagationFlag=e.stopImmediatePropagationFlag=!0}get bubbles(){return _(this).bubbles}get cancelable(){return _(this).cancelable}get returnValue(){return!_(this).canceledFlag}set returnValue(e){e?g.warn():O(_(this))}preventDefault(){O(_(this))}get defaultPrevented(){return _(this).canceledFlag}get composed(){return _(this).composed}get isTrusted(){return!1}get timeStamp(){return _(this).timeStamp}initEvent(e,t=!1,n=!1){const r=_(this);r.dispatchFlag?u.warn():w.set(this,{...r,type:String(e),bubbles:Boolean(t),cancelable:Boolean(n),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1})}}const m=0,R=1,T=2,P=3,w=new WeakMap;function _(e,t="this"){const n=w.get(e);return r(null!=n,"'%s' must be an object that Event constructor created, but got another one: %o",t,e),n}function O(e){e.inPassiveListenerFlag?b.warn():e.cancelable?e.canceledFlag=!0:f.warn()}Object.defineProperty(y,"NONE",{enumerable:!0}),Object.defineProperty(y,"CAPTURING_PHASE",{enumerable:!0}),Object.defineProperty(y,"AT_TARGET",{enumerable:!0}),Object.defineProperty(y,"BUBBLING_PHASE",{enumerable:!0});const A=Object.getOwnPropertyNames(y.prototype);for(let e=0;ea,configurable:!0,enumerable:!0})}}class j extends y{static wrap(e){return new(L(e))(e)}constructor(e){super(e.type,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed}),e.cancelBubble&&super.stopPropagation(),e.defaultPrevented&&super.preventDefault(),B.set(this,{original:e});const t=Object.keys(e);for(let n=0;nn!==t)),!1):(e.listeners.splice(t,1),!0)}function X(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={attrCallback:void 0,attrListener:void 0,cow:!1,listeners:[]}}F.set(Object.prototype,j),void 0!==s&&void 0!==s.Event&&F.set(s.Event.prototype,j);class Q{constructor(){Z.set(this,Object.create(null))}addEventListener(e,t,n){const r=z(this),{callback:a,capture:o,once:i,passive:s,signal:l,type:c}=function(e,t,n){var r;if(K(t),"object"==typeof n&&null!==n)return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n.capture),passive:Boolean(n.passive),once:Boolean(n.once),signal:null!==(r=n.signal)&&void 0!==r?r:void 0};return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n),passive:!1,once:!1,signal:void 0}}(e,t,n);if(null==a||(null==l?void 0:l.aborted))return;const u=X(r,c),p=M(u,a,o);-1===p?G(u,a,o,s,i,l):function(e,t,n,r){d.warn(C(e)?"capture":"bubble",e.callback),V(e)!==t&&E.warn("passive");W(e)!==n&&E.warn("once");e.signal!==r&&E.warn("signal")}(u.listeners[p],s,i,l)}removeEventListener(e,t,n){const r=z(this),{callback:a,capture:o,type:i}=function(e,t,n){if(K(t),"object"==typeof n&&null!==n)return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n.capture)};return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n)}}(e,t,n),s=r[i];null!=a&&s&&x(s,a,o)}dispatchEvent(e){const t=z(this)[String(e.type)];if(null==t)return!0;const n=e instanceof y?e:j.wrap(e),r=_(n,"event");if(r.dispatchFlag)throw a="This event has been in dispatching.",s.DOMException?new s.DOMException(a,"InvalidStateError"):(null==I&&(I=class e extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,e)}get code(){return 11}get name(){return"InvalidStateError"}},Object.defineProperties(I.prototype,{code:{enumerable:!0},name:{enumerable:!0}}),N(I),N(I.prototype)),new I(a));var a;if(r.dispatchFlag=!0,r.target=r.currentTarget=this,!r.stopPropagationFlag){const{cow:e,listeners:a}=t;t.cow=!0;for(let o=0;oo(t[n++])))}function o(e){return"object"!=typeof e||null===e?String(e):Object.prototype.toString.call(e)}let i;Object.defineProperty(t,"__esModule",{value:!0});const s="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n?n:"undefined"!=typeof globalThis?globalThis:void 0;let l;class c{constructor(e,t){this.code=e,this.message=t}warn(...e){var t;try{if(l)return void l({...this,args:e});const n=(null!==(t=(new Error).stack)&&void 0!==t?t:"").replace(/^(?:.+?\n){2}/gu,"\n");console.warn(this.message,...e,n)}catch(e){}}}const u=new c("W01","Unable to initialize event under dispatching."),p=new c("W02","Assigning any falsy value to 'cancelBubble' property has no effect."),g=new c("W03","Assigning any truthy value to 'returnValue' property has no effect."),f=new c("W04","Unable to preventDefault on non-cancelable events."),b=new c("W05","Unable to preventDefault inside passive event listener invocation."),d=new c("W06","An event listener wasn't added because it has been added already: %o, %o"),E=new c("W07","The %o option value was abandoned because the event listener wasn't added as duplicated."),v=new c("W08","The 'callback' argument must be a function or an object that has 'handleEvent' method: %o"),h=new c("W09","Event attribute handler must be a function: %o");class y{static get NONE(){return m}static get CAPTURING_PHASE(){return R}static get AT_TARGET(){return T}static get BUBBLING_PHASE(){return P}constructor(e,t){Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=null!=t?t:{};w.set(this,{type:String(e),bubbles:Boolean(n.bubbles),cancelable:Boolean(n.cancelable),composed:Boolean(n.composed),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1,inPassiveListenerFlag:!1,dispatchFlag:!1,timeStamp:Date.now()})}get type(){return _(this).type}get target(){return _(this).target}get srcElement(){return _(this).target}get currentTarget(){return _(this).currentTarget}composedPath(){const e=_(this).currentTarget;return e?[e]:[]}get NONE(){return m}get CAPTURING_PHASE(){return R}get AT_TARGET(){return T}get BUBBLING_PHASE(){return P}get eventPhase(){return _(this).dispatchFlag?2:0}stopPropagation(){_(this).stopPropagationFlag=!0}get cancelBubble(){return _(this).stopPropagationFlag}set cancelBubble(e){e?_(this).stopPropagationFlag=!0:p.warn()}stopImmediatePropagation(){const e=_(this);e.stopPropagationFlag=e.stopImmediatePropagationFlag=!0}get bubbles(){return _(this).bubbles}get cancelable(){return _(this).cancelable}get returnValue(){return!_(this).canceledFlag}set returnValue(e){e?g.warn():O(_(this))}preventDefault(){O(_(this))}get defaultPrevented(){return _(this).canceledFlag}get composed(){return _(this).composed}get isTrusted(){return!1}get timeStamp(){return _(this).timeStamp}initEvent(e,t=!1,n=!1){const r=_(this);r.dispatchFlag?u.warn():w.set(this,{...r,type:String(e),bubbles:Boolean(t),cancelable:Boolean(n),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1})}}const m=0,R=1,T=2,P=3,w=new WeakMap;function _(e,t="this"){const n=w.get(e);return r(null!=n,"'%s' must be an object that Event constructor created, but got another one: %o",t,e),n}function O(e){e.inPassiveListenerFlag?b.warn():e.cancelable?e.canceledFlag=!0:f.warn()}Object.defineProperty(y,"NONE",{enumerable:!0}),Object.defineProperty(y,"CAPTURING_PHASE",{enumerable:!0}),Object.defineProperty(y,"AT_TARGET",{enumerable:!0}),Object.defineProperty(y,"BUBBLING_PHASE",{enumerable:!0});const A=Object.getOwnPropertyNames(y.prototype);for(let e=0;ea,configurable:!0,enumerable:!0})}}class j extends y{static wrap(e){return new(L(e))(e)}constructor(e){super(e.type,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed}),e.cancelBubble&&super.stopPropagation(),e.defaultPrevented&&super.preventDefault(),B.set(this,{original:e});const t=Object.keys(e);for(let n=0;nn!==t)),!1):(e.listeners.splice(t,1),!0)}function X(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={attrCallback:void 0,attrListener:void 0,cow:!1,listeners:[]}}F.set(Object.prototype,j),void 0!==s&&void 0!==s.Event&&F.set(s.Event.prototype,j);class Q{constructor(){Z.set(this,Object.create(null))}addEventListener(e,t,n){const r=z(this),{callback:a,capture:o,once:i,passive:s,signal:l,type:c}=function(e,t,n){var r;if(K(t),"object"==typeof n&&null!==n)return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n.capture),passive:Boolean(n.passive),once:Boolean(n.once),signal:null!==(r=n.signal)&&void 0!==r?r:void 0};return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n),passive:!1,once:!1,signal:void 0}}(e,t,n);if(null==a||(null==l?void 0:l.aborted))return;const u=X(r,c),p=M(u,a,o);-1===p?G(u,a,o,s,i,l):function(e,t,n,r){d.warn(C(e)?"capture":"bubble",e.callback),V(e)!==t&&E.warn("passive");W(e)!==n&&E.warn("once");e.signal!==r&&E.warn("signal")}(u.listeners[p],s,i,l)}removeEventListener(e,t,n){const r=z(this),{callback:a,capture:o,type:i}=function(e,t,n){if(K(t),"object"==typeof n&&null!==n)return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n.capture)};return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n)}}(e,t,n),s=r[i];null!=a&&s&&x(s,a,o)}dispatchEvent(e){const t=z(this)[String(e.type)];if(null==t)return!0;const n=e instanceof y?e:j.wrap(e),r=_(n,"event");if(r.dispatchFlag)throw a="This event has been in dispatching.",s.DOMException?new s.DOMException(a,"InvalidStateError"):(null==I&&(I=class e extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,e)}get code(){return 11}get name(){return"InvalidStateError"}},Object.defineProperties(I.prototype,{code:{enumerable:!0},name:{enumerable:!0}}),N(I),N(I.prototype)),new I(a));var a;if(r.dispatchFlag=!0,r.target=r.currentTarget=this,!r.stopPropagationFlag){const{cow:e,listeners:a}=t;t.cow=!0;for(let o=0;od},{kind:"field",decorators:[t()],key:"defaultValue",value:void 0},{kind:"field",decorators:[t()],key:"isValid",value:()=>!0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"readOnly",value:()=>!1},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[i()],key:"_yaml",value:()=>""},{kind:"method",key:"setValue",value:function(e){try{this._yaml=e&&!(e=>{if("object"!=typeof e)return!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a))return!1;return!0})(e)?s(e,{schema:this.yamlSchema,quotingType:'"'}):""}catch(a){console.error(a,e),alert(`There was an error converting to YAML: ${a}`)}}},{kind:"method",key:"firstUpdated",value:function(){this.defaultValue&&this.setValue(this.defaultValue)}},{kind:"method",key:"render",value:function(){return void 0===this._yaml?l``:l` - ${this.label?l`

    ${this.label}${this.required?" *":""}

    `:""} - - `}},{kind:"method",key:"_onChange",value:function(e){let a;e.stopPropagation(),this._yaml=e.detail.value;let t=!0;if(this._yaml)try{a=n(this._yaml,{schema:this.yamlSchema})}catch(e){t=!1}else a={};this.value=a,this.isValid=t,o(this,"value-changed",{value:a,isValid:t})}},{kind:"get",key:"yaml",value:function(){return this._yaml}}]}}),a); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.89ace730.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.89ace730.js.gz deleted file mode 100644 index 59250a7..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.89ace730.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.911cafac.js b/custom_components/hacs/hacs_frontend_experimental/c.911cafac.js deleted file mode 100644 index 0df46bf..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.911cafac.js +++ /dev/null @@ -1,57 +0,0 @@ -import{_ as e,j as i,e as t,y as l,k as d,O as o,d as a,n}from"./main-c66a9a06.js";import"./c.bbadaeea.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.930daaba.js";let r=e([n("ha-selector-number")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t()],key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"selector",value:void 0},{kind:"field",decorators:[t()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"placeholder",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:()=>!0},{kind:"field",decorators:[t({type:Boolean})],key:"disabled",value:()=>!1},{kind:"method",key:"render",value:function(){var e,i,t,o,a,n,r,s,u,h,v,c,m,p,b;const f="box"===(null===(e=this.selector.number)||void 0===e?void 0:e.mode);return l` -
    - ${f?"":l` - ${this.label?l`${this.label}${this.required?" *":""}`:""} - - - `} - - -
    - ${!f&&this.helper?l`${this.helper}`:""} - `}},{kind:"get",key:"_value",value:function(){var e,i;return null!==(e=this.value)&&void 0!==e?e:(null===(i=this.selector.number)||void 0===i?void 0:i.min)||0}},{kind:"method",key:"_handleInputChange",value:function(e){var i;e.stopPropagation();const t=""===e.target.value||isNaN(e.target.value)?this.required?(null===(i=this.selector.number)||void 0===i?void 0:i.min)||0:void 0:Number(e.target.value);this.value!==t&&o(this,"value-changed",{value:t})}},{kind:"method",key:"_handleSliderChange",value:function(e){e.stopPropagation();const i=Number(e.target.value);this.value!==i&&o(this,"value-changed",{value:i})}},{kind:"get",static:!0,key:"styles",value:function(){return a` - .input { - display: flex; - justify-content: space-between; - align-items: center; - direction: ltr; - } - ha-slider { - flex: 1; - } - ha-textfield { - --ha-textfield-input-width: 40px; - } - .single { - --ha-textfield-input-width: unset; - flex: 1; - } - `}}]}}),i);export{r as HaNumberSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.911cafac.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.911cafac.js.gz deleted file mode 100644 index d85e9dd..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.911cafac.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.930daaba.js b/custom_components/hacs/hacs_frontend_experimental/c.930daaba.js deleted file mode 100644 index fd09e89..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.930daaba.js +++ /dev/null @@ -1,51 +0,0 @@ -import{_ as i,j as c,e,y as r,d as t,Y as p,n as a}from"./main-c66a9a06.js";var d='/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/material-components/material-components-web/blob/master/LICENSE\n */\n.mdc-touch-target-wrapper{display:inline}.mdc-deprecated-chip-trailing-action__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.mdc-deprecated-chip-trailing-action{border:none;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;padding:0;outline:none;cursor:pointer;-webkit-appearance:none;background:none}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__icon{height:18px;width:18px;font-size:18px}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__touch{width:26px}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__icon{fill:currentColor;color:inherit}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-deprecated-chip-trailing-action{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::before,.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded .mdc-deprecated-chip-trailing-action__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale, 1));transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded .mdc-deprecated-chip-trailing-action__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded--unbounded .mdc-deprecated-chip-trailing-action__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-chip-trailing-action__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-chip-trailing-action__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::before,.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded .mdc-deprecated-chip-trailing-action__ripple::before,.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded .mdc-deprecated-chip-trailing-action__ripple::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded .mdc-deprecated-chip-trailing-action__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::before,.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-deprecated-chip-trailing-action:hover .mdc-deprecated-chip-trailing-action__ripple::before,.mdc-deprecated-chip-trailing-action.mdc-ripple-surface--hover .mdc-deprecated-chip-trailing-action__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded--background-focused .mdc-deprecated-chip-trailing-action__ripple::before,.mdc-deprecated-chip-trailing-action:not(.mdc-ripple-upgraded):focus .mdc-deprecated-chip-trailing-action__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-deprecated-chip-trailing-action:not(.mdc-ripple-upgraded) .mdc-deprecated-chip-trailing-action__ripple::after{transition:opacity 150ms linear}.mdc-deprecated-chip-trailing-action:not(.mdc-ripple-upgraded):active .mdc-deprecated-chip-trailing-action__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple{position:absolute;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.mdc-chip__icon--leading{color:rgba(0,0,0,.54)}.mdc-deprecated-chip-trailing-action{color:#000}.mdc-chip__icon--trailing{color:rgba(0,0,0,.54)}.mdc-chip__icon--trailing:hover{color:rgba(0,0,0,.62)}.mdc-chip__icon--trailing:focus{color:rgba(0,0,0,.87)}.mdc-chip__icon.mdc-chip__icon--leading:not(.mdc-chip__icon--leading-hidden){width:20px;height:20px;font-size:20px}.mdc-deprecated-chip-trailing-action__icon{height:18px;width:18px;font-size:18px}.mdc-chip__icon.mdc-chip__icon--trailing{width:18px;height:18px;font-size:18px}.mdc-deprecated-chip-trailing-action{margin-left:4px;margin-right:-4px}[dir=rtl] .mdc-deprecated-chip-trailing-action,.mdc-deprecated-chip-trailing-action[dir=rtl]{margin-left:-4px;margin-right:4px}.mdc-chip__icon--trailing{margin-left:4px;margin-right:-4px}[dir=rtl] .mdc-chip__icon--trailing,.mdc-chip__icon--trailing[dir=rtl]{margin-left:-4px;margin-right:4px}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-chip{border-radius:16px;background-color:#e0e0e0;color:rgba(0, 0, 0, 0.87);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);height:32px;position:relative;display:inline-flex;align-items:center;box-sizing:border-box;padding:0 12px;border-width:0;outline:none;cursor:pointer;-webkit-appearance:none}.mdc-chip .mdc-chip__ripple{border-radius:16px}.mdc-chip:hover{color:rgba(0, 0, 0, 0.87)}.mdc-chip.mdc-chip--selected .mdc-chip__checkmark,.mdc-chip .mdc-chip__icon--leading:not(.mdc-chip__icon--leading-hidden){margin-left:-4px;margin-right:4px}[dir=rtl] .mdc-chip.mdc-chip--selected .mdc-chip__checkmark,[dir=rtl] .mdc-chip .mdc-chip__icon--leading:not(.mdc-chip__icon--leading-hidden),.mdc-chip.mdc-chip--selected .mdc-chip__checkmark[dir=rtl],.mdc-chip .mdc-chip__icon--leading:not(.mdc-chip__icon--leading-hidden)[dir=rtl]{margin-left:4px;margin-right:-4px}.mdc-chip .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-chip::-moz-focus-inner{padding:0;border:0}.mdc-chip:hover{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-chip .mdc-chip__touch{position:absolute;top:50%;height:48px;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mdc-chip--exit{transition:opacity 75ms cubic-bezier(0.4, 0, 0.2, 1),width 150ms cubic-bezier(0, 0, 0.2, 1),padding 100ms linear,margin 100ms linear;opacity:0}.mdc-chip__overflow{text-overflow:ellipsis;overflow:hidden}.mdc-chip__text{white-space:nowrap}.mdc-chip__icon{border-radius:50%;outline:none;vertical-align:middle}.mdc-chip__checkmark{height:20px}.mdc-chip__checkmark-path{transition:stroke-dashoffset 150ms 50ms cubic-bezier(0.4, 0, 0.6, 1);stroke-width:2px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-chip__primary-action:focus{outline:none}.mdc-chip--selected .mdc-chip__checkmark-path{stroke-dashoffset:0}.mdc-chip__icon--leading,.mdc-chip__icon--trailing{position:relative}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected .mdc-chip__icon--leading{color:rgba(98,0,238,.54)}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected:hover{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-chip-set--choice .mdc-chip .mdc-chip__checkmark-path{stroke:#6200ee;stroke:var(--mdc-theme-primary, #6200ee)}.mdc-chip-set--choice .mdc-chip--selected{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-chip__checkmark-svg{width:0;height:20px;transition:width 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-chip--selected .mdc-chip__checkmark-svg{width:20px}.mdc-chip-set--filter .mdc-chip__icon--leading{transition:opacity 75ms linear;transition-delay:-50ms;opacity:1}.mdc-chip-set--filter .mdc-chip__icon--leading+.mdc-chip__checkmark{transition:opacity 75ms linear;transition-delay:80ms;opacity:0}.mdc-chip-set--filter .mdc-chip__icon--leading+.mdc-chip__checkmark .mdc-chip__checkmark-svg{transition:width 0ms}.mdc-chip-set--filter .mdc-chip--selected .mdc-chip__icon--leading{opacity:0}.mdc-chip-set--filter .mdc-chip--selected .mdc-chip__icon--leading+.mdc-chip__checkmark{width:0;opacity:1}.mdc-chip-set--filter .mdc-chip__icon--leading-hidden.mdc-chip__icon--leading{width:0;opacity:0}.mdc-chip-set--filter .mdc-chip__icon--leading-hidden.mdc-chip__icon--leading+.mdc-chip__checkmark{width:20px}.mdc-chip{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-chip .mdc-chip__ripple::before,.mdc-chip .mdc-chip__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-chip .mdc-chip__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-chip .mdc-chip__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-chip.mdc-ripple-upgraded .mdc-chip__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale, 1));transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-chip.mdc-ripple-upgraded .mdc-chip__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-chip.mdc-ripple-upgraded--unbounded .mdc-chip__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-chip.mdc-ripple-upgraded--foreground-activation .mdc-chip__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-chip.mdc-ripple-upgraded--foreground-deactivation .mdc-chip__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-chip .mdc-chip__ripple::before,.mdc-chip .mdc-chip__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-chip.mdc-ripple-upgraded .mdc-chip__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-chip .mdc-chip__ripple::before,.mdc-chip .mdc-chip__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-chip:hover .mdc-chip__ripple::before,.mdc-chip.mdc-ripple-surface--hover .mdc-chip__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-chip.mdc-ripple-upgraded--background-focused .mdc-chip__ripple::before,.mdc-chip.mdc-ripple-upgraded:focus-within .mdc-chip__ripple::before,.mdc-chip:not(.mdc-ripple-upgraded):focus .mdc-chip__ripple::before,.mdc-chip:not(.mdc-ripple-upgraded):focus-within .mdc-chip__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-chip:not(.mdc-ripple-upgraded) .mdc-chip__ripple::after{transition:opacity 150ms linear}.mdc-chip:not(.mdc-ripple-upgraded):active .mdc-chip__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-chip.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-chip .mdc-chip__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:hidden}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected .mdc-chip__ripple::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected .mdc-chip__ripple::before,.mdc-chip-set--choice .mdc-chip.mdc-chip--selected .mdc-chip__ripple::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected:hover .mdc-chip__ripple::before,.mdc-chip-set--choice .mdc-chip.mdc-chip--selected.mdc-ripple-surface--hover .mdc-chip__ripple::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected.mdc-ripple-upgraded--background-focused .mdc-chip__ripple::before,.mdc-chip-set--choice .mdc-chip.mdc-chip--selected.mdc-ripple-upgraded:focus-within .mdc-chip__ripple::before,.mdc-chip-set--choice .mdc-chip.mdc-chip--selected:not(.mdc-ripple-upgraded):focus .mdc-chip__ripple::before,.mdc-chip-set--choice .mdc-chip.mdc-chip--selected:not(.mdc-ripple-upgraded):focus-within .mdc-chip__ripple::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected:not(.mdc-ripple-upgraded) .mdc-chip__ripple::after{transition:opacity 150ms linear}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected:not(.mdc-ripple-upgraded):active .mdc-chip__ripple::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-chip-set--choice .mdc-chip.mdc-chip--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}@-webkit-keyframes mdc-chip-entry{from{-webkit-transform:scale(0.8);transform:scale(0.8);opacity:.4}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes mdc-chip-entry{from{-webkit-transform:scale(0.8);transform:scale(0.8);opacity:.4}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.mdc-chip-set{padding:4px;display:flex;flex-wrap:wrap;box-sizing:border-box}.mdc-chip-set .mdc-chip{margin:4px}.mdc-chip-set .mdc-chip--touch{margin-top:8px;margin-bottom:8px}.mdc-chip-set--input .mdc-chip{-webkit-animation:mdc-chip-entry 100ms cubic-bezier(0, 0, 0.2, 1);animation:mdc-chip-entry 100ms cubic-bezier(0, 0, 0.2, 1)}\n\n/*# sourceMappingURL=mdc.chips.min.css.map*/';i([a("ha-chip")],(function(i,c){return{F:class extends c{constructor(...c){super(...c),i(this)}},d:[{kind:"field",decorators:[e({type:Boolean})],key:"hasIcon",value:()=>!1},{kind:"field",decorators:[e({type:Boolean})],key:"hasTrailingIcon",value:()=>!1},{kind:"field",decorators:[e({type:Boolean})],key:"noText",value:()=>!1},{kind:"method",key:"render",value:function(){return r` -
    - ${this.hasIcon?r`
    - -
    `:null} -
    - - - - - - ${this.hasTrailingIcon?r`
    - -
    `:null} -
    - `}},{kind:"get",static:!0,key:"styles",value:function(){return t` - ${p(d)} - .mdc-chip { - background-color: var( - --ha-chip-background-color, - rgba(var(--rgb-primary-text-color), 0.15) - ); - color: var(--ha-chip-text-color, var(--primary-text-color)); - } - - .mdc-chip.no-text { - padding: 0 10px; - } - - .mdc-chip:hover { - color: var(--ha-chip-text-color, var(--primary-text-color)); - } - - .mdc-chip__icon--leading, - .mdc-chip__icon--trailing { - --mdc-icon-size: 18px; - line-height: 14px; - color: var(--ha-chip-icon-color, var(--ha-chip-text-color)); - } - .mdc-chip.mdc-chip--selected .mdc-chip__checkmark, - .mdc-chip .mdc-chip__icon--leading:not(.mdc-chip__icon--leading-hidden) { - margin-right: -4px; - margin-inline-start: -4px; - margin-inline-end: 4px; - direction: var(--direction); - } - - span[role="gridcell"] { - line-height: 14px; - } - `}}]}}),c);export{d as c}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.930daaba.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.930daaba.js.gz deleted file mode 100644 index e0d5f03..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.930daaba.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.9381c7ae.js b/custom_components/hacs/hacs_frontend_experimental/c.9381c7ae.js deleted file mode 100644 index 59d6f61..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.9381c7ae.js +++ /dev/null @@ -1,20 +0,0 @@ -import{_ as e,e as i,t,i as a,a7 as s,y as d,O as o,n,j as c}from"./main-c66a9a06.js";import"./c.41d13611.js";import{c as l}from"./c.d2f13ac1.js";import{s as r}from"./c.874c8cfd.js";import{a as u,s as h,b as v,d as m}from"./c.15496b0b.js";import{S as k}from"./c.baaad129.js";import"./c.bbadaeea.js";const p=e=>d` - ${e.name} - ${e.area} -`;e([n("ha-device-picker")],(function(e,n){return{F:class extends n{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i()],key:"devices",value:void 0},{kind:"field",decorators:[i()],key:"areas",value:void 0},{kind:"field",decorators:[i()],key:"entities",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"exclude-domains"})],key:"excludeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",decorators:[i()],key:"deviceFilter",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:void 0},{kind:"field",decorators:[t()],key:"_opened",value:void 0},{kind:"field",decorators:[a("ha-combo-box",!0)],key:"comboBox",value:void 0},{kind:"field",key:"_init",value:()=>!1},{kind:"field",key:"_getDevices",value(){return s(((e,i,t,a,s,d,o)=>{if(!e.length)return[{id:"no_devices",area:"",name:this.hass.localize("ui.components.device-picker.no_devices")}];const n={};if(a||s||d)for(const e of t)e.device_id&&(e.device_id in n||(n[e.device_id]=[]),n[e.device_id].push(e));const c={};for(const e of i)c[e.area_id]=e;let h=e.filter((e=>e.id===this.value||!e.disabled_by));a&&(h=h.filter((e=>{const i=n[e.id];return!(!i||!i.length)&&n[e.id].some((e=>a.includes(l(e.entity_id))))}))),s&&(h=h.filter((e=>{const i=n[e.id];return!i||!i.length||t.every((e=>!s.includes(l(e.entity_id))))}))),d&&(h=h.filter((e=>{const i=n[e.id];return!(!i||!i.length)&&n[e.id].some((e=>{const i=this.hass.states[e.entity_id];return!!i&&(i.attributes.device_class&&d.includes(i.attributes.device_class))}))}))),o&&(h=h.filter((e=>e.id===this.value||o(e))));const v=h.map((e=>({id:e.id,name:u(e,this.hass,n[e.id]),area:e.area_id&&c[e.area_id]?c[e.area_id].name:this.hass.localize("ui.components.device-picker.no_area")})));return v.length?1===v.length?v:v.sort(((e,i)=>r(e.name||"",i.name||""))):[{id:"no_devices",area:"",name:this.hass.localize("ui.components.device-picker.no_match")}]}))}},{kind:"method",key:"open",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.open())}},{kind:"method",key:"focus",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.focus())}},{kind:"method",key:"hassSubscribe",value:function(){return[h(this.hass.connection,(e=>{this.devices=e})),v(this.hass.connection,(e=>{this.areas=e})),m(this.hass.connection,(e=>{this.entities=e}))]}},{kind:"method",key:"updated",value:function(e){(!this._init&&this.devices&&this.areas&&this.entities||this._init&&e.has("_opened")&&this._opened)&&(this._init=!0,this.comboBox.items=this._getDevices(this.devices,this.areas,this.entities,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter))}},{kind:"method",key:"render",value:function(){return d` - - `}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_deviceChanged",value:function(e){e.stopPropagation();let i=e.detail.value;"no_devices"===i&&(i=""),i!==this._value&&this._setValue(i)}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_setValue",value:function(e){this.value=e,setTimeout((()=>{o(this,"value-changed",{value:e}),o(this,"change")}),0)}}]}}),k(c)); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.9381c7ae.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.9381c7ae.js.gz deleted file mode 100644 index e510228..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.9381c7ae.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.997c429c.js b/custom_components/hacs/hacs_frontend_experimental/c.997c429c.js deleted file mode 100644 index 78f8b74..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.997c429c.js +++ /dev/null @@ -1,23 +0,0 @@ -import{_ as e,j as t,e as i,t as a,i as s,a7 as n,y as d,O as l,n as o}from"./main-c66a9a06.js";import"./c.41d13611.js";import{c as r}from"./c.d2f13ac1.js";import{c as u}from"./c.6eb9fcd4.js";import{c}from"./c.874c8cfd.js";import"./c.bbadaeea.js";import"./c.d0c1a17e.js";const h=e=>d` - ${e.state?d``:""} - ${e.friendly_name} - ${e.entity_id} - `;e([o("ha-entity-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"autofocus",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:void 0},{kind:"field",decorators:[i({type:Boolean,attribute:"allow-custom-entity"})],key:"allowCustomEntity",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"exclude-domains"})],key:"excludeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-unit-of-measurement"})],key:"includeUnitOfMeasurement",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-entities"})],key:"includeEntities",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"exclude-entities"})],key:"excludeEntities",value:void 0},{kind:"field",decorators:[i()],key:"entityFilter",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"hideClearIcon",value:()=>!1},{kind:"field",decorators:[a()],key:"_opened",value:()=>!1},{kind:"field",decorators:[s("ha-combo-box",!0)],key:"comboBox",value:void 0},{kind:"method",key:"open",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.open())}},{kind:"method",key:"focus",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.focus())}},{kind:"field",key:"_initedStates",value:()=>!1},{kind:"field",key:"_states",value:()=>[]},{kind:"field",key:"_getStates",value(){return n(((e,t,i,a,s,n,d,l,o)=>{let h=[];if(!t)return[];let y=Object.keys(t.states);return y.length?l?(y=y.filter((e=>this.includeEntities.includes(e))),y.map((e=>({...t.states[e],friendly_name:u(t.states[e])||e}))).sort(((e,t)=>c(e.friendly_name,t.friendly_name)))):(o&&(y=y.filter((e=>!o.includes(e)))),i&&(y=y.filter((e=>i.includes(r(e))))),a&&(y=y.filter((e=>!a.includes(r(e))))),h=y.map((e=>({...t.states[e],friendly_name:u(t.states[e])||e}))).sort(((e,t)=>c(e.friendly_name,t.friendly_name))),n&&(h=h.filter((e=>e.entity_id===this.value||e.attributes.device_class&&n.includes(e.attributes.device_class)))),d&&(h=h.filter((e=>e.entity_id===this.value||e.attributes.unit_of_measurement&&d.includes(e.attributes.unit_of_measurement)))),s&&(h=h.filter((e=>e.entity_id===this.value||s(e)))),h.length?h:[{entity_id:"",state:"",last_changed:"",last_updated:"",context:{id:"",user_id:null,parent_id:null},friendly_name:this.hass.localize("ui.components.entity.entity-picker.no_match"),attributes:{friendly_name:this.hass.localize("ui.components.entity.entity-picker.no_match"),icon:"mdi:magnify"}}]):[{entity_id:"",state:"",last_changed:"",last_updated:"",context:{id:"",user_id:null,parent_id:null},friendly_name:this.hass.localize("ui.components.entity.entity-picker.no_entities"),attributes:{friendly_name:this.hass.localize("ui.components.entity.entity-picker.no_entities"),icon:"mdi:magnify"}}]}))}},{kind:"method",key:"shouldUpdate",value:function(e){return!!(e.has("value")||e.has("label")||e.has("disabled"))||!(!e.has("_opened")&&this._opened)}},{kind:"method",key:"willUpdate",value:function(e){(!this._initedStates||e.has("_opened")&&this._opened)&&(this._states=this._getStates(this._opened,this.hass,this.includeDomains,this.excludeDomains,this.entityFilter,this.includeDeviceClasses,this.includeUnitOfMeasurement,this.includeEntities,this.excludeEntities),this._initedStates&&(this.comboBox.filteredItems=this._states),this._initedStates=!0)}},{kind:"method",key:"render",value:function(){return d` - - - `}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();const t=e.detail.value;t!==this._value&&this._setValue(t)}},{kind:"method",key:"_filterChanged",value:function(e){const t=e.detail.value.toLowerCase();this.comboBox.filteredItems=this._states.filter((e=>e.entity_id.toLowerCase().includes(t)||u(e).toLowerCase().includes(t)))}},{kind:"method",key:"_setValue",value:function(e){this.value=e,setTimeout((()=>{l(this,"value-changed",{value:e}),l(this,"change")}),0)}}]}}),t); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.997c429c.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.997c429c.js.gz deleted file mode 100644 index 02be39c..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.997c429c.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.99a93bc6.js b/custom_components/hacs/hacs_frontend_experimental/c.99a93bc6.js deleted file mode 100644 index 2c81db1..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.99a93bc6.js +++ /dev/null @@ -1,80 +0,0 @@ -import{_ as t,j as i,e,t as s,i as a,y as d,a7 as c,O as n,n as l,d as o}from"./main-c66a9a06.js";import{e as r}from"./c.3f62d98e.js";import{s as u}from"./c.874c8cfd.js";import{c as h}from"./c.6eb9fcd4.js";import{d as v}from"./c.4f015773.js";import"./c.bbadaeea.js";import"./c.d0c1a17e.js";import"./c.1024e243.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.930daaba.js";import"./c.811f664e.js";import"./c.04ecc0ad.js";import"./c.d2f13ac1.js";import"./c.fa0ef026.js";import"./c.2610e8cd.js";const k=(t,i,e)=>{const s=t.states[i];return s?h(s):(null==e?void 0:e.name)||i};t([l("ha-statistic-picker")],(function(t,i){return{F:class extends i{constructor(...i){super(...i),t(this)}},d:[{kind:"field",decorators:[e({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[e()],key:"label",value:void 0},{kind:"field",decorators:[e()],key:"value",value:void 0},{kind:"field",decorators:[e({attribute:"statistic-types"})],key:"statisticTypes",value:void 0},{kind:"field",decorators:[e({type:Array})],key:"statisticIds",value:void 0},{kind:"field",decorators:[e({type:Boolean})],key:"disabled",value:void 0},{kind:"field",decorators:[e({type:Array,attribute:"include-statistics-unit-of-measurement"})],key:"includeStatisticsUnitOfMeasurement",value:void 0},{kind:"field",decorators:[e({attribute:"include-unit-class"})],key:"includeUnitClass",value:void 0},{kind:"field",decorators:[e({attribute:"include-device-class"})],key:"includeDeviceClass",value:void 0},{kind:"field",decorators:[e({type:Boolean,attribute:"entities-only"})],key:"entitiesOnly",value:()=>!1},{kind:"field",decorators:[s()],key:"_opened",value:void 0},{kind:"field",decorators:[a("ha-combo-box",!0)],key:"comboBox",value:void 0},{kind:"field",key:"_init",value:()=>!1},{kind:"field",key:"_rowRenderer",value(){return t=>d` - ${t.state?d``:""} - ${t.name} - ${""===t.id||"__missing"===t.id?d`${this.hass.localize("ui.components.statistic-picker.learn_more")}`:t.id} - `}},{kind:"field",key:"_getStatistics",value(){return c(((t,i,e,s,a)=>{if(!t.length)return[{id:"",name:this.hass.localize("ui.components.statistic-picker.no_statistics")}];if(i){const e=r(i);t=t.filter((t=>e.includes(t.statistics_unit_of_measurement)))}if(e){const i=r(e);t=t.filter((t=>i.includes(t.unit_class)))}if(s){const i=r(s);t=t.filter((t=>{const e=this.hass.states[t.statistic_id];return!e||i.includes(e.attributes.device_class||"")}))}const d=[];return t.forEach((t=>{const i=this.hass.states[t.statistic_id];i?d.push({id:t.statistic_id,name:k(this.hass,t.statistic_id,t),state:i}):a||d.push({id:t.statistic_id,name:k(this.hass,t.statistic_id,t)})})),d.length?(d.length>1&&d.sort(((t,i)=>u(t.name||"",i.name||""))),d.push({id:"__missing",name:this.hass.localize("ui.components.statistic-picker.missing_entity")}),d):[{id:"",name:this.hass.localize("ui.components.statistic-picker.no_match")}]}))}},{kind:"method",key:"open",value:function(){var t;null===(t=this.comboBox)||void 0===t||t.open()}},{kind:"method",key:"focus",value:function(){var t;null===(t=this.comboBox)||void 0===t||t.focus()}},{kind:"method",key:"willUpdate",value:function(t){(!this.hasUpdated&&!this.statisticIds||t.has("statisticTypes"))&&this._getStatisticIds(),(!this._init&&this.statisticIds||t.has("_opened")&&this._opened)&&(this._init=!0,this.hasUpdated?this.comboBox.items=this._getStatistics(this.statisticIds,this.includeStatisticsUnitOfMeasurement,this.includeUnitClass,this.includeDeviceClass,this.entitiesOnly):this.updateComplete.then((()=>{this.comboBox.items=this._getStatistics(this.statisticIds,this.includeStatisticsUnitOfMeasurement,this.includeUnitClass,this.includeDeviceClass,this.entitiesOnly)})))}},{kind:"method",key:"render",value:function(){return d` - - `}},{kind:"method",key:"_getStatisticIds",value:async function(){var t,i;this.statisticIds=await(t=this.hass,i=this.statisticTypes,t.callWS({type:"recorder/list_statistic_ids",statistic_type:i}))}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_statisticChanged",value:function(t){t.stopPropagation();let i=t.detail.value;"__missing"===i&&(i=""),i!==this._value&&this._setValue(i)}},{kind:"method",key:"_openedChanged",value:function(t){this._opened=t.detail.value}},{kind:"method",key:"_setValue",value:function(t){this.value=t,setTimeout((()=>{n(this,"value-changed",{value:t}),n(this,"change")}),0)}}]}}),i),t([l("ha-statistics-picker")],(function(t,i){return{F:class extends i{constructor(...i){super(...i),t(this)}},d:[{kind:"field",decorators:[e({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[e({type:Array})],key:"value",value:void 0},{kind:"field",decorators:[e({type:Array})],key:"statisticIds",value:void 0},{kind:"field",decorators:[e({attribute:"statistic-types"})],key:"statisticTypes",value:void 0},{kind:"field",decorators:[e({attribute:"picked-statistic-label"})],key:"pickedStatisticLabel",value:void 0},{kind:"field",decorators:[e({attribute:"pick-statistic-label"})],key:"pickStatisticLabel",value:void 0},{kind:"field",decorators:[e({attribute:"include-statistics-unit-of-measurement"})],key:"includeStatisticsUnitOfMeasurement",value:void 0},{kind:"field",decorators:[e({attribute:"include-unit-class"})],key:"includeUnitClass",value:void 0},{kind:"field",decorators:[e({attribute:"include-device-class"})],key:"includeDeviceClass",value:void 0},{kind:"field",decorators:[e({type:Boolean,attribute:"ignore-restrictions-on-first-statistic"})],key:"ignoreRestrictionsOnFirstStatistic",value:()=>!1},{kind:"method",key:"render",value:function(){if(!this.hass)return d``;const t=this.ignoreRestrictionsOnFirstStatistic&&this._currentStatistics.length<=1,i=t?void 0:this.includeStatisticsUnitOfMeasurement,e=t?void 0:this.includeUnitClass,s=t?void 0:this.statisticTypes;return d` - ${this._currentStatistics.map((t=>d` -
    - -
    - `))} -
    - -
    - `}},{kind:"get",key:"_currentStatistics",value:function(){return this.value||[]}},{kind:"method",key:"_updateStatistics",value:async function(t){this.value=t,n(this,"value-changed",{value:t})}},{kind:"method",key:"_statisticChanged",value:function(t){t.stopPropagation();const i=t.currentTarget.curValue,e=t.detail.value;if(e===i)return;const s=this._currentStatistics;e&&!s.includes(e)?this._updateStatistics(s.map((t=>t===i?e:t))):this._updateStatistics(s.filter((t=>t!==i)))}},{kind:"method",key:"_addStatistic",value:async function(t){t.stopPropagation();const i=t.detail.value;if(!i)return;if(t.currentTarget.value="",!i)return;const e=this._currentStatistics;e.includes(i)||this._updateStatistics([...e,i])}},{kind:"get",static:!0,key:"styles",value:function(){return o` - :host { - width: 200px; - display: block; - } - ha-statistic-picker { - display: block; - width: 100%; - margin-top: 8px; - } - `}}]}}),i);let p=t([l("ha-selector-statistic")],(function(t,i){return{F:class extends i{constructor(...i){super(...i),t(this)}},d:[{kind:"field",decorators:[e()],key:"hass",value:void 0},{kind:"field",decorators:[e()],key:"selector",value:void 0},{kind:"field",decorators:[e()],key:"value",value:void 0},{kind:"field",decorators:[e()],key:"label",value:void 0},{kind:"field",decorators:[e()],key:"helper",value:void 0},{kind:"field",decorators:[e({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[e({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){return this.selector.statistic.multiple?d` - ${this.label?d``:""} - - `:d``}}]}}),i);export{p as HaStatisticSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.99a93bc6.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.99a93bc6.js.gz deleted file mode 100644 index bc73aff..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.99a93bc6.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.a47e7fac.js b/custom_components/hacs/hacs_frontend_experimental/c.a47e7fac.js deleted file mode 100644 index d6964c2..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.a47e7fac.js +++ /dev/null @@ -1,23 +0,0 @@ -import{_ as e,e as i,t,i as a,a7 as s,y as d,O as o,n as l,k as n,j as r}from"./main-c66a9a06.js";import{c}from"./c.d2f13ac1.js";import{b as h,s as u,d as v,f as _}from"./c.15496b0b.js";import{b as m,a as f}from"./c.4b0dc107.js";import{S as k}from"./c.baaad129.js";import"./c.bbadaeea.js";const p=e=>d` - ${e.name} -`;e([l("ha-area-picker")],(function(e,l){return{F:class extends l{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"helper",value:void 0},{kind:"field",decorators:[i()],key:"placeholder",value:void 0},{kind:"field",decorators:[i({type:Boolean,attribute:"no-add"})],key:"noAdd",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"exclude-domains"})],key:"excludeDomains",value:void 0},{kind:"field",decorators:[i({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",decorators:[i()],key:"deviceFilter",value:void 0},{kind:"field",decorators:[i()],key:"entityFilter",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"disabled",value:void 0},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:void 0},{kind:"field",decorators:[t()],key:"_areas",value:void 0},{kind:"field",decorators:[t()],key:"_devices",value:void 0},{kind:"field",decorators:[t()],key:"_entities",value:void 0},{kind:"field",decorators:[t()],key:"_opened",value:void 0},{kind:"field",decorators:[a("ha-combo-box",!0)],key:"comboBox",value:void 0},{kind:"field",key:"_filter",value:void 0},{kind:"field",key:"_init",value:()=>!1},{kind:"method",key:"hassSubscribe",value:function(){return[h(this.hass.connection,(e=>{this._areas=e})),u(this.hass.connection,(e=>{this._devices=e})),v(this.hass.connection,(e=>{this._entities=e}))]}},{kind:"method",key:"open",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.open())}},{kind:"method",key:"focus",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.focus())}},{kind:"field",key:"_getAreas",value(){return s(((e,i,t,a,s,d,o,l,n)=>{if(!e.length)return[{area_id:"no_areas",name:this.hass.localize("ui.components.area-picker.no_areas"),picture:null}];const r={};let h,u;if(a||s||d){for(const e of t)e.device_id&&(e.device_id in r||(r[e.device_id]=[]),r[e.device_id].push(e));h=i,u=t.filter((e=>e.area_id))}else o&&(h=i),l&&(u=t.filter((e=>e.area_id)));a&&(h=h.filter((e=>{const i=r[e.id];return!(!i||!i.length)&&r[e.id].some((e=>a.includes(c(e.entity_id))))})),u=u.filter((e=>a.includes(c(e.entity_id))))),s&&(h=h.filter((e=>{const i=r[e.id];return!i||!i.length||t.every((e=>!s.includes(c(e.entity_id))))})),u=u.filter((e=>!s.includes(c(e.entity_id))))),d&&(h=h.filter((e=>{const i=r[e.id];return!(!i||!i.length)&&r[e.id].some((e=>{const i=this.hass.states[e.entity_id];return!!i&&(i.attributes.device_class&&d.includes(i.attributes.device_class))}))})),u=u.filter((e=>{const i=this.hass.states[e.entity_id];return i.attributes.device_class&&d.includes(i.attributes.device_class)}))),o&&(h=h.filter((e=>o(e)))),l&&(u=u.filter((e=>l(e))));let v,_=e;var m;(h&&(v=h.filter((e=>e.area_id)).map((e=>e.area_id))),u)&&(v=(null!==(m=v)&&void 0!==m?m:[]).concat(u.filter((e=>e.area_id)).map((e=>e.area_id))));return v&&(_=e.filter((e=>v.includes(e.area_id)))),_.length||(_=[{area_id:"no_areas",name:this.hass.localize("ui.components.area-picker.no_match"),picture:null}]),n?_:[..._,{area_id:"add_new",name:this.hass.localize("ui.components.area-picker.add_new"),picture:null}]}))}},{kind:"method",key:"updated",value:function(e){(!this._init&&this._devices&&this._areas&&this._entities||this._init&&e.has("_opened")&&this._opened)&&(this._init=!0,this.comboBox.items=this._getAreas(this._areas,this._devices,this._entities,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.noAdd))}},{kind:"method",key:"render",value:function(){var e;return d` - - - `}},{kind:"field",key:"_area",value(){return s((e=>{var i;return null===(i=this._areas)||void 0===i?void 0:i.find((i=>i.area_id===e))}))}},{kind:"method",key:"_filterChanged",value:function(e){var i,t;(this._filter=e.detail.value,this._filter)?this.noAdd||0!==(null===(i=this.comboBox._comboBox.filteredItems)||void 0===i?void 0:i.length)?this.comboBox.filteredItems=null===(t=this.comboBox.items)||void 0===t?void 0:t.filter((e=>e.name.toLowerCase().includes(this._filter.toLowerCase()))):this.comboBox.filteredItems=[{area_id:"add_new_suggestion",name:this.hass.localize("ui.components.area-picker.add_new_sugestion",{name:this._filter}),picture:null}]:this.comboBox.filteredItems=this.comboBox.items}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_areaChanged",value:function(e){e.stopPropagation();let i=e.detail.value;"no_areas"===i&&(i=""),["add_new_suggestion","add_new"].includes(i)?(e.target.value=this._value,m(this,{title:this.hass.localize("ui.components.area-picker.add_dialog.title"),text:this.hass.localize("ui.components.area-picker.add_dialog.text"),confirmText:this.hass.localize("ui.components.area-picker.add_dialog.add"),inputLabel:this.hass.localize("ui.components.area-picker.add_dialog.name"),defaultValue:"add_new_suggestion"===i?this._filter:void 0,confirm:async e=>{if(e)try{const i=await _(this.hass,{name:e});this._areas=[...this._areas,i],this.comboBox.filteredItems=this._getAreas(this._areas,this._devices,this._entities,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.noAdd),await this.updateComplete,await this.comboBox.updateComplete,this._setValue(i.area_id)}catch(e){f(this,{title:this.hass.localize("ui.components.area-picker.add_dialog.failed_create_area"),text:e.message})}}})):i!==this._value&&this._setValue(i)}},{kind:"method",key:"_setValue",value:function(e){this.value=e,setTimeout((()=>{o(this,"value-changed",{value:e}),o(this,"change")}),0)}}]}}),k(r)); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.a47e7fac.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.a47e7fac.js.gz deleted file mode 100644 index 565d953..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.a47e7fac.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.a5550d10.js b/custom_components/hacs/hacs_frontend_experimental/c.a5550d10.js deleted file mode 100644 index 0416d2d..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.a5550d10.js +++ /dev/null @@ -1,343 +0,0 @@ -import{f as e,e as t,B as i,i as d,a5 as l,t as c,h as o,a6 as n,R as a,y as r,k as s,p as m,d as h,_ as p,n as f,x as u,z as x,M as b,I as g,J as _,L as v,A as y,ad as k,N as w,Z as E,D as I,E as C,G as A,q as L,ae as T}from"./main-c66a9a06.js";import{o as R}from"./c.8e28b461.js";import{L as O,s as F,n as z,a as S,K as V,C as D}from"./c.41d13611.js";var $,B;const M=null!==(B=null===($=window.ShadyDOM)||void 0===$?void 0:$.inUse)&&void 0!==B&&B;class N extends i{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=e=>{this.disabled||this.setFormData(e.formData)}}findFormElement(){if(!this.shadowRoot||M)return null;const e=this.getRootNode().querySelectorAll("form");for(const t of Array.from(e))if(t.contains(this))return t;return null}connectedCallback(){var e;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(e=this.containingForm)||void 0===e||e.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.containingForm)||void 0===e||e.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}}N.shadowRootOptions={mode:"open",delegatesFocus:!0},e([t({type:Boolean})],N.prototype,"disabled",void 0);class H extends N{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.name="",this.value="on",this.reducedTouchTarget=!1,this.animationClass="",this.shouldRenderRipple=!1,this.focused=!1,this.mdcFoundationClass=void 0,this.mdcFoundation=void 0,this.rippleElement=null,this.rippleHandlers=new a((()=>(this.shouldRenderRipple=!0,this.ripple.then((e=>this.rippleElement=e)),this.ripple)))}createAdapter(){return{}}update(e){const t=e.get("indeterminate"),i=e.get("checked"),d=e.get("disabled");if(void 0!==t||void 0!==i||void 0!==d){const e=this.calculateAnimationStateName(!!i,!!t,!!d),l=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${e}-${l}`}super.update(e)}calculateAnimationStateName(e,t,i){return i?"disabled":t?"indeterminate":e?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return r``}render(){const e=this.indeterminate||this.checked,t={"mdc-checkbox--disabled":this.disabled,"mdc-checkbox--selected":e,"mdc-checkbox--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-checkbox--anim-checked-indeterminate":"checked-indeterminate"==this.animationClass,"mdc-checkbox--anim-checked-unchecked":"checked-unchecked"==this.animationClass,"mdc-checkbox--anim-indeterminate-checked":"indeterminate-checked"==this.animationClass,"mdc-checkbox--anim-indeterminate-unchecked":"indeterminate-unchecked"==this.animationClass,"mdc-checkbox--anim-unchecked-checked":"unchecked-checked"==this.animationClass,"mdc-checkbox--anim-unchecked-indeterminate":"unchecked-indeterminate"==this.animationClass},i=this.indeterminate?"mixed":void 0;return r` -
    - -
    - - - -
    -
    - ${this.renderRipple()} -
    `}setFormData(e){this.name&&this.checked&&e.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var e;return(null===(e=this.rippleElement)||void 0===e?void 0:e.isActive)||!1}}e([d(".mdc-checkbox")],H.prototype,"mdcRoot",void 0),e([d("input")],H.prototype,"formElement",void 0),e([t({type:Boolean,reflect:!0})],H.prototype,"checked",void 0),e([t({type:Boolean})],H.prototype,"indeterminate",void 0),e([t({type:Boolean,reflect:!0})],H.prototype,"disabled",void 0),e([t({type:String,reflect:!0})],H.prototype,"name",void 0),e([t({type:String})],H.prototype,"value",void 0),e([l,t({type:String,attribute:"aria-label"})],H.prototype,"ariaLabel",void 0),e([l,t({type:String,attribute:"aria-labelledby"})],H.prototype,"ariaLabelledBy",void 0),e([l,t({type:String,attribute:"aria-describedby"})],H.prototype,"ariaDescribedBy",void 0),e([t({type:Boolean})],H.prototype,"reducedTouchTarget",void 0),e([c()],H.prototype,"animationClass",void 0),e([c()],H.prototype,"shouldRenderRipple",void 0),e([c()],H.prototype,"focused",void 0),e([o("mwc-ripple")],H.prototype,"ripple",void 0),e([n({passive:!0})],H.prototype,"handleRippleTouchStart",null);const P=h`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:GrayText;border-color:var(--mdc-checkbox-disabled-color, GrayText);background-color:transparent}.mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:GrayText;background-color:transparent;background-color:var(--mdc-checkbox-disabled-color, transparent)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:GrayText;color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:GrayText;border-color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`;p([f("ha-checkbox")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[P,h` - :host { - --mdc-theme-secondary: var(--primary-color); - } - `]}]}}),H);var U={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},Y={NOTCH_ELEMENT_PADDING:8},X={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},W=function(e){function t(i){return e.call(this,x(x({},t.defaultAdapter),i))||this}return u(t,e),Object.defineProperty(t,"strings",{get:function(){return U},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),t.prototype.notch=function(e){var i=t.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=Y.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(i)},t.prototype.closeNotch=function(){var e=t.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},t}(b);class q extends i{constructor(){super(...arguments),this.mdcFoundationClass=W,this.width=0,this.open=!1,this.lastOpen=this.open}createAdapter(){return{addClass:e=>this.mdcRoot.classList.add(e),removeClass:e=>this.mdcRoot.classList.remove(e),setNotchWidthProperty:e=>this.notchElement.style.setProperty("width",`${e}px`),removeNotchWidthProperty:()=>this.notchElement.style.removeProperty("width")}}openOrClose(e,t){this.mdcFoundation&&(e&&void 0!==t?this.mdcFoundation.notch(t):this.mdcFoundation.closeNotch())}render(){this.openOrClose(this.open,this.width);const e=s({"mdc-notched-outline--notched":this.open});return r` - - - - - - - `}}e([d(".mdc-notched-outline")],q.prototype,"mdcRoot",void 0),e([t({type:Number})],q.prototype,"width",void 0),e([t({type:Boolean,reflect:!0})],q.prototype,"open",void 0),e([d(".mdc-notched-outline__notch")],q.prototype,"notchElement",void 0);const G=h`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`;let j=class extends q{};j.styles=[G],j=e([f("mwc-notched-outline")],j);var K={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Q=function(e){function t(i){var d=e.call(this,x(x({},t.defaultAdapter),i))||this;return d.shakeAnimationEndHandler=function(){d.handleShakeAnimationEnd()},d}return u(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return K},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var i=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.float=function(e){var i=t.cssClasses,d=i.LABEL_FLOAT_ABOVE,l=i.LABEL_SHAKE;e?this.adapter.addClass(d):(this.adapter.removeClass(d),this.adapter.removeClass(l))},t.prototype.setRequired=function(e){var i=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.handleShakeAnimationEnd=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(b);const J=g(class extends _{constructor(e){switch(super(e),this.foundation=null,this.previousPart=null,e.type){case v.ATTRIBUTE:case v.PROPERTY:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(e,[t]){if(e!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-floating-label");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),getWidth:()=>e.scrollWidth,registerInteractionHandler:(t,i)=>{e.addEventListener(t,i)},deregisterInteractionHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new Q(i),this.foundation.init()}return this.render(t)}render(e){return this.foundation}});var Z={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},ee=function(e){function t(i){var d=e.call(this,x(x({},t.defaultAdapter),i))||this;return d.transitionEndHandler=function(e){d.handleTransitionEnd(e)},d}return u(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Z},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},t.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},t.prototype.activate=function(){this.adapter.removeClass(Z.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Z.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(Z.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(Z.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(Z.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Z.LINE_RIPPLE_DEACTIVATING))},t}(b);const te=g(class extends _{constructor(e){switch(super(e),this.previousPart=null,this.foundation=null,e.type){case v.ATTRIBUTE:case v.PROPERTY:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(e,t){if(this.previousPart!==e){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-line-ripple");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),hasClass:t=>e.classList.contains(t),setStyle:(t,i)=>e.style.setProperty(t,i),registerEventHandler:(t,i)=>{e.addEventListener(t,i)},deregisterEventHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new ee(i),this.foundation.init()}return this.render()}render(){return this.foundation}});var ie={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},de={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},le={LABEL_SCALE:.75},ce=["pattern","min","max","required","step","minlength","maxlength"],oe=["color","date","datetime-local","month","range","time","week"],ne=["mousedown","touchstart"],ae=["click","keydown"],re=function(e){function t(i,d){void 0===d&&(d={});var l=e.call(this,x(x({},t.defaultAdapter),i))||this;return l.isFocused=!1,l.receivedUserInput=!1,l.valid=!0,l.useNativeValidation=!0,l.validateOnValueChange=!0,l.helperText=d.helperText,l.characterCounter=d.characterCounter,l.leadingIcon=d.leadingIcon,l.trailingIcon=d.trailingIcon,l.inputFocusHandler=function(){l.activateFocus()},l.inputBlurHandler=function(){l.deactivateFocus()},l.inputInputHandler=function(){l.handleInput()},l.setPointerXOffset=function(e){l.setTransformOrigin(e)},l.textFieldInteractionHandler=function(){l.handleTextFieldInteraction()},l.validationAttributeChangeHandler=function(e){l.handleValidationAttributeChange(e)},l}return u(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return de},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ie},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return le},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat",{get:function(){var e=this.getNativeInput().type;return oe.indexOf(e)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e,t,i,d;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var l=y(ne),c=l.next();!c.done;c=l.next()){var o=c.value;this.adapter.registerInputInteractionHandler(o,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}try{for(var n=y(ae),a=n.next();!a.done;a=n.next()){o=a.value;this.adapter.registerTextFieldInteractionHandler(o,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(d=n.return)&&d.call(n)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},t.prototype.destroy=function(){var e,t,i,d;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var l=y(ne),c=l.next();!c.done;c=l.next()){var o=c.value;this.adapter.deregisterInputInteractionHandler(o,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}try{for(var n=y(ae),a=n.next();!a.done;a=n.next()){o=a.value;this.adapter.deregisterTextFieldInteractionHandler(o,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(d=n.return)&&d.call(n)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},t.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput=!0)},t.prototype.handleValidationAttributeChange=function(e){var t=this;e.some((function(e){return ce.indexOf(e)>-1&&(t.styleValidity(!0),t.adapter.setLabelRequired(t.getNativeInput().required),!0)})),e.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*le.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},t.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},t.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,i=t?t[0]:e,d=i.target.getBoundingClientRect(),l=i.clientX-d.left;this.adapter.setLineRippleTransformOrigin(l)}},t.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},t.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},t.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity(e),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},t.prototype.getValue=function(){return this.getNativeInput().value},t.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput().value=e),this.setcharacterCounter(e.length),this.validateOnValueChange){var t=this.isValid();this.styleValidity(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},t.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},t.prototype.setValid=function(e){this.valid=e,this.styleValidity(e);var t=!e&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},t.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange=e},t.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},t.prototype.setUseNativeValidation=function(e){this.useNativeValidation=e},t.prototype.isDisabled=function(){return this.getNativeInput().disabled},t.prototype.setDisabled=function(e){this.getNativeInput().disabled=e,this.styleDisabled(e)},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon&&this.trailingIcon.setAriaLabel(e)},t.prototype.setTrailingIconContent=function(e){this.trailingIcon&&this.trailingIcon.setContent(e)},t.prototype.setcharacterCounter=function(e){if(this.characterCounter){var t=this.getNativeInput().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(e,t)}},t.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},t.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},t.prototype.styleValidity=function(e){var i=t.cssClasses.INVALID;if(e?this.adapter.removeClass(i):this.adapter.addClass(i),this.helperText){if(this.helperText.setValidity(e),!this.helperText.isValidation())return;var d=this.helperText.isVisible(),l=this.helperText.getId();d&&l?this.adapter.setInputAttr(ie.ARIA_DESCRIBEDBY,l):this.adapter.removeInputAttr(ie.ARIA_DESCRIBEDBY)}},t.prototype.styleFocused=function(e){var i=t.cssClasses.FOCUSED;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.styleDisabled=function(e){var i=t.cssClasses,d=i.DISABLED,l=i.INVALID;e?(this.adapter.addClass(d),this.adapter.removeClass(l)):this.adapter.removeClass(d),this.leadingIcon&&this.leadingIcon.setDisabled(e),this.trailingIcon&&this.trailingIcon.setDisabled(e)},t.prototype.styleFloating=function(e){var i=t.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},t}(b),se=re;const{I:me}=k,he=e=>null===e||"object"!=typeof e&&"function"!=typeof e,pe=(e,t)=>void 0===t?void 0!==(null==e?void 0:e._$litType$):(null==e?void 0:e._$litType$)===t,fe=e=>void 0===e.strings,ue=()=>document.createComment(""),xe=(e,t,i)=>{var d;const l=e._$AA.parentNode,c=void 0===t?e._$AB:t._$AA;if(void 0===i){const t=l.insertBefore(ue(),c),d=l.insertBefore(ue(),c);i=new me(t,d,e,e.options)}else{const t=i._$AB.nextSibling,o=i._$AM,n=o!==e;if(n){let t;null===(d=i._$AQ)||void 0===d||d.call(i,e),i._$AM=e,void 0!==i._$AP&&(t=e._$AU)!==o._$AU&&i._$AP(t)}if(t!==c||n){let e=i._$AA;for(;e!==t;){const t=e.nextSibling;l.insertBefore(e,c),e=t}}}return i},be=(e,t,i=e)=>(e._$AI(t,i),e),ge={},_e=(e,t=ge)=>e._$AH=t,ve=e=>e._$AH,ye=e=>{var t;null===(t=e._$AP)||void 0===t||t.call(e,!1,!0);let i=e._$AA;const d=e._$AB.nextSibling;for(;i!==d;){const e=i.nextSibling;i.remove(),i=e}},ke=e=>{e._$AR()},we=g(class extends _{constructor(e){if(super(e),e.type!==v.PROPERTY&&e.type!==v.ATTRIBUTE&&e.type!==v.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!fe(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===w||t===E)return t;const i=e.element,d=e.name;if(e.type===v.PROPERTY){if(t===i[d])return w}else if(e.type===v.BOOLEAN_ATTRIBUTE){if(!!t===i.hasAttribute(d))return w}else if(e.type===v.ATTRIBUTE&&i.getAttribute(d)===t+"")return w;return _e(e),t}}),Ee=["touchstart","touchmove","scroll","mousewheel"],Ie=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class Ce extends N{constructor(){super(...arguments),this.mdcFoundationClass=se,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=Ie(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const e=new CustomEvent("focus");this.formElement.dispatchEvent(e),this.formElement.focus()}blur(){const e=new CustomEvent("blur");this.formElement.dispatchEvent(e),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(e,t,i){this.formElement.setSelectionRange(e,t,i)}update(e){e.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),e.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(e)}setFormData(e){this.name&&e.append(this.name,this.value)}render(){const e=this.charCounter&&-1!==this.maxLength,t=!!this.helper||!!this.validationMessage||e,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return r` - - ${this.renderHelperText(t,e)} - `}updated(e){e.has("value")&&void 0!==e.get("value")&&(this.mdcFoundation.setValue(this.value),this.autoValidate&&this.reportValidity())}renderRipple(){return this.outlined?"":r` - - `}renderOutline(){return this.outlined?r` - - ${this.renderLabel()} - `:""}renderLabel(){return this.label?r` - ${this.label} - `:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(e,t=!1){return r`${e}`}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(e,t=!1){return r` - ${e}`}renderInput(e){const t=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,d=this.autocapitalize?this.autocapitalize:void 0,l=this.validationMessage&&!this.isUiValid,c=this.label?"label":void 0,o=e?"helper-text":void 0,n=this.focused||this.helperPersistent||l?"helper-text":void 0;return r` - `}renderLineRipple(){return this.outlined?"":r` - - `}renderHelperText(e,t){const i=this.validationMessage&&!this.isUiValid,d={"mdc-text-field-helper-text--persistent":this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},l=this.focused||this.helperPersistent||i?void 0:"true",c=i?this.validationMessage:this.helper;return e?r` -
    -
    ${c}
    - ${this.renderCharCounter(t)} -
    `:""}renderCharCounter(e){const t=Math.min(this.value.length,this.maxLength);return e?r` - ${t} / ${this.maxLength}`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.mdcFoundation.setValid(e),this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=Ie(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(e,t)=>this.addEventListener(e,t),deregisterTextFieldInteractionHandler:(e,t)=>this.removeEventListener(e,t),registerValidationAttributeChangeHandler:e=>{const t=new MutationObserver((t=>{e((e=>e.map((e=>e.attributeName)).filter((e=>e)))(t))}));return t.observe(this.formElement,{attributes:!0}),t},deregisterValidationAttributeChangeHandler:e=>e.disconnect()},I(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(e,t)=>this.formElement.addEventListener(e,t,{passive:e in Ee}),deregisterInputInteractionHandler:(e,t)=>this.formElement.removeEventListener(e,t)}}getLabelAdapterMethods(){return{floatLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(e),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(e),setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:e=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}}}async getUpdateComplete(){var e;const t=await super.getUpdateComplete();return await(null===(e=this.outlineElement)||void 0===e?void 0:e.updateComplete),t}firstUpdated(){var e;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(e=this.outlineElement)||void 0===e||e.updateComplete.then((()=>{var e;this.outlineWidth=(null===(e=this.labelElement)||void 0===e?void 0:e.floatingLabelFoundation.getWidth())||0}))}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const e=this.labelElement;if(!e)return void(this.outlineOpen=!1);const t=!!this.label&&!!this.value;if(e.floatingLabelFoundation.float(t),!this.outlined)return;this.outlineOpen=t,await this.updateComplete;const i=e.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}e([d(".mdc-text-field")],Ce.prototype,"mdcRoot",void 0),e([d("input")],Ce.prototype,"formElement",void 0),e([d(".mdc-floating-label")],Ce.prototype,"labelElement",void 0),e([d(".mdc-line-ripple")],Ce.prototype,"lineRippleElement",void 0),e([d("mwc-notched-outline")],Ce.prototype,"outlineElement",void 0),e([d(".mdc-notched-outline__notch")],Ce.prototype,"notchElement",void 0),e([t({type:String})],Ce.prototype,"value",void 0),e([t({type:String})],Ce.prototype,"type",void 0),e([t({type:String})],Ce.prototype,"placeholder",void 0),e([t({type:String}),R((function(e,t){void 0!==t&&this.label!==t&&this.layout()}))],Ce.prototype,"label",void 0),e([t({type:String})],Ce.prototype,"icon",void 0),e([t({type:String})],Ce.prototype,"iconTrailing",void 0),e([t({type:Boolean,reflect:!0})],Ce.prototype,"disabled",void 0),e([t({type:Boolean})],Ce.prototype,"required",void 0),e([t({type:Number})],Ce.prototype,"minLength",void 0),e([t({type:Number})],Ce.prototype,"maxLength",void 0),e([t({type:Boolean,reflect:!0}),R((function(e,t){void 0!==t&&this.outlined!==t&&this.layout()}))],Ce.prototype,"outlined",void 0),e([t({type:String})],Ce.prototype,"helper",void 0),e([t({type:Boolean})],Ce.prototype,"validateOnInitialRender",void 0),e([t({type:String})],Ce.prototype,"validationMessage",void 0),e([t({type:Boolean})],Ce.prototype,"autoValidate",void 0),e([t({type:String})],Ce.prototype,"pattern",void 0),e([t({type:String})],Ce.prototype,"min",void 0),e([t({type:String})],Ce.prototype,"max",void 0),e([t({type:String})],Ce.prototype,"step",void 0),e([t({type:Number})],Ce.prototype,"size",void 0),e([t({type:Boolean})],Ce.prototype,"helperPersistent",void 0),e([t({type:Boolean})],Ce.prototype,"charCounter",void 0),e([t({type:Boolean})],Ce.prototype,"endAligned",void 0),e([t({type:String})],Ce.prototype,"prefix",void 0),e([t({type:String})],Ce.prototype,"suffix",void 0),e([t({type:String})],Ce.prototype,"name",void 0),e([t({type:String})],Ce.prototype,"inputMode",void 0),e([t({type:Boolean})],Ce.prototype,"readOnly",void 0),e([t({type:String})],Ce.prototype,"autocapitalize",void 0),e([c()],Ce.prototype,"outlineOpen",void 0),e([c()],Ce.prototype,"outlineWidth",void 0),e([c()],Ce.prototype,"isUiValid",void 0),e([c()],Ce.prototype,"focused",void 0),e([n({passive:!0})],Ce.prototype,"handleInputChange",null);const Ae=h`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{content:none}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;p([f("ha-textfield")],(function(e,i){class d extends i{constructor(...t){super(...t),e(this)}}return{F:d,d:[{kind:"field",decorators:[t({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[t({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"icon",value:void 0},{kind:"field",decorators:[t({type:Boolean})],key:"iconTrailing",value:void 0},{kind:"field",decorators:[t()],key:"autocomplete",value:void 0},{kind:"method",key:"updated",value:function(e){C(A(d.prototype),"updated",this).call(this,e),(e.has("invalid")&&(this.invalid||void 0!==e.get("invalid"))||e.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||"Invalid":""),this.reportValidity()),e.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete"))}},{kind:"method",key:"renderIcon",value:function(e,t=!1){const i=t?"trailing":"leading";return r` - - - - `}},{kind:"field",static:!0,key:"styles",value:()=>[Ae,h` - .mdc-text-field__input { - width: var(--ha-textfield-input-width, 100%); - } - .mdc-text-field:not(.mdc-text-field--with-leading-icon) { - padding: var(--text-field-padding, 0px 16px); - } - .mdc-text-field__affix--suffix { - padding-left: var(--text-field-suffix-padding-left, 12px); - padding-right: var(--text-field-suffix-padding-right, 0px); - padding-inline-start: var(--text-field-suffix-padding-left, 12px); - padding-inline-end: var(--text-field-suffix-padding-right, 0px); - direction: var(--direction); - } - .mdc-text-field--with-leading-icon { - padding-inline-start: var(--text-field-suffix-padding-left, 0px); - padding-inline-end: var(--text-field-suffix-padding-right, 16px); - direction: var(--direction); - } - - .mdc-text-field:not(.mdc-text-field--disabled) - .mdc-text-field__affix--suffix { - color: var(--secondary-text-color); - } - - .mdc-text-field__icon { - color: var(--secondary-text-color); - } - - .mdc-text-field__icon--leading { - margin-inline-start: 16px; - margin-inline-end: 8px; - direction: var(--direction); - } - - .mdc-floating-label:not(.mdc-floating-label--float-above) { - text-overflow: ellipsis; - width: inherit; - padding-right: 30px; - padding-inline-end: 30px; - padding-inline-start: initial; - box-sizing: border-box; - direction: var(--direction); - } - - input { - text-align: var(--text-field-text-align, start); - } - - /* Chrome, Safari, Edge, Opera */ - :host([no-spinner]) input::-webkit-outer-spin-button, - :host([no-spinner]) input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; - } - - /* Firefox */ - :host([no-spinner]) input[type="number"] { - -moz-appearance: textfield; - } - - .mdc-text-field__ripple { - overflow: hidden; - } - - .mdc-text-field { - overflow: var(--text-field-overflow); - } - - .mdc-floating-label { - inset-inline-start: 16px !important; - inset-inline-end: initial !important; - transform-origin: var(--float-start); - direction: var(--direction); - text-align: var(--float-start); - } - - .mdc-text-field--with-leading-icon.mdc-text-field--filled - .mdc-floating-label { - max-width: calc(100% - 48px); - inset-inline-start: 48px !important; - inset-inline-end: initial !important; - direction: var(--direction); - } - - .mdc-text-field__input[type="number"] { - direction: var(--direction); - } - `,"rtl"===document.dir?h` - .mdc-text-field__affix--suffix, - .mdc-text-field--with-leading-icon, - .mdc-text-field__icon--leading, - .mdc-floating-label, - .mdc-text-field--with-leading-icon.mdc-text-field--filled - .mdc-floating-label, - .mdc-text-field__input[type="number"] { - direction: rtl; - } - `:h``]}]}}),Ce);let Le=class extends H{};Le.styles=[P],Le=e([f("mwc-checkbox")],Le);class Te extends O{constructor(){super(...arguments),this.left=!1,this.graphic="control"}render(){const e={"mdc-deprecated-list-item__graphic":this.left,"mdc-deprecated-list-item__meta":!this.left},t=this.renderText(),i=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():r``,d=this.hasMeta&&this.left?this.renderMeta():r``,l=this.renderRipple();return r` - ${l} - ${i} - ${this.left?"":t} - - - - - ${this.left?t:""} - ${d}`}async onChange(e){const t=e.target;this.selected===t.checked||(this._skipPropRequest=!0,this.selected=t.checked,await this.updateComplete,this._skipPropRequest=!1)}}e([d("slot")],Te.prototype,"slotElement",void 0),e([d("mwc-checkbox")],Te.prototype,"checkboxElement",void 0),e([t({type:Boolean})],Te.prototype,"left",void 0),e([t({type:String,reflect:!0})],Te.prototype,"graphic",void 0);const Re=h`:host(:not([twoline])){height:56px}:host(:not([left])) .mdc-deprecated-list-item__meta{height:40px;width:40px}`;p([f("ha-check-list-item")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[F,Re,h` - :host { - --mdc-theme-secondary: var(--primary-color); - } - `]}]}}),Te);const Oe=e=>e.stopPropagation();var Fe=["input","button","textarea","select"],ze=function(e){var t=e.target;if(t){var i=(""+t.tagName).toLowerCase();-1===Fe.indexOf(i)&&e.preventDefault()}};function Se(e,t){for(var i=new Map,d=0;dt&&!i(c[n].index)){a=n;break}if(-1!==a)return d.sortedIndexCursor=a,c[d.sortedIndexCursor].index;return-1}(c,o,a,t):function(e,t,i){var d=i.typeaheadBuffer[0],l=e.get(d);if(!l)return-1;var c=l[i.sortedIndexCursor];if(0===c.text.lastIndexOf(i.typeaheadBuffer,0)&&!t(c.index))return c.index;var o=(i.sortedIndexCursor+1)%l.length,n=-1;for(;o!==i.sortedIndexCursor;){var a=l[o],r=0===a.text.lastIndexOf(i.typeaheadBuffer,0),s=!t(a.index);if(r&&s){n=o;break}o=(o+1)%l.length}if(-1!==n)return i.sortedIndexCursor=n,l[i.sortedIndexCursor].index;return-1}(c,a,t),-1===i||n||l(i),i}function De(e){return e.typeaheadBuffer.length>0}var $e={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},Be={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},Me={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},Ne=function(e){function t(i,d){void 0===d&&(d={});var l=e.call(this,x(x({},t.defaultAdapter),i))||this;return l.disabled=!1,l.isMenuOpen=!1,l.useDefaultValidation=!0,l.customValidity=!0,l.lastSelectedIndex=Me.UNSET_INDEX,l.clickDebounceTimeout=0,l.recentlyClicked=!1,l.leadingIcon=d.leadingIcon,l.helperText=d.helperText,l}return u(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return $e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Me},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Be},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),t.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},t.prototype.setSelectedIndex=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1),e>=this.adapter.getMenuItemCount()||(e===Me.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),i||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},t.prototype.setValue=function(e,t){void 0===t&&(t=!1);var i=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(i,!1,t)},t.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==Me.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass($e.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass($e.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},t.prototype.openMenu=function(){this.adapter.addClass($e.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass($e.FOCUSED),i=e||t,d=this.adapter.hasClass($e.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(d)}},t.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},t.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex(),t=e>=0?e:0;this.adapter.focusMenuItemAtIndex(t)}},t.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},t.prototype.handleMenuClosed=function(){this.adapter.removeClass($e.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},t.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass($e.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass($e.FOCUSED),this.layout(),this.adapter.activateBottomLine()},t.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},t.prototype.handleClick=function(e){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(e),this.openMenu()))},t.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass($e.FOCUSED)){var t=S(e)===V.ENTER,i=S(e)===V.SPACEBAR,d=S(e)===V.ARROW_UP,l=S(e)===V.ARROW_DOWN;if(!(e.ctrlKey||e.metaKey)&&(!i&&e.key&&1===e.key.length||i&&this.adapter.isTypeaheadInProgress())){var c=i?" ":e.key,o=this.adapter.typeaheadMatchItem(c,this.getSelectedIndex());return o>=0&&this.setSelectedIndex(o),void e.preventDefault()}(t||i||d||l)&&(d&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):l&&this.getSelectedIndex(){const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class Pe extends N{constructor(){super(...arguments),this.mdcFoundationClass=Ne,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=He()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const e=this.menuElement;return e?e.selected:null}get index(){const e=this.menuElement;return e?e.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const e={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},t={"mdc-select__menu--invalid":!this.isUiValid},i=this.label?"label":void 0,d=this.shouldRenderHelperText?"helper-text":void 0;return r` -
    - - -
    - ${this.renderRipple()} - ${this.outlined?this.renderOutline():this.renderLabel()} - ${this.renderLeadingIcon()} - - ${this.selectedText} - - - - - - - - - - ${this.renderLineRipple()} -
    - - - -
    - ${this.renderHelperText()}`}renderRipple(){return this.outlined?E:r` - - `}renderOutline(){return this.outlined?r` - - ${this.renderLabel()} - `:E}renderLabel(){return this.label?r` - ${this.label} - `:E}renderLeadingIcon(){return this.icon?r`
    ${this.icon}
    `:E}renderLineRipple(){return this.outlined?E:r` - - `}renderHelperText(){if(!this.shouldRenderHelperText)return E;const e=this.validationMessage&&!this.isUiValid;return r` -

    ${e?this.validationMessage:this.helper}

    `}createAdapter(){return Object.assign(Object.assign({},I(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(e)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)},hasOutline:()=>this.outlined,notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:e=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}},notifyChange:async e=>{if(!this.valueSetDirectly&&e===this.value)return;this.valueSetDirectly=!1,this.value=e,await this.updateComplete;const t=new Event("change",{bubbles:!0});this.dispatchEvent(t)},setSelectedText:e=>this.selectedText=e,isSelectAnchorFocused:()=>{const e=this.anchorElement;if(!e)return!1;return e.getRootNode().activeElement===e},getSelectAnchorAttr:e=>{const t=this.anchorElement;return t?t.getAttribute(e):null},setSelectAnchorAttr:(e,t)=>{const i=this.anchorElement;i&&i.setAttribute(e,t)},removeSelectAnchorAttr:e=>{const t=this.anchorElement;t&&t.removeAttribute(e)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const e=this.menuElement;e&&(e.corner="BOTTOM_START")},setMenuWrapFocus:e=>{const t=this.menuElement;t&&(t.wrapFocus=e)},focusMenuItemAtIndex:e=>{const t=this.menuElement;if(!t)return;const i=t.items[e];i&&i.focus()},getMenuItemCount:()=>{const e=this.menuElement;return e?e.items.length:0},getMenuItemValues:()=>{const e=this.menuElement;if(!e)return[];return e.items.map((e=>e.value))},getMenuItemTextAtIndex:e=>{const t=this.menuElement;if(!t)return"";const i=t.items[e];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>De(this.typeaheadState),typeaheadMatchItem:(e,t)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t||this.menuElement.getFocusedItemIndex(),nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:e=>this.items[e].disabled},d=Ve(i,this.typeaheadState);return-1!==d&&this.select(d),d}})}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=He(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t)}return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const e=this.menuElement;if(e&&(this._menuUpdateComplete=e.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise((e=>requestAnimationFrame(e))),await this.layout());const e=this.items.length&&""===this.items[0].value;if(!this.value&&e)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=Se(this.items.length,(e=>this.items[e].text))}onItemsUpdated(){this.sortedIndexByFirstChar=Se(this.items.length,(e=>this.items[e].text))}select(e){const t=this.menuElement;t&&t.select(e)}selectByValue(e){let t=-1;for(let i=0;i0,l=i&&this.index{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:e=>this.items[e].disabled},this.typeaheadState)}async onSelected(e){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(e.detail.index);const t=this.items[e.detail.index];t&&(this.value=t.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(e){this.name&&null!==this.selected&&e.append(this.name,this.value)}async layout(e=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const t=this.menuElement;t&&t.layout(e);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const d=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(d),!this.outlined)return;this.outlineOpen=d,await this.updateComplete;const l=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=l)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}e([d(".mdc-select")],Pe.prototype,"mdcRoot",void 0),e([d(".formElement")],Pe.prototype,"formElement",void 0),e([d("slot")],Pe.prototype,"slotElement",void 0),e([d("select")],Pe.prototype,"nativeSelectElement",void 0),e([d("input")],Pe.prototype,"nativeInputElement",void 0),e([d(".mdc-line-ripple")],Pe.prototype,"lineRippleElement",void 0),e([d(".mdc-floating-label")],Pe.prototype,"labelElement",void 0),e([d("mwc-notched-outline")],Pe.prototype,"outlineElement",void 0),e([d(".mdc-menu")],Pe.prototype,"menuElement",void 0),e([d(".mdc-select__anchor")],Pe.prototype,"anchorElement",void 0),e([t({type:Boolean,attribute:"disabled",reflect:!0}),R((function(e){this.mdcFoundation&&this.mdcFoundation.setDisabled(e)}))],Pe.prototype,"disabled",void 0),e([t({type:Boolean}),R((function(e,t){void 0!==t&&this.outlined!==t&&this.layout(!1)}))],Pe.prototype,"outlined",void 0),e([t({type:String}),R((function(e,t){void 0!==t&&this.label!==t&&this.layout(!1)}))],Pe.prototype,"label",void 0),e([c()],Pe.prototype,"outlineOpen",void 0),e([c()],Pe.prototype,"outlineWidth",void 0),e([t({type:String}),R((function(e){if(this.mdcFoundation){const t=null===this.selected&&!!e,i=this.selected&&this.selected.value!==e;(t||i)&&this.selectByValue(e),this.reportValidity()}}))],Pe.prototype,"value",void 0),e([t()],Pe.prototype,"name",void 0),e([c()],Pe.prototype,"selectedText",void 0),e([t({type:String})],Pe.prototype,"icon",void 0),e([c()],Pe.prototype,"menuOpen",void 0),e([t({type:String})],Pe.prototype,"helper",void 0),e([t({type:Boolean})],Pe.prototype,"validateOnInitialRender",void 0),e([t({type:String})],Pe.prototype,"validationMessage",void 0),e([t({type:Boolean})],Pe.prototype,"required",void 0),e([t({type:Boolean})],Pe.prototype,"naturalMenuWidth",void 0),e([c()],Pe.prototype,"isUiValid",void 0),e([t({type:Boolean})],Pe.prototype,"fixedMenuPosition",void 0),e([n({capture:!0})],Pe.prototype,"handleTypeahead",null);const Ue=h`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`,Ye=(e,t,i=!1)=>{let d;const l=(...l)=>{const c=i&&!d;clearTimeout(d),d=window.setTimeout((()=>{d=void 0,i||e(...l)}),t),c&&e(...l)};return l.cancel=()=>{clearTimeout(d)},l};p([f("ha-select")],(function(e,i){class d extends i{constructor(...t){super(...t),e(this)}}return{F:d,d:[{kind:"field",decorators:[t({type:Boolean})],key:"icon",value:void 0},{kind:"method",key:"renderLeadingIcon",value:function(){return this.icon?r``:E}},{kind:"method",key:"connectedCallback",value:function(){C(A(d.prototype),"connectedCallback",this).call(this),window.addEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"disconnectedCallback",value:function(){C(A(d.prototype),"disconnectedCallback",this).call(this),window.removeEventListener("translations-updated",this._translationsUpdated)}},{kind:"field",key:"_translationsUpdated",value(){return Ye((async()=>{await T(),this.layoutOptions()}),500)}},{kind:"field",static:!0,key:"styles",value:()=>[Ue,h` - .mdc-select:not(.mdc-select--disabled) .mdc-select__icon { - color: var(--secondary-text-color); - } - .mdc-select__anchor { - width: var(--ha-select-min-width, 200px); - } - .mdc-select--filled .mdc-floating-label { - inset-inline-start: 12px; - inset-inline-end: initial; - direction: var(--direction); - } - .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label { - inset-inline-start: 48px; - inset-inline-end: initial; - direction: var(--direction); - } - .mdc-select .mdc-select__anchor { - padding-inline-start: 12px; - padding-inline-end: 0px; - direction: var(--direction); - } - .mdc-select__anchor .mdc-floating-label--float-above { - transform-origin: var(--float-start); - } - `]}]}}),Pe);export{N as F,Ce as T,_e as a,Ae as b,ke as c,Ye as d,fe as e,we as l,ve as m,pe as n,ye as p,xe as r,Oe as s,he as t,be as u}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.a5550d10.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.a5550d10.js.gz deleted file mode 100644 index fb5fcdd..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.a5550d10.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.a6328fdc.js b/custom_components/hacs/hacs_frontend_experimental/c.a6328fdc.js deleted file mode 100644 index 8d2c298..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.a6328fdc.js +++ /dev/null @@ -1,57 +0,0 @@ -import{f as t,i as e,e as i,y as a,k as s,p as l,d as o,_ as r,E as d,G as n,n as h}from"./main-c66a9a06.js";import{T as p,l as u,b as c}from"./c.a5550d10.js";const m={fromAttribute:t=>null!==t&&(""===t||t),toAttribute:t=>"boolean"==typeof t?t?"":null:t};class x extends p{constructor(){super(...arguments),this.rows=2,this.cols=20,this.charCounter=!1}render(){const t=this.charCounter&&-1!==this.maxLength,e=t&&"internal"===this.charCounter,i=t&&!e,l=!!this.helper||!!this.validationMessage||i,o={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--end-aligned":this.endAligned,"mdc-text-field--with-internal-counter":e};return a` - - ${this.renderHelperText(l,i)} - `}renderInput(){const t=this.label?"label":void 0,e=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,s=this.autocapitalize?this.autocapitalize:void 0;return a` - `}}t([e("textarea")],x.prototype,"formElement",void 0),t([i({type:Number})],x.prototype,"rows",void 0),t([i({type:Number})],x.prototype,"cols",void 0),t([i({converter:m})],x.prototype,"charCounter",void 0);const g=o`.mdc-text-field{height:100%}.mdc-text-field__input{resize:none}`;r([h("ha-textarea")],(function(t,e){class a extends e{constructor(...e){super(...e),t(this)}}return{F:a,d:[{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"autogrow",value:()=>!1},{kind:"method",key:"updated",value:function(t){d(n(a.prototype),"updated",this).call(this,t),this.autogrow&&t.has("value")&&(this.mdcRoot.dataset.value=this.value+'=​"')}},{kind:"field",static:!0,key:"styles",value:()=>[c,g,o` - :host([autogrow]) .mdc-text-field { - position: relative; - min-height: 74px; - min-width: 178px; - max-height: 200px; - } - :host([autogrow]) .mdc-text-field:after { - content: attr(data-value); - margin-top: 23px; - margin-bottom: 9px; - line-height: 1.5rem; - min-height: 42px; - padding: 0px 32px 0 16px; - letter-spacing: var( - --mdc-typography-subtitle1-letter-spacing, - 0.009375em - ); - visibility: hidden; - white-space: pre-wrap; - } - :host([autogrow]) .mdc-text-field__input { - position: absolute; - height: calc(100% - 32px); - } - :host([autogrow]) .mdc-text-field.mdc-text-field--no-label:after { - margin-top: 16px; - margin-bottom: 16px; - } - `]}]}}),x); diff --git a/custom_components/hacs/hacs_frontend_experimental/c.a6328fdc.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.a6328fdc.js.gz deleted file mode 100644 index fc7ff16..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.a6328fdc.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.ab66da21.js b/custom_components/hacs/hacs_frontend_experimental/c.ab66da21.js deleted file mode 100644 index 5542dc0..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.ab66da21.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,u as t}from"./c.743a15a1.js";import{x as a,eK as r}from"./main-c66a9a06.js";import{i as n,a as i,b as o}from"./c.3acef177.js";import"./c.2610e8cd.js";import"./c.a0946910.js";function u(e){return Intl.getCanonicalLocales(e)}function l(e){if("symbol"==typeof e)throw TypeError("Cannot convert a Symbol value to a string");return String(e)}function s(e){if(void 0===e)return NaN;if(null===e)return 0;if("boolean"==typeof e)return e?1:0;if("number"==typeof e)return e;if("symbol"==typeof e||"bigint"==typeof e)throw new TypeError("Cannot convert symbol/bigint to number");return Number(e)}function c(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)}function m(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return new Array(e)}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){return e-Math.floor(e/t)*t}function g(e){return Math.floor(e/864e5)}function D(e){return Date.UTC(e,0)/864e5}function v(e){return new Date(e).getUTCFullYear()}function h(e){return e%4!=0?365:e%100!=0?366:e%400!=0?365:366}function y(e){return g(e)-D(v(e))}function F(e){return 365===h(v(e))?0:1}function T(e){var t=y(e),a=F(e);if(t>=0&&t<31)return 0;if(t<59+a)return 1;if(t<90+a)return 2;if(t<120+a)return 3;if(t<151+a)return 4;if(t<181+a)return 5;if(t<212+a)return 6;if(t<243+a)return 7;if(t<273+a)return 8;if(t<304+a)return 9;if(t<334+a)return 10;if(t<365+a)return 11;throw new Error("Invalid time")}function b(e){return void 0===e?Object.create(null):c(e)}function A(e,t,a,r){if(void 0!==e){if(e=Number(e),isNaN(e)||ea)throw new RangeError("".concat(e," is outside of range [").concat(t,", ").concat(a,"]"));return Math.floor(e)}return r}function S(e,t,a,r,n){return A(e[t],a,r,n)}function P(e,t,a,r,n){if("object"!=typeof e)throw new TypeError("Options must be an object");var i=e[t];if(void 0!==i){if("boolean"!==a&&"string"!==a)throw new TypeError("invalid type");if("boolean"===a&&(i=Boolean(i)),"string"===a&&(i=l(i)),void 0!==r&&!r.filter((function(e){return e==i})).length)throw new RangeError("".concat(i," is not within ").concat(r.join(", ")));return i}return n}var E=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"];function C(e){return e.slice(e.indexOf("-")+1)}var w=E.map(C);function M(e){return w.indexOf(e)>-1}var k=/[^A-Z]/;function O(e){return 3===(e=e.replace(/([a-z])/g,(function(e,t){return t.toUpperCase()}))).length&&!k.test(e)}function L(e){if(M(e=e.replace(/([A-Z])/g,(function(e,t){return t.toLowerCase()}))))return!0;var t=e.split("-per-");if(2!==t.length)return!1;var a=t[0],r=t[1];return!(!M(a)||!M(r))}function _(e){return Math.floor(Math.log(e)*Math.LOG10E)}function I(e,t){if("function"==typeof e.repeat)return e.repeat(t);for(var a=new Array(t),r=0;rd[d.length-1])return d[d.length-1].length-1;var p=d.indexOf(f);if(-1===p)return 0;var g=d[p];return"0"===c[g].other?0:g.length-c[g].other.match(/0+/)[0].length}}function G(e,t,a){var r,n,i,o,u=a;if(0===e)r=I("0",u),n=0,i=0;else{var l=e.toString(),s=l.indexOf("e"),c=l.split("e"),m=c[0],f=c[1],d=m.replace(".","");if(s>=0&&d.length<=u)n=+f,r=d+I("0",u-d.length),i=e;else{var p=(n=_(e))-u+1,g=Math.round(v(e,p));v(g,u-1)>=10&&(n+=1,g=Math.floor(g/10)),r=g.toString(),i=v(g,u-1-n)}}if(n>=u-1?(r+=I("0",n-u+1),o=n+1):n>=0?(r="".concat(r.slice(0,n+1),".").concat(r.slice(n+1)),o=n+1):(r="0.".concat(I("0",-n-1)).concat(r),o=1),r.indexOf(".")>=0&&a>t){for(var D=a-t;D>0&&"0"===r[r.length-1];)r=r.slice(0,-1),D--;"."===r[r.length-1]&&(r=r.slice(0,-1))}return{formattedString:r,roundedNumber:i,integerDigitsCount:o};function v(e,t){return t<0?e*Math.pow(10,-t):e/Math.pow(10,t)}}function x(e,t,a){var r,n,i=a,o=Math.round(e*Math.pow(10,i)),u=o/Math.pow(10,i);if(o<1e21)r=o.toString();else{var l=(r=o.toString()).split("e"),s=l[0],c=l[1];r=s.replace(".",""),r+=I("0",Math.max(+c-r.length+1,0))}if(0!==i){var m=r.length;if(m<=i)r=I("0",i+1-m)+r,m=i+1;var f=r.slice(0,m-i),d=r.slice(m-i);r="".concat(f,".").concat(d),n=f.length}else n=r.length;for(var p=a-t;p>0&&"0"===r[r.length-1];)r=r.slice(0,-1),p--;return"."===r[r.length-1]&&(r=r.slice(0,-1)),{formattedString:r,roundedNumber:u,integerDigitsCount:n}}function z(e,t){var a,r=t<0||m(t,-0);switch(r&&(t=-t),e.roundingType){case"significantDigits":a=G(t,e.minimumSignificantDigits,e.maximumSignificantDigits);break;case"fractionDigits":a=x(t,e.minimumFractionDigits,e.maximumFractionDigits);break;default:(a=G(t,1,2)).integerDigitsCount>1&&(a=x(t,0,0))}t=a.roundedNumber;var n=a.formattedString,i=a.integerDigitsCount,o=e.minimumIntegerDigits;i\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/,W=new RegExp("^".concat(Y.source)),V=new RegExp("".concat(Y.source,"$")),J=/[#0](?:[\.,][#0]+)*/g;function q(e,t,a,r){var n,i,o=e.sign,u=e.exponent,l=e.magnitude,s=r.notation,c=r.style,m=r.numberingSystem,f=t.numbers.nu[0],d=null;if("compact"===s&&l&&(d=function(e,t,a,r,n,i,o){var u,l,s=e.roundedNumber,c=e.sign,m=e.magnitude,f=String(Math.pow(10,m)),d=a.numbers.nu[0];if("currency"===r&&"name"!==i){var p=null===(u=((g=a.numbers.currency)[o]||g[d]).short)||void 0===u?void 0:u[f];if(!p)return null;l=X(t,s,p)}else{var g,D=((g=a.numbers.decimal)[o]||g[d])[n][f];if(!D)return null;l=X(t,s,D)}if("0"===l)return null;return l=Q(l,c).replace(/([^\s;\-\+\d¤]+)/g,"{c:$1}").replace(/0+/,"0")}(e,a,t,c,r.compactDisplay,r.currencyDisplay,m)),"currency"===c&&"name"!==r.currencyDisplay){var p=t.currencies[r.currency];if(p)switch(r.currencyDisplay){case"code":n=r.currency;break;case"symbol":n=p.symbol;break;default:n=p.narrow}else n=r.currency}if(d)i=d;else if("decimal"===c||"unit"===c||"currency"===c&&"name"===r.currencyDisplay)i=Q((t.numbers.decimal[m]||t.numbers.decimal[f]).standard,o);else if("currency"===c){i=Q((D=t.numbers.currency[m]||t.numbers.currency[f])[r.currencySign],o)}else{i=Q(t.numbers.percent[m]||t.numbers.percent[f],o)}var g=J.exec(i)[0];if(i=i.replace(J,"{0}").replace(/'(.)'/g,"$1"),"currency"===c&&"name"!==r.currencyDisplay){var D,v=(D=t.numbers.currency[m]||t.numbers.currency[f]).currencySpacing.afterInsertBetween;v&&!V.test(n)&&(i=i.replace("¤{0}","¤".concat(v,"{0}")));var h=D.currencySpacing.beforeInsertBetween;h&&!W.test(n)&&(i=i.replace("{0}¤","{0}".concat(h,"¤")))}for(var y=i.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g),F=[],T=t.numbers.symbols[m]||t.numbers.symbols[f],b=0,A=y;b0?(m=l.slice(0,d),f=l.slice(d+1)):m=l,i&&("compact"!==a||s>=1e4)){var p=e.group,g=[],D=o.split(".")[0].split(","),v=3,h=3;D.length>1&&(v=D[D.length-1].length),D.length>2&&(h=D[D.length-2].length);var y=m.length-v;if(y>0){for(g.push(m.slice(y,y+v)),y-=h;y>0;y-=h)g.push(m.slice(y,y+h));g.push(m.slice(0,y+h))}else g.push(m);for(;g.length>0;){var F=g.pop();u.push({type:"integer",value:F}),g.length>0&&u.push({type:"group",value:p})}}else u.push({type:"integer",value:m});if(void 0!==f&&u.push({type:"decimal",value:e.decimal},{type:"fraction",value:f}),("scientific"===a||"engineering"===a)&&isFinite(s)){u.push({type:"exponentSeparator",value:e.exponential}),r<0&&(u.push({type:"exponentMinusSign",value:e.minusSign}),r=-r);var T=x(r,0,0);u.push({type:"exponentInteger",value:T.formattedString})}return u}function Q(e,t){e.indexOf(";")<0&&(e="".concat(e,";-").concat(e));var a=e.split(";"),r=a[0],n=a[1];switch(t){case 0:return r;case-1:return n;default:return n.indexOf("-")>=0?n.replace(/-/g,"+"):"+".concat(r)}}function X(e,t,a){return a[e.select(t)]||a.other}function ee(e,t,a){var r,n,i,o=a.getInternalSlots,u=o(e),l=u.pl,s=u.dataLocaleData,c=u.numberingSystem,f=s.numbers.symbols[c]||s.numbers.symbols[s.numbers.nu[0]],d=0,p=0;if(isNaN(t))n=f.nan;else if(isFinite(t)){"percent"===u.style&&(t*=100),p=(r=U(e,t,{getInternalSlots:o}))[0],d=r[1];var g=z(u,t=p<0?t*Math.pow(10,-p):t/Math.pow(10,p));n=g.formattedString,t=g.roundedNumber}else n=f.infinity;switch(u.signDisplay){case"never":i=0;break;case"auto":i=m(t,0)||t>0||isNaN(t)?0:-1;break;case"always":i=m(t,0)||t>0||isNaN(t)?1:-1;break;default:i=0===t||isNaN(t)?0:t>0?1:-1}return q({roundedNumber:t,formattedString:n,exponent:p,magnitude:d,sign:i},u.dataLocaleData,l,u)}function te(e,t,a){void 0===t&&(t=Object.create(null));var r=(0,a.getInternalSlots)(e),n=P(t,"style","string",["decimal","percent","currency","unit"],"decimal");r.style=n;var i=P(t,"currency","string",void 0,void 0);if(void 0!==i&&!O(i))throw RangeError("Malformed currency code");if("currency"===n&&void 0===i)throw TypeError("currency cannot be undefined");var o=P(t,"currencyDisplay","string",["code","symbol","narrowSymbol","name"],"symbol"),u=P(t,"currencySign","string",["standard","accounting"],"standard"),l=P(t,"unit","string",void 0,void 0);if(void 0!==l&&!L(l))throw RangeError("Invalid unit argument for Intl.NumberFormat()");if("unit"===n&&void 0===l)throw TypeError("unit cannot be undefined");var s=P(t,"unitDisplay","string",["short","narrow","long"],"short");"currency"===n&&(r.currency=i.toUpperCase(),r.currencyDisplay=o,r.currencySign=u),"unit"===n&&(r.unit=l,r.unitDisplay=s)}function ae(e,t,a,r,n){var i=S(t,"minimumIntegerDigits",1,21,1),o=t.minimumFractionDigits,u=t.maximumFractionDigits,l=t.minimumSignificantDigits,s=t.maximumSignificantDigits;if(e.minimumIntegerDigits=i,void 0!==l||void 0!==s)e.roundingType="significantDigits",l=A(l,1,21,1),s=A(s,l,21,21),e.minimumSignificantDigits=l,e.maximumSignificantDigits=s;else if(void 0!==o||void 0!==u){e.roundingType="fractionDigits",o=A(o,0,20,a),u=A(u,o,20,Math.max(o,r)),e.minimumFractionDigits=o,e.maximumFractionDigits=u}else"compact"===n?e.roundingType="compactRounding":(e.roundingType="fractionDigits",e.minimumFractionDigits=a,e.maximumFractionDigits=r)}!function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="MISSING_LOCALE_DATA",t}a(t,e)}(Error),function(e){e.startRange="startRange",e.shared="shared",e.endRange="endRange"}(H||(H={}));var re=Object.freeze({__proto__:null,_formatToParts:q,getInternalSlot:function(e,t,a){return B(e,t,a)[a]},getMultiInternalSlots:B,isLiteralPart:function(e){return"literal"===e.type},setInternalSlot:N,setMultiInternalSlots:function(e,t,a){for(var r=0,n=Object.keys(a);r-1;)j((r=e.indexOf("}",a))>a,"Invalid pattern ".concat(e)),a>n&&t.push({type:"literal",value:e.substring(n,a)}),t.push({type:e.substring(a+1,r),value:void 0}),n=r+1,a=e.indexOf("{",n);return n8640000000000001?NaN:function(e){var t=s(e);if(isNaN(t)||m(t,-0))return 0;if(isFinite(t))return t;var a=Math.floor(Math.abs(t));return t<0&&(a=-a),m(a,-0)?0:a}(e):NaN},ToObject:c,SameValue:m,ArrayCreate:f,HasOwnProperty:d,Type:function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":void 0},Day:g,WeekDay:function(e){return p(g(e)+4,7)},DayFromYear:D,TimeFromYear:function(e){return Date.UTC(e,0)},YearFromTime:v,DaysInYear:h,DayWithinYear:y,InLeapYear:F,MonthFromTime:T,DateFromTime:function(e){var t=y(e),a=T(e),r=F(e);if(0===a)return t+1;if(1===a)return t-30;if(2===a)return t-58-r;if(3===a)return t-89-r;if(4===a)return t-119-r;if(5===a)return t-150-r;if(6===a)return t-180-r;if(7===a)return t-211-r;if(8===a)return t-242-r;if(9===a)return t-272-r;if(10===a)return t-303-r;if(11===a)return t-333-r;throw new Error("Invalid time")},HourFromTime:function(e){return p(Math.floor(e/36e5),24)},MinFromTime:function(e){return p(Math.floor(e/6e4),60)},SecFromTime:function(e){return p(Math.floor(e/1e3),60)},OrdinaryHasInstance:function(e,t,a){if("function"!=typeof e)return!1;if(null==a?void 0:a.boundTargetFunction)return t instanceof(null==a?void 0:a.boundTargetFunction);if("object"!=typeof t)return!1;var r=e.prototype;if("object"!=typeof r)throw new TypeError("OrdinaryHasInstance called on an object with an invalid prototype property.");return Object.prototype.isPrototypeOf.call(r,t)},msFromTime:function(e){return p(e,1e3)}}),ne=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var a=new WeakMap;t.default=function(e){var t=a.get(e);return t||(t=Object.create(null),a.set(e,t)),t}}));t(ne);var ie=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={"Africa/Asmera":"Africa/Nairobi","Africa/Timbuktu":"Africa/Abidjan","America/Argentina/ComodRivadavia":"America/Argentina/Catamarca","America/Atka":"America/Adak","America/Buenos_Aires":"America/Argentina/Buenos_Aires","America/Catamarca":"America/Argentina/Catamarca","America/Coral_Harbour":"America/Panama","America/Cordoba":"America/Argentina/Cordoba","America/Ensenada":"America/Tijuana","America/Fort_Wayne":"America/Indiana/Indianapolis","America/Godthab":"America/Nuuk","America/Indianapolis":"America/Indiana/Indianapolis","America/Jujuy":"America/Argentina/Jujuy","America/Knox_IN":"America/Indiana/Knox","America/Louisville":"America/Kentucky/Louisville","America/Mendoza":"America/Argentina/Mendoza","America/Montreal":"America/Toronto","America/Porto_Acre":"America/Rio_Branco","America/Rosario":"America/Argentina/Cordoba","America/Santa_Isabel":"America/Tijuana","America/Shiprock":"America/Denver","America/Virgin":"America/Puerto_Rico","Antarctica/South_Pole":"Pacific/Auckland","Asia/Ashkhabad":"Asia/Ashgabat","Asia/Calcutta":"Asia/Kolkata","Asia/Chongqing":"Asia/Shanghai","Asia/Chungking":"Asia/Shanghai","Asia/Dacca":"Asia/Dhaka","Asia/Harbin":"Asia/Shanghai","Asia/Kashgar":"Asia/Urumqi","Asia/Katmandu":"Asia/Kathmandu","Asia/Macao":"Asia/Macau","Asia/Rangoon":"Asia/Yangon","Asia/Saigon":"Asia/Ho_Chi_Minh","Asia/Tel_Aviv":"Asia/Jerusalem","Asia/Thimbu":"Asia/Thimphu","Asia/Ujung_Pandang":"Asia/Makassar","Asia/Ulan_Bator":"Asia/Ulaanbaatar","Atlantic/Faeroe":"Atlantic/Faroe","Atlantic/Jan_Mayen":"Europe/Oslo","Australia/ACT":"Australia/Sydney","Australia/Canberra":"Australia/Sydney","Australia/Currie":"Australia/Hobart","Australia/LHI":"Australia/Lord_Howe","Australia/NSW":"Australia/Sydney","Australia/North":"Australia/Darwin","Australia/Queensland":"Australia/Brisbane","Australia/South":"Australia/Adelaide","Australia/Tasmania":"Australia/Hobart","Australia/Victoria":"Australia/Melbourne","Australia/West":"Australia/Perth","Australia/Yancowinna":"Australia/Broken_Hill","Brazil/Acre":"America/Rio_Branco","Brazil/DeNoronha":"America/Noronha","Brazil/East":"America/Sao_Paulo","Brazil/West":"America/Manaus","Canada/Atlantic":"America/Halifax","Canada/Central":"America/Winnipeg","Canada/Eastern":"America/Toronto","Canada/Mountain":"America/Edmonton","Canada/Newfoundland":"America/St_Johns","Canada/Pacific":"America/Vancouver","Canada/Saskatchewan":"America/Regina","Canada/Yukon":"America/Whitehorse","Chile/Continental":"America/Santiago","Chile/EasterIsland":"Pacific/Easter",Cuba:"America/Havana",Egypt:"Africa/Cairo",Eire:"Europe/Dublin","Etc/UCT":"Etc/UTC","Europe/Belfast":"Europe/London","Europe/Tiraspol":"Europe/Chisinau",GB:"Europe/London","GB-Eire":"Europe/London","GMT+0":"Etc/GMT","GMT-0":"Etc/GMT",GMT0:"Etc/GMT",Greenwich:"Etc/GMT",Hongkong:"Asia/Hong_Kong",Iceland:"Atlantic/Reykjavik",Iran:"Asia/Tehran",Israel:"Asia/Jerusalem",Jamaica:"America/Jamaica",Japan:"Asia/Tokyo",Kwajalein:"Pacific/Kwajalein",Libya:"Africa/Tripoli","Mexico/BajaNorte":"America/Tijuana","Mexico/BajaSur":"America/Mazatlan","Mexico/General":"America/Mexico_City",NZ:"Pacific/Auckland","NZ-CHAT":"Pacific/Chatham",Navajo:"America/Denver",PRC:"Asia/Shanghai","Pacific/Enderbury":"Pacific/Kanton","Pacific/Johnston":"Pacific/Honolulu","Pacific/Ponape":"Pacific/Pohnpei","Pacific/Samoa":"Pacific/Pago_Pago","Pacific/Truk":"Pacific/Chuuk","Pacific/Yap":"Pacific/Chuuk",Poland:"Europe/Warsaw",Portugal:"Europe/Lisbon",ROC:"Asia/Taipei",ROK:"Asia/Seoul",Singapore:"Asia/Singapore",Turkey:"Europe/Istanbul",UCT:"Etc/UTC","US/Alaska":"America/Anchorage","US/Aleutian":"America/Adak","US/Arizona":"America/Phoenix","US/Central":"America/Chicago","US/East-Indiana":"America/Indiana/Indianapolis","US/Eastern":"America/New_York","US/Hawaii":"Pacific/Honolulu","US/Indiana-Starke":"America/Indiana/Knox","US/Michigan":"America/Detroit","US/Mountain":"America/Denver","US/Pacific":"America/Los_Angeles","US/Samoa":"Pacific/Pago_Pago",UTC:"Etc/UTC",Universal:"Etc/UTC","W-SU":"Europe/Moscow",Zulu:"Etc/UTC"}}));t(ie);var oe=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.unpack=t.pack=void 0,t.pack=function(e){var t=Object.keys(e.zones);return t.sort(),{zones:t.map((function(t){return(0,r.__spreadArray)([t],e.zones[t].map((function(e){var t=e[0],a=e.slice(1);return(0,r.__spreadArray)([""===t?"":t.toString(36)],a,!0).join(",")})),!0).join("|")})),abbrvs:e.abbrvs.join("|"),offsets:e.offsets.map((function(e){return e.toString(36)})).join("|")}},t.unpack=function(e){for(var t=e.abbrvs.split("|"),a=e.offsets.split("|").map((function(e){return parseInt(e,36)})),r={},n=0,i=e.zones;ne){o=(r=n[i-1])[2],u=r[3];break}return[1e3*o,u]}(e,a,n),o=i[0],u=i[1],l=e+o,s=(0,re.YearFromTime)(l);return{weekday:(0,re.WeekDay)(l),era:s<0?"BC":"AD",year:s,relatedYear:void 0,yearName:void 0,month:(0,re.MonthFromTime)(l),day:(0,re.DateFromTime)(l),hour:(0,re.HourFromTime)(l),minute:(0,re.MinFromTime)(l),second:(0,re.SecFromTime)(l),millisecond:(0,re.msFromTime)(l),inDST:u,timeZoneOffset:o}}}));t(le),le.ToLocalTime;var se=e((function(e,t){function a(e){return e<10?"0".concat(e):String(e)}function r(e,t,r,n){var i=Math.floor(r/6e4),o=Math.abs(i)%60,u=Math.floor(Math.abs(i)/60),l=t.split(";"),s=l[0],c=l[1],m="",f=r<0?c:s;return"long"===n?m=f.replace("HH",a(u)).replace("H",String(u)).replace("mm",a(o)).replace("m",String(o)):(o||u)&&(o||(f=f.replace(/:?m+/,"")),m=f.replace(/H+/,String(u)).replace(/m+/,String(o))),e.replace("{0}",m)}Object.defineProperty(t,"__esModule",{value:!0}),t.FormatDateTimePattern=void 0,t.FormatDateTimePattern=function(e,t,a,n){var i=n.getInternalSlots,o=n.localeData,u=n.getDefaultTimeZone,l=n.tzData;a=(0,re.TimeClip)(a);var s=i(e),c=o[s.dataLocale],m=s.locale,f=Object.create(null);f.useGrouping=!1;var d=new Intl.NumberFormat(m,f),p=Object.create(null);p.minimumIntegerDigits=2,p.useGrouping=!1;var g,D=new Intl.NumberFormat(m,p),v=s.fractionalSecondDigits;if(void 0!==v){var h=Object.create(null);h.minimumIntegerDigits=v,h.useGrouping=!1,g=new Intl.NumberFormat(m,h)}for(var y=(0,le.ToLocalTime)(a,s.calendar,s.timeZone,{tzData:l}),F=[],T=0,b=t;T-1){var E="",C=s[S];P=y[S];"year"===S&&P<=0&&(P=1-P),"month"===S&&P++;var w=s.hourCycle;if("hour"!==S||"h11"!==w&&"h12"!==w||0===(P%=12)&&"h12"===w&&(P=12),"hour"===S&&"h24"===w&&0===P&&(P=24),"numeric"===C)E=d.format(P);else if("2-digit"===C)(E=D.format(P)).length>2&&(E=E.slice(E.length-2,E.length));else if("narrow"===C||"short"===C||"long"===C)if("era"===S)E=c[S][C][P];else if("timeZoneName"===S){var M=c.timeZoneName,k=c.gmtFormat,O=c.hourFormat,L=M[s.timeZone||u()];E=L&&L[C]?L[C][+y.inDST]:r(k,O,y.timeZoneOffset,C)}else E="month"===S?c.month[C][P-1]:c[S][C][P];F.push({type:S,value:E})}else if("ampm"===S){E=void 0;E=(P=y.hour)>11?c.pm:c.am,F.push({type:"dayPeriod",value:E})}else if("relatedYear"===S){P=y.relatedYear,E=d.format(P);F.push({type:"relatedYear",value:E})}else if("yearName"===S){P=y.yearName,E=d.format(P);F.push({type:"yearName",value:E})}}return F}}));t(se),se.FormatDateTimePattern;var ce=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PartitionDateTimePattern=void 0,t.PartitionDateTimePattern=function(e,t,a){if(t=(0,re.TimeClip)(t),isNaN(t))throw new RangeError("invalid time");var r=(0,a.getInternalSlots)(e).pattern;return(0,se.FormatDateTimePattern)(e,(0,re.PartitionPattern)(r),t,a)}}));t(ce),ce.PartitionDateTimePattern;var me=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FormatDateTime=void 0,t.FormatDateTime=function(e,t,a){for(var r="",n=0,i=(0,ce.PartitionDateTimePattern)(e,t,a);na&&(a=l,n=u)}return(0,r.__assign)({},n)}}));t(fe),fe.BasicFormatMatcher;var de=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.splitRangePattern=t.splitFallbackRangePattern=t.parseDateTimeSkeleton=t.processDateTimePattern=void 0;var a=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function i(e,t){var a=e.length;switch(e[0]){case"G":return t.era=4===a?"long":5===a?"narrow":"short","{era}";case"y":case"Y":case"u":case"U":case"r":return t.year=2===a?"2-digit":"numeric","{year}";case"q":case"Q":throw new RangeError("`w/Q` (quarter) patterns are not supported");case"M":case"L":return t.month=["numeric","2-digit","short","long","narrow"][a-1],"{month}";case"w":case"W":throw new RangeError("`w/W` (week of year) patterns are not supported");case"d":return t.day=["numeric","2-digit"][a-1],"{day}";case"D":case"F":case"g":return t.day="numeric","{day}";case"E":return t.weekday=4===a?"long":5===a?"narrow":"short","{weekday}";case"e":case"c":return t.weekday=[void 0,void 0,"short","long","narrow","short"][a-1],"{weekday}";case"a":case"b":case"B":return t.hour12=!0,"{ampm}";case"h":case"K":return t.hour=["numeric","2-digit"][a-1],t.hour12=!0,"{hour}";case"H":case"k":return t.hour=["numeric","2-digit"][a-1],"{hour}";case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":return t.minute=["numeric","2-digit"][a-1],"{minute}";case"s":return t.second=["numeric","2-digit"][a-1],"{second}";case"S":case"A":return t.second="numeric","{second}";case"z":case"Z":case"O":case"v":case"V":case"X":case"x":return t.timeZoneName=a<4?"short":"long","{timeZoneName}"}return""}function o(e){switch(e){case"G":return"era";case"y":case"Y":case"u":case"U":case"r":return"year";case"M":case"L":return"month";case"d":case"D":case"F":case"g":return"day";case"a":case"b":case"B":return"ampm";case"h":case"H":case"K":case"k":return"hour";case"m":return"minute";case"s":case"S":case"A":return"second";default:throw new RangeError("Invalid range pattern token")}}function u(e,t){var r=[],o=e.replace(/'{2}/g,"{apostrophe}").replace(/'(.*?)'/g,(function(e,t){return r.push(t),"$$".concat(r.length-1,"$$")})).replace(a,(function(e){return i(e,t||{})}));return r.length&&(o=o.replace(/\$\$(\d+)\$\$/g,(function(e,t){return r[+t]})).replace(/\{apostrophe\}/g,"'")),[o.replace(/([\s\uFEFF\xA0])\{ampm\}([\s\uFEFF\xA0])/,"$1").replace("{ampm}","").replace(n,""),o]}function l(e){return e.split(/(\{[0|1]\})/g).filter(Boolean).map((function(e){switch(e){case"{0}":return{source:re.RangePatternType.startRange,pattern:e};case"{1}":return{source:re.RangePatternType.endRange,pattern:e};default:return{source:re.RangePatternType.shared,pattern:e}}}))}function s(e){for(var t,a=/\{(.*?)\}/g,r={},n=0;t=a.exec(e);){if(t[0]in r){n=t.index;break}r[t[0]]=t.index}return n?[{source:re.RangePatternType.startRange,pattern:e.slice(0,n)},{source:re.RangePatternType.endRange,pattern:e.slice(n)}]:[{source:re.RangePatternType.startRange,pattern:e}]}t.processDateTimePattern=u,t.parseDateTimeSkeleton=function(e,t,n,c){void 0===t&&(t=e);var m={pattern:"",pattern12:"",skeleton:e,rawPattern:t,rangePatterns:{},rangePatterns12:{}};if(n)for(var f in n){var d=o(f),p={patternParts:[]},g=u(n[f],p),D=g[0],v=g[1];m.rangePatterns[d]=(0,r.__assign)((0,r.__assign)({},p),{patternParts:s(D)}),m.rangePatterns12[d]=(0,r.__assign)((0,r.__assign)({},p),{patternParts:s(v)})}if(c){var h=l(c);m.rangePatterns.default={patternParts:h},m.rangePatterns12.default={patternParts:h}}e.replace(a,(function(e){return i(e,m)}));var y=u(t),F=y[0],T=y[1];return m.pattern=F,m.pattern12=T,m},t.splitFallbackRangePattern=l,t.splitRangePattern=s}));t(de),de.splitRangePattern,de.splitFallbackRangePattern,de.parseDateTimeSkeleton,de.processDateTimePattern;var pe=e((function(e,t){function a(e){return"numeric"===e||"2-digit"===e}function n(e,t){var r=0;e.hour12&&!t.hour12?r-=ue.removalPenalty:!e.hour12&&t.hour12&&(r-=ue.additionPenalty);for(var n=0,i=ue.DATE_TIME_PROPS;ni&&(i=c,o=s)}var m=(0,r.__assign)({},o),f={rawPattern:o.rawPattern};for(var d in(0,de.processDateTimePattern)(o.rawPattern,f),m){var p=m[d],g=f[d],D=e[d];"minute"!==d&&"second"!==d&&(D&&(a(g)&&!a(D)||p!==D&&(f[d]=D)))}return f.pattern=m.pattern,f.pattern12=m.pattern12,f.skeleton=m.skeleton,f.rangePatterns=m.rangePatterns,f.rangePatterns12=m.rangePatterns12,f}}));t(pe),pe.BestFitFormatMatcher,pe.bestFitFormatMatcherScore;var ge=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimeStyleFormat=void 0,t.DateTimeStyleFormat=function(e,t,a){var r,n;if(void 0!==t&&((0,re.invariant)("full"===t||"long"===t||"medium"===t||"short"===t,"invalid timeStyle"),n=a.timeFormat[t]),void 0!==e&&((0,re.invariant)("full"===e||"long"===e||"medium"===e||"short"===e,"invalid dateStyle"),r=a.dateFormat[e]),void 0!==e&&void 0!==t){var i={};for(var o in r)"pattern"!==o&&(i[o]=r[o]);for(var o in n)"pattern"!==o&&"pattern12"!==o&&(i[o]=n[o]);var u=a.dateTimeFormat[e],l=u.replace("{0}",n.pattern).replace("{1}",r.pattern);if(i.pattern=l,"pattern12"in n){var s=u.replace("{0}",n.pattern12).replace("{1}",r.pattern);i.pattern12=s}return i}return void 0!==t?n:((0,re.invariant)(void 0!==e,"dateStyle should not be undefined"),r)}}));t(ge),ge.DateTimeStyleFormat;var De=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ToDateTimeOptions=void 0,t.ToDateTimeOptions=function(e,t,a){e=void 0===e?null:(0,re.ToObject)(e),e=Object.create(e);var r=!0;if("date"===t||"any"===t)for(var n=0,i=["weekday","year","month","day"];n11&&F<11||y<11&&F>11)&&(d=!1)}else if("dayPeriod"===v);else if("fractionalSecondDigits"===v){var T=l.fractionalSecondDigits;void 0===T&&(T=3);y=Math.floor(s.millisecond*Math.pow(10,T-3)),F=Math.floor(c.millisecond*Math.pow(10,T-3));(0,re.SameValue)(y,F)||(d=!1)}else{y=s[v],F=c[v];(0,re.SameValue)(y,F)||(d=!1)}}}if(d){for(var b=(0,se.FormatDateTimePattern)(e,(0,re.PartitionPattern)(m),t,n),A=0,S=b;A-1&&(void 0===e.dateStyle&&void 0===e.timeStyle||(l=void 0)),void 0!==l&&(r[u]=l)}return r}}),(0,re.defineProperty)(t.DateTimeFormat.prototype,"formatToParts",{value:function(e){return e=void 0===e?Date.now():(0,re.ToNumber)(e),(0,he.FormatDateTimeToParts)(this,e,{getInternalSlots:a.default,localeData:t.DateTimeFormat.localeData,tzData:t.DateTimeFormat.tzData,getDefaultTimeZone:t.DateTimeFormat.getDefaultTimeZone})}}),(0,re.defineProperty)(t.DateTimeFormat.prototype,"formatRangeToParts",{value:function(e,r){if("object"!=typeof this)throw new TypeError;if(void 0===e||void 0===r)throw new TypeError("startDate/endDate cannot be undefined");var n=(0,re.ToNumber)(e),i=(0,re.ToNumber)(r);return(0,Fe.FormatDateTimeRangeToParts)(this,n,i,{getInternalSlots:a.default,localeData:t.DateTimeFormat.localeData,tzData:t.DateTimeFormat.tzData,getDefaultTimeZone:t.DateTimeFormat.getDefaultTimeZone})}}),(0,re.defineProperty)(t.DateTimeFormat.prototype,"formatRange",{value:function(e,r){if("object"!=typeof this)throw new TypeError;if(void 0===e||void 0===r)throw new TypeError("startDate/endDate cannot be undefined");var n=(0,re.ToNumber)(e),i=(0,re.ToNumber)(r);return(0,Te.FormatDateTimeRange)(this,n,i,{getInternalSlots:a.default,localeData:t.DateTimeFormat.localeData,tzData:t.DateTimeFormat.tzData,getDefaultTimeZone:t.DateTimeFormat.getDefaultTimeZone})}});t.DateTimeFormat.__setDefaultTimeZone=function(e){if(void 0!==e){if(e=String(e),!(0,re.IsValidTimeZoneName)(e,{tzData:t.DateTimeFormat.tzData,uppercaseLinks:i}))throw new RangeError("Invalid timeZoneName");e=(0,re.CanonicalizeTimeZoneName)(e,{tzData:t.DateTimeFormat.tzData,uppercaseLinks:i})}else e="UTC";t.DateTimeFormat.__defaultTimeZone=e},t.DateTimeFormat.relevantExtensionKeys=["nu","ca","hc"],t.DateTimeFormat.__defaultTimeZone="UTC",t.DateTimeFormat.getDefaultTimeZone=function(){return t.DateTimeFormat.__defaultTimeZone},t.DateTimeFormat.__addLocaleData=function(){for(var e=[],a=0;a!1},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){return i` - ${this.helper?i`${this.helper}`:""} `}},{kind:"method",key:"_handleChange",value:function(e){const a=e.target.value;e.target.isValid&&this.value!==a&&d(this,"value-changed",{value:a})}}]}}),a);export{r as HaObjectSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.b0a1285d.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.b0a1285d.js.gz deleted file mode 100644 index 8f0fee8..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.b0a1285d.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.b5117688.js b/custom_components/hacs/hacs_frontend_experimental/c.b5117688.js deleted file mode 100644 index 8d85627..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.b5117688.js +++ /dev/null @@ -1,541 +0,0 @@ -import{I as e,J as t,$ as a,Z as i,y as r,d as o,eP as n,f as s,e as l,i as d,a6 as c,j as h,k as u,_ as p,t as y,O as m,aa as f,n as _}from"./main-c66a9a06.js";import{n as b,m as v,a as w,r as g,c as k}from"./c.a5550d10.js";import{c as D}from"./c.279495d9.js";import"./c.b914d43e.js";import"./c.8e28b461.js";import"./c.41d13611.js";const x=Intl&&Intl.DateTimeFormat,T=[38,33,36],C=[40,34,35],S=new Set([37,...T]),$=new Set([39,...C]),F=new Set([39,...T]),U=new Set([37,...C]),N=new Set([37,39,...T,...C]),W=e(class extends t{constructor(e){super(e),this.et=new WeakMap}render(e){return[e]}update(e,[t]){if(b(this.it)&&(!b(t)||this.it.strings!==t.strings)){const t=v(e).pop();let r=this.et.get(this.it.strings);if(void 0===r){const e=document.createDocumentFragment();r=a(i,e),r.setConnected(!1),this.et.set(this.it.strings,r)}w(r,[t]),g(r,void 0,t)}if(b(t)){if(!b(this.it)||this.it.strings!==t.strings){const a=this.et.get(t.strings);if(void 0!==a){const t=v(a).pop();k(e),g(e,void 0,t),w(e,[t])}}this.it=t}else this.it=void 0;return this.render(t)}});function L(e,t,a){return new Date(Date.UTC(e,t,a))}const M=r``,E=r``,Y=o` -button { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - - position: relative; - display: block; - margin: 0; - padding: 0; - background: none; /** NOTE: IE11 fix */ - color: inherit; - border: none; - font: inherit; - text-align: left; - text-transform: inherit; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -`;o` -a { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - - position: relative; - display: inline-block; - background: initial; - color: inherit; - font: inherit; - text-transform: inherit; - text-decoration: none; - outline: none; -} -a:focus, -a:focus.page-selected { - text-decoration: underline; -} -`,o` -svg { - display: block; - min-width: var(--svg-icon-min-width, 24px); - min-height: var(--svg-icon-min-height, 24px); - fill: var(--svg-icon-fill, currentColor); - pointer-events: none; -} -`,o`[hidden] { display: none !important; }`;const V=o` -:host { - display: block; - - /* --app-datepicker-width: 300px; */ - /* --app-datepicker-primary-color: #4285f4; */ - /* --app-datepicker-header-height: 80px; */ -} - -* { - box-sizing: border-box; -} -`;function O(e,t){return+t-+e}function A({hasAltKey:e,keyCode:t,focusedDate:a,selectedDate:i,disabledDaysSet:r,disabledDatesSet:o,minTime:n,maxTime:s}){const l=a.getUTCFullYear(),d=a.getUTCMonth(),c=a.getUTCDate(),h=+a,u=i.getUTCFullYear(),p=i.getUTCMonth();let y=l,m=d,f=c,_=!0;switch((p!==d||u!==l)&&(y=u,m=p,f=1,_=34===t||33===t||35===t),_){case h===n&&S.has(t):case h===s&&$.has(t):break;case 38===t:f-=7;break;case 40===t:f+=7;break;case 37===t:f-=1;break;case 39===t:f+=1;break;case 34===t:e?y+=1:m+=1;break;case 33===t:e?y-=1:m-=1;break;case 35===t:m+=1,f=0;break;default:f=1}if(34===t||33===t){const e=L(y,m+1,0).getUTCDate();f>e&&(f=e)}const b=function({keyCode:e,disabledDaysSet:t,disabledDatesSet:a,focusedDate:i,maxTime:r,minTime:o}){const n=+i;let s=nr;if(O(o,r)<864e5)return i;let d=s||l||t.has(i.getUTCDay())||a.has(n);if(!d)return i;let c=0,h=s===l?i:new Date(s?o-864e5:864e5+r);const u=h.getUTCFullYear(),p=h.getUTCMonth();let y=h.getUTCDate();for(;d;)(s||!l&&F.has(e))&&(y+=1),(l||!s&&U.has(e))&&(y-=1),h=L(u,p,y),c=+h,s||(s=cr,l&&(h=new Date(r),c=+h,y=h.getUTCDate())),d=t.has(h.getUTCDay())||a.has(c);return h}({keyCode:t,maxTime:s,minTime:n,disabledDaysSet:r,disabledDatesSet:o,focusedDate:L(y,m,f)});return b}function P(e,t,a){return e.dispatchEvent(new CustomEvent(t,{detail:a,bubbles:!0,composed:!0}))}function j(e,t){return e.composedPath().find((e=>e instanceof HTMLElement&&t(e)))}function I(e){return t=>e.format(t).replace(/\u200e/gi,"")}function z(e){const t=x(e,{timeZone:"UTC",weekday:"short",month:"short",day:"numeric"}),a=x(e,{timeZone:"UTC",day:"numeric"}),i=x(e,{timeZone:"UTC",year:"numeric",month:"short",day:"numeric"}),r=x(e,{timeZone:"UTC",year:"numeric",month:"long"}),o=x(e,{timeZone:"UTC",weekday:"long"}),n=x(e,{timeZone:"UTC",weekday:"narrow"}),s=x(e,{timeZone:"UTC",year:"numeric"});return{locale:e,dateFormat:I(t),dayFormat:I(a),fullDateFormat:I(i),longMonthYearFormat:I(r),longWeekdayFormat:I(o),narrowWeekdayFormat:I(n),yearFormat:I(s)}}function K(e,t){const a=function(e,t){const a=t.getUTCFullYear(),i=t.getUTCMonth(),r=t.getUTCDate(),o=t.getUTCDay();let n=o;return"first-4-day-week"===e&&(n=3),"first-day-of-year"===e&&(n=6),"first-full-week"===e&&(n=0),L(a,i,r-o+n)}(e,t),i=L(a.getUTCFullYear(),0,1),r=1+(+a-+i)/864e5;return Math.ceil(r/7)}function Z(e){if(e>=0&&e<7)return Math.abs(e);return((e<0?7*Math.ceil(Math.abs(e)):0)+e)%7}function B(e,t,a){const i=Z(e-t);return a?1+i:i}function R(e){const{dayFormat:t,fullDateFormat:a,locale:i,longWeekdayFormat:r,narrowWeekdayFormat:o,selectedDate:n,disabledDates:s,disabledDays:l,firstDayOfWeek:d,max:c,min:h,showWeekNumber:u,weekLabel:p,weekNumberType:y}=e,m=null==h?Number.MIN_SAFE_INTEGER:+h,f=null==c?Number.MAX_SAFE_INTEGER:+c,_=function(e){const{firstDayOfWeek:t=0,showWeekNumber:a=!1,weekLabel:i,longWeekdayFormat:r,narrowWeekdayFormat:o}=e||{},n=1+(t+(t<0?7:0))%7,s=i||"Wk",l=a?[{label:"Wk"===s?"Week":s,value:s}]:[],d=Array.from(Array(7)).reduce(((e,t,a)=>{const i=L(2017,0,n+a);return e.push({label:r(i),value:o(i)}),e}),l);return d}({longWeekdayFormat:r,narrowWeekdayFormat:o,firstDayOfWeek:d,showWeekNumber:u,weekLabel:p}),b=e=>[i,e.toJSON(),null==s?void 0:s.join("_"),null==l?void 0:l.join("_"),d,null==c?void 0:c.toJSON(),null==h?void 0:h.toJSON(),u,p,y].filter(Boolean).join(":"),v=n.getUTCFullYear(),w=n.getUTCMonth(),g=[-1,0,1].map((e=>{const r=L(v,w+e,1),o=+L(v,w+e+1,0),n=b(r);if(of)return{key:n,calendar:[],disabledDatesSet:new Set,disabledDaysSet:new Set};const _=function(e){const{date:t,dayFormat:a,disabledDates:i=[],disabledDays:r=[],firstDayOfWeek:o=0,fullDateFormat:n,locale:s="en-US",max:l,min:d,showWeekNumber:c=!1,weekLabel:h="Week",weekNumberType:u="first-4-day-week"}=e||{},p=Z(o),y=t.getUTCFullYear(),m=t.getUTCMonth(),f=L(y,m,1),_=new Set(r.map((e=>B(e,p,c)))),b=new Set(i.map((e=>+e))),v=[f.toJSON(),p,s,null==l?"":l.toJSON(),null==d?"":d.toJSON(),Array.from(_).join(","),Array.from(b).join(","),u].filter(Boolean).join(":"),w=B(f.getUTCDay(),p,c),g=null==d?+new Date("2000-01-01"):+d,k=null==l?+new Date("2100-12-31"):+l,D=c?8:7,x=L(y,1+m,0).getUTCDate(),T=[];let C=[],S=!1,$=1;for(const e of[0,1,2,3,4,5]){for(const t of[0,1,2,3,4,5,6].concat(7===D?[]:[7])){const i=t+e*D;if(!S&&c&&0===t){const t=K(u,L(y,m,$-(e<1?p:0))),a=`${h} ${t}`;C.push({fullDate:null,label:a,value:`${t}`,key:`${v}:${a}`,disabled:!0});continue}if(S||ik;s&&b.add(o),C.push({fullDate:r,label:n(r),value:a(r),key:`${v}:${r.toJSON()}`,disabled:s}),$+=1,$>x&&(S=!0)}T.push(C),C=[]}return{disabledDatesSet:b,calendar:T,disabledDaysSet:new Set(r.map((e=>Z(e)))),key:v}}({dayFormat:t,fullDateFormat:a,locale:i,disabledDates:s,disabledDays:l,firstDayOfWeek:d,max:c,min:h,showWeekNumber:u,weekLabel:p,weekNumberType:y,date:r});return{..._,key:n}})),k=[],D=new Set,x=new Set;for(const e of g){const{disabledDatesSet:t,disabledDaysSet:a,...i}=e;if(i.calendar.length>0){if(a.size>0)for(const e of a)x.add(e);if(t.size>0)for(const e of t)D.add(e)}k.push(i)}return{calendars:k,weekdays:_,disabledDatesSet:D,disabledDaysSet:x,key:b(n)}}function q(e){const t=null==e?new Date:new Date(e),a="string"==typeof e&&(/^\d{4}-\d{2}-\d{2}$/i.test(e)||/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}(Z|\+00:00|-00:00)$/i.test(e)),i="number"==typeof e&&e>0&&isFinite(e);let r=t.getFullYear(),o=t.getMonth(),n=t.getDate();return(a||i)&&(r=t.getUTCFullYear(),o=t.getUTCMonth(),n=t.getUTCDate()),L(r,o,n)}function J(e,t){return e.classList.contains(t)}function X(e,t){return!(null==e||!(t instanceof Date)||isNaN(+t))}function H(e){return e-Math.floor(e)>0?+e.toFixed(3):e}function G(e){return{passive:!0,handleEvent:e}}function Q(e,t){const a="string"==typeof e&&e.length>0?e.split(/,\s*/i):[];return a.length?"function"==typeof t?a.map(t):a:[]}function ee(e){if(e instanceof Date&&!isNaN(+e)){const t=e.toJSON();return null==t?"":t.replace(/^(.+)T.+/i,"$1")}return""}function te(e,t){if(O(e,t)<864e5)return[];const a=e.getUTCFullYear();return Array.from(Array(t.getUTCFullYear()-a+1),((e,t)=>t+a))}function ae(e,t,a){const i="number"==typeof e?e:+e,r=+t,o=+a;return io?o:e}function ie(e){const{clientX:t,clientY:a,pageX:i,pageY:r}=e,o=Math.max(i,t),n=Math.max(r,a),s=e.identifier||e.pointerId;return{x:o,y:n,id:null==s?0:s}}function re(e,t){const a=t.changedTouches;if(null==a)return{newPointer:ie(t),oldPointer:e};const i=Array.from(a,(e=>ie(e))),r=null==e?i[0]:i.find((t=>t.id===e.id));return{newPointer:r,oldPointer:e}}function oe(e,t,a){e.addEventListener(t,a,!!n&&{passive:!0})}class ne{constructor(e,t){this._element=e,this._startPointer=null;const{down:a,move:i,up:r}=t;this._down=this._onDown(a),this._move=this._onMove(i),this._up=this._onUp(r),e&&e.addEventListener&&(e.addEventListener("mousedown",this._down),oe(e,"touchstart",this._down),oe(e,"touchmove",this._move),oe(e,"touchend",this._up))}disconnect(){const e=this._element;e&&e.removeEventListener&&(e.removeEventListener("mousedown",this._down),e.removeEventListener("touchstart",this._down),e.removeEventListener("touchmove",this._move),e.removeEventListener("touchend",this._up))}_onDown(e){return t=>{t instanceof MouseEvent&&(this._element.addEventListener("mousemove",this._move),this._element.addEventListener("mouseup",this._up),this._element.addEventListener("mouseleave",this._up));const{newPointer:a}=re(this._startPointer,t);e(a,t),this._startPointer=a}}_onMove(e){return t=>{this._updatePointers(e,t)}}_onUp(e){return t=>{this._updatePointers(e,t,!0)}}_updatePointers(e,t,a){a&&t instanceof MouseEvent&&(this._element.removeEventListener("mousemove",this._move),this._element.removeEventListener("mouseup",this._up),this._element.removeEventListener("mouseleave",this._up));const{newPointer:i,oldPointer:r}=re(this._startPointer,t);e(i,r,t),this._startPointer=a?null:i}}class se extends h{constructor(){super(),this.firstDayOfWeek=0,this.showWeekNumber=!1,this.weekNumberType="first-4-day-week",this.landscape=!1,this.locale=x&&x().resolvedOptions&&x().resolvedOptions().locale||"en-US",this.disabledDays="",this.disabledDates="",this.weekLabel="Wk",this.inline=!1,this.dragRatio=.15,this._hasMin=!1,this._hasMax=!1,this._disabledDaysSet=new Set,this._disabledDatesSet=new Set,this._dx=-1/0,this._hasNativeWebAnimation="animate"in HTMLElement.prototype,this._updatingDateWithKey=!1;const e=q(),t=z(this.locale),a=ee(e),i=q("2100-12-31");this.value=a,this.startView="calendar",this._min=new Date(e),this._max=new Date(i),this._todayDate=e,this._maxDate=i,this._yearList=te(e,i),this._selectedDate=new Date(e),this._focusedDate=new Date(e),this._formatters=t}get startView(){return this._startView}set startView(e){const t=e||"calendar";if("calendar"!==t&&"yearList"!==t)return;const a=this._startView;this._startView=t,this.requestUpdate("startView",a)}get min(){return this._hasMin?ee(this._min):""}set min(e){const t=q(e),a=X(e,t);this._min=a?t:this._todayDate,this._hasMin=a,this.requestUpdate("min")}get max(){return this._hasMax?ee(this._max):""}set max(e){const t=q(e),a=X(e,t);this._max=a?t:this._maxDate,this._hasMax=a,this.requestUpdate("max")}get value(){return ee(this._focusedDate)}set value(e){const t=q(e),a=X(e,t)?t:this._todayDate;this._focusedDate=new Date(a),this._selectedDate=this._lastSelectedDate=new Date(a)}disconnectedCallback(){super.disconnectedCallback(),this._tracker&&(this._tracker.disconnect(),this._tracker=void 0)}render(){this._formatters.locale!==this.locale&&(this._formatters=z(this.locale));const e="yearList"===this._startView?this._renderDatepickerYearList():this._renderDatepickerCalendar(),t=this.inline?null:r`
    ${this._renderHeaderSelectorButton()}
    `;return r` - ${t} -
    ${W(e)}
    - `}firstUpdated(){let e;e="calendar"===this._startView?this.inline?this.shadowRoot.querySelector(".btn__month-selector"):this._buttonSelectorYear:this._yearViewListItem,P(this,"datepicker-first-updated",{firstFocusableElement:e,value:this.value})}async updated(e){const t=this._startView;if(e.has("min")||e.has("max")){this._yearList=te(this._min,this._max),"yearList"===t&&this.requestUpdate();const e=+this._min,a=+this._max;if(O(e,a)>864e5){const t=+this._focusedDate;let i=t;ta&&(i=a),this.value=ee(new Date(i))}}if(e.has("_startView")||e.has("startView")){if("yearList"===t){const e=48*(this._selectedDate.getUTCFullYear()-this._min.getUTCFullYear()-2);!function(e,t){if(null==e.scrollTo){const{top:a,left:i}=t||{};e.scrollTop=a||0,e.scrollLeft=i||0}else e.scrollTo(t)}(this._yearViewFullList,{top:e,left:0})}if("calendar"===t&&null==this._tracker){const e=this.calendarsContainer;let t=!1,a=!1,i=!1;if(e){const r={down:()=>{i||(t=!0,this._dx=0)},move:(r,o)=>{if(i||!t)return;const n=this._dx,s=n<0&&J(e,"has-max-date")||n>0&&J(e,"has-min-date");!s&&Math.abs(n)>0&&t&&(a=!0,e.style.transform=`translateX(${H(n)}px)`),this._dx=s?0:n+(r.x-o.x)},up:async(r,o,n)=>{if(t&&a){const r=this._dx,o=e.getBoundingClientRect().width/3,n=Math.abs(r)>Number(this.dragRatio)*o,s=350,l="cubic-bezier(0, 0, .4, 1)",d=n?H(o*(r<0?-1:1)):0;i=!0,await async function(e,t){const{hasNativeWebAnimation:a=!1,keyframes:i=[],options:r={duration:100}}=t||{};if(Array.isArray(i)&&i.length)return new Promise((t=>{if(a)e.animate(i,r).onfinish=()=>t();else{const[,a]=i||[],o=()=>{e.removeEventListener("transitionend",o),t()};e.addEventListener("transitionend",o),e.style.transitionDuration=`${r.duration}ms`,r.easing&&(e.style.transitionTimingFunction=r.easing),Object.keys(a).forEach((t=>{t&&(e.style[t]=a[t])}))}}))}(e,{hasNativeWebAnimation:this._hasNativeWebAnimation,keyframes:[{transform:`translateX(${r}px)`},{transform:`translateX(${d}px)`}],options:{duration:s,easing:l}}),n&&this._updateMonth(r<0?"next":"previous").handleEvent(),t=a=i=!1,this._dx=-1/0,e.removeAttribute("style"),P(this,"datepicker-animation-finished")}else t&&(this._updateFocusedDate(n),t=a=!1,this._dx=-1/0)}};this._tracker=new ne(e,r)}}e.get("_startView")&&"calendar"===t&&this._focusElement('[part="year-selector"]')}this._updatingDateWithKey&&(this._focusElement('[part="calendars"]:nth-of-type(2) .day--focused'),this._updatingDateWithKey=!1)}_focusElement(e){const t=this.shadowRoot.querySelector(e);t&&t.focus()}_renderHeaderSelectorButton(){const{yearFormat:e,dateFormat:t}=this._formatters,a="calendar"===this.startView,i=this._focusedDate,o=t(i),n=e(i);return r` - - -
    - -
    - `}_renderDatepickerYearList(){const{yearFormat:e}=this._formatters,t=this._focusedDate.getUTCFullYear();return r` -
    -
    - ${this._yearList.map((a=>r``))}
    -
    - `}_renderDatepickerCalendar(){const{longMonthYearFormat:e,dayFormat:t,fullDateFormat:a,longWeekdayFormat:i,narrowWeekdayFormat:o}=this._formatters,n=Q(this.disabledDays,Number),s=Q(this.disabledDates,q),l=this.showWeekNumber,d=this._focusedDate,c=this.firstDayOfWeek,h=q(),p=this._selectedDate,y=this._max,m=this._min,{calendars:f,disabledDaysSet:_,disabledDatesSet:b,weekdays:v}=R({dayFormat:t,fullDateFormat:a,longWeekdayFormat:i,narrowWeekdayFormat:o,firstDayOfWeek:c,disabledDays:n,disabledDates:s,locale:this.locale,selectedDate:p,showWeekNumber:this.showWeekNumber,weekNumberType:this.weekNumberType,max:y,min:m,weekLabel:this.weekLabel}),w=!f[0].calendar.length,g=!f[2].calendar.length,k=v.map((e=>r` -
    ${e.value}
    - `)),x=D(f,(e=>e.key),(({calendar:t},a)=>{if(!t.length)return r`
    `;const i=`calendarcaption${a}`,o=t[1][1].fullDate,n=1===a,s=n&&!this._isInVisibleMonth(d,p)?A({disabledDaysSet:_,disabledDatesSet:b,hasAltKey:!1,keyCode:36,focusedDate:d,selectedDate:p,minTime:+m,maxTime:+y}):d;return r` -
    - - - - - ${k} - - - ${t.map((e=>r`${e.map(((e,t)=>{const{disabled:a,fullDate:i,label:o,value:c}=e;if(!i&&c&&l&&t<1)return r``;if(!c||!i)return r``;const p=+new Date(i),y=+d===p,m=n&&s.getUTCDate()===Number(c);return r` - - `}))}`))} -
    -
    ${o?e(o):""}
    -
    ${c} -
    ${c}
    -
    -
    - `}));return this._disabledDatesSet=b,this._disabledDaysSet=_,r` -
    -
    -
    ${w?null:r` - - `}
    - -
    ${g?null:r` - - `}
    -
    - -
    ${x}
    -
    - `}_updateView(e){return G((()=>{"calendar"===e&&(this._selectedDate=this._lastSelectedDate=new Date(ae(this._focusedDate,this._min,this._max))),this._startView=e}))}_updateMonth(e){return G((()=>{if(null==this.calendarsContainer)return this.updateComplete;const t=this._lastSelectedDate||this._selectedDate,a=this._min,i=this._max,r="previous"===e,o=L(t.getUTCFullYear(),t.getUTCMonth()+(r?-1:1),1),n=o.getUTCFullYear(),s=o.getUTCMonth(),l=a.getUTCFullYear(),d=a.getUTCMonth(),c=i.getUTCFullYear(),h=i.getUTCMonth();return nc||n>=c&&s>h)||(this._lastSelectedDate=o,this._selectedDate=this._lastSelectedDate),this.updateComplete}))}_updateYear(e){const t=j(e,(e=>J(e,"year-list-view__list-item")));if(null==t)return;const a=ae(new Date(this._focusedDate).setUTCFullYear(+t.year),this._min,this._max);this._selectedDate=this._lastSelectedDate=new Date(a),this._focusedDate=new Date(a),this._startView="calendar"}_updateFocusedDate(e){const t=j(e,(e=>J(e,"full-calendar__day")));null==t||["day--empty","day--disabled","day--focused","weekday-label"].some((e=>J(t,e)))||(this._focusedDate=new Date(t.fullDate),P(this,"datepicker-value-updated",{isKeypress:!1,value:this.value}))}_updateFocusedDateWithKeyboard(e){const t=e.keyCode;if(13===t||32===t)return P(this,"datepicker-value-updated",{keyCode:t,isKeypress:!0,value:this.value}),void(this._focusedDate=new Date(this._selectedDate));if(9===t||!N.has(t))return;const a=this._selectedDate,i=A({keyCode:t,selectedDate:a,disabledDatesSet:this._disabledDatesSet,disabledDaysSet:this._disabledDaysSet,focusedDate:this._focusedDate,hasAltKey:e.altKey,maxTime:+this._max,minTime:+this._min});this._isInVisibleMonth(i,a)||(this._selectedDate=this._lastSelectedDate=i),this._focusedDate=i,this._updatingDateWithKey=!0,P(this,"datepicker-value-updated",{keyCode:t,isKeypress:!0,value:this.value})}_isInVisibleMonth(e,t){const a=e.getUTCFullYear(),i=e.getUTCMonth(),r=t.getUTCFullYear(),o=t.getUTCMonth();return a===r&&i===o}get calendarsContainer(){return this.shadowRoot.querySelector(".calendars-container")}}var le,de;se.styles=[V,Y,o` - :host { - width: 312px; - /** NOTE: Magic number as 16:9 aspect ratio does not look good */ - /* height: calc((var(--app-datepicker-width) / .66) - var(--app-datepicker-footer-height, 56px)); */ - background-color: var(--app-datepicker-bg-color, #fff); - color: var(--app-datepicker-color, #000); - border-radius: - var(--app-datepicker-border-top-left-radius, 0) - var(--app-datepicker-border-top-right-radius, 0) - var(--app-datepicker-border-bottom-right-radius, 0) - var(--app-datepicker-border-bottom-left-radius, 0); - contain: content; - overflow: hidden; - } - :host([landscape]) { - display: flex; - - /** - */ - min-width: calc(568px - 16px * 2); - width: calc(568px - 16px * 2); - } - - .datepicker-header + .datepicker-body { - border-top: 1px solid var(--app-datepicker-separator-color, #ddd); - } - :host([landscape]) > .datepicker-header + .datepicker-body { - border-top: none; - border-left: 1px solid var(--app-datepicker-separator-color, #ddd); - } - - .datepicker-header { - display: flex; - flex-direction: column; - align-items: flex-start; - - position: relative; - padding: 16px 24px; - } - :host([landscape]) > .datepicker-header { - /** :this. + :this. */ - min-width: calc(14ch + 24px * 2); - } - - .btn__year-selector, - .btn__calendar-selector { - color: var(--app-datepicker-selector-color, rgba(0, 0, 0, .55)); - cursor: pointer; - /* outline: none; */ - } - .btn__year-selector.selected, - .btn__calendar-selector.selected { - color: currentColor; - } - - /** - * NOTE: IE11-only fix. This prevents formatted focused date from overflowing the container. - */ - .datepicker-toolbar { - width: 100%; - } - - .btn__year-selector { - font-size: 16px; - font-weight: 700; - } - .btn__calendar-selector { - font-size: 36px; - font-weight: 700; - line-height: 1; - } - - .datepicker-body { - position: relative; - width: 100%; - overflow: hidden; - } - - .datepicker-body__calendar-view { - min-height: 56px; - } - - .calendar-view__month-selector { - display: flex; - align-items: center; - - position: absolute; - top: 0; - left: 0; - width: 100%; - padding: 0 8px; - z-index: 1; - } - - .month-selector-container { - max-height: 56px; - height: 100%; - } - .month-selector-container + .month-selector-container { - margin: 0 0 0 auto; - } - - .btn__month-selector { - padding: calc((56px - 24px) / 2); - /** - * NOTE: button element contains no text, only SVG. - * No extra height will incur with such setting. - */ - line-height: 0; - } - .btn__month-selector > svg { - fill: currentColor; - } - - .calendars-container { - display: flex; - justify-content: center; - - position: relative; - top: 0; - left: calc(-100%); - width: calc(100% * 3); - transform: translateZ(0); - will-change: transform; - /** - * NOTE: Required for Pointer Events API to work on touch devices. - * Native \`pan-y\` action will be fired by the browsers since we only care about the - * horizontal direction. This is great as vertical scrolling still works even when touch - * event happens on a datepicker's calendar. - */ - touch-action: pan-y; - /* outline: none; */ - } - - .year-list-view__full-list { - max-height: calc(48px * 7); - overflow-y: auto; - - scrollbar-color: var(--app-datepicker-scrollbar-thumb-bg-color, rgba(0, 0, 0, .35)) rgba(0, 0, 0, 0); - scrollbar-width: thin; - } - .year-list-view__full-list::-webkit-scrollbar { - width: 8px; - background-color: rgba(0, 0, 0, 0); - } - .year-list-view__full-list::-webkit-scrollbar-thumb { - background-color: var(--app-datepicker-scrollbar-thumb-bg-color, rgba(0, 0, 0, .35)); - border-radius: 50px; - } - .year-list-view__full-list::-webkit-scrollbar-thumb:hover { - background-color: var(--app-datepicker-scrollbar-thumb-hover-bg-color, rgba(0, 0, 0, .5)); - } - - .calendar-weekdays > th, - .weekday-label { - color: var(--app-datepicker-weekday-color, rgba(0, 0, 0, .55)); - font-weight: 400; - transform: translateZ(0); - will-change: transform; - } - - .calendar-container, - .calendar-label, - .calendar-table { - width: 100%; - } - - .calendar-container { - position: relative; - padding: 0 16px 16px; - } - - .calendar-table { - -moz-user-select: none; - -webkit-user-select: none; - user-select: none; - - border-collapse: collapse; - border-spacing: 0; - text-align: center; - } - - .calendar-label { - display: flex; - align-items: center; - justify-content: center; - - height: 56px; - font-weight: 500; - text-align: center; - } - - .calendar-weekday, - .full-calendar__day { - position: relative; - width: calc(100% / 7); - height: 0; - padding: calc(100% / 7 / 2) 0; - outline: none; - text-align: center; - } - .full-calendar__day:not(.day--disabled):focus { - outline: #000 dotted 1px; - outline: -webkit-focus-ring-color auto 1px; - } - :host([showweeknumber]) .calendar-weekday, - :host([showweeknumber]) .full-calendar__day { - width: calc(100% / 8); - padding-top: calc(100% / 8); - padding-bottom: 0; - } - :host([showweeknumber]) th.weekday-label { - padding: 0; - } - - /** - * NOTE: Interesting fact! That is ::after will trigger paint when dragging. This will trigger - * layout and paint on **ONLY** affected nodes. This is much cheaper as compared to rendering - * all :::after of all calendar day elements. When dragging the entire calendar container, - * because of all layout and paint trigger on each and every ::after, this becomes a expensive - * task for the browsers especially on low-end devices. Even though animating opacity is much - * cheaper, the technique does not work here. Adding 'will-change' will further reduce overall - * painting at the expense of memory consumption as many cells in a table has been promoted - * a its own layer. - */ - .full-calendar__day:not(.day--empty):not(.day--disabled):not(.weekday-label) { - transform: translateZ(0); - will-change: transform; - } - .full-calendar__day:not(.day--empty):not(.day--disabled):not(.weekday-label).day--focused::after, - .full-calendar__day:not(.day--empty):not(.day--disabled):not(.day--focused):not(.weekday-label):hover::after { - content: ''; - display: block; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: var(--app-datepicker-accent-color, #1a73e8); - border-radius: 50%; - opacity: 0; - pointer-events: none; - } - .full-calendar__day:not(.day--empty):not(.day--disabled):not(.weekday-label) { - cursor: pointer; - pointer-events: auto; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - } - .full-calendar__day.day--focused:not(.day--empty):not(.day--disabled):not(.weekday-label)::after, - .full-calendar__day.day--today.day--focused:not(.day--empty):not(.day--disabled):not(.weekday-label)::after { - opacity: 1; - } - - .calendar-weekday > .weekday, - .full-calendar__day > .calendar-day { - display: flex; - align-items: center; - justify-content: center; - - position: absolute; - top: 5%; - left: 5%; - width: 90%; - height: 90%; - color: currentColor; - font-size: 14px; - pointer-events: none; - z-index: 1; - } - .full-calendar__day.day--today { - color: var(--app-datepicker-accent-color, #1a73e8); - } - .full-calendar__day.day--focused, - .full-calendar__day.day--today.day--focused { - color: var(--app-datepicker-focused-day-color, #fff); - } - .full-calendar__day.day--empty, - .full-calendar__day.weekday-label, - .full-calendar__day.day--disabled > .calendar-day { - pointer-events: none; - } - .full-calendar__day.day--disabled:not(.day--today) { - color: var(--app-datepicker-disabled-day-color, rgba(0, 0, 0, .55)); - } - - .year-list-view__list-item { - position: relative; - width: 100%; - padding: 12px 16px; - text-align: center; - /** NOTE: Reduce paint when hovering and scrolling, but this increases memory usage */ - /* will-change: opacity; */ - /* outline: none; */ - } - .year-list-view__list-item::after { - content: ''; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: var(--app-datepicker-focused-year-bg-color, #000); - opacity: 0; - pointer-events: none; - } - .year-list-view__list-item:focus::after { - opacity: .05; - } - .year-list-view__list-item.year--selected { - color: var(--app-datepicker-accent-color, #1a73e8); - font-size: 24px; - font-weight: 500; - } - - @media (any-hover: hover) { - .btn__month-selector:hover, - .year-list-view__list-item:hover { - cursor: pointer; - } - .full-calendar__day:not(.day--empty):not(.day--disabled):not(.day--focused):not(.weekday-label):hover::after { - opacity: .15; - } - .year-list-view__list-item:hover::after { - opacity: .05; - } - } - - @supports (background: -webkit-canvas(squares)) { - .calendar-container { - padding: 56px 16px 16px; - } - - table > caption { - position: absolute; - top: 0; - left: 50%; - transform: translate3d(-50%, 0, 0); - will-change: transform; - } - } - `],s([l({type:Number,reflect:!0})],se.prototype,"firstDayOfWeek",void 0),s([l({type:Boolean,reflect:!0})],se.prototype,"showWeekNumber",void 0),s([l({type:String,reflect:!0})],se.prototype,"weekNumberType",void 0),s([l({type:Boolean,reflect:!0})],se.prototype,"landscape",void 0),s([l({type:String,reflect:!0})],se.prototype,"startView",null),s([l({type:String,reflect:!0})],se.prototype,"min",null),s([l({type:String,reflect:!0})],se.prototype,"max",null),s([l({type:String})],se.prototype,"value",null),s([l({type:String})],se.prototype,"locale",void 0),s([l({type:String})],se.prototype,"disabledDays",void 0),s([l({type:String})],se.prototype,"disabledDates",void 0),s([l({type:String})],se.prototype,"weekLabel",void 0),s([l({type:Boolean})],se.prototype,"inline",void 0),s([l({type:Number})],se.prototype,"dragRatio",void 0),s([l({type:Date,attribute:!1})],se.prototype,"_selectedDate",void 0),s([l({type:Date,attribute:!1})],se.prototype,"_focusedDate",void 0),s([l({type:String,attribute:!1})],se.prototype,"_startView",void 0),s([d(".year-list-view__full-list")],se.prototype,"_yearViewFullList",void 0),s([d(".btn__year-selector")],se.prototype,"_buttonSelectorYear",void 0),s([d(".year-list-view__list-item")],se.prototype,"_yearViewListItem",void 0),s([c({passive:!0})],se.prototype,"_updateYear",null),s([c({passive:!0})],se.prototype,"_updateFocusedDateWithKeyboard",null),le="app-datepicker",de=se,window.customElements&&!window.customElements.get(le)&&window.customElements.define(le,de);let ce=p([_("ha-dialog-date-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[l()],key:"value",value:void 0},{kind:"field",decorators:[l({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[l()],key:"label",value:void 0},{kind:"field",decorators:[y()],key:"_params",value:void 0},{kind:"field",decorators:[y()],key:"_value",value:void 0},{kind:"method",key:"showDialog",value:function(e){this._params=e,this._value=e.value}},{kind:"method",key:"closeDialog",value:function(){this._params=void 0,m(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){return this._params?r` - - today - - cancel - - ok - `:r``}},{kind:"method",key:"_valueChanged",value:function(e){this._value=e.detail.value}},{kind:"method",key:"_setToday",value:function(){this._value=(new Date).toLocaleDateString("en-CA")}},{kind:"method",key:"_setValue",value:function(){var e;null===(e=this._params)||void 0===e||e.onChange(this._value),this.closeDialog()}},{kind:"field",static:!0,key:"styles",value:()=>[f,o` - ha-dialog { - --dialog-content-padding: 0; - --justify-action-buttons: space-between; - } - app-datepicker { - --app-datepicker-accent-color: var(--primary-color); - --app-datepicker-bg-color: transparent; - --app-datepicker-color: var(--primary-text-color); - --app-datepicker-disabled-day-color: var(--disabled-text-color); - --app-datepicker-focused-day-color: var(--text-primary-color); - --app-datepicker-focused-year-bg-color: var(--primary-color); - --app-datepicker-selector-color: var(--secondary-text-color); - --app-datepicker-separator-color: var(--divider-color); - --app-datepicker-weekday-color: var(--secondary-text-color); - } - app-datepicker::part(calendar-day):focus { - outline: none; - } - @media all and (min-width: 450px) { - ha-dialog { - --mdc-dialog-min-width: 300px; - } - } - @media all and (max-width: 450px), all and (max-height: 500px) { - app-datepicker { - width: 100%; - } - } - `]}]}}),h);export{ce as HaDialogDatePicker}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.b5117688.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.b5117688.js.gz deleted file mode 100644 index 1f46df4..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.b5117688.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.b766dd8d.js b/custom_components/hacs/hacs_frontend_experimental/c.b766dd8d.js deleted file mode 100644 index 9957059..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.b766dd8d.js +++ /dev/null @@ -1,68 +0,0 @@ -import{U as e,Q as i,_ as a,j as r,e as t,y as l,O as o,d,n as s}from"./main-c66a9a06.js";import"./c.bbadaeea.js";import"./c.a5550d10.js";import"./c.8e28b461.js";import"./c.41d13611.js";import"./c.930daaba.js";customElements.define("ha-labeled-slider",class extends e{static get template(){return i` - - -
    [[_getTitle()]]
    -
    -
    - - -
    - - `}_getTitle(){return`${this.caption}${this.caption&&this.required?" *":""}`}static get properties(){return{caption:String,disabled:Boolean,required:Boolean,min:Number,max:Number,pin:Boolean,step:Number,helper:String,extra:{type:Boolean,value:!1},ignoreBarTouch:{type:Boolean,value:!0},icon:{type:String,value:""},value:{type:Number,notify:!0}}}});let n=a([s("ha-selector-color_temp")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t()],key:"hass",value:void 0},{kind:"field",decorators:[t()],key:"selector",value:void 0},{kind:"field",decorators:[t()],key:"value",value:void 0},{kind:"field",decorators:[t()],key:"label",value:void 0},{kind:"field",decorators:[t()],key:"helper",value:void 0},{kind:"field",decorators:[t({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[t({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){var e,i,a,r;return l` - - `}},{kind:"method",key:"_valueChanged",value:function(e){o(this,"value-changed",{value:Number(e.target.value)})}},{kind:"field",static:!0,key:"styles",value:()=>d` - ha-labeled-slider { - --ha-slider-background: -webkit-linear-gradient( - var(--float-end), - rgb(255, 160, 0) 0%, - white 50%, - rgb(166, 209, 255) 100% - ); - /* The color temp minimum value shouldn't be rendered differently. It's not "off". */ - --paper-slider-knob-start-border-color: var(--primary-color); - } - `}]}}),r);export{n as HaColorTempSelector}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.b766dd8d.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.b766dd8d.js.gz deleted file mode 100644 index 172fbc1..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.b766dd8d.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.b914d43e.js b/custom_components/hacs/hacs_frontend_experimental/c.b914d43e.js deleted file mode 100644 index 7a33a5d..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.b914d43e.js +++ /dev/null @@ -1,112 +0,0 @@ -import{x as t,z as e,M as i,f as o,i as n,e as a,B as d,D as r,ab as s,ac as c,y as l,k as m,d as h,_ as u,F as g,E as p,G as f,n as _,a4 as b}from"./main-c66a9a06.js";import{o as v}from"./c.8e28b461.js";(()=>{var t,e,i;const o=Symbol(),n=Symbol(),a=Symbol(),d=Symbol(),r=Symbol(),s=Symbol(),c=Symbol(),l=Symbol(),m=Symbol(),h=Symbol(),u=Symbol(),g=Symbol(),p=Symbol();class f{constructor(){this[t]=[],this[e]=[],this[i]=new Set}destructor(){this[m](this[a]);const t=this;t[o]=null,t[a]=null,t[n]=null}get top(){const t=this[o];return t[t.length-1]||null}push(t){t&&t!==this.top&&(this.remove(t),this[s](t),this[o].push(t))}remove(t){const e=this[o].indexOf(t);return-1!==e&&(this[o].splice(e,1),e===this[o].length&&this[s](this.top),!0)}pop(){const t=this.top;return t&&this.remove(t),t}has(t){return-1!==this[o].indexOf(t)}[(t=o,e=a,i=n,s)](t){const e=this[n],i=this[a];if(!t)return this[m](i),e.clear(),void(this[a]=[]);const o=this[h](t);if(o[o.length-1].parentNode!==document.body)throw Error("Non-connected element cannot be a blocking element");this[a]=o;const d=this[u](t);if(!i.length)return void this[l](o,d,e);let r=i.length-1,s=o.length-1;for(;r>0&&s>0&&i[r]===o[s];)r--,s--;i[r]!==o[s]&&this[c](i[r],o[s]),r>0&&this[m](i.slice(0,r)),s>0&&this[l](o.slice(0,s),d,null)}[c](t,e){const i=t[d];this[g](t)&&!t.inert&&(t.inert=!0,i.add(t)),i.has(e)&&(e.inert=!1,i.delete(e)),e[r]=t[r],e[d]=i,t[r]=void 0,t[d]=void 0}[m](t){for(const e of t){e[r].disconnect(),e[r]=void 0;const t=e[d];for(const e of t)e.inert=!1;e[d]=void 0}}[l](t,e,i){for(const o of t){const t=o.parentNode,n=t.children,a=new Set;for(let t=0;tt instanceof HTMLElement));const e=t[0];return e||null}emitNotification(t,e){const i=new CustomEvent(t,{detail:e?{action:e}:{}});this.dispatchEvent(i)}getInitialFocusEl(){const t=`[${this.initialFocusAttribute}]`,e=this.querySelector(t);if(e)return e;const i=this.primarySlot.assignedNodes({flatten:!0}),o=this.searchNodeTreesForAttribute(i,this.initialFocusAttribute);if(o)return o;const n=this.secondarySlot.assignedNodes({flatten:!0}),a=this.searchNodeTreesForAttribute(n,this.initialFocusAttribute);if(a)return a;const d=this.contentSlot.assignedNodes({flatten:!0});return this.searchNodeTreesForAttribute(d,this.initialFocusAttribute)}searchNodeTreesForAttribute(t,e){for(const i of t)if(i instanceof HTMLElement){if(i.hasAttribute(e))return i;{const t=i.querySelector(`[${e}]`);if(t)return t}}return null}createAdapter(){return Object.assign(Object.assign({},r(this.mdcRoot)),{addBodyClass:()=>document.body.style.overflow="hidden",removeBodyClass:()=>document.body.style.overflow="",areButtonsStacked:()=>this.stacked,clickDefaultButton:()=>{const t=this.primaryButton;t&&t.click()},eventTargetMatches:(t,e)=>!!t&&s(t,e),getActionFromEvent:t=>{if(!t.target)return"";const e=c(t.target,`[${this.actionAttribute}]`);return e&&e.getAttribute(this.actionAttribute)},getInitialFocusEl:()=>this.getInitialFocusEl(),isContentScrollable:()=>{const t=this.contentElement;return!!t&&t.scrollHeight>t.offsetHeight},notifyClosed:t=>this.emitNotification("closed",t),notifyClosing:t=>{this.closingDueToDisconnect||(this.open=!1),this.emitNotification("closing",t)},notifyOpened:()=>this.emitNotification("opened"),notifyOpening:()=>{this.open=!0,this.emitNotification("opening")},reverseButtons:()=>{},releaseFocus:()=>{T.remove(this)},trapFocus:t=>{this.isConnected&&(T.push(this),t&&t.focus())},registerContentEventHandler:(t,e)=>{this.contentElement.addEventListener(t,e)},deregisterContentEventHandler:(t,e)=>{this.contentElement.removeEventListener(t,e)},isScrollableContentAtTop:()=>{const t=this.contentElement;return!!t&&0===t.scrollTop},isScrollableContentAtBottom:()=>{const t=this.contentElement;return!!t&&Math.ceil(t.scrollHeight-t.scrollTop)===t.clientHeight},registerWindowEventHandler:(t,e)=>{window.addEventListener(t,e,k())},deregisterWindowEventHandler:(t,e)=>{window.removeEventListener(t,e,k())}})}render(){const t={[S.STACKED]:this.stacked};let e=l``;this.heading&&(e=this.renderHeading());const i={"mdc-dialog__actions":!this.hideActions};return l` -
    -
    -
    - ${e} -
    - -
    -
    - - - - - - -
    -
    -
    -
    -
    `}renderHeading(){return l` -

    ${this.heading}

    `}firstUpdated(){super.firstUpdated(),this.mdcFoundation.setAutoStackButtons(!0),this.initialSupressDefaultPressSelector?this.suppressDefaultPressSelector=this.initialSupressDefaultPressSelector:this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,"mwc-textarea","mwc-menu mwc-list-item","mwc-select mwc-list-item"].join(", "),this.boundHandleClick=this.mdcFoundation.handleClick.bind(this.mdcFoundation),this.boundHandleKeydown=this.mdcFoundation.handleKeydown.bind(this.mdcFoundation),this.boundHandleDocumentKeydown=this.mdcFoundation.handleDocumentKeydown.bind(this.mdcFoundation)}connectedCallback(){super.connectedCallback(),this.open&&this.mdcFoundation&&!this.mdcFoundation.isOpen()&&(this.setEventListeners(),this.mdcFoundation.open())}disconnectedCallback(){super.disconnectedCallback(),this.open&&this.mdcFoundation&&(this.removeEventListeners(),this.closingDueToDisconnect=!0,this.mdcFoundation.close(this.currentAction||this.defaultAction),this.closingDueToDisconnect=!1,this.currentAction=void 0,T.remove(this))}forceLayout(){this.mdcFoundation.layout()}focus(){const t=this.getInitialFocusEl();t&&t.focus()}blur(){if(!this.shadowRoot)return;const t=this.shadowRoot.activeElement;if(t)t instanceof HTMLElement&&t.blur();else{const t=this.getRootNode(),e=t instanceof Document?t.activeElement:null;e instanceof HTMLElement&&e.blur()}}setEventListeners(){this.boundHandleClick&&this.mdcRoot.addEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.addEventListener("keydown",this.boundHandleKeydown,k()),this.boundHandleDocumentKeydown&&document.addEventListener("keydown",this.boundHandleDocumentKeydown,k())}removeEventListeners(){this.boundHandleClick&&this.mdcRoot.removeEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.removeEventListener("keydown",this.boundHandleKeydown),this.boundHandleDocumentKeydown&&document.removeEventListener("keydown",this.boundHandleDocumentKeydown)}close(){this.open=!1}show(){this.open=!0}}o([n(".mdc-dialog")],I.prototype,"mdcRoot",void 0),o([n('slot[name="primaryAction"]')],I.prototype,"primarySlot",void 0),o([n('slot[name="secondaryAction"]')],I.prototype,"secondarySlot",void 0),o([n("#contentSlot")],I.prototype,"contentSlot",void 0),o([n(".mdc-dialog__content")],I.prototype,"contentElement",void 0),o([n(".mdc-container")],I.prototype,"conatinerElement",void 0),o([a({type:Boolean})],I.prototype,"hideActions",void 0),o([a({type:Boolean}),v((function(){this.forceLayout()}))],I.prototype,"stacked",void 0),o([a({type:String})],I.prototype,"heading",void 0),o([a({type:String}),v((function(t){this.mdcFoundation.setScrimClickAction(t)}))],I.prototype,"scrimClickAction",void 0),o([a({type:String}),v((function(t){this.mdcFoundation.setEscapeKeyAction(t)}))],I.prototype,"escapeKeyAction",void 0),o([a({type:Boolean,reflect:!0}),v((function(t){this.mdcFoundation&&this.isConnected&&(t?(this.setEventListeners(),this.mdcFoundation.open()):(this.removeEventListeners(),this.mdcFoundation.close(this.currentAction||this.defaultAction),this.currentAction=void 0))}))],I.prototype,"open",void 0),o([a()],I.prototype,"defaultAction",void 0),o([a()],I.prototype,"actionAttribute",void 0),o([a()],I.prototype,"initialFocusAttribute",void 0);const O=h`.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0,0,0,.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2),0px 24px 38px 3px rgba(0, 0, 0, 0.14),0px 9px 46px 8px rgba(0,0,0,.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;-webkit-overflow-scrolling:touch}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}#actions:not(.mdc-dialog__actions){display:none}.mdc-dialog__surface{box-shadow:var(--mdc-dialog-box-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}@media(min-width: 560px){.mdc-dialog .mdc-dialog__surface{max-width:560px;max-width:var(--mdc-dialog-max-width, 560px)}}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32);background-color:var(--mdc-dialog-scrim-color, rgba(0, 0, 0, 0.32))}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87);color:var(--mdc-dialog-heading-ink-color, rgba(0, 0, 0, 0.87))}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6);color:var(--mdc-dialog-content-ink-color, rgba(0, 0, 0, 0.6))}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12))}.mdc-dialog .mdc-dialog__surface{min-width:280px;min-width:var(--mdc-dialog-min-width, 280px)}.mdc-dialog .mdc-dialog__surface{max-height:var(--mdc-dialog-max-height, calc(100% - 32px))}#actions ::slotted(*){margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){margin-left:0;margin-right:8px}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){text-align:left}.mdc-dialog--stacked #actions{flex-direction:column-reverse}.mdc-dialog--stacked #actions *:not(:last-child) ::slotted(*){flex-basis:.000000001px;margin-top:12px}`,D=(t,e)=>l` -
    ${e}
    - -`;u([_("ha-dialog")],(function(t,e){class i extends e{constructor(...e){super(...e),t(this)}}return{F:i,d:[{kind:"field",key:g,value:void 0},{kind:"method",key:"scrollToPos",value:function(t,e){var i;null===(i=this.contentElement)||void 0===i||i.scrollTo(t,e)}},{kind:"method",key:"renderHeading",value:function(){return l` ${p(f(i.prototype),"renderHeading",this).call(this)} `}},{kind:"field",static:!0,key:"styles",value:()=>[O,h` - .mdc-dialog { - --mdc-dialog-scroll-divider-color: var(--divider-color); - z-index: var(--dialog-z-index, 7); - -webkit-backdrop-filter: var(--dialog-backdrop-filter, none); - backdrop-filter: var(--dialog-backdrop-filter, none); - --mdc-dialog-box-shadow: var(--dialog-box-shadow, none); - --mdc-typography-headline6-font-weight: 400; - --mdc-typography-headline6-font-size: 1.574rem; - } - .mdc-dialog__actions { - justify-content: var(--justify-action-buttons, flex-end); - padding-bottom: max(env(safe-area-inset-bottom), 24px); - } - .mdc-dialog__actions span:nth-child(1) { - flex: var(--secondary-action-button-flex, unset); - } - .mdc-dialog__actions span:nth-child(2) { - flex: var(--primary-action-button-flex, unset); - } - .mdc-dialog__container { - align-items: var(--vertical-align-dialog, center); - } - .mdc-dialog__title { - padding: 24px 24px 0 24px; - } - .mdc-dialog__actions { - padding: 0 24px 24px 24px; - } - .mdc-dialog__title::before { - display: block; - height: 0px; - } - .mdc-dialog .mdc-dialog__content { - position: var(--dialog-content-position, relative); - padding: var(--dialog-content-padding, 24px); - } - :host([hideactions]) .mdc-dialog .mdc-dialog__content { - padding-bottom: max( - var(--dialog-content-padding, 24px), - env(safe-area-inset-bottom) - ); - } - .mdc-dialog .mdc-dialog__surface { - position: var(--dialog-surface-position, relative); - top: var(--dialog-surface-top); - margin-top: var(--dialog-surface-margin-top); - min-height: var(--mdc-dialog-min-height, auto); - border-radius: var(--ha-dialog-border-radius, 28px); - } - :host([flexContent]) .mdc-dialog .mdc-dialog__content { - display: flex; - flex-direction: column; - } - .header_button { - position: absolute; - right: 16px; - top: 14px; - text-decoration: none; - color: inherit; - } - .header_title { - margin-right: 32px; - margin-inline-end: 32px; - margin-inline-start: initial; - direction: var(--direction); - } - .header_button { - inset-inline-start: initial; - inset-inline-end: 16px; - direction: var(--direction); - } - .dialog-actions { - inset-inline-start: initial !important; - inset-inline-end: 0px !important; - direction: var(--direction); - } - `]}]}}),I);export{D as c}; diff --git a/custom_components/hacs/hacs_frontend_experimental/c.b914d43e.js.gz b/custom_components/hacs/hacs_frontend_experimental/c.b914d43e.js.gz deleted file mode 100644 index 8a3cf94..0000000 Binary files a/custom_components/hacs/hacs_frontend_experimental/c.b914d43e.js.gz and /dev/null differ diff --git a/custom_components/hacs/hacs_frontend_experimental/c.ba59af11.js b/custom_components/hacs/hacs_frontend_experimental/c.ba59af11.js deleted file mode 100644 index 3b4dc47..0000000 --- a/custom_components/hacs/hacs_frontend_experimental/c.ba59af11.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,a as n,g as t}from"./c.743a15a1.js";import{y as r}from"./main-c66a9a06.js";import"./c.73c7fa75.js";var o=e((function(e,n){e.exports=function(){function e(n){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(n)}function n(e,t){return n=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},n(e,t)}function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,a){return r=t()?Reflect.construct:function(e,t,r){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return r&&n(a,r.prototype),a},r.apply(null,arguments)}function o(e){return a(e)||i(e)||s(e)||u()}function a(e){if(Array.isArray(e))return l(e)}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e,n){if(e){if("string"==typeof e)return l(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,n):void 0}}function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?t-1:0),o=1;o/gm),K=_(/\${[\w\W]*}/gm),X=_(/^data-[\-\w.\u00B7-\uFFFF]/),J=_(/^aria-[\-\w]+$/),V=_(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=_(/^(?:\w+script|data):/i),ne=_(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),te=_(/^html$/i),re=function(){return"undefined"==typeof window?null:window},oe=function(n,t){if("object"!==e(n)||"function"!=typeof n.createPolicy)return null;var r=null,o="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(o)&&(r=t.currentScript.getAttribute(o));var a="dompurify"+(r?"#"+r:"");try{return n.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function ae(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re(),t=function(e){return ae(e)};if(t.version="2.4.1",t.removed=[],!n||!n.document||9!==n.document.nodeType)return t.isSupported=!1,t;var r=n.document,a=n.document,i=n.DocumentFragment,s=n.HTMLTemplateElement,l=n.Node,u=n.Element,c=n.NodeFilter,d=n.NamedNodeMap,h=void 0===d?n.NamedNodeMap||n.MozNamedAttrMap:d,p=n.HTMLFormElement,m=n.DOMParser,_=n.trustedTypes,f=u.prototype,b=R(f,"cloneNode"),w=R(f,"nextSibling"),k=R(f,"childNodes"),T=R(f,"parentNode");if("function"==typeof s){var N=a.createElement("template");N.content&&N.content.ownerDocument&&(a=N.content.ownerDocument)}var ie=oe(_,r),se=ie?ie.createHTML(""):"",le=a,ue=le.implementation,ce=le.createNodeIterator,de=le.createDocumentFragment,he=le.getElementsByTagName,pe=r.importNode,me={};try{me=j(a).documentMode?a.documentMode:{}}catch(e){}var ge={};t.isSupported="function"==typeof T&&ue&&void 0!==ue.createHTMLDocument&&9!==me;var _e,fe,be=Q,we=Y,ke=K,ye=X,De=J,Ae=ee,xe=ne,ve=V,Ee=null,Ce=O({},[].concat(o(M),o(I),o(L),o(U),o(q))),Fe=null,Be=O({},[].concat(o(H),o(Z),o(G),o(W))),ze=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,Te=null,Ne=!0,Oe=!0,je=!1,Re=!1,Me=!1,Ie=!1,Le=!1,$e=!1,Ue=!1,Pe=!1,qe=!0,He=!1,Ze="user-content-",Ge=!0,We=!1,Qe={},Ye=null,Ke=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Xe=null,Je=O({},["audio","video","img","source","image","track"]),Ve=null,en=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nn="http://www.w3.org/1998/Math/MathML",tn="http://www.w3.org/2000/svg",rn="http://www.w3.org/1999/xhtml",on=rn,an=!1,sn=null,ln=O({},[nn,tn,rn],v),un=["application/xhtml+xml","text/html"],cn="text/html",dn=null,hn=a.createElement("form"),pn=function(e){return e instanceof RegExp||e instanceof Function},mn=function(n){dn&&dn===n||(n&&"object"===e(n)||(n={}),n=j(n),_e=_e=-1===un.indexOf(n.PARSER_MEDIA_TYPE)?cn:n.PARSER_MEDIA_TYPE,fe="application/xhtml+xml"===_e?v:x,Ee="ALLOWED_TAGS"in n?O({},n.ALLOWED_TAGS,fe):Ce,Fe="ALLOWED_ATTR"in n?O({},n.ALLOWED_ATTR,fe):Be,sn="ALLOWED_NAMESPACES"in n?O({},n.ALLOWED_NAMESPACES,v):ln,Ve="ADD_URI_SAFE_ATTR"in n?O(j(en),n.ADD_URI_SAFE_ATTR,fe):en,Xe="ADD_DATA_URI_TAGS"in n?O(j(Je),n.ADD_DATA_URI_TAGS,fe):Je,Ye="FORBID_CONTENTS"in n?O({},n.FORBID_CONTENTS,fe):Ke,Se="FORBID_TAGS"in n?O({},n.FORBID_TAGS,fe):{},Te="FORBID_ATTR"in n?O({},n.FORBID_ATTR,fe):{},Qe="USE_PROFILES"in n&&n.USE_PROFILES,Ne=!1!==n.ALLOW_ARIA_ATTR,Oe=!1!==n.ALLOW_DATA_ATTR,je=n.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=n.SAFE_FOR_TEMPLATES||!1,Me=n.WHOLE_DOCUMENT||!1,$e=n.RETURN_DOM||!1,Ue=n.RETURN_DOM_FRAGMENT||!1,Pe=n.RETURN_TRUSTED_TYPE||!1,Le=n.FORCE_BODY||!1,qe=!1!==n.SANITIZE_DOM,He=n.SANITIZE_NAMED_PROPS||!1,Ge=!1!==n.KEEP_CONTENT,We=n.IN_PLACE||!1,ve=n.ALLOWED_URI_REGEXP||ve,on=n.NAMESPACE||rn,n.CUSTOM_ELEMENT_HANDLING&&pn(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ze.tagNameCheck=n.CUSTOM_ELEMENT_HANDLING.tagNameCheck),n.CUSTOM_ELEMENT_HANDLING&&pn(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ze.attributeNameCheck=n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),n.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ze.allowCustomizedBuiltInElements=n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(Oe=!1),Ue&&($e=!0),Qe&&(Ee=O({},o(q)),Fe=[],!0===Qe.html&&(O(Ee,M),O(Fe,H)),!0===Qe.svg&&(O(Ee,I),O(Fe,Z),O(Fe,W)),!0===Qe.svgFilters&&(O(Ee,L),O(Fe,Z),O(Fe,W)),!0===Qe.mathMl&&(O(Ee,U),O(Fe,G),O(Fe,W))),n.ADD_TAGS&&(Ee===Ce&&(Ee=j(Ee)),O(Ee,n.ADD_TAGS,fe)),n.ADD_ATTR&&(Fe===Be&&(Fe=j(Fe)),O(Fe,n.ADD_ATTR,fe)),n.ADD_URI_SAFE_ATTR&&O(Ve,n.ADD_URI_SAFE_ATTR,fe),n.FORBID_CONTENTS&&(Ye===Ke&&(Ye=j(Ye)),O(Ye,n.FORBID_CONTENTS,fe)),Ge&&(Ee["#text"]=!0),Me&&O(Ee,["html","head","body"]),Ee.table&&(O(Ee,["tbody"]),delete Se.tbody),g&&g(n),dn=n)},gn=O({},["mi","mo","mn","ms","mtext"]),_n=O({},["foreignobject","desc","title","annotation-xml"]),fn=O({},["title","style","font","a","script"]),bn=O({},I);O(bn,L),O(bn,$);var wn=O({},U);O(wn,P);var kn=function(e){var n=T(e);n&&n.tagName||(n={namespaceURI:on,tagName:"template"});var t=x(e.tagName),r=x(n.tagName);return!!sn[e.namespaceURI]&&(e.namespaceURI===tn?n.namespaceURI===rn?"svg"===t:n.namespaceURI===nn?"svg"===t&&("annotation-xml"===r||gn[r]):Boolean(bn[t]):e.namespaceURI===nn?n.namespaceURI===rn?"math"===t:n.namespaceURI===tn?"math"===t&&_n[r]:Boolean(wn[t]):e.namespaceURI===rn?!(n.namespaceURI===tn&&!_n[r])&&!(n.namespaceURI===nn&&!gn[r])&&!wn[t]&&(fn[t]||!bn[t]):!("application/xhtml+xml"!==_e||!sn[e.namespaceURI]))},yn=function(e){A(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(n){try{e.outerHTML=se}catch(n){e.remove()}}},Dn=function(e,n){try{A(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){A(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!Fe[e])if($e||Ue)try{yn(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},An=function(e){var n,t;if(Le)e=""+e;else{var r=E(e,/^[\r\n\t ]+/);t=r&&r[0]}"application/xhtml+xml"===_e&&on===rn&&(e=''+e+"");var o=ie?ie.createHTML(e):e;if(on===rn)try{n=(new m).parseFromString(o,_e)}catch(e){}if(!n||!n.documentElement){n=ue.createDocument(on,"template",null);try{n.documentElement.innerHTML=an?"":o}catch(e){}}var i=n.body||n.documentElement;return e&&t&&i.insertBefore(a.createTextNode(t),i.childNodes[0]||null),on===rn?he.call(n,Me?"html":"body")[0]:Me?n.documentElement:i},xn=function(e){return ce.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},vn=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},En=function(n){return"object"===e(l)?n instanceof l:n&&"object"===e(n)&&"number"==typeof n.nodeType&&"string"==typeof n.nodeName},Cn=function(e,n,r){ge[e]&&y(ge[e],(function(e){e.call(t,n,r,dn)}))},Fn=function(e){var n;if(Cn("beforeSanitizeElements",e,null),vn(e))return yn(e),!0;if(z(/[\u0080-\uFFFF]/,e.nodeName))return yn(e),!0;var r=fe(e.nodeName);if(Cn("uponSanitizeElement",e,{tagName:r,allowedTags:Ee}),e.hasChildNodes()&&!En(e.firstElementChild)&&(!En(e.content)||!En(e.content.firstElementChild))&&z(/<[/\w]/g,e.innerHTML)&&z(/<[/\w]/g,e.textContent))return yn(e),!0;if("select"===r&&z(/