diff --git a/.dockerignore b/.dockerignore index e168e93..6bbb687 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,4 +9,89 @@ media/uploads/*.rdf media/uploads/*.ttl .secret .env -.docker \ No newline at end of file +.docker +.coverage + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST +node_modules +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py \ No newline at end of file diff --git a/.gitignore b/.gitignore index e0235b5..dc60f7a 100644 --- a/.gitignore +++ b/.gitignore @@ -185,3 +185,4 @@ hansi.* media/relations.gexf edges.csv nodes.csv +node_modules/ \ No newline at end of file diff --git a/README.md b/README.md index 54b0b2e..29c2d6e 100644 --- a/README.md +++ b/README.md @@ -18,4 +18,11 @@ maybe in future also with PMB CRUD included ## set up new instance -in order to avoid errors on a new instance you'll need to set an environment variable `PMB_NEW=whatever`. After you run the inital `python manage.py migrate` you should `unset PMB_NEW` \ No newline at end of file +in order to avoid errors on a new instance you'll need to set an environment variable `PMB_NEW=whatever`. After you run the inital `python manage.py migrate` you should `unset PMB_NEW` + + +## vite + +* bundling js-code (used for network-vis) is not part of the docker-setup +* for development make sure the vite-dev-server is running `pnpm run vite` +* for building new bundle, run `pn run build` \ No newline at end of file diff --git a/dumper/templates/dumper/network.html b/dumper/templates/dumper/network.html new file mode 100644 index 0000000..b428538 --- /dev/null +++ b/dumper/templates/dumper/network.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} +{% load static %} +{% load django_vite %} + +{% block title %}Vite{% endblock %} +{% block scripts %} +{% vite_hmr_client %} +{% vite_asset 'js/main.js' %} +{% endblock scripts %} + +{% block content %} +
+

Netzwerk aller Verbindungen

+
+ +
+ +
+
+ Lade die Netzwerkdaten... +
+
+
+
+ +
+
+
+ +
+
+ + +
+{% endblock %} \ No newline at end of file diff --git a/dumper/tests.py b/dumper/tests.py index 49903ad..46f6118 100644 --- a/dumper/tests.py +++ b/dumper/tests.py @@ -72,3 +72,8 @@ def test_09_imprint(self): url = reverse("dumper:export") response = client.get(url) self.assertEqual(response.status_code, 200) + + def test_10_network(self): + url = reverse("dumper:network") + response = client.get(url) + self.assertEqual(response.status_code, 200) diff --git a/dumper/urls.py b/dumper/urls.py index aaf7a01..c5a0591 100644 --- a/dumper/urls.py +++ b/dumper/urls.py @@ -7,6 +7,7 @@ urlpatterns = [ path("", views.HomePageView.as_view(), name="home"), path("about/", views.AboutView.as_view(), name="about"), + path("network/", views.NetworkView.as_view(), name="network"), path("export/", views.ExportView.as_view(), name="export"), path("imprint/", views.ImprintView.as_view(), name="imprint"), path("login/", views.user_login, name="user_login"), diff --git a/dumper/views.py b/dumper/views.py index 5a58efd..6d7e29c 100644 --- a/dumper/views.py +++ b/dumper/views.py @@ -1,3 +1,5 @@ +from typing import Any +from django.apps import apps from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render @@ -26,6 +28,27 @@ class ExportView(TemplateView): template_name = "dumper/export.html" +class NetworkView(TemplateView): + template_name = "dumper/network.html" + + def get_context_data(self, **kwargs: Any) -> dict[str, Any]: + context = super().get_context_data(**kwargs) + MODELS = list(apps.all_models["apis_entities"].values()) + model_list = [] + for x in MODELS: + try: + item = { + "color": x.get_color(), + "icon": x.get_icon(), + "name": x._meta.verbose_name, + } + except AttributeError: + continue + model_list.append(item) + context["model_list"] = model_list + return context + + class ImprintView(TemplateView): template_name = "dumper/imprint.html" diff --git a/package.json b/package.json new file mode 100644 index 0000000..04dfee5 --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "vite-project", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "vite": "^5.1.4" + }, + "dependencies": { + "@cosmograph/cosmograph": "^1.3.1", + "d3": "^7.8.5" + } +} diff --git a/pmb/settings.py b/pmb/settings.py index 0ce631e..345c95e 100644 --- a/pmb/settings.py +++ b/pmb/settings.py @@ -14,8 +14,10 @@ # SECURITY WARNING: don't run with debug turned on in production! if os.environ.get("DEBUG"): DEBUG = True + VITE_DEV = True else: DEBUG = False + VITE_DEV = False ALLOWED_HOSTS = ["*"] FIXTURE_DIRS = [os.path.join(BASE_DIR, "fixtures")] @@ -46,6 +48,7 @@ "crispy_bootstrap5", "django_tables2", "django_filters", + "django_vite", "apis_core.apis_entities", "apis_core.apis_metainfo", "apis_core.apis_relations", @@ -139,6 +142,7 @@ STATICFILES_DIRS = [ BASE_DIR / "static", + BASE_DIR / "static" / "vite", ] # Internationalization # https://docs.djangoproject.com/en/3.2/topics/i18n/ @@ -298,3 +302,7 @@ ], }, } + +DJANGO_VITE = { + "default": {"dev_mode": VITE_DEV, "manifest_path": "static/vite/manifest.info"} +} diff --git a/pmb/urls.py b/pmb/urls.py index db699e7..f2aab5c 100644 --- a/pmb/urls.py +++ b/pmb/urls.py @@ -6,12 +6,23 @@ from apis_core.apis_entities import resolver_views -urlpatterns = [ - path("apis/", include("apis_core.urls", namespace="apis")), - path("normdata/", include("normdata.urls", namespace="normdata")), - path("admin/", admin.site.urls), - path("arche/", include("archemd.urls", namespace="archemd")), - path("uri/", resolver_views.uri_resolver, name="uri-resolver"), - path("entity//", resolver_views.entity_resolver, name="entity-resolver"), - path("", include("dumper.urls", namespace="dumper")), -] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) +urlpatterns = ( + [ + path("apis/", include("apis_core.urls", namespace="apis")), + path("normdata/", include("normdata.urls", namespace="normdata")), + path("admin/", admin.site.urls), + path("arche/", include("archemd.urls", namespace="archemd")), + path("uri/", resolver_views.uri_resolver, name="uri-resolver"), + path( + "entity//", resolver_views.entity_resolver, name="entity-resolver" + ), + path("", include("dumper.urls", namespace="dumper")), + ] + # + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + # + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) +) + +if settings.DEBUG: + urlpatterns = urlpatterns + static( + settings.MEDIA_URL, document_root=settings.MEDIA_ROOT + ) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..cae31cb --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,448 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +devDependencies: + vite: + specifier: ^5.1.4 + version: 5.1.4 + +packages: + + /@esbuild/aix-ppc64@0.19.12: + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.12: + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.12: + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.12: + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.12: + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.12: + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.12: + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.12: + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.12: + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.12: + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.12: + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.12: + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.12: + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.12: + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm-eabi@4.12.0: + resolution: {integrity: sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.12.0: + resolution: {integrity: sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.12.0: + resolution: {integrity: sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.12.0: + resolution: {integrity: sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.12.0: + resolution: {integrity: sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.12.0: + resolution: {integrity: sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.12.0: + resolution: {integrity: sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.12.0: + resolution: {integrity: sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.12.0: + resolution: {integrity: sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.12.0: + resolution: {integrity: sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.12.0: + resolution: {integrity: sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.12.0: + resolution: {integrity: sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.12.0: + resolution: {integrity: sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: true + + /esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + dev: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors@1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss@8.4.35: + resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /rollup@4.12.0: + resolution: {integrity: sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.12.0 + '@rollup/rollup-android-arm64': 4.12.0 + '@rollup/rollup-darwin-arm64': 4.12.0 + '@rollup/rollup-darwin-x64': 4.12.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.12.0 + '@rollup/rollup-linux-arm64-gnu': 4.12.0 + '@rollup/rollup-linux-arm64-musl': 4.12.0 + '@rollup/rollup-linux-riscv64-gnu': 4.12.0 + '@rollup/rollup-linux-x64-gnu': 4.12.0 + '@rollup/rollup-linux-x64-musl': 4.12.0 + '@rollup/rollup-win32-arm64-msvc': 4.12.0 + '@rollup/rollup-win32-ia32-msvc': 4.12.0 + '@rollup/rollup-win32-x64-msvc': 4.12.0 + fsevents: 2.3.3 + dev: true + + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /vite@5.1.4: + resolution: {integrity: sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.19.12 + postcss: 8.4.35 + rollup: 4.12.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 86b9d69..ac8e886 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,7 @@ django-crispy-forms django-extensions django-model-utils django-tables2 +django-vite>=3.0.3,<4 djangorestframework pandas pylobid diff --git a/static/src/css/styles.css b/static/src/css/styles.css new file mode 100644 index 0000000..3a32a27 --- /dev/null +++ b/static/src/css/styles.css @@ -0,0 +1,20 @@ +body { + margin: 0; + padding: 3rem 0; + background: rgb(40, 43, 43); + color: white; + font-family: sans-serif; + text-align: center; +} + +#app { + display: block; + margin: 0 auto; + padding: 1rem; + background: rgb(59, 64, 64); + border-radius: 5px; + border: 1px solid gray; + box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; + width: 600px; + min-height: 300px; +} \ No newline at end of file diff --git a/static/src/js/main.js b/static/src/js/main.js new file mode 100644 index 0000000..43bed7e --- /dev/null +++ b/static/src/js/main.js @@ -0,0 +1,47 @@ +import { Cosmograph, CosmographSearch } from '@cosmograph/cosmograph' +import * as d3 from 'd3'; + +const edge_csv = "/media/edges.csv"; +const node_csv = "/media/nodes.csv"; + +const edge_promis = d3.csv(edge_csv); +const node_promis = d3.csv(node_csv); +const spinnerNode = document.getElementById("spinner"); +const legendNode = document.getElementById("legend"); +const canvas = document.createElement("div"); + canvas.style.height = "800px" + +Promise.all([edge_promis, node_promis]).then(([edge_data, node_data]) => { + const links = edge_data.map(d => ({ + source: parseInt(d.source), + target: parseInt(d.target) // Convert string to number if needed + })); + + + const nodes = node_data.map(d => ({ + id: parseInt(d.id), + label: d.label, + color: d.color + })) + + const appNode = document.getElementById("app") + + // remove spinner + spinnerNode.style.visibility = "hidden"; + legendNode.style.visibility = "visible"; + appNode.appendChild(canvas); + const searchContainer = document.createElement('div') + appNode.appendChild(searchContainer); + const config = { + nodeColor: d => d.color, + nodeLabelAccessor: d => d.label, + nodeLabelColor: "white", + hoveredNodeLabelColor: "white", + linkWidth: 2 + } + const cosmograph = new Cosmograph(canvas, config) + const search = new CosmographSearch(cosmograph, searchContainer) + cosmograph.setData(nodes, links) + search.setData(nodes) +}) + diff --git a/static/vite/browser-C1tfp1OT.js b/static/vite/browser-C1tfp1OT.js new file mode 100644 index 0000000..bfa8ba3 --- /dev/null +++ b/static/vite/browser-C1tfp1OT.js @@ -0,0 +1 @@ +import{g as a}from"./main-CE-ujooY.js";function f(t,s){for(var o=0;oe[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var c=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const i=a(c),u=f({__proto__:null,default:i},[c]);export{u as b}; diff --git a/static/vite/main-CE-ujooY.js b/static/vite/main-CE-ujooY.js new file mode 100644 index 0000000..5421aeb --- /dev/null +++ b/static/vite/main-CE-ujooY.js @@ -0,0 +1,952 @@ +var Ub=Object.defineProperty,Gb=Object.defineProperties;var jb=Object.getOwnPropertyDescriptors;var Tl=Object.getOwnPropertySymbols;var qh=Object.prototype.hasOwnProperty,Wh=Object.prototype.propertyIsEnumerable;var Hh=(i,e,t)=>e in i?Ub(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ei=(i,e)=>{for(var t in e||(e={}))qh.call(e,t)&&Hh(i,t,e[t]);if(Tl)for(var t of Tl(e))Wh.call(e,t)&&Hh(i,t,e[t]);return i},Il=(i,e)=>Gb(i,jb(e));var Xh=i=>typeof i=="symbol"?i:i+"",Yh=(i,e)=>{var t={};for(var r in i)qh.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&Tl)for(var r of Tl(i))e.indexOf(r)<0&&Wh.call(i,r)&&(t[r]=i[r]);return t};var fe=(i,e,t)=>new Promise((r,n)=>{var a=l=>{try{s(t.next(l))}catch(d){n(d)}},o=l=>{try{s(t.throw(l))}catch(d){n(d)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,o);s((t=t.apply(i,e)).next())});var Zc="http://www.w3.org/1999/xhtml";const Zh={svg:"http://www.w3.org/2000/svg",xhtml:Zc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _d(i){var e=i+="",t=e.indexOf(":");return t>=0&&(e=i.slice(0,t))!=="xmlns"&&(i=i.slice(t+1)),Zh.hasOwnProperty(e)?{space:Zh[e],local:i}:i}function Vb(i){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Zc&&e.documentElement.namespaceURI===Zc?e.createElement(i):e.createElementNS(t,i)}}function Hb(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function Eg(i){var e=_d(i);return(e.local?Hb:Vb)(e)}function qb(){}function Su(i){return i==null?qb:function(){return this.querySelector(i)}}function Wb(i){typeof i!="function"&&(i=Su(i));for(var e=this._groups,t=e.length,r=new Array(t),n=0;n=I&&(I=k+1);!(M=x[I])&&++I=0;)(o=r[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function b_(i){i||(i=__);function e(u,f){return u&&f?i(u.__data__,f.__data__):!u-!f}for(var t=this._groups,r=t.length,n=new Array(r),a=0;ae?1:i>=e?0:NaN}function y_(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function x_(){return Array.from(this)}function w_(){for(var i=this._groups,e=0,t=i.length;e1?this.each((e==null?R_:typeof e=="function"?N_:F_)(i,e,t==null?"":t)):Co(this.node(),i)}function Co(i,e){return i.style.getPropertyValue(e)||kg(i).getComputedStyle(i,null).getPropertyValue(e)}function D_(i){return function(){delete this[i]}}function M_(i,e){return function(){this[i]=e}}function z_(i,e){return function(){var t=e.apply(this,arguments);t==null?delete this[i]:this[i]=t}}function B_(i,e){return arguments.length>1?this.each((e==null?D_:typeof e=="function"?z_:M_)(i,e)):this.node()[i]}function $g(i){return i.trim().split(/^|\s+/)}function Eu(i){return i.classList||new Lg(i)}function Lg(i){this._node=i,this._names=$g(i.getAttribute("class")||"")}Lg.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function Og(i,e){for(var t=Eu(i),r=-1,n=e.length;++r=0&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}function my(i){return function(){var e=this.__on;if(e){for(var t=0,r=-1,n=e.length,a;t{}};function Tu(){for(var i=0,e=arguments.length,t={},r;i=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}Gl.prototype=Tu.prototype={constructor:Gl,on:function(i,e){var t=this._,r=Ey(i+"",t),n,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(n),r=0,n,a;r=0&&i._call.call(void 0,e),i=i._next;--ko}function Jh(){Ca=(Ql=As.now())+yd,ko=bs=0;try{Ay()}finally{ko=0,ky(),Ca=0}}function Cy(){var i=As.now(),e=i-Ql;e>Pg&&(yd-=e,Ql=i)}function ky(){for(var i,e=Jl,t,r=1/0;e;)e._call?(r>e._time&&(r=e._time),i=e,e=e._next):(t=e._next,e._next=null,e=i?i._next=t:Jl=t);_s=i,Kc(r)}function Kc(i){if(!ko){bs&&(bs=clearTimeout(bs));var e=i-Ca;e>24?(i<1/0&&(bs=setTimeout(Jh,i-As.now()-yd)),as&&(as=clearInterval(as))):(as||(Ql=As.now(),as=setInterval(Cy,Pg)),ko=1,Dg(Jh))}}function Qh(i,e,t){var r=new ed;return e=e==null?0:+e,r.restart(n=>{r.stop(),i(n+e)},e,t),r}var $y=Tu("start","end","cancel","interrupt"),Ly=[],zg=0,em=1,Jc=2,jl=3,tm=4,Qc=5,Vl=6;function xd(i,e,t,r,n,a){var o=i.__transition;if(!o)i.__transition={};else if(t in o)return;Oy(i,t,{name:e,index:r,group:n,on:$y,tween:Ly,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:zg})}function Au(i,e){var t=en(i,e);if(t.state>zg)throw new Error("too late; already scheduled");return t}function fn(i,e){var t=en(i,e);if(t.state>jl)throw new Error("too late; already running");return t}function en(i,e){var t=i.__transition;if(!t||!(t=t[e]))throw new Error("transition not found");return t}function Oy(i,e,t){var r=i.__transition,n;r[e]=t,t.timer=Mg(a,0,t.time);function a(d){t.state=em,t.timer.restart(o,t.delay,t.time),t.delay<=d&&o(d-t.delay)}function o(d){var c,u,f,m;if(t.state!==em)return l();for(c in r)if(m=r[c],m.name===t.name){if(m.state===jl)return Qh(o);m.state===tm?(m.state=Vl,m.timer.stop(),m.on.call("interrupt",i,i.__data__,m.index,m.group),delete r[c]):+cJc&&r.state>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?Al(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?Al(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ny.exec(i))?new Ar(e[1],e[2],e[3],1):(e=Py.exec(i))?new Ar(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Dy.exec(i))?Al(e[1],e[2],e[3],e[4]):(e=My.exec(i))?Al(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=zy.exec(i))?lm(e[1],e[2]/100,e[3]/100,1):(e=By.exec(i))?lm(e[1],e[2]/100,e[3]/100,e[4]):im.hasOwnProperty(i)?am(im[i]):i==="transparent"?new Ar(NaN,NaN,NaN,0):null}function am(i){return new Ar(i>>16&255,i>>8&255,i&255,1)}function Al(i,e,t,r){return r<=0&&(i=e=t=NaN),new Ar(i,e,t,r)}function jy(i){return i instanceof Ms||(i=An(i)),i?(i=i.rgb(),new Ar(i.r,i.g,i.b,i.opacity)):new Ar}function eu(i,e,t,r){return arguments.length===1?jy(i):new Ar(i,e,t,r==null?1:r)}function Ar(i,e,t,r){this.r=+i,this.g=+e,this.b=+t,this.opacity=+r}Cu(Ar,eu,Bg(Ms,{brighter(i){return i=i==null?td:Math.pow(td,i),new Ar(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?Cs:Math.pow(Cs,i),new Ar(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new Ar(Ta(this.r),Ta(this.g),Ta(this.b),id(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:om,formatHex:om,formatHex8:Vy,formatRgb:sm,toString:sm}));function om(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}`}function Vy(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}${Sa((isNaN(this.opacity)?1:this.opacity)*255)}`}function sm(){const i=id(this.opacity);return`${i===1?"rgb(":"rgba("}${Ta(this.r)}, ${Ta(this.g)}, ${Ta(this.b)}${i===1?")":`, ${i})`}`}function id(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function Ta(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function Sa(i){return i=Ta(i),(i<16?"0":"")+i.toString(16)}function lm(i,e,t,r){return r<=0?i=e=t=NaN:t<=0||t>=1?i=e=NaN:e<=0&&(i=NaN),new Yr(i,e,t,r)}function Ug(i){if(i instanceof Yr)return new Yr(i.h,i.s,i.l,i.opacity);if(i instanceof Ms||(i=An(i)),!i)return new Yr;if(i instanceof Yr)return i;i=i.rgb();var e=i.r/255,t=i.g/255,r=i.b/255,n=Math.min(e,t,r),a=Math.max(e,t,r),o=NaN,s=a-n,l=(a+n)/2;return s?(e===a?o=(t-r)/s+(t0&&l<1?0:o,new Yr(o,s,l,i.opacity)}function Hy(i,e,t,r){return arguments.length===1?Ug(i):new Yr(i,e,t,r==null?1:r)}function Yr(i,e,t,r){this.h=+i,this.s=+e,this.l=+t,this.opacity=+r}Cu(Yr,Hy,Bg(Ms,{brighter(i){return i=i==null?td:Math.pow(td,i),new Yr(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?Cs:Math.pow(Cs,i),new Yr(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*e,n=2*t-r;return new Ar(Ec(i>=240?i-240:i+120,n,r),Ec(i,n,r),Ec(i<120?i+240:i-120,n,r),this.opacity)},clamp(){return new Yr(dm(this.h),Cl(this.s),Cl(this.l),id(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=id(this.opacity);return`${i===1?"hsl(":"hsla("}${dm(this.h)}, ${Cl(this.s)*100}%, ${Cl(this.l)*100}%${i===1?")":`, ${i})`}`}}));function dm(i){return i=(i||0)%360,i<0?i+360:i}function Cl(i){return Math.max(0,Math.min(1,i||0))}function Ec(i,e,t){return(i<60?e+(t-e)*i/60:i<180?t:i<240?e+(t-e)*(240-i)/60:e)*255}const ku=i=>()=>i;function qy(i,e){return function(t){return i+t*e}}function Wy(i,e,t){return i=Math.pow(i,t),e=Math.pow(e,t)-i,t=1/t,function(r){return Math.pow(i+r*e,t)}}function Xy(i){return(i=+i)==1?Gg:function(e,t){return t-e?Wy(e,t,i):ku(isNaN(e)?t:e)}}function Gg(i,e){var t=e-i;return t?qy(i,t):ku(isNaN(i)?e:i)}const rd=function i(e){var t=Xy(e);function r(n,a){var o=t((n=eu(n)).r,(a=eu(a)).r),s=t(n.g,a.g),l=t(n.b,a.b),d=Gg(n.opacity,a.opacity);return function(c){return n.r=o(c),n.g=s(c),n.b=l(c),n.opacity=d(c),n+""}}return r.gamma=i,r}(1);function Yy(i,e){e||(e=[]);var t=i?Math.min(e.length,i.length):0,r=e.slice(),n;return function(a){for(n=0;nt&&(a=e.slice(t,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Xr(r,n)})),t=Tc.lastIndex;return t180?c+=360:c-d>180&&(d+=360),f.push({i:u.push(n(u)+"rotate(",null,r)-2,x:Xr(d,c)})):c&&u.push(n(u)+"rotate("+c+r)}function s(d,c,u,f){d!==c?f.push({i:u.push(n(u)+"skewX(",null,r)-2,x:Xr(d,c)}):c&&u.push(n(u)+"skewX("+c+r)}function l(d,c,u,f,m,p){if(d!==u||c!==f){var y=m.push(n(m)+"scale(",null,",",null,")");p.push({i:y-4,x:Xr(d,u)},{i:y-2,x:Xr(c,f)})}else(u!==1||f!==1)&&m.push(n(m)+"scale("+u+","+f+")")}return function(d,c){var u=[],f=[];return d=i(d),c=i(c),a(d.translateX,d.translateY,c.translateX,c.translateY,u,f),o(d.rotate,c.rotate,u,f),s(d.skewX,c.skewX,u,f),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,u,f),d=c=null,function(m){for(var p=-1,y=f.length,x;++p=0&&(e=e.slice(0,t)),!e||e==="start"})}function zx(i,e,t){var r,n,a=Mx(e)?Au:fn;return function(){var o=a(this,i),s=o.on;s!==r&&(n=(r=s).copy()).on(e,t),o.on=n}}function Bx(i,e){var t=this._id;return arguments.length<2?en(this.node(),t).on.on(i):this.each(zx(t,i,e))}function Ux(i){return function(){var e=this.parentNode;for(var t in this.__transition)if(+t!==i)return;e&&e.removeChild(this)}}function Gx(){return this.on("end.remove",Ux(this._id))}function jx(i){var e=this._name,t=this._id;typeof i!="function"&&(i=Su(i));for(var r=this._groups,n=r.length,a=new Array(n),o=0;o=0&&(h|0)===h||o("invalid parameter type, ("+h+")"+l(b)+". must be a nonnegative integer")}function p(h,b,O){b.indexOf(h)<0&&o("invalid value"+l(O)+". must be one of: "+b)}var y=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function x(h){Object.keys(h).forEach(function(b){y.indexOf(b)<0&&o('invalid regl constructor argument "'+b+'". must be one of '+y)})}function E(h,b){for(h=h+"";h.length0&&b.push(new v("unknown",0,O))}}),b}function W(h,b){b.forEach(function(O){var Z=h[O.file];if(Z){var se=Z.index[O.line];if(se){se.errors.push(O),Z.hasErrors=!0;return}}h.unknown.hasErrors=!0,h.unknown.lines[0].errors.push(O)})}function Oe(h,b,O,Z,se){if(!h.getShaderParameter(b,h.COMPILE_STATUS)){var Y=h.getShaderInfoLog(b),te=Z===h.FRAGMENT_SHADER?"fragment":"vertex";ne(O,"string",te+" shader source must be a string",se);var _e=L(O,se),be=R(Y);W(_e,be),Object.keys(_e).forEach(function(Ae){var ke=_e[Ae];if(!ke.hasErrors)return;var Ce=[""],Fe=[""];function ye(Ie,U){Ce.push(Ie),Fe.push(U||"")}ye("file number "+Ae+": "+ke.name+` +`,"color:red;text-decoration:underline;font-weight:bold"),ke.lines.forEach(function(Ie){if(Ie.errors.length>0){ye(E(Ie.number,4)+"| ","background-color:yellow; font-weight:bold"),ye(Ie.line+n,"color:red; background-color:yellow; font-weight:bold");var U=0;Ie.errors.forEach(function(ee){var Te=ee.message,He=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Te);if(He){var ve=He[1];switch(Te=He[2],ve){case"assign":ve="=";break}U=Math.max(Ie.line.indexOf(ve,U),0)}else U=0;ye(E("| ",6)),ye(E("^^^",U+3)+n,"font-weight:bold"),ye(E("| ",6)),ye(Te+n,"font-weight:bold")}),ye(E("| ",6)+n)}else ye(E(Ie.number,4)+"| "),ye(Ie.line+n,"color:red")}),typeof document!="undefined"&&!window.chrome?(Fe[0]=Ce.join("%c"),console.log.apply(console,Fe)):console.log(Ce.join(""))}),s.raise("Error compiling "+te+" shader, "+_e[0].name)}}function me(h,b,O,Z,se){if(!h.getProgramParameter(b,h.LINK_STATUS)){var Y=h.getProgramInfoLog(b),te=L(O,se),_e=L(Z,se),be='Error linking program with vertex shader, "'+_e[0].name+'", and fragment shader "'+te[0].name+'"';typeof document!="undefined"?console.log("%c"+be+n+"%c"+Y,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(be+n+Y),s.raise(be)}}function de(h){h._commandRef=M()}function N(h,b,O,Z){de(h);function se(be){return be?Z.id(be):0}h._fragId=se(h.static.frag),h._vertId=se(h.static.vert);function Y(be,Ae){Object.keys(Ae).forEach(function(ke){be[Z.id(ke)]=!0})}var te=h._uniformSet={};Y(te,b.static),Y(te,b.dynamic);var _e=h._attributeSet={};Y(_e,O.static),Y(_e,O.dynamic),h._hasCount="count"in h.static||"count"in h.dynamic||"elements"in h.static||"elements"in h.dynamic}function C(h,b){var O=K();o(h+" in command "+(b||M())+(O==="unknown"?"":" called from "+O))}function Q(h,b,O){h||C(b,O||M())}function V(h,b,O,Z){h in b||C("unknown parameter ("+h+")"+l(O)+". possible values: "+Object.keys(b).join(),Z||M())}function ne(h,b,O,Z){u(h,b)||C("invalid parameter type"+l(O)+". expected "+b+", got "+typeof h,Z||M())}function Ve(h){h()}function Re(h,b,O){h.texture?p(h.texture._texture.internalformat,b,"unsupported texture format for attachment"):p(h.renderbuffer._renderbuffer.format,O,"unsupported renderbuffer format for attachment")}var Ge=33071,tt=9728,ot=9984,he=9985,bt=9986,wt=9987,pt=5120,Lt=5121,xe=5122,le=5123,Qe=5124,dt=5125,Se=5126,Ot=32819,It=32820,ii=33635,vi=34042,Ki=36193,Vt={};Vt[pt]=Vt[Lt]=1,Vt[xe]=Vt[le]=Vt[Ki]=Vt[ii]=Vt[Ot]=Vt[It]=2,Vt[Qe]=Vt[dt]=Vt[Se]=Vt[vi]=4;function we(h,b){return h===It||h===Ot||h===ii?2:h===vi?4:Vt[h]*b}function st(h){return!(h&h-1)&&!!h}function ft(h,b,O){var Z,se=b.width,Y=b.height,te=b.channels;s(se>0&&se<=O.maxTextureSize&&Y>0&&Y<=O.maxTextureSize,"invalid texture shape"),(h.wrapS!==Ge||h.wrapT!==Ge)&&s(st(se)&&st(Y),"incompatible wrap mode for texture, both width and height must be power of 2"),b.mipmask===1?se!==1&&Y!==1&&s(h.minFilter!==ot&&h.minFilter!==bt&&h.minFilter!==he&&h.minFilter!==wt,"min filter requires mipmap"):(s(st(se)&&st(Y),"texture must be a square power of 2 to support mipmapping"),s(b.mipmask===(se<<1)-1,"missing or incomplete mipmap data")),b.type===Se&&(O.extensions.indexOf("oes_texture_float_linear")<0&&s(h.minFilter===tt&&h.magFilter===tt,"filter not supported, must enable oes_texture_float_linear"),s(!h.genMipmaps,"mipmap generation not supported with float textures"));var _e=b.images;for(Z=0;Z<16;++Z)if(_e[Z]){var be=se>>Z,Ae=Y>>Z;s(b.mipmask&1<0&&se<=Z.maxTextureSize&&Y>0&&Y<=Z.maxTextureSize,"invalid texture shape"),s(se===Y,"cube map must be square"),s(b.wrapS===Ge&&b.wrapT===Ge,"wrap mode not supported by cube map");for(var _e=0;_e>ke,ye=Y>>ke;s(be.mipmask&1<1&&b===O&&(b==='"'||b==="'"))return['"'+ge(h.substr(1,h.length-2))+'"'];var Z=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(h);if(Z)return ie(h.substr(0,Z.index)).concat(ie(Z[1])).concat(ie(h.substr(Z.index+Z[0].length)));var se=h.split(".");if(se.length===1)return['"'+ge(h)+'"'];for(var Y=[],te=0;te0,"invalid pixel ratio"))):_.raise("invalid arguments to regl"),O&&(O.nodeName.toLowerCase()==="canvas"?se=O:Z=O),!Y){if(!se){_(typeof document!="undefined","must manually specify webgl context outside of DOM environments");var ye=Si(Z||document.body,Ce,Ae);if(!ye)return null;se=ye.canvas,Fe=ye.onDestroy}te.premultipliedAlpha===void 0&&(te.premultipliedAlpha=!0),Y=ni(se,te)}return Y?{gl:Y,canvas:se,container:Z,extensions:_e,optionalExtensions:be,pixelRatio:Ae,profile:ke,onDone:Ce,onDestroy:Fe}:(Fe(),Ce("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function On(h,b){var O={};function Z(te){_.type(te,"string","extension name must be string");var _e=te.toLowerCase(),be;try{be=O[_e]=h.getExtension(_e)}catch(Ae){}return!!be}for(var se=0;se65535)<<4,h>>>=b,O=(h>255)<<3,h>>>=O,b|=O,O=(h>15)<<2,h>>>=O,b|=O,O=(h>3)<<1,h>>>=O,b|=O,b|h>>1}function Hs(){var h=di(8,function(){return[]});function b(Y){var te=js(Y),_e=h[Vs(te)>>2];return _e.length>0?_e.pop():new ArrayBuffer(te)}function O(Y){h[Vs(Y.byteLength)>>2].push(Y)}function Z(Y,te){var _e=null;switch(Y){case ta:_e=new Int8Array(b(te),0,te);break;case cr:_e=new Uint8Array(b(te),0,te);break;case Wi:_e=new Int16Array(b(2*te),0,te);break;case Id:_e=new Uint16Array(b(2*te),0,te);break;case Bo:_e=new Int32Array(b(4*te),0,te);break;case Gs:_e=new Uint32Array(b(4*te),0,te);break;case Ad:_e=new Float32Array(b(4*te),0,te);break;default:return null}return _e.length!==te?_e.subarray(0,te):_e}function se(Y){O(Y.buffer)}return{alloc:b,free:O,allocType:Z,freeType:se}}var _i=Hs();_i.zero=Hs();var Ke=3408,Pt=3410,Ht=3411,Di=3412,Dt=3413,kt=3414,Wt=3415,ai=33901,Xi=33902,Ji=3379,Qi=3386,bn=34921,Pr=36347,Rn=36348,za=35661,_n=35660,yn=34930,Uo=36349,jr=34076,qs=34024,mv=7936,pv=7937,gv=7938,vv=35724,bv=34047,_v=36063,yv=34852,Ws=3553,ef=34067,xv=34069,wv=33984,Go=6408,Cd=5126,tf=5121,kd=36160,Sv=36053,Ev=36064,Tv=16384,Iv=function(h,b){var O=1;b.ext_texture_filter_anisotropic&&(O=h.getParameter(bv));var Z=1,se=1;b.webgl_draw_buffers&&(Z=h.getParameter(yv),se=h.getParameter(_v));var Y=!!b.oes_texture_float;if(Y){var te=h.createTexture();h.bindTexture(Ws,te),h.texImage2D(Ws,0,Go,1,1,0,Go,Cd,null);var _e=h.createFramebuffer();if(h.bindFramebuffer(kd,_e),h.framebufferTexture2D(kd,Ev,Ws,te,0),h.bindTexture(Ws,null),h.checkFramebufferStatus(kd)!==Sv)Y=!1;else{h.viewport(0,0,1,1),h.clearColor(1,0,0,1),h.clear(Tv);var be=_i.allocType(Cd,4);h.readPixels(0,0,1,1,Go,Cd,be),h.getError()?Y=!1:(h.deleteFramebuffer(_e),h.deleteTexture(te),Y=be[0]===1),_i.freeType(be)}}var Ae=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ke=!0;if(!Ae){var Ce=h.createTexture(),Fe=_i.allocType(tf,36);h.activeTexture(wv),h.bindTexture(ef,Ce),h.texImage2D(xv,0,Go,3,3,0,Go,tf,Fe),_i.freeType(Fe),h.bindTexture(ef,null),h.deleteTexture(Ce),ke=!h.getError()}return{colorBits:[h.getParameter(Pt),h.getParameter(Ht),h.getParameter(Di),h.getParameter(Dt)],depthBits:h.getParameter(kt),stencilBits:h.getParameter(Wt),subpixelBits:h.getParameter(Ke),extensions:Object.keys(b).filter(function(ye){return!!b[ye]}),maxAnisotropic:O,maxDrawbuffers:Z,maxColorAttachments:se,pointSizeDims:h.getParameter(ai),lineWidthDims:h.getParameter(Xi),maxViewportDims:h.getParameter(Qi),maxCombinedTextureUnits:h.getParameter(za),maxCubeMapSize:h.getParameter(jr),maxRenderbufferSize:h.getParameter(qs),maxTextureUnits:h.getParameter(yn),maxTextureSize:h.getParameter(Ji),maxAttributes:h.getParameter(bn),maxVertexUniforms:h.getParameter(Pr),maxVertexTextureUnits:h.getParameter(_n),maxVaryingVectors:h.getParameter(Rn),maxFragmentUniforms:h.getParameter(Uo),glsl:h.getParameter(vv),renderer:h.getParameter(pv),vendor:h.getParameter(mv),version:h.getParameter(gv),readFloat:Y,npotTextureCube:ke}};function Vr(h){return!!h&&typeof h=="object"&&Array.isArray(h.shape)&&Array.isArray(h.stride)&&typeof h.offset=="number"&&h.shape.length===h.stride.length&&(Array.isArray(h.data)||t(h.data))}var Or=function(h){return Object.keys(h).map(function(b){return h[b]})},Xs={shape:$v,flatten:kv};function Av(h,b,O){for(var Z=0;Z0){var rt;if(Array.isArray(ee[0])){Me=af(ee);for(var ce=1,oe=1;oe0)if(typeof ce[0]=="number"){var Ee=_i.allocType(ve.dtype,ce.length);sf(Ee,ce),Me(Ee,Xe),_i.freeType(Ee)}else if(Array.isArray(ce[0])||t(ce[0])){Ne=af(ce);var Pe=Ld(ce,Ne,ve.dtype);Me(Pe,Xe),_i.freeType(Pe)}else _.raise("invalid buffer data")}else if(Vr(ce)){Ne=ce.shape;var De=ce.stride,_t=0,vt=0,ze=0,je=0;Ne.length===1?(_t=Ne[0],vt=1,ze=De[0],je=0):Ne.length===2?(_t=Ne[0],vt=Ne[1],ze=De[0],je=De[1]):_.raise("invalid shape");var ct=Array.isArray(ce.data)?ve.dtype:Zs(ce.data),yt=_i.allocType(ct,_t*vt);lf(yt,ce.data,_t,vt,ze,je,ce.offset),Me(yt,Xe),_i.freeType(yt)}else _.raise("invalid data for buffer subdata");return Ue}return Te||Ue(U),Ue._reglType="buffer",Ue._buffer=ve,Ue.subdata=rt,O.profile&&(Ue.stats=ve.stats),Ue.destroy=function(){Fe(ve)},Ue}function Ie(){Or(Y).forEach(function(U){U.buffer=h.createBuffer(),h.bindBuffer(U.type,U.buffer),h.bufferData(U.type,U.persistentData||U.byteLength,U.usage)})}return O.profile&&(b.getTotalBufferSize=function(){var U=0;return Object.keys(Y).forEach(function(ee){U+=Y[ee].stats.size}),U}),{create:ye,createStream:be,destroyStream:Ae,clear:function(){Or(Y).forEach(Fe),_e.forEach(Fe)},getBuffer:function(U){return U&&U._buffer instanceof te?U._buffer:null},restore:Ie,_initBuffer:Ce}}var jv=0,Vv=0,Hv=1,qv=1,Wv=4,Xv=4,Nn={points:jv,point:Vv,lines:Hv,line:qv,triangles:Wv,triangle:Xv,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Yv=0,Zv=1,jo=4,Kv=5120,Ba=5121,df=5122,Ua=5123,cf=5124,ra=5125,Fd=34963,Jv=35040,Qv=35044;function e1(h,b,O,Z){var se={},Y=0,te={uint8:Ba,uint16:Ua};b.oes_element_index_uint&&(te.uint32=ra);function _e(Ie){this.id=Y++,se[this.id]=this,this.buffer=Ie,this.primType=jo,this.vertCount=0,this.type=0}_e.prototype.bind=function(){this.buffer.bind()};var be=[];function Ae(Ie){var U=be.pop();return U||(U=new _e(O.create(null,Fd,!0,!1)._buffer)),Ce(U,Ie,Jv,-1,-1,0,0),U}function ke(Ie){be.push(Ie)}function Ce(Ie,U,ee,Te,He,ve,Ue){Ie.buffer.bind();var Me;if(U){var rt=Ue;!Ue&&(!t(U)||Vr(U)&&!t(U.data))&&(rt=b.oes_element_index_uint?ra:Ua),O._initBuffer(Ie.buffer,U,ee,rt,3)}else h.bufferData(Fd,ve,ee),Ie.buffer.dtype=Me||Ba,Ie.buffer.usage=ee,Ie.buffer.dimension=3,Ie.buffer.byteLength=ve;if(Me=Ue,!Ue){switch(Ie.buffer.dtype){case Ba:case Kv:Me=Ba;break;case Ua:case df:Me=Ua;break;case ra:case cf:Me=ra;break;default:_.raise("unsupported type for element array")}Ie.buffer.dtype=Me}Ie.type=Me,_(Me!==ra||!!b.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var ce=He;ce<0&&(ce=Ie.buffer.byteLength,Me===Ua?ce>>=1:Me===ra&&(ce>>=2)),Ie.vertCount=ce;var oe=Te;if(Te<0){oe=jo;var Xe=Ie.buffer.dimension;Xe===1&&(oe=Yv),Xe===2&&(oe=Zv),Xe===3&&(oe=jo)}Ie.primType=oe}function Fe(Ie){Z.elementsCount--,_(Ie.buffer!==null,"must not double destroy elements"),delete se[Ie.id],Ie.buffer.destroy(),Ie.buffer=null}function ye(Ie,U){var ee=O.create(null,Fd,!0),Te=new _e(ee._buffer);Z.elementsCount++;function He(ve){if(!ve)ee(),Te.primType=jo,Te.vertCount=0,Te.type=Ba;else if(typeof ve=="number")ee(ve),Te.primType=jo,Te.vertCount=ve|0,Te.type=Ba;else{var Ue=null,Me=Qv,rt=-1,ce=-1,oe=0,Xe=0;Array.isArray(ve)||t(ve)||Vr(ve)?Ue=ve:(_.type(ve,"object","invalid arguments for elements"),"data"in ve&&(Ue=ve.data,_(Array.isArray(Ue)||t(Ue)||Vr(Ue),"invalid data for element buffer")),"usage"in ve&&(_.parameter(ve.usage,Ys,"invalid element buffer usage"),Me=Ys[ve.usage]),"primitive"in ve&&(_.parameter(ve.primitive,Nn,"invalid element buffer primitive"),rt=Nn[ve.primitive]),"count"in ve&&(_(typeof ve.count=="number"&&ve.count>=0,"invalid vertex count for elements"),ce=ve.count|0),"type"in ve&&(_.parameter(ve.type,te,"invalid buffer type"),Xe=te[ve.type]),"length"in ve?oe=ve.length|0:(oe=ce,Xe===Ua||Xe===df?oe*=2:(Xe===ra||Xe===cf)&&(oe*=4))),Ce(Te,Ue,Me,rt,ce,oe,Xe)}return He}return He(Ie),He._reglType="elements",He._elements=Te,He.subdata=function(ve,Ue){return ee.subdata(ve,Ue),He},He.destroy=function(){Fe(Te)},He}return{create:ye,createStream:Ae,destroyStream:ke,getElements:function(Ie){return typeof Ie=="function"&&Ie._elements instanceof _e?Ie._elements:null},clear:function(){Or(se).forEach(Fe)}}}var uf=new Float32Array(1),t1=new Uint32Array(uf.buffer),i1=5123;function ff(h){for(var b=_i.allocType(i1,h.length),O=0;O>>31<<15,Y=(Z<<1>>>24)-127,te=Z>>13&1023;if(Y<-24)b[O]=se;else if(Y<-14){var _e=-14-Y;b[O]=se+(te+1024>>_e)}else Y>15?b[O]=se+31744:b[O]=se+(Y+15<<10)+te}return b}function mi(h){return Array.isArray(h)||t(h)}var hf=function(h){return!(h&h-1)&&!!h},r1=34467,tn=3553,Nd=34067,Ks=34069,na=6408,Pd=6406,Js=6407,Vo=6409,Qs=6410,mf=32854,Dd=32855,pf=36194,n1=32819,a1=32820,o1=33635,s1=34042,Md=6402,el=34041,zd=35904,Bd=35906,Ga=36193,Ud=33776,Gd=33777,jd=33778,Vd=33779,gf=35986,vf=35987,bf=34798,_f=35840,yf=35841,xf=35842,wf=35843,Sf=36196,ja=5121,Hd=5123,qd=5125,Ho=5126,l1=10242,d1=10243,c1=10497,Wd=33071,u1=33648,f1=10240,h1=10241,Xd=9728,m1=9729,Yd=9984,Ef=9985,Tf=9986,Zd=9987,p1=33170,tl=4352,g1=4353,v1=4354,b1=34046,_1=3317,y1=37440,x1=37441,w1=37443,If=37444,qo=33984,S1=[Yd,Tf,Ef,Zd],il=[0,Vo,Qs,Js,na],Dr={};Dr[Vo]=Dr[Pd]=Dr[Md]=1,Dr[el]=Dr[Qs]=2,Dr[Js]=Dr[zd]=3,Dr[na]=Dr[Bd]=4;function Va(h){return"[object "+h+"]"}var Af=Va("HTMLCanvasElement"),Cf=Va("OffscreenCanvas"),kf=Va("CanvasRenderingContext2D"),$f=Va("ImageBitmap"),Lf=Va("HTMLImageElement"),Of=Va("HTMLVideoElement"),E1=Object.keys($d).concat([Af,Cf,kf,$f,Lf,Of]),Ha=[];Ha[ja]=1,Ha[Ho]=4,Ha[Ga]=2,Ha[Hd]=2,Ha[qd]=4;var ar=[];ar[mf]=2,ar[Dd]=2,ar[pf]=2,ar[el]=4,ar[Ud]=.5,ar[Gd]=.5,ar[jd]=1,ar[Vd]=1,ar[gf]=.5,ar[vf]=1,ar[bf]=1,ar[_f]=.5,ar[yf]=.25,ar[xf]=.5,ar[wf]=.25,ar[Sf]=.5;function Rf(h){return Array.isArray(h)&&(h.length===0||typeof h[0]=="number")}function Ff(h){if(!Array.isArray(h))return!1;var b=h.length;return!(b===0||!mi(h[0]))}function aa(h){return Object.prototype.toString.call(h)}function Nf(h){return aa(h)===Af}function Pf(h){return aa(h)===Cf}function T1(h){return aa(h)===kf}function I1(h){return aa(h)===$f}function A1(h){return aa(h)===Lf}function C1(h){return aa(h)===Of}function Kd(h){if(!h)return!1;var b=aa(h);return E1.indexOf(b)>=0?!0:Rf(h)||Ff(h)||Vr(h)}function Df(h){return $d[Object.prototype.toString.call(h)]|0}function k1(h,b){var O=b.length;switch(h.type){case ja:case Hd:case qd:case Ho:var Z=_i.allocType(h.type,O);Z.set(b),h.data=Z;break;case Ga:h.data=ff(b);break;default:_.raise("unsupported texture type, must specify a typed array")}}function Mf(h,b){return _i.allocType(h.type===Ga?Ho:h.type,b)}function zf(h,b){h.type===Ga?(h.data=ff(b),_i.freeType(b)):h.data=b}function $1(h,b,O,Z,se,Y){for(var te=h.width,_e=h.height,be=h.channels,Ae=te*_e*be,ke=Mf(h,Ae),Ce=0,Fe=0;Fe<_e;++Fe)for(var ye=0;ye=1;)_e+=te*be*be,be/=2;return _e}else return te*O*Z}function L1(h,b,O,Z,se,Y,te){var _e={"don't care":tl,"dont care":tl,nice:v1,fast:g1},be={repeat:c1,clamp:Wd,mirror:u1},Ae={nearest:Xd,linear:m1},ke=r({mipmap:Zd,"nearest mipmap nearest":Yd,"linear mipmap nearest":Ef,"nearest mipmap linear":Tf,"linear mipmap linear":Zd},Ae),Ce={none:0,browser:If},Fe={uint8:ja,rgba4:n1,rgb565:o1,"rgb5 a1":a1},ye={alpha:Pd,luminance:Vo,"luminance alpha":Qs,rgb:Js,rgba:na,rgba4:mf,"rgb5 a1":Dd,rgb565:pf},Ie={};b.ext_srgb&&(ye.srgb=zd,ye.srgba=Bd),b.oes_texture_float&&(Fe.float32=Fe.float=Ho),b.oes_texture_half_float&&(Fe.float16=Fe["half float"]=Ga),b.webgl_depth_texture&&(r(ye,{depth:Md,"depth stencil":el}),r(Fe,{uint16:Hd,uint32:qd,"depth stencil":s1})),b.webgl_compressed_texture_s3tc&&r(Ie,{"rgb s3tc dxt1":Ud,"rgba s3tc dxt1":Gd,"rgba s3tc dxt3":jd,"rgba s3tc dxt5":Vd}),b.webgl_compressed_texture_atc&&r(Ie,{"rgb atc":gf,"rgba atc explicit alpha":vf,"rgba atc interpolated alpha":bf}),b.webgl_compressed_texture_pvrtc&&r(Ie,{"rgb pvrtc 4bppv1":_f,"rgb pvrtc 2bppv1":yf,"rgba pvrtc 4bppv1":xf,"rgba pvrtc 2bppv1":wf}),b.webgl_compressed_texture_etc1&&(Ie["rgb etc1"]=Sf);var U=Array.prototype.slice.call(h.getParameter(r1));Object.keys(Ie).forEach(function(A){var J=Ie[A];U.indexOf(J)>=0&&(ye[A]=J)});var ee=Object.keys(ye);O.textureFormats=ee;var Te=[];Object.keys(ye).forEach(function(A){var J=ye[A];Te[J]=A});var He=[];Object.keys(Fe).forEach(function(A){var J=Fe[A];He[J]=A});var ve=[];Object.keys(Ae).forEach(function(A){var J=Ae[A];ve[J]=A});var Ue=[];Object.keys(ke).forEach(function(A){var J=ke[A];Ue[J]=A});var Me=[];Object.keys(be).forEach(function(A){var J=be[A];Me[J]=A});var rt=ee.reduce(function(A,J){var q=ye[J];return q===Vo||q===Pd||q===Vo||q===Qs||q===Md||q===el||b.ext_srgb&&(q===zd||q===Bd)?A[q]=q:q===Dd||J.indexOf("rgba")>=0?A[q]=na:A[q]=Js,A},{});function ce(){this.internalformat=na,this.format=na,this.type=ja,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=If,this.width=0,this.height=0,this.channels=0}function oe(A,J){A.internalformat=J.internalformat,A.format=J.format,A.type=J.type,A.compressed=J.compressed,A.premultiplyAlpha=J.premultiplyAlpha,A.flipY=J.flipY,A.unpackAlignment=J.unpackAlignment,A.colorSpace=J.colorSpace,A.width=J.width,A.height=J.height,A.channels=J.channels}function Xe(A,J){if(!(typeof J!="object"||!J)){if("premultiplyAlpha"in J&&(_.type(J.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),A.premultiplyAlpha=J.premultiplyAlpha),"flipY"in J&&(_.type(J.flipY,"boolean","invalid texture flip"),A.flipY=J.flipY),"alignment"in J&&(_.oneOf(J.alignment,[1,2,4,8],"invalid texture unpack alignment"),A.unpackAlignment=J.alignment),"colorSpace"in J&&(_.parameter(J.colorSpace,Ce,"invalid colorSpace"),A.colorSpace=Ce[J.colorSpace]),"type"in J){var q=J.type;_(b.oes_texture_float||!(q==="float"||q==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),_(b.oes_texture_half_float||!(q==="half float"||q==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),_(b.webgl_depth_texture||!(q==="uint16"||q==="uint32"||q==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),_.parameter(q,Fe,"invalid texture type"),A.type=Fe[q]}var We=A.width,Tt=A.height,w=A.channels,g=!1;"shape"in J?(_(Array.isArray(J.shape)&&J.shape.length>=2,"shape must be an array"),We=J.shape[0],Tt=J.shape[1],J.shape.length===3&&(w=J.shape[2],_(w>0&&w<=4,"invalid number of channels"),g=!0),_(We>=0&&We<=O.maxTextureSize,"invalid width"),_(Tt>=0&&Tt<=O.maxTextureSize,"invalid height")):("radius"in J&&(We=Tt=J.radius,_(We>=0&&We<=O.maxTextureSize,"invalid radius")),"width"in J&&(We=J.width,_(We>=0&&We<=O.maxTextureSize,"invalid width")),"height"in J&&(Tt=J.height,_(Tt>=0&&Tt<=O.maxTextureSize,"invalid height")),"channels"in J&&(w=J.channels,_(w>0&&w<=4,"invalid number of channels"),g=!0)),A.width=We|0,A.height=Tt|0,A.channels=w|0;var F=!1;if("format"in J){var B=J.format;_(b.webgl_depth_texture||!(B==="depth"||B==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),_.parameter(B,ye,"invalid texture format");var G=A.internalformat=ye[B];A.format=rt[G],B in Fe&&("type"in J||(A.type=Fe[B])),B in Ie&&(A.compressed=!0),F=!0}!g&&F?A.channels=Dr[A.format]:g&&!F?A.channels!==il[A.format]&&(A.format=A.internalformat=il[A.channels]):F&&g&&_(A.channels===Dr[A.format],"number of channels inconsistent with specified format")}}function Ne(A){h.pixelStorei(y1,A.flipY),h.pixelStorei(x1,A.premultiplyAlpha),h.pixelStorei(w1,A.colorSpace),h.pixelStorei(_1,A.unpackAlignment)}function Ee(){ce.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Pe(A,J){var q=null;if(Kd(J)?q=J:J&&(_.type(J,"object","invalid pixel data type"),Xe(A,J),"x"in J&&(A.xOffset=J.x|0),"y"in J&&(A.yOffset=J.y|0),Kd(J.data)&&(q=J.data)),_(!A.compressed||q instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),J.copy){_(!q,"can not specify copy and data field for the same texture");var We=se.viewportWidth,Tt=se.viewportHeight;A.width=A.width||We-A.xOffset,A.height=A.height||Tt-A.yOffset,A.needsCopy=!0,_(A.xOffset>=0&&A.xOffset=0&&A.yOffset0&&A.width<=We&&A.height>0&&A.height<=Tt,"copy texture read out of bounds")}else if(!q)A.width=A.width||1,A.height=A.height||1,A.channels=A.channels||4;else if(t(q))A.channels=A.channels||4,A.data=q,!("type"in J)&&A.type===ja&&(A.type=Df(q));else if(Rf(q))A.channels=A.channels||4,k1(A,q),A.alignment=1,A.needsFree=!0;else if(Vr(q)){var w=q.data;!Array.isArray(w)&&A.type===ja&&(A.type=Df(w));var g=q.shape,F=q.stride,B,G,D,P,z,S;g.length===3?(D=g[2],S=F[2]):(_(g.length===2,"invalid ndarray pixel data, must be 2 or 3D"),D=1,S=1),B=g[0],G=g[1],P=F[0],z=F[1],A.alignment=1,A.width=B,A.height=G,A.channels=D,A.format=A.internalformat=il[D],A.needsFree=!0,$1(A,w,P,z,S,q.offset)}else if(Nf(q)||Pf(q)||T1(q))Nf(q)||Pf(q)?A.element=q:A.element=q.canvas,A.width=A.element.width,A.height=A.element.height,A.channels=4;else if(I1(q))A.element=q,A.width=q.width,A.height=q.height,A.channels=4;else if(A1(q))A.element=q,A.width=q.naturalWidth,A.height=q.naturalHeight,A.channels=4;else if(C1(q))A.element=q,A.width=q.videoWidth,A.height=q.videoHeight,A.channels=4;else if(Ff(q)){var $=A.width||q[0].length,T=A.height||q.length,H=A.channels;mi(q[0][0])?H=H||q[0][0].length:H=H||1;for(var j=Xs.shape(q),ae=1,ue=0;ue=0,"oes_texture_float extension not enabled"):A.type===Ga&&_(O.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function De(A,J,q){var We=A.element,Tt=A.data,w=A.internalformat,g=A.format,F=A.type,B=A.width,G=A.height;Ne(A),We?h.texImage2D(J,q,g,g,F,We):A.compressed?h.compressedTexImage2D(J,q,w,B,G,0,Tt):A.needsCopy?(Z(),h.copyTexImage2D(J,q,g,A.xOffset,A.yOffset,B,G,0)):h.texImage2D(J,q,g,B,G,0,g,F,Tt||null)}function _t(A,J,q,We,Tt){var w=A.element,g=A.data,F=A.internalformat,B=A.format,G=A.type,D=A.width,P=A.height;Ne(A),w?h.texSubImage2D(J,Tt,q,We,B,G,w):A.compressed?h.compressedTexSubImage2D(J,Tt,q,We,F,D,P,g):A.needsCopy?(Z(),h.copyTexSubImage2D(J,Tt,q,We,A.xOffset,A.yOffset,D,P)):h.texSubImage2D(J,Tt,q,We,D,P,B,G,g)}var vt=[];function ze(){return vt.pop()||new Ee}function je(A){A.needsFree&&_i.freeType(A.data),Ee.call(A),vt.push(A)}function ct(){ce.call(this),this.genMipmaps=!1,this.mipmapHint=tl,this.mipmask=0,this.images=Array(16)}function yt(A,J,q){var We=A.images[0]=ze();A.mipmask=1,We.width=A.width=J,We.height=A.height=q,We.channels=A.channels=4}function At(A,J){var q=null;if(Kd(J))q=A.images[0]=ze(),oe(q,A),Pe(q,J),A.mipmask=1;else if(Xe(A,J),Array.isArray(J.mipmap))for(var We=J.mipmap,Tt=0;Tt>=Tt,q.height>>=Tt,Pe(q,We[Tt]),A.mipmask|=1<=0&&!("faces"in J)&&(A.genMipmaps=!0)}if("mag"in J){var We=J.mag;_.parameter(We,Ae),A.magFilter=Ae[We]}var Tt=A.wrapS,w=A.wrapT;if("wrap"in J){var g=J.wrap;typeof g=="string"?(_.parameter(g,be),Tt=w=be[g]):Array.isArray(g)&&(_.parameter(g[0],be),_.parameter(g[1],be),Tt=be[g[0]],w=be[g[1]])}else{if("wrapS"in J){var F=J.wrapS;_.parameter(F,be),Tt=be[F]}if("wrapT"in J){var B=J.wrapT;_.parameter(B,be),w=be[B]}}if(A.wrapS=Tt,A.wrapT=w,"anisotropic"in J){var G=J.anisotropic;_(typeof G=="number"&&G>=1&&G<=O.maxAnisotropic,"aniso samples must be between 1 and "),A.anisotropic=J.anisotropic}if("mipmap"in J){var D=!1;switch(typeof J.mipmap){case"string":_.parameter(J.mipmap,_e,"invalid mipmap hint"),A.mipmapHint=_e[J.mipmap],A.genMipmaps=!0,D=!0;break;case"boolean":D=A.genMipmaps=J.mipmap;break;case"object":_(Array.isArray(J.mipmap),"invalid mipmap type"),A.genMipmaps=!1,D=!0;break;default:_.raise("invalid mipmap type")}D&&!("min"in J)&&(A.minFilter=Yd)}}function zi(A,J){h.texParameteri(J,h1,A.minFilter),h.texParameteri(J,f1,A.magFilter),h.texParameteri(J,l1,A.wrapS),h.texParameteri(J,d1,A.wrapT),b.ext_texture_filter_anisotropic&&h.texParameteri(J,b1,A.anisotropic),A.genMipmaps&&(h.hint(p1,A.mipmapHint),h.generateMipmap(J))}var Bi=0,er={},or=O.maxTextureUnits,Ci=Array(or).map(function(){return null});function St(A){ce.call(this),this.mipmask=0,this.internalformat=na,this.id=Bi++,this.refCount=1,this.target=A,this.texture=h.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new oi,te.profile&&(this.stats={size:0})}function sr(A){h.activeTexture(qo),h.bindTexture(A.target,A.texture)}function zt(){var A=Ci[0];A?h.bindTexture(A.target,A.texture):h.bindTexture(tn,null)}function lt(A){var J=A.texture;_(J,"must not double destroy texture");var q=A.unit,We=A.target;q>=0&&(h.activeTexture(qo+q),h.bindTexture(We,null),Ci[q]=null),h.deleteTexture(J),A.texture=null,A.params=null,A.pixels=null,A.refCount=0,delete er[A.id],Y.textureCount--}r(St.prototype,{bind:function(){var A=this;A.bindCount+=1;var J=A.unit;if(J<0){for(var q=0;q0)continue;We.unit=-1}Ci[q]=A,J=q;break}J>=or&&_.raise("insufficient number of texture units"),te.profile&&Y.maxTextureUnits>z)-D,S.height=S.height||(q.height>>z)-P,_(q.type===S.type&&q.format===S.format&&q.internalformat===S.internalformat,"incompatible format for texture.subimage"),_(D>=0&&P>=0&&D+S.width<=q.width&&P+S.height<=q.height,"texture.subimage write out of bounds"),_(q.mipmask&1<>D;++D){var P=B>>D,z=G>>D;if(!P||!z)break;h.texImage2D(tn,D,q.format,P,z,0,q.format,q.type,null)}return zt(),te.profile&&(q.stats.size=rl(q.internalformat,q.type,B,G,!1,!1)),We}return We(A,J),We.subimage=Tt,We.resize=w,We._reglType="texture2d",We._texture=q,te.profile&&(We.stats=q.stats),We.destroy=function(){q.decRef()},We}function Nt(A,J,q,We,Tt,w){var g=new St(Nd);er[g.id]=g,Y.cubeCount++;var F=new Array(6);function B(P,z,S,$,T,H){var j,ae=g.texInfo;for(oi.call(ae),j=0;j<6;++j)F[j]=$t();if(typeof P=="number"||!P){var ue=P|0||1;for(j=0;j<6;++j)yt(F[j],ue,ue)}else if(typeof P=="object")if(z)At(F[0],P),At(F[1],z),At(F[2],S),At(F[3],$),At(F[4],T),At(F[5],H);else if(Ni(ae,P),Xe(g,P),"faces"in P){var Le=P.faces;for(_(Array.isArray(Le)&&Le.length===6,"cube faces must be a length 6 array"),j=0;j<6;++j)_(typeof Le[j]=="object"&&!!Le[j],"invalid input for cube map face"),oe(F[j],g),At(F[j],Le[j])}else for(j=0;j<6;++j)At(F[j],P);else _.raise("invalid arguments to cube map");for(oe(g,F[0]),_.optional(function(){O.npotTextureCube||_(hf(g.width)&&hf(g.height),"your browser does not support non power or two texture dimensions")}),ae.genMipmaps?g.mipmask=(F[0].width<<1)-1:g.mipmask=F[0].mipmask,_.textureCube(g,ae,F,O),g.internalformat=F[0].internalformat,B.width=F[0].width,B.height=F[0].height,sr(g),j=0;j<6;++j)pi(F[j],Ks+j);for(zi(ae,Nd),zt(),te.profile&&(g.stats.size=rl(g.internalformat,g.type,B.width,B.height,ae.genMipmaps,!0)),B.format=Te[g.internalformat],B.type=He[g.type],B.mag=ve[ae.magFilter],B.min=Ue[ae.minFilter],B.wrapS=Me[ae.wrapS],B.wrapT=Me[ae.wrapT],j=0;j<6;++j)Mi(F[j]);return B}function G(P,z,S,$,T){_(!!z,"must specify image data"),_(typeof P=="number"&&P===(P|0)&&P>=0&&P<6,"invalid face");var H=S|0,j=$|0,ae=T|0,ue=ze();return oe(ue,g),ue.width=0,ue.height=0,Pe(ue,z),ue.width=ue.width||(g.width>>ae)-H,ue.height=ue.height||(g.height>>ae)-j,_(g.type===ue.type&&g.format===ue.format&&g.internalformat===ue.internalformat,"incompatible format for texture.subimage"),_(H>=0&&j>=0&&H+ue.width<=g.width&&j+ue.height<=g.height,"texture.subimage write out of bounds"),_(g.mipmask&1<>$;++$)h.texImage2D(Ks+S,$,g.format,z>>$,z>>$,0,g.format,g.type,null);return zt(),te.profile&&(g.stats.size=rl(g.internalformat,g.type,B.width,B.height,!1,!0)),B}}return B(A,J,q,We,Tt,w),B.subimage=G,B.resize=D,B._reglType="textureCube",B._texture=g,te.profile&&(B.stats=g.stats),B.destroy=function(){g.decRef()},B}function ki(){for(var A=0;A>We,q.height>>We,0,q.internalformat,q.type,null);else for(var Tt=0;Tt<6;++Tt)h.texImage2D(Ks+Tt,We,q.internalformat,q.width>>We,q.height>>We,0,q.internalformat,q.type,null);zi(q.texInfo,q.target)})}function fa(){for(var A=0;A=2,"invalid renderbuffer shape"),Ue=oe[0]|0,Me=oe[1]|0}else"radius"in ce&&(Ue=Me=ce.radius|0),"width"in ce&&(Ue=ce.width|0),"height"in ce&&(Me=ce.height|0);"format"in ce&&(_.parameter(ce.format,Y,"invalid renderbuffer format"),rt=Y[ce.format])}else typeof He=="number"?(Ue=He|0,typeof ve=="number"?Me=ve|0:Me=Ue):He?_.raise("invalid arguments to renderbuffer constructor"):Ue=Me=1;if(_(Ue>0&&Me>0&&Ue<=O.maxRenderbufferSize&&Me<=O.maxRenderbufferSize,"invalid renderbuffer size"),!(Ue===U.width&&Me===U.height&&rt===U.format))return ee.width=U.width=Ue,ee.height=U.height=Me,U.format=rt,h.bindRenderbuffer(Pn,U.renderbuffer),h.renderbufferStorage(Pn,rt,Ue,Me),_(h.getError()===0,"invalid render buffer format"),se.profile&&(U.stats.size=Yf(U.format,U.width,U.height)),ee.format=te[U.format],ee}function Te(He,ve){var Ue=He|0,Me=ve|0||Ue;return Ue===U.width&&Me===U.height||(_(Ue>0&&Me>0&&Ue<=O.maxRenderbufferSize&&Me<=O.maxRenderbufferSize,"invalid renderbuffer size"),ee.width=U.width=Ue,ee.height=U.height=Me,h.bindRenderbuffer(Pn,U.renderbuffer),h.renderbufferStorage(Pn,U.format,Ue,Me),_(h.getError()===0,"invalid render buffer format"),se.profile&&(U.stats.size=Yf(U.format,U.width,U.height))),ee}return ee(ye,Ie),ee.resize=Te,ee._reglType="renderbuffer",ee._renderbuffer=U,se.profile&&(ee.stats=U.stats),ee.destroy=function(){U.decRef()},ee}se.profile&&(Z.getTotalRenderbufferSize=function(){var ye=0;return Object.keys(be).forEach(function(Ie){ye+=be[Ie].stats.size}),ye});function Fe(){Or(be).forEach(function(ye){ye.renderbuffer=h.createRenderbuffer(),h.bindRenderbuffer(Pn,ye.renderbuffer),h.renderbufferStorage(Pn,ye.format,ye.width,ye.height)}),h.bindRenderbuffer(Pn,null)}return{create:Ce,clear:function(){Or(be).forEach(ke)},restore:Fe}},xn=36160,Jd=36161,oa=3553,al=34069,Zf=36064,Kf=36096,Jf=36128,Qf=33306,eh=36053,R1=36054,F1=36055,N1=36057,P1=36061,D1=36193,M1=5121,z1=5126,th=6407,ih=6408,B1=6402,U1=[th,ih],Qd=[];Qd[ih]=4,Qd[th]=3;var ol=[];ol[M1]=1,ol[z1]=4,ol[D1]=2;var G1=32854,j1=32855,V1=36194,H1=33189,q1=36168,rh=34041,W1=35907,X1=34836,Y1=34842,Z1=34843,K1=[G1,j1,V1,W1,Y1,Z1,X1],qa={};qa[eh]="complete",qa[R1]="incomplete attachment",qa[N1]="incomplete dimensions",qa[F1]="incomplete, missing attachment",qa[P1]="unsupported";function J1(h,b,O,Z,se,Y){var te={cur:null,next:null,dirty:!1,setFBO:null},_e=["rgba"],be=["rgba4","rgb565","rgb5 a1"];b.ext_srgb&&be.push("srgba"),b.ext_color_buffer_half_float&&be.push("rgba16f","rgb16f"),b.webgl_color_buffer_float&&be.push("rgba32f");var Ae=["uint8"];b.oes_texture_half_float&&Ae.push("half float","float16"),b.oes_texture_float&&Ae.push("float","float32");function ke(Ee,Pe,De){this.target=Ee,this.texture=Pe,this.renderbuffer=De;var _t=0,vt=0;Pe?(_t=Pe.width,vt=Pe.height):De&&(_t=De.width,vt=De.height),this.width=_t,this.height=vt}function Ce(Ee){Ee&&(Ee.texture&&Ee.texture._texture.decRef(),Ee.renderbuffer&&Ee.renderbuffer._renderbuffer.decRef())}function Fe(Ee,Pe,De){if(Ee)if(Ee.texture){var _t=Ee.texture._texture,vt=Math.max(1,_t.width),ze=Math.max(1,_t.height);_(vt===Pe&&ze===De,"inconsistent width/height for supplied texture"),_t.refCount+=1}else{var je=Ee.renderbuffer._renderbuffer;_(je.width===Pe&&je.height===De,"inconsistent width/height for renderbuffer"),je.refCount+=1}}function ye(Ee,Pe){Pe&&(Pe.texture?h.framebufferTexture2D(xn,Ee,Pe.target,Pe.texture._texture.texture,0):h.framebufferRenderbuffer(xn,Ee,Jd,Pe.renderbuffer._renderbuffer.renderbuffer))}function Ie(Ee){var Pe=oa,De=null,_t=null,vt=Ee;typeof Ee=="object"&&(vt=Ee.data,"target"in Ee&&(Pe=Ee.target|0)),_.type(vt,"function","invalid attachment data");var ze=vt._reglType;return ze==="texture2d"?(De=vt,_(Pe===oa)):ze==="textureCube"?(De=vt,_(Pe>=al&&Pe=2,"invalid shape for framebuffer"),yt=sr[0],At=sr[1]}else"radius"in St&&(yt=At=St.radius),"width"in St&&(yt=St.width),"height"in St&&(At=St.height);("color"in St||"colors"in St)&&($t=St.color||St.colors,Array.isArray($t)&&_($t.length===1||b.webgl_draw_buffers,"multiple render targets not supported")),$t||("colorCount"in St&&(zi=St.colorCount|0,_(zi>0,"invalid color buffer count")),"colorTexture"in St&&(Mi=!!St.colorTexture,oi="rgba4"),"colorType"in St&&(Ni=St.colorType,Mi?(_(b.oes_texture_float||!(Ni==="float"||Ni==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),_(b.oes_texture_half_float||!(Ni==="half float"||Ni==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):Ni==="half float"||Ni==="float16"?(_(b.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),oi="rgba16f"):(Ni==="float"||Ni==="float32")&&(_(b.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),oi="rgba32f"),_.oneOf(Ni,Ae,"invalid color type")),"colorFormat"in St&&(oi=St.colorFormat,_e.indexOf(oi)>=0?Mi=!0:be.indexOf(oi)>=0?Mi=!1:_.optional(function(){Mi?_.oneOf(St.colorFormat,_e,"invalid color format for texture"):_.oneOf(St.colorFormat,be,"invalid color format for renderbuffer")}))),("depthTexture"in St||"depthStencilTexture"in St)&&(Ci=!!(St.depthTexture||St.depthStencilTexture),_(!Ci||b.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in St&&(typeof St.depth=="boolean"?pi=St.depth:(Bi=St.depth,yi=!1)),"stencil"in St&&(typeof St.stencil=="boolean"?yi=St.stencil:(er=St.stencil,pi=!1)),"depthStencil"in St&&(typeof St.depthStencil=="boolean"?pi=yi=St.depthStencil:(or=St.depthStencil,pi=!1,yi=!1))}var zt=null,lt=null,Ct=null,Nt=null;if(Array.isArray($t))zt=$t.map(Ie);else if($t)zt=[Ie($t)];else for(zt=new Array(zi),ct=0;ct=0||zt[ct].renderbuffer&&K1.indexOf(zt[ct].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+ct+" is invalid"),zt[ct]&&zt[ct].texture){var nn=Qd[zt[ct].texture._texture.format]*ol[zt[ct].texture._texture.type];ki===null?ki=nn:_(ki===nn,"all color attachments much have the same number of bits per pixel.")}return Fe(lt,yt,At),_(!lt||lt.texture&<.texture._texture.format===B1||lt.renderbuffer&<.renderbuffer._renderbuffer.format===H1,"invalid depth attachment for framebuffer object"),Fe(Ct,yt,At),_(!Ct||Ct.renderbuffer&&Ct.renderbuffer._renderbuffer.format===q1,"invalid stencil attachment for framebuffer object"),Fe(Nt,yt,At),_(!Nt||Nt.texture&&Nt.texture._texture.format===rh||Nt.renderbuffer&&Nt.renderbuffer._renderbuffer.format===rh,"invalid depth-stencil attachment for framebuffer object"),Me(De),De.width=yt,De.height=At,De.colorAttachments=zt,De.depthAttachment=lt,De.stencilAttachment=Ct,De.depthStencilAttachment=Nt,_t.color=zt.map(ee),_t.depth=ee(lt),_t.stencil=ee(Ct),_t.depthStencil=ee(Nt),_t.width=De.width,_t.height=De.height,ce(De),_t}function vt(ze,je){_(te.next!==De,"can not resize a framebuffer which is currently in use");var ct=Math.max(ze|0,1),yt=Math.max(je|0||ct,1);if(ct===De.width&&yt===De.height)return _t;for(var At=De.colorAttachments,pi=0;pi=2,"invalid shape for framebuffer"),_(Mi[0]===Mi[1],"cube framebuffer must be square"),ct=Mi[0]}else"radius"in $t&&(ct=$t.radius|0),"width"in $t?(ct=$t.width|0,"height"in $t&&_($t.height===ct,"must be square")):"height"in $t&&(ct=$t.height|0);("color"in $t||"colors"in $t)&&(yt=$t.color||$t.colors,Array.isArray(yt)&&_(yt.length===1||b.webgl_draw_buffers,"multiple render targets not supported")),yt||("colorCount"in $t&&(yi=$t.colorCount|0,_(yi>0,"invalid color buffer count")),"colorType"in $t&&(_.oneOf($t.colorType,Ae,"invalid color type"),pi=$t.colorType),"colorFormat"in $t&&(At=$t.colorFormat,_.oneOf($t.colorFormat,_e,"invalid color format for texture"))),"depth"in $t&&(je.depth=$t.depth),"stencil"in $t&&(je.stencil=$t.stencil),"depthStencil"in $t&&(je.depthStencil=$t.depthStencil)}var oi;if(yt)if(Array.isArray(yt))for(oi=[],ze=0;ze0&&(je.depth=Pe[0].depth,je.stencil=Pe[0].stencil,je.depthStencil=Pe[0].depthStencil),Pe[ze]?Pe[ze](je):Pe[ze]=oe(je)}return r(De,{width:ct,height:ct,color:oi})}function _t(vt){var ze,je=vt|0;if(_(je>0&&je<=O.maxCubeMapSize,"invalid radius for cube fbo"),je===De.width)return De;var ct=De.color;for(ze=0;ze{for(var pi=Object.keys(Ne),yi=0;yi=0,'invalid option for vao: "'+pi[yi]+'" valid options are '+ah)}),_(Array.isArray(Ee),"attributes must be an array")}_(Ee.length<_e,"too many attributes"),_(Ee.length>0,"must specify at least one attribute");var De={},_t=oe.attributes;_t.length=Ee.length;for(var vt=0;vt=ct.byteLength?yt.subdata(ct):(yt.destroy(),oe.buffers[vt]=null)),oe.buffers[vt]||(yt=oe.buffers[vt]=se.create(ze,nh,!1,!0)),je.buffer=se.getBuffer(yt),je.size=je.buffer.dimension|0,je.normalized=!1,je.type=je.buffer.dtype,je.offset=0,je.stride=0,je.divisor=0,je.state=1,De[vt]=1}else se.getBuffer(ze)?(je.buffer=se.getBuffer(ze),je.size=je.buffer.dimension|0,je.normalized=!1,je.type=je.buffer.dtype,je.offset=0,je.stride=0,je.divisor=0,je.state=1):se.getBuffer(ze.buffer)?(je.buffer=se.getBuffer(ze.buffer),je.size=(+ze.size||je.buffer.dimension)|0,je.normalized=!!ze.normalized||!1,"type"in ze?(_.parameter(ze.type,ia,"invalid buffer type"),je.type=ia[ze.type]):je.type=je.buffer.dtype,je.offset=(ze.offset||0)|0,je.stride=(ze.stride||0)|0,je.divisor=(ze.divisor||0)|0,je.state=1,_(je.size>=1&&je.size<=4,"size must be between 1 and 4"),_(je.offset>=0,"invalid offset"),_(je.stride>=0&&je.stride<=255,"stride must be between 0 and 255"),_(je.divisor>=0,"divisor must be positive"),_(!je.divisor||!!b.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in ze?(_(vt>0,"first attribute must not be a constant"),je.x=+ze.x||0,je.y=+ze.y||0,je.z=+ze.z||0,je.w=+ze.w||0,je.state=2):_(!1,"invalid attribute spec for location "+vt)}for(var At=0;At1)for(var Ne=0;Ne1&&(Pe=Pe.replace("[0]","")),_e(Xe,new te(Pe,b.id(Pe),h.getUniformLocation(rt,Pe),ve))}var De=h.getProgramParameter(rt,rb);Z.profile&&(U.stats.attributesCount=De);var _t=U.attributes;for(He=0;HeU&&(U=ee.stats.uniformsCount)}),U},O.getMaxAttributesCount=function(){var U=0;return ke.forEach(function(ee){ee.stats.attributesCount>U&&(U=ee.stats.attributesCount)}),U});function Ie(){se={},Y={};for(var U=0;U=0,"missing vertex shader",Te),_.command(ee>=0,"missing fragment shader",Te);var ve=Ae[ee];ve||(ve=Ae[ee]={});var Ue=ve[U];if(Ue&&(Ue.refCount++,!He))return Ue;var Me=new Fe(ee,U);return O.shaderCount++,ye(Me,Te,He),Ue||(ve[U]=Me),ke.push(Me),r(Me,{destroy:function(){if(Me.refCount--,Me.refCount<=0){h.deleteProgram(Me.program);var rt=ke.indexOf(Me);ke.splice(rt,1),O.shaderCount--}ve[Me.vertId].refCount<=0&&(h.deleteShader(Y[Me.vertId]),delete Y[Me.vertId],delete Ae[Me.fragId][Me.vertId]),Object.keys(Ae[Me.fragId]).length||(h.deleteShader(se[Me.fragId]),delete se[Me.fragId],delete Ae[Me.fragId])}})},restore:Ie,shader:be,frag:-1,vert:-1}}var ab=6408,Wo=5121,ob=3333,ll=5126;function sb(h,b,O,Z,se,Y,te){function _e(ke){var Ce;b.next===null?(_(se.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Ce=Wo):(_(b.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Ce=b.next.colorAttachments[0].texture._texture.type,_.optional(function(){Y.oes_texture_float?(_(Ce===Wo||Ce===ll,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Ce===ll&&_(te.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):_(Ce===Wo,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var Fe=0,ye=0,Ie=Z.framebufferWidth,U=Z.framebufferHeight,ee=null;t(ke)?ee=ke:ke&&(_.type(ke,"object","invalid arguments to regl.read()"),Fe=ke.x|0,ye=ke.y|0,_(Fe>=0&&Fe=0&&ye0&&Ie+Fe<=Z.framebufferWidth,"invalid width for read pixels"),_(U>0&&U+ye<=Z.framebufferHeight,"invalid height for read pixels"),O();var Te=Ie*U*4;return ee||(Ce===Wo?ee=new Uint8Array(Te):Ce===ll&&(ee=ee||new Float32Array(Te))),_.isTypedArray(ee,"data buffer for regl.read() must be a typedarray"),_(ee.byteLength>=Te,"data buffer for regl.read() too small"),h.pixelStorei(ob,4),h.readPixels(Fe,ye,Ie,U,ab,Ce,ee),ee}function be(ke){var Ce;return b.setFBO({framebuffer:ke.framebuffer},function(){Ce=_e(ke)}),Ce}function Ae(ke){return!ke||!("framebuffer"in ke)?_e(ke):be(ke)}return Ae}function Wa(h){return Array.prototype.slice.call(h)}function Xa(h){return Wa(h).join("")}function lb(){var h=0,b=[],O=[];function Z(Ce){for(var Fe=0;Fe0&&(Ce.push(U,"="),Ce.push.apply(Ce,Wa(arguments)),Ce.push(";")),U}return r(Fe,{def:Ie,toString:function(){return Xa([ye.length>0?"var "+ye.join(",")+";":"",Xa(Ce)])}})}function Y(){var Ce=se(),Fe=se(),ye=Ce.toString,Ie=Fe.toString;function U(ee,Te){Fe(ee,Te,"=",Ce.def(ee,Te),";")}return r(function(){Ce.apply(Ce,Wa(arguments))},{def:Ce.def,entry:Ce,exit:Fe,save:U,set:function(ee,Te,He){U(ee,Te),Ce(ee,Te,"=",He,";")},toString:function(){return ye()+Ie()}})}function te(){var Ce=Xa(arguments),Fe=Y(),ye=Y(),Ie=Fe.toString,U=ye.toString;return r(Fe,{then:function(){return Fe.apply(Fe,Wa(arguments)),this},else:function(){return ye.apply(ye,Wa(arguments)),this},toString:function(){var ee=U();return ee&&(ee="else{"+ee+"}"),Xa(["if(",Ce,"){",Ie(),"}",ee])}})}var _e=se(),be={};function Ae(Ce,Fe){var ye=[];function Ie(){var ve="a"+ye.length;return ye.push(ve),ve}Fe=Fe||0;for(var U=0;U":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Mn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Nh={frag:fb,vert:hb},Sc={cw:kh,ccw:wc};function wl(h){return Array.isArray(h)||t(h)||Vr(h)}function Ph(h){return h.sort(function(b,O){return b===wn?-1:O===wn?1:b=1,Z>=2,b)}else if(O===dl){var se=h.data;return new Yi(se.thisDep,se.contextDep,se.propDep,b)}else{if(O===lh)return new Yi(!1,!1,!1,b);if(O===dh){for(var Y=!1,te=!1,_e=!1,be=0;be=1&&(te=!0),ke>=2&&(_e=!0)}else Ae.type===dl&&(Y=Y||Ae.data.thisDep,te=te||Ae.data.contextDep,_e=_e||Ae.data.propDep)}return new Yi(Y,te,_e,b)}else return new Yi(O===ac,O===nc,O===rc,b)}}var Dh=new Yi(!1,!1,!1,function(){});function kb(h,b,O,Z,se,Y,te,_e,be,Ae,ke,Ce,Fe,ye,Ie){var U=Ae.Record,ee={add:32774,subtract:32778,"reverse subtract":32779};O.ext_blend_minmax&&(ee.min=Eb,ee.max=Tb);var Te=O.angle_instanced_arrays,He=O.webgl_draw_buffers,ve=O.oes_vertex_array_object,Ue={dirty:!0,profile:Ie.profile},Me={},rt=[],ce={},oe={};function Xe(w){return w.replace(".","_")}function Ne(w,g,F){var B=Xe(w);rt.push(w),Me[B]=Ue[B]=!!F,ce[B]=g}function Ee(w,g,F){var B=Xe(w);rt.push(w),Array.isArray(F)?(Ue[B]=F.slice(),Me[B]=F.slice()):Ue[B]=Me[B]=F,oe[B]=g}Ne(ch,vb),Ne(uh,gb),Ee(fh,"blendColor",[0,0,0,0]),Ee(oc,"blendEquationSeparate",[Oh,Oh]),Ee(sc,"blendFuncSeparate",[Lh,$h,Lh,$h]),Ne(hh,_b,!0),Ee(mh,"depthFunc",Ab),Ee(ph,"depthRange",[0,1]),Ee(gh,"depthMask",!0),Ee(lc,lc,[!0,!0,!0,!0]),Ne(vh,pb),Ee(bh,"cullFace",ua),Ee(dc,dc,wc),Ee(cc,cc,1),Ne(_h,xb),Ee(uc,"polygonOffset",[0,0]),Ne(yh,wb),Ne(xh,Sb),Ee(fc,"sampleCoverage",[1,!1]),Ne(wh,bb),Ee(Sh,"stencilMask",-1),Ee(hc,"stencilFunc",[Ib,0,-1]),Ee(mc,"stencilOpSeparate",[ns,Dn,Dn,Dn]),Ee(Xo,"stencilOpSeparate",[ua,Dn,Dn,Dn]),Ne(Eh,yb),Ee(cl,"scissor",[0,0,h.drawingBufferWidth,h.drawingBufferHeight]),Ee(wn,wn,[0,0,h.drawingBufferWidth,h.drawingBufferHeight]);var Pe={gl:h,context:Fe,strings:b,next:Me,current:Ue,draw:Ce,elements:Y,buffer:se,shader:ke,attributes:Ae.state,vao:Ae,uniforms:be,framebuffer:_e,extensions:O,timer:ye,isBufferArgs:wl},De={primTypes:Nn,compareFuncs:eo,blendFuncs:rn,blendEquations:ee,stencilOps:Mn,glTypes:ia,orientationType:Sc};_.optional(function(){Pe.isArrayLike=mi}),He&&(De.backBuffer=[ua],De.drawBuffer=di(Z.maxDrawbuffers,function(w){return w===0?[0]:di(w,function(g){return Cb+g})}));var _t=0;function vt(){var w=lb(),g=w.link,F=w.global;w.id=_t++,w.batchId="0";var B=g(Pe),G=w.shared={props:"a0"};Object.keys(Pe).forEach(function($){G[$]=F.def(B,".",$)}),_.optional(function(){w.CHECK=g(_),w.commandStr=_.guessCommand(),w.command=g(w.commandStr),w.assert=function($,T,H){$("if(!(",T,"))",this.CHECK,".commandRaise(",g(H),",",this.command,");")},De.invalidBlendCombinations=Fh});var D=w.next={},P=w.current={};Object.keys(oe).forEach(function($){Array.isArray(Ue[$])&&(D[$]=F.def(G.next,".",$),P[$]=F.def(G.current,".",$))});var z=w.constants={};Object.keys(De).forEach(function($){z[$]=F.def(JSON.stringify(De[$]))}),w.invoke=function($,T){switch(T.type){case ic:var H=["this",G.context,G.props,w.batchId];return $.def(g(T.data),".call(",H.slice(0,Math.max(T.data.length+1,4)),")");case rc:return $.def(G.props,T.data);case nc:return $.def(G.context,T.data);case ac:return $.def("this",T.data);case dl:return T.data.append(w,$),T.data.ref;case lh:return T.data.toString();case dh:return T.data.map(function(j){return w.invoke($,j)})}},w.attribCache={};var S={};return w.scopeAttrib=function($){var T=b.id($);if(T in S)return S[T];var H=Ae.scope[T];H||(H=Ae.scope[T]=new U);var j=S[T]=g(H);return j},w}function ze(w){var g=w.static,F=w.dynamic,B;if(Yo in g){var G=!!g[Yo];B=Fi(function(P,z){return G}),B.enable=G}else if(Yo in F){var D=F[Yo];B=wr(D,function(P,z){return P.invoke(z,D)})}return B}function je(w,g){var F=w.static,B=w.dynamic;if(sa in F){var G=F[sa];return G?(G=_e.getFramebuffer(G),_.command(G,"invalid framebuffer object"),Fi(function(P,z){var S=P.link(G),$=P.shared;z.set($.framebuffer,".next",S);var T=$.context;return z.set(T,"."+Ka,S+".width"),z.set(T,"."+Ja,S+".height"),S})):Fi(function(P,z){var S=P.shared;z.set(S.framebuffer,".next","null");var $=S.context;return z.set($,"."+Ka,$+"."+Ih),z.set($,"."+Ja,$+"."+Ah),"null"})}else if(sa in B){var D=B[sa];return wr(D,function(P,z){var S=P.invoke(z,D),$=P.shared,T=$.framebuffer,H=z.def(T,".getFramebuffer(",S,")");_.optional(function(){P.assert(z,"!"+S+"||"+H,"invalid framebuffer object")}),z.set(T,".next",H);var j=$.context;return z.set(j,"."+Ka,H+"?"+H+".width:"+j+"."+Ih),z.set(j,"."+Ja,H+"?"+H+".height:"+j+"."+Ah),H})}else return null}function ct(w,g,F){var B=w.static,G=w.dynamic;function D(S){if(S in B){var $=B[S];_.commandType($,"object","invalid "+S,F.commandStr);var T=!0,H=$.x|0,j=$.y|0,ae,ue;return"width"in $?(ae=$.width|0,_.command(ae>=0,"invalid "+S,F.commandStr)):T=!1,"height"in $?(ue=$.height|0,_.command(ue>=0,"invalid "+S,F.commandStr)):T=!1,new Yi(!T&&g&&g.thisDep,!T&&g&&g.contextDep,!T&&g&&g.propDep,function(it,qe){var pe=it.shared.context,re=ae;"width"in $||(re=qe.def(pe,".",Ka,"-",H));var Je=ue;return"height"in $||(Je=qe.def(pe,".",Ja,"-",j)),[H,j,re,Je]})}else if(S in G){var Le=G[S],ht=wr(Le,function(it,qe){var pe=it.invoke(qe,Le);_.optional(function(){it.assert(qe,pe+"&&typeof "+pe+'==="object"',"invalid "+S)});var re=it.shared.context,Je=qe.def(pe,".x|0"),Ye=qe.def(pe,".y|0"),ut=qe.def('"width" in ',pe,"?",pe,".width|0:","(",re,".",Ka,"-",Je,")"),Gt=qe.def('"height" in ',pe,"?",pe,".height|0:","(",re,".",Ja,"-",Ye,")");return _.optional(function(){it.assert(qe,ut+">=0&&"+Gt+">=0","invalid "+S)}),[Je,Ye,ut,Gt]});return g&&(ht.thisDep=ht.thisDep||g.thisDep,ht.contextDep=ht.contextDep||g.contextDep,ht.propDep=ht.propDep||g.propDep),ht}else return g?new Yi(g.thisDep,g.contextDep,g.propDep,function(it,qe){var pe=it.shared.context;return[0,0,qe.def(pe,".",Ka),qe.def(pe,".",Ja)]}):null}var P=D(wn);if(P){var z=P;P=new Yi(P.thisDep,P.contextDep,P.propDep,function(S,$){var T=z.append(S,$),H=S.shared.context;return $.set(H,"."+db,T[2]),$.set(H,"."+cb,T[3]),T})}return{viewport:P,scissor_box:D(cl)}}function yt(w,g){var F=w.static,B=typeof F[Ko]=="string"&&typeof F[Zo]=="string";if(B){if(Object.keys(g.dynamic).length>0)return null;var G=g.static,D=Object.keys(G);if(D.length>0&&typeof G[D[0]]=="number"){for(var P=[],z=0;z=0,"invalid "+qe,g.commandStr),Fi(function(Ye,ut){return pe&&(Ye.OFFSET=re),re})}else if(qe in B){var Je=B[qe];return wr(Je,function(Ye,ut){var Gt=Ye.invoke(ut,Je);return pe&&(Ye.OFFSET=Gt,_.optional(function(){Ye.assert(ut,Gt+">=0","invalid "+qe)})),Gt})}else if(pe){if(S)return Fi(function(Ye,ut){return Ye.OFFSET=0,0});if(D)return new Yi(z.thisDep,z.contextDep,z.propDep,function(Ye,ut){return ut.def(Ye.shared.vao+".currentVAO?"+Ye.shared.vao+".currentVAO.offset:0")})}else if(D)return new Yi(z.thisDep,z.contextDep,z.propDep,function(Ye,ut){return ut.def(Ye.shared.vao+".currentVAO?"+Ye.shared.vao+".currentVAO.instances:-1")});return null}var ae=j(ul,!0);function ue(){if(ca in F){var qe=F[ca]|0;return G.count=qe,_.command(typeof qe=="number"&&qe>=0,"invalid vertex count",g.commandStr),Fi(function(){return qe})}else if(ca in B){var pe=B[ca];return wr(pe,function(ut,Gt){var lr=ut.invoke(Gt,pe);return _.optional(function(){ut.assert(Gt,"typeof "+lr+'==="number"&&'+lr+">=0&&"+lr+"===("+lr+"|0)","invalid vertex count")}),lr})}else if(S)if(zn(T)){if(T)return ae?new Yi(ae.thisDep,ae.contextDep,ae.propDep,function(ut,Gt){var lr=Gt.def(ut.ELEMENTS,".vertCount-",ut.OFFSET);return _.optional(function(){ut.assert(Gt,lr+">=0","invalid vertex offset/element buffer too small")}),lr}):Fi(function(ut,Gt){return Gt.def(ut.ELEMENTS,".vertCount")});var re=Fi(function(){return-1});return _.optional(function(){re.MISSING=!0}),re}else{var Je=new Yi(T.thisDep||ae.thisDep,T.contextDep||ae.contextDep,T.propDep||ae.propDep,function(ut,Gt){var lr=ut.ELEMENTS;return ut.OFFSET?Gt.def(lr,"?",lr,".vertCount-",ut.OFFSET,":-1"):Gt.def(lr,"?",lr,".vertCount:-1")});return _.optional(function(){Je.DYNAMIC=!0}),Je}else if(D){var Ye=new Yi(z.thisDep,z.contextDep,z.propDep,function(ut,Gt){return Gt.def(ut.shared.vao,".currentVAO?",ut.shared.vao,".currentVAO.count:-1")});return Ye}return null}var Le=H(),ht=ue(),it=j(fl,!1);return{elements:T,primitive:Le,count:ht,instances:it,offset:ae,vao:z,vaoActive:D,elementsActive:S,static:G}}function yi(w,g){var F=w.static,B=w.dynamic,G={};return rt.forEach(function(D){var P=Xe(D);function z(S,$){if(D in F){var T=S(F[D]);G[P]=Fi(function(){return T})}else if(D in B){var H=B[D];G[P]=wr(H,function(j,ae){return $(j,ae,j.invoke(ae,H))})}}switch(D){case vh:case uh:case ch:case wh:case hh:case Eh:case _h:case yh:case xh:case gh:return z(function(S){return _.commandType(S,"boolean",D,g.commandStr),S},function(S,$,T){return _.optional(function(){S.assert($,"typeof "+T+'==="boolean"',"invalid flag "+D,S.commandStr)}),T});case mh:return z(function(S){return _.commandParameter(S,eo,"invalid "+D,g.commandStr),eo[S]},function(S,$,T){var H=S.constants.compareFuncs;return _.optional(function(){S.assert($,T+" in "+H,"invalid "+D+", must be one of "+Object.keys(eo))}),$.def(H,"[",T,"]")});case ph:return z(function(S){return _.command(mi(S)&&S.length===2&&typeof S[0]=="number"&&typeof S[1]=="number"&&S[0]<=S[1],"depth range is 2d array",g.commandStr),S},function(S,$,T){_.optional(function(){S.assert($,S.shared.isArrayLike+"("+T+")&&"+T+".length===2&&typeof "+T+'[0]==="number"&&typeof '+T+'[1]==="number"&&'+T+"[0]<="+T+"[1]","depth range must be a 2d array")});var H=$.def("+",T,"[0]"),j=$.def("+",T,"[1]");return[H,j]});case sc:return z(function(S){_.commandType(S,"object","blend.func",g.commandStr);var $="srcRGB"in S?S.srcRGB:S.src,T="srcAlpha"in S?S.srcAlpha:S.src,H="dstRGB"in S?S.dstRGB:S.dst,j="dstAlpha"in S?S.dstAlpha:S.dst;return _.commandParameter($,rn,P+".srcRGB",g.commandStr),_.commandParameter(T,rn,P+".srcAlpha",g.commandStr),_.commandParameter(H,rn,P+".dstRGB",g.commandStr),_.commandParameter(j,rn,P+".dstAlpha",g.commandStr),_.command(Fh.indexOf($+", "+H)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+$+", "+H+")",g.commandStr),[rn[$],rn[H],rn[T],rn[j]]},function(S,$,T){var H=S.constants.blendFuncs;_.optional(function(){S.assert($,T+"&&typeof "+T+'==="object"',"invalid blend func, must be an object")});function j(pe,re){var Je=$.def('"',pe,re,'" in ',T,"?",T,".",pe,re,":",T,".",pe);return _.optional(function(){S.assert($,Je+" in "+H,"invalid "+D+"."+pe+re+", must be one of "+Object.keys(rn))}),Je}var ae=j("src","RGB"),ue=j("dst","RGB");_.optional(function(){var pe=S.constants.invalidBlendCombinations;S.assert($,pe+".indexOf("+ae+'+", "+'+ue+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var Le=$.def(H,"[",ae,"]"),ht=$.def(H,"[",j("src","Alpha"),"]"),it=$.def(H,"[",ue,"]"),qe=$.def(H,"[",j("dst","Alpha"),"]");return[Le,it,ht,qe]});case oc:return z(function(S){if(typeof S=="string")return _.commandParameter(S,ee,"invalid "+D,g.commandStr),[ee[S],ee[S]];if(typeof S=="object")return _.commandParameter(S.rgb,ee,D+".rgb",g.commandStr),_.commandParameter(S.alpha,ee,D+".alpha",g.commandStr),[ee[S.rgb],ee[S.alpha]];_.commandRaise("invalid blend.equation",g.commandStr)},function(S,$,T){var H=S.constants.blendEquations,j=$.def(),ae=$.def(),ue=S.cond("typeof ",T,'==="string"');return _.optional(function(){function Le(ht,it,qe){S.assert(ht,qe+" in "+H,"invalid "+it+", must be one of "+Object.keys(ee))}Le(ue.then,D,T),S.assert(ue.else,T+"&&typeof "+T+'==="object"',"invalid "+D),Le(ue.else,D+".rgb",T+".rgb"),Le(ue.else,D+".alpha",T+".alpha")}),ue.then(j,"=",ae,"=",H,"[",T,"];"),ue.else(j,"=",H,"[",T,".rgb];",ae,"=",H,"[",T,".alpha];"),$(ue),[j,ae]});case fh:return z(function(S){return _.command(mi(S)&&S.length===4,"blend.color must be a 4d array",g.commandStr),di(4,function($){return+S[$]})},function(S,$,T){return _.optional(function(){S.assert($,S.shared.isArrayLike+"("+T+")&&"+T+".length===4","blend.color must be a 4d array")}),di(4,function(H){return $.def("+",T,"[",H,"]")})});case Sh:return z(function(S){return _.commandType(S,"number",P,g.commandStr),S|0},function(S,$,T){return _.optional(function(){S.assert($,"typeof "+T+'==="number"',"invalid stencil.mask")}),$.def(T,"|0")});case hc:return z(function(S){_.commandType(S,"object",P,g.commandStr);var $=S.cmp||"keep",T=S.ref||0,H="mask"in S?S.mask:-1;return _.commandParameter($,eo,D+".cmp",g.commandStr),_.commandType(T,"number",D+".ref",g.commandStr),_.commandType(H,"number",D+".mask",g.commandStr),[eo[$],T,H]},function(S,$,T){var H=S.constants.compareFuncs;_.optional(function(){function Le(){S.assert($,Array.prototype.join.call(arguments,""),"invalid stencil.func")}Le(T+"&&typeof ",T,'==="object"'),Le('!("cmp" in ',T,")||(",T,".cmp in ",H,")")});var j=$.def('"cmp" in ',T,"?",H,"[",T,".cmp]",":",Dn),ae=$.def(T,".ref|0"),ue=$.def('"mask" in ',T,"?",T,".mask|0:-1");return[j,ae,ue]});case mc:case Xo:return z(function(S){_.commandType(S,"object",P,g.commandStr);var $=S.fail||"keep",T=S.zfail||"keep",H=S.zpass||"keep";return _.commandParameter($,Mn,D+".fail",g.commandStr),_.commandParameter(T,Mn,D+".zfail",g.commandStr),_.commandParameter(H,Mn,D+".zpass",g.commandStr),[D===Xo?ua:ns,Mn[$],Mn[T],Mn[H]]},function(S,$,T){var H=S.constants.stencilOps;_.optional(function(){S.assert($,T+"&&typeof "+T+'==="object"',"invalid "+D)});function j(ae){return _.optional(function(){S.assert($,'!("'+ae+'" in '+T+")||("+T+"."+ae+" in "+H+")","invalid "+D+"."+ae+", must be one of "+Object.keys(Mn))}),$.def('"',ae,'" in ',T,"?",H,"[",T,".",ae,"]:",Dn)}return[D===Xo?ua:ns,j("fail"),j("zfail"),j("zpass")]});case uc:return z(function(S){_.commandType(S,"object",P,g.commandStr);var $=S.factor|0,T=S.units|0;return _.commandType($,"number",P+".factor",g.commandStr),_.commandType(T,"number",P+".units",g.commandStr),[$,T]},function(S,$,T){_.optional(function(){S.assert($,T+"&&typeof "+T+'==="object"',"invalid "+D)});var H=$.def(T,".factor|0"),j=$.def(T,".units|0");return[H,j]});case bh:return z(function(S){var $=0;return S==="front"?$=ns:S==="back"&&($=ua),_.command(!!$,P,g.commandStr),$},function(S,$,T){return _.optional(function(){S.assert($,T+'==="front"||'+T+'==="back"',"invalid cull.face")}),$.def(T,'==="front"?',ns,":",ua)});case cc:return z(function(S){return _.command(typeof S=="number"&&S>=Z.lineWidthDims[0]&&S<=Z.lineWidthDims[1],"invalid line width, must be a positive number between "+Z.lineWidthDims[0]+" and "+Z.lineWidthDims[1],g.commandStr),S},function(S,$,T){return _.optional(function(){S.assert($,"typeof "+T+'==="number"&&'+T+">="+Z.lineWidthDims[0]+"&&"+T+"<="+Z.lineWidthDims[1],"invalid line width")}),T});case dc:return z(function(S){return _.commandParameter(S,Sc,P,g.commandStr),Sc[S]},function(S,$,T){return _.optional(function(){S.assert($,T+'==="cw"||'+T+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),$.def(T+'==="cw"?'+kh+":"+wc)});case lc:return z(function(S){return _.command(mi(S)&&S.length===4,"color.mask must be length 4 array",g.commandStr),S.map(function($){return!!$})},function(S,$,T){return _.optional(function(){S.assert($,S.shared.isArrayLike+"("+T+")&&"+T+".length===4","invalid color.mask")}),di(4,function(H){return"!!"+T+"["+H+"]"})});case fc:return z(function(S){_.command(typeof S=="object"&&S,P,g.commandStr);var $="value"in S?S.value:1,T=!!S.invert;return _.command(typeof $=="number"&&$>=0&&$<=1,"sample.coverage.value must be a number between 0 and 1",g.commandStr),[$,T]},function(S,$,T){_.optional(function(){S.assert($,T+"&&typeof "+T+'==="object"',"invalid sample.coverage")});var H=$.def('"value" in ',T,"?+",T,".value:1"),j=$.def("!!",T,".invert");return[H,j]})}}),G}function $t(w,g){var F=w.static,B=w.dynamic,G={};return Object.keys(F).forEach(function(D){var P=F[D],z;if(typeof P=="number"||typeof P=="boolean")z=Fi(function(){return P});else if(typeof P=="function"){var S=P._reglType;S==="texture2d"||S==="textureCube"?z=Fi(function($){return $.link(P)}):S==="framebuffer"||S==="framebufferCube"?(_.command(P.color.length>0,'missing color attachment for framebuffer sent to uniform "'+D+'"',g.commandStr),z=Fi(function($){return $.link(P.color[0])})):_.commandRaise('invalid data for uniform "'+D+'"',g.commandStr)}else mi(P)?z=Fi(function($){var T=$.global.def("[",di(P.length,function(H){return _.command(typeof P[H]=="number"||typeof P[H]=="boolean","invalid uniform "+D,$.commandStr),P[H]}),"]");return T}):_.commandRaise('invalid or missing data for uniform "'+D+'"',g.commandStr);z.value=P,G[D]=z}),Object.keys(B).forEach(function(D){var P=B[D];G[D]=wr(P,function(z,S){return z.invoke(S,P)})}),G}function Mi(w,g){var F=w.static,B=w.dynamic,G={};return Object.keys(F).forEach(function(D){var P=F[D],z=b.id(D),S=new U;if(wl(P))S.state=Za,S.buffer=se.getBuffer(se.create(P,Qa,!1,!0)),S.type=0;else{var $=se.getBuffer(P);if($)S.state=Za,S.buffer=$,S.type=0;else if(_.command(typeof P=="object"&&P,"invalid data for attribute "+D,g.commandStr),"constant"in P){var T=P.constant;S.buffer="null",S.state=tc,typeof T=="number"?S.x=T:(_.command(mi(T)&&T.length>0&&T.length<=4,"invalid constant for attribute "+D,g.commandStr),Ya.forEach(function(it,qe){qe=0,'invalid offset for attribute "'+D+'"',g.commandStr);var j=P.stride|0;_.command(j>=0&&j<256,'invalid stride for attribute "'+D+'", must be integer betweeen [0, 255]',g.commandStr);var ae=P.size|0;_.command(!("size"in P)||ae>0&&ae<=4,'invalid size for attribute "'+D+'", must be 1,2,3,4',g.commandStr);var ue=!!P.normalized,Le=0;"type"in P&&(_.commandParameter(P.type,ia,"invalid type for attribute "+D,g.commandStr),Le=ia[P.type]);var ht=P.divisor|0;_.optional(function(){"divisor"in P&&(_.command(ht===0||Te,'cannot specify divisor for attribute "'+D+'", instancing not supported',g.commandStr),_.command(ht>=0,'invalid divisor for attribute "'+D+'"',g.commandStr));var it=g.commandStr,qe=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(P).forEach(function(pe){_.command(qe.indexOf(pe)>=0,'unknown parameter "'+pe+'" for attribute pointer "'+D+'" (valid parameters are '+qe+")",it)})}),S.buffer=$,S.state=Za,S.size=ae,S.normalized=ue,S.type=Le||$.dtype,S.offset=H,S.stride=j,S.divisor=ht}}G[D]=Fi(function(it,qe){var pe=it.attribCache;if(z in pe)return pe[z];var re={isStream:!1};return Object.keys(S).forEach(function(Je){re[Je]=S[Je]}),S.buffer&&(re.buffer=it.link(S.buffer),re.type=re.type||re.buffer+".dtype"),pe[z]=re,re})}),Object.keys(B).forEach(function(D){var P=B[D];function z(S,$){var T=S.invoke($,P),H=S.shared,j=S.constants,ae=H.isBufferArgs,ue=H.buffer;_.optional(function(){S.assert($,T+"&&(typeof "+T+'==="object"||typeof '+T+'==="function")&&('+ae+"("+T+")||"+ue+".getBuffer("+T+")||"+ue+".getBuffer("+T+".buffer)||"+ae+"("+T+'.buffer)||("constant" in '+T+"&&(typeof "+T+'.constant==="number"||'+H.isArrayLike+"("+T+".constant))))",'invalid dynamic attribute "'+D+'"')});var Le={isStream:$.def(!1)},ht=new U;ht.state=Za,Object.keys(ht).forEach(function(re){Le[re]=$.def(""+ht[re])});var it=Le.buffer,qe=Le.type;$("if(",ae,"(",T,")){",Le.isStream,"=true;",it,"=",ue,".createStream(",Qa,",",T,");",qe,"=",it,".dtype;","}else{",it,"=",ue,".getBuffer(",T,");","if(",it,"){",qe,"=",it,".dtype;",'}else if("constant" in ',T,"){",Le.state,"=",tc,";","if(typeof "+T+'.constant === "number"){',Le[Ya[0]],"=",T,".constant;",Ya.slice(1).map(function(re){return Le[re]}).join("="),"=0;","}else{",Ya.map(function(re,Je){return Le[re]+"="+T+".constant.length>"+Je+"?"+T+".constant["+Je+"]:0;"}).join(""),"}}else{","if(",ae,"(",T,".buffer)){",it,"=",ue,".createStream(",Qa,",",T,".buffer);","}else{",it,"=",ue,".getBuffer(",T,".buffer);","}",qe,'="type" in ',T,"?",j.glTypes,"[",T,".type]:",it,".dtype;",Le.normalized,"=!!",T,".normalized;");function pe(re){$(Le[re],"=",T,".",re,"|0;")}return pe("size"),pe("offset"),pe("stride"),pe("divisor"),$("}}"),$.exit("if(",Le.isStream,"){",ue,".destroyStream(",it,");","}"),Le}G[D]=wr(P,z)}),G}function oi(w){var g=w.static,F=w.dynamic,B={};return Object.keys(g).forEach(function(G){var D=g[G];B[G]=Fi(function(P,z){return typeof D=="number"||typeof D=="boolean"?""+D:P.link(D)})}),Object.keys(F).forEach(function(G){var D=F[G];B[G]=wr(D,function(P,z){return P.invoke(z,D)})}),B}function Ni(w,g,F,B,G){var D=w.static,P=w.dynamic;_.optional(function(){var pe=[sa,Zo,Ko,la,da,ul,ca,fl,Yo,Jo].concat(rt);function re(Je){Object.keys(Je).forEach(function(Ye){_.command(pe.indexOf(Ye)>=0,'unknown parameter "'+Ye+'"',G.commandStr)})}re(D),re(P)});var z=yt(w,g),S=je(w),$=ct(w,S,G),T=pi(w,G),H=yi(w,G),j=At(w,G,z);function ae(pe){var re=$[pe];re&&(H[pe]=re)}ae(wn),ae(Xe(cl));var ue=Object.keys(H).length>0,Le={framebuffer:S,draw:T,shader:j,state:H,dirty:ue,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Le.profile=ze(w),Le.uniforms=$t(F,G),Le.drawVAO=Le.scopeVAO=T.vao,!Le.drawVAO&&j.program&&!z&&O.angle_instanced_arrays&&T.static.elements){var ht=!0,it=j.program.attributes.map(function(pe){var re=g.static[pe];return ht=ht&&!!re,re});if(ht&&it.length>0){var qe=Ae.getVAO(Ae.createVAO({attributes:it,elements:T.static.elements}));Le.drawVAO=new Yi(null,null,null,function(pe,re){return pe.link(qe)}),Le.useVAO=!0}}return z?Le.useVAO=!0:Le.attributes=Mi(g,G),Le.context=oi(B),Le}function zi(w,g,F){var B=w.shared,G=B.context,D=w.scope();Object.keys(F).forEach(function(P){g.save(G,"."+P);var z=F[P],S=z.append(w,g);Array.isArray(S)?D(G,".",P,"=[",S.join(),"];"):D(G,".",P,"=",S,";")}),g(D)}function Bi(w,g,F,B){var G=w.shared,D=G.gl,P=G.framebuffer,z;He&&(z=g.def(G.extensions,".webgl_draw_buffers"));var S=w.constants,$=S.drawBuffer,T=S.backBuffer,H;F?H=F.append(w,g):H=g.def(P,".next"),B||g("if(",H,"!==",P,".cur){"),g("if(",H,"){",D,".bindFramebuffer(",Rh,",",H,".framebuffer);"),He&&g(z,".drawBuffersWEBGL(",$,"[",H,".colorAttachments.length]);"),g("}else{",D,".bindFramebuffer(",Rh,",null);"),He&&g(z,".drawBuffersWEBGL(",T,");"),g("}",P,".cur=",H,";"),B||g("}")}function er(w,g,F){var B=w.shared,G=B.gl,D=w.current,P=w.next,z=B.current,S=B.next,$=w.cond(z,".dirty");rt.forEach(function(T){var H=Xe(T);if(!(H in F.state)){var j,ae;if(H in P){j=P[H],ae=D[H];var ue=di(Ue[H].length,function(ht){return $.def(j,"[",ht,"]")});$(w.cond(ue.map(function(ht,it){return ht+"!=="+ae+"["+it+"]"}).join("||")).then(G,".",oe[H],"(",ue,");",ue.map(function(ht,it){return ae+"["+it+"]="+ht}).join(";"),";"))}else{j=$.def(S,".",H);var Le=w.cond(j,"!==",z,".",H);$(Le),H in ce?Le(w.cond(j).then(G,".enable(",ce[H],");").else(G,".disable(",ce[H],");"),z,".",H,"=",j,";"):Le(G,".",oe[H],"(",j,");",z,".",H,"=",j,";")}}}),Object.keys(F.state).length===0&&$(z,".dirty=false;"),g($)}function or(w,g,F,B){var G=w.shared,D=w.current,P=G.current,z=G.gl;Ph(Object.keys(F)).forEach(function(S){var $=F[S];if(!(B&&!B($))){var T=$.append(w,g);if(ce[S]){var H=ce[S];zn($)?T?g(z,".enable(",H,");"):g(z,".disable(",H,");"):g(w.cond(T).then(z,".enable(",H,");").else(z,".disable(",H,");")),g(P,".",S,"=",T,";")}else if(mi(T)){var j=D[S];g(z,".",oe[S],"(",T,");",T.map(function(ae,ue){return j+"["+ue+"]="+ae}).join(";"),";")}else g(z,".",oe[S],"(",T,");",P,".",S,"=",T,";")}})}function Ci(w,g){Te&&(w.instancing=g.def(w.shared.extensions,".angle_instanced_arrays"))}function St(w,g,F,B,G){var D=w.shared,P=w.stats,z=D.current,S=D.timer,$=F.profile;function T(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var H,j;function ae(pe){H=g.def(),pe(H,"=",T(),";"),typeof G=="string"?pe(P,".count+=",G,";"):pe(P,".count++;"),ye&&(B?(j=g.def(),pe(j,"=",S,".getNumPendingQueries();")):pe(S,".beginQuery(",P,");"))}function ue(pe){pe(P,".cpuTime+=",T(),"-",H,";"),ye&&(B?pe(S,".pushScopeStats(",j,",",S,".getNumPendingQueries(),",P,");"):pe(S,".endQuery();"))}function Le(pe){var re=g.def(z,".profile");g(z,".profile=",pe,";"),g.exit(z,".profile=",re,";")}var ht;if($){if(zn($)){$.enable?(ae(g),ue(g.exit),Le("true")):Le("false");return}ht=$.append(w,g),Le(ht)}else ht=g.def(z,".profile");var it=w.block();ae(it),g("if(",ht,"){",it,"}");var qe=w.block();ue(qe),g.exit("if(",ht,"){",qe,"}")}function sr(w,g,F,B,G){var D=w.shared;function P(S){switch(S){case hl:case gl:case _l:return 2;case ml:case vl:case yl:return 3;case pl:case bl:case xl:return 4;default:return 1}}function z(S,$,T){var H=D.gl,j=g.def(S,".location"),ae=g.def(D.attributes,"[",j,"]"),ue=T.state,Le=T.buffer,ht=[T.x,T.y,T.z,T.w],it=["buffer","normalized","offset","stride"];function qe(){g("if(!",ae,".buffer){",H,".enableVertexAttribArray(",j,");}");var re=T.type,Je;if(T.size?Je=g.def(T.size,"||",$):Je=$,g("if(",ae,".type!==",re,"||",ae,".size!==",Je,"||",it.map(function(ut){return ae+"."+ut+"!=="+T[ut]}).join("||"),"){",H,".bindBuffer(",Qa,",",Le,".buffer);",H,".vertexAttribPointer(",[j,Je,re,T.normalized,T.stride,T.offset],");",ae,".type=",re,";",ae,".size=",Je,";",it.map(function(ut){return ae+"."+ut+"="+T[ut]+";"}).join(""),"}"),Te){var Ye=T.divisor;g("if(",ae,".divisor!==",Ye,"){",w.instancing,".vertexAttribDivisorANGLE(",[j,Ye],");",ae,".divisor=",Ye,";}")}}function pe(){g("if(",ae,".buffer){",H,".disableVertexAttribArray(",j,");",ae,".buffer=null;","}if(",Ya.map(function(re,Je){return ae+"."+re+"!=="+ht[Je]}).join("||"),"){",H,".vertexAttrib4f(",j,",",ht,");",Ya.map(function(re,Je){return ae+"."+re+"="+ht[Je]+";"}).join(""),"}")}ue===Za?qe():ue===tc?pe():(g("if(",ue,"===",Za,"){"),qe(),g("}else{"),pe(),g("}"))}B.forEach(function(S){var $=S.name,T=F.attributes[$],H;if(T){if(!G(T))return;H=T.append(w,g)}else{if(!G(Dh))return;var j=w.scopeAttrib($);_.optional(function(){w.assert(g,j+".state","missing attribute "+$)}),H={},Object.keys(new U).forEach(function(ae){H[ae]=g.def(j,".",ae)})}z(w.link(S),P(S.info.type),H)})}function zt(w,g,F,B,G,D){for(var P=w.shared,z=P.gl,S={},$,T=0;T1){if(!Le)continue;var ht=j.replace("[0]","");if(S[ht])continue;S[ht]=1}var it=w.link(H),qe=it+".location",pe;if(Le){if(!G(Le))continue;if(zn(Le)){var re=Le.value;if(_.command(re!==null&&typeof re!="undefined",'missing uniform "'+j+'"',w.commandStr),ae===is||ae===rs){_.command(typeof re=="function"&&(ae===is&&(re._reglType==="texture2d"||re._reglType==="framebuffer")||ae===rs&&(re._reglType==="textureCube"||re._reglType==="framebufferCube")),"invalid texture for uniform "+j,w.commandStr);var Je=w.link(re._texture||re.color[0]._texture);g(z,".uniform1i(",qe,",",Je+".bind());"),g.exit(Je,".unbind();")}else if(ae===Qo||ae===es||ae===ts){_.optional(function(){_.command(mi(re),"invalid matrix for uniform "+j,w.commandStr),_.command(ae===Qo&&re.length===4||ae===es&&re.length===9||ae===ts&&re.length===16,"invalid length for matrix uniform "+j,w.commandStr)});var Ye=w.global.def("new Float32Array(["+Array.prototype.slice.call(re)+"])"),ut=2;ae===es?ut=3:ae===ts&&(ut=4),g(z,".uniformMatrix",ut,"fv(",qe,",false,",Ye,");")}else{switch(ae){case bc:ue===1?_.commandType(re,"number","uniform "+j,w.commandStr):_.command(mi(re)&&re.length===ue,"uniform "+j,w.commandStr),$="1f";break;case hl:_.command(mi(re)&&re.length&&re.length%2===0&&re.length<=ue*2,"uniform "+j,w.commandStr),$="2f";break;case ml:_.command(mi(re)&&re.length&&re.length%3===0&&re.length<=ue*3,"uniform "+j,w.commandStr),$="3f";break;case pl:_.command(mi(re)&&re.length&&re.length%4===0&&re.length<=ue*4,"uniform "+j,w.commandStr),$="4f";break;case yc:ue===1?_.commandType(re,"boolean","uniform "+j,w.commandStr):_.command(mi(re)&&re.length===ue,"uniform "+j,w.commandStr),$="1i";break;case _c:ue===1?_.commandType(re,"number","uniform "+j,w.commandStr):_.command(mi(re)&&re.length===ue,"uniform "+j,w.commandStr),$="1i";break;case _l:_.command(mi(re)&&re.length&&re.length%2===0&&re.length<=ue*2,"uniform "+j,w.commandStr),$="2i";break;case gl:_.command(mi(re)&&re.length&&re.length%2===0&&re.length<=ue*2,"uniform "+j,w.commandStr),$="2i";break;case yl:_.command(mi(re)&&re.length&&re.length%3===0&&re.length<=ue*3,"uniform "+j,w.commandStr),$="3i";break;case vl:_.command(mi(re)&&re.length&&re.length%3===0&&re.length<=ue*3,"uniform "+j,w.commandStr),$="3i";break;case xl:_.command(mi(re)&&re.length&&re.length%4===0&&re.length<=ue*4,"uniform "+j,w.commandStr),$="4i";break;case bl:_.command(mi(re)&&re.length&&re.length%4===0&&re.length<=ue*4,"uniform "+j,w.commandStr),$="4i";break}ue>1?($+="v",re=w.global.def("["+Array.prototype.slice.call(re)+"]")):re=mi(re)?Array.prototype.slice.call(re):re,g(z,".uniform",$,"(",qe,",",re,");")}continue}else pe=Le.append(w,g)}else{if(!G(Dh))continue;pe=g.def(P.uniforms,"[",b.id(j),"]")}ae===is?(_(!Array.isArray(pe),"must specify a scalar prop for textures"),g("if(",pe,"&&",pe,'._reglType==="framebuffer"){',pe,"=",pe,".color[0];","}")):ae===rs&&(_(!Array.isArray(pe),"must specify a scalar prop for cube maps"),g("if(",pe,"&&",pe,'._reglType==="framebufferCube"){',pe,"=",pe,".color[0];","}")),_.optional(function(){function Rr(Sr,Sl){w.assert(g,Sr,'bad data or missing for uniform "'+j+'". '+Sl)}function pa(Sr,Sl){Sl===1&&_(!Array.isArray(pe),"must not specify an array type for uniform"),Rr("Array.isArray("+pe+") && typeof "+pe+'[0]===" '+Sr+'" || typeof '+pe+'==="'+Sr+'"',"invalid type, expected "+Sr)}function Mr(Sr,Sl,El){Array.isArray(pe)?_(pe.length&&pe.length%Sr===0&&pe.length<=Sr*El,"must have length of "+(El===1?"":"n * ")+Sr):Rr(P.isArrayLike+"("+pe+")&&"+pe+".length && "+pe+".length % "+Sr+" === 0 && "+pe+".length<="+Sr*El,"invalid vector, should have length of "+(El===1?"":"n * ")+Sr,w.commandStr)}function Vh(Sr){_(!Array.isArray(pe),"must not specify a value type"),Rr("typeof "+pe+'==="function"&&'+pe+'._reglType==="texture'+(Sr===Ch?"2d":"Cube")+'"',"invalid texture type",w.commandStr)}switch(ae){case _c:pa("number",ue);break;case gl:Mr(2,"number",ue);break;case vl:Mr(3,"number",ue);break;case bl:Mr(4,"number",ue);break;case bc:pa("number",ue);break;case hl:Mr(2,"number",ue);break;case ml:Mr(3,"number",ue);break;case pl:Mr(4,"number",ue);break;case yc:pa("boolean",ue);break;case _l:Mr(2,"boolean",ue);break;case yl:Mr(3,"boolean",ue);break;case xl:Mr(4,"boolean",ue);break;case Qo:Mr(4,"number",ue);break;case es:Mr(9,"number",ue);break;case ts:Mr(16,"number",ue);break;case is:Vh(Ch);break;case rs:Vh(mb);break}});var Gt=1;switch(ae){case is:case rs:var lr=g.def(pe,"._texture");g(z,".uniform1i(",qe,",",lr,".bind());"),g.exit(lr,".unbind();");continue;case _c:case yc:$="1i";break;case gl:case _l:$="2i",Gt=2;break;case vl:case yl:$="3i",Gt=3;break;case bl:case xl:$="4i",Gt=4;break;case bc:$="1f";break;case hl:$="2f",Gt=2;break;case ml:$="3f",Gt=3;break;case pl:$="4f",Gt=4;break;case Qo:$="Matrix2fv";break;case es:$="Matrix3fv";break;case ts:$="Matrix4fv";break}if($.indexOf("Matrix")===-1&&ue>1&&($+="v",Gt=1),$.charAt(0)==="M"){g(z,".uniform",$,"(",qe,",");var ha=Math.pow(ae-Qo+2,2),Sn=w.global.def("new Float32Array(",ha,")");Array.isArray(pe)?g("false,(",di(ha,function(Rr){return Sn+"["+Rr+"]="+pe[Rr]}),",",Sn,")"):g("false,(Array.isArray(",pe,")||",pe," instanceof Float32Array)?",pe,":(",di(ha,function(Rr){return Sn+"["+Rr+"]="+pe+"["+Rr+"]"}),",",Sn,")"),g(");")}else if(Gt>1){for(var an=[],Bn=[],ma=0;ma=0","missing vertex count")})):(Ye=ut.def(P,".",ca),_.optional(function(){w.assert(ut,Ye+">=0","missing vertex count")})),Ye}var T=S();function H(Je){var Ye=z[Je];return Ye?Ye.contextDep&&B.contextDynamic||Ye.propDep?Ye.append(w,F):Ye.append(w,g):g.def(P,".",Je)}var j=H(da),ae=H(ul),ue=$();if(typeof ue=="number"){if(ue===0)return}else F("if(",ue,"){"),F.exit("}");var Le,ht;Te&&(Le=H(fl),ht=w.instancing);var it=T+".type",qe=z.elements&&zn(z.elements)&&!z.vaoActive;function pe(){function Je(){F(ht,".drawElementsInstancedANGLE(",[j,ue,it,ae+"<<(("+it+"-"+sh+")>>1)",Le],");")}function Ye(){F(ht,".drawArraysInstancedANGLE(",[j,ae,ue,Le],");")}T&&T!=="null"?qe?Je():(F("if(",T,"){"),Je(),F("}else{"),Ye(),F("}")):Ye()}function re(){function Je(){F(D+".drawElements("+[j,ue,it,ae+"<<(("+it+"-"+sh+")>>1)"]+");")}function Ye(){F(D+".drawArrays("+[j,ae,ue]+");")}T&&T!=="null"?qe?Je():(F("if(",T,"){"),Je(),F("}else{"),Ye(),F("}")):Ye()}Te&&(typeof Le!="number"||Le>=0)?typeof Le=="string"?(F("if(",Le,">0){"),pe(),F("}else if(",Le,"<0){"),re(),F("}")):pe():re()}function Ct(w,g,F,B,G){var D=vt(),P=D.proc("body",G);return _.optional(function(){D.commandStr=g.commandStr,D.command=D.link(g.commandStr)}),Te&&(D.instancing=P.def(D.shared.extensions,".angle_instanced_arrays")),w(D,P,F,B),D.compile().body}function Nt(w,g,F,B){Ci(w,g),F.useVAO?F.drawVAO?g(w.shared.vao,".setVAO(",F.drawVAO.append(w,g),");"):g(w.shared.vao,".setVAO(",w.shared.vao,".targetVAO);"):(g(w.shared.vao,".setVAO(null);"),sr(w,g,F,B.attributes,function(){return!0})),zt(w,g,F,B.uniforms,function(){return!0},!1),lt(w,g,g,F)}function ki(w,g){var F=w.proc("draw",1);Ci(w,F),zi(w,F,g.context),Bi(w,F,g.framebuffer),er(w,F,g),or(w,F,g.state),St(w,F,g,!1,!0);var B=g.shader.progVar.append(w,F);if(F(w.shared.gl,".useProgram(",B,".program);"),g.shader.program)Nt(w,F,g,g.shader.program);else{F(w.shared.vao,".setVAO(null);");var G=w.global.def("{}"),D=F.def(B,".id"),P=F.def(G,"[",D,"]");F(w.cond(P).then(P,".call(this,a0);").else(P,"=",G,"[",D,"]=",w.link(function(z){return Ct(Nt,w,g,z,1)}),"(",B,");",P,".call(this,a0);"))}Object.keys(g.state).length>0&&F(w.shared.current,".dirty=true;"),w.shared.vao&&F(w.shared.vao,".setVAO(null);")}function nn(w,g,F,B){w.batchId="a1",Ci(w,g);function G(){return!0}sr(w,g,F,B.attributes,G),zt(w,g,F,B.uniforms,G,!1),lt(w,g,g,F)}function fa(w,g,F,B){Ci(w,g);var G=F.contextDep,D=g.def(),P="a0",z="a1",S=g.def();w.shared.props=S,w.batchId=D;var $=w.scope(),T=w.scope();g($.entry,"for(",D,"=0;",D,"<",z,";++",D,"){",S,"=",P,"[",D,"];",T,"}",$.exit);function H(it){return it.contextDep&&G||it.propDep}function j(it){return!H(it)}if(F.needsContext&&zi(w,T,F.context),F.needsFramebuffer&&Bi(w,T,F.framebuffer),or(w,T,F.state,H),F.profile&&H(F.profile)&&St(w,T,F,!1,!0),B)F.useVAO?F.drawVAO?H(F.drawVAO)?T(w.shared.vao,".setVAO(",F.drawVAO.append(w,T),");"):$(w.shared.vao,".setVAO(",F.drawVAO.append(w,$),");"):$(w.shared.vao,".setVAO(",w.shared.vao,".targetVAO);"):($(w.shared.vao,".setVAO(null);"),sr(w,$,F,B.attributes,j),sr(w,T,F,B.attributes,H)),zt(w,$,F,B.uniforms,j,!1),zt(w,T,F,B.uniforms,H,!0),lt(w,$,T,F);else{var ae=w.global.def("{}"),ue=F.shader.progVar.append(w,T),Le=T.def(ue,".id"),ht=T.def(ae,"[",Le,"]");T(w.shared.gl,".useProgram(",ue,".program);","if(!",ht,"){",ht,"=",ae,"[",Le,"]=",w.link(function(it){return Ct(nn,w,F,it,2)}),"(",ue,");}",ht,".call(this,a0[",D,"],",D,");")}}function A(w,g){var F=w.proc("batch",2);w.batchId="0",Ci(w,F);var B=!1,G=!0;Object.keys(g.context).forEach(function(ae){B=B||g.context[ae].propDep}),B||(zi(w,F,g.context),G=!1);var D=g.framebuffer,P=!1;D?(D.propDep?B=P=!0:D.contextDep&&B&&(P=!0),P||Bi(w,F,D)):Bi(w,F,null),g.state.viewport&&g.state.viewport.propDep&&(B=!0);function z(ae){return ae.contextDep&&B||ae.propDep}er(w,F,g),or(w,F,g.state,function(ae){return!z(ae)}),(!g.profile||!z(g.profile))&&St(w,F,g,!1,"a1"),g.contextDep=B,g.needsContext=G,g.needsFramebuffer=P;var S=g.shader.progVar;if(S.contextDep&&B||S.propDep)fa(w,F,g,null);else{var $=S.append(w,F);if(F(w.shared.gl,".useProgram(",$,".program);"),g.shader.program)fa(w,F,g,g.shader.program);else{F(w.shared.vao,".setVAO(null);");var T=w.global.def("{}"),H=F.def($,".id"),j=F.def(T,"[",H,"]");F(w.cond(j).then(j,".call(this,a0,a1);").else(j,"=",T,"[",H,"]=",w.link(function(ae){return Ct(fa,w,g,ae,2)}),"(",$,");",j,".call(this,a0,a1);"))}}Object.keys(g.state).length>0&&F(w.shared.current,".dirty=true;"),w.shared.vao&&F(w.shared.vao,".setVAO(null);")}function J(w,g){var F=w.proc("scope",3);w.batchId="a2";var B=w.shared,G=B.current;zi(w,F,g.context),g.framebuffer&&g.framebuffer.append(w,F),Ph(Object.keys(g.state)).forEach(function(P){var z=g.state[P],S=z.append(w,F);mi(S)?S.forEach(function($,T){F.set(w.next[P],"["+T+"]",$)}):F.set(B.next,"."+P,S)}),St(w,F,g,!0,!0),[la,ul,ca,fl,da].forEach(function(P){var z=g.draw[P];z&&F.set(B.draw,"."+P,""+z.append(w,F))}),Object.keys(g.uniforms).forEach(function(P){var z=g.uniforms[P].append(w,F);Array.isArray(z)&&(z="["+z.join()+"]"),F.set(B.uniforms,"["+b.id(P)+"]",z)}),Object.keys(g.attributes).forEach(function(P){var z=g.attributes[P].append(w,F),S=w.scopeAttrib(P);Object.keys(new U).forEach(function($){F.set(S,"."+$,z[$])})}),g.scopeVAO&&F.set(B.vao,".targetVAO",g.scopeVAO.append(w,F));function D(P){var z=g.shader[P];z&&F.set(B.shader,"."+P,z.append(w,F))}D(Zo),D(Ko),Object.keys(g.state).length>0&&(F(G,".dirty=true;"),F.exit(G,".dirty=true;")),F("a1(",w.shared.context,",a0,",w.batchId,");")}function q(w){if(!(typeof w!="object"||mi(w))){for(var g=Object.keys(w),F=0;F=0;--lt){var Ct=De[lt];Ct&&Ct(ye,null,0)}O.flush(),Ae&&Ae.update()}function yt(){!je&&De.length>0&&(je=Ri.next(ct))}function At(){je&&(Ri.cancel(ct),je=null)}function pi(lt){lt.preventDefault(),se=!0,At(),_t.forEach(function(Ct){Ct()})}function yi(lt){O.getError(),se=!1,Y.restore(),Me.restore(),Te.restore(),rt.restore(),ce.restore(),oe.restore(),ve.restore(),Ae&&Ae.restore(),Xe.procs.refresh(),yt(),vt.forEach(function(Ct){Ct()})}Pe&&(Pe.addEventListener(zh,pi,!1),Pe.addEventListener(Bh,yi,!1));function $t(){De.length=0,At(),Pe&&(Pe.removeEventListener(zh,pi),Pe.removeEventListener(Bh,yi)),Me.clear(),oe.clear(),ce.clear(),ve.clear(),rt.clear(),He.clear(),Te.clear(),Ae&&Ae.clear(),ze.forEach(function(lt){lt()})}function Mi(lt){_(!!lt,"invalid args to regl({...})"),_.type(lt,"object","invalid args to regl({...})");function Ct(G){var D=r({},G);delete D.uniforms,delete D.attributes,delete D.context,delete D.vao,"stencil"in D&&D.stencil.op&&(D.stencil.opBack=D.stencil.opFront=D.stencil.op,delete D.stencil.op);function P(z){if(z in D){var S=D[z];delete D[z],Object.keys(S).forEach(function($){D[z+"."+$]=S[$]})}}return P("blend"),P("depth"),P("cull"),P("stencil"),P("polygonOffset"),P("scissor"),P("sample"),"vao"in G&&(D.vao=G.vao),D}function Nt(G,D){var P={},z={};return Object.keys(G).forEach(function(S){var $=G[S];if(qt.isDynamic($)){z[S]=qt.unbox($,S);return}else if(D&&Array.isArray($)){for(var T=0;T<$.length;++T)if(qt.isDynamic($[T])){z[S]=qt.unbox($,S);return}}P[S]=$}),{dynamic:z,static:P}}var ki=Nt(lt.context||{},!0),nn=Nt(lt.uniforms||{},!0),fa=Nt(lt.attributes||{},!1),A=Nt(Ct(lt),!1),J={gpuTime:0,cpuTime:0,count:0},q=Xe.compile(A,fa,nn,ki,J),We=q.draw,Tt=q.batch,w=q.scope,g=[];function F(G){for(;g.length0)return Tt.call(this,F(G|0),G|0)}else if(Array.isArray(G)){if(G.length)return Tt.call(this,G,G.length)}else return We.call(this,G)}return r(B,{stats:J,destroy:function(){q.destroy()}})}var oi=oe.setFBO=Mi({framebuffer:qt.define.call(null,Uh,"framebuffer")});function Ni(lt,Ct){var Nt=0;Xe.procs.poll();var ki=Ct.color;ki&&(O.clearColor(+ki[0]||0,+ki[1]||0,+ki[2]||0,+ki[3]||0),Nt|=Fb),"depth"in Ct&&(O.clearDepth(+Ct.depth),Nt|=Nb),"stencil"in Ct&&(O.clearStencil(Ct.stencil|0),Nt|=Pb),_(!!Nt,"called regl.clear with no buffer specified"),O.clear(Nt)}function zi(lt){if(_(typeof lt=="object"&<,"regl.clear() takes an object as input"),"framebuffer"in lt)if(lt.framebuffer&<.framebuffer_reglType==="framebufferCube")for(var Ct=0;Ct<6;++Ct)oi(r({framebuffer:lt.framebuffer.faces[Ct]},lt),Ni);else oi(lt,Ni);else Ni(null,lt)}function Bi(lt){_.type(lt,"function","regl.frame() callback must be a function"),De.push(lt);function Ct(){var Nt=Gh(De,lt);_(Nt>=0,"cannot cancel a frame twice");function ki(){var nn=Gh(De,ki);De[nn]=De[De.length-1],De.length-=1,De.length<=0&&At()}De[Nt]=ki}return yt(),{cancel:Ct}}function er(){var lt=Ee.viewport,Ct=Ee.scissor_box;lt[0]=lt[1]=Ct[0]=Ct[1]=0,ye.viewportWidth=ye.framebufferWidth=ye.drawingBufferWidth=lt[2]=Ct[2]=O.drawingBufferWidth,ye.viewportHeight=ye.framebufferHeight=ye.drawingBufferHeight=lt[3]=Ct[3]=O.drawingBufferHeight}function or(){ye.tick+=1,ye.time=St(),er(),Xe.procs.poll()}function Ci(){rt.refresh(),er(),Xe.procs.refresh(),Ae&&Ae.update()}function St(){return(Ai()-ke)/1e3}Ci();function sr(lt,Ct){_.type(Ct,"function","listener callback must be a function");var Nt;switch(lt){case"frame":return Bi(Ct);case"lost":Nt=_t;break;case"restore":Nt=vt;break;case"destroy":Nt=ze;break;default:_.raise("invalid event, must be one of frame,lost,restore,destroy")}return Nt.push(Ct),{cancel:function(){for(var ki=0;ki=0},read:Ne,destroy:$t,_gl:O,_refresh:Ci,poll:function(){or(),Ae&&Ae.update()},now:St,stats:_e});return b.onDone(null,zt),zt}return Bb})})(Zg);var bw=Zg.exports;const _w=Yg(bw);function ql(i,e){return i==null||e==null?NaN:ie?1:i>=e?0:NaN}function yw(i,e){return i==null||e==null?NaN:ei?1:e>=i?0:NaN}function Kg(i){let e,t,r;i.length!==2?(e=ql,t=(s,l)=>ql(i(s),l),r=(s,l)=>i(s)-l):(e=i===ql||i===yw?i:xw,t=i,r=i);function n(s,l,d=0,c=s.length){if(d>>1;t(s[u],l)<0?d=u+1:c=u}while(d>>1;t(s[u],l)<=0?d=u+1:c=u}while(dd&&r(s[u-1],l)>-r(s[u],l)?u-1:u}return{left:n,center:o,right:a}}function xw(){return 0}function ww(i){return i===null?NaN:+i}const Sw=Kg(ql),Ew=Sw.right;Kg(ww).center;function fm(i,e){let t,r;if(e===void 0)for(const n of i)n!=null&&(t===void 0?n>=n&&(t=r=n):(t>n&&(t=n),r=a&&(t=r=a):(t>a&&(t=a),r=Tw?10:a>=Iw?5:a>=Aw?2:1;let s,l,d;return n<0?(d=Math.pow(10,-n)/o,s=Math.round(i*d),l=Math.round(e*d),s/de&&--l,d=-d):(d=Math.pow(10,n)*o,s=Math.round(i/d),l=Math.round(e/d),s*de&&--l),l0))return[];if(i===e)return[i];const r=e=n))return[];const s=a-n+1,l=new Array(s);if(r)if(o<0)for(let d=0;de&&(t=i,i=e,e=t),function(r){return Math.max(i,Math.min(e,r))}}function Fw(i,e,t){var r=i[0],n=i[1],a=e[0],o=e[1];return n2?Nw:Fw,l=d=null,u}function u(f){return f==null||isNaN(f=+f)?a:(l||(l=s(i.map(r),e,t)))(r(o(f)))}return u.invert=function(f){return o(n((d||(d=s(e,i.map(r),Xr)))(f)))},u.domain=function(f){return arguments.length?(i=Array.from(f,Ow),c()):i.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),c()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),t=ix,c()},u.clamp=function(f){return arguments.length?(o=f?!0:dn,c()):o!==dn},u.interpolate=function(f){return arguments.length?(t=f,c()):t},u.unknown=function(f){return arguments.length?(a=f,u):a},function(f,m){return r=f,n=m,c()}}function Pw(){return e0()(dn,dn)}function Dw(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function ad(i,e){if((t=(i=e?i.toExponential(e-1):i.toExponential()).indexOf("e"))<0)return null;var t,r=i.slice(0,t);return[r.length>1?r[0]+r.slice(2):r,+i.slice(t+1)]}function $o(i){return i=ad(Math.abs(i)),i?i[1]:NaN}function Mw(i,e){return function(t,r){for(var n=t.length,a=[],o=0,s=i[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=i[o=(o+1)%i.length];return a.reverse().join(e)}}function zw(i){return function(e){return e.replace(/[0-9]/g,function(t){return i[+t]})}}var Bw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function od(i){if(!(e=Bw.exec(i)))throw new Error("invalid format: "+i);var e;return new Ou({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}od.prototype=Ou.prototype;function Ou(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}Ou.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Uw(i){e:for(var e=i.length,t=1,r=-1,n;t0&&(r=0);break}return r>0?i.slice(0,r)+i.slice(n+1):i}var t0;function Gw(i,e){var t=ad(i,e);if(!t)return i+"";var r=t[0],n=t[1],a=n-(t0=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ad(i,Math.max(0,e+a-1))[0]}function mm(i,e){var t=ad(i,e);if(!t)return i+"";var r=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}const pm={"%":(i,e)=>(i*100).toFixed(e),b:i=>Math.round(i).toString(2),c:i=>i+"",d:Dw,e:(i,e)=>i.toExponential(e),f:(i,e)=>i.toFixed(e),g:(i,e)=>i.toPrecision(e),o:i=>Math.round(i).toString(8),p:(i,e)=>mm(i*100,e),r:mm,s:Gw,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function gm(i){return i}var vm=Array.prototype.map,bm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function jw(i){var e=i.grouping===void 0||i.thousands===void 0?gm:Mw(vm.call(i.grouping,Number),i.thousands+""),t=i.currency===void 0?"":i.currency[0]+"",r=i.currency===void 0?"":i.currency[1]+"",n=i.decimal===void 0?".":i.decimal+"",a=i.numerals===void 0?gm:zw(vm.call(i.numerals,String)),o=i.percent===void 0?"%":i.percent+"",s=i.minus===void 0?"−":i.minus+"",l=i.nan===void 0?"NaN":i.nan+"";function d(u){u=od(u);var f=u.fill,m=u.align,p=u.sign,y=u.symbol,x=u.zero,E=u.width,k=u.comma,I=u.precision,v=u.trim,M=u.type;M==="n"?(k=!0,M="g"):pm[M]||(I===void 0&&(I=12),v=!0,M="g"),(x||f==="0"&&m==="=")&&(x=!0,f="0",m="=");var K=y==="$"?t:y==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():"",L=y==="$"?r:/[%p]/.test(M)?o:"",R=pm[M],W=/[defgprs%]/.test(M);I=I===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,I)):Math.max(0,Math.min(20,I));function Oe(me){var de=K,N=L,C,Q,V;if(M==="c")N=R(me)+N,me="";else{me=+me;var ne=me<0||1/me<0;if(me=isNaN(me)?l:R(Math.abs(me),I),v&&(me=Uw(me)),ne&&+me==0&&p!=="+"&&(ne=!1),de=(ne?p==="("?p:s:p==="-"||p==="("?"":p)+de,N=(M==="s"?bm[8+t0/3]:"")+N+(ne&&p==="("?")":""),W){for(C=-1,Q=me.length;++CV||V>57){N=(V===46?n+me.slice(C+1):me.slice(C))+N,me=me.slice(0,C);break}}}k&&!x&&(me=e(me,1/0));var Ve=de.length+me.length+N.length,Re=Ve>1)+de+me+N+Re.slice(Ve);break;default:me=Re+de+me+N;break}return a(me)}return Oe.toString=function(){return u+""},Oe}function c(u,f){var m=d((u=od(u),u.type="f",u)),p=Math.max(-8,Math.min(8,Math.floor($o(f)/3)))*3,y=Math.pow(10,-p),x=bm[8+p/3];return function(E){return m(y*E)+x}}return{format:d,formatPrefix:c}}var $l,i0,r0;Vw({thousands:",",grouping:[3],currency:["$",""]});function Vw(i){return $l=jw(i),i0=$l.format,r0=$l.formatPrefix,$l}function Hw(i){return Math.max(0,-$o(Math.abs(i)))}function qw(i,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($o(e)/3)))*3-$o(Math.abs(i)))}function Ww(i,e){return i=Math.abs(i),e=Math.abs(e)-i,Math.max(0,$o(e)-$o(i))+1}function Xw(i,e,t,r){var n=kw(i,e,t),a;switch(r=od(r==null?",f":r),r.type){case"s":{var o=Math.max(Math.abs(i),Math.abs(e));return r.precision==null&&!isNaN(a=qw(n,o))&&(r.precision=a),r0(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Ww(n,Math.max(Math.abs(i),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Hw(n))&&(r.precision=a-(r.type==="%")*2);break}}return i0(r)}function n0(i){var e=i.domain;return i.ticks=function(t){var r=e();return Cw(r[0],r[r.length-1],t==null?10:t)},i.tickFormat=function(t,r){var n=e();return Xw(n[0],n[n.length-1],t==null?10:t,r)},i.nice=function(t){t==null&&(t=10);var r=e(),n=0,a=r.length-1,o=r[n],s=r[a],l,d,c=10;for(s0;){if(d=ru(o,s,t),d===l)return r[n]=o,r[a]=s,e(r);if(d>0)o=Math.floor(o/d)*d,s=Math.ceil(s/d)*d;else if(d<0)o=Math.ceil(o*d)/d,s=Math.floor(s*d)/d;else break;l=d}return i},i}function $s(){var i=Pw();return i.copy=function(){return Qg(i,$s())},Jg.apply(i,arguments),n0(i)}function _m(i){return function(e){return e<0?-Math.pow(-e,i):Math.pow(e,i)}}function Yw(i){return i<0?-Math.sqrt(-i):Math.sqrt(i)}function Zw(i){return i<0?-i*i:i*i}function Kw(i){var e=i(dn,dn),t=1;function r(){return t===1?i(dn,dn):t===.5?i(Yw,Zw):i(_m(t),_m(1/t))}return e.exponent=function(n){return arguments.length?(t=+n,r()):t},n0(e)}function a0(){var i=Kw(e0());return i.copy=function(){return Qg(i,a0()).exponent(i.exponent())},Jg.apply(i,arguments),i}const Ic=new Date,Ac=new Date;function hn(i,e,t,r){function n(a){return i(a=arguments.length===0?new Date:new Date(+a)),a}return n.floor=a=>(i(a=new Date(+a)),a),n.ceil=a=>(i(a=new Date(a-1)),e(a,1),i(a),a),n.round=a=>{const o=n(a),s=n.ceil(a);return a-o(e(a=new Date(+a),o==null?1:Math.floor(o)),a),n.range=(a,o,s)=>{const l=[];if(a=n.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let d;do l.push(d=new Date(+a)),e(a,s),i(a);while(dhn(o=>{if(o>=o)for(;i(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!a(o););else for(;--s>=0;)for(;e(o,1),!a(o););}),t&&(n.count=(a,o)=>(Ic.setTime(+a),Ac.setTime(+o),i(Ic),i(Ac),Math.floor(t(Ic,Ac))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(r?o=>r(o)%a===0:o=>n.count(0,o)%a===0):n)),n}const Jw=1e3,Ru=Jw*60,Qw=Ru*60,Ls=Qw*24,o0=Ls*7,Fu=hn(i=>i.setHours(0,0,0,0),(i,e)=>i.setDate(i.getDate()+e),(i,e)=>(e-i-(e.getTimezoneOffset()-i.getTimezoneOffset())*Ru)/Ls,i=>i.getDate()-1);Fu.range;const Nu=hn(i=>{i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCDate(i.getUTCDate()+e)},(i,e)=>(e-i)/Ls,i=>i.getUTCDate()-1);Nu.range;const e2=hn(i=>{i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCDate(i.getUTCDate()+e)},(i,e)=>(e-i)/Ls,i=>Math.floor(i/Ls));e2.range;function Oa(i){return hn(e=>{e.setDate(e.getDate()-(e.getDay()+7-i)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ru)/o0)}const s0=Oa(0),sd=Oa(1),t2=Oa(2),i2=Oa(3),Lo=Oa(4),r2=Oa(5),n2=Oa(6);s0.range;sd.range;t2.range;i2.range;Lo.range;r2.range;n2.range;function Ra(i){return hn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-i)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/o0)}const l0=Ra(0),ld=Ra(1),a2=Ra(2),o2=Ra(3),Oo=Ra(4),s2=Ra(5),l2=Ra(6);l0.range;ld.range;a2.range;o2.range;Oo.range;s2.range;l2.range;const ka=hn(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,e)=>{i.setFullYear(i.getFullYear()+e)},(i,e)=>e.getFullYear()-i.getFullYear(),i=>i.getFullYear());ka.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:hn(e=>{e.setFullYear(Math.floor(e.getFullYear()/i)*i),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*i)});ka.range;const $a=hn(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,e)=>{i.setUTCFullYear(i.getUTCFullYear()+e)},(i,e)=>e.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());$a.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:hn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/i)*i),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*i)});$a.range;function Cc(i){if(0<=i.y&&i.y<100){var e=new Date(-1,i.m,i.d,i.H,i.M,i.S,i.L);return e.setFullYear(i.y),e}return new Date(i.y,i.m,i.d,i.H,i.M,i.S,i.L)}function kc(i){if(0<=i.y&&i.y<100){var e=new Date(Date.UTC(-1,i.m,i.d,i.H,i.M,i.S,i.L));return e.setUTCFullYear(i.y),e}return new Date(Date.UTC(i.y,i.m,i.d,i.H,i.M,i.S,i.L))}function os(i,e,t){return{y:i,m:e,d:t,H:0,M:0,S:0,L:0}}function d2(i){var e=i.dateTime,t=i.date,r=i.time,n=i.periods,a=i.days,o=i.shortDays,s=i.months,l=i.shortMonths,d=ss(n),c=ls(n),u=ss(a),f=ls(a),m=ss(o),p=ls(o),y=ss(s),x=ls(s),E=ss(l),k=ls(l),I={a:ne,A:Ve,b:Re,B:Ge,c:null,d:Tm,e:Tm,f:O2,g:G2,G:V2,H:k2,I:$2,j:L2,L:d0,m:R2,M:F2,p:tt,q:ot,Q:Cm,s:km,S:N2,u:P2,U:D2,V:M2,w:z2,W:B2,x:null,X:null,y:U2,Y:j2,Z:H2,"%":Am},v={a:he,A:bt,b:wt,B:pt,c:null,d:Im,e:Im,f:Y2,g:a3,G:s3,H:q2,I:W2,j:X2,L:u0,m:Z2,M:K2,p:Lt,q:xe,Q:Cm,s:km,S:J2,u:Q2,U:e3,V:t3,w:i3,W:r3,x:null,X:null,y:n3,Y:o3,Z:l3,"%":Am},M={a:Oe,A:me,b:de,B:N,c:C,d:Sm,e:Sm,f:T2,g:wm,G:xm,H:Em,I:Em,j:x2,L:E2,m:y2,M:w2,p:W,q:_2,Q:A2,s:C2,S:S2,u:m2,U:p2,V:g2,w:h2,W:v2,x:Q,X:V,y:wm,Y:xm,Z:b2,"%":I2};I.x=K(t,I),I.X=K(r,I),I.c=K(e,I),v.x=K(t,v),v.X=K(r,v),v.c=K(e,v);function K(le,Qe){return function(dt){var Se=[],Ot=-1,It=0,ii=le.length,vi,Ki,Vt;for(dt instanceof Date||(dt=new Date(+dt));++Ot53)return null;"w"in Se||(Se.w=1),"Z"in Se?(It=kc(os(Se.y,0,1)),ii=It.getUTCDay(),It=ii>4||ii===0?ld.ceil(It):ld(It),It=Nu.offset(It,(Se.V-1)*7),Se.y=It.getUTCFullYear(),Se.m=It.getUTCMonth(),Se.d=It.getUTCDate()+(Se.w+6)%7):(It=Cc(os(Se.y,0,1)),ii=It.getDay(),It=ii>4||ii===0?sd.ceil(It):sd(It),It=Fu.offset(It,(Se.V-1)*7),Se.y=It.getFullYear(),Se.m=It.getMonth(),Se.d=It.getDate()+(Se.w+6)%7)}else("W"in Se||"U"in Se)&&("w"in Se||(Se.w="u"in Se?Se.u%7:"W"in Se?1:0),ii="Z"in Se?kc(os(Se.y,0,1)).getUTCDay():Cc(os(Se.y,0,1)).getDay(),Se.m=0,Se.d="W"in Se?(Se.w+6)%7+Se.W*7-(ii+5)%7:Se.w+Se.U*7-(ii+6)%7);return"Z"in Se?(Se.H+=Se.Z/100|0,Se.M+=Se.Z%100,kc(Se)):Cc(Se)}}function R(le,Qe,dt,Se){for(var Ot=0,It=Qe.length,ii=dt.length,vi,Ki;Ot=ii)return-1;if(vi=Qe.charCodeAt(Ot++),vi===37){if(vi=Qe.charAt(Ot++),Ki=M[vi in ym?Qe.charAt(Ot++):vi],!Ki||(Se=Ki(le,dt,Se))<0)return-1}else if(vi!=dt.charCodeAt(Se++))return-1}return Se}function W(le,Qe,dt){var Se=d.exec(Qe.slice(dt));return Se?(le.p=c.get(Se[0].toLowerCase()),dt+Se[0].length):-1}function Oe(le,Qe,dt){var Se=m.exec(Qe.slice(dt));return Se?(le.w=p.get(Se[0].toLowerCase()),dt+Se[0].length):-1}function me(le,Qe,dt){var Se=u.exec(Qe.slice(dt));return Se?(le.w=f.get(Se[0].toLowerCase()),dt+Se[0].length):-1}function de(le,Qe,dt){var Se=E.exec(Qe.slice(dt));return Se?(le.m=k.get(Se[0].toLowerCase()),dt+Se[0].length):-1}function N(le,Qe,dt){var Se=y.exec(Qe.slice(dt));return Se?(le.m=x.get(Se[0].toLowerCase()),dt+Se[0].length):-1}function C(le,Qe,dt){return R(le,e,Qe,dt)}function Q(le,Qe,dt){return R(le,t,Qe,dt)}function V(le,Qe,dt){return R(le,r,Qe,dt)}function ne(le){return o[le.getDay()]}function Ve(le){return a[le.getDay()]}function Re(le){return l[le.getMonth()]}function Ge(le){return s[le.getMonth()]}function tt(le){return n[+(le.getHours()>=12)]}function ot(le){return 1+~~(le.getMonth()/3)}function he(le){return o[le.getUTCDay()]}function bt(le){return a[le.getUTCDay()]}function wt(le){return l[le.getUTCMonth()]}function pt(le){return s[le.getUTCMonth()]}function Lt(le){return n[+(le.getUTCHours()>=12)]}function xe(le){return 1+~~(le.getUTCMonth()/3)}return{format:function(le){var Qe=K(le+="",I);return Qe.toString=function(){return le},Qe},parse:function(le){var Qe=L(le+="",!1);return Qe.toString=function(){return le},Qe},utcFormat:function(le){var Qe=K(le+="",v);return Qe.toString=function(){return le},Qe},utcParse:function(le){var Qe=L(le+="",!0);return Qe.toString=function(){return le},Qe}}}var ym={"-":"",_:" ",0:"0"},dr=/^\s*\d+/,c2=/^%/,u2=/[\\^$*+?|[\]().{}]/g;function Xt(i,e,t){var r=i<0?"-":"",n=(r?-i:i)+"",a=n.length;return r+(a[e.toLowerCase(),t]))}function h2(i,e,t){var r=dr.exec(e.slice(t,t+1));return r?(i.w=+r[0],t+r[0].length):-1}function m2(i,e,t){var r=dr.exec(e.slice(t,t+1));return r?(i.u=+r[0],t+r[0].length):-1}function p2(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.U=+r[0],t+r[0].length):-1}function g2(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.V=+r[0],t+r[0].length):-1}function v2(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.W=+r[0],t+r[0].length):-1}function xm(i,e,t){var r=dr.exec(e.slice(t,t+4));return r?(i.y=+r[0],t+r[0].length):-1}function wm(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.y=+r[0]+(+r[0]>68?1900:2e3),t+r[0].length):-1}function b2(i,e,t){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t,t+6));return r?(i.Z=r[1]?0:-(r[2]+(r[3]||"00")),t+r[0].length):-1}function _2(i,e,t){var r=dr.exec(e.slice(t,t+1));return r?(i.q=r[0]*3-3,t+r[0].length):-1}function y2(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.m=r[0]-1,t+r[0].length):-1}function Sm(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.d=+r[0],t+r[0].length):-1}function x2(i,e,t){var r=dr.exec(e.slice(t,t+3));return r?(i.m=0,i.d=+r[0],t+r[0].length):-1}function Em(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.H=+r[0],t+r[0].length):-1}function w2(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.M=+r[0],t+r[0].length):-1}function S2(i,e,t){var r=dr.exec(e.slice(t,t+2));return r?(i.S=+r[0],t+r[0].length):-1}function E2(i,e,t){var r=dr.exec(e.slice(t,t+3));return r?(i.L=+r[0],t+r[0].length):-1}function T2(i,e,t){var r=dr.exec(e.slice(t,t+6));return r?(i.L=Math.floor(r[0]/1e3),t+r[0].length):-1}function I2(i,e,t){var r=c2.exec(e.slice(t,t+1));return r?t+r[0].length:-1}function A2(i,e,t){var r=dr.exec(e.slice(t));return r?(i.Q=+r[0],t+r[0].length):-1}function C2(i,e,t){var r=dr.exec(e.slice(t));return r?(i.s=+r[0],t+r[0].length):-1}function Tm(i,e){return Xt(i.getDate(),e,2)}function k2(i,e){return Xt(i.getHours(),e,2)}function $2(i,e){return Xt(i.getHours()%12||12,e,2)}function L2(i,e){return Xt(1+Fu.count(ka(i),i),e,3)}function d0(i,e){return Xt(i.getMilliseconds(),e,3)}function O2(i,e){return d0(i,e)+"000"}function R2(i,e){return Xt(i.getMonth()+1,e,2)}function F2(i,e){return Xt(i.getMinutes(),e,2)}function N2(i,e){return Xt(i.getSeconds(),e,2)}function P2(i){var e=i.getDay();return e===0?7:e}function D2(i,e){return Xt(s0.count(ka(i)-1,i),e,2)}function c0(i){var e=i.getDay();return e>=4||e===0?Lo(i):Lo.ceil(i)}function M2(i,e){return i=c0(i),Xt(Lo.count(ka(i),i)+(ka(i).getDay()===4),e,2)}function z2(i){return i.getDay()}function B2(i,e){return Xt(sd.count(ka(i)-1,i),e,2)}function U2(i,e){return Xt(i.getFullYear()%100,e,2)}function G2(i,e){return i=c0(i),Xt(i.getFullYear()%100,e,2)}function j2(i,e){return Xt(i.getFullYear()%1e4,e,4)}function V2(i,e){var t=i.getDay();return i=t>=4||t===0?Lo(i):Lo.ceil(i),Xt(i.getFullYear()%1e4,e,4)}function H2(i){var e=i.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Xt(e/60|0,"0",2)+Xt(e%60,"0",2)}function Im(i,e){return Xt(i.getUTCDate(),e,2)}function q2(i,e){return Xt(i.getUTCHours(),e,2)}function W2(i,e){return Xt(i.getUTCHours()%12||12,e,2)}function X2(i,e){return Xt(1+Nu.count($a(i),i),e,3)}function u0(i,e){return Xt(i.getUTCMilliseconds(),e,3)}function Y2(i,e){return u0(i,e)+"000"}function Z2(i,e){return Xt(i.getUTCMonth()+1,e,2)}function K2(i,e){return Xt(i.getUTCMinutes(),e,2)}function J2(i,e){return Xt(i.getUTCSeconds(),e,2)}function Q2(i){var e=i.getUTCDay();return e===0?7:e}function e3(i,e){return Xt(l0.count($a(i)-1,i),e,2)}function f0(i){var e=i.getUTCDay();return e>=4||e===0?Oo(i):Oo.ceil(i)}function t3(i,e){return i=f0(i),Xt(Oo.count($a(i),i)+($a(i).getUTCDay()===4),e,2)}function i3(i){return i.getUTCDay()}function r3(i,e){return Xt(ld.count($a(i)-1,i),e,2)}function n3(i,e){return Xt(i.getUTCFullYear()%100,e,2)}function a3(i,e){return i=f0(i),Xt(i.getUTCFullYear()%100,e,2)}function o3(i,e){return Xt(i.getUTCFullYear()%1e4,e,4)}function s3(i,e){var t=i.getUTCDay();return i=t>=4||t===0?Oo(i):Oo.ceil(i),Xt(i.getUTCFullYear()%1e4,e,4)}function l3(){return"+0000"}function Am(){return"%"}function Cm(i){return+i}function km(i){return Math.floor(+i/1e3)}var to,kn;d3({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function d3(i){return to=d2(i),kn=to.format,to.parse,to.utcFormat,to.utcParse,to}var $m=typeof Float32Array!="undefined"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var i=0,e=arguments.length;e--;)i+=arguments[e]*arguments[e];return Math.sqrt(i)});function c3(){var i=new $m(9);return $m!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[5]=0,i[6]=0,i[7]=0),i[0]=1,i[4]=1,i[8]=1,i}function Lm(i,e,t){var r=e[0],n=e[1],a=e[2],o=e[3],s=e[4],l=e[5],d=e[6],c=e[7],u=e[8],f=t[0],m=t[1];return i[0]=r,i[1]=n,i[2]=a,i[3]=o,i[4]=s,i[5]=l,i[6]=f*r+m*o+d,i[7]=f*n+m*s+c,i[8]=f*a+m*l+u,i}function $c(i,e,t){var r=t[0],n=t[1];return i[0]=r*e[0],i[1]=r*e[1],i[2]=r*e[2],i[3]=n*e[3],i[4]=n*e[4],i[5]=n*e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i}function u3(i,e,t){return i[0]=2/e,i[1]=0,i[2]=0,i[3]=0,i[4]=-2/t,i[5]=0,i[6]=-1,i[7]=1,i[8]=1,i}var Pu={exports:{}};Pu.exports;(function(i){(function(e,t,r){function n(l){var d=this,c=s();d.next=function(){var u=2091639*d.s0+d.c*23283064365386963e-26;return d.s0=d.s1,d.s1=d.s2,d.s2=u-(d.c=u|0)},d.c=1,d.s0=c(" "),d.s1=c(" "),d.s2=c(" "),d.s0-=c(l),d.s0<0&&(d.s0+=1),d.s1-=c(l),d.s1<0&&(d.s1+=1),d.s2-=c(l),d.s2<0&&(d.s2+=1),c=null}function a(l,d){return d.c=l.c,d.s0=l.s0,d.s1=l.s1,d.s2=l.s2,d}function o(l,d){var c=new n(l),u=d&&d.state,f=c.next;return f.int32=function(){return c.next()*4294967296|0},f.double=function(){return f()+(f()*2097152|0)*11102230246251565e-32},f.quick=f,u&&(typeof u=="object"&&a(u,c),f.state=function(){return a(c,{})}),f}function s(){var l=4022871197,d=function(c){c=String(c);for(var u=0;u>>0,f-=l,f*=l,l=f>>>0,f-=l,l+=f*4294967296}return(l>>>0)*23283064365386963e-26};return d}t&&t.exports?t.exports=o:r&&r.amd?r(function(){return o}):this.alea=o})(Jn,i,!1)})(Pu);var f3=Pu.exports,Du={exports:{}};Du.exports;(function(i){(function(e,t,r){function n(s){var l=this,d="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var u=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^u^u>>>8},s===(s|0)?l.x=s:d+=s;for(var c=0;c>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,m=(d.next()>>>0)/4294967296,p=(f+m)/(1<<21);while(p===0);return p},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=o:r&&r.amd?r(function(){return o}):this.xor128=o})(Jn,i,!1)})(Du);var h3=Du.exports,Mu={exports:{}};Mu.exports;(function(i){(function(e,t,r){function n(s){var l=this,d="";l.next=function(){var u=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^(u^u<<1))|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,s===(s|0)?l.x=s:d+=s;for(var c=0;c>>4),l.next()}function a(s,l){return l.x=s.x,l.y=s.y,l.z=s.z,l.w=s.w,l.v=s.v,l.d=s.d,l}function o(s,l){var d=new n(s),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,m=(d.next()>>>0)/4294967296,p=(f+m)/(1<<21);while(p===0);return p},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=o:r&&r.amd?r(function(){return o}):this.xorwow=o})(Jn,i,!1)})(Mu);var m3=Mu.exports,zu={exports:{}};zu.exports;(function(i){(function(e,t,r){function n(s){var l=this;l.next=function(){var c=l.x,u=l.i,f,m;return f=c[u],f^=f>>>7,m=f^f<<24,f=c[u+1&7],m^=f^f>>>10,f=c[u+3&7],m^=f^f>>>3,f=c[u+4&7],m^=f^f<<7,f=c[u+7&7],f=f^f<<13,m^=f^f<<9,c[u]=m,l.i=u+1&7,m};function d(c,u){var f,m=[];if(u===(u|0))m[0]=u;else for(u=""+u,f=0;f0;--f)c.next()}d(l,s)}function a(s,l){return l.x=s.x.slice(),l.i=s.i,l}function o(s,l){s==null&&(s=+new Date);var d=new n(s),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,m=(d.next()>>>0)/4294967296,p=(f+m)/(1<<21);while(p===0);return p},u.int32=d.next,u.quick=u,c&&(c.x&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=o:r&&r.amd?r(function(){return o}):this.xorshift7=o})(Jn,i,!1)})(zu);var p3=zu.exports,Bu={exports:{}};Bu.exports;(function(i){(function(e,t,r){function n(s){var l=this;l.next=function(){var c=l.w,u=l.X,f=l.i,m,p;return l.w=c=c+1640531527|0,p=u[f+34&127],m=u[f=f+1&127],p^=p<<13,m^=m<<17,p^=p>>>15,m^=m>>>12,p=u[f]=p^m,l.i=f,p+(c^c>>>16)|0};function d(c,u){var f,m,p,y,x,E=[],k=128;for(u===(u|0)?(m=u,u=null):(u=u+"\0",m=0,k=Math.max(k,u.length)),p=0,y=-32;y>>15,m^=m<<4,m^=m>>>13,y>=0&&(x=x+1640531527|0,f=E[y&127]^=m+x,p=f==0?p+1:0);for(p>=128&&(E[(u&&u.length||0)&127]=-1),p=127,y=4*128;y>0;--y)m=E[p+34&127],f=E[p=p+1&127],m^=m<<13,f^=f<<17,m^=m>>>15,f^=f>>>12,E[p]=m^f;c.w=x,c.X=E,c.i=p}d(l,s)}function a(s,l){return l.i=s.i,l.w=s.w,l.X=s.X.slice(),l}function o(s,l){s==null&&(s=+new Date);var d=new n(s),c=l&&l.state,u=function(){return(d.next()>>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,m=(d.next()>>>0)/4294967296,p=(f+m)/(1<<21);while(p===0);return p},u.int32=d.next,u.quick=u,c&&(c.X&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=o:r&&r.amd?r(function(){return o}):this.xor4096=o})(Jn,i,!1)})(Bu);var g3=Bu.exports,Uu={exports:{}};Uu.exports;(function(i){(function(e,t,r){function n(s){var l=this,d="";l.next=function(){var u=l.b,f=l.c,m=l.d,p=l.a;return u=u<<25^u>>>7^f,f=f-m|0,m=m<<24^m>>>8^p,p=p-u|0,l.b=u=u<<20^u>>>12^f,l.c=f=f-m|0,l.d=m<<16^f>>>16^p,l.a=p-u|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,s===Math.floor(s)?(l.a=s/4294967296|0,l.b=s|0):d+=s;for(var c=0;c>>0)/4294967296};return u.double=function(){do var f=d.next()>>>11,m=(d.next()>>>0)/4294967296,p=(f+m)/(1<<21);while(p===0);return p},u.int32=d.next,u.quick=u,c&&(typeof c=="object"&&a(c,d),u.state=function(){return a(d,{})}),u}t&&t.exports?t.exports=o:r&&r.amd?r(function(){return o}):this.tychei=o})(Jn,i,!1)})(Uu);var v3=Uu.exports,h0={exports:{}};const b3={},_3=Object.freeze(Object.defineProperty({__proto__:null,default:b3},Symbol.toStringTag,{value:"Module"})),y3=vw(_3);(function(i){(function(e,t,r){var n=256,a=6,o=52,s="random",l=r.pow(n,a),d=r.pow(2,o),c=d*2,u=n-1,f;function m(v,M,K){var L=[];M=M==!0?{entropy:!0}:M||{};var R=E(x(M.entropy?[v,I(t)]:v==null?k():v,3),L),W=new p(L),Oe=function(){for(var me=W.g(a),de=l,N=0;me=c;)me/=2,de/=2,N>>>=1;return(me+N)/de};return Oe.int32=function(){return W.g(4)|0},Oe.quick=function(){return W.g(4)/4294967296},Oe.double=Oe,E(I(W.S),t),(M.pass||K||function(me,de,N,C){return C&&(C.S&&y(C,W),me.state=function(){return y(W,{})}),N?(r[s]=me,de):me})(Oe,R,"global"in M?M.global:this==r,M.state)}function p(v){var M,K=v.length,L=this,R=0,W=L.i=L.j=0,Oe=L.S=[];for(K||(v=[K++]);R0)return t;throw new Error("Expected number to be positive, got "+t.n)},this.lessThan=function(r){if(t.n=r)return t;throw new Error("Expected number to be greater than or equal to "+r+", got "+t.n)},this.greaterThan=function(r){if(t.n>r)return t;throw new Error("Expected number to be greater than "+r+", got "+t.n)},this.n=e},F3=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),t===void 0&&(t=e===void 0?1:e,e=0),Qr(e).isInt(),Qr(t).isInt(),function(){return Math.floor(i.next()*(t-e+1)+e)}},N3=function(i){return function(){return i.next()>=.5}},P3=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),function(){var r,n,a;do r=i.next()*2-1,n=i.next()*2-1,a=r*r+n*n;while(!a||a>1);return e+t*n*Math.sqrt(-2*Math.log(a)/a)}},D3=function(i,e,t){e===void 0&&(e=0),t===void 0&&(t=1);var r=i.normal(e,t);return function(){return Math.exp(r())}},M3=function(i,e){return e===void 0&&(e=.5),Qr(e).greaterThanOrEqual(0).lessThan(1),function(){return Math.floor(i.next()+e)}},z3=function(i,e,t){return e===void 0&&(e=1),t===void 0&&(t=.5),Qr(e).isInt().isPositive(),Qr(t).greaterThanOrEqual(0).lessThan(1),function(){for(var r=0,n=0;r++l;)c=c-l,l=e*l/++d;return d}}else{var r=Math.sqrt(e),n=.931+2.53*r,a=-.059+.02483*n,o=1.1239+1.1328/(n-3.4),s=.9277-3.6224/(n-2);return function(){for(;;){var l=void 0,d=i.next();if(d<=.86*s)return l=d/s-.43,Math.floor((2*a/(.5-Math.abs(l))+n)*l+e+.445);d>=s?l=i.next()-.5:(l=d/s-.93,l=(l<0?-.5:.5)-l,d=i.next()*s);var c=.5-Math.abs(l);if(!(c<.013&&d>c)){var u=Math.floor((2*a/c+n)*l+e+.445);if(d=d*o/(a/(c*c)+n),u>=10){var f=(u+.5)*Math.log(e/u)-e-j3+u-(.08333333333333333-(.002777777777777778-1/(1260*u*u))/(u*u))/u;if(Math.log(d*r)<=f)return u}else if(u>=0){var m,p=(m=G3(u))!=null?m:0;if(Math.log(d)<=u*Math.log(e)-e-p)return u}}}}}},H3=function(i,e){return e===void 0&&(e=1),Qr(e).isPositive(),function(){return-Math.log(1-i.next())/e}},q3=function(i,e){return e===void 0&&(e=1),Qr(e).isInt().greaterThanOrEqual(0),function(){for(var t=0,r=0;r0){var a=this.uniformInt(0,n-1)();return r[a]}else return},e._memoize=function(r,n){var a=[].slice.call(arguments,2),o=""+a.join(";"),s=this._cache[r];return(s===void 0||s.key!==o)&&(s={key:o,distribution:n.apply(void 0,[this].concat(a))},this._cache[r]=s),s.distribution},Gu(i,[{key:"rng",get:function(){return this._rng}}]),i}();new p0;const ou={capture:!0,passive:!1};function su(i){i.preventDefault(),i.stopImmediatePropagation()}function Z3(i){var e=i.document.documentElement,t=ln(i).on("dragstart.drag",su,ou);"onselectstart"in e?t.on("selectstart.drag",su,ou):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function K3(i,e){var t=i.document.documentElement,r=ln(i).on("dragstart.drag",null);e&&(r.on("click.drag",su,ou),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in t?r.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}const Ll=i=>()=>i;function J3(i,{sourceEvent:e,target:t,transform:r,dispatch:n}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:n}})}function In(i,e,t){this.k=i,this.x=e,this.y=t}In.prototype={constructor:In,scale:function(i){return i===1?this:new In(this.k*i,this.x,this.y)},translate:function(i,e){return i===0&e===0?this:new In(this.k,this.x+this.k*i,this.y+this.k*e)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var xs=new In(1,0,0);In.prototype;function Lc(i){i.stopImmediatePropagation()}function ds(i){i.preventDefault(),i.stopImmediatePropagation()}function Q3(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function eS(){var i=this;return i instanceof SVGElement?(i=i.ownerSVGElement||i,i.hasAttribute("viewBox")?(i=i.viewBox.baseVal,[[i.x,i.y],[i.x+i.width,i.y+i.height]]):[[0,0],[i.width.baseVal.value,i.height.baseVal.value]]):[[0,0],[i.clientWidth,i.clientHeight]]}function Nm(){return this.__zoom||xs}function tS(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function iS(){return navigator.maxTouchPoints||"ontouchstart"in this}function rS(i,e,t){var r=i.invertX(e[0][0])-t[0][0],n=i.invertX(e[1][0])-t[1][0],a=i.invertY(e[0][1])-t[0][1],o=i.invertY(e[1][1])-t[1][1];return i.translate(n>r?(r+n)/2:Math.min(0,r)||Math.max(0,n),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function nS(){var i=Q3,e=eS,t=rS,r=tS,n=iS,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,l=cx,d=Tu("start","zoom","end"),c,u,f,m=500,p=150,y=0,x=10;function E(C){C.property("__zoom",Nm).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",W).on("dblclick.zoom",Oe).filter(n).on("touchstart.zoom",me).on("touchmove.zoom",de).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(C,Q,V,ne){var Ve=C.selection?C.selection():C;Ve.property("__zoom",Nm),C!==Ve?M(C,Q,V,ne):Ve.interrupt().each(function(){K(this,arguments).event(ne).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},E.scaleBy=function(C,Q,V,ne){E.scaleTo(C,function(){var Ve=this.__zoom.k,Re=typeof Q=="function"?Q.apply(this,arguments):Q;return Ve*Re},V,ne)},E.scaleTo=function(C,Q,V,ne){E.transform(C,function(){var Ve=e.apply(this,arguments),Re=this.__zoom,Ge=V==null?v(Ve):typeof V=="function"?V.apply(this,arguments):V,tt=Re.invert(Ge),ot=typeof Q=="function"?Q.apply(this,arguments):Q;return t(I(k(Re,ot),Ge,tt),Ve,o)},V,ne)},E.translateBy=function(C,Q,V,ne){E.transform(C,function(){return t(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof V=="function"?V.apply(this,arguments):V),e.apply(this,arguments),o)},null,ne)},E.translateTo=function(C,Q,V,ne,Ve){E.transform(C,function(){var Re=e.apply(this,arguments),Ge=this.__zoom,tt=ne==null?v(Re):typeof ne=="function"?ne.apply(this,arguments):ne;return t(xs.translate(tt[0],tt[1]).scale(Ge.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof V=="function"?-V.apply(this,arguments):-V),Re,o)},ne,Ve)};function k(C,Q){return Q=Math.max(a[0],Math.min(a[1],Q)),Q===C.k?C:new In(Q,C.x,C.y)}function I(C,Q,V){var ne=Q[0]-V[0]*C.k,Ve=Q[1]-V[1]*C.k;return ne===C.x&&Ve===C.y?C:new In(C.k,ne,Ve)}function v(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function M(C,Q,V,ne){C.on("start.zoom",function(){K(this,arguments).event(ne).start()}).on("interrupt.zoom end.zoom",function(){K(this,arguments).event(ne).end()}).tween("zoom",function(){var Ve=this,Re=arguments,Ge=K(Ve,Re).event(ne),tt=e.apply(Ve,Re),ot=V==null?v(tt):typeof V=="function"?V.apply(Ve,Re):V,he=Math.max(tt[1][0]-tt[0][0],tt[1][1]-tt[0][1]),bt=Ve.__zoom,wt=typeof Q=="function"?Q.apply(Ve,Re):Q,pt=l(bt.invert(ot).concat(he/bt.k),wt.invert(ot).concat(he/wt.k));return function(Lt){if(Lt===1)Lt=wt;else{var xe=pt(Lt),le=he/xe[2];Lt=new In(le,ot[0]-xe[0]*le,ot[1]-xe[1]*le)}Ge.zoom(null,Lt)}})}function K(C,Q,V){return!V&&C.__zooming||new L(C,Q)}function L(C,Q){this.that=C,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=e.apply(C,Q),this.taps=0}L.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,Q){return this.mouse&&C!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=Q.invert(this.touch1[0])),this.that.__zoom=Q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var Q=ln(this.that).datum();d.call(C,this.that,new J3(C,{sourceEvent:this.sourceEvent,target:E,type:C,transform:this.that.__zoom,dispatch:d}),Q)}};function R(C,...Q){if(!i.apply(this,arguments))return;var V=K(this,Q).event(C),ne=this.__zoom,Ve=Math.max(a[0],Math.min(a[1],ne.k*Math.pow(2,r.apply(this,arguments)))),Re=ga(C);if(V.wheel)(V.mouse[0][0]!==Re[0]||V.mouse[0][1]!==Re[1])&&(V.mouse[1]=ne.invert(V.mouse[0]=Re)),clearTimeout(V.wheel);else{if(ne.k===Ve)return;V.mouse=[Re,ne.invert(Re)],Hl(this),V.start()}ds(C),V.wheel=setTimeout(Ge,p),V.zoom("mouse",t(I(k(ne,Ve),V.mouse[0],V.mouse[1]),V.extent,o));function Ge(){V.wheel=null,V.end()}}function W(C,...Q){if(f||!i.apply(this,arguments))return;var V=C.currentTarget,ne=K(this,Q,!0).event(C),Ve=ln(C.view).on("mousemove.zoom",ot,!0).on("mouseup.zoom",he,!0),Re=ga(C,V),Ge=C.clientX,tt=C.clientY;Z3(C.view),Lc(C),ne.mouse=[Re,this.__zoom.invert(Re)],Hl(this),ne.start();function ot(bt){if(ds(bt),!ne.moved){var wt=bt.clientX-Ge,pt=bt.clientY-tt;ne.moved=wt*wt+pt*pt>y}ne.event(bt).zoom("mouse",t(I(ne.that.__zoom,ne.mouse[0]=ga(bt,V),ne.mouse[1]),ne.extent,o))}function he(bt){Ve.on("mousemove.zoom mouseup.zoom",null),K3(bt.view,ne.moved),ds(bt),ne.event(bt).end()}}function Oe(C,...Q){if(i.apply(this,arguments)){var V=this.__zoom,ne=ga(C.changedTouches?C.changedTouches[0]:C,this),Ve=V.invert(ne),Re=V.k*(C.shiftKey?.5:2),Ge=t(I(k(V,Re),ne,Ve),e.apply(this,Q),o);ds(C),s>0?ln(this).transition().duration(s).call(M,Ge,ne,C):ln(this).call(E.transform,Ge,ne,C)}}function me(C,...Q){if(i.apply(this,arguments)){var V=C.touches,ne=V.length,Ve=K(this,Q,C.changedTouches.length===ne).event(C),Re,Ge,tt,ot;for(Lc(C),Ge=0;Getypeof i=="function",x0=i=>Array.isArray(i),cS=i=>i instanceof Object,uS=i=>i instanceof Object?i.constructor.name!=="Function"&&i.constructor.name!=="Object":!1,Dm=i=>cS(i)&&!x0(i)&&!y0(i)&&!uS(i);function dd(i,e,t){return y0(e)?e(i,t):e}function Ro(i){var e;let t;if(x0(i))t=i;else{const r=An(i),n=r==null?void 0:r.rgb();t=[(n==null?void 0:n.r)||0,(n==null?void 0:n.g)||0,(n==null?void 0:n.b)||0,(e=r==null?void 0:r.opacity)!==null&&e!==void 0?e:1]}return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function qn(i,e){let t=new Float32Array;return i({framebuffer:e})(()=>{t=i.read()}),t}function fS(i,e,t){return Math.min(Math.max(i,e),t)}class hS{constructor(){this.disableSimulation=Rt.disableSimulation,this.backgroundColor=sS,this.spaceSize=Rt.spaceSize,this.nodeColor=g0,this.nodeGreyoutOpacity=aS,this.nodeSize=v0,this.nodeSizeScale=Rt.nodeSizeScale,this.renderHighlightedNodeRing=!0,this.highlightedNodeRingColor=void 0,this.renderHoveredNodeRing=!0,this.hoveredNodeRingColor=Rt.hoveredNodeRingColor,this.focusedNodeRingColor=Rt.focusedNodeRingColor,this.linkColor=b0,this.linkGreyoutOpacity=oS,this.linkWidth=_0,this.linkWidthScale=Rt.linkWidthScale,this.renderLinks=Rt.renderLinks,this.curvedLinks=Rt.curvedLinks,this.curvedLinkSegments=Rt.curvedLinkSegments,this.curvedLinkWeight=Rt.curvedLinkWeight,this.curvedLinkControlPointDistance=Rt.curvedLinkControlPointDistance,this.linkArrows=Rt.arrowLinks,this.linkArrowsSizeScale=Rt.arrowSizeScale,this.linkVisibilityDistanceRange=Rt.linkVisibilityDistanceRange,this.linkVisibilityMinTransparency=Rt.linkVisibilityMinTransparency,this.useQuadtree=Rt.useQuadtree,this.simulation={decay:Rt.simulation.decay,gravity:Rt.simulation.gravity,center:Rt.simulation.center,repulsion:Rt.simulation.repulsion,repulsionTheta:Rt.simulation.repulsionTheta,repulsionQuadtreeLevels:Rt.simulation.repulsionQuadtreeLevels,linkSpring:Rt.simulation.linkSpring,linkDistance:Rt.simulation.linkDistance,linkDistRandomVariationRange:Rt.simulation.linkDistRandomVariationRange,repulsionFromMouse:Rt.simulation.repulsionFromMouse,friction:Rt.simulation.friction,onStart:void 0,onTick:void 0,onEnd:void 0,onPause:void 0,onRestart:void 0},this.events={onClick:void 0,onMouseMove:void 0,onNodeMouseOver:void 0,onNodeMouseOut:void 0,onZoomStart:void 0,onZoom:void 0,onZoomEnd:void 0},this.showFPSMonitor=Rt.showFPSMonitor,this.pixelRatio=Rt.pixelRatio,this.scaleNodesOnZoom=Rt.scaleNodesOnZoom,this.initialZoomLevel=Rt.initialZoomLevel,this.disableZoom=Rt.disableZoom,this.fitViewOnInit=Rt.fitViewOnInit,this.fitViewDelay=Rt.fitViewDelay,this.fitViewByNodesInRect=void 0,this.randomSeed=void 0,this.nodeSamplingDistance=Rt.nodeSamplingDistance}init(e){Object.keys(e).forEach(t=>{this.deepMergeConfig(this.getConfig(),e,t)})}deepMergeConfig(e,t,r){Dm(e[r])&&Dm(t[r])?Object.keys(t[r]).forEach(n=>{this.deepMergeConfig(e[r],t[r],n)}):e[r]=t[r]}getConfig(){return this}}class Qn{constructor(e,t,r,n,a){this.reglInstance=e,this.config=t,this.store=r,this.data=n,a&&(this.points=a)}}var mS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,pS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;attribute vec2 indexes;varying vec4 rgba;void main(){vec4 pointPosition=texture2D(position,indexes/pointsTextureSize);rgba=vec4(pointPosition.xy,1.0,0.0);gl_Position=vec4(0.0,0.0,0.0,1.0);gl_PointSize=1.0;}`,gS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D centermass;uniform float center;uniform float alpha;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec4 centermassValues=texture2D(centermass,vec2(0.0));vec2 centermassPosition=centermassValues.xy/centermassValues.b;vec2 distVector=centermassPosition-pointPosition.xy;float dist=sqrt(dot(distVector,distVector));if(dist>0.0){float angle=atan(distVector.y,distVector.x);float addV=alpha*center*dist*0.01;velocity.rg+=addV*vec2(cos(angle),sin(angle));}gl_FragColor=velocity;}`;function ur(i){return{buffer:i.buffer(new Float32Array([-1,-1,1,-1,-1,1,1,1])),size:2}}function xo(i,e){const t=new Float32Array(e*e*2);for(let n=0;nthis.centermassFbo,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:xo(e,r.pointsTextureSize)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,pointsTextureSize:()=>r.pointsTextureSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.runCommand=e({frag:gS,vert:vr,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,centermass:()=>this.centermassFbo,center:()=>{var o;return(o=t.simulation)===null||o===void 0?void 0:o.center},alpha:()=>r.alpha}})}run(){var e,t,r;(e=this.clearCentermassCommand)===null||e===void 0||e.call(this),(t=this.calculateCentermassCommand)===null||t===void 0||t.call(this),(r=this.runCommand)===null||r===void 0||r.call(this)}destroy(){Pi(this.centermassFbo)}}var bS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float gravity;uniform float spaceSize;uniform float alpha;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec2 centerPosition=vec2(spaceSize/2.0);vec2 distVector=centerPosition-pointPosition.rg;float dist=sqrt(dot(distVector,distVector));if(dist>0.0){float angle=atan(distVector.y,distVector.x);float addV=alpha*gravity*dist*0.1;velocity.rg+=addV*vec2(cos(angle),sin(angle));}gl_FragColor=velocity;}`;class _S extends Qn{initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:bS,vert:vr,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,gravity:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.gravity},spaceSize:()=>r.adjustedSpaceSize,alpha:()=>r.alpha}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}}function yS(i){return` +#ifdef GL_ES +precision highp float; +#endif + +uniform sampler2D position; +uniform float linkSpring; +uniform float linkDistance; +uniform vec2 linkDistRandomVariationRange; + +uniform sampler2D linkFirstIndicesAndAmount; +uniform sampler2D linkIndices; +uniform sampler2D linkBiasAndStrength; +uniform sampler2D linkRandomDistanceFbo; + +uniform float pointsTextureSize; +uniform float linksTextureSize; +uniform float alpha; + +varying vec2 index; + +const float MAX_LINKS = ${i}.0; + +void main() { + vec4 pointPosition = texture2D(position, index); + vec4 velocity = vec4(0.0); + + vec4 linkFirstIJAndAmount = texture2D(linkFirstIndicesAndAmount, index); + float iCount = linkFirstIJAndAmount.r; + float jCount = linkFirstIJAndAmount.g; + float linkAmount = linkFirstIJAndAmount.b; + if (linkAmount > 0.0) { + for (float i = 0.0; i < MAX_LINKS; i += 1.0) { + if (i < linkAmount) { + if (iCount >= linksTextureSize) { + iCount = 0.0; + jCount += 1.0; + } + vec2 linkTextureIndex = (vec2(iCount, jCount) + 0.5) / linksTextureSize; + vec4 connectedPointIndex = texture2D(linkIndices, linkTextureIndex); + vec4 biasAndStrength = texture2D(linkBiasAndStrength, linkTextureIndex); + vec4 randomMinDistance = texture2D(linkRandomDistanceFbo, linkTextureIndex); + float bias = biasAndStrength.r; + float strength = biasAndStrength.g; + float randomMinLinkDist = randomMinDistance.r * (linkDistRandomVariationRange.g - linkDistRandomVariationRange.r) + linkDistRandomVariationRange.r; + randomMinLinkDist *= linkDistance; + + iCount += 1.0; + + vec4 connectedPointPosition = texture2D(position, (connectedPointIndex.rg + 0.5) / pointsTextureSize); + float x = connectedPointPosition.x - (pointPosition.x + velocity.x); + float y = connectedPointPosition.y - (pointPosition.y + velocity.y); + float l = sqrt(x * x + y * y); + l = max(l, randomMinLinkDist * 0.99); + l = (l - randomMinLinkDist) / l; + l *= linkSpring * alpha; + l *= strength; + l *= bias; + x *= l; + y *= l; + velocity.x += x; + velocity.y += y; + } + } + } + + gl_FragColor = vec4(velocity.rg, 0.0, 0.0); +} + `}var Os;(function(i){i.OUTGOING="outgoing",i.INCOMING="incoming"})(Os||(Os={}));class Mm extends Qn{constructor(){super(...arguments),this.linkFirstIndicesAndAmount=new Float32Array,this.indices=new Float32Array,this.maxPointDegree=0}create(e){const{reglInstance:t,store:{pointsTextureSize:r,linksTextureSize:n},data:a}=this;if(!r||!n)return;this.linkFirstIndicesAndAmount=new Float32Array(r*r*4),this.indices=new Float32Array(n*n*4);const o=new Float32Array(n*n*4),s=new Float32Array(n*n*4),l=e===Os.INCOMING?a.groupedSourceToTargetLinks:a.groupedTargetToSourceLinks;this.maxPointDegree=0;let d=0;l.forEach((c,u)=>{this.linkFirstIndicesAndAmount[u*4+0]=d%n,this.linkFirstIndicesAndAmount[u*4+1]=Math.floor(d/n),this.linkFirstIndicesAndAmount[u*4+2]=c.size,c.forEach(f=>{var m,p;this.indices[d*4+0]=f%r,this.indices[d*4+1]=Math.floor(f/r);const y=(m=a.degree[a.getInputIndexBySortedIndex(f)])!==null&&m!==void 0?m:0,x=(p=a.degree[a.getInputIndexBySortedIndex(u)])!==null&&p!==void 0?p:0,E=y/(y+x);let k=1/Math.min(y,x);k=Math.sqrt(k),o[d*4+0]=E,o[d*4+1]=k,s[d*4]=this.store.getRandomFloat(0,1),d+=1}),this.maxPointDegree=Math.max(this.maxPointDegree,c.size)}),this.linkFirstIndicesAndAmountFbo=t.framebuffer({color:t.texture({data:this.linkFirstIndicesAndAmount,shape:[r,r,4],type:"float"}),depth:!1,stencil:!1}),this.indicesFbo=t.framebuffer({color:t.texture({data:this.indices,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1}),this.biasAndStrengthFbo=t.framebuffer({color:t.texture({data:o,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1}),this.randomDistanceFbo=t.framebuffer({color:t.texture({data:s,shape:[n,n,4],type:"float"}),depth:!1,stencil:!1})}initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:()=>yS(this.maxPointDegree),vert:vr,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,linkSpring:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkSpring},linkDistance:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkDistance},linkDistRandomVariationRange:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.linkDistRandomVariationRange},linkFirstIndicesAndAmount:()=>this.linkFirstIndicesAndAmountFbo,linkIndices:()=>this.indicesFbo,linkBiasAndStrength:()=>this.biasAndStrengthFbo,linkRandomDistanceFbo:()=>this.randomDistanceFbo,pointsTextureSize:()=>r.pointsTextureSize,linksTextureSize:()=>r.linksTextureSize,alpha:()=>r.alpha}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}destroy(){Pi(this.linkFirstIndicesAndAmountFbo),Pi(this.indicesFbo),Pi(this.biasAndStrengthFbo),Pi(this.randomDistanceFbo)}}var w0=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,S0=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;uniform float levelTextureSize;uniform float cellSize;attribute vec2 indexes;varying vec4 rgba;void main(){vec4 pointPosition=texture2D(position,indexes/pointsTextureSize);rgba=vec4(pointPosition.rg,1.0,0.0);float n=floor(pointPosition.x/cellSize);float m=floor(pointPosition.y/cellSize);vec2 levelPosition=2.0*(vec2(n,m)+0.5)/levelTextureSize-1.0;gl_Position=vec4(levelPosition,0.0,1.0);gl_PointSize=1.0;}`,xS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D levelFbo;uniform float level;uniform float levels;uniform float levelTextureSize;uniform float repulsion;uniform float alpha;uniform float spaceSize;uniform float theta;varying vec2 index;const float MAX_LEVELS_NUM=14.0;vec2 calcAdd(vec2 ij,vec2 pp){vec2 add=vec2(0.0);vec4 centermass=texture2D(levelFbo,ij);if(centermass.r>0.0&¢ermass.g>0.0&¢ermass.b>0.0){vec2 centermassPosition=vec2(centermass.rg/centermass.b);vec2 distVector=pp-centermassPosition;float l=dot(distVector,distVector);float dist=sqrt(l);if(l>0.0){float angle=atan(distVector.y,distVector.x);float c=alpha*repulsion*centermass.b;float distanceMin2=1.0;if(l0.0&¢ermass.g>0.0&¢ermass.b>0.0){vec2 centermassPosition=vec2(centermass.rg/centermass.b);vec2 distVector=pp-centermassPosition;float l=dot(distVector,distVector);float dist=sqrt(l);if(l>0.0){float angle=atan(distVector.y,distVector.x);float c=alpha*repulsion*centermass.b;float distanceMin2=1.0;if(ls.levelFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)}}),this.calculateLevelsCommand=e({frag:w0,vert:S0,framebuffer:(o,s)=>s.levelFbo,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:xo(e,r.pointsTextureSize)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,pointsTextureSize:()=>r.pointsTextureSize,levelTextureSize:(o,s)=>s.levelTextureSize,cellSize:(o,s)=>s.cellSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.forceCommand=e({frag:xS,vert:vr,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,level:(o,s)=>s.level,levels:this.quadtreeLevels,levelFbo:(o,s)=>s.levelFbo,levelTextureSize:(o,s)=>s.levelTextureSize,alpha:()=>r.alpha,repulsion:()=>{var o;return(o=t.simulation)===null||o===void 0?void 0:o.repulsion},spaceSize:()=>r.adjustedSpaceSize,theta:()=>{var o;return(o=t.simulation)===null||o===void 0?void 0:o.repulsionTheta}},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.forceFromItsOwnCentermassCommand=e({frag:wS,vert:vr,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>a==null?void 0:a.previousPositionFbo,randomValues:()=>this.randomValuesFbo,levelFbo:(o,s)=>s.levelFbo,levelTextureSize:(o,s)=>s.levelTextureSize,alpha:()=>r.alpha,repulsion:()=>{var o;return(o=t.simulation)===null||o===void 0?void 0:o.repulsion},spaceSize:()=>r.adjustedSpaceSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.clearVelocityCommand=e({frag:Fo,vert:vr,framebuffer:()=>a==null?void 0:a.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)}})}run(){var e,t,r,n,a;const{store:o}=this;for(let s=0;s{Pi(e)}),this.levelsFbos.clear()}}function ES(i,e){i=Math.min(i,e);const t=e-i,r=` + float dist = sqrt(l); + if (dist > 0.0) { + float c = alpha * repulsion * centermass.b; + addVelocity += calcAdd(vec2(x, y), l, c); + addVelocity += addVelocity * random.rg; + } + `;function n(a){if(a>=e)return r;{const o=Math.pow(2,a+1),s=new Array(a+1-t).fill(0).map((d,c)=>`pow(2.0, ${a-(c+t)}.0) * i${c+t}`).join("+"),l=new Array(a+1-t).fill(0).map((d,c)=>`pow(2.0, ${a-(c+t)}.0) * j${c+t}`).join("+");return` + for (float ij${a} = 0.0; ij${a} < 4.0; ij${a} += 1.0) { + float i${a} = 0.0; + float j${a} = 0.0; + if (ij${a} == 1.0 || ij${a} == 3.0) i${a} = 1.0; + if (ij${a} == 2.0 || ij${a} == 3.0) j${a} = 1.0; + float i = pow(2.0, ${i}.0) * n / width${a+1} + ${s}; + float j = pow(2.0, ${i}.0) * m / width${a+1} + ${l}; + float groupPosX = (i + 0.5) / ${o}.0; + float groupPosY = (j + 0.5) / ${o}.0; + + vec4 centermass = texture2D(level[${a}], vec2(groupPosX, groupPosY)); + if (centermass.r > 0.0 && centermass.g > 0.0 && centermass.b > 0.0) { + float x = centermass.r / centermass.b - pointPosition.r; + float y = centermass.g / centermass.b - pointPosition.g; + float l = x * x + y * y; + if ((width${a+1} * width${a+1}) / theta < l) { + ${r} + } else { + ${n(a+1)} + } + } + } + `}}return` +#ifdef GL_ES +precision highp float; +#endif + +uniform sampler2D position; +uniform sampler2D randomValues; +uniform float spaceSize; +uniform float repulsion; +uniform float theta; +uniform float alpha; +uniform sampler2D level[${e}]; +varying vec2 index; + +vec2 calcAdd(vec2 xy, float l, float c) { + float distanceMin2 = 1.0; + if (l < distanceMin2) l = sqrt(distanceMin2 * l); + float add = c / l; + return add * xy; +} + +void main() { + vec4 pointPosition = texture2D(position, index); + vec4 random = texture2D(randomValues, index); + + float width0 = spaceSize; + + vec2 velocity = vec2(0.0); + vec2 addVelocity = vec2(0.0); + + ${new Array(e).fill(0).map((a,o)=>`float width${o+1} = width${o} / 2.0;`).join(` +`)} + + for (float n = 0.0; n < pow(2.0, ${t}.0); n += 1.0) { + for (float m = 0.0; m < pow(2.0, ${t}.0); m += 1.0) { + ${n(t)} + } + } + + velocity -= addVelocity; + + gl_FragColor = vec4(velocity, 0.0, 0.0); +} +`}class TS extends Qn{constructor(){super(...arguments),this.levelsFbos=new Map,this.quadtreeLevels=0}create(){const{reglInstance:e,store:t}=this;if(!t.pointsTextureSize)return;this.quadtreeLevels=Math.log2(t.adjustedSpaceSize);for(let n=0;nd.levelFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(r)}}),this.calculateLevelsCommand=r({frag:w0,vert:S0,framebuffer:(l,d)=>d.levelFbo,primitive:"points",count:()=>o.nodes.length,attributes:{indexes:xo(r,a.pointsTextureSize)},uniforms:{position:()=>s==null?void 0:s.previousPositionFbo,pointsTextureSize:()=>a.pointsTextureSize,levelTextureSize:(l,d)=>d.levelTextureSize,cellSize:(l,d)=>d.cellSize},blend:{enable:!0,func:{src:"one",dst:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},stencil:{enable:!1}}),this.quadtreeCommand=r({frag:ES((t=(e=n.simulation)===null||e===void 0?void 0:e.repulsionQuadtreeLevels)!==null&&t!==void 0?t:this.quadtreeLevels,this.quadtreeLevels),vert:vr,framebuffer:()=>s==null?void 0:s.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(r)},uniforms:Ei({position:()=>s==null?void 0:s.previousPositionFbo,randomValues:()=>this.randomValuesFbo,spaceSize:()=>a.adjustedSpaceSize,repulsion:()=>{var l;return(l=n.simulation)===null||l===void 0?void 0:l.repulsion},theta:()=>{var l;return(l=n.simulation)===null||l===void 0?void 0:l.repulsionTheta},alpha:()=>a.alpha},Object.fromEntries(this.levelsFbos))})}run(){var e,t,r;const{store:n}=this;for(let a=0;a{Pi(e)}),this.levelsFbos.clear()}}var IS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float repulsion;uniform vec2 mousePos;varying vec2 index;void main(){vec4 pointPosition=texture2D(position,index);vec4 velocity=vec4(0.0);vec2 mouse=mousePos;vec2 distVector=mouse-pointPosition.rg;float dist=sqrt(dot(distVector,distVector));dist=max(dist,10.0);float angle=atan(distVector.y,distVector.x);float addV=100.0*repulsion/(dist*dist);velocity.rg-=addV*vec2(cos(angle),sin(angle));gl_FragColor=velocity;}`;class AS extends Qn{initPrograms(){const{reglInstance:e,config:t,store:r,points:n}=this;this.runCommand=e({frag:IS,vert:vr,framebuffer:()=>n==null?void 0:n.velocityFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>n==null?void 0:n.previousPositionFbo,mousePos:()=>r.mousePosition,repulsion:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.repulsionFromMouse}}})}run(){var e;(e=this.runCommand)===null||e===void 0||e.call(this)}}var CS=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},E0={exports:{}};(function(i,e){(function(t,r){i.exports=r()})(CS,function(){var t=`
+ + 00 FPS + + + + + + + + + + + + + + +
`,r=`#gl-bench { + position:absolute; + left:0; + top:0; + z-index:1000; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +#gl-bench div { + position: relative; + display: block; + margin: 4px; + padding: 0 7px 0 10px; + background: #6c6; + border-radius: 15px; + cursor: pointer; + opacity: 0.9; +} + +#gl-bench svg { + height: 60px; + margin: 0 -1px; +} + +#gl-bench text { + font-size: 12px; + font-family: Helvetica,Arial,sans-serif; + font-weight: 700; + dominant-baseline: middle; + text-anchor: middle; +} + +#gl-bench .gl-mem { + font-size: 9px; +} + +#gl-bench line { + stroke-width: 5; + stroke: #112211; + stroke-linecap: round; +} + +#gl-bench polyline { + fill: none; + stroke: #112211; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 3.5; +} + +#gl-bench rect { + fill: #448844; +} + +#gl-bench .opacity { + stroke: #448844; +} +`;class n{constructor(o,s={}){this.css=r,this.svg=t,this.paramLogger=()=>{},this.chartLogger=()=>{},this.chartLen=20,this.chartHz=20,this.names=[],this.cpuAccums=[],this.gpuAccums=[],this.activeAccums=[],this.chart=new Array(this.chartLen),this.now=()=>performance&&performance.now?performance.now():Date.now(),this.updateUI=()=>{[].forEach.call(this.nodes["gl-gpu-svg"],f=>{f.style.display=this.trackGPU?"inline":"none"})},Object.assign(this,s),this.detected=0,this.finished=[],this.isFramebuffer=0,this.frameId=0;let l,d=0,c,u=f=>{++d<20?l=requestAnimationFrame(u):(this.detected=Math.ceil(1e3*d/(f-c)/70),cancelAnimationFrame(l)),c||(c=f)};if(requestAnimationFrame(u),o){const f=(p,y)=>fe(this,null,function*(){return Promise.resolve(setTimeout(()=>{o.getError();const x=this.now()-p;y.forEach((E,k)=>{E&&(this.gpuAccums[k]+=x)})},0))}),m=(p,y,x)=>function(){const E=y.now();p.apply(x,arguments),y.trackGPU&&y.finished.push(f(E,y.activeAccums.slice(0)))};["drawArrays","drawElements","drawArraysInstanced","drawBuffers","drawElementsInstanced","drawRangeElements"].forEach(p=>{o[p]&&(o[p]=m(o[p],this,o))}),o.getExtension=((p,y)=>function(){let x=p.apply(o,arguments);return x&&["drawElementsInstancedANGLE","drawBuffersWEBGL"].forEach(E=>{x[E]&&(x[E]=m(x[E],y,x))}),x})(o.getExtension,this)}if(!this.withoutUI){this.dom||(this.dom=document.body);let f=document.createElement("div");f.id="gl-bench",this.dom.appendChild(f),this.dom.insertAdjacentHTML("afterbegin",'"),this.dom=f,this.dom.addEventListener("click",()=>{this.trackGPU=!this.trackGPU,this.updateUI()}),this.paramLogger=((m,p,y)=>{const x=["gl-cpu","gl-gpu","gl-mem","gl-fps","gl-gpu-svg","gl-chart"],E=Object.assign({},x);return x.forEach(k=>E[k]=p.getElementsByClassName(k)),this.nodes=E,(k,I,v,M,K,L,R)=>{E["gl-cpu"][k].style.strokeDasharray=(I*.27).toFixed(0)+" 100",E["gl-gpu"][k].style.strokeDasharray=(v*.27).toFixed(0)+" 100",E["gl-mem"][k].innerHTML=y[k]?y[k]:M?"mem: "+M.toFixed(0)+"mb":"",E["gl-fps"][k].innerHTML=K.toFixed(0)+" FPS",m(y[k],I,v,M,K,L,R)}})(this.paramLogger,this.dom,this.names),this.chartLogger=((m,p)=>{let y={"gl-chart":p.getElementsByClassName("gl-chart")};return(x,E,k)=>{let I="",v=E.length;for(let M=0;M=1e3){const d=this.frameId-this.paramFrame,c=d/l*1e3;for(let u=0;u{this.gpuAccums[u]=0,this.finished=[]})}this.paramFrame=this.frameId,this.paramTime=s}}if(!this.detected||!this.chartFrame)this.chartFrame=this.frameId,this.chartTime=s,this.circularId=0;else{let l=s-this.chartTime,d=this.chartHz*l/1e3;for(;--d>0&&this.detected;){const u=(this.frameId-this.chartFrame)/l*1e3;this.chart[this.circularId%this.chartLen]=u;for(let f=0;f{this.idToNodeMap.set(n.id,n),this.inputIndexToIdMap.set(a,n.id),this.idToIndegreeMap.set(n.id,0),this.idToOutdegreeMap.set(n.id,0)}),this.completeLinks.clear(),t.forEach(n=>{const a=this.idToNodeMap.get(n.source),o=this.idToNodeMap.get(n.target);if(a!==void 0&&o!==void 0){this.completeLinks.add(n);const s=this.idToOutdegreeMap.get(a.id);s!==void 0&&this.idToOutdegreeMap.set(a.id,s+1);const l=this.idToIndegreeMap.get(o.id);l!==void 0&&this.idToIndegreeMap.set(o.id,l+1)}}),this.degree=new Array(e.length),e.forEach((n,a)=>{const o=this.idToOutdegreeMap.get(n.id),s=this.idToIndegreeMap.get(n.id);this.degree[a]=(o!=null?o:0)+(s!=null?s:0)}),this.sortedIndexToInputIndexMap.clear(),this.inputIndexToSortedIndexMap.clear(),Object.entries(this.degree).sort((n,a)=>n[1]-a[1]).forEach(([n],a)=>{const o=+n;this.sortedIndexToInputIndexMap.set(a,o),this.inputIndexToSortedIndexMap.set(o,a),this.idToSortedIndexMap.set(this.inputIndexToIdMap.get(o),a)}),this.groupedSourceToTargetLinks.clear(),this.groupedTargetToSourceLinks.clear(),t.forEach(n=>{const a=this.idToSortedIndexMap.get(n.source),o=this.idToSortedIndexMap.get(n.target);if(a!==void 0&&o!==void 0){this.groupedSourceToTargetLinks.get(a)===void 0&&this.groupedSourceToTargetLinks.set(a,new Set);const s=this.groupedSourceToTargetLinks.get(a);s==null||s.add(o),this.groupedTargetToSourceLinks.get(o)===void 0&&this.groupedTargetToSourceLinks.set(o,new Set);const l=this.groupedTargetToSourceLinks.get(o);l==null||l.add(a)}}),this._nodes=e,this._links=t}getNodeById(e){return this.idToNodeMap.get(e)}getNodeByIndex(e){return this._nodes[e]}getSortedIndexByInputIndex(e){return this.inputIndexToSortedIndexMap.get(e)}getInputIndexBySortedIndex(e){return this.sortedIndexToInputIndexMap.get(e)}getSortedIndexById(e){return e!==void 0?this.idToSortedIndexMap.get(e):void 0}getInputIndexById(e){if(e===void 0)return;const t=this.getSortedIndexById(e);if(t!==void 0)return this.getInputIndexBySortedIndex(t)}getAdjacentNodes(e){var t,r;const n=this.getSortedIndexById(e);if(n===void 0)return;const a=(t=this.groupedSourceToTargetLinks.get(n))!==null&&t!==void 0?t:[],o=(r=this.groupedTargetToSourceLinks.get(n))!==null&&r!==void 0?r:[];return[...new Set([...a,...o])].map(s=>this.getNodeByIndex(this.getInputIndexBySortedIndex(s)))}}var OS=`precision highp float; +#define GLSLIFY 1 +uniform bool useArrow;varying vec4 rgbaColor;varying vec2 pos;varying float arrowLength;varying float linkWidthArrowWidthRatio;varying float smoothWidthRatio;float map(float value,float min1,float max1,float min2,float max2){return min2+(value-min1)*(max2-min2)/(max1-min1);}void main(){float opacity=1.0;vec3 color=rgbaColor.rgb;float smoothDelta=smoothWidthRatio/2.0;if(useArrow){float end_arrow=0.5+arrowLength/2.0;float start_arrow=end_arrow-arrowLength;float arrowWidthDelta=linkWidthArrowWidthRatio/2.0;float linkOpacity=rgbaColor.a*smoothstep(0.5-arrowWidthDelta,0.5-arrowWidthDelta-smoothDelta,abs(pos.y));float arrowOpacity=1.0;if(pos.x>start_arrow&&pos.x0.0||greyoutStatusB.r>0.0){opacity*=greyoutOpacity;}rgbaColor=vec4(rgbColor,opacity);float t=position.x;float w=curvedWeight;float tPrev=t-1.0/curvedLinkSegments;float tNext=t+1.0/curvedLinkSegments;vec2 pointCurr=conicParametricCurve(a,b,controlPoint,t,w);vec2 pointPrev=conicParametricCurve(a,b,controlPoint,max(0.0,tPrev),w);vec2 pointNext=conicParametricCurve(a,b,controlPoint,min(tNext,1.0),w);vec2 xBasisCurved=pointNext-pointPrev;vec2 yBasisCurved=normalize(vec2(-xBasisCurved.y,xBasisCurved.x));pointCurr+=yBasisCurved*linkWidthPx*position.y;vec2 p=2.0*pointCurr/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);gl_Position=vec4(final.rg,0,1);}`;const FS=i=>{const e=a0().exponent(2).range([0,1]).domain([-1,1]),t=$w(0,i).map(n=>-.5+n/i);t.push(.5);const r=new Array(t.length*2);return t.forEach((n,a)=>{r[a*2]=[e(n*2),.5],r[a*2+1]=[e(n*2),-.5]}),r};class NS extends Qn{create(){this.updateColor(),this.updateWidth(),this.updateCurveLineGeometry()}initPrograms(){const{reglInstance:e,config:t,store:r,data:n,points:a}=this,{pointsTextureSize:o}=r,s=[];n.completeLinks.forEach(d=>{const c=n.getSortedIndexById(d.target),u=n.getSortedIndexById(d.source),f=u%o,m=Math.floor(u/o),p=c%o,y=Math.floor(c/o);s.push([f,m]),s.push([p,y])});const l=e.buffer(s);this.drawCurveCommand=e({vert:RS,frag:OS,attributes:{position:{buffer:()=>this.curveLineBuffer,divisor:0},pointA:{buffer:()=>l,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*4},pointB:{buffer:()=>l,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*2,stride:Float32Array.BYTES_PER_ELEMENT*4},color:{buffer:()=>this.colorBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*4},width:{buffer:()=>this.widthBuffer,divisor:1,offset:Float32Array.BYTES_PER_ELEMENT*0,stride:Float32Array.BYTES_PER_ELEMENT*1}},uniforms:{positions:()=>a==null?void 0:a.currentPositionFbo,particleGreyoutStatus:()=>a==null?void 0:a.greyoutStatusFbo,transform:()=>r.transform,pointsTextureSize:()=>r.pointsTextureSize,nodeSizeScale:()=>t.nodeSizeScale,widthScale:()=>t.linkWidthScale,useArrow:()=>t.linkArrows,arrowSizeScale:()=>t.linkArrowsSizeScale,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,ratio:()=>t.pixelRatio,linkVisibilityDistanceRange:()=>t.linkVisibilityDistanceRange,linkVisibilityMinTransparency:()=>t.linkVisibilityMinTransparency,greyoutOpacity:()=>t.linkGreyoutOpacity,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,curvedWeight:()=>t.curvedLinkWeight,curvedLinkControlPointDistance:()=>t.curvedLinkControlPointDistance,curvedLinkSegments:()=>{var d;return t.curvedLinks?(d=t.curvedLinkSegments)!==null&&d!==void 0?d:Rt.curvedLinkSegments:1}},cull:{enable:!0,face:"back"},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1},count:()=>{var d,c;return(c=(d=this.curveLineGeometry)===null||d===void 0?void 0:d.length)!==null&&c!==void 0?c:0},instances:()=>n.linksNumber,primitive:"triangle strip"})}draw(){var e;!this.colorBuffer||!this.widthBuffer||!this.curveLineBuffer||(e=this.drawCurveCommand)===null||e===void 0||e.call(this)}updateColor(){const{reglInstance:e,config:t,data:r}=this,n=[];r.completeLinks.forEach(a=>{var o;const s=(o=dd(a,t.linkColor))!==null&&o!==void 0?o:b0,l=Ro(s);n.push(l)}),this.colorBuffer=e.buffer(n)}updateWidth(){const{reglInstance:e,config:t,data:r}=this,n=[];r.completeLinks.forEach(a=>{const o=dd(a,t.linkWidth);n.push([o!=null?o:_0])}),this.widthBuffer=e.buffer(n)}updateCurveLineGeometry(){const{reglInstance:e,config:{curvedLinks:t,curvedLinkSegments:r}}=this;this.curveLineGeometry=FS(t?r!=null?r:Rt.curvedLinkSegments:1),this.curveLineBuffer=e.buffer(this.curveLineGeometry)}destroy(){Oc(this.colorBuffer),Oc(this.widthBuffer),Oc(this.curveLineBuffer)}}function PS(i,e,t,r){var n;if(t===0)return;const a=new Float32Array(t*t*4);for(let s=0;s0.0){alpha*=greyoutOpacity;}}`,BS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform sampler2D particleSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform float ratio;uniform mat3 transform;uniform vec2 selection[2];uniform bool scaleNodesOnZoom;uniform float maxPointSize;varying vec2 index;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*ratio*transform[0][0];}else{pSize=size*ratio*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize);}void main(){vec4 pointPosition=texture2D(position,index);vec2 p=2.0*pointPosition.rg/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);vec4 pSize=texture2D(particleSize,index);float size=pSize.r*sizeScale;float left=2.0*(selection[0].x-0.5*pointSize(size))/screenSize.x-1.0;float right=2.0*(selection[1].x+0.5*pointSize(size))/screenSize.x-1.0;float top=2.0*(selection[0].y-0.5*pointSize(size))/screenSize.y-1.0;float bottom=2.0*(selection[1].y+0.5*pointSize(size))/screenSize.y-1.0;gl_FragColor=vec4(0.0,0.0,pointPosition.rg);if(final.x>=left&&final.x<=right&&final.y>=top&&final.y<=bottom){gl_FragColor.r=1.0;}}`,US=`precision mediump float; +#define GLSLIFY 1 +uniform vec4 color;uniform float width;varying vec2 pos;varying float particleOpacity;const float smoothing=1.05;void main(){vec2 cxy=pos;float r=dot(cxy,cxy);float opacity=smoothstep(r,r*smoothing,1.0);float stroke=smoothstep(width,width*smoothing,r);gl_FragColor=vec4(color.rgb,opacity*stroke*color.a*particleOpacity);}`,GS=`precision mediump float; +#define GLSLIFY 1 +attribute vec2 quad;uniform sampler2D positions;uniform sampler2D particleColor;uniform sampler2D particleGreyoutStatus;uniform sampler2D particleSize;uniform mat3 transform;uniform float pointsTextureSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform bool scaleNodesOnZoom;uniform float pointIndex;uniform float maxPointSize;uniform vec4 color;uniform float greyoutOpacity;varying vec2 pos;varying float particleOpacity;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*transform[0][0];}else{pSize=size*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize);}const float relativeRingRadius=1.3;void main(){pos=quad;vec2 ij=vec2(mod(pointIndex,pointsTextureSize),floor(pointIndex/pointsTextureSize))+0.5;vec4 pointPosition=texture2D(positions,ij/pointsTextureSize);vec4 pSize=texture2D(particleSize,ij/pointsTextureSize);vec4 pColor=texture2D(particleColor,ij/pointsTextureSize);particleOpacity=pColor.a;vec4 greyoutStatus=texture2D(particleGreyoutStatus,ij/pointsTextureSize);if(greyoutStatus.r>0.0){particleOpacity*=greyoutOpacity;}float size=(pointSize(pSize.r*sizeScale)*relativeRingRadius)/transform[0][0];float radius=size*0.5;vec2 a=pointPosition.xy;vec2 b=pointPosition.xy+vec2(0.0,radius);vec2 xBasis=b-a;vec2 yBasis=normalize(vec2(-xBasis.y,xBasis.x));vec2 point=a+xBasis*quad.x+yBasis*radius*quad.y;vec2 p=2.0*point/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);gl_Position=vec4(final.rg,0,1);}`,jS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +varying vec4 rgba;void main(){gl_FragColor=rgba;}`,VS=`#ifdef GL_ES +precision highp float; +#define GLSLIFY 1 +#endif +uniform sampler2D position;uniform float pointsTextureSize;uniform sampler2D particleSize;uniform float sizeScale;uniform float spaceSize;uniform vec2 screenSize;uniform float ratio;uniform mat3 transform;uniform vec2 mousePosition;uniform bool scaleNodesOnZoom;uniform float maxPointSize;attribute vec2 indexes;varying vec4 rgba;float pointSize(float size){float pSize;if(scaleNodesOnZoom){pSize=size*ratio*transform[0][0];}else{pSize=size*ratio*min(5.0,max(1.0,transform[0][0]*0.01));}return min(pSize,maxPointSize);}float euclideanDistance(float x1,float x2,float y1,float y2){return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));}void main(){vec4 pointPosition=texture2D(position,(indexes+0.5)/pointsTextureSize);vec2 p=2.0*pointPosition.rg/spaceSize-1.0;p*=spaceSize/screenSize;vec3 final=transform*vec3(p,1);vec4 pSize=texture2D(particleSize,indexes/pointsTextureSize);float size=pSize.r*sizeScale;float pointRadius=0.5*pointSize(size);vec2 pointScreenPosition=(final.xy+1.0)*screenSize/2.0;rgba=vec4(0.0);gl_Position=vec4(0.5,0.5,0.0,1.0);if(euclideanDistance(pointScreenPosition.x,mousePosition.x,pointScreenPosition.y,mousePosition.y)this.currentPositionFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>this.previousPositionFbo,velocity:()=>this.velocityFbo,friction:()=>{var a;return(a=t.simulation)===null||a===void 0?void 0:a.friction},spaceSize:()=>r.adjustedSpaceSize}})),this.drawCommand=e({frag:MS,vert:zS,primitive:"points",count:()=>n.nodes.length,attributes:{indexes:xo(e,r.pointsTextureSize)},uniforms:{positions:()=>this.currentPositionFbo,particleColor:()=>this.colorFbo,particleGreyoutStatus:()=>this.greyoutStatusFbo,particleSize:()=>this.sizeFbo,ratio:()=>t.pixelRatio,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,greyoutOpacity:()=>t.nodeGreyoutOpacity,scaleNodesOnZoom:()=>t.scaleNodesOnZoom},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1}}),this.findPointsOnAreaSelectionCommand=e({frag:BS,vert:vr,framebuffer:()=>this.selectedFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>this.currentPositionFbo,particleSize:()=>this.sizeFbo,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,sizeScale:()=>t.nodeSizeScale,transform:()=>r.transform,ratio:()=>t.pixelRatio,"selection[0]":()=>r.selectedArea[0],"selection[1]":()=>r.selectedArea[1],scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>r.maxPointSize}}),this.clearHoveredFboCommand=e({frag:Fo,vert:vr,framebuffer:this.hoveredFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)}}),this.findHoveredPointCommand=e({frag:jS,vert:VS,primitive:"points",count:()=>n.nodes.length,framebuffer:()=>this.hoveredFbo,attributes:{indexes:xo(e,r.pointsTextureSize)},uniforms:{position:()=>this.currentPositionFbo,particleSize:()=>this.sizeFbo,ratio:()=>t.pixelRatio,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,mousePosition:()=>r.screenMousePosition,maxPointSize:()=>r.maxPointSize},depth:{enable:!1,mask:!1}}),this.clearSampledNodesFboCommand=e({frag:Fo,vert:vr,framebuffer:()=>this.sampledNodesFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)}}),this.fillSampledNodesFboCommand=e({frag:HS,vert:qS,primitive:"points",count:()=>n.nodes.length,framebuffer:()=>this.sampledNodesFbo,attributes:{indexes:xo(e,r.pointsTextureSize)},uniforms:{position:()=>this.currentPositionFbo,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize},depth:{enable:!1,mask:!1}}),this.drawHighlightedCommand=e({frag:US,vert:GS,attributes:{quad:ur(e)},primitive:"triangle strip",count:4,uniforms:{color:e.prop("color"),width:e.prop("width"),pointIndex:e.prop("pointIndex"),positions:()=>this.currentPositionFbo,particleColor:()=>this.colorFbo,particleSize:()=>this.sizeFbo,sizeScale:()=>t.nodeSizeScale,pointsTextureSize:()=>r.pointsTextureSize,transform:()=>r.transform,spaceSize:()=>r.adjustedSpaceSize,screenSize:()=>r.screenSize,scaleNodesOnZoom:()=>t.scaleNodesOnZoom,maxPointSize:()=>r.maxPointSize,particleGreyoutStatus:()=>this.greyoutStatusFbo,greyoutOpacity:()=>t.nodeGreyoutOpacity},blend:{enable:!0,func:{dstRGB:"one minus src alpha",srcRGB:"src alpha",dstAlpha:"one minus src alpha",srcAlpha:"one"},equation:{rgb:"add",alpha:"add"}},depth:{enable:!1,mask:!1}}),this.trackPointsCommand=e({frag:JS,vert:vr,framebuffer:()=>this.trackedPositionsFbo,primitive:"triangle strip",count:4,attributes:{quad:ur(e)},uniforms:{position:()=>this.currentPositionFbo,trackedIndices:()=>this.trackedIndicesFbo,pointsTextureSize:()=>r.pointsTextureSize}})}updateColor(){const{reglInstance:e,config:t,store:{pointsTextureSize:r},data:n}=this;r&&(this.colorFbo=PS(n,e,r,t.nodeColor))}updateGreyoutStatus(){const{reglInstance:e,store:t}=this;this.greyoutStatusFbo=DS(t.selectedIndices,e,t.pointsTextureSize)}updateSize(){const{reglInstance:e,config:t,store:{pointsTextureSize:r},data:n}=this;r&&(this.sizeByIndex=new Float32Array(n.nodes.length),this.sizeFbo=XS(n,e,r,t.nodeSize,this.sizeByIndex))}updateSampledNodesGrid(){const{store:{screenSize:e},config:{nodeSamplingDistance:t},reglInstance:r}=this,n=t!=null?t:Math.min(...e)/2,a=Math.ceil(e[0]/n),o=Math.ceil(e[1]/n);Pi(this.sampledNodesFbo),this.sampledNodesFbo=r.framebuffer({shape:[a,o],depth:!1,stencil:!1,colorType:"float"})}trackPoints(){var e;!this.trackedIndicesFbo||!this.trackedPositionsFbo||(e=this.trackPointsCommand)===null||e===void 0||e.call(this)}draw(){var e,t,r;const{config:{renderHoveredNodeRing:n,renderHighlightedNodeRing:a},store:o}=this;(e=this.drawCommand)===null||e===void 0||e.call(this),(n!=null?n:a)&&o.hoveredNode&&((t=this.drawHighlightedCommand)===null||t===void 0||t.call(this,{width:.85,color:o.hoveredNodeRingColor,pointIndex:o.hoveredNode.index})),o.focusedNode&&((r=this.drawHighlightedCommand)===null||r===void 0||r.call(this,{width:.75,color:o.focusedNodeRingColor,pointIndex:o.focusedNode.index}))}updatePosition(){var e;(e=this.updatePositionCommand)===null||e===void 0||e.call(this),this.swapFbo()}findPointsOnAreaSelection(){var e;(e=this.findPointsOnAreaSelectionCommand)===null||e===void 0||e.call(this)}findHoveredPoint(){var e,t;(e=this.clearHoveredFboCommand)===null||e===void 0||e.call(this),(t=this.findHoveredPointCommand)===null||t===void 0||t.call(this)}getNodeRadiusByIndex(e){var t;return(t=this.sizeByIndex)===null||t===void 0?void 0:t[e]}trackNodesByIds(e){this.trackedIds=e.length?e:void 0,this.trackedPositionsById.clear();const t=e.map(r=>this.data.getSortedIndexById(r)).filter(r=>r!==void 0);Pi(this.trackedIndicesFbo),this.trackedIndicesFbo=void 0,Pi(this.trackedPositionsFbo),this.trackedPositionsFbo=void 0,t.length&&(this.trackedIndicesFbo=KS(t,this.store.pointsTextureSize,this.reglInstance),this.trackedPositionsFbo=ZS(t,this.reglInstance)),this.trackPoints()}getTrackedPositions(){if(!this.trackedIds)return this.trackedPositionsById;const e=qn(this.reglInstance,this.trackedPositionsFbo);return this.trackedIds.forEach((t,r)=>{const n=e[r*4],a=e[r*4+1];n!==void 0&&a!==void 0&&this.trackedPositionsById.set(t,[n,a])}),this.trackedPositionsById}getSampledNodePositionsMap(){var e,t,r;const n=new Map;if(!this.sampledNodesFbo)return n;(e=this.clearSampledNodesFboCommand)===null||e===void 0||e.call(this),(t=this.fillSampledNodesFboCommand)===null||t===void 0||t.call(this);const a=qn(this.reglInstance,this.sampledNodesFbo);for(let o=0;ox.x).filter(x=>x!==void 0);if(r.length===0)return;const n=e.map(x=>x.y).filter(x=>x!==void 0);if(n.length===0)return;const a=Math.min(...r),o=Math.max(...r),s=Math.min(...n),l=Math.max(...n),d=o-a,c=l-s,u=Math.max(d,c),f=(u-d)/2,m=(u-c)/2,p=$s().range([0,t!=null?t:Rt.spaceSize]).domain([a-f,o+f]),y=$s().range([0,t!=null?t:Rt.spaceSize]).domain([s-m,l+m]);e.forEach(x=>{x.x=p(x.x),x.y=y(x.y)})}}const lu=.001,du=64;class eE{constructor(){this.pointsTextureSize=0,this.linksTextureSize=0,this.alpha=1,this.transform=c3(),this.backgroundColor=[0,0,0,0],this.screenSize=[0,0],this.mousePosition=[0,0],this.screenMousePosition=[0,0],this.selectedArea=[[0,0],[0,0]],this.isSimulationRunning=!1,this.simulationProgress=0,this.selectedIndices=null,this.maxPointSize=du,this.hoveredNode=void 0,this.focusedNode=void 0,this.adjustedSpaceSize=Rt.spaceSize,this.hoveredNodeRingColor=[1,1,1,lS],this.focusedNodeRingColor=[1,1,1,dS],this.alphaTarget=0,this.scaleNodeX=$s(),this.scaleNodeY=$s(),this.random=new p0,this.alphaDecay=e=>1-Math.pow(lu,1/e)}addRandomSeed(e){this.random=this.random.clone(e)}getRandomFloat(e,t){return this.random.float(e,t)}adjustSpaceSize(e,t){e>=t?(this.adjustedSpaceSize=t/2,console.warn(`The \`spaceSize\` has been reduced to ${this.adjustedSpaceSize} due to WebGL limits`)):this.adjustedSpaceSize=e}updateScreenSize(e,t){const{adjustedSpaceSize:r}=this;this.screenSize=[e,t],this.scaleNodeX.domain([0,r]).range([(e-r)/2,(e+r)/2]),this.scaleNodeY.domain([r,0]).range([(t-r)/2,(t+r)/2])}scaleX(e){return this.scaleNodeX(e)}scaleY(e){return this.scaleNodeY(e)}setHoveredNodeRingColor(e){const t=Ro(e);this.hoveredNodeRingColor[0]=t[0],this.hoveredNodeRingColor[1]=t[1],this.hoveredNodeRingColor[2]=t[2]}setFocusedNodeRingColor(e){const t=Ro(e);this.focusedNodeRingColor[0]=t[0],this.focusedNodeRingColor[1]=t[1],this.focusedNodeRingColor[2]=t[2]}setFocusedNode(e,t){e&&t!==void 0?this.focusedNode={node:e,index:t}:this.focusedNode=void 0}addAlpha(e){return(this.alphaTarget-this.alpha)*this.alphaDecay(e)}}class tE{constructor(e,t){this.eventTransform=xs,this.behavior=nS().scaleExtent([.001,1/0]).on("start",r=>{var n,a,o;this.isRunning=!0;const s=!!r.sourceEvent;(o=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoomStart)===null||o===void 0||o.call(a,r,s)}).on("zoom",r=>{var n,a,o;this.eventTransform=r.transform;const{eventTransform:{x:s,y:l,k:d},store:{transform:c,screenSize:u}}=this,f=u[0],m=u[1];u3(c,f,m),Lm(c,c,[s,l]),$c(c,c,[d,d]),Lm(c,c,[f/2,m/2]),$c(c,c,[f/2,m/2]),$c(c,c,[1,-1]);const p=!!r.sourceEvent;(o=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoom)===null||o===void 0||o.call(a,r,p)}).on("end",r=>{var n,a,o;this.isRunning=!1;const s=!!r.sourceEvent;(o=(a=(n=this.config)===null||n===void 0?void 0:n.events)===null||a===void 0?void 0:a.onZoomEnd)===null||o===void 0||o.call(a,r,s)}),this.isRunning=!1,this.store=e,this.config=t}getTransform(e,t,r=this.store.maxPointSize/2){if(e.length===0)return this.eventTransform;const{store:{screenSize:n}}=this,a=n[0],o=n[1],s=fm(e.map(E=>E[0])),l=fm(e.map(E=>E[1]));s[0]=this.store.scaleX(s[0]-r),s[1]=this.store.scaleX(s[1]+r),l[0]=this.store.scaleY(l[0]-r),l[1]=this.store.scaleY(l[1]+r);const d=a/(s[1]-s[0]),c=o/(l[0]-l[1]),u=fS(t!=null?t:Math.min(d,c),...this.behavior.scaleExtent()),f=(s[1]+s[0])/2,m=(l[1]+l[0])/2,p=a/2-f*u,y=o/2-m*u;return xs.translate(p,y).scale(u)}getDistanceToPoint(e){const{x:t,y:r,k:n}=this.eventTransform,a=this.getTransform([e],n),o=t-a.x,s=r-a.y;return Math.sqrt(o*o+s*s)}getMiddlePointTransform(e){const{store:{screenSize:t},eventTransform:{x:r,y:n,k:a}}=this,o=t[0],s=t[1],l=(o/2-r)/a,d=(s/2-n)/a,c=this.store.scaleX(e[0]),u=this.store.scaleY(e[1]),f=(l+c)/2,m=(d+u)/2,p=1,y=o/2-f*p,x=s/2-m*p;return xs.translate(y,x).scale(p)}convertSpaceToScreenPosition(e){const t=this.eventTransform.applyX(this.store.scaleX(e[0])),r=this.eventTransform.applyY(this.store.scaleY(e[1]));return[t,r]}convertSpaceToScreenRadius(e){const{config:{scaleNodesOnZoom:t},store:{maxPointSize:r},eventTransform:{k:n}}=this;let a=e*2;return t?a*=n:a*=Math.min(5,Math.max(1,n*.01)),Math.min(a,r)/2}}class iE{constructor(e,t){var r;this.config=new hS,this.graph=new LS,this.requestAnimationFrameId=0,this.isRightClickMouse=!1,this.store=new eE,this.zoomInstance=new tE(this.store,this.config),this.hasParticleSystemDestroyed=!1,this._findHoveredPointExecutionCount=0,this._isMouseOnCanvas=!1,this._isFirstDataAfterInit=!0,t&&this.config.init(t);const n=e.clientWidth,a=e.clientHeight;e.width=n*this.config.pixelRatio,e.height=a*this.config.pixelRatio,e.style.width===""&&e.style.height===""&&ln(e).style("width","100%").style("height","100%"),this.canvas=e,this.canvasD3Selection=ln(e),this.canvasD3Selection.on("mouseenter.cosmos",()=>{this._isMouseOnCanvas=!0}).on("mouseleave.cosmos",()=>{this._isMouseOnCanvas=!1}),this.zoomInstance.behavior.on("start.detect",o=>{this.currentEvent=o}).on("zoom.detect",o=>{!!o.sourceEvent&&this.updateMousePosition(o.sourceEvent),this.currentEvent=o}).on("end.detect",o=>{this.currentEvent=o}),this.canvasD3Selection.call(this.zoomInstance.behavior).on("click",this.onClick.bind(this)).on("mousemove",this.onMouseMove.bind(this)).on("contextmenu",this.onRightClickMouse.bind(this)),this.config.disableZoom&&this.disableZoom(),this.setZoomLevel(this.config.initialZoomLevel),this.reglInstance=_w({canvas:this.canvas,attributes:{antialias:!1,preserveDrawingBuffer:!0,premultipliedAlpha:!1,alpha:!1},extensions:["OES_texture_float","ANGLE_instanced_arrays"]}),this.store.maxPointSize=((r=this.reglInstance.limits.pointSizeDims[1])!==null&&r!==void 0?r:du)/this.config.pixelRatio,this.store.adjustSpaceSize(this.config.spaceSize,this.reglInstance.limits.maxTextureSize),this.store.updateScreenSize(n,a),this.points=new QS(this.reglInstance,this.config,this.store,this.graph),this.lines=new NS(this.reglInstance,this.config,this.store,this.graph,this.points),this.config.disableSimulation||(this.forceGravity=new _S(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceCenter=new vS(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceManyBody=this.config.useQuadtree?new TS(this.reglInstance,this.config,this.store,this.graph,this.points):new SS(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceLinkIncoming=new Mm(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceLinkOutgoing=new Mm(this.reglInstance,this.config,this.store,this.graph,this.points),this.forceMouse=new AS(this.reglInstance,this.config,this.store,this.graph,this.points)),this.store.backgroundColor=Ro(this.config.backgroundColor),this.config.highlightedNodeRingColor?(this.store.setHoveredNodeRingColor(this.config.highlightedNodeRingColor),this.store.setFocusedNodeRingColor(this.config.highlightedNodeRingColor)):(this.config.hoveredNodeRingColor&&this.store.setHoveredNodeRingColor(this.config.hoveredNodeRingColor),this.config.focusedNodeRingColor&&this.store.setFocusedNodeRingColor(this.config.focusedNodeRingColor)),this.config.showFPSMonitor&&(this.fpsMonitor=new zm(this.canvas)),this.config.randomSeed!==void 0&&this.store.addRandomSeed(this.config.randomSeed)}get progress(){return this.store.simulationProgress}get isSimulationRunning(){return this.store.isSimulationRunning}get maxPointSize(){return this.store.maxPointSize}setConfig(e){var t,r;const n=Ei({},this.config);this.config.init(e),n.linkColor!==this.config.linkColor&&this.lines.updateColor(),n.nodeColor!==this.config.nodeColor&&this.points.updateColor(),n.nodeSize!==this.config.nodeSize&&this.points.updateSize(),n.linkWidth!==this.config.linkWidth&&this.lines.updateWidth(),(n.curvedLinkSegments!==this.config.curvedLinkSegments||n.curvedLinks!==this.config.curvedLinks)&&this.lines.updateCurveLineGeometry(),n.backgroundColor!==this.config.backgroundColor&&(this.store.backgroundColor=Ro(this.config.backgroundColor)),n.highlightedNodeRingColor!==this.config.highlightedNodeRingColor&&(this.store.setHoveredNodeRingColor(this.config.highlightedNodeRingColor),this.store.setFocusedNodeRingColor(this.config.highlightedNodeRingColor)),n.hoveredNodeRingColor!==this.config.hoveredNodeRingColor&&this.store.setHoveredNodeRingColor(this.config.hoveredNodeRingColor),n.focusedNodeRingColor!==this.config.focusedNodeRingColor&&this.store.setFocusedNodeRingColor(this.config.focusedNodeRingColor),(n.spaceSize!==this.config.spaceSize||n.simulation.repulsionQuadtreeLevels!==this.config.simulation.repulsionQuadtreeLevels)&&(this.store.adjustSpaceSize(this.config.spaceSize,this.reglInstance.limits.maxTextureSize),this.resizeCanvas(!0),this.update(this.store.isSimulationRunning)),n.showFPSMonitor!==this.config.showFPSMonitor&&(this.config.showFPSMonitor?this.fpsMonitor=new zm(this.canvas):((t=this.fpsMonitor)===null||t===void 0||t.destroy(),this.fpsMonitor=void 0)),n.pixelRatio!==this.config.pixelRatio&&(this.store.maxPointSize=((r=this.reglInstance.limits.pointSizeDims[1])!==null&&r!==void 0?r:du)/this.config.pixelRatio),n.disableZoom!==this.config.disableZoom&&(this.config.disableZoom?this.disableZoom():this.enableZoom())}setData(e,t,r=!0){const{fitViewOnInit:n,fitViewDelay:a,fitViewByNodesInRect:o}=this.config;if(!e.length&&!t.length){this.destroyParticleSystem(),this.reglInstance.clear({color:this.store.backgroundColor,depth:1,stencil:0});return}this.graph.setData(e,t),this._isFirstDataAfterInit&&n&&(this._fitViewOnInitTimeoutID=window.setTimeout(()=>{o?this.setZoomTransformByNodePositions(o,void 0,void 0,0):this.fitView()},a)),this._isFirstDataAfterInit=!1,this.update(r)}zoomToNodeById(e,t=700,r=Pm,n=!0){const a=this.graph.getNodeById(e);a&&this.zoomToNode(a,t,r,n)}zoomToNodeByIndex(e,t=700,r=Pm,n=!0){const a=this.graph.getNodeByIndex(e);a&&this.zoomToNode(a,t,r,n)}zoom(e,t=0){this.setZoomLevel(e,t)}setZoomLevel(e,t=0){this.canvasD3Selection.transition().duration(t).call(this.zoomInstance.behavior.scaleTo,e)}getZoomLevel(){return this.zoomInstance.eventTransform.k}getNodePositions(){if(this.hasParticleSystemDestroyed)return{};const e=qn(this.reglInstance,this.points.currentPositionFbo);return this.graph.nodes.reduce((t,r)=>{const n=this.graph.getSortedIndexById(r.id),a=e[n*4+0],o=e[n*4+1];return a!==void 0&&o!==void 0&&(t[r.id]={x:a,y:o}),t},{})}getNodePositionsMap(){const e=new Map;if(this.hasParticleSystemDestroyed)return e;const t=qn(this.reglInstance,this.points.currentPositionFbo);return this.graph.nodes.reduce((r,n)=>{const a=this.graph.getSortedIndexById(n.id),o=t[a*4+0],s=t[a*4+1];return o!==void 0&&s!==void 0&&r.set(n.id,[o,s]),r},e)}getNodePositionsArray(){const e=[];if(this.hasParticleSystemDestroyed)return[];const t=qn(this.reglInstance,this.points.currentPositionFbo);e.length=this.graph.nodes.length;for(let r=0;rr.get(a)).filter(a=>a!==void 0);this.setZoomTransformByNodePositions(n,t)}selectNodesInRange(e){if(e){const t=this.store.screenSize[1];this.store.selectedArea=[[e[0][0],t-e[1][1]],[e[1][0],t-e[0][1]]],this.points.findPointsOnAreaSelection();const r=qn(this.reglInstance,this.points.selectedFbo);this.store.selectedIndices=r.map((n,a)=>a%4===0&&n!==0?a/4:-1).filter(n=>n!==-1)}else this.store.selectedIndices=null;this.points.updateGreyoutStatus()}selectNodeById(e,t=!1){var r;if(t){const n=(r=this.graph.getAdjacentNodes(e))!==null&&r!==void 0?r:[];this.selectNodesByIds([e,...n.map(a=>a.id)])}else this.selectNodesByIds([e])}selectNodeByIndex(e,t=!1){const r=this.graph.getNodeByIndex(e);r&&this.selectNodeById(r.id,t)}selectNodesByIds(e){this.selectNodesByIndices(e==null?void 0:e.map(t=>this.graph.getSortedIndexById(t)))}selectNodesByIndices(e){e?e.length===0?this.store.selectedIndices=new Float32Array:this.store.selectedIndices=new Float32Array(e.filter(t=>t!==void 0)):this.store.selectedIndices=null,this.points.updateGreyoutStatus()}unselectNodes(){this.store.selectedIndices=null,this.points.updateGreyoutStatus()}getSelectedNodes(){const{selectedIndices:e}=this.store;if(!e)return null;const t=new Array(e.length);for(const[r,n]of e.entries())if(n!==void 0){const a=this.graph.getInputIndexBySortedIndex(n);a!==void 0&&(t[r]=this.graph.nodes[a])}return t}getAdjacentNodes(e){return this.graph.getAdjacentNodes(e)}setFocusedNodeById(e){e===void 0?this.store.setFocusedNode():this.store.setFocusedNode(this.graph.getNodeById(e),this.graph.getSortedIndexById(e))}setFocusedNodeByIndex(e){e===void 0?this.store.setFocusedNode():this.store.setFocusedNode(this.graph.getNodeByIndex(e),e)}spaceToScreenPosition(e){return this.zoomInstance.convertSpaceToScreenPosition(e)}spaceToScreenRadius(e){return this.zoomInstance.convertSpaceToScreenRadius(e)}getNodeRadiusByIndex(e){return this.points.getNodeRadiusByIndex(e)}getNodeRadiusById(e){const t=this.graph.getInputIndexById(e);if(t!==void 0)return this.points.getNodeRadiusByIndex(t)}trackNodePositionsByIds(e){this.points.trackNodesByIds(e)}trackNodePositionsByIndices(e){this.points.trackNodesByIds(e.map(t=>this.graph.getNodeByIndex(t)).filter(t=>t!==void 0).map(t=>t.id))}getTrackedNodePositionsMap(){return this.points.getTrackedPositions()}getSampledNodePositionsMap(){return this.points.getSampledNodePositionsMap()}start(e=1){var t,r;this.graph.nodes.length&&(this.store.isSimulationRunning=!0,this.store.alpha=e,this.store.simulationProgress=0,(r=(t=this.config.simulation).onStart)===null||r===void 0||r.call(t),this.stopFrames(),this.frame())}pause(){var e,t;this.store.isSimulationRunning=!1,(t=(e=this.config.simulation).onPause)===null||t===void 0||t.call(e)}restart(){var e,t;this.store.isSimulationRunning=!0,(t=(e=this.config.simulation).onRestart)===null||t===void 0||t.call(e)}step(){this.store.isSimulationRunning=!1,this.stopFrames(),this.frame()}destroy(){var e,t;window.clearTimeout(this._fitViewOnInitTimeoutID),this.stopFrames(),this.destroyParticleSystem(),(e=this.fpsMonitor)===null||e===void 0||e.destroy(),(t=document.getElementById("gl-bench-style"))===null||t===void 0||t.remove()}create(){var e,t,r,n;this.points.create(),this.lines.create(),(e=this.forceManyBody)===null||e===void 0||e.create(),(t=this.forceLinkIncoming)===null||t===void 0||t.create(Os.INCOMING),(r=this.forceLinkOutgoing)===null||r===void 0||r.create(Os.OUTGOING),(n=this.forceCenter)===null||n===void 0||n.create(),this.hasParticleSystemDestroyed=!1}destroyParticleSystem(){var e,t,r,n;this.hasParticleSystemDestroyed||(this.points.destroy(),this.lines.destroy(),(e=this.forceCenter)===null||e===void 0||e.destroy(),(t=this.forceLinkIncoming)===null||t===void 0||t.destroy(),(r=this.forceLinkOutgoing)===null||r===void 0||r.destroy(),(n=this.forceManyBody)===null||n===void 0||n.destroy(),this.reglInstance.destroy(),this.hasParticleSystemDestroyed=!0)}update(e){const{graph:t}=this;this.store.pointsTextureSize=Math.ceil(Math.sqrt(t.nodes.length)),this.store.linksTextureSize=Math.ceil(Math.sqrt(t.linksNumber*2)),this.destroyParticleSystem(),this.create(),this.initPrograms(),this.setFocusedNodeById(),this.store.hoveredNode=void 0,e?this.start():this.step()}initPrograms(){var e,t,r,n,a,o;this.points.initPrograms(),this.lines.initPrograms(),(e=this.forceGravity)===null||e===void 0||e.initPrograms(),(t=this.forceLinkIncoming)===null||t===void 0||t.initPrograms(),(r=this.forceLinkOutgoing)===null||r===void 0||r.initPrograms(),(n=this.forceMouse)===null||n===void 0||n.initPrograms(),(a=this.forceManyBody)===null||a===void 0||a.initPrograms(),(o=this.forceCenter)===null||o===void 0||o.initPrograms()}frame(){const{config:{simulation:e,renderLinks:t,disableSimulation:r},store:{alpha:n,isSimulationRunning:a}}=this;n{var s,l,d,c,u,f,m,p,y,x,E,k,I;(s=this.fpsMonitor)===null||s===void 0||s.begin(),this.resizeCanvas(),this.findHoveredPoint(),r||(this.isRightClickMouse&&(a||this.start(.1),(l=this.forceMouse)===null||l===void 0||l.run(),this.points.updatePosition()),a&&!this.zoomInstance.isRunning&&(e.gravity&&((d=this.forceGravity)===null||d===void 0||d.run(),this.points.updatePosition()),e.center&&((c=this.forceCenter)===null||c===void 0||c.run(),this.points.updatePosition()),(u=this.forceManyBody)===null||u===void 0||u.run(),this.points.updatePosition(),this.store.linksTextureSize&&((f=this.forceLinkIncoming)===null||f===void 0||f.run(),this.points.updatePosition(),(m=this.forceLinkOutgoing)===null||m===void 0||m.run(),this.points.updatePosition()),this.store.alpha+=this.store.addAlpha((p=this.config.simulation.decay)!==null&&p!==void 0?p:Rt.simulation.decay),this.isRightClickMouse&&(this.store.alpha=Math.max(this.store.alpha,.1)),this.store.simulationProgress=Math.sqrt(Math.min(1,lu/this.store.alpha)),(x=(y=this.config.simulation).onTick)===null||x===void 0||x.call(y,this.store.alpha,(E=this.store.hoveredNode)===null||E===void 0?void 0:E.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(k=this.store.hoveredNode)===null||k===void 0?void 0:k.position)),this.points.trackPoints()),this.reglInstance.clear({color:this.store.backgroundColor,depth:1,stencil:0}),t&&this.store.linksTextureSize&&this.lines.draw(),this.points.draw(),(I=this.fpsMonitor)===null||I===void 0||I.end(o),this.currentEvent=void 0,this.frame()}))}stopFrames(){this.requestAnimationFrameId&&window.cancelAnimationFrame(this.requestAnimationFrameId)}end(){var e,t;this.store.isSimulationRunning=!1,this.store.simulationProgress=1,(t=(e=this.config.simulation).onEnd)===null||t===void 0||t.call(e)}onClick(e){var t,r,n,a;(r=(t=this.config.events).onClick)===null||r===void 0||r.call(t,(n=this.store.hoveredNode)===null||n===void 0?void 0:n.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(a=this.store.hoveredNode)===null||a===void 0?void 0:a.position,e)}updateMousePosition(e){if(!e||e.offsetX===void 0||e.offsetY===void 0)return;const{x:t,y:r,k:n}=this.zoomInstance.eventTransform,a=this.canvas.clientHeight,o=e.offsetX,s=e.offsetY,l=(o-t)/n,d=(s-r)/n;this.store.mousePosition=[l,a-d],this.store.mousePosition[0]-=(this.store.screenSize[0]-this.store.adjustedSpaceSize)/2,this.store.mousePosition[1]-=(this.store.screenSize[1]-this.store.adjustedSpaceSize)/2,this.store.screenMousePosition=[o,this.store.screenSize[1]-s]}onMouseMove(e){var t,r,n,a;this.currentEvent=e,this.updateMousePosition(e),this.isRightClickMouse=e.which===3,(r=(t=this.config.events).onMouseMove)===null||r===void 0||r.call(t,(n=this.store.hoveredNode)===null||n===void 0?void 0:n.node,this.store.hoveredNode?this.graph.getInputIndexBySortedIndex(this.store.hoveredNode.index):void 0,(a=this.store.hoveredNode)===null||a===void 0?void 0:a.position,this.currentEvent)}onRightClickMouse(e){e.preventDefault()}resizeCanvas(e=!1){const t=this.canvas.width,r=this.canvas.height,n=this.canvas.clientWidth,a=this.canvas.clientHeight;(e||t!==n*this.config.pixelRatio||r!==a*this.config.pixelRatio)&&(this.store.updateScreenSize(n,a),this.canvas.width=n*this.config.pixelRatio,this.canvas.height=a*this.config.pixelRatio,this.reglInstance.poll(),this.canvasD3Selection.call(this.zoomInstance.behavior.transform,this.zoomInstance.eventTransform),this.points.updateSampledNodesGrid())}setZoomTransformByNodePositions(e,t=250,r,n){this.resizeCanvas();const a=this.zoomInstance.getTransform(e,r,n);this.canvasD3Selection.transition().ease(fw).duration(t).call(this.zoomInstance.behavior.transform,a)}zoomToNode(e,t,r,n){const{graph:a,store:{screenSize:o}}=this,s=qn(this.reglInstance,this.points.currentPositionFbo),l=a.getSortedIndexById(e.id);if(l===void 0)return;const d=s[l*4+0],c=s[l*4+1];if(d===void 0||c===void 0)return;const u=this.zoomInstance.getDistanceToPoint([d,c]),f=n?r:Math.max(this.getZoomLevel(),r);if(u{if(cs)return;cs=document.createElement("style"),cs.innerHTML=` + :root { + --css-label-background-color: #1e2428; + --css-label-brightness: brightness(150%); + } + + .${cu} { + position: absolute; + top: 0; + left: 0; + + font-weight: 500; + cursor: pointer; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + filter: var(--css-label-brightness); + pointer-events: none; + background-color: var(--css-label-background-color); + font-weight: 700; + border-radius: 6px; + + transition: opacity 600ms; + opacity: 1; + } + + .${T0} { + opacity: 0 !important; + } +`;const i=document.head.getElementsByTagName("style")[0];i?document.head.insertBefore(cs,i):document.head.appendChild(cs)};class I0{constructor(e,t){this.element=document.createElement("div"),this.fontWidthHeightRatio=.6,this._x=0,this._y=0,this._estimatedWidth=0,this._estimatedHeight=0,this._visible=!1,this._prevVisible=!1,this._weight=0,this._customFontSize=Ol,this._customColor=void 0,this._customOpacity=void 0,this._shouldBeShown=!1,this._text="",this._customPadding={left:ro,top:io,right:ro,bottom:io},nE(),this._container=e,this._updateClasses(),t&&this.setText(t),this.resetFontSize(),this.resetPadding()}setText(e){this._text!==e&&(this._text=e,this.element.innerHTML=e,this._measureText())}setPosition(e,t){this._x=e,this._y=t}setStyle(e){if(this._customStyle!==e&&(this._customStyle=e,this.element.style.cssText=this._customStyle,this._customColor&&(this.element.style.color=this._customColor),this._customOpacity&&(this.element.style.opacity=String(this._customOpacity)),this._customPointerEvents&&(this.element.style.pointerEvents=this._customPointerEvents),this._customFontSize&&(this.element.style.fontSize=`${this._customFontSize}px`),this._customPadding)){const{top:t,right:r,bottom:n,left:a}=this._customPadding;this.element.style.padding=`${t}px ${r}px ${n}px ${a}px`}}setClassName(e){this._customClassName!==e&&(this._customClassName=e,this._updateClasses())}setFontSize(e=Ol){this._customFontSize!==e&&(this.element.style.fontSize=`${e}px`,this._customFontSize=e,this._measureText())}resetFontSize(){this.element.style.fontSize=`${Ol}px`,this._customFontSize=Ol,this._measureText()}setColor(e){this._customColor!==e&&(this.element.style.color=e,this._customColor=e)}resetColor(){this.element.style.removeProperty("color"),this._customColor=void 0}setOpacity(e){this._customOpacity!==e&&(this.element.style.opacity=String(e),this._customOpacity=e)}resetOpacity(){this.element.style.removeProperty("opacity"),this._customOpacity=void 0}setPointerEvents(e){this._customPointerEvents!==e&&(this.element.style.pointerEvents=`${e}`,this._customPointerEvents=e)}resetPointerEvents(){this.element.style.removeProperty("pointer-events"),this._customPointerEvents=void 0}setPadding(e={left:ro,top:io,right:ro,bottom:io}){(this._customPadding.left!==e.left||this._customPadding.top!==e.top||this._customPadding.right!==e.right||this._customPadding.bottom!==e.bottom)&&(this._customPadding=e,this.element.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`,this._measureText())}resetPadding(){const e={left:ro,top:io,right:ro,bottom:io};this.element.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`,this._customPadding=e,this._measureText()}setForceShow(e){this._shouldBeShown=e}getForceShow(){return this._shouldBeShown}draw(){const e=this.getVisibility();e!==this._prevVisible&&(this._prevVisible===!1?this._container.appendChild(this.element):this._container.removeChild(this.element),this._updateClasses(),this._prevVisible=e),e&&(this.element.style.transform=` + translate(-50%, -100%) + translate3d(${this._x}px, ${this._y}px, 0) + `)}overlaps(e){return rE({height:this._estimatedHeight,width:this._estimatedWidth,x:this._x,y:this._y},{height:e._estimatedHeight,width:e._estimatedWidth,x:e._x,y:e._y})}setVisibility(e=!0){this._visible=e}getVisibility(){return this._visible}isOnScreen(){return this._x>0&&this._y>0&&this._x{this.element.className=`${cu} ${this._customClassName||""}`}):this.element.className=`${cu} ${this._customClassName||""} ${T0}`}_measureText(){const{left:e,top:t,right:r,bottom:n}=this._customPadding;this._estimatedWidth=this._customFontSize*this.fontWidthHeightRatio*this.element.innerHTML.length+e+r,this._estimatedHeight=this._customFontSize+t+n}}const Wl="css-label--labels-container",A0="css-label--labels-container-hidden";let us;const aE=()=>{if(us)return;us=document.createElement("style"),us.innerHTML=` + .${Wl} { + transition: opacity 100ms; + position: absolute; + width: 100%; + height: 100%; + overflow: hidden; + top: 0%; + pointer-events: none; + opacity: 1; + } + .${A0} { + opacity: 0; + + div { + pointer-events: none; + } + } +`;const i=document.head.getElementsByTagName("style")[0];i?document.head.insertBefore(us,i):document.head.appendChild(us)};class oE{constructor(e,t){this._cssLabels=new Map,this._elementToData=new Map,aE(),this._container=e,e.addEventListener("click",this._onClick.bind(this)),this._container.className=Wl,t!=null&&t.onLabelClick&&(this._onClickCallback=t.onLabelClick),t!=null&&t.padding&&(this._padding=t.padding),t!=null&&t.pointerEvents&&(this._pointerEvents=t.pointerEvents),t!=null&&t.dispatchWheelEventElement&&(this._dispatchWheelEventElement=t.dispatchWheelEventElement,this._container.addEventListener("wheel",this._onWheel.bind(this)))}setLabels(e){const t=new Map(this._cssLabels);e.forEach(r=>{const{x:n,y:a,fontSize:o,color:s,text:l,weight:d,opacity:c,shouldBeShown:u,style:f,className:m}=r;if(t.get(r.id))t.delete(r.id);else{const x=new I0(this._container,r.text);this._cssLabels.set(r.id,x),this._elementToData.set(x.element,r)}const y=this._cssLabels.get(r.id);y&&(y.setText(l),y.setPosition(n,a),f!==void 0&&y.setStyle(f),d!==void 0&&y.setWeight(d),o!==void 0&&y.setFontSize(o),s!==void 0&&y.setColor(s),this._padding!==void 0&&y.setPadding(this._padding),this._pointerEvents!==void 0&&y.setPointerEvents(this._pointerEvents),c!==void 0&&y.setOpacity(c),u!==void 0&&y.setForceShow(u),m!==void 0&&y.setClassName(m))});for(const[r]of t){const n=this._cssLabels.get(r);n&&(this._elementToData.delete(n.element),n.destroy()),this._cssLabels.delete(r)}}draw(e=!0){e&&this._intersectLabels(),this._cssLabels.forEach(t=>t.draw())}show(){this._container.className=Wl}hide(){this._container.className=`${Wl} ${A0}`}destroy(){this._container.removeEventListener("click",this._onClick.bind(this)),this._container.removeEventListener("wheel",this._onWheel.bind(this)),this._cssLabels.forEach(e=>e.destroy())}_onClick(e){var t;const r=this._elementToData.get(e.target);r&&((t=this._onClickCallback)===null||t===void 0||t.call(this,e,r))}_onWheel(e){var t;e.preventDefault();const r=new WheelEvent("wheel",e);(t=this._dispatchWheelEventElement)===null||t===void 0||t.dispatchEvent(r)}_intersectLabels(){const e=Array.from(this._cssLabels.values());e.forEach(t=>t.setVisibility(t.isOnScreen()));for(let t=0;tr.getWeight()?r.setVisibility(a.getForceShow()?!1:r.getForceShow()):a.setVisibility(r.getForceShow()?!1:a.getForceShow());continue}}}}}var Ia=[],sE=function(){return Ia.some(function(i){return i.activeTargets.length>0})},lE=function(){return Ia.some(function(i){return i.skippedTargets.length>0})},Bm="ResizeObserver loop completed with undelivered notifications.",dE=function(){var i;typeof ErrorEvent=="function"?i=new ErrorEvent("error",{message:Bm}):(i=document.createEvent("Event"),i.initEvent("error",!1,!1),i.message=Bm),window.dispatchEvent(i)},Rs;(function(i){i.BORDER_BOX="border-box",i.CONTENT_BOX="content-box",i.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Rs||(Rs={}));var Aa=function(i){return Object.freeze(i)},cE=function(){function i(e,t){this.inlineSize=e,this.blockSize=t,Aa(this)}return i}(),C0=function(){function i(e,t,r,n){return this.x=e,this.y=t,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Aa(this)}return i.prototype.toJSON=function(){var e=this,t=e.x,r=e.y,n=e.top,a=e.right,o=e.bottom,s=e.left,l=e.width,d=e.height;return{x:t,y:r,top:n,right:a,bottom:o,left:s,width:l,height:d}},i.fromRect=function(e){return new i(e.x,e.y,e.width,e.height)},i}(),ju=function(i){return i instanceof SVGElement&&"getBBox"in i},k0=function(i){if(ju(i)){var e=i.getBBox(),t=e.width,r=e.height;return!t&&!r}var n=i,a=n.offsetWidth,o=n.offsetHeight;return!(a||o||i.getClientRects().length)},Um=function(i){var e;if(i instanceof Element)return!0;var t=(e=i==null?void 0:i.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(t&&i instanceof t.Element)},uE=function(i){switch(i.tagName){case"INPUT":if(i.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ws=typeof window!="undefined"?window:{},Rl=new WeakMap,Gm=/auto|scroll/,fE=/^tb|vertical/,hE=/msie|trident/i.test(ws.navigator&&ws.navigator.userAgent),on=function(i){return parseFloat(i||"0")},wo=function(i,e,t){return i===void 0&&(i=0),e===void 0&&(e=0),t===void 0&&(t=!1),new cE((t?e:i)||0,(t?i:e)||0)},jm=Aa({devicePixelContentBoxSize:wo(),borderBoxSize:wo(),contentBoxSize:wo(),contentRect:new C0(0,0,0,0)}),$0=function(i,e){if(e===void 0&&(e=!1),Rl.has(i)&&!e)return Rl.get(i);if(k0(i))return Rl.set(i,jm),jm;var t=getComputedStyle(i),r=ju(i)&&i.ownerSVGElement&&i.getBBox(),n=!hE&&t.boxSizing==="border-box",a=fE.test(t.writingMode||""),o=!r&&Gm.test(t.overflowY||""),s=!r&&Gm.test(t.overflowX||""),l=r?0:on(t.paddingTop),d=r?0:on(t.paddingRight),c=r?0:on(t.paddingBottom),u=r?0:on(t.paddingLeft),f=r?0:on(t.borderTopWidth),m=r?0:on(t.borderRightWidth),p=r?0:on(t.borderBottomWidth),y=r?0:on(t.borderLeftWidth),x=u+d,E=l+c,k=y+m,I=f+p,v=s?i.offsetHeight-I-i.clientHeight:0,M=o?i.offsetWidth-k-i.clientWidth:0,K=n?x+k:0,L=n?E+I:0,R=r?r.width:on(t.width)-K-M,W=r?r.height:on(t.height)-L-v,Oe=R+x+M+k,me=W+E+v+I,de=Aa({devicePixelContentBoxSize:wo(Math.round(R*devicePixelRatio),Math.round(W*devicePixelRatio),a),borderBoxSize:wo(Oe,me,a),contentBoxSize:wo(R,W,a),contentRect:new C0(u,l,R,W)});return Rl.set(i,de),de},L0=function(i,e,t){var r=$0(i,t),n=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case Rs.DEVICE_PIXEL_CONTENT_BOX:return o;case Rs.BORDER_BOX:return n;default:return a}},mE=function(){function i(e){var t=$0(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Aa([t.borderBoxSize]),this.contentBoxSize=Aa([t.contentBoxSize]),this.devicePixelContentBoxSize=Aa([t.devicePixelContentBoxSize])}return i}(),O0=function(i){if(k0(i))return 1/0;for(var e=0,t=i.parentNode;t;)e+=1,t=t.parentNode;return e},pE=function(){var i=1/0,e=[];Ia.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(d){var c=new mE(d.target),u=O0(d.target);s.push(c),d.lastReportedSize=L0(d.target,d.observedBox),ui?t.activeTargets.push(n):t.skippedTargets.push(n))})})},gE=function(){var i=0;for(Vm(i);sE();)i=pE(),Vm(i);return lE()&&dE(),i>0},Rc,R0=[],vE=function(){return R0.splice(0).forEach(function(i){return i()})},bE=function(i){if(!Rc){var e=0,t=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return vE()}).observe(t,r),Rc=function(){t.textContent="".concat(e?e--:e++)}}R0.push(i),Rc()},_E=function(i){bE(function(){requestAnimationFrame(i)})},Xl=0,yE=function(){return!!Xl},xE=250,wE={attributes:!0,characterData:!0,childList:!0,subtree:!0},Hm=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],qm=function(i){return i===void 0&&(i=0),Date.now()+i},Fc=!1,SE=function(){function i(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return i.prototype.run=function(e){var t=this;if(e===void 0&&(e=xE),!Fc){Fc=!0;var r=qm(e);_E(function(){var n=!1;try{n=gE()}finally{if(Fc=!1,e=r-qm(),!yE())return;n?t.run(1e3):e>0?t.run(e):t.start()}})}},i.prototype.schedule=function(){this.stop(),this.run()},i.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,wE)};document.body?t():ws.addEventListener("DOMContentLoaded",t)},i.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Hm.forEach(function(t){return ws.addEventListener(t,e.listener,!0)}))},i.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Hm.forEach(function(t){return ws.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},i}(),uu=new SE,Wm=function(i){!Xl&&i>0&&uu.start(),Xl+=i,!Xl&&uu.stop()},EE=function(i){return!ju(i)&&!uE(i)&&getComputedStyle(i).display==="inline"},TE=function(){function i(e,t){this.target=e,this.observedBox=t||Rs.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return i.prototype.isActive=function(){var e=L0(this.target,this.observedBox,!0);return EE(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},i}(),IE=function(){function i(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return i}(),Fl=new WeakMap,Xm=function(i,e){for(var t=0;t=0&&(a&&Ia.splice(Ia.indexOf(r),1),r.observationTargets.splice(n,1),Wm(-1))},i.disconnect=function(e){var t=this,r=Fl.get(e);r.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),r.activeTargets.splice(0,r.activeTargets.length)},i}(),AE=function(){function i(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Nl.connect(this,e)}return i.prototype.observe=function(e,t){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Um(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Nl.observe(this,e,t)},i.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Um(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Nl.unobserve(this,e)},i.prototype.disconnect=function(){Nl.disconnect(this)},i.toString=function(){return"function ResizeObserver () { [polyfill code] }"},i}();kn(".%L");kn(":%S");kn("%I:%M");kn("%I %p");kn("%a %d");kn("%b %d");kn("%b");kn("%Y");const CE=i=>typeof i=="function",kE=i=>Array.isArray(i),$E=i=>i instanceof Object,cd=i=>i.constructor.name!=="Function"&&i.constructor.name!=="Object",Ym=i=>$E(i)&&!kE(i)&&!CE(i)&&!cd(i),ud=(i,e=new Map)=>{if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i.getTime());if(i instanceof Array){const t=[];e.set(i,t);for(const r of i)t.push(e.has(r)?e.get(r):ud(r,e));return i}if(cd(i))return i;if(i instanceof Object){const t={};e.set(i,t);const r=i;return Object.keys(i).reduce((n,a)=>(n[a]=e.has(r[a])?e.get(r[a]):ud(r[a],e),n),t),t}return i},La=(i,e,t=new Map)=>{const r=cd(i)?i:ud(i);return i===e?i:t.has(e)?t.get(e):(t.set(e,r),Object.keys(e).forEach(n=>{Ym(i[n])&&Ym(e[n])?r[n]=La(i[n],e[n],t):cd(e)?r[n]=e:r[n]=ud(e[n])}),r)};var Zm=[],fs=[];function zs(i,e){if(i&&typeof document!="undefined"){var t,r=e.prepend===!0?"prepend":"append",n=e.singleTag===!0,a=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var o=Zm.indexOf(a);o===-1&&(o=Zm.push(a)-1,fs[o]={}),t=fs[o]&&fs[o][r]?fs[o][r]:fs[o][r]=s()}else t=s();i.charCodeAt(0)===65279&&(i=i.substring(1)),t.styleSheet?t.styleSheet.cssText+=i:t.appendChild(document.createTextNode(i))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var d=Object.keys(e.attributes),c=0;ci.id}],matchPalette:["#fbb4ae80","#b3cde380","#ccebc580","#decbe480","#fed9a680","#ffffcc80","#e5d8bd80","#fddaec80"],ordering:void 0,events:{onSelect:void 0,onSearch:void 0,onEnter:void 0,onAccessorSelect:void 0}};var cn;(function(i){i.Input="input",i.Select="select",i.Enter="enter",i.AccessorSelect="accessorSelect"})(cn||(cn={}));function xi(){}function xt(i,e){for(const t in e)i[t]=e[t];return i}function F0(i){return i()}function Km(){return Object.create(null)}function Hi(i){i.forEach(F0)}function Li(i){return typeof i=="function"}function Zi(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}function RE(i){return Object.keys(i).length===0}function FE(i,...e){if(i==null)return xi;const t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function N0(i,e,t){i.$$.on_destroy.push(FE(e,t))}function ci(i,e,t,r){if(i){const n=P0(i,e,t,r);return i[0](n)}}function P0(i,e,t,r){return i[1]&&r?xt(t.ctx.slice(),i[1](r(e))):t.ctx}function ui(i,e,t,r){if(i[2]&&r){const n=i[2](r(t));if(e.dirty===void 0)return n;if(typeof n=="object"){const a=[],o=Math.max(e.dirty.length,n.length);for(let s=0;s32){const e=[],t=i.ctx.length/32;for(let r=0;ri.removeEventListener(e,t,r)}function si(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}const ME=["width","height"];function Oi(i,e){const t=Object.getOwnPropertyDescriptors(i.__proto__);for(const r in e)e[r]==null?i.removeAttribute(r):r==="style"?i.style.cssText=e[r]:r==="__value"?i.value=i[r]=e[r]:t[r]&&t[r].set&&ME.indexOf(r)===-1?i[r]=e[r]:si(i,r,e[r])}function Jm(i,e){for(const t in e)si(i,t,e[t])}function zE(i,e){Object.keys(e).forEach(t=>{BE(i,t,e[t])})}function BE(i,e,t){e in i?i[e]=typeof i[e]=="boolean"&&t===""||t:si(i,e,t)}function fd(i){return/-/.test(i)?zE:Oi}function UE(i){return Array.from(i.childNodes)}function Na(i,e){e=""+e,i.data!==e&&(i.data=e)}function Qm(i,e){i.value=e==null?"":e}function Kn(i,e,t,r){t==null?i.style.removeProperty(e):i.style.setProperty(e,t,r?"important":"")}function Zn(i,e,t){i.classList[t?"add":"remove"](e)}function GE(i,e,{bubbles:t=!1,cancelable:r=!1}={}){const n=document.createEvent("CustomEvent");return n.initCustomEvent(i,t,r,e),n}function No(i,e){return new i(e)}let Fs;function Es(i){Fs=i}function nr(){if(!Fs)throw new Error("Function called outside component initialization");return Fs}function Ur(i){nr().$$.on_mount.push(i)}function Pa(i){nr().$$.on_destroy.push(i)}function jE(){const i=nr();return(e,t,{cancelable:r=!1}={})=>{const n=i.$$.callbacks[e];if(n){const a=GE(e,t,{cancelable:r});return n.slice().forEach(o=>{o.call(i,a)}),!a.defaultPrevented}return!0}}function Tr(i,e){return nr().$$.context.set(i,e),e}function Ir(i){return nr().$$.context.get(i)}function hd(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(r=>r.call(this,e))}const go=[],Ft=[];let So=[];const hu=[],D0=Promise.resolve();let mu=!1;function M0(){mu||(mu=!0,D0.then(z0))}function VE(){return M0(),D0}function pu(i){So.push(i)}function Zr(i){hu.push(i)}const Nc=new Set;let no=0;function z0(){if(no!==0)return;const i=Fs;do{try{for(;noi.indexOf(r)===-1?e.push(r):t.push(r)),t.forEach(r=>r()),So=e}const Yl=new Set;let Ea;function ir(){Ea={r:0,c:[],p:Ea}}function rr(){Ea.r||Hi(Ea.c),Ea=Ea.p}function $e(i,e){i&&i.i&&(Yl.delete(i),i.i(e))}function Be(i,e,t,r){if(i&&i.o){if(Yl.has(i))return;Yl.add(i),Ea.c.push(()=>{Yl.delete(i),r&&(t&&i.d(1),r())}),i.o(e)}else r&&r()}function WE(i,e){i.d(1),e.delete(i.key)}function XE(i,e){Be(i,1,1,()=>{e.delete(i.key)})}function B0(i,e,t,r,n,a,o,s,l,d,c,u){let f=i.length,m=a.length,p=f;const y={};for(;p--;)y[i[p].key]=p;const x=[],E=new Map,k=new Map,I=[];for(p=m;p--;){const L=u(n,a,p),R=t(L);let W=o.get(R);W?r&&I.push(()=>W.p(L,e)):(W=d(R,L),W.c()),E.set(R,x[p]=W),R in y&&k.set(R,Math.abs(p-y[R]))}const v=new Set,M=new Set;function K(L){$e(L,1),L.m(s,c),o.set(L.key,L),c=L.first,m--}for(;f&&m;){const L=x[m-1],R=i[f-1],W=L.key,Oe=R.key;L===R?(c=L.first,f--,m--):E.has(Oe)?!o.has(W)||v.has(W)?K(L):M.has(Oe)?f--:k.get(W)>k.get(Oe)?(M.add(W),K(L)):(v.add(Oe),f--):(l(R,o),f--)}for(;f--;){const L=i[f];E.has(L.key)||l(L,o)}for(;m;)K(x[m-1]);return Hi(I),x}function wi(i,e){const t={},r={},n={$$scope:1};let a=i.length;for(;a--;){const o=i[a],s=e[a];if(s){for(const l in o)l in s||(r[l]=1);for(const l in s)n[l]||(t[l]=s[l],n[l]=1);i[a]=s}else for(const l in o)n[l]=1}for(const o in r)o in t||(t[o]=void 0);return t}function tr(i){return typeof i=="object"&&i!==null?i:{}}function Kr(i,e,t){const r=i.$$.props[e];r!==void 0&&(i.$$.bound[r]=t,t(i.$$.ctx[r]))}function Jt(i){i&&i.c()}function Yt(i,e,t,r){const{fragment:n,after_update:a}=i.$$;n&&n.m(e,t),r||pu(()=>{const o=i.$$.on_mount.map(F0).filter(Li);i.$$.on_destroy?i.$$.on_destroy.push(...o):Hi(o),i.$$.on_mount=[]}),a.forEach(pu)}function Zt(i,e){const t=i.$$;t.fragment!==null&&(qE(t.after_update),Hi(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function fr(i,e,t,r,n,a,o,s=[-1]){const l=Fs;Es(i);const d=i.$$={fragment:null,ctx:[],props:a,update:xi,not_equal:n,bound:Km(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Km(),dirty:s,skip_bound:!1,root:e.target||l.$$.root};o&&o(d.root);let c=!1;if(d.ctx=t?t(i,e.props||{},(u,f,...m)=>{const p=m.length?m[0]:f;return d.ctx&&n(d.ctx[u],d.ctx[u]=p)&&(!d.skip_bound&&d.bound[u]&&d.bound[u](p),c&&function(y,x){y.$$.dirty[0]===-1&&(go.push(y),M0(),y.$$.dirty.fill(0)),y.$$.dirty[x/31|0]|=1<{const n=r.indexOf(t);n!==-1&&r.splice(n,1)}}$set(e){this.$$set&&!RE(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ep(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */function YE(i,e){if(i.closest)return i.closest(e);for(var t=i;t;){if(U0(t,e))return t;t=t.parentElement}return null}function U0(i,e){return(i.matches||i.webkitMatchesSelector||i.msMatchesSelector).call(i,e)}function ZE(i){var e=i;if(e.offsetParent!==null)return e.scrollWidth;var t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);var r=t.scrollWidth;return document.documentElement.removeChild(t),r}const Vu=Object.freeze(Object.defineProperty({__proto__:null,closest:YE,estimateScrollWidth:ZE,matches:U0},Symbol.toStringTag,{value:"Module"}));function Kt(i){return Object.entries(i).filter(([e,t])=>e!==""&&t).map(([e])=>e).join(" ")}function $i(i,e,t,r={bubbles:!0},n=!1){if(typeof Event=="undefined")throw new Error("Event not defined.");if(!i)throw new Error("Tried to dipatch event without element.");const a=new CustomEvent(e,Object.assign(Object.assign({},r),{detail:t}));if(i==null||i.dispatchEvent(a),n&&e.startsWith("SMUI")){const o=new CustomEvent(e.replace(/^SMUI/g,()=>"MDC"),Object.assign(Object.assign({},r),{detail:t}));i==null||i.dispatchEvent(o),o.defaultPrevented&&a.preventDefault()}return a}const tp=/^[a-z]+(?::(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/,KE=/^[^$]+(?:\$(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/;function $r(i){let e,t=[];function r(n){const a=i.$$.callbacks[n.type];a&&a.slice().forEach(o=>o.call(this,n))}return i.$on=(n,a)=>{let o=n,s=()=>{};return e?s=e(o,a):t.push([o,a]),o.match(tp)&&console&&console.warn('Event modifiers in SMUI now use "$" instead of ":", so that all events can be bound with modifiers. Please update your event binding: ',o),()=>{s()}},n=>{const a=[],o={};e=(s,l)=>{let d=s,c=l,u=!1;const f=d.match(tp),m=d.match(KE),p=f||m;if(d.match(/^SMUI:\w+:/)){const k=d.split(":");let I="";for(let v=0;vM.slice(0,1).toUpperCase()+M.slice(1)).join("");console.warn(`The event ${d.split("$")[0]} has been renamed to ${I.split("$")[0]}.`),d=I}if(p){const k=d.split(f?":":"$");d=k[0];const I=k.slice(1).reduce((v,M)=>(v[M]=!0,v),{});I.passive&&(u=u||{},u.passive=!0),I.nonpassive&&(u=u||{},u.passive=!1),I.capture&&(u=u||{},u.capture=!0),I.once&&(u=u||{},u.once=!0),I.preventDefault&&(y=c,c=function(v){return v.preventDefault(),y.call(this,v)}),I.stopPropagation&&(c=function(v){return function(M){return M.stopPropagation(),v.call(this,M)}}(c)),I.stopImmediatePropagation&&(c=function(v){return function(M){return M.stopImmediatePropagation(),v.call(this,M)}}(c)),I.self&&(c=function(v,M){return function(K){if(K.target===v)return M.call(this,K)}}(n,c)),I.trusted&&(c=function(v){return function(M){if(M.isTrusted)return v.call(this,M)}}(c))}var y;const x=ip(n,d,c,u),E=()=>{x();const k=a.indexOf(E);k>-1&&a.splice(k,1)};return a.push(E),d in o||(o[d]=ip(n,d,r)),E};for(let s=0;s{for(let s=0;si.removeEventListener(e,t,r)}function Lr(i,e){let t=[];if(e)for(let r=0;r1?t.push(a(i,n[1])):t.push(a(i))}return{update(r){if((r&&r.length||0)!=t.length)throw new Error("You must not change the length of an actions array.");if(r)for(let n=0;n1?a.update(o[1]):a.update()}}},destroy(){for(let r=0;r{o[c]=null}),rr(),t=o[e],t?t.p(l,d):(t=o[e]=a[e](l),t.c()),$e(t,1),t.m(r.parentNode,r))},i(l){n||($e(t),n=!0)},o(l){Be(t),n=!1},d(l){o[e].d(l),l&&mt(r)}}}function iT(i,e,t){let r;const n=["use","tag","getElement"];let a=li(e,n),{$$slots:o={},$$scope:s}=e,{use:l=[]}=e,{tag:d}=e;const c=$r(nr());let u;return i.$$set=f=>{e=xt(xt({},e),kr(f)),t(5,a=li(e,n)),"use"in f&&t(0,l=f.use),"tag"in f&&t(1,d=f.tag),"$$scope"in f&&t(7,s=f.$$scope)},i.$$.update=()=>{2&i.$$.dirty&&t(3,r=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].indexOf(d)>-1)},[l,d,u,r,c,a,function(){return u},s,o,function(f){Ft[f?"unshift":"push"](()=>{u=f,t(2,u)})},function(f){Ft[f?"unshift":"push"](()=>{u=f,t(2,u)})},function(f){Ft[f?"unshift":"push"](()=>{u=f,t(2,u)})}]}let Po=class extends hr{constructor(e){super(),fr(this,e,iT,tT,Zi,{use:0,tag:1,getElement:6})}get getElement(){return this.$$.ctx[6]}};var gu=function(i,e){return gu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},gu(i,e)};function $n(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}gu(i,e),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Vi=function(){return Vi=Object.assign||function(i){for(var e,t=1,r=arguments.length;t=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function rp(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var r,n,a=t.call(i),o=[];try{for(;(e===void 0||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(s){n={error:s}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return o}function rT(i,e,t){if(t||arguments.length===2)for(var r,n=0,a=e.length;nc&&!u(p[x].index)){E=x;break}return E!==-1?(f.sortedIndexCursor=E,p[f.sortedIndexCursor].index):-1}(a,o,l,e):function(d,c,u){var f=u.typeaheadBuffer[0],m=d.get(f);if(!m)return-1;var p=m[u.sortedIndexCursor];if(p.text.lastIndexOf(u.typeaheadBuffer,0)===0&&!c(p.index))return p.index;for(var y=(u.sortedIndexCursor+1)%m.length,x=-1;y!==u.sortedIndexCursor;){var E=m[y],k=E.text.lastIndexOf(u.typeaheadBuffer,0)===0,I=!c(E.index);if(k&&I){x=y;break}y=(y+1)%m.length}return x!==-1?(u.sortedIndexCursor=x,m[u.sortedIndexCursor].index):-1}(a,l,e),t===-1||s||n(t),t}function G0(i){return i.typeaheadBuffer.length>0}function j0(i){i.typeaheadBuffer=""}function np(i,e){var t=i.event,r=i.isTargetListItem,n=i.focusedItemIndex,a=i.focusItemAtIndex,o=i.sortedIndexByFirstChar,s=i.isItemAtIndexDisabled,l=gr(t)==="ArrowLeft",d=gr(t)==="ArrowUp",c=gr(t)==="ArrowRight",u=gr(t)==="ArrowDown",f=gr(t)==="Home",m=gr(t)==="End",p=gr(t)==="Enter",y=gr(t)==="Spacebar";return t.altKey||t.ctrlKey||t.metaKey||l||d||c||u||f||m||p?-1:y||t.key.length!==1?y?(r&&Br(t),r&&G0(e)?vu({focusItemAtIndex:a,focusedItemIndex:n,nextChar:" ",sortedIndexByFirstChar:o,skipFocus:!1,isItemAtIndexDisabled:s},e):-1):-1:(Br(t),vu({focusItemAtIndex:a,focusedItemIndex:n,nextChar:t.key.toLowerCase(),sortedIndexByFirstChar:o,skipFocus:!1,isItemAtIndexDisabled:s},e))}/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var xT=["Alt","Control","Meta","Shift"];function ap(i){var e=new Set(i?xT.filter(function(t){return i.getModifierState(t)}):[]);return function(t){return t.every(function(r){return e.has(r)})&&t.length===e.size}}var wT=function(i){function e(t){var r=i.call(this,Vi(Vi({},e.defaultAdapter),t))||this;return r.wrapFocus=!1,r.isVertical=!0,r.isSingleSelectionList=!1,r.areDisabledItemsFocusable=!0,r.selectedIndex=Ui.UNSET_INDEX,r.focusedItemIndex=Ui.UNSET_INDEX,r.useActivatedClass=!1,r.useSelectedAttr=!1,r.ariaCurrentAttrValue=null,r.isCheckboxList=!1,r.isRadioList=!1,r.lastSelectedIndex=null,r.hasTypeahead=!1,r.typeaheadState=_T(),r.sortedIndexByFirstChar=new Map,r}return $n(e,i),Object.defineProperty(e,"strings",{get:function(){return jn},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return Ut},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ui},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},notifySelectionChange:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),e.prototype.layout=function(){this.adapter.getListItemCount()!==0&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},e.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},e.prototype.setWrapFocus=function(t){this.wrapFocus=t},e.prototype.setVerticalOrientation=function(t){this.isVertical=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t,t&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},e.prototype.setDisabledItemsFocusable=function(t){this.areDisabledItemsFocusable=t},e.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();t!==Ui.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,Ut.LIST_ITEM_ACTIVATED_CLASS)&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=t)},e.prototype.getSelectedIndexFromDOM=function(){for(var t=Ui.UNSET_INDEX,r=this.adapter.getListItemCount(),n=0;n=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},e.prototype.handleFocusOut=function(t){var r=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout(function(){r.adapter.isFocusInsideList()||r.setTabindexToFirstSelectedOrFocusedItem()},0)},e.prototype.isIndexDisabled=function(t){return this.adapter.listItemAtIndexHasClass(t,Ut.LIST_ITEM_DISABLED_CLASS)},e.prototype.handleKeydown=function(t,r,n){var a,o=this,s=gr(t)==="ArrowLeft",l=gr(t)==="ArrowUp",d=gr(t)==="ArrowRight",c=gr(t)==="ArrowDown",u=gr(t)==="Home",f=gr(t)==="End",m=gr(t)==="Enter",p=gr(t)==="Spacebar",y=this.isVertical&&c||!this.isVertical&&d,x=this.isVertical&&l||!this.isVertical&&s,E=t.key==="A"||t.key==="a",k=ap(t);if(this.adapter.isRootFocused()){if((x||f)&&k([])?(t.preventDefault(),this.focusLastElement()):(y||u)&&k([])?(t.preventDefault(),this.focusFirstElement()):x&&k(["Shift"])&&this.isCheckboxList?(t.preventDefault(),(M=this.focusLastElement())!==-1&&this.setSelectedIndexOnAction(M,!1)):y&&k(["Shift"])&&this.isCheckboxList&&(t.preventDefault(),(M=this.focusFirstElement())!==-1&&this.setSelectedIndexOnAction(M,!1)),this.hasTypeahead){var I={event:t,focusItemAtIndex:function(L){o.focusItemAtIndex(L)},focusedItemIndex:-1,isTargetListItem:r,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(L){return o.isIndexDisabled(L)}};np(I,this.typeaheadState)}}else{var v=this.adapter.getFocusedElementIndex();if(!(v===-1&&(v=n)<0)){if(y&&k([]))Br(t),this.focusNextElement(v);else if(x&&k([]))Br(t),this.focusPrevElement(v);else if(y&&k(["Shift"])&&this.isCheckboxList)Br(t),(M=this.focusNextElement(v))!==-1&&this.setSelectedIndexOnAction(M,!1);else if(x&&k(["Shift"])&&this.isCheckboxList){var M;Br(t),(M=this.focusPrevElement(v))!==-1&&this.setSelectedIndexOnAction(M,!1)}else if(u&&k([]))Br(t),this.focusFirstElement();else if(f&&k([]))Br(t),this.focusLastElement();else if(u&&k(["Control","Shift"])&&this.isCheckboxList){if(Br(t),this.isIndexDisabled(v))return;this.focusFirstElement(),this.toggleCheckboxRange(0,v,v)}else if(f&&k(["Control","Shift"])&&this.isCheckboxList){if(Br(t),this.isIndexDisabled(v))return;this.focusLastElement(),this.toggleCheckboxRange(v,this.adapter.getListItemCount()-1,v)}else if(E&&k(["Control"])&&this.isCheckboxList)t.preventDefault(),this.checkboxListToggleAll(this.selectedIndex===Ui.UNSET_INDEX?[]:this.selectedIndex,!0);else if((m||p)&&k([])){if(r){if((K=t.target)&&K.tagName==="A"&&m||(Br(t),this.isIndexDisabled(v)))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(v,!1),this.adapter.notifyAction(v))}}else if((m||p)&&k(["Shift"])&&this.isCheckboxList){var K;if((K=t.target)&&K.tagName==="A"&&m||(Br(t),this.isIndexDisabled(v)))return;this.isTypeaheadInProgress()||(this.toggleCheckboxRange((a=this.lastSelectedIndex)!==null&&a!==void 0?a:v,v,v),this.adapter.notifyAction(v))}this.hasTypeahead&&(I={event:t,focusItemAtIndex:function(L){o.focusItemAtIndex(L)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:r,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(L){return o.isIndexDisabled(L)}},np(I,this.typeaheadState))}}},e.prototype.handleClick=function(t,r,n){var a,o=ap(n);t!==Ui.UNSET_INDEX&&(this.isIndexDisabled(t)||(o([])?(this.isSelectableList()&&this.setSelectedIndexOnAction(t,r),this.adapter.notifyAction(t)):this.isCheckboxList&&o(["Shift"])&&(this.toggleCheckboxRange((a=this.lastSelectedIndex)!==null&&a!==void 0?a:t,t,t),this.adapter.notifyAction(t))))},e.prototype.focusNextElement=function(t){var r=this.adapter.getListItemCount(),n=t,a=null;do{if(++n>=r){if(!this.wrapFocus)return t;n=0}if(n===a)return-1;a=a!=null?a:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusPrevElement=function(t){var r=this.adapter.getListItemCount(),n=t,a=null;do{if(--n<0){if(!this.wrapFocus)return t;n=r-1}if(n===a)return-1;a=a!=null?a:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusFirstElement=function(){return this.focusNextElement(-1)},e.prototype.focusLastElement=function(){return this.focusPrevElement(this.adapter.getListItemCount())},e.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,r){this.isIndexValid(t,!1)&&(r?(this.adapter.removeClassForElementIndex(t,Ut.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,jn.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,Ut.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,jn.ARIA_DISABLED,"true")))},e.prototype.setSingleSelectionAtIndex=function(t,r){if(r===void 0&&(r={}),this.selectedIndex!==t||r.forceUpdate){var n=Ut.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(n=Ut.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==Ui.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,n),this.setAriaForSingleSelectionAtIndex(t),this.setTabindexAtIndex(t),t!==Ui.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,n),this.selectedIndex=t,r.isUserInteraction&&!r.forceUpdate&&this.adapter.notifySelectionChange([t])}},e.prototype.setAriaForSingleSelectionAtIndex=function(t){this.selectedIndex===Ui.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,jn.ARIA_CURRENT));var r=this.ariaCurrentAttrValue!==null,n=r?jn.ARIA_CURRENT:jn.ARIA_SELECTED;if(this.selectedIndex!==Ui.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),t!==Ui.UNSET_INDEX){var a=r?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(t,n,a)}},e.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?jn.ARIA_SELECTED:jn.ARIA_CHECKED},e.prototype.setRadioAtIndex=function(t,r){r===void 0&&(r={});var n=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),(this.selectedIndex!==t||r.forceUpdate)&&(this.selectedIndex!==Ui.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),this.adapter.setAttributeForElementIndex(t,n,"true"),this.selectedIndex=t,r.isUserInteraction&&!r.forceUpdate&&this.adapter.notifySelectionChange([t]))},e.prototype.setCheckboxAtIndex=function(t,r){r===void 0&&(r={});for(var n=this.selectedIndex,a=r.isUserInteraction?new Set(n===Ui.UNSET_INDEX?[]:n):null,o=this.getSelectionAttribute(),s=[],l=0;l=0;c!==d&&s.push(l),this.adapter.setCheckedCheckboxOrRadioAtIndex(l,c),this.adapter.setAttributeForElementIndex(l,o,c?"true":"false")}this.selectedIndex=t,r.isUserInteraction&&s.length&&this.adapter.notifySelectionChange(s)},e.prototype.toggleCheckboxRange=function(t,r,n){this.lastSelectedIndex=n;for(var a=new Set(this.selectedIndex===Ui.UNSET_INDEX?[]:this.selectedIndex),o=!(a!=null&&a.has(n)),s=rp([t,r].sort(),2),l=s[0],d=s[1],c=this.getSelectionAttribute(),u=[],f=l;f<=d;f++)this.isIndexDisabled(f)||o!==a.has(f)&&(u.push(f),this.adapter.setCheckedCheckboxOrRadioAtIndex(f,o),this.adapter.setAttributeForElementIndex(f,c,""+o),o?a.add(f):a.delete(f));u.length&&(this.selectedIndex=rT([],rp(a)),this.adapter.notifySelectionChange(u))},e.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===Ui.UNSET_INDEX&&t!==0?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex instanceof Array||this.selectedIndex===t||this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),t!==Ui.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},e.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},e.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?typeof this.selectedIndex=="number"&&this.selectedIndex!==Ui.UNSET_INDEX?this.selectedIndex:this.selectedIndex instanceof Array&&this.selectedIndex.length>0?this.selectedIndex.reduce(function(t,r){return Math.min(t,r)}):0:Math.max(this.focusedItemIndex,0)},e.prototype.isIndexValid=function(t,r){var n=this;if(r===void 0&&(r=!0),t instanceof Array){if(!this.isCheckboxList&&r)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return t.length===0||t.some(function(a){return n.isIndexInRange(a)})}if(typeof t=="number"){if(this.isCheckboxList&&r)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange(t)||this.isSingleSelectionList&&t===Ui.UNSET_INDEX}return!1},e.prototype.isIndexInRange=function(t){var r=this.adapter.getListItemCount();return t>=0&&t-1)&&a.push(o);this.setCheckboxAtIndex(a,{isUserInteraction:r})}},e.prototype.typeaheadMatchItem=function(t,r,n){var a=this;n===void 0&&(n=!1);var o={focusItemAtIndex:function(s){a.focusItemAtIndex(s)},focusedItemIndex:r||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(s){return a.isIndexDisabled(s)}};return vu(o,this.typeaheadState)},e.prototype.typeaheadInitSortedIndex=function(){return yT(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},e.prototype.clearTypeaheadBuffer=function(){j0(this.typeaheadState)},e}(Ln);function ST(i){let e;const t=i[42].default,r=ci(t,i,i[44],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||8192&a[1])&&fi(r,t,n,n[44],e?ui(t,n[44],a,null):hi(n[44]),null)},i(n){e||($e(r,n),e=!0)},o(n){Be(r,n),e=!1},d(n){r&&r.d(n)}}}function ET(i){let e,t,r;const n=[{tag:i[13]},{use:[i[16],...i[0]]},{class:Kt({[i[1]]:!0,"mdc-deprecated-list":!0,"mdc-deprecated-list--non-interactive":i[2],"mdc-deprecated-list--dense":i[3],"mdc-deprecated-list--textual-list":i[4],"mdc-deprecated-list--avatar-list":i[5]||i[17],"mdc-deprecated-list--icon-list":i[6],"mdc-deprecated-list--image-list":i[7],"mdc-deprecated-list--thumbnail-list":i[8],"mdc-deprecated-list--video-list":i[9],"mdc-deprecated-list--two-line":i[10],"smui-list--three-line":i[11]&&!i[10]})},{role:i[15]},i[25]];var a=i[12];function o(s){let l={$$slots:{default:[ST]},$$scope:{ctx:s}};for(let d=0;d{Zt(c,1)}),rr()}a?(e=No(a,o(s)),s[43](e),e.$on("keydown",s[20]),e.$on("focusin",s[21]),e.$on("focusout",s[22]),e.$on("click",s[23]),e.$on("SMUIListItem:mount",s[18]),e.$on("SMUIListItem:unmount",s[19]),e.$on("SMUI:action",s[24]),Jt(e.$$.fragment),$e(e.$$.fragment,1),Yt(e,t.parentNode,t)):e=null}else a&&e.$set(d)},i(s){r||(e&&$e(e.$$.fragment,s),r=!0)},o(s){e&&Be(e.$$.fragment,s),r=!1},d(s){i[43](null),s&&mt(t),e&&Zt(e,s)}}}function TT(i,e,t){const r=["use","class","nonInteractive","dense","textualList","avatarList","iconList","imageList","thumbnailList","videoList","twoLine","threeLine","vertical","wrapFocus","singleSelection","disabledItemsFocusable","selectedIndex","radioList","checkList","hasTypeahead","component","tag","layout","setEnabled","getTypeaheadInProgress","getSelectedIndex","getFocusedItemIndex","focusItemAtIndex","getElement"];let n=li(e,r),{$$slots:a={},$$scope:o}=e;var s;const{closest:l,matches:d}=Vu,c=$r(nr());let u,f,{use:m=[]}=e,{class:p=""}=e,{nonInteractive:y=!1}=e,{dense:x=!1}=e,{textualList:E=!1}=e,{avatarList:k=!1}=e,{iconList:I=!1}=e,{imageList:v=!1}=e,{thumbnailList:M=!1}=e,{videoList:K=!1}=e,{twoLine:L=!1}=e,{threeLine:R=!1}=e,{vertical:W=!0}=e,{wrapFocus:Oe=(s=Ir("SMUI:list:wrapFocus"))!==null&&s!==void 0&&s}=e,{singleSelection:me=!1}=e,{disabledItemsFocusable:de=!1}=e,{selectedIndex:N=-1}=e,{radioList:C=!1}=e,{checkList:Q=!1}=e,{hasTypeahead:V=!1}=e,ne=[],Ve=Ir("SMUI:list:role"),Re=Ir("SMUI:list:nav");const Ge=new WeakMap;let tt,ot=Ir("SMUI:dialog:selection"),he=Ir("SMUI:addLayoutListener"),{component:bt=Po}=e,{tag:wt=bt===Po?Re?"nav":"ul":void 0}=e;function pt(){return u==null?[]:[...Vt().children].map(we=>Ge.get(we)).filter(we=>we&&we._smui_list_item_accessor)}function Lt(we,st){var ft;const Qt=pt()[we];return(ft=Qt&&Qt.hasClass(st))!==null&&ft!==void 0&&ft}function xe(we,st){const ft=pt()[we];ft&&ft.addClass(st)}function le(we,st){const ft=pt()[we];ft&&ft.removeClass(st)}function Qe(we,st,ft){const Qt=pt()[we];Qt&&Qt.addAttr(st,ft)}function dt(we,st){const ft=pt()[we];ft&&ft.removeAttr(st)}function Se(we,st){const ft=pt()[we];return ft?ft.getAttr(st):null}function Ot(we){var st;const ft=pt()[we];return(st=ft&&ft.getPrimaryText())!==null&&st!==void 0?st:""}function It(we){const st=l(we,".mdc-deprecated-list-item, .mdc-deprecated-list");return st&&d(st,".mdc-deprecated-list-item")?pt().map(ft=>ft==null?void 0:ft.element).indexOf(st):-1}function ii(){return f.layout()}function vi(){return f.getSelectedIndex()}function Ki(we){const st=pt()[we];st&&"focus"in st.element&&st.element.focus()}function Vt(){return u.getElement()}return Tr("SMUI:list:nonInteractive",y),Tr("SMUI:separator:context","list"),Ve||(me?(Ve="listbox",Tr("SMUI:list:item:role","option")):C?(Ve="radiogroup",Tr("SMUI:list:item:role","radio")):Q?(Ve="group",Tr("SMUI:list:item:role","checkbox")):(Ve="list",Tr("SMUI:list:item:role",void 0))),he&&(tt=he(ii)),Ur(()=>{t(41,f=new wT({addClassForElementIndex:xe,focusItemAtIndex:Ki,getAttributeForElementIndex:(st,ft)=>{var Qt,_;return(_=(Qt=pt()[st])===null||Qt===void 0?void 0:Qt.getAttr(ft))!==null&&_!==void 0?_:null},getFocusedElementIndex:()=>document.activeElement?pt().map(st=>st.element).indexOf(document.activeElement):-1,getListItemCount:()=>ne.length,getPrimaryTextAtIndex:Ot,hasCheckboxAtIndex:st=>{var ft,Qt;return(Qt=(ft=pt()[st])===null||ft===void 0?void 0:ft.hasCheckbox)!==null&&Qt!==void 0&&Qt},hasRadioAtIndex:st=>{var ft,Qt;return(Qt=(ft=pt()[st])===null||ft===void 0?void 0:ft.hasRadio)!==null&&Qt!==void 0&&Qt},isCheckboxCheckedAtIndex:st=>{var ft;const Qt=pt()[st];return(ft=(Qt==null?void 0:Qt.hasCheckbox)&&Qt.checked)!==null&&ft!==void 0&&ft},isFocusInsideList:()=>u!=null&&Vt()!==document.activeElement&&Vt().contains(document.activeElement),isRootFocused:()=>u!=null&&document.activeElement===Vt(),listItemAtIndexHasClass:Lt,notifyAction:st=>{t(26,N=st),u!=null&&$i(Vt(),"SMUIList:action",{index:st},void 0,!0)},notifySelectionChange:st=>{u!=null&&$i(Vt(),"SMUIList:selectionChange",{changedIndices:st})},removeClassForElementIndex:le,setAttributeForElementIndex:Qe,setCheckedCheckboxOrRadioAtIndex:(st,ft)=>{pt()[st].checked=ft},setTabIndexForListItemChildren:(st,ft)=>{const Qt=pt()[st];Array.prototype.forEach.call(Qt.element.querySelectorAll("button:not(:disabled), a"),_=>{_.setAttribute("tabindex",ft)})}}));const we={get element(){return Vt()},get items(){return ne},get typeaheadInProgress(){return f.isTypeaheadInProgress()},typeaheadMatchItem:(st,ft)=>f.typeaheadMatchItem(st,ft,!0),getOrderedList:pt,focusItemAtIndex:Ki,addClassForElementIndex:xe,removeClassForElementIndex:le,setAttributeForElementIndex:Qe,removeAttributeForElementIndex:dt,getAttributeFromElementIndex:Se,getPrimaryTextAtIndex:Ot};return $i(Vt(),"SMUIList:mount",we),f.init(),f.layout(),()=>{f.destroy()}}),Pa(()=>{tt&&tt()}),i.$$set=we=>{e=xt(xt({},e),kr(we)),t(25,n=li(e,r)),"use"in we&&t(0,m=we.use),"class"in we&&t(1,p=we.class),"nonInteractive"in we&&t(2,y=we.nonInteractive),"dense"in we&&t(3,x=we.dense),"textualList"in we&&t(4,E=we.textualList),"avatarList"in we&&t(5,k=we.avatarList),"iconList"in we&&t(6,I=we.iconList),"imageList"in we&&t(7,v=we.imageList),"thumbnailList"in we&&t(8,M=we.thumbnailList),"videoList"in we&&t(9,K=we.videoList),"twoLine"in we&&t(10,L=we.twoLine),"threeLine"in we&&t(11,R=we.threeLine),"vertical"in we&&t(27,W=we.vertical),"wrapFocus"in we&&t(28,Oe=we.wrapFocus),"singleSelection"in we&&t(29,me=we.singleSelection),"disabledItemsFocusable"in we&&t(30,de=we.disabledItemsFocusable),"selectedIndex"in we&&t(26,N=we.selectedIndex),"radioList"in we&&t(31,C=we.radioList),"checkList"in we&&t(32,Q=we.checkList),"hasTypeahead"in we&&t(33,V=we.hasTypeahead),"component"in we&&t(12,bt=we.component),"tag"in we&&t(13,wt=we.tag),"$$scope"in we&&t(44,o=we.$$scope)},i.$$.update=()=>{134217728&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&f.setVerticalOrientation(W),268435456&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&f.setWrapFocus(Oe),1028&i.$$.dirty[1]&&f&&f.setHasTypeahead(V),536870912&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&f.setSingleSelection(me),1073741824&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&f.setDisabledItemsFocusable(de),603979776&i.$$.dirty[0]|1024&i.$$.dirty[1]&&f&&me&&vi()!==N&&f.setSelectedIndex(N)},[m,p,y,x,E,k,I,v,M,K,L,R,bt,wt,u,Ve,c,ot,function(we){ne.push(we.detail),Ge.set(we.detail.element,we.detail),me&&we.detail.selected&&t(26,N=It(we.detail.element)),we.stopPropagation()},function(we){var st;const ft=(st=we.detail&&ne.indexOf(we.detail))!==null&&st!==void 0?st:-1;ft!==-1&&(ne.splice(ft,1),Ge.delete(we.detail.element)),we.stopPropagation()},function(we){f&&we.target&&f.handleKeydown(we,we.target.classList.contains("mdc-deprecated-list-item"),It(we.target))},function(we){f&&we.target&&f.handleFocusIn(It(we.target))},function(we){f&&we.target&&f.handleFocusOut(It(we.target))},function(we){f&&we.target&&f.handleClick(It(we.target),!d(we.target,'input[type="checkbox"], input[type="radio"]'),we)},function(we){if(C||Q){const st=It(we.target);if(st!==-1){const ft=pt()[st];ft&&(C&&!ft.checked||Q)&&(d(we.detail.target,'input[type="checkbox"], input[type="radio"]')||(ft.checked=!ft.checked),ft.activateRipple(),window.requestAnimationFrame(()=>{ft.deactivateRipple()}))}}},n,N,W,Oe,me,de,C,Q,V,ii,function(we,st){return f.setEnabled(we,st)},function(){return f.isTypeaheadInProgress()},vi,function(){return f.getFocusedItemIndex()},Ki,Vt,f,a,function(we){Ft[we?"unshift":"push"](()=>{u=we,t(14,u)})},o]}let IT=class extends hr{constructor(e){super(),fr(this,e,TT,ET,Zi,{use:0,class:1,nonInteractive:2,dense:3,textualList:4,avatarList:5,iconList:6,imageList:7,thumbnailList:8,videoList:9,twoLine:10,threeLine:11,vertical:27,wrapFocus:28,singleSelection:29,disabledItemsFocusable:30,selectedIndex:26,radioList:31,checkList:32,hasTypeahead:33,component:12,tag:13,layout:34,setEnabled:35,getTypeaheadInProgress:36,getSelectedIndex:37,getFocusedItemIndex:38,focusItemAtIndex:39,getElement:40},null,[-1,-1])}get layout(){return this.$$.ctx[34]}get setEnabled(){return this.$$.ctx[35]}get getTypeaheadInProgress(){return this.$$.ctx[36]}get getSelectedIndex(){return this.$$.ctx[37]}get getFocusedItemIndex(){return this.$$.ctx[38]}get focusItemAtIndex(){return this.$$.ctx[39]}get getElement(){return this.$$.ctx[40]}};/** + * @license + * Copyright 2019 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */function AT(i){return i===void 0&&(i=window),!!function(e){e===void 0&&(e=window);var t=!1;try{var r={get passive(){return t=!0,!1}},n=function(){};e.document.addEventListener("test",n,r),e.document.removeEventListener("test",n,r)}catch(a){t=!1}return t}(i)&&{passive:!0}}const V0=Object.freeze(Object.defineProperty({__proto__:null,applyPassive:AT},Symbol.toStringTag,{value:"Module"}));/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var CT={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},kT={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},op={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},Mc;function $T(i,e){e===void 0&&(e=!1);var t,r=i.CSS;if(typeof Mc=="boolean"&&!e)return Mc;if(!(r&&typeof r.supports=="function"))return!1;var n=r.supports("--css-vars","yes"),a=r.supports("(--css-vars: yes)")&&r.supports("color","#00000000");return t=n||a,e||(Mc=t),t}function LT(i,e,t){if(!i)return{x:0,y:0};var r,n,a=e.x,o=e.y,s=a+t.left,l=o+t.top;if(i.type==="touchstart"){var d=i;r=d.changedTouches[0].pageX-s,n=d.changedTouches[0].pageY-l}else{var c=i;r=c.pageX-s,n=c.pageY-l}return{x:r,y:n}}/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var sp=["touchstart","pointerdown","mousedown","keydown"],lp=["touchend","pointerup","mouseup","contextmenu"],Pl=[],OT=function(i){function e(t){var r=i.call(this,Vi(Vi({},e.defaultAdapter),t))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(n){r.activateImpl(n)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return $n(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return CT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return kT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return op},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,r=this.supportsPressRipple();if(this.registerRootHandlers(r),r){var n=e.cssClasses,a=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(a),t.adapter.isUnbounded()&&(t.adapter.addClass(o),t.layoutInternal())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var r=e.cssClasses,n=r.ROOT,a=r.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(n),t.adapter.removeClass(a),t.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){t.layoutInternal(),t.layoutFrame=0})},e.prototype.setUnbounded=function(t){var r=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var r,n;if(t){try{for(var a=Jr(sp),o=a.next();!o.done;o=a.next()){var s=o.value;this.adapter.registerInteractionHandler(s,this.activateHandler)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var r,n;if(t.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var a=Jr(lp),o=a.next();!o.done;o=a.next()){var s=o.value;this.adapter.registerDocumentInteractionHandler(s,this.deactivateHandler)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}},e.prototype.deregisterRootHandlers=function(){var t,r;try{for(var n=Jr(sp),a=n.next();!a.done;a=n.next()){var o=a.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,r;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=Jr(lp),a=n.next();!a.done;a=n.next()){var o=a.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,r=e.strings;Object.keys(r).forEach(function(n){n.indexOf("VAR_")===0&&t.adapter.updateCssVariable(r[n],null)})},e.prototype.activateImpl=function(t){var r=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var a=this.previousActivationEvent;a&&t!==void 0&&a.type!==t.type||(n.isActivated=!0,n.isProgrammatic=t===void 0,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&t!==void 0&&(t.type==="mousedown"||t.type==="touchstart"||t.type==="pointerdown"),t!==void 0&&Pl.length>0&&Pl.some(function(o){return r.adapter.containsEventTarget(o)})?this.resetActivationState():(t!==void 0&&(Pl.push(t.target),this.registerDeactivationHandlers(t)),n.wasElementMadeActive=this.checkElementMadeActive(t),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){Pl=[],n.wasElementMadeActive||t===void 0||t.key!==" "&&t.keyCode!==32||(n.wasElementMadeActive=r.checkElementMadeActive(t),n.wasElementMadeActive&&r.animateActivation()),n.wasElementMadeActive||(r.activationState=r.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return t===void 0||t.type!=="keydown"||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,r=e.strings,n=r.VAR_FG_TRANSLATE_START,a=r.VAR_FG_TRANSLATE_END,o=e.cssClasses,s=o.FG_DEACTIVATION,l=o.FG_ACTIVATION,d=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",u="";if(!this.adapter.isUnbounded()){var f=this.getFgTranslationCoordinates(),m=f.startPoint,p=f.endPoint;c=m.x+"px, "+m.y+"px",u=p.x+"px, "+p.y+"px"}this.adapter.updateCssVariable(n,c),this.adapter.updateCssVariable(a,u),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(s),this.adapter.computeBoundingRect(),this.adapter.addClass(l),this.activationTimer=setTimeout(function(){t.activationTimerCallback()},d)},e.prototype.getFgTranslationCoordinates=function(){var t,r=this.activationState,n=r.activationEvent;return{startPoint:t={x:(t=r.wasActivatedByPointer?LT(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,r=e.cssClasses.FG_DEACTIVATION,n=this.activationState,a=n.hasDeactivationUXRun,o=n.isActivated;(a||!o)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(r),this.fgDeactivationRemovalTimer=setTimeout(function(){t.adapter.removeClass(r)},op.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return t.previousActivationEvent=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,r=this.activationState;if(r.isActivated){var n=Vi({},r);r.isProgrammatic?(requestAnimationFrame(function(){t.animateDeactivation(n)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(n),t.resetActivationState()}))}},e.prototype.animateDeactivation=function(t){var r=t.wasActivatedByPointer,n=t.wasElementMadeActive;(r||n)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var r=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?r:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var n=Math.floor(r*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize=n-1:this.initialSize=n,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,r=t.VAR_FG_SIZE,n=t.VAR_LEFT,a=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(r,this.initialSize+"px"),this.adapter.updateCssVariable(o,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(n,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(a,this.unboundedCoords.top+"px"))},e}(Ln);const{applyPassive:Dl}=V0,{matches:RT}=Vu;function md(i,{ripple:e=!0,surface:t=!1,unbounded:r=!1,disabled:n=!1,color:a,active:o,rippleElement:s,eventTarget:l,activeTarget:d,addClass:c=p=>i.classList.add(p),removeClass:u=p=>i.classList.remove(p),addStyle:f=(p,y)=>i.style.setProperty(p,y),initPromise:m=Promise.resolve()}={}){let p,y,x=Ir("SMUI:addLayoutListener"),E=o,k=l,I=d;function v(){t?(c("mdc-ripple-surface"),a==="primary"?(c("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary")):a==="secondary"?(u("smui-ripple-surface--primary"),c("smui-ripple-surface--secondary")):(u("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary"))):(u("mdc-ripple-surface"),u("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary")),p&&E!==o&&(E=o,o?p.activate():o===!1&&p.deactivate()),e&&!p?(p=new OT({addClass:c,browserSupportsCssVars:()=>$T(window),computeBoundingRect:()=>(s||i).getBoundingClientRect(),containsEventTarget:M=>i.contains(M),deregisterDocumentInteractionHandler:(M,K)=>document.documentElement.removeEventListener(M,K,Dl()),deregisterInteractionHandler:(M,K)=>(l||i).removeEventListener(M,K,Dl()),deregisterResizeHandler:M=>window.removeEventListener("resize",M),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>o==null?RT(d||i,":active"):o,isSurfaceDisabled:()=>!!n,isUnbounded:()=>!!r,registerDocumentInteractionHandler:(M,K)=>document.documentElement.addEventListener(M,K,Dl()),registerInteractionHandler:(M,K)=>(l||i).addEventListener(M,K,Dl()),registerResizeHandler:M=>window.addEventListener("resize",M),removeClass:u,updateCssVariable:f}),m.then(()=>{p&&(p.init(),p.setUnbounded(r))})):p&&!e&&m.then(()=>{p&&(p.destroy(),p=void 0)}),!p||k===l&&I===d||(k=l,I=d,p.destroy(),requestAnimationFrame(()=>{p&&(p.init(),p.setUnbounded(r))})),!e&&r&&c("mdc-ripple-upgraded--unbounded")}return v(),x&&(y=x(function(){p&&p.layout()})),{update(M){({ripple:e,surface:t,unbounded:r,disabled:n,color:a,active:o,rippleElement:s,eventTarget:l,activeTarget:d,addClass:c,removeClass:u,addStyle:f,initPromise:m}=Object.assign({ripple:!0,surface:!1,unbounded:!1,disabled:!1,color:void 0,active:void 0,rippleElement:void 0,eventTarget:void 0,activeTarget:void 0,addClass:K=>i.classList.add(K),removeClass:K=>i.classList.remove(K),addStyle:(K,L)=>i.style.setProperty(K,L),initPromise:Promise.resolve()},M)),v()},destroy(){p&&(p.destroy(),p=void 0,u("mdc-ripple-surface"),u("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary")),y&&y()}}}function dp(i){let e;return{c(){e=ti("span"),si(e,"class","mdc-deprecated-list-item__ripple")},m(t,r){gt(t,e,r)},d(t){t&&mt(e)}}}function FT(i){let e,t,r=i[7]&&dp();const n=i[34].default,a=ci(n,i,i[37],null);return{c(){r&&r.c(),e=br(),a&&a.c()},m(o,s){r&&r.m(o,s),gt(o,e,s),a&&a.m(o,s),t=!0},p(o,s){o[7]?r||(r=dp(),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),a&&a.p&&(!t||64&s[1])&&fi(a,n,o,o[37],t?ui(n,o[37],s,null):hi(o[37]),null)},i(o){t||($e(a,o),t=!0)},o(o){Be(a,o),t=!1},d(o){r&&r.d(o),o&&mt(e),a&&a.d(o)}}}function NT(i){let e,t,r;const n=[{tag:i[14]},{use:[...i[6]?[]:[[md,{ripple:!i[16],unbounded:!1,color:(i[1]||i[0])&&i[5]==null?"primary":i[5],disabled:i[10],addClass:i[24],removeClass:i[25],addStyle:i[26]}]],i[22],...i[2]]},{class:Kt(Ei({[i[3]]:!0,"mdc-deprecated-list-item":!i[8],"mdc-deprecated-list-item__wrapper":i[8],"mdc-deprecated-list-item--activated":i[1],"mdc-deprecated-list-item--selected":i[0],"mdc-deprecated-list-item--disabled":i[10],"mdc-menu-item--selected":!i[23]&&i[9]==="menuitem"&&i[0],"smui-menu-item--non-interactive":i[6]},i[18]))},{style:Object.entries(i[19]).map(cp).concat([i[4]]).join(" ")},i[23]&&i[1]?{"aria-current":"page"}:{},!i[23]||i[8]?{role:i[9]}:{},i[23]||i[9]!=="option"?{}:{"aria-selected":i[0]?"true":"false"},i[23]||i[9]!=="radio"&&i[9]!=="checkbox"?{}:{"aria-checked":i[16]&&i[16].checked?"true":"false"},i[23]?{}:{"aria-disabled":i[10]?"true":"false"},{"data-menu-item-skip-restore-focus":i[11]||void 0},{tabindex:i[21]},{href:i[12]},i[20],i[29]];var a=i[13];function o(s){let l={$$slots:{default:[FT]},$$scope:{ctx:s}};for(let d=0;d{Zt(c,1)}),rr()}a?(e=No(a,o(s)),s[35](e),e.$on("click",s[15]),e.$on("keydown",s[27]),e.$on("SMUIGenericInput:mount",s[28]),e.$on("SMUIGenericInput:unmount",s[36]),Jt(e.$$.fragment),$e(e.$$.fragment,1),Yt(e,t.parentNode,t)):e=null}else a&&e.$set(d)},i(s){r||(e&&$e(e.$$.fragment,s),r=!0)},o(s){e&&Be(e.$$.fragment,s),r=!1},d(s){i[35](null),s&&mt(t),e&&Zt(e,s)}}}let PT=0;const cp=([i,e])=>`${i}: ${e};`;function DT(i,e,t){let r;const n=["use","class","style","color","nonInteractive","ripple","wrapper","activated","role","selected","disabled","skipRestoreFocus","tabindex","inputId","href","component","tag","action","getPrimaryText","getElement"];let a=li(e,n),{$$slots:o={},$$scope:s}=e;var l;const d=$r(nr());let c=()=>{},{use:u=[]}=e,{class:f=""}=e,{style:m=""}=e,{color:p}=e,{nonInteractive:y=(l=Ir("SMUI:list:nonInteractive"))!==null&&l!==void 0&&l}=e;Tr("SMUI:list:nonInteractive",void 0);let{ripple:x=!y}=e,{wrapper:E=!1}=e,{activated:k=!1}=e,{role:I=E?"presentation":Ir("SMUI:list:item:role")}=e;Tr("SMUI:list:item:role",void 0);let v,M,K,{selected:L=!1}=e,{disabled:R=!1}=e,{skipRestoreFocus:W=!1}=e,{tabindex:Oe=c}=e,{inputId:me="SMUI-form-field-list-"+PT++}=e,{href:de}=e,N={},C={},Q={},V=Ir("SMUI:list:item:nav"),{component:ne=Po}=e,{tag:Ve=ne===Po?V?de?"a":"span":"li":void 0}=e;function Re(xe){return xe in N?N[xe]:Lt().classList.contains(xe)}function Ge(xe){N[xe]||t(18,N[xe]=!0,N)}function tt(xe){xe in N&&!N[xe]||t(18,N[xe]=!1,N)}function ot(xe){var le;return xe in Q?(le=Q[xe])!==null&&le!==void 0?le:null:Lt().getAttribute(xe)}function he(xe,le){Q[xe]!==le&&t(20,Q[xe]=le,Q)}function bt(xe){xe in Q&&Q[xe]==null||t(20,Q[xe]=void 0,Q)}function wt(xe){R||$i(Lt(),"SMUI:action",xe)}function pt(){var xe,le,Qe;const dt=Lt(),Se=dt.querySelector(".mdc-deprecated-list-item__primary-text");if(Se)return(xe=Se.textContent)!==null&&xe!==void 0?xe:"";const Ot=dt.querySelector(".mdc-deprecated-list-item__text");return Ot?(le=Ot.textContent)!==null&&le!==void 0?le:"":(Qe=dt.textContent)!==null&&Qe!==void 0?Qe:""}function Lt(){return v.getElement()}return Tr("SMUI:generic:input:props",{id:me}),Tr("SMUI:separator:context",void 0),Ur(()=>{if(!L&&!y){let le=!0,Qe=v.getElement();for(;Qe.previousSibling;)if(Qe=Qe.previousSibling,Qe.nodeType===1&&Qe.classList.contains("mdc-deprecated-list-item")&&!Qe.classList.contains("mdc-deprecated-list-item--disabled")){le=!1;break}le&&(K=window.requestAnimationFrame(()=>function(dt){let Se=!0;for(;dt.nextElementSibling;)if((dt=dt.nextElementSibling).nodeType===1&&dt.classList.contains("mdc-deprecated-list-item")){const Ot=dt.attributes.getNamedItem("tabindex");if(Ot&&Ot.value==="0"){Se=!1;break}}Se&&t(21,r=0)}(Qe)))}const xe={_smui_list_item_accessor:!0,get element(){return Lt()},get selected(){return L},set selected(le){t(0,L=le)},hasClass:Re,addClass:Ge,removeClass:tt,getAttr:ot,addAttr:he,removeAttr:bt,getPrimaryText:pt,get checked(){var le;return(le=M&&M.checked)!==null&&le!==void 0&&le},set checked(le){M&&t(16,M.checked=!!le,M)},get hasCheckbox(){return!(!M||!("_smui_checkbox_accessor"in M))},get hasRadio(){return!(!M||!("_smui_radio_accessor"in M))},activateRipple(){M&&M.activateRipple()},deactivateRipple(){M&&M.deactivateRipple()},getValue:()=>a.value,action:wt,get tabindex(){return r},set tabindex(le){t(30,Oe=le)},get disabled(){return R},get activated(){return k},set activated(le){t(1,k=le)}};return $i(Lt(),"SMUIListItem:mount",xe),()=>{$i(Lt(),"SMUIListItem:unmount",xe)}}),Pa(()=>{K&&window.cancelAnimationFrame(K)}),i.$$set=xe=>{e=xt(xt({},e),kr(xe)),t(29,a=li(e,n)),"use"in xe&&t(2,u=xe.use),"class"in xe&&t(3,f=xe.class),"style"in xe&&t(4,m=xe.style),"color"in xe&&t(5,p=xe.color),"nonInteractive"in xe&&t(6,y=xe.nonInteractive),"ripple"in xe&&t(7,x=xe.ripple),"wrapper"in xe&&t(8,E=xe.wrapper),"activated"in xe&&t(1,k=xe.activated),"role"in xe&&t(9,I=xe.role),"selected"in xe&&t(0,L=xe.selected),"disabled"in xe&&t(10,R=xe.disabled),"skipRestoreFocus"in xe&&t(11,W=xe.skipRestoreFocus),"tabindex"in xe&&t(30,Oe=xe.tabindex),"inputId"in xe&&t(31,me=xe.inputId),"href"in xe&&t(12,de=xe.href),"component"in xe&&t(13,ne=xe.component),"tag"in xe&&t(14,Ve=xe.tag),"$$scope"in xe&&t(37,s=xe.$$scope)},i.$$.update=()=>{1073808449&i.$$.dirty[0]&&t(21,r=Oe===c?y||R||!(L||M&&M.checked)?-1:0:Oe)},[L,k,u,f,m,p,y,x,E,I,R,W,de,ne,Ve,wt,M,v,N,C,Q,r,d,V,Ge,tt,function(xe,le){C[xe]!=le&&(le===""||le==null?(delete C[xe],t(19,C)):t(19,C[xe]=le,C))},function(xe){const le=xe.key==="Enter",Qe=xe.key==="Space";(le||Qe)&&wt(xe)},function(xe){("_smui_checkbox_accessor"in xe.detail||"_smui_radio_accessor"in xe.detail)&&t(16,M=xe.detail)},a,Oe,me,pt,Lt,o,function(xe){Ft[xe?"unshift":"push"](()=>{v=xe,t(17,v)})},()=>t(16,M=void 0),s]}let Hu=class extends hr{constructor(e){super(),fr(this,e,DT,NT,Zi,{use:2,class:3,style:4,color:5,nonInteractive:6,ripple:7,wrapper:8,activated:1,role:9,selected:0,disabled:10,skipRestoreFocus:11,tabindex:30,inputId:31,href:12,component:13,tag:14,action:15,getPrimaryText:32,getElement:33},null,[-1,-1])}get action(){return this.$$.ctx[15]}get getPrimaryText(){return this.$$.ctx[32]}get getElement(){return this.$$.ctx[33]}};function MT(i){let e;const t=i[11].default,r=ci(t,i,i[13],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||8192&a)&&fi(r,t,n,n[13],e?ui(t,n[13],a,null):hi(n[13]),null)},i(n){e||($e(r,n),e=!0)},o(n){Be(r,n),e=!1},d(n){r&&r.d(n)}}}function zT(i){let e,t,r;const n=[{tag:i[3]},{use:[i[8],...i[0]]},{class:Kt(Ei({[i[1]]:!0,[i[6]]:!0},i[5]))},i[7],i[9]];var a=i[2];function o(s){let l={$$slots:{default:[MT]},$$scope:{ctx:s}};for(let d=0;d{Zt(c,1)}),rr()}a?(e=No(a,o(s)),s[12](e),Jt(e.$$.fragment),$e(e.$$.fragment,1),Yt(e,t.parentNode,t)):e=null}else a&&e.$set(d)},i(s){r||(e&&$e(e.$$.fragment,s),r=!0)},o(s){e&&Be(e.$$.fragment,s),r=!1},d(s){i[12](null),s&&mt(t),e&&Zt(e,s)}}}const Tn={component:Po,tag:"div",class:"",classMap:{},contexts:{},props:{}};function BT(i,e,t){const r=["use","class","component","tag","getElement"];let n,a=li(e,r),{$$slots:o={},$$scope:s}=e,{use:l=[]}=e,{class:d=""}=e;const c=Tn.class,u={},f=[],m=Tn.contexts,p=Tn.props;let{component:y=Tn.component}=e,{tag:x=y===Po?Tn.tag:void 0}=e;Object.entries(Tn.classMap).forEach(([k,I])=>{const v=Ir(I);v&&"subscribe"in v&&f.push(v.subscribe(M=>{t(5,u[k]=M,u)}))});const E=$r(nr());for(let k in m)m.hasOwnProperty(k)&&Tr(k,m[k]);return Pa(()=>{for(const k of f)k()}),i.$$set=k=>{e=xt(xt({},e),kr(k)),t(9,a=li(e,r)),"use"in k&&t(0,l=k.use),"class"in k&&t(1,d=k.class),"component"in k&&t(2,y=k.component),"tag"in k&&t(3,x=k.tag),"$$scope"in k&&t(13,s=k.$$scope)},[l,d,y,x,n,u,c,p,E,a,function(){return n.getElement()},o,function(k){Ft[k?"unshift":"push"](()=>{n=k,t(4,n)})},s]}let UT=class extends hr{constructor(e){super(),fr(this,e,BT,zT,Zi,{use:0,class:1,component:2,tag:3,getElement:10})}get getElement(){return this.$$.ctx[10]}};const up=Object.assign({},Tn);function pn(i){return new Proxy(UT,{construct:function(e,t){return Object.assign(Tn,up,i),new e(...t)},get:function(e,t){return Object.assign(Tn,up,i),e[t]}})}var H0=pn({class:"mdc-deprecated-list-item__text",tag:"span"});pn({class:"mdc-deprecated-list-item__primary-text",tag:"span"});pn({class:"mdc-deprecated-list-item__secondary-text",tag:"span"});pn({class:"mdc-deprecated-list-item__meta",tag:"span"});pn({class:"mdc-deprecated-list-group",tag:"div"});pn({class:"mdc-deprecated-list-group__subheader",tag:"h3"});function pd(i,e){let t=Object.getOwnPropertyNames(i);const r={};for(let n=0;n{r.delete(s),r.size===0&&t&&(t(),t=null)}}}}function jT(i){let e;const t=i[4].default,r=ci(t,i,i[3],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,[a]){r&&r.p&&(!e||8&a)&&fi(r,t,n,n[3],e?ui(t,n[3],a,null):hi(n[3]),null)},i(n){e||($e(r,n),e=!0)},o(n){Be(r,n),e=!1},d(n){r&&r.d(n)}}}function VT(i,e,t){let r,{$$slots:n={},$$scope:a}=e,{key:o}=e,{value:s}=e;const l=GT(s);return N0(i,l,d=>t(5,r=d)),Tr(o,l),Pa(()=>{l.set(void 0)}),i.$$set=d=>{"key"in d&&t(1,o=d.key),"value"in d&&t(2,s=d.value),"$$scope"in d&&t(3,a=d.$$scope)},i.$$.update=()=>{4&i.$$.dirty&&PE(l,r=s,r)},[l,o,s,a,n]}let gd=class extends hr{constructor(e){super(),fr(this,e,VT,jT,Zi,{key:1,value:2})}};/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var HT={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"};/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var qT=function(i){function e(t){var r=i.call(this,Vi(Vi({},e.defaultAdapter),t))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return $n(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return HT},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var r=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.float=function(t){var r=e.cssClasses,n=r.LABEL_FLOAT_ABOVE,a=r.LABEL_SHAKE;t?this.adapter.addClass(n):(this.adapter.removeClass(n),this.adapter.removeClass(a))},e.prototype.setRequired=function(t){var r=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e}(Ln);function WT(i){let e,t,r,n,a,o,s,l;const d=i[22].default,c=ci(d,i,i[21],null);let u=[{class:t=Kt(Ei({[i[3]]:!0,"mdc-floating-label":!0,"mdc-floating-label--float-above":i[0],"mdc-floating-label--required":i[1]},i[8]))},{style:r=Object.entries(i[9]).map(hp).concat([i[4]]).join(" ")},{for:n=i[5]||(i[11]?i[11].id:void 0)},i[12]],f={};for(let m=0;m{o[c]=null}),rr(),t=o[e],t?t.p(l,d):(t=o[e]=a[e](l),t.c()),$e(t,1),t.m(r.parentNode,r))},i(l){n||($e(t),n=!0)},o(l){Be(t),n=!1},d(l){o[e].d(l),l&&mt(r)}}}const fp=([i,e])=>`${i}: ${e};`,hp=([i,e])=>`${i}: ${e};`;function ZT(i,e,t){const r=["use","class","style","for","floatAbove","required","wrapped","shake","float","setRequired","getWidth","getElement"];let n=li(e,r),{$$slots:a={},$$scope:o}=e;var s;const l=$r(nr());let d,c,{use:u=[]}=e,{class:f=""}=e,{style:m=""}=e,{for:p}=e,{floatAbove:y=!1}=e,{required:x=!1}=e,{wrapped:E=!1}=e,k={},I={},v=(s=Ir("SMUI:generic:input:props"))!==null&&s!==void 0?s:{},M=y,K=x;function L(de){k[de]||t(8,k[de]=!0,k)}function R(de){de in k&&!k[de]||t(8,k[de]=!1,k)}function W(de,N){I[de]!=N&&(N===""||N==null?(delete I[de],t(9,I)):t(9,I[de]=N,I))}function Oe(de){de in I&&(delete I[de],t(9,I))}function me(){return d}return Ur(()=>{t(18,c=new qT({addClass:L,removeClass:R,getWidth:()=>{var N,C;const Q=me(),V=Q.cloneNode(!0);(N=Q.parentNode)===null||N===void 0||N.appendChild(V),V.classList.add("smui-floating-label--remove-transition"),V.classList.add("smui-floating-label--force-size"),V.classList.remove("mdc-floating-label--float-above");const ne=V.scrollWidth;return(C=Q.parentNode)===null||C===void 0||C.removeChild(V),ne},registerInteractionHandler:(N,C)=>me().addEventListener(N,C),deregisterInteractionHandler:(N,C)=>me().removeEventListener(N,C)}));const de={get element(){return me()},addStyle:W,removeStyle:Oe};return $i(d,"SMUIFloatingLabel:mount",de),c.init(),()=>{$i(d,"SMUIFloatingLabel:unmount",de),c.destroy()}}),i.$$set=de=>{e=xt(xt({},e),kr(de)),t(12,n=li(e,r)),"use"in de&&t(2,u=de.use),"class"in de&&t(3,f=de.class),"style"in de&&t(4,m=de.style),"for"in de&&t(5,p=de.for),"floatAbove"in de&&t(0,y=de.floatAbove),"required"in de&&t(1,x=de.required),"wrapped"in de&&t(6,E=de.wrapped),"$$scope"in de&&t(21,o=de.$$scope)},i.$$.update=()=>{786433&i.$$.dirty&&c&&M!==y&&(t(19,M=y),c.float(y)),1310722&i.$$.dirty&&c&&K!==x&&(t(20,K=x),c.setRequired(x))},[y,x,u,f,m,p,E,d,k,I,l,v,n,function(de){c.shake(de)},function(de){t(0,y=de)},function(de){t(1,x=de)},function(){return c.getWidth()},me,c,M,K,o,a,function(de){Ft[de?"unshift":"push"](()=>{d=de,t(7,d)})},function(de){Ft[de?"unshift":"push"](()=>{d=de,t(7,d)})}]}let q0=class extends hr{constructor(e){super(),fr(this,e,ZT,YT,Zi,{use:2,class:3,style:4,for:5,floatAbove:0,required:1,wrapped:6,shake:13,float:14,setRequired:15,getWidth:16,getElement:17})}get shake(){return this.$$.ctx[13]}get float(){return this.$$.ctx[14]}get setRequired(){return this.$$.ctx[15]}get getWidth(){return this.$$.ctx[16]}get getElement(){return this.$$.ctx[17]}};/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var va={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"};/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var KT=function(i){function e(t){var r=i.call(this,Vi(Vi({},e.defaultAdapter),t))||this;return r.transitionEndHandler=function(n){r.handleTransitionEnd(n)},r}return $n(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return va},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(va.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(va.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(va.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var r=this.adapter.hasClass(va.LINE_RIPPLE_DEACTIVATING);t.propertyName==="opacity"&&r&&(this.adapter.removeClass(va.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(va.LINE_RIPPLE_DEACTIVATING))},e}(Ln);function JT(i){let e,t,r,n,a,o,s=[{class:t=Kt(Ei({[i[1]]:!0,"mdc-line-ripple":!0,"mdc-line-ripple--active":i[3]},i[5]))},{style:r=Object.entries(i[6]).map(mp).concat([i[2]]).join(" ")},i[8]],l={};for(let d=0;d`${i}: ${e};`;function QT(i,e,t){const r=["use","class","style","active","activate","deactivate","setRippleCenter","getElement"];let n=li(e,r);const a=$r(nr());let o,s,{use:l=[]}=e,{class:d=""}=e,{style:c=""}=e,{active:u=!1}=e,f={},m={};function p(I){return I in f?f[I]:k().classList.contains(I)}function y(I){f[I]||t(5,f[I]=!0,f)}function x(I){I in f&&!f[I]||t(5,f[I]=!1,f)}function E(I,v){m[I]!=v&&(v===""||v==null?(delete m[I],t(6,m)):t(6,m[I]=v,m))}function k(){return o}return Ur(()=>(s=new KT({addClass:y,removeClass:x,hasClass:p,setStyle:E,registerEventHandler:(I,v)=>k().addEventListener(I,v),deregisterEventHandler:(I,v)=>k().removeEventListener(I,v)}),s.init(),()=>{s.destroy()})),i.$$set=I=>{e=xt(xt({},e),kr(I)),t(8,n=li(e,r)),"use"in I&&t(0,l=I.use),"class"in I&&t(1,d=I.class),"style"in I&&t(2,c=I.style),"active"in I&&t(3,u=I.active)},[l,d,c,u,o,f,m,a,n,function(){s.activate()},function(){s.deactivate()},function(I){s.setRippleCenter(I)},k,function(I){Ft[I?"unshift":"push"](()=>{o=I,t(4,o)})}]}class eI extends hr{constructor(e){super(),fr(this,e,QT,JT,Zi,{use:0,class:1,style:2,active:3,activate:9,deactivate:10,setRippleCenter:11,getElement:12})}get activate(){return this.$$.ctx[9]}get deactivate(){return this.$$.ctx[10]}get setRippleCenter(){return this.$$.ctx[11]}get getElement(){return this.$$.ctx[12]}}/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var tI={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},pp={NOTCH_ELEMENT_PADDING:8},iI={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"};/** + * @license + * Copyright 2017 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var rI=function(i){function e(t){return i.call(this,Vi(Vi({},e.defaultAdapter),t))||this}return $n(e,i),Object.defineProperty(e,"strings",{get:function(){return tI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return iI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return pp},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var r=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=pp.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(r)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},e}(Ln);function gp(i){let e,t,r;const n=i[15].default,a=ci(n,i,i[14],null);return{c(){e=ti("div"),a&&a.c(),si(e,"class","mdc-notched-outline__notch"),si(e,"style",t=Object.entries(i[7]).map(vp).join(" "))},m(o,s){gt(o,e,s),a&&a.m(e,null),r=!0},p(o,s){a&&a.p&&(!r||16384&s)&&fi(a,n,o,o[14],r?ui(n,o[14],s,null):hi(o[14]),null),(!r||128&s&&t!==(t=Object.entries(o[7]).map(vp).join(" ")))&&si(e,"style",t)},i(o){r||($e(a,o),r=!0)},o(o){Be(a,o),r=!1},d(o){o&&mt(e),a&&a.d(o)}}}function nI(i){let e,t,r,n,a,o,s,l,d,c,u=!i[3]&&gp(i),f=[{class:o=Kt(Ei({[i[1]]:!0,"mdc-notched-outline":!0,"mdc-notched-outline--notched":i[2],"mdc-notched-outline--no-label":i[3]},i[6]))},i[10]],m={};for(let p=0;p{u=null}),rr()):u?(u.p(p,y),8&y&&$e(u,1)):(u=gp(p),u.c(),$e(u,1),u.m(e,n)),Oi(e,m=wi(f,[(!l||78&y&&o!==(o=Kt(Ei({[p[1]]:!0,"mdc-notched-outline":!0,"mdc-notched-outline--notched":p[2],"mdc-notched-outline--no-label":p[3]},p[6]))))&&{class:o},1024&y&&p[10]])),s&&Li(s.update)&&1&y&&s.update.call(null,p[0])},i(p){l||($e(u),l=!0)},o(p){Be(u),l=!1},d(p){p&&mt(e),u&&u.d(),i[16](null),d=!1,Hi(c)}}}const vp=([i,e])=>`${i}: ${e};`;function aI(i,e,t){const r=["use","class","notched","noLabel","notch","closeNotch","getElement"];let n=li(e,r),{$$slots:a={},$$scope:o}=e;const s=$r(nr());let l,d,c,{use:u=[]}=e,{class:f=""}=e,{notched:m=!1}=e,{noLabel:p=!1}=e,y={},x={};function E(I){y[I]||t(6,y[I]=!0,y)}function k(I){I in y&&!y[I]||t(6,y[I]=!1,y)}return Ur(()=>(d=new rI({addClass:E,removeClass:k,setNotchWidthProperty:I=>{return M=I+"px",void(x[v="width"]!=M&&(M===""||M==null?(delete x[v],t(7,x)):t(7,x[v]=M,x)));var v,M},removeNotchWidthProperty:()=>{var I;(I="width")in x&&(delete x[I],t(7,x))}}),d.init(),()=>{d.destroy()})),i.$$set=I=>{e=xt(xt({},e),kr(I)),t(10,n=li(e,r)),"use"in I&&t(0,u=I.use),"class"in I&&t(1,f=I.class),"notched"in I&&t(2,m=I.notched),"noLabel"in I&&t(3,p=I.noLabel),"$$scope"in I&&t(14,o=I.$$scope)},i.$$.update=()=>{16&i.$$.dirty&&(c?(c.addStyle("transition-duration","0s"),E("mdc-notched-outline--upgraded"),requestAnimationFrame(()=>{c&&c.removeStyle("transition-duration")})):k("mdc-notched-outline--upgraded"))},[u,f,m,p,c,l,y,x,s,function(I){t(4,c=I.detail)},n,function(I){d.notch(I)},function(){d.closeNotch()},function(){return l},o,a,function(I){Ft[I?"unshift":"push"](()=>{l=I,t(5,l)})},()=>t(4,c=void 0)]}let oI=class extends hr{constructor(e){super(),fr(this,e,aI,nI,Zi,{use:0,class:1,notched:2,noLabel:3,notch:11,closeNotch:12,getElement:13})}get notch(){return this.$$.ctx[11]}get closeNotch(){return this.$$.ctx[12]}get getElement(){return this.$$.ctx[13]}};var sI=pn({class:"mdc-text-field-helper-line",tag:"div"}),lI=pn({class:"mdc-text-field__affix mdc-text-field__affix--prefix",tag:"span"}),dI=pn({class:"mdc-text-field__affix mdc-text-field__affix--suffix",tag:"span"});function cI(i){let e,t,r,n,a,o=[{class:t=Kt({[i[1]]:!0,"mdc-text-field__input":!0})},{type:i[2]},{placeholder:i[3]},i[4],i[6],i[10]],s={};for(let l=0;l{},{use:s=[]}=e,{class:l=""}=e,{type:d="text"}=e,{placeholder:c=" "}=e,{value:u=o}=e;const f=function(R){return R===o}(u);f&&(u="");let{files:m=null}=e,{dirty:p=!1}=e,{invalid:y=!1}=e,{updateInvalid:x=!0}=e,{emptyValueNull:E=u===null}=e;f&&E&&(u=null);let k,{emptyValueUndefined:I=u===void 0}=e;f&&I&&(u=void 0);let v={},M={};function K(R){if(d!=="file")if(R.currentTarget.value===""&&E)t(11,u=null);else if(R.currentTarget.value===""&&I)t(11,u=void 0);else switch(d){case"number":case"range":t(11,u=function(W){return W===""?Number.NaN:+W}(R.currentTarget.value));break;default:t(11,u=R.currentTarget.value)}else t(12,m=R.currentTarget.files)}function L(){return k}return Ur(()=>{x&&t(14,y=k.matches(":invalid"))}),i.$$set=R=>{e=xt(xt({},e),kr(R)),t(10,n=li(e,r)),"use"in R&&t(0,s=R.use),"class"in R&&t(1,l=R.class),"type"in R&&t(2,d=R.type),"placeholder"in R&&t(3,c=R.placeholder),"value"in R&&t(11,u=R.value),"files"in R&&t(12,m=R.files),"dirty"in R&&t(13,p=R.dirty),"invalid"in R&&t(14,y=R.invalid),"updateInvalid"in R&&t(15,x=R.updateInvalid),"emptyValueNull"in R&&t(16,E=R.emptyValueNull),"emptyValueUndefined"in R&&t(17,I=R.emptyValueUndefined)},i.$$.update=()=>{2068&i.$$.dirty&&(d==="file"?(delete M.value,t(4,M),t(2,d),t(11,u)):t(4,M.value=u==null?"":u,M))},[s,l,d,c,M,k,v,a,K,function(R){d!=="file"&&d!=="range"||K(R),t(13,p=!0),x&&t(14,y=k.matches(":invalid"))},n,u,m,p,y,x,E,I,function(R){var W;return R in v?(W=v[R])!==null&&W!==void 0?W:null:L().getAttribute(R)},function(R,W){v[R]!==W&&t(6,v[R]=W,v)},function(R){R in v&&v[R]==null||t(6,v[R]=void 0,v)},function(){L().focus()},function(){L().blur()},L,function(R){hd.call(this,i,R)},function(R){hd.call(this,i,R)},function(R){Ft[R?"unshift":"push"](()=>{k=R,t(5,k)})},R=>d!=="file"&&K(R)]}let fI=class extends hr{constructor(e){super(),fr(this,e,uI,cI,Zi,{use:0,class:1,type:2,placeholder:3,value:11,files:12,dirty:13,invalid:14,updateInvalid:15,emptyValueNull:16,emptyValueUndefined:17,getAttr:18,addAttr:19,removeAttr:20,focus:21,blur:22,getElement:23})}get getAttr(){return this.$$.ctx[18]}get addAttr(){return this.$$.ctx[19]}get removeAttr(){return this.$$.ctx[20]}get focus(){return this.$$.ctx[21]}get blur(){return this.$$.ctx[22]}get getElement(){return this.$$.ctx[23]}};function hI(i){let e,t,r,n,a,o,s=[{class:t=Kt({[i[2]]:!0,"mdc-text-field__input":!0})},{style:r=`${i[4]?"":"resize: none; "}${i[3]}`},i[6],i[9]],l={};for(let d=0;d{m&&t(11,f=o.matches(":invalid"))}),i.$$set=E=>{e=xt(xt({},e),kr(E)),t(9,n=li(e,r)),"use"in E&&t(1,s=E.use),"class"in E&&t(2,l=E.class),"style"in E&&t(3,d=E.style),"value"in E&&t(0,c=E.value),"dirty"in E&&t(10,u=E.dirty),"invalid"in E&&t(11,f=E.invalid),"updateInvalid"in E&&t(12,m=E.updateInvalid),"resizable"in E&&t(4,p=E.resizable)},[c,s,l,d,p,o,y,a,function(){t(10,u=!0),m&&t(11,f=o.matches(":invalid"))},n,u,f,m,function(E){var k;return E in y?(k=y[E])!==null&&k!==void 0?k:null:x().getAttribute(E)},function(E,k){y[E]!==k&&t(6,y[E]=k,y)},function(E){E in y&&y[E]==null||t(6,y[E]=void 0,y)},function(){x().focus()},function(){x().blur()},x,function(E){hd.call(this,i,E)},function(E){hd.call(this,i,E)},function(E){Ft[E?"unshift":"push"](()=>{o=E,t(5,o)})},function(){c=this.value,t(0,c)}]}let pI=class extends hr{constructor(e){super(),fr(this,e,mI,hI,Zi,{use:1,class:2,style:3,value:0,dirty:10,invalid:11,updateInvalid:12,resizable:4,getAttr:13,addAttr:14,removeAttr:15,focus:16,blur:17,getElement:18})}get getAttr(){return this.$$.ctx[13]}get addAttr(){return this.$$.ctx[14]}get removeAttr(){return this.$$.ctx[15]}get focus(){return this.$$.ctx[16]}get blur(){return this.$$.ctx[17]}get getElement(){return this.$$.ctx[18]}};/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var zc={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"},gI={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"},bp={LABEL_SCALE:.75},vI=["pattern","min","max","required","step","minlength","maxlength"],bI=["color","date","datetime-local","month","range","time","week"];/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var _p=["mousedown","touchstart"],yp=["click","keydown"],_I=function(i){function e(t,r){r===void 0&&(r={});var n=i.call(this,Vi(Vi({},e.defaultAdapter),t))||this;return n.isFocused=!1,n.receivedUserInput=!1,n.valid=!0,n.useNativeValidation=!0,n.validateOnValueChange=!0,n.helperText=r.helperText,n.characterCounter=r.characterCounter,n.leadingIcon=r.leadingIcon,n.trailingIcon=r.trailingIcon,n.inputFocusHandler=function(){n.activateFocus()},n.inputBlurHandler=function(){n.deactivateFocus()},n.inputInputHandler=function(){n.handleInput()},n.setPointerXOffset=function(a){n.setTransformOrigin(a)},n.textFieldInteractionHandler=function(){n.handleTextFieldInteraction()},n.validationAttributeChangeHandler=function(a){n.handleValidationAttributeChange(a)},n}return $n(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return gI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return zc},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return bp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return bI.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"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}),e.prototype.init=function(){var t,r,n,a;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 o=Jr(_p),s=o.next();!s.done;s=o.next()){var l=s.value;this.adapter.registerInputInteractionHandler(l,this.setPointerXOffset)}}catch(u){t={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}try{for(var d=Jr(yp),c=d.next();!c.done;c=d.next())l=c.value,this.adapter.registerTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}catch(u){n={error:u}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},e.prototype.destroy=function(){var t,r,n,a;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var o=Jr(_p),s=o.next();!s.done;s=o.next()){var l=s.value;this.adapter.deregisterInputInteractionHandler(l,this.setPointerXOffset)}}catch(u){t={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}try{for(var d=Jr(yp),c=d.next();!c.done;c=d.next())l=c.value,this.adapter.deregisterTextFieldInteractionHandler(l,this.textFieldInteractionHandler)}catch(u){n={error:u}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},e.prototype.handleValidationAttributeChange=function(t){var r=this;t.some(function(n){return vI.indexOf(n)>-1&&(r.styleValidity(!0),r.adapter.setLabelRequired(r.getNativeInput().required),!0)}),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var r=this.adapter.getLabelWidth()*bp.LABEL_SCALE;this.adapter.notchOutline(r)}else this.adapter.closeOutline()},e.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()},e.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var r=t.touches,n=r?r[0]:t,a=n.target.getBoundingClientRect(),o=n.clientX-a.left;this.adapter.setLineRippleTransformOrigin(o)}},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),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)},e.prototype.getValue=function(){return this.getNativeInput().value},e.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var r=this.isValid();this.styleValidity(r)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},e.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var r=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(r)},e.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},e.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},e.prototype.isDisabled=function(){return this.getNativeInput().disabled},e.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},e.prototype.setcharacterCounter=function(t){if(this.characterCounter){var r=this.getNativeInput().maxLength;if(r===-1)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,r)}},e.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},e.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},e.prototype.styleValidity=function(t){var r=e.cssClasses.INVALID;if(t?this.adapter.removeClass(r):this.adapter.addClass(r),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var n=this.helperText.isVisible(),a=this.helperText.getId();n&&a?this.adapter.setInputAttr(zc.ARIA_DESCRIBEDBY,a):this.adapter.removeInputAttr(zc.ARIA_DESCRIBEDBY)}},e.prototype.styleFocused=function(t){var r=e.cssClasses.FOCUSED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.styleDisabled=function(t){var r=e.cssClasses,n=r.DISABLED,a=r.INVALID;t?(this.adapter.addClass(n),this.adapter.removeClass(a)):this.adapter.removeClass(n),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},e.prototype.styleFloating=function(t){var r=e.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(r):this.adapter.removeClass(r)},e.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e}(Ln);const yI=i=>({}),xp=i=>({}),xI=i=>({}),wp=i=>({}),wI=i=>({}),Sp=i=>({}),SI=i=>({}),Ep=i=>({}),EI=i=>({}),Tp=i=>({}),TI=i=>({}),Ip=i=>({}),II=i=>({}),Ap=i=>({}),AI=i=>({}),Cp=i=>({}),CI=i=>({}),kp=i=>({}),kI=i=>({}),$p=i=>({}),$I=i=>({}),Lp=i=>({}),LI=i=>({}),Op=i=>({});function OI(i){let e,t,r,n,a,o,s,l,d,c,u,f,m,p;const y=i[56].label,x=ci(y,i,i[87],Tp);r=new gd({props:{key:"SMUI:textfield:icon:leading",value:!0,$$slots:{default:[FI]},$$scope:{ctx:i}}});const E=i[56].default,k=ci(E,i,i[87],null);o=new gd({props:{key:"SMUI:textfield:icon:leading",value:!1,$$slots:{default:[NI]},$$scope:{ctx:i}}});const I=i[56].ripple,v=ci(I,i,i[87],wp);let M=[{class:l=Kt(Ei({[i[9]]:!0,"mdc-text-field":!0,"mdc-text-field--disabled":i[12],"mdc-text-field--textarea":i[14],"mdc-text-field--filled":i[15]==="filled","mdc-text-field--outlined":i[15]==="outlined","smui-text-field--standard":i[15]==="standard"&&!i[14],"mdc-text-field--no-label":i[16]||!i[47].label,"mdc-text-field--with-leading-icon":i[47].leadingIcon,"mdc-text-field--with-trailing-icon":i[47].trailingIcon,"mdc-text-field--invalid":i[1]},i[25]))},{style:d=Object.entries(i[26]).map(jp).concat([i[10]]).join(" ")},pd(i[46],["input$","label$","ripple$","outline$","helperLine$"])],K={};for(let L=0;L{I=null}),rr()):I?(I.p(N,C),49152&C[0]&&$e(I,1)):(I=Rp(N),I.c(),$e(I,1),I.m(e,t)),N[14]||N[15]==="outlined"?v?(v.p(N,C),49152&C[0]&&$e(v,1)):(v=Pp(N),v.c(),$e(v,1),v.m(e,r)):v&&(ir(),Be(v,1,1,()=>{v=null}),rr());const Q={};33554432&C[2]&&(Q.$$scope={dirty:C,ctx:N}),n.$set(Q),K&&K.p&&(!x||33554432&C[2])&&fi(K,M,N,N[87],x?ui(M,N[87],C,null):hi(N[87]),null);let V=s;s=W(N),s===V?R[s].p(N,C):(ir(),Be(R[V],1,1,()=>{R[V]=null}),rr(),l=R[s],l?l.p(N,C):(l=R[s]=L[s](N),l.c()),$e(l,1),l.m(e,d));const ne={};33554432&C[2]&&(ne.$$scope={dirty:C,ctx:N}),c.$set(ne),!N[14]&&N[15]!=="outlined"&&N[11]?Oe?(Oe.p(N,C),51200&C[0]&&$e(Oe,1)):(Oe=Bp(N),Oe.c(),$e(Oe,1),Oe.m(e,null)):Oe&&(ir(),Be(Oe,1,1,()=>{Oe=null}),rr()),Oi(e,de=wi(me,[(!x||314823171&C[0]|65536&C[1]&&f!==(f=Kt(Ei({[N[9]]:!0,"mdc-text-field":!0,"mdc-text-field--disabled":N[12],"mdc-text-field--textarea":N[14],"mdc-text-field--filled":N[15]==="filled","mdc-text-field--outlined":N[15]==="outlined","smui-text-field--standard":N[15]==="standard"&&!N[14],"mdc-text-field--no-label":N[16]||N[17]==null&&!N[47].label,"mdc-text-field--label-floating":N[28]||N[0]!=null&&N[0]!=="","mdc-text-field--with-leading-icon":N[35](N[22])?N[47].leadingIcon:N[22],"mdc-text-field--with-trailing-icon":N[35](N[23])?N[47].trailingIcon:N[23],"mdc-text-field--with-internal-counter":N[14]&&N[47].internalCounter,"mdc-text-field--invalid":N[1]},N[25]))))&&{class:f},(!x||67109888&C[0]&&m!==(m=Object.entries(N[26]).map(Gp).concat([N[10]]).join(" ")))&&{style:m},{for:void 0},32768&C[1]&&pd(N[46],["input$","label$","ripple$","outline$","helperLine$"])])),p&&Li(p.update)&&49152&C[0]|4&C[1]&&p.update.call(null,{ripple:!N[14]&&N[15]==="filled",unbounded:!1,addClass:N[43],removeClass:N[44],addStyle:N[45],eventTarget:N[33],activeTarget:N[33],initPromise:N[37]}),y&&Li(y.update)&&256&C[0]&&y.update.call(null,N[8])},i(N){x||($e(I),$e(v),$e(n.$$.fragment,N),$e(K,N),$e(l),$e(c.$$.fragment,N),$e(Oe),x=!0)},o(N){Be(I),Be(v),Be(n.$$.fragment,N),Be(K,N),Be(l),Be(c.$$.fragment,N),Be(Oe),x=!1},d(N){N&&mt(e),I&&I.d(),v&&v.d(),Zt(n),K&&K.d(N),R[s].d(),Zt(c),Oe&&Oe.d(),i[78](null),E=!1,Hi(k)}}}function FI(i){let e;const t=i[56].leadingIcon,r=ci(t,i,i[87],Ep);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||33554432&a[2])&&fi(r,t,n,n[87],e?ui(t,n[87],a,SI):hi(n[87]),Ep)},i(n){e||($e(r,n),e=!0)},o(n){Be(r,n),e=!1},d(n){r&&r.d(n)}}}function NI(i){let e;const t=i[56].trailingIcon,r=ci(t,i,i[87],Sp);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||33554432&a[2])&&fi(r,t,n,n[87],e?ui(t,n[87],a,wI):hi(n[87]),Sp)},i(n){e||($e(r,n),e=!0)},o(n){Be(r,n),e=!1},d(n){r&&r.d(n)}}}function Rp(i){let e,t,r,n=i[15]==="filled"&&Fp(),a=!i[16]&&(i[17]!=null||i[47].label)&&Np(i);return{c(){n&&n.c(),e=Ti(),a&&a.c(),t=br()},m(o,s){n&&n.m(o,s),gt(o,e,s),a&&a.m(o,s),gt(o,t,s),r=!0},p(o,s){o[15]==="filled"?n||(n=Fp(),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),o[16]||o[17]==null&&!o[47].label?a&&(ir(),Be(a,1,1,()=>{a=null}),rr()):a?(a.p(o,s),196608&s[0]|65536&s[1]&&$e(a,1)):(a=Np(o),a.c(),$e(a,1),a.m(t.parentNode,t))},i(o){r||($e(a),r=!0)},o(o){Be(a),r=!1},d(o){n&&n.d(o),o&&mt(e),a&&a.d(o),o&&mt(t)}}}function Fp(i){let e;return{c(){e=ti("span"),si(e,"class","mdc-text-field__ripple")},m(t,r){gt(t,e,r)},d(t){t&&mt(e)}}}function Np(i){let e,t;const r=[{floatAbove:i[28]||i[0]!=null&&i[0]!==""&&(typeof i[0]!="number"||!isNaN(i[0]))},{required:i[13]},{wrapped:!0},Cr(i[46],"label$")];let n={$$slots:{default:[PI]},$$scope:{ctx:i}};for(let a=0;a{r=null}),rr()):r?(r.p(n,a),196608&a[0]|65536&a[1]&&$e(r,1)):(r=Dp(n),r.c(),$e(r,1),r.m(e.parentNode,e))},i(n){t||($e(r),t=!0)},o(n){Be(r),t=!1},d(n){r&&r.d(n),n&&mt(e)}}}function zI(i){let e;const t=i[56].leadingIcon,r=ci(t,i,i[87],$p);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||33554432&a[2])&&fi(r,t,n,n[87],e?ui(t,n[87],a,kI):hi(n[87]),$p)},i(n){e||($e(r,n),e=!0)},o(n){Be(r,n),e=!1},d(n){r&&r.d(n)}}}function BI(i){let e,t,r,n,a,o,s,l,d,c;const u=i[56].prefix,f=ci(u,i,i[87],Cp);let m=i[20]!=null&&Mp(i);const p=[{type:i[18]},{disabled:i[12]},{required:i[13]},{updateInvalid:i[19]},{"aria-controls":i[27]},{"aria-describedby":i[27]},i[16]&&i[17]!=null?{placeholder:i[17]}:{},Cr(i[46],"input$")];function y(L){i[69](L)}function x(L){i[70](L)}function E(L){i[71](L)}function k(L){i[72](L)}let I={};for(let L=0;LKr(r,"value",y)),Ft.push(()=>Kr(r,"files",x)),Ft.push(()=>Kr(r,"dirty",E)),Ft.push(()=>Kr(r,"invalid",k)),r.$on("blur",i[73]),r.$on("focus",i[74]),r.$on("blur",i[75]),r.$on("focus",i[76]);let v=i[21]!=null&&zp(i);const M=i[56].suffix,K=ci(M,i,i[87],Ap);return{c(){f&&f.c(),e=Ti(),m&&m.c(),t=Ti(),Jt(r.$$.fragment),l=Ti(),v&&v.c(),d=Ti(),K&&K.c()},m(L,R){f&&f.m(L,R),gt(L,e,R),m&&m.m(L,R),gt(L,t,R),Yt(r,L,R),gt(L,l,R),v&&v.m(L,R),gt(L,d,R),K&&K.m(L,R),c=!0},p(L,R){f&&f.p&&(!c||33554432&R[2])&&fi(f,u,L,L[87],c?ui(u,L[87],R,AI):hi(L[87]),Cp),L[20]!=null?m?(m.p(L,R),1048576&R[0]&&$e(m,1)):(m=Mp(L),m.c(),$e(m,1),m.m(t.parentNode,t)):m&&(ir(),Be(m,1,1,()=>{m=null}),rr());const W=135213056&R[0]|32768&R[1]?wi(p,[262144&R[0]&&{type:L[18]},4096&R[0]&&{disabled:L[12]},8192&R[0]&&{required:L[13]},524288&R[0]&&{updateInvalid:L[19]},134217728&R[0]&&{"aria-controls":L[27]},134217728&R[0]&&{"aria-describedby":L[27]},196608&R[0]&&tr(L[16]&&L[17]!=null?{placeholder:L[17]}:{}),32768&R[1]&&tr(Cr(L[46],"input$"))]):{};!n&&1&R[0]&&(n=!0,W.value=L[0],Zr(()=>n=!1)),!a&&8&R[0]&&(a=!0,W.files=L[3],Zr(()=>a=!1)),!o&&16&R[0]&&(o=!0,W.dirty=L[4],Zr(()=>o=!1)),!s&&2&R[0]&&(s=!0,W.invalid=L[1],Zr(()=>s=!1)),r.$set(W),L[21]!=null?v?(v.p(L,R),2097152&R[0]&&$e(v,1)):(v=zp(L),v.c(),$e(v,1),v.m(d.parentNode,d)):v&&(ir(),Be(v,1,1,()=>{v=null}),rr()),K&&K.p&&(!c||33554432&R[2])&&fi(K,M,L,L[87],c?ui(M,L[87],R,II):hi(L[87]),Ap)},i(L){c||($e(f,L),$e(m),$e(r.$$.fragment,L),$e(v),$e(K,L),c=!0)},o(L){Be(f,L),Be(m),Be(r.$$.fragment,L),Be(v),Be(K,L),c=!1},d(L){f&&f.d(L),L&&mt(e),m&&m.d(L),L&&mt(t),i[68](null),Zt(r,L),L&&mt(l),v&&v.d(L),L&&mt(d),K&&K.d(L)}}}function UI(i){let e,t,r,n,a,o,s,l;const d=[{disabled:i[12]},{required:i[13]},{updateInvalid:i[19]},{"aria-controls":i[27]},{"aria-describedby":i[27]},Cr(i[46],"input$")];function c(x){i[61](x)}function u(x){i[62](x)}function f(x){i[63](x)}let m={};for(let x=0;xKr(t,"value",c)),Ft.push(()=>Kr(t,"dirty",u)),Ft.push(()=>Kr(t,"invalid",f)),t.$on("blur",i[64]),t.$on("focus",i[65]),t.$on("blur",i[66]),t.$on("focus",i[67]);const p=i[56].internalCounter,y=ci(p,i,i[87],kp);return{c(){e=ti("span"),Jt(t.$$.fragment),o=Ti(),y&&y.c(),si(e,"class",s=Kt({"mdc-text-field__resizer":!("input$resizable"in i[46])||i[46].input$resizable}))},m(x,E){gt(x,e,E),Yt(t,e,null),ji(e,o),y&&y.m(e,null),l=!0},p(x,E){const k=134754304&E[0]|32768&E[1]?wi(d,[4096&E[0]&&{disabled:x[12]},8192&E[0]&&{required:x[13]},524288&E[0]&&{updateInvalid:x[19]},134217728&E[0]&&{"aria-controls":x[27]},134217728&E[0]&&{"aria-describedby":x[27]},32768&E[1]&&tr(Cr(x[46],"input$"))]):{};!r&&1&E[0]&&(r=!0,k.value=x[0],Zr(()=>r=!1)),!n&&16&E[0]&&(n=!0,k.dirty=x[4],Zr(()=>n=!1)),!a&&2&E[0]&&(a=!0,k.invalid=x[1],Zr(()=>a=!1)),t.$set(k),y&&y.p&&(!l||33554432&E[2])&&fi(y,p,x,x[87],l?ui(p,x[87],E,CI):hi(x[87]),kp),(!l||32768&E[1]&&s!==(s=Kt({"mdc-text-field__resizer":!("input$resizable"in x[46])||x[46].input$resizable})))&&si(e,"class",s)},i(x){l||($e(t.$$.fragment,x),$e(y,x),l=!0)},o(x){Be(t.$$.fragment,x),Be(y,x),l=!1},d(x){x&&mt(e),i[60](null),Zt(t),y&&y.d(x)}}}function Mp(i){let e,t;return e=new lI({props:{$$slots:{default:[GI]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};1048576&n[0]|33554432&n[2]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||($e(e.$$.fragment,r),t=!0)},o(r){Be(e.$$.fragment,r),t=!1},d(r){Zt(e,r)}}}function GI(i){let e;return{c(){e=mn(i[20])},m(t,r){gt(t,e,r)},p(t,r){1048576&r[0]&&Na(e,t[20])},d(t){t&&mt(e)}}}function zp(i){let e,t;return e=new dI({props:{$$slots:{default:[jI]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};2097152&n[0]|33554432&n[2]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||($e(e.$$.fragment,r),t=!0)},o(r){Be(e.$$.fragment,r),t=!1},d(r){Zt(e,r)}}}function jI(i){let e;return{c(){e=mn(i[21])},m(t,r){gt(t,e,r)},p(t,r){2097152&r[0]&&Na(e,t[21])},d(t){t&&mt(e)}}}function VI(i){let e;const t=i[56].trailingIcon,r=ci(t,i,i[87],Ip);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||33554432&a[2])&&fi(r,t,n,n[87],e?ui(t,n[87],a,TI):hi(n[87]),Ip)},i(n){e||($e(r,n),e=!0)},o(n){Be(r,n),e=!1},d(n){r&&r.d(n)}}}function Bp(i){let e,t;const r=[Cr(i[46],"ripple$")];let n={};for(let a=0;a{l=null}),rr())},i(d){a||($e(t),$e(l),a=!0)},o(d){Be(t),Be(l),a=!1},d(d){s[e].d(d),d&&mt(r),l&&l.d(d),d&&mt(n)}}}const Gp=([i,e])=>`${i}: ${e};`,jp=([i,e])=>`${i}: ${e};`;function WI(i,e,t){let r;const n=["use","class","style","ripple","disabled","required","textarea","variant","noLabel","label","type","value","files","invalid","updateInvalid","dirty","prefix","suffix","validateOnValueChange","useNativeValidation","withLeadingIcon","withTrailingIcon","input","floatingLabel","lineRipple","notchedOutline","focus","blur","layout","getElement"];let a=li(e,n),{$$slots:o={},$$scope:s}=e;const l=NE(o),{applyPassive:d}=V0,c=$r(nr());let u=()=>{};function f(X){return X===u}let{use:m=[]}=e,{class:p=""}=e,{style:y=""}=e,{ripple:x=!0}=e,{disabled:E=!1}=e,{required:k=!1}=e,{textarea:I=!1}=e,{variant:v=I?"outlined":"standard"}=e,{noLabel:M=!1}=e,{label:K}=e,{type:L="text"}=e,{value:R=a.input$emptyValueUndefined?void 0:u}=e,{files:W=u}=e;const Oe=!f(R)||!f(W);f(R)&&(R=void 0),f(W)&&(W=null);let{invalid:me=u}=e,{updateInvalid:de=f(me)}=e;f(me)&&(me=!1);let N,C,Q,V,ne,Ve,Re,Ge,tt,{dirty:ot=!1}=e,{prefix:he}=e,{suffix:bt}=e,{validateOnValueChange:wt=de}=e,{useNativeValidation:pt=de}=e,{withLeadingIcon:Lt=u}=e,{withTrailingIcon:xe=u}=e,{input:le}=e,{floatingLabel:Qe}=e,{lineRipple:dt}=e,{notchedOutline:Se}=e,Ot={},It={},ii=!1,vi=Ir("SMUI:addLayoutListener"),Ki=new Promise(X=>ne=X),Vt=R;function we(X){var bi;return X in Ot?(bi=Ot[X])!==null&&bi!==void 0?bi:null:_().classList.contains(X)}function st(X){Ot[X]||t(25,Ot[X]=!0,Ot)}function ft(X){X in Ot&&!Ot[X]||t(25,Ot[X]=!1,Ot)}function Qt(){if(C){const X=C.shouldFloat;C.notchOutline(X)}}function _(){return N}return vi&&(V=vi(Qt)),Ur(()=>{if(t(54,C=new _I({addClass:st,removeClass:ft,hasClass:we,registerTextFieldInteractionHandler:(X,bi)=>_().addEventListener(X,bi),deregisterTextFieldInteractionHandler:(X,bi)=>_().removeEventListener(X,bi),registerValidationAttributeChangeHandler:X=>{const bi=new MutationObserver(Ze=>{pt&&X((et=>et.map(ge=>ge.attributeName).filter(ge=>ge))(Ze))}),Ma={attributes:!0};return le&&bi.observe(le.getElement(),Ma),bi},deregisterValidationAttributeChangeHandler:X=>{X.disconnect()},getNativeInput:()=>{var X;return(X=le==null?void 0:le.getElement())!==null&&X!==void 0?X:null},setInputAttr:(X,bi)=>{le==null||le.addAttr(X,bi)},removeInputAttr:X=>{le==null||le.removeAttr(X)},isFocused:()=>document.activeElement===(le==null?void 0:le.getElement()),registerInputInteractionHandler:(X,bi)=>{le==null||le.getElement().addEventListener(X,bi,d())},deregisterInputInteractionHandler:(X,bi)=>{le==null||le.getElement().removeEventListener(X,bi,d())},floatLabel:X=>Qe&&Qe.float(X),getLabelWidth:()=>Qe?Qe.getWidth():0,hasLabel:()=>!!Qe,shakeLabel:X=>Qe&&Qe.shake(X),setLabelRequired:X=>Qe&&Qe.setRequired(X),activateLineRipple:()=>dt&&dt.activate(),deactivateLineRipple:()=>dt&&dt.deactivate(),setLineRippleTransformOrigin:X=>dt&&dt.setRippleCenter(X),closeOutline:()=>Se&&Se.closeNotch(),hasOutline:()=>!!Se,notchOutline:X=>Se&&Se.notch(X)},{get helperText(){return Ge},get characterCounter(){return tt},get leadingIcon(){return Ve},get trailingIcon(){return Re}})),Oe){if(le==null)throw new Error("SMUI Textfield initialized without Input component.");C.init()}else VE().then(()=>{if(le==null)throw new Error("SMUI Textfield initialized without Input component.");C.init()});return ne(),()=>{C.destroy()}}),Pa(()=>{V&&V()}),i.$$set=X=>{e=xt(xt({},e),kr(X)),t(46,a=li(e,n)),"use"in X&&t(8,m=X.use),"class"in X&&t(9,p=X.class),"style"in X&&t(10,y=X.style),"ripple"in X&&t(11,x=X.ripple),"disabled"in X&&t(12,E=X.disabled),"required"in X&&t(13,k=X.required),"textarea"in X&&t(14,I=X.textarea),"variant"in X&&t(15,v=X.variant),"noLabel"in X&&t(16,M=X.noLabel),"label"in X&&t(17,K=X.label),"type"in X&&t(18,L=X.type),"value"in X&&t(0,R=X.value),"files"in X&&t(3,W=X.files),"invalid"in X&&t(1,me=X.invalid),"updateInvalid"in X&&t(19,de=X.updateInvalid),"dirty"in X&&t(4,ot=X.dirty),"prefix"in X&&t(20,he=X.prefix),"suffix"in X&&t(21,bt=X.suffix),"validateOnValueChange"in X&&t(48,wt=X.validateOnValueChange),"useNativeValidation"in X&&t(49,pt=X.useNativeValidation),"withLeadingIcon"in X&&t(22,Lt=X.withLeadingIcon),"withTrailingIcon"in X&&t(23,xe=X.withTrailingIcon),"input"in X&&t(2,le=X.input),"floatingLabel"in X&&t(5,Qe=X.floatingLabel),"lineRipple"in X&&t(6,dt=X.lineRipple),"notchedOutline"in X&&t(7,Se=X.notchedOutline),"$$scope"in X&&t(87,s=X.$$scope)},i.$$.update=()=>{if(4&i.$$.dirty[0]&&t(33,r=le&&le.getElement()),524290&i.$$.dirty[0]|8388608&i.$$.dirty[1]&&C&&C.isValid()!==!me&&(de?t(1,me=!C.isValid()):C.setValid(!me)),8519680&i.$$.dirty[1]&&C&&C.getValidateOnValueChange()!==wt&&C.setValidateOnValueChange(!f(wt)&&wt),8650752&i.$$.dirty[1]&&C&&C.setUseNativeValidation(!!f(pt)||pt),4096&i.$$.dirty[0]|8388608&i.$$.dirty[1]&&C&&C.setDisabled(E),1&i.$$.dirty[0]|25165824&i.$$.dirty[1]&&C&&Oe&&Vt!==R){t(55,Vt=R);const X=`${R}`;C.getValue()!==X&&C.setValue(X)}},[R,me,le,W,ot,Qe,dt,Se,m,p,y,x,E,k,I,v,M,K,L,de,he,bt,Lt,xe,N,Ot,It,Q,ii,Ve,Re,Ge,tt,r,c,f,Oe,Ki,function(X){t(29,Ve=X.detail)},function(X){t(30,Re=X.detail)},function(X){t(32,tt=X.detail)},function(X){t(27,Q=X.detail)},function(X){t(31,Ge=X.detail)},st,ft,function(X,bi){It[X]!=bi&&(bi===""||bi==null?(delete It[X],t(26,It)):t(26,It[X]=bi,It))},a,l,wt,pt,function(){le==null||le.focus()},function(){le==null||le.blur()},Qt,_,C,Vt,o,function(X){Ft[X?"unshift":"push"](()=>{Qe=X,t(5,Qe)})},function(X){Ft[X?"unshift":"push"](()=>{Qe=X,t(5,Qe)})},function(X){Ft[X?"unshift":"push"](()=>{Se=X,t(7,Se)})},function(X){Ft[X?"unshift":"push"](()=>{le=X,t(2,le)})},function(X){R=X,t(0,R)},function(X){ot=X,t(4,ot)},function(X){me=X,t(1,me),t(54,C),t(19,de)},()=>t(28,ii=!1),()=>t(28,ii=!0),X=>$i(N,"blur",X),X=>$i(N,"focus",X),function(X){Ft[X?"unshift":"push"](()=>{le=X,t(2,le)})},function(X){R=X,t(0,R)},function(X){W=X,t(3,W)},function(X){ot=X,t(4,ot)},function(X){me=X,t(1,me),t(54,C),t(19,de)},()=>t(28,ii=!1),()=>t(28,ii=!0),X=>$i(N,"blur",X),X=>$i(N,"focus",X),function(X){Ft[X?"unshift":"push"](()=>{dt=X,t(6,dt)})},function(X){Ft[X?"unshift":"push"](()=>{N=X,t(24,N)})},()=>t(29,Ve=void 0),()=>t(30,Re=void 0),()=>t(32,tt=void 0),function(X){Ft[X?"unshift":"push"](()=>{N=X,t(24,N)})},()=>t(29,Ve=void 0),()=>t(30,Re=void 0),()=>{t(27,Q=void 0),t(31,Ge=void 0)},()=>t(32,tt=void 0),s]}let XI=class extends hr{constructor(e){super(),fr(this,e,WI,qI,Zi,{use:8,class:9,style:10,ripple:11,disabled:12,required:13,textarea:14,variant:15,noLabel:16,label:17,type:18,value:0,files:3,invalid:1,updateInvalid:19,dirty:4,prefix:20,suffix:21,validateOnValueChange:48,useNativeValidation:49,withLeadingIcon:22,withTrailingIcon:23,input:2,floatingLabel:5,lineRipple:6,notchedOutline:7,focus:50,blur:51,layout:52,getElement:53},null,[-1,-1,-1,-1])}get focus(){return this.$$.ctx[50]}get blur(){return this.$$.ctx[51]}get layout(){return this.$$.ctx[52]}get getElement(){return this.$$.ctx[53]}};/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Vp={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},YI={ROOT:"mdc-text-field__icon"};/** + * @license + * Copyright 2017 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Hp=["click","keydown"],ZI=function(i){function e(t){var r=i.call(this,Vi(Vi({},e.defaultAdapter),t))||this;return r.savedTabIndex=null,r.interactionHandler=function(n){r.handleInteraction(n)},r}return $n(e,i),Object.defineProperty(e,"strings",{get:function(){return Vp},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return YI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,r;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var n=Jr(Hp),a=n.next();!a.done;a=n.next()){var o=a.value;this.adapter.registerInteractionHandler(o,this.interactionHandler)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.destroy=function(){var t,r;try{for(var n=Jr(Hp),a=n.next();!a.done;a=n.next()){var o=a.value;this.adapter.deregisterInteractionHandler(o,this.interactionHandler)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",Vp.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.handleInteraction=function(t){var r=t.key==="Enter"||t.keyCode===13;(t.type==="click"||r)&&(t.preventDefault(),this.adapter.notifyIconAction())},e}(Ln);function KI(i){let e;return{c(){e=mn(i[7])},m(t,r){gt(t,e,r)},p(t,r){128&r&&Na(e,t[7])},i:xi,o:xi,d(t){t&&mt(e)}}}function JI(i){let e;const t=i[15].default,r=ci(t,i,i[14],null);return{c(){r&&r.c()},m(n,a){r&&r.m(n,a),e=!0},p(n,a){r&&r.p&&(!e||16384&a)&&fi(r,t,n,n[14],e?ui(t,n[14],a,null):hi(n[14]),null)},i(n){e||($e(r,n),e=!0)},o(n){Be(r,n),e=!1},d(n){r&&r.d(n)}}}function QI(i){let e,t,r,n,a,o,s,l,d,c;const u=[JI,KI],f=[];function m(x,E){return x[7]==null?0:1}t=m(i),r=f[t]=u[t](i);let p=[{class:n=Kt({[i[1]]:!0,"mdc-text-field__icon":!0,"mdc-text-field__icon--leading":i[11],"mdc-text-field__icon--trailing":!i[11]})},{"aria-hidden":a=i[3]===-1?"true":"false"},{"aria-disabled":o=i[2]==="button"?i[4]?"true":"false":void 0},i[8],i[6],i[12]],y={};for(let x=0;x{f[k]=null}),rr(),r=f[t],r?r.p(x,E):(r=f[t]=u[t](x),r.c()),$e(r,1),r.m(e,null)),Oi(e,y=wi(p,[(!l||2&E&&n!==(n=Kt({[x[1]]:!0,"mdc-text-field__icon":!0,"mdc-text-field__icon--leading":x[11],"mdc-text-field__icon--trailing":!x[11]})))&&{class:n},(!l||8&E&&a!==(a=x[3]===-1?"true":"false"))&&{"aria-hidden":a},(!l||20&E&&o!==(o=x[2]==="button"?x[4]?"true":"false":void 0))&&{"aria-disabled":o},256&E&&x[8],64&E&&x[6],4096&E&&x[12]])),s&&Li(s.update)&&1&E&&s.update.call(null,x[0])},i(x){l||($e(r),l=!0)},o(x){Be(r),l=!1},d(x){x&&mt(e),f[t].d(),i[16](null),d=!1,Hi(c)}}}function eA(i,e,t){let r;const n=["use","class","role","tabindex","disabled","getElement"];let a,o=li(e,n),{$$slots:s={},$$scope:l}=e;const d=$r(nr());let c,u,{use:f=[]}=e,{class:m=""}=e,{role:p}=e,{tabindex:y=p==="button"?0:-1}=e,{disabled:x=!1}=e,E={};const k=Ir("SMUI:textfield:icon:leading");N0(i,k,W=>t(18,a=W));const I=a;let v;function M(W){var Oe;return W in E?(Oe=E[W])!==null&&Oe!==void 0?Oe:null:R().getAttribute(W)}function K(W,Oe){E[W]!==Oe&&t(6,E[W]=Oe,E)}function L(W){W in E&&E[W]==null||t(6,E[W]=void 0,E)}function R(){return c}return Ur(()=>(u=new ZI({getAttr:M,setAttr:K,removeAttr:L,setContent:W=>{t(7,v=W)},registerInteractionHandler:(W,Oe)=>R().addEventListener(W,Oe),deregisterInteractionHandler:(W,Oe)=>R().removeEventListener(W,Oe),notifyIconAction:()=>$i(R(),"SMUITextField:icon",void 0,void 0,!0)}),$i(R(),I?"SMUITextfieldLeadingIcon:mount":"SMUITextfieldTrailingIcon:mount",u),u.init(),()=>{$i(R(),I?"SMUITextfieldLeadingIcon:unmount":"SMUITextfieldTrailingIcon:unmount",u),u.destroy()})),i.$$set=W=>{e=xt(xt({},e),kr(W)),t(12,o=li(e,n)),"use"in W&&t(0,f=W.use),"class"in W&&t(1,m=W.class),"role"in W&&t(2,p=W.role),"tabindex"in W&&t(3,y=W.tabindex),"disabled"in W&&t(4,x=W.disabled),"$$scope"in W&&t(14,l=W.$$scope)},i.$$.update=()=>{12&i.$$.dirty&&t(8,r={role:p,tabindex:y})},[f,m,p,y,x,c,E,v,r,d,k,I,o,R,l,s,function(W){Ft[W?"unshift":"push"](()=>{c=W,t(5,c)})}]}class W0 extends hr{constructor(e){super(),fr(this,e,eA,QI,Zi,{use:0,class:1,role:2,tabindex:3,disabled:4,getElement:13})}get getElement(){return this.$$.ctx[13]}}/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var Gi,Eo,tA={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"},iA={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",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(", ")},hs={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(i){i[i.BOTTOM=1]="BOTTOM",i[i.CENTER=2]="CENTER",i[i.RIGHT=4]="RIGHT",i[i.FLIP_RTL=8]="FLIP_RTL"})(Gi||(Gi={})),function(i){i[i.TOP_LEFT=0]="TOP_LEFT",i[i.TOP_RIGHT=4]="TOP_RIGHT",i[i.BOTTOM_LEFT=1]="BOTTOM_LEFT",i[i.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",i[i.TOP_START=8]="TOP_START",i[i.TOP_END=12]="TOP_END",i[i.BOTTOM_START=9]="BOTTOM_START",i[i.BOTTOM_END=13]="BOTTOM_END"}(Eo||(Eo={}));/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var X0=function(i){function e(t){var r=i.call(this,Vi(Vi({},e.defaultAdapter),t))||this;return r.isSurfaceOpen=!1,r.isQuickOpen=!1,r.isHoistedElement=!1,r.isFixedPosition=!1,r.isHorizontallyCenteredOnViewport=!1,r.maxHeight=0,r.openBottomBias=0,r.openAnimationEndTimerId=0,r.closeAnimationEndTimerId=0,r.animationRequestId=0,r.anchorCorner=Eo.TOP_START,r.originCorner=Eo.TOP_START,r.anchorMargin={top:0,right:0,bottom:0,left:0},r.position={x:0,y:0},r}return $n(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return tA},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return iA},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return hs},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return Eo},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(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,r=t.ROOT,n=t.OPEN;if(!this.adapter.hasClass(r))throw new Error(r+" class required in root element.");this.adapter.hasClass(n)&&(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^Gi.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,r){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(r)?r: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.notifyOpening(),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()},hs.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var r=this;if(t===void 0&&(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(){r.adapter.removeClass(e.cssClasses.OPEN),r.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),r.closeAnimationEndTimerId=setTimeout(function(){r.closeAnimationEndTimerId=0,r.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),r.adapter.notifyClose()},hs.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},e.prototype.handleBodyClick=function(t){var r=t.target;this.adapter.isElementInContainer(r)||this.close()},e.prototype.handleKeydown=function(t){var r=t.keyCode;(t.key==="Escape"||r===27)&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var r=this.getoriginCorner(),n=this.getMenuSurfaceMaxHeight(r),a=this.hasBit(r,Gi.BOTTOM)?"bottom":"top",o=this.hasBit(r,Gi.RIGHT)?"right":"left",s=this.getHorizontalOriginOffset(r),l=this.getVerticalOriginOffset(r),d=this.measurements,c=d.anchorSize,u=d.surfaceSize,f=((t={})[o]=s,t[a]=l,t);c.width/u.width>hs.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(f),this.adapter.setTransformOrigin(o+" "+a),this.adapter.setPosition(f),this.adapter.setMaxHeight(n?n+"px":""),this.hasBit(r,Gi.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),r=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),a=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:r,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:a}},e.prototype.getoriginCorner=function(){var t,r,n=this.originCorner,a=this.measurements,o=a.viewportDistance,s=a.anchorSize,l=a.surfaceSize,d=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,Gi.BOTTOM)?(t=o.top-d+this.anchorMargin.bottom,r=o.bottom-d-this.anchorMargin.bottom):(t=o.top-d+this.anchorMargin.top,r=o.bottom-d+s.height-this.anchorMargin.top),!(r-l.height>0)&&t>r+this.openBottomBias&&(n=this.setBit(n,Gi.BOTTOM));var c,u,f=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,Gi.FLIP_RTL),p=this.hasBit(this.anchorCorner,Gi.RIGHT)||this.hasBit(n,Gi.RIGHT),y=!1;(y=f&&m?!p:p)?(c=o.left+s.width+this.anchorMargin.right,u=o.right-this.anchorMargin.right):(c=o.left+this.anchorMargin.left,u=o.right+s.width-this.anchorMargin.left);var x=c-l.width>0,E=u-l.width>0,k=this.hasBit(n,Gi.FLIP_RTL)&&this.hasBit(n,Gi.RIGHT);return E&&k&&f||!x&&k?n=this.unsetBit(n,Gi.RIGHT):(x&&y&&f||x&&!y&&p||!E&&c>=u)&&(n=this.setBit(n,Gi.RIGHT)),n},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var r=this.measurements.viewportDistance,n=0,a=this.hasBit(t,Gi.BOTTOM),o=this.hasBit(this.anchorCorner,Gi.BOTTOM),s=e.numbers.MARGIN_TO_EDGE;return a?(n=r.top+this.anchorMargin.top-s,o||(n+=this.measurements.anchorSize.height)):(n=r.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-s,o&&(n-=this.measurements.anchorSize.height)),n},e.prototype.getHorizontalOriginOffset=function(t){var r=this.measurements.anchorSize,n=this.hasBit(t,Gi.RIGHT),a=this.hasBit(this.anchorCorner,Gi.RIGHT);if(n){var o=a?r.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return a?r.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var r=this.measurements.anchorSize,n=this.hasBit(t,Gi.BOTTOM),a=this.hasBit(this.anchorCorner,Gi.BOTTOM);return n?a?r.height-this.anchorMargin.top:-this.anchorMargin.bottom:a?r.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var r,n,a=this.measurements,o=a.windowScroll,s=a.viewportDistance,l=a.surfaceSize,d=a.viewportSize,c=Object.keys(t);try{for(var u=Jr(c),f=u.next();!f.done;f=u.next()){var m=f.value,p=t[m]||0;!this.isHorizontallyCenteredOnViewport||m!=="left"&&m!=="right"?(p+=s[m],this.isFixedPosition||(m==="top"?p+=o.y:m==="bottom"?p-=o.y:m==="left"?p+=o.x:p-=o.x),t[m]=p):t[m]=(d.width-l.width)/2}}catch(y){r={error:y}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,r=this.adapter.isFocused(),n=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,a=n.activeElement&&this.adapter.isElementInContainer(n.activeElement);(r||a)&&setTimeout(function(){t.adapter.restoreFocus()},hs.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,r){return!!(t&r)},e.prototype.setBit=function(t,r){return t|r},e.prototype.unsetBit=function(t,r){return t^r},e.prototype.isFinite=function(t){return typeof t=="number"&&isFinite(t)},e}(Ln);const{document:rA}=DE;function nA(i){let e,t,r,n,a,o,s,l;const d=i[34].default,c=ci(d,i,i[33],null);let u=[{class:r=Kt(Ei({[i[1]]:!0,"mdc-menu-surface":!0,"mdc-menu-surface--fixed":i[4],"mdc-menu-surface--open":i[3],"smui-menu-surface--static":i[3],"mdc-menu-surface--fullwidth":i[5]},i[8]))},{style:n=Object.entries(i[9]).map(qp).concat([i[2]]).join(" ")},i[12]],f={};for(let m=0;m`${i}: ${e};`;function aA(i,e,t){const r=["use","class","style","static","anchor","fixed","open","managed","fullWidth","quickOpen","anchorElement","anchorCorner","anchorMargin","maxHeight","horizontallyCenteredOnViewport","openBottomBias","neverRestoreFocus","isOpen","setOpen","setAbsolutePosition","setIsHoisted","isFixed","getElement"];let n=li(e,r),{$$slots:a={},$$scope:o}=e;var s,l,d;const c=$r(nr());let u,f,m,{use:p=[]}=e,{class:y=""}=e,{style:x=""}=e,{static:E=!1}=e,{anchor:k=!0}=e,{fixed:I=!1}=e,{open:v=E}=e,{managed:M=!1}=e,{fullWidth:K=!1}=e,{quickOpen:L=!1}=e,{anchorElement:R}=e,{anchorCorner:W}=e,{anchorMargin:Oe={top:0,right:0,bottom:0,left:0}}=e,{maxHeight:me=0}=e,{horizontallyCenteredOnViewport:de=!1}=e,{openBottomBias:N=0}=e,{neverRestoreFocus:C=!1}=e,Q={},V={};Tr("SMUI:list:role","menu"),Tr("SMUI:list:item:role","menuitem");const ne=Eo;function Ve(he){return he in Q?Q[he]:ot().classList.contains(he)}function Re(he){Q[he]||t(8,Q[he]=!0,Q)}function Ge(he){he in Q&&!Q[he]||t(8,Q[he]=!1,Q)}function tt(he){f.close(he),t(13,v=!1)}function ot(){return u}return Ur(()=>(t(7,f=new X0({addClass:Re,removeClass:Ge,hasClass:Ve,hasAnchor:()=>!!R,notifyClose:()=>{M||t(13,v=E),v||$i(u,"SMUIMenuSurface:closed",void 0,void 0,!0)},notifyClosing:()=>{M||t(13,v=E),v||$i(u,"SMUIMenuSurface:closing",void 0,void 0,!0)},notifyOpen:()=>{M||t(13,v=!0),v&&$i(u,"SMUIMenuSurface:opened",void 0,void 0,!0)},notifyOpening:()=>{v||$i(u,"SMUIMenuSurface:opening",void 0,void 0,!0)},isElementInContainer:he=>u.contains(he),isRtl:()=>getComputedStyle(u).getPropertyValue("direction")==="rtl",setTransformOrigin:he=>{t(9,V["transform-origin"]=he,V)},isFocused:()=>document.activeElement===u,saveFocus:()=>{var he;m=(he=document.activeElement)!==null&&he!==void 0?he:void 0},restoreFocus:()=>{!C&&(!u||u.contains(document.activeElement))&&m&&document.contains(m)&&"focus"in m&&m.focus()},getInnerDimensions:()=>({width:u.offsetWidth,height:u.offsetHeight}),getAnchorDimensions:()=>R?R.getBoundingClientRect():null,getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:he=>{t(9,V.left="left"in he?`${he.left}px`:"",V),t(9,V.right="right"in he?`${he.right}px`:"",V),t(9,V.top="top"in he?`${he.top}px`:"",V),t(9,V.bottom="bottom"in he?`${he.bottom}px`:"",V)},setMaxHeight:he=>{t(9,V["max-height"]=he,V)}})),$i(u,"SMUIMenuSurface:mount",{get open(){return v},set open(he){t(13,v=he)},closeProgrammatic:tt}),f.init(),()=>{var he;const bt=f.isHoistedElement;f.destroy(),bt&&((he=u.parentNode)===null||he===void 0||he.removeChild(u))})),Pa(()=>{var he;k&&u&&((he=u.parentElement)===null||he===void 0||he.classList.remove("mdc-menu-surface--anchor"))}),i.$$set=he=>{e=xt(xt({},e),kr(he)),t(12,n=li(e,r)),"use"in he&&t(0,p=he.use),"class"in he&&t(1,y=he.class),"style"in he&&t(2,x=he.style),"static"in he&&t(3,E=he.static),"anchor"in he&&t(15,k=he.anchor),"fixed"in he&&t(4,I=he.fixed),"open"in he&&t(13,v=he.open),"managed"in he&&t(16,M=he.managed),"fullWidth"in he&&t(5,K=he.fullWidth),"quickOpen"in he&&t(17,L=he.quickOpen),"anchorElement"in he&&t(14,R=he.anchorElement),"anchorCorner"in he&&t(18,W=he.anchorCorner),"anchorMargin"in he&&t(19,Oe=he.anchorMargin),"maxHeight"in he&&t(20,me=he.maxHeight),"horizontallyCenteredOnViewport"in he&&t(21,de=he.horizontallyCenteredOnViewport),"openBottomBias"in he&&t(22,N=he.openBottomBias),"neverRestoreFocus"in he&&t(23,C=he.neverRestoreFocus),"$$scope"in he&&t(33,o=he.$$scope)},i.$$.update=()=>{1073774656&i.$$.dirty[0]|3&i.$$.dirty[1]&&u&&k&&!(!(t(30,s=u.parentElement)===null||s===void 0)&&s.classList.contains("mdc-menu-surface--anchor"))&&(t(31,l=u.parentElement)===null||l===void 0||l.classList.add("mdc-menu-surface--anchor"),t(14,R=t(32,d=u.parentElement)!==null&&d!==void 0?d:void 0)),8320&i.$$.dirty[0]&&f&&f.isOpen()!==v&&(v?f.open():f.close()),131200&i.$$.dirty[0]&&f&&f.setQuickOpen(L),144&i.$$.dirty[0]&&f&&f.setFixedPosition(I),1048704&i.$$.dirty[0]&&f&&f.setMaxHeight(me),2097280&i.$$.dirty[0]&&f&&f.setIsHorizontallyCenteredOnViewport(de),262272&i.$$.dirty[0]&&f&&W!=null&&(typeof W=="string"?f.setAnchorCorner(ne[W]):f.setAnchorCorner(W)),524416&i.$$.dirty[0]&&f&&f.setAnchorMargin(Oe),4194432&i.$$.dirty[0]&&f&&f.setOpenBottomBias(N)},[p,y,x,E,I,K,u,f,Q,V,c,function(he){f&&v&&!M&&f.handleBodyClick(he)},n,v,R,k,M,L,W,Oe,me,de,N,C,function(){return v},function(he){t(13,v=he)},function(he,bt){return f.setAbsolutePosition(he,bt)},function(he){return f.setIsHoisted(he)},function(){return f.isFixed()},ot,s,l,d,o,a,function(he){Ft[he?"unshift":"push"](()=>{u=he,t(6,u)})}]}class oA extends hr{constructor(e){super(),fr(this,e,aA,nA,Zi,{use:0,class:1,style:2,static:3,anchor:15,fixed:4,open:13,managed:16,fullWidth:5,quickOpen:17,anchorElement:14,anchorCorner:18,anchorMargin:19,maxHeight:20,horizontallyCenteredOnViewport:21,openBottomBias:22,neverRestoreFocus:23,isOpen:24,setOpen:25,setAbsolutePosition:26,setIsHoisted:27,isFixed:28,getElement:29},null,[-1,-1])}get isOpen(){return this.$$.ctx[24]}get setOpen(){return this.$$.ctx[25]}get setAbsolutePosition(){return this.$$.ctx[26]}get setIsHoisted(){return this.$$.ctx[27]}get isFixed(){return this.$$.ctx[28]}get getElement(){return this.$$.ctx[29]}}/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var _o,To={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},lo={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"},sA={FOCUS_ROOT_INDEX:-1};(function(i){i[i.NONE=0]="NONE",i[i.LIST_ROOT=1]="LIST_ROOT",i[i.FIRST_ITEM=2]="FIRST_ITEM",i[i.LAST_ITEM=3]="LAST_ITEM"})(_o||(_o={}));/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var lA=function(i){function e(t){var r=i.call(this,Vi(Vi({},e.defaultAdapter),t))||this;return r.closeAnimationEndTimerId=0,r.defaultFocusState=_o.LIST_ROOT,r.selectedIndex=-1,r}return $n(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return To},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return lo},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return sA},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 r=t.key,n=t.keyCode;(r==="Tab"||n===9)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var r=this,n=this.adapter.getElementIndex(t);if(!(n<0)){this.adapter.notifySelected({index:n});var a=this.adapter.getAttributeFromElementAtIndex(n,lo.SKIP_RESTORE_FOCUS)==="true";this.adapter.closeSurface(a),this.closeAnimationEndTimerId=setTimeout(function(){var o=r.adapter.getElementIndex(t);o>=0&&r.adapter.isSelectableItemAtIndex(o)&&r.setSelectedIndex(o)},X0.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case _o.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case _o.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case _o.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 r=this.adapter.getSelectedSiblingOfItemAtIndex(t);r>=0&&(this.adapter.removeAttributeFromElementAtIndex(r,lo.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(r,To.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,To.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,lo.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,r){this.validatedIndex(t),r?(this.adapter.removeClassFromElementAtIndex(t,Ut.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,lo.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,Ut.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,lo.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var r=this.adapter.getMenuItemCount();if(!(t>=0&&tKr(e,"open",a)),e.$on("SMUIMenuSurface:mount",i[7]),e.$on("SMUIList:mount",i[8]),e.$on("SMUIMenuSurface:opened",i[20]),e.$on("keydown",i[6]),e.$on("SMUIList:action",i[21]),{c(){Jt(e.$$.fragment)},m(s,l){Yt(e,s,l),r=!0},p(s,[l]){const d=546&l?wi(n,[32&l&&{use:s[5]},2&l&&{class:Kt({[s[1]]:!0,"mdc-menu":!0})},512&l&&tr(s[9])]):{};4194304&l&&(d.$$scope={dirty:l,ctx:s}),!t&&1&l&&(t=!0,d.open=s[0],Zr(()=>t=!1)),e.$set(d)},i(s){r||($e(e.$$.fragment,s),r=!0)},o(s){Be(e.$$.fragment,s),r=!1},d(s){i[18](null),Zt(e,s)}}}function uA(i,e,t){let r;const n=["use","class","open","isOpen","setOpen","setDefaultFocusState","getSelectedIndex","getMenuSurface","getElement"];let a=li(e,n),{$$slots:o={},$$scope:s}=e;const{closest:l}=Vu,d=$r(nr());let c,u,f,m,{use:p=[]}=e,{class:y=""}=e,{open:x=!1}=e;function E(){return c.getElement()}return Ur(()=>(t(3,u=new lA({addClassToElementAtIndex:(k,I)=>{m.addClassForElementIndex(k,I)},removeClassFromElementAtIndex:(k,I)=>{m.removeClassForElementIndex(k,I)},addAttributeToElementAtIndex:(k,I,v)=>{m.setAttributeForElementIndex(k,I,v)},removeAttributeFromElementAtIndex:(k,I)=>{m.removeAttributeForElementIndex(k,I)},getAttributeFromElementAtIndex:(k,I)=>m.getAttributeFromElementIndex(k,I),elementContainsClass:(k,I)=>k.classList.contains(I),closeSurface:k=>{f.closeProgrammatic(k),$i(E(),"SMUIMenu:closedProgrammatically")},getElementIndex:k=>m.getOrderedList().map(I=>I.element).indexOf(k),notifySelected:k=>$i(E(),"SMUIMenu:selected",{index:k.index,item:m.getOrderedList()[k.index].element},void 0,!0),getMenuItemCount:()=>m.items.length,focusItemAtIndex:k=>m.focusItemAtIndex(k),focusListRoot:()=>"focus"in m.element&&m.element.focus(),isSelectableItemAtIndex:k=>!!l(m.getOrderedList()[k].element,`.${To.MENU_SELECTION_GROUP}`),getSelectedSiblingOfItemAtIndex:k=>{const I=m.getOrderedList(),v=l(I[k].element,`.${To.MENU_SELECTION_GROUP}`),M=v==null?void 0:v.querySelector(`.${To.MENU_SELECTED_LIST_ITEM}`);return M?I.map(K=>K.element).indexOf(M):-1}})),$i(E(),"SMUIMenu:mount",u),u.init(),()=>{u.destroy()})),i.$$set=k=>{e=xt(xt({},e),kr(k)),t(9,a=li(e,n)),"use"in k&&t(10,p=k.use),"class"in k&&t(1,y=k.class),"open"in k&&t(0,x=k.open),"$$scope"in k&&t(22,s=k.$$scope)},i.$$.update=()=>{1024&i.$$.dirty&&t(5,r=[d,...p])},[x,y,c,u,m,r,function(k){u&&u.handleKeydown(k)},function(k){f||(f=k.detail)},function(k){m||t(4,m=k.detail)},a,p,function(){return x},function(k){t(0,x=k)},function(k){u.setDefaultFocusState(k)},function(){return u.getSelectedIndex()},function(){return c},E,o,function(k){Ft[k?"unshift":"push"](()=>{c=k,t(2,c)})},function(k){x=k,t(0,x)},()=>u&&u.handleMenuSurfaceOpened(),k=>u&&u.handleItemAction(m.getOrderedList()[k.detail.index].element),s]}class fA extends hr{constructor(e){super(),fr(this,e,uA,cA,Zi,{use:10,class:1,open:0,isOpen:11,setOpen:12,setDefaultFocusState:13,getSelectedIndex:14,getMenuSurface:15,getElement:16})}get isOpen(){return this.$$.ctx[11]}get setOpen(){return this.$$.ctx[12]}get setDefaultFocusState(){return this.$$.ctx[13]}get getSelectedIndex(){return this.$$.ctx[14]}get getMenuSurface(){return this.$$.ctx[15]}get getElement(){return this.$$.ctx[16]}}function hA(i){let e,t,r,n,a,o;const s=i[8].default,l=ci(s,i,i[7],null);let d=[{class:t=Kt({[i[1]]:!0,"mdc-deprecated-list-item__graphic":!0,"mdc-menu__selection-group-icon":i[4]})},i[5]],c={};for(let u=0;u{e=xt(xt({},e),kr(f)),t(5,n=li(e,r)),"use"in f&&t(0,d=f.use),"class"in f&&t(1,c=f.class),"$$scope"in f&&t(7,o=f.$$scope)},[d,c,l,s,u,n,function(){return l},o,a,function(f){Ft[f?"unshift":"push"](()=>{l=f,t(2,l)})}]}class pA extends hr{constructor(e){super(),fr(this,e,mA,hA,Zi,{use:0,class:1,getElement:6})}get getElement(){return this.$$.ctx[6]}}pn({class:"mdc-menu__selection-group-icon",component:pA});function gA(i){let e,t;return{c(){e=fu("svg"),t=fu("path"),si(t,"fill","currentColor"),si(t,"d","M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"),si(e,"aria-hidden","true"),si(e,"focusable","false"),si(e,"data-prefix","fas"),si(e,"data-icon","search"),si(e,"class","svg-inline--fa fa-search fa-w-16"),si(e,"role","img"),si(e,"xmlns","http://www.w3.org/2000/svg"),Kn(e,"width","16px"),Kn(e,"height","16px"),si(e,"viewBox","0 0 512 512")},m(r,n){gt(r,e,n),ji(e,t)},p:xi,i:xi,o:xi,d(r){r&&mt(e)}}}class vA extends hr{constructor(e){super(),fr(this,e,null,gA,Zi,{})}}var bA='.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:text;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);left:0;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.15rem;overflow:hidden;position:absolute;text-align:left;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);-webkit-transform-origin:left top;transform-origin:left top;transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1);white-space:nowrap;will-change:transform}.mdc-floating-label[dir=rtl],[dir=rtl] .mdc-floating-label{left:auto;right:0;text-align:right;-webkit-transform-origin:right top;transform-origin:right top}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:after{content:"*";margin-left:1px;margin-right:0}.mdc-floating-label--required[dir=rtl]:after,[dir=rtl] .mdc-floating-label--required:after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard .25s 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(0) translateY(-106%) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-106%) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-106%) scale(.75)}to{transform:translateX(0) translateY(-106%) scale(.75)}}.smui-floating-label--remove-transition{transition:unset!important}.smui-floating-label--force-size{position:absolute!important;transform:unset!important}.mdc-line-ripple:after,.mdc-line-ripple:before{border-bottom-style:solid;bottom:0;content:"";left:0;position:absolute;width:100%}.mdc-line-ripple:before{border-bottom-width:1px;z-index:1}.mdc-line-ripple:after{border-bottom-width:2px;opacity:0;transform:scaleX(0);transition:transform .18s cubic-bezier(.4,0,.2,1),opacity .18s cubic-bezier(.4,0,.2,1);z-index:2}.mdc-line-ripple--active:after{opacity:1;transform:scaleX(1)}.mdc-line-ripple--deactivating:after{opacity:0}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));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:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);line-height:1.5rem;list-style-type:none;margin:0;padding:8px 0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item__secondary-text{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-deprecated-list-item__graphic{background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item__meta{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__text{opacity:.38}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__secondary-text,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__text{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-deprecated-list-item--activated,.mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-deprecated-list-item--selected,.mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-deprecated-list--dense{font-size:.812rem;padding-bottom:4px;padding-top:4px}.mdc-deprecated-list-item__wrapper{display:block}.mdc-deprecated-list-item{align-items:center;display:flex;height:48px;justify-content:flex-start;overflow:hidden;padding:0 16px;position:relative}.mdc-deprecated-list-item:focus{outline:none}.mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-deprecated-list-item:not(.mdc-deprecated-list-item--selected):focus:before{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-deprecated-list-item:not(.mdc-deprecated-list-item--selected):focus:before{border-color:CanvasText}}.mdc-deprecated-list-item.mdc-deprecated-list-item--selected:before{border:3px double transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-deprecated-list-item.mdc-deprecated-list-item--selected:before{border-color:CanvasText}}.mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item{height:56px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item{height:72px;padding-left:16px;padding-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item{height:72px;padding-left:0;padding-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-item{padding-left:16px;padding-right:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{height:20px;margin-left:0;margin-right:16px;width:20px}.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list-item__graphic{fill:currentColor;align-items:center;flex-shrink:0;height:24px;justify-content:center;margin-left:0;margin-right:32px;object-fit:cover;width:24px}.mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list-item__graphic{margin-left:32px;margin-right:0}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{height:24px;margin-left:0;margin-right:32px;width:24px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{margin-left:32px;margin-right:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic{border-radius:50%;height:40px;margin-left:0;margin-right:16px;width:40px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic{height:40px;margin-left:0;margin-right:16px;width:40px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic{height:56px;margin-left:0;margin-right:16px;width:56px}.mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic{height:56px;margin-left:0;margin-right:16px;width:100px}.mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}.mdc-deprecated-list .mdc-deprecated-list-item__graphic{display:inline-flex}.mdc-deprecated-list-item__meta{margin-left:auto;margin-right:0}.mdc-deprecated-list-item__meta:not(.material-icons){-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:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-deprecated-list-item[dir=rtl] .mdc-deprecated-list-item__meta,[dir=rtl] .mdc-deprecated-list-item .mdc-deprecated-list-item__meta{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text:before,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--image-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item__primary-text:after,.mdc-deprecated-list--video-list .mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text:before{content:"";display:inline-block;height:24px;vertical-align:0;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);line-height:normal;margin-top:0;overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);white-space:nowrap}.mdc-deprecated-list-item__secondary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:40px}.mdc-deprecated-list--two-line .mdc-deprecated-list-item__text{align-self:flex-start}.mdc-deprecated-list--two-line .mdc-deprecated-list-item{height:64px}.mdc-deprecated-list--two-line.mdc-deprecated-list--avatar-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--icon-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--image-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--video-list .mdc-deprecated-list-item{height:72px}.mdc-deprecated-list--two-line.mdc-deprecated-list--icon-list .mdc-deprecated-list-item__graphic{align-self:flex-start;margin-top:16px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item,.mdc-deprecated-list--two-line.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{height:36px;margin-left:0;margin-right:16px;width:36px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense .mdc-deprecated-list-item__graphic{margin-left:16px;margin-right:0}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item{cursor:pointer}a.mdc-deprecated-list-item{color:inherit;text-decoration:none}.mdc-deprecated-list-divider{border:none;border-bottom:1px solid;border-bottom-color:rgba(0,0,0,.12);height:0;margin:0}.mdc-deprecated-list-divider--padded{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list-divider--padded[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--padded{margin-left:0;margin-right:16px}.mdc-deprecated-list-divider--inset{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list-divider--inset[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--inset{margin-left:0;margin-right:72px}.mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded[dir=rtl],[dir=rtl] .mdc-deprecated-list-divider--inset.mdc-deprecated-list-divider--padded{margin-left:0;margin-right:72px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--icon-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--avatar-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:72px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:72px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:72px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--thumbnail-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading{margin-left:88px;margin-right:0;width:calc(100% - 88px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:88px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:88px;margin-right:0;width:calc(100% - 104px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:88px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:16px;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:16px;margin-right:0;width:calc(100% - 32px)}.mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--image-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:16px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading{margin-left:116px;margin-right:0;width:calc(100% - 116px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading{margin-left:0;margin-right:116px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-trailing{width:calc(100% - 16px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:116px;margin-right:0;width:calc(100% - 132px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing{margin-left:0;margin-right:116px}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:0;width:100%}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--padding{margin-left:0;margin-right:0}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:0;width:calc(100% - 16px)}.mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding[dir=rtl],[dir=rtl] .mdc-deprecated-list--video-list .mdc-deprecated-list-divider--inset-leading.mdc-deprecated-list-divider--inset-trailing.mdc-deprecated-list-divider--inset-padding{margin-left:0;margin-right:0}.mdc-deprecated-list-group .mdc-deprecated-list{padding:0}.mdc-deprecated-list-group__subheader{-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:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);margin:.75rem 16px;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list-item__primary-text{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.mdc-list-item__secondary-text{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-list-item__overline-text{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-trailing-icon .mdc-list-item__end{background-color:transparent;color:rgba(0,0,0,.38);color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.mdc-list-item__end{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-hint-on-background,rgba(0,0,0,.38))}.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end,.mdc-list-item--disabled .mdc-list-item__start{opacity:.38}.mdc-list-item--disabled .mdc-list-item__overline-text,.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--disabled.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:#000;color:var(--mdc-theme-on-surface,#000)}.mdc-list-item--activated .mdc-list-item__primary-text,.mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--selected .mdc-list-item__primary-text,.mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.mdc-deprecated-list-group__subheader{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-list-divider:after{border-bottom:1px solid #fff;content:"";display:block}}.mdc-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);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);line-height:1.5rem;list-style-type:none;margin:0;padding:8px 0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{align-items:center;align-items:stretch;cursor:pointer;display:flex;justify-content:flex-start;overflow:hidden;padding:0;position:relative}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start,.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end,.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-list-item:not(.mdc-list-item--selected):focus:before{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-ripple-upgraded--background-focused:before,.mdc-list-item:not(.mdc-list-item--selected):focus:before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:before{border:3px double transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-list-item--selected:before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus:before{border:3px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}@media screen and (forced-colors:active){.mdc-list-item.mdc-list-item--selected:focus:before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor}.mdc-list-item__end,.mdc-list-item__start{flex-shrink:0;pointer-events:none}.mdc-list-item__content{align-self:center;flex:1;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.mdc-list-item--with-three-lines .mdc-list-item__content,.mdc-list-item--with-two-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-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);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);white-space:nowrap}.mdc-list-item--with-three-lines .mdc-list-item__primary-text,.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-three-lines .mdc-list-item__primary-text:before,.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__primary-text:after,.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size,.875rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing,.0178571429em);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height,1.25rem);line-height:normal;margin-top:0;overflow:hidden;text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-overflow:ellipsis;text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);white-space:nowrap}.mdc-list-item__secondary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{line-height:20px;white-space:normal}.mdc-list-item--with-overline .mdc-list-item__secondary-text{line-height:auto;white-space:nowrap}.mdc-list-item__overline-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-overline-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-overline-font-size,.75rem);font-weight:500;font-weight:var(--mdc-typography-overline-font-weight,500);letter-spacing:.1666666667em;letter-spacing:var(--mdc-typography-overline-letter-spacing,.1666666667em);line-height:2rem;line-height:var(--mdc-typography-overline-line-height,2rem);overflow:hidden;text-decoration:none;text-decoration:var(--mdc-typography-overline-text-decoration,none);text-overflow:ellipsis;text-transform:uppercase;text-transform:var(--mdc-typography-overline-text-transform,uppercase);white-space:nowrap}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:24px;vertical-align:0;width:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon .mdc-list-item__start{height:24px;width:24px}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image .mdc-list-item__start{height:56px;width:56px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line,.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{height:56px;width:100px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line,.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio .mdc-list-item__start{height:40px;width:40px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl],[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch .mdc-list-item__start{height:20px;width:36px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;line-height:normal;margin-bottom:-20px;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text:after{content:"";display:inline-block;height:20px;vertical-align:-20px;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end:before{content:"";display:inline-block;height:32px;vertical-align:0;width:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-icon .mdc-list-item__end{height:24px;width:24px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end:before{content:"";display:inline-block;height:28px;vertical-align:0;width:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-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:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{height:40px;width:40px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio .mdc-list-item__end{height:40px;width:40px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl],[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch .mdc-list-item__end{height:20px;width:36px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;line-height:normal;margin-top:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text:before{content:"";display:inline-block;height:20px;vertical-align:0;width:0}.mdc-list-item,.mdc-list-item[dir=rtl],[dir=rtl] .mdc-list-item{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{-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:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height,1.75rem);margin:.75rem 16px;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit)}.mdc-list-divider{background-clip:content-box;background-color:rgba(0,0,0,.12);height:1px;padding:0}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset{padding-left:auto;padding-right:16px}.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl],[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:auto;padding-right:0}.mdc-list-divider[dir=rtl],[dir=rtl] .mdc-list-divider{padding:0}@keyframes mdc-ripple-fg-radius-in{0%{animation-timing-function:cubic-bezier(.4,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{0%{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{0%{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item{--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}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--unbounded .mdc-deprecated-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:hover .mdc-deprecated-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:hover .mdc-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-deprecated-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:hover .mdc-deprecated-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:hover .mdc-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.24)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:after,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.2)}:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-deprecated-list-item__ripple,:not(.mdc-deprecated-list-item--disabled).mdc-deprecated-list-item .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-deprecated-list-item--disabled{--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-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-deprecated-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-deprecated-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-deprecated-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:after,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,.mdc-deprecated-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple:before,.mdc-deprecated-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-deprecated-list-item--disabled .mdc-deprecated-list-item__ripple,.mdc-deprecated-list-item--disabled .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}:not(.mdc-list-item--disabled).mdc-list-item{--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}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item:hover .mdc-list-item__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item--activated .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--activated:hover .mdc-list-item__ripple:before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.24)}:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:after,:not(.mdc-list-item--disabled).mdc-list-item--selected .mdc-list-item__ripple:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--selected:hover .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple:after{transition:opacity .15s linear}:not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple:after{opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2);transition-duration:75ms}:not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.2)}:not(.mdc-list-item--disabled).mdc-list-item .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-list-item--disabled{--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-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-list-item--disabled .mdc-list-item__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-list-item--disabled .mdc-list-item__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-list-item--disabled.mdc-ripple-upgraded--unbounded .mdc-list-item__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-list-item--disabled.mdc-ripple-upgraded--foreground-activation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation .mdc-list-item__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-list-item--disabled.mdc-ripple-upgraded .mdc-list-item__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-list-item--disabled .mdc-list-item__ripple:after,.mdc-list-item--disabled .mdc-list-item__ripple:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-list-item--disabled.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple:before,.mdc-list-item--disabled:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-list-item--disabled .mdc-list-item__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-ripple-surface{--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);outline:none;overflow:hidden;position:relative;will-change:transform,opacity}.mdc-ripple-surface:after,.mdc-ripple-surface:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.mdc-ripple-surface:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface:after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded:before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded:after{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface:after,.mdc-ripple-surface:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-ripple-surface.mdc-ripple-upgraded:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]:after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]:before,.mdc-ripple-upgraded--unbounded:after,.mdc-ripple-upgraded--unbounded:before{height:100%;left:0;top:0;width:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:before{height:var(--mdc-ripple-fg-size,100%);left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,0);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded:after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface:after,.mdc-ripple-surface:before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover:before,.mdc-ripple-surface:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused:before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-ripple-surface:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-ripple-surface--primary:after,.smui-ripple-surface--primary:before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.smui-ripple-surface--primary.mdc-ripple-surface--hover:before,.smui-ripple-surface--primary:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.smui-ripple-surface--primary.mdc-ripple-upgraded--background-focused:before,.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.smui-ripple-surface--primary:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.smui-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-ripple-surface--secondary:after,.smui-ripple-surface--secondary:before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.smui-ripple-surface--secondary.mdc-ripple-surface--hover:before,.smui-ripple-surface--secondary:hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.smui-ripple-surface--secondary.mdc-ripple-upgraded--background-focused:before,.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):focus:before{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.smui-ripple-surface--secondary:not(.mdc-ripple-upgraded):active:after{opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12);transition-duration:75ms}.smui-ripple-surface--secondary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity,0.12)}.smui-list--three-line .mdc-deprecated-list-item__text{align-self:flex-start}.smui-list--three-line .mdc-deprecated-list-item{height:88px}.smui-list--three-line.mdc-deprecated-list--dense .mdc-deprecated-list-item{height:76px}.mdc-deprecated-list-item.smui-menu-item--non-interactive{cursor:auto}.mdc-elevation-overlay{background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff);border-radius:inherit;opacity:0;opacity:var(--mdc-elevation-overlay-opacity,0);pointer-events:none;position:absolute;transition:opacity .28s cubic-bezier(.4,0,.2,1)}.mdc-menu{min-width:112px;min-width:var(--mdc-menu-min-width,112px)}.mdc-menu .mdc-deprecated-list-item__graphic,.mdc-menu .mdc-deprecated-list-item__meta{color:rgba(0,0,0,.87)}.mdc-menu .mdc-menu-item--submenu-open .mdc-deprecated-list-item__ripple:before,.mdc-menu .mdc-menu-item--submenu-open .mdc-list-item__ripple:before{opacity:.04}.mdc-menu .mdc-deprecated-list{color:rgba(0,0,0,.87)}.mdc-menu .mdc-deprecated-list,.mdc-menu .mdc-list{position:relative}.mdc-menu .mdc-deprecated-list .mdc-elevation-overlay,.mdc-menu .mdc-list .mdc-elevation-overlay{height:100%;left:0;top:0;width:100%}.mdc-menu .mdc-deprecated-list-divider{margin:8px 0}.mdc-menu .mdc-deprecated-list-item{user-select:none}.mdc-menu .mdc-deprecated-list-item--disabled{cursor:auto}.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__graphic,.mdc-menu a.mdc-deprecated-list-item .mdc-deprecated-list-item__text{pointer-events:none}.mdc-menu__selection-group{fill:currentColor;padding:0}.mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:56px;padding-right:16px}.mdc-menu__selection-group .mdc-deprecated-list-item[dir=rtl],[dir=rtl] .mdc-menu__selection-group .mdc-deprecated-list-item{padding-left:16px;padding-right:56px}.mdc-menu__selection-group .mdc-menu__selection-group-icon{display:none;left:16px;position:absolute;right:auto;top:50%;transform:translateY(-50%)}.mdc-menu__selection-group .mdc-menu__selection-group-icon[dir=rtl],[dir=rtl] .mdc-menu__selection-group .mdc-menu__selection-group-icon{left:auto;right:16px}.mdc-menu-item--selected .mdc-menu__selection-group-icon{display:inline}.mdc-menu-surface{transform-origin-left:top left;transform-origin-right:top right;background-color:#fff;background-color:var(--mdc-theme-surface,#fff);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-sizing:border-box;color:#000;color:var(--mdc-theme-on-surface,#000);display:none;margin:0;max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height,calc(100vh - 32px));max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width,calc(100vw - 32px));opacity:0;overflow:auto;padding:0;position:absolute;transform:scale(1);transform-origin:top left;transition:opacity .03s linear,transform .12s cubic-bezier(0,0,.2,1),height .25s cubic-bezier(0,0,.2,1);will-change:transform,opacity;z-index:8}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;opacity:0;transform:scale(.8)}.mdc-menu-surface--open{display:inline-block;opacity:1;transform:scale(1)}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity 75ms linear}.mdc-menu-surface[dir=rtl],[dir=rtl] .mdc-menu-surface{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{overflow:visible;position:relative}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.smui-menu-surface--static{display:inline-block;opacity:1;position:static;transform:scale(1);z-index:0}.mdc-menu__selection-group .mdc-list-item__graphic.mdc-menu__selection-group-icon{display:none}.mdc-menu-item--selected .mdc-list-item__graphic.mdc-menu__selection-group-icon{display:inline}.mdc-notched-outline{box-sizing:border-box;display:flex;height:100%;left:0;max-width:100%;pointer-events:none;position:absolute;right:0;text-align:left;top:0;width:100%}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-bottom:1px solid;border-top:1px solid;box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],.mdc-notched-outline__trailing,[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;max-width:calc(100% - 24px);width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;max-width:100%;position:relative}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{border-top:none;padding-left:0;padding-right:8px}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.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:after,.mdc-text-field--filled .mdc-text-field__ripple:before{border-radius:50%;content:"";opacity:0;pointer-events:none;position:absolute}.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{left:0;top:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple:after{left:var(--mdc-ripple-left,0);top:var(--mdc-ripple-top,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 .15s;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{height:200%;left:-50%;top:-50%;width:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple:after{height:var(--mdc-ripple-fg-size,100%);width:var(--mdc-ripple-fg-size,100%)}.mdc-text-field__ripple{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-text-field{align-items:baseline;border-bottom-left-radius:0;border-bottom-right-radius:0;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);box-sizing:border-box;display:inline-flex;overflow:hidden;padding:0 16px;position:relative;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0,0,0,.87)}@media{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0,0,0,.54)}}@media{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(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-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading,.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0,0,0,.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix,.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0,0,0,.6)}.mdc-text-field .mdc-floating-label{pointer-events:none;top:50%;transform:translateY(-50%)}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;appearance:none;background:none;border:none;border-radius:0;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);height:28px;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);min-width:0;padding:0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;width:100%}.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{.mdc-text-field__input::placeholder{opacity:0;transition:opacity 67ms cubic-bezier(.4,0,.2,1) 0ms}}@media{.mdc-text-field__input:-ms-input-placeholder{opacity:0;transition:opacity 67ms cubic-bezier(.4,0,.2,1) 0ms}}@media{.mdc-text-field--focused .mdc-text-field__input::placeholder,.mdc-text-field--no-label .mdc-text-field__input::placeholder{opacity:1;transition-delay:40ms;transition-duration:.11s}}@media{.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder{opacity:1;transition-delay:40ms;transition-duration:.11s}}.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);height:28px;letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing,.009375em);opacity:0;text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;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}.mdc-text-field__affix--prefix[dir=rtl],[dir=rtl] .mdc-text-field__affix--prefix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl],.mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field__affix--suffix{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple:after,.mdc-text-field--filled .mdc-text-field__ripple:before{background-color:rgba(0,0,0,.87);background-color:var(--mdc-ripple-color,rgba(0,0,0,.87))}.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple:before,.mdc-text-field--filled:hover .mdc-text-field__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.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{opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12);transition-duration:75ms}.mdc-text-field--filled:before{content:"";display:inline-block;height:40px;vertical-align:0;width:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#f5f5f5}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:rgba(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,.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:auto}.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(.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,.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{font-size:.75rem;transform:translateY(-37.25px) scale(1)}.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;transform:translateY(-34.75px) scale(.75)}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(0) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-34.75px) scale(.75)}to{transform:translateX(0) translateY(-34.75px) scale(.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,.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,.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-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-bottom-left-radius:0;border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px)}@supports(top:max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}.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-bottom-left-radius:0;border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:0;border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0}@supports(top:max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small,4px))}.mdc-text-field--outlined,.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}.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))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon{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))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:0}@supports(top:max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon{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:after,.mdc-text-field--outlined .mdc-text-field__ripple:before{background-color:transparent;background-color:var(--mdc-ripple-color,transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--outlined .mdc-text-field__input{background-color:transparent;border:none!important;display:flex}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{align-items:center;flex-direction:column;height:auto;padding:0;transition:none;width:auto}.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{box-sizing:border-box;flex-grow:1;height:auto;line-height:1.5rem;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;padding:0 16px;resize:none}.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(.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled .25s 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(0) translateY(-10.25px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-10.25px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-10.25px) scale(.75)}to{transform:translateX(0) translateY(-10.25px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-bottom:9px;margin-top:23px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-bottom:16px;margin-top: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{font-size:.75rem;transform:translateY(-27.25px) scale(1)}.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;transform:translateY(-24.75px) scale(.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined .25s 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(0) translateY(-24.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(4%) translateY(-24.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(-4%) translateY(-24.75px) scale(.75)}to{transform:translateX(0) translateY(-24.75px) scale(.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-bottom:16px;margin-top: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{content:"";display:inline-block;height:16px;vertical-align:-16px;width:0}.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-character-counter,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(1px) translateY(-1px)}.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{transform:translateX(1px) translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}.mdc-text-field--with-leading-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:48px;max-width:calc(100% - 48px);right:auto}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{left:auto;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(133.33333% - 85.33333px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:auto}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:auto;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)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{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(.75)}.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],[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{transform:translateY(-34.75px) translateX(32px) scale(.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 .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(-32px) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(.75)}to{transform:translateX(-32px) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake,[dir=rtl] .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 .25s 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(32px) translateY(-34.75px) scale(.75)}33%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translateX(calc(4% + 32px)) translateY(-34.75px) scale(.75)}66%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translateX(calc(-4% + 32px)) translateY(-34.75px) scale(.75)}to{transform:translateX(32px) translateY(-34.75px) scale(.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}.mdc-text-field--with-trailing-icon[dir=rtl],[dir=rtl] .mdc-text-field--with-trailing-icon{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(133.33333% - 85.33333px)}.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(133.33333% - 128px)}.mdc-text-field-helper-line{box-sizing:border-box;display:flex;justify-content:space-between}.mdc-text-field+.mdc-text-field-helper-line{padding-left:16px;padding-right: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,.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) .mdc-line-ripple:after,.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-floating-label,.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,.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,.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+.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,.38)}@media{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0,0,0,.38)}}@media{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0,0,0,.38)}}.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0,0,0,.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0,0,0,.38)}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:rgba(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,.06)}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled .mdc-text-field__affix--prefix,.mdc-text-field--disabled .mdc-text-field__affix--suffix,.mdc-text-field--disabled .mdc-text-field__icon--leading,.mdc-text-field--disabled .mdc-text-field__icon--trailing,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}.mdc-text-field--disabled .mdc-line-ripple:before{border-bottom-color:GrayText}.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}.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl],[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input{text-align:left}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{direction:ltr}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading{order:1}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix{order:2}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input{order:3}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix{order:4}.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing{order:5}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-right:12px}.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix,[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px}.smui-text-field--standard{height:56px;padding:0}.smui-text-field--standard:before{content:"";display:inline-block;height:40px;vertical-align:0;width:0}.smui-text-field--standard:not(.mdc-text-field--disabled){background-color:transparent}.smui-text-field--standard:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.42)}.smui-text-field--standard:not(.mdc-text-field--disabled):hover .mdc-line-ripple:before{border-bottom-color:rgba(0,0,0,.87)}.smui-text-field--standard .mdc-line-ripple:after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary,#6200ee)}.smui-text-field--standard .mdc-floating-label{left:0;right:auto}.smui-text-field--standard .mdc-floating-label[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-floating-label{left:auto;right:0}.smui-text-field--standard .mdc-floating-label--float-above{transform:translateY(-106%) scale(.75)}.smui-text-field--standard.mdc-text-field--no-label .mdc-text-field__input{height:100%}.smui-text-field--standard.mdc-text-field--no-label .mdc-floating-label,.smui-text-field--standard.mdc-text-field--no-label:before{display:none}@supports(-webkit-hyphens:none){.smui-text-field--standard.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label{left:32px;max-width:calc(100% - 32px);right:auto}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label[dir=rtl],[dir=rtl] .mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label{left:auto;right:32px}.mdc-text-field--with-leading-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 64px)}.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label{max-width:calc(100% - 36px)}.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 48px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label{max-width:calc(100% - 68px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.smui-text-field--standard .mdc-floating-label--float-above{max-width:calc(133.33333% - 90.66667px)}.mdc-text-field+.mdc-text-field-helper-line{padding-left:0;padding-right:0}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);line-height:normal;margin-left:auto;margin-right:0;margin-top:0;padding-left:16px;padding-right:0;text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);white-space:nowrap}.mdc-text-field-character-counter:before{content:"";display:inline-block;height:16px;vertical-align:0;width:0}.mdc-text-field-character-counter[dir=rtl],[dir=rtl] .mdc-text-field-character-counter{margin-left:0;margin-right:auto;padding-left:0;padding-right:16px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size,.75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing,.0333333333em);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height,1.25rem);line-height:normal;margin:0;opacity:0;text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);transition:opacity .15s cubic-bezier(.4,0,.2,1) 0ms;will-change:opacity}.mdc-text-field-helper-text:before{content:"";display:inline-block;height:16px;vertical-align:0;width:0}.mdc-text-field-helper-text--persistent{opacity:1;transition:none;will-change:auto}.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}.mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .mdc-text-field__icon--leading{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding:12px}.mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .mdc-text-field__icon--trailing{margin-left:0;margin-right:0}.smui-text-field--standard .mdc-text-field__icon--leading{margin-left:0;margin-right:8px}.smui-text-field--standard .mdc-text-field__icon--leading[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-text-field__icon--leading{margin-left:8px;margin-right:0}.smui-text-field--standard .mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding:12px 0 12px 12px}.smui-text-field--standard .mdc-text-field__icon--trailing[dir=rtl],[dir=rtl] .smui-text-field--standard .mdc-text-field__icon--trailing{margin-left:0;margin-right:0;padding-left:0;padding-right:12px}';zs(bA,{});var _A=":root *{--scrollbar-background:hsla(0,0%,100%,.1);scrollbar-track-color:transparent;scrollbar-face-color:var(--scrollbar-background);scrollbar-color:var(--scrollbar-background) transparent;scrollbar-width:thin;text-underline-offset:.5px}:root ::-webkit-scrollbar{border-radius:.3rem;height:5px;width:5px}:root ::-webkit-scrollbar-track{border-radius:.3rem}:root ::-webkit-scrollbar-corner{background:none!important}:root ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-background);border:3px solid var(--scrollbar-background);border-radius:20px;transition:background-color .5s}";zs(_A,{});var yA=":root{--cosmograph-search-text-color:#fff;--cosmograph-search-list-background:#222;--cosmograph-search-font-family:inherit;--cosmograph-search-input-background:#222;--cosmograph-search-mark-background:hsla(0,0%,100%,.2);--cosmograph-search-accessor-background:hsla(0,0%,100%,.2);--cosmograph-search-interactive-background:hsla(0,0%,100%,.4);--cosmograph-search-hover-color:hsla(0,0%,100%,.05)}.search-icon.svelte-1xknafk.svelte-1xknafk{color:var(--cosmograph-search-text-color)!important;opacity:.6}.search.svelte-1xknafk .cosmograph-search-accessor{align-content:center;background-color:var(--cosmograph-search-accessor-background);border-radius:10px;color:var(--cosmograph-search-text-color);cursor:pointer;display:flex;display:block;font-size:12px;font-style:normal;justify-content:center;line-height:1;margin-right:.5rem;overflow:hidden;padding:5px 8px;text-overflow:ellipsis;transition:background .15s linear;white-space:nowrap;z-index:1}.search.svelte-1xknafk .cosmograph-search-accessor.active,.search.svelte-1xknafk .cosmograph-search-accessor:hover{background-color:var(--cosmograph-search-interactive-background)}.search.svelte-1xknafk .disabled{cursor:default;pointer-events:none}.search.svelte-1xknafk.svelte-1xknafk{background:var(--cosmograph-search-input-background);display:flex;flex-direction:column;font-family:var(--cosmograph-search-font-family),sans-serif;text-align:left;width:100%}.search.svelte-1xknafk mark{background:var(--cosmograph-search-mark-background);border-radius:2px;color:var(--cosmograph-search-text-color);padding:1px 0}.search.svelte-1xknafk .cosmograph-search-match{-webkit-box-orient:vertical;cursor:pointer;display:-webkit-box;line-height:1.35;overflow:hidden;padding:calc(var(--margin-v)*1px) calc(var(--margin-h)*1px);text-overflow:ellipsis;white-space:normal}.search.svelte-1xknafk .cosmograph-search-match:hover{background:var(--cosmograph-search-hover-color)}.search.svelte-1xknafk .cosmograph-search-result{display:inline;font-size:12px;font-weight:600;text-transform:uppercase}.search.svelte-1xknafk .cosmograph-search-result>span{font-weight:400;letter-spacing:1;margin-left:4px}.search.svelte-1xknafk .cosmograph-search-result>span>t{margin-right:4px}.search.svelte-1xknafk .mdc-menu-surface{background-color:var(--cosmograph-search-list-background)!important;max-height:none!important}.search.svelte-1xknafk .openListUpwards.svelte-1xknafk .mdc-menu-surface{bottom:55px!important;top:unset!important}.search.svelte-1xknafk .mdc-text-field__input{caret-color:var(--cosmograph-search-text-color)!important;height:100%;letter-spacing:-.01em;line-height:2;line-height:2!important;padding-top:15px!important}.search.svelte-1xknafk .mdc-floating-label,.search.svelte-1xknafk .mdc-text-field__input{color:var(--cosmograph-search-text-color)!important;font-family:var(--cosmograph-search-font-family),sans-serif!important}.search.svelte-1xknafk .mdc-floating-label{opacity:.65;pointer-events:none!important}.search.svelte-1xknafk .mdc-line-ripple:after,.search.svelte-1xknafk .mdc-line-ripple:before{border-bottom-color:var(--cosmograph-search-text-color)!important;opacity:.1}.search.svelte-1xknafk .mdc-deprecated-list{background:var(--cosmograph-search-list-background);color:var(--cosmograph-search-text-color)!important;font-size:14px!important;padding-top:4px!important}.search.svelte-1xknafk .mdc-deprecated-list-item{height:28px!important}.search.svelte-1xknafk .mdc-text-field__icon--leading{margin-right:10px!important}.search.svelte-1xknafk .mdc-floating-label--float-above{left:26px!important;pointer-events:none!important}.search.svelte-1xknafk .mdc-text-field__icon--trailing{cursor:default!important;max-width:35%}.search.svelte-1xknafk .cosmograph-search-first-field{font-size:12.5px;font-weight:400;opacity:.8;text-transform:uppercase}";zs(yA,{});function Wp(i,e,t){const r=i.slice();return r[53]=e[t],r[52]=t,r}function Xp(i,e,t){const r=i.slice();return r[50]=e[t],r[52]=t,r}function xA(i){let e,t,r;return t=new vA({}),{c(){e=ti("div"),Jt(t.$$.fragment),si(e,"class","search-icon svelte-1xknafk")},m(n,a){gt(n,e,a),Yt(t,e,null),r=!0},p:xi,i(n){r||($e(t.$$.fragment,n),r=!0)},o(n){Be(t.$$.fragment,n),r=!1},d(n){n&&mt(e),Zt(t)}}}function wA(i){let e,t;return e=new W0({props:{slot:"leadingIcon",$$slots:{default:[xA]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};16777216&n[1]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||($e(e.$$.fragment,r),t=!0)},o(r){Be(e.$$.fragment,r),t=!1},d(r){Zt(e,r)}}}function Yp(i){let e,t,r=i[11].label+"";return{c(){e=ti("div"),t=mn(r),si(e,"class","cosmograph-search-accessor"),Zn(e,"active",i[2]),Zn(e,"disabled",!i[9])},m(n,a){gt(n,e,a),ji(e,t)},p(n,a){2048&a[0]&&r!==(r=n[11].label+"")&&Na(t,r),4&a[0]&&Zn(e,"active",n[2]),512&a[0]&&Zn(e,"disabled",!n[9])},d(n){n&&mt(e)}}}function SA(i){let e,t=i[11]&&Yp(i);return{c(){t&&t.c(),e=br()},m(r,n){t&&t.m(r,n),gt(r,e,n)},p(r,n){r[11]?t?t.p(r,n):(t=Yp(r),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(r){t&&t.d(r),r&&mt(e)}}}function EA(i){let e,t;return e=new W0({props:{role:"button",style:"display: flex;",slot:"trailingIcon",$$slots:{default:[SA]},$$scope:{ctx:i}}}),e.$on("SMUITextField:icon",i[14]),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};2564&n[0]|16777216&n[1]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||($e(e.$$.fragment,r),t=!0)},o(r){Be(e.$$.fragment,r),t=!1},d(r){Zt(e,r)}}}function TA(i){let e,t,r;return t=new Hu({props:{$$slots:{default:[kA]},$$scope:{ctx:i}}}),{c(){e=ti("div"),Jt(t.$$.fragment),Kn(e,"pointer-events","none")},m(n,a){gt(n,e,a),Yt(t,e,null),r=!0},p(n,a){const o={};16777216&a[1]&&(o.$$scope={dirty:a,ctx:n}),t.$set(o)},i(n){r||($e(t.$$.fragment,n),r=!0)},o(n){Be(t.$$.fragment,n),r=!1},d(n){n&&mt(e),Zt(t)}}}function IA(i){let e,t=[],r=new Map,n=i[4];const a=o=>o[52];for(let o=0;o{r=null}),rr())},i(o){t||($e(r),t=!0)},o(o){Be(r),t=!1},d(o){r&&r.d(o),o&&mt(e)}}}function CA(i){let e;return{c(){e=mn("No matches found")},m(t,r){gt(t,e,r)},d(t){t&&mt(e)}}}function kA(i){let e,t;return e=new H0({props:{$$slots:{default:[CA]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};16777216&n[1]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||($e(e.$$.fragment,r),t=!0)},o(r){Be(e.$$.fragment,r),t=!1},d(r){Zt(e,r)}}}function Zp(i,e){let t,r,n,a,o,s=e[19](e[53])+"";return{key:i,first:null,c(){t=ti("div"),r=ti("div"),n=Ti(),si(t,"class","cosmograph-search-match"),Kn(t,"--margin-v",PA),Kn(t,"--margin-h",DA),this.first=t},m(l,d){gt(l,t,d),ji(t,r),r.innerHTML=s,ji(t,n),a||(o=[Ii(t,"click",function(){Li(e[17](e[53]))&&e[17](e[53]).apply(this,arguments)}),Ii(t,"keydown",function(){Li(e[17](e[53]))&&e[17](e[53]).apply(this,arguments)})],a=!0)},p(l,d){e=l,16&d[0]&&s!==(s=e[19](e[53])+"")&&(r.innerHTML=s)},d(l){l&&mt(t),a=!1,Hi(o)}}}function Kp(i){var c;let e,t,r,n,a,o=[],s=new Map;t=new Hu({props:{$$slots:{default:[$A]},$$scope:{ctx:i}}});let l=(c=i[1])==null?void 0:c.accessors;const d=u=>u[52];for(let u=0;u{o[c]=null}),rr(),r=o[t],r?r.p(l,d):(r=o[t]=a[t](l),r.c()),$e(r,1),r.m(e,null))},i(l){n||($e(r),n=!0)},o(l){Be(r),n=!1},d(l){l&&mt(e),o[t].d(),i[28](null)}}}function FA(i){let e,t;return e=new IT({props:{style:"max-height: "+i[8]+"px; transition: max-height 0.1s linear;",$$slots:{default:[RA]},$$scope:{ctx:i}}}),{c(){Jt(e.$$.fragment)},m(r,n){Yt(e,r,n),t=!0},p(r,n){const a={};256&n[0]&&(a.style="max-height: "+r[8]+"px; transition: max-height 0.1s linear;"),86&n[0]|16777216&n[1]&&(a.$$scope={dirty:n,ctx:r}),e.$set(a)},i(r){t||($e(e.$$.fragment,r),t=!0)},o(r){Be(e.$$.fragment,r),t=!1},d(r){Zt(e,r)}}}function NA(i){let e,t,r,n,a,o,s,l,d;function c(y){i[26](y)}function u(y){i[27](y)}let f={style:"opacity: "+(i[1].isDisabled?.5:1),label:i[1].placeholder,$$slots:{trailingIcon:[EA],leadingIcon:[wA]},$$scope:{ctx:i}};function m(y){i[29](y)}i[0]!==void 0&&(f.value=i[0]),i[12]!==void 0&&(f.disabled=i[12]),t=new XI({props:f}),i[25](t),Ft.push(()=>Kr(t,"value",c)),Ft.push(()=>Kr(t,"disabled",u)),t.$on("click",i[18]),t.$on("focus",i[20]),t.$on("input",i[16]),t.$on("keydown",i[15]);let p={style:"width: 100%; bottom: initial;",$$slots:{default:[FA]},$$scope:{ctx:i}};return i[3]!==void 0&&(p.open=i[3]),s=new fA({props:p}),Ft.push(()=>Kr(s,"open",m)),i[30](s),{c(){e=ti("div"),Jt(t.$$.fragment),a=Ti(),o=ti("div"),Jt(s.$$.fragment),Kn(o,"position","relative"),si(o,"class","svelte-1xknafk"),Zn(o,"openListUpwards",i[1].openListUpwards),Zn(o,"accessors",i[2]),si(e,"class","search svelte-1xknafk")},m(y,x){gt(y,e,x),Yt(t,e,null),ji(e,a),ji(e,o),Yt(s,o,null),i[31](e),d=!0},p(y,x){const E={};2&x[0]&&(E.style="opacity: "+(y[1].isDisabled?.5:1)),2&x[0]&&(E.label=y[1].placeholder),2564&x[0]|16777216&x[1]&&(E.$$scope={dirty:x,ctx:y}),!r&&1&x[0]&&(r=!0,E.value=y[0],Zr(()=>r=!1)),!n&&4096&x[0]&&(n=!0,E.disabled=y[12],Zr(()=>n=!1)),t.$set(E);const k={};342&x[0]|16777216&x[1]&&(k.$$scope={dirty:x,ctx:y}),!l&&8&x[0]&&(l=!0,k.open=y[3],Zr(()=>l=!1)),s.$set(k),(!d||2&x[0])&&Zn(o,"openListUpwards",y[1].openListUpwards),(!d||4&x[0])&&Zn(o,"accessors",y[2])},i(y){d||($e(t.$$.fragment,y),$e(s.$$.fragment,y),d=!0)},o(y){Be(t.$$.fragment,y),Be(s.$$.fragment,y),d=!1},d(y){y&&mt(e),i[25](null),Zt(t),i[30](null),Zt(s),i[31](null)}}}const PA=4,DA=12;function MA(i,e,t){let r;var n,a;const o=jE();let s,l,d,c,u,f,{config:m}=e,{data:p=[]}=e,{textInput:y=""}=e,x=!0,E=!1,k=!1,I=[];const v=new Set,M=new DOMParser;let K;const L=N=>{if(!p)return;if(!N.trim())return void t(4,I=[]);let C=0;const Q=new RegExp(ep(N),"i"),V=ne=>String(K.accessor(ne));t(4,I=p.filter(ne=>{if(m.limitSuggestions&&C>=m.limitSuggestions)return!1;const Ve=V(ne).match(Q);return Ve&&(C+=1),Ve})),I.length>0&&I.sort((ne,Ve)=>{const Re=V(ne).toLowerCase(),Ge=V(Ve).toLowerCase(),tt=N.toLowerCase();if(Re===tt&&Ge!==tt)return-1;if(Ge===tt&&Re!==tt)return 1;const ot=Re.indexOf(tt),he=Ge.indexOf(tt);return ot!==he?ot-he:Re.localeCompare(Ge)}),o(cn.Input,I)},R=N=>{return RegExp.prototype.test.bind(/(<([^>]+)>)/i)(N)?(C=N,M.parseFromString(C,"text/html").documentElement.textContent||""):N;var C},W=N=>N.replace(/[&<>]/g,C=>({"&":"&","<":"<",">":">"})[C]||C),Oe=(N,C)=>{const Q=R(N),V=m&&m.truncateValues?m.truncateValues:Q.length,ne=(bt=>new RegExp(ep(bt),"i"))(y),Ve=C?((bt,wt)=>bt.search(wt))(Q,ne):-1;if(Ve===-1)return Q.substring(0,+V)+(Q.length>V?"...":"");const{startPosition:Re,endPosition:Ge}=((bt,wt,pt)=>{let Lt=Math.max(0,bt-Math.floor(wt/2));const xe=Math.min(pt,Lt+wt);return xe-bt0?"...":"",he=Ge`${bt}`):tt}${he}`},me=()=>{setTimeout(()=>{var N;let C,Q=0;const V=(N=m.maxVisibleItems)!==null&&N!==void 0?N:Ss.maxVisibleItems;l.querySelectorAll(`.cosmograph-search-match:nth-child(-n+${V})`).forEach(ne=>{Q+=ne.offsetHeight}),Q=I.length?Q+6:46,C=m.openListUpwards?d.getBoundingClientRect().top-window.scrollY-60:window.innerHeight-d.getBoundingClientRect().bottom-60,Q>C&&(Q=C),t(8,u=Q)},0)},de=()=>{setTimeout(()=>{var N;let C=0;const Q=(N=m.maxVisibleItems)!==null&&N!==void 0?N:Ss.maxVisibleItems;l.querySelectorAll(`li:nth-child(-n+${Q})`).forEach(V=>{C+=V.offsetHeight}),t(8,u=C+24)},0)};return Ur(()=>{c=new AE(()=>{c&&l&&(I&&me(),E&&de())}),c.observe(d)}),Pa(()=>{c.disconnect()}),i.$$set=N=>{"config"in N&&t(1,m=N.config),"data"in N&&t(21,p=N.data),"textInput"in N&&t(0,y=N.textInput)},i.$$.update=()=>{if(25165826&i.$$.dirty[0]){t(11,K=(()=>{var C,Q,V;return m.activeAccessorIndex!=null&&(!((C=m.accessors)===null||C===void 0)&&C[m.activeAccessorIndex])?m.accessors[m.activeAccessorIndex]:K&&m.accessors?m.accessors.find(ne=>ne===K)||((Q=m.accessors)===null||Q===void 0?void 0:Q[0]):(V=m.accessors)===null||V===void 0?void 0:V[0]})());const N=t(24,a=t(23,n=m.accessors)===null||n===void 0?void 0:n.length)!==null&&a!==void 0?a:0;t(9,x=N>1)}12&i.$$.dirty[0]&&E&&!k&&setTimeout(()=>{t(2,E=!1)},100),2097158&i.$$.dirty[0]&&t(12,r=!p.length||E||!!m.isDisabled),16&i.$$.dirty[0]&&I&&me(),4&i.$$.dirty[0]&&E&&de()},[y,m,E,k,I,s,l,d,u,x,f,K,r,(N,C)=>{m.activeAccessorIndex===void 0&&t(11,K=N),f==null||f.setOpen(!1),setTimeout(()=>{t(2,E=!1)},100),o(cn.AccessorSelect,{index:C,accessor:K})},()=>{x&&(t(0,y=""),f==null||f.setOpen(!1),setTimeout(()=>{f==null||f.setOpen(!0),t(2,E=!0)},100))},N=>{N.key==="Enter"&&m.minMatch!==void 0&&y.length>=m.minMatch&&o(cn.Enter,{textInput:y,accessor:K})},N=>{const C=N==null?void 0:N.target;E||(m.minMatch!==void 0&&C.value.lengthC=>{document.activeElement!==null&&document.activeElement.blur(),f.setOpen(!1),v.size>=5&&v.delete(v.values().next().value),v.add(N),o(cn.Select,N)},()=>{setTimeout(()=>{E||k||y.length!==0||(v.size?t(4,I=Array.from(v)):p.length&&t(4,I=p.slice(0,m.maxVisibleItems)),f.setOpen(!0))},110)},N=>(C=>{var Ve;var Q;const Re=C,{[Ve=K.label]:V}=Re,ne=Yh(Re,[Xh(Ve)]);if(Object.keys(ne).length>0){const Ge=(Q=m.matchPalette)!==null&&Q!==void 0?Q:Ss.matchPalette,tt=he=>`color: ${Ge[he%Ge.length]}`,ot=Object.entries(ne).map(([he,bt],wt)=>{const pt=Oe(typeof bt=="object"?JSON.stringify(bt):String(bt));return`·${W(he)}: ${pt}`});return` + ${W(K.label)}: + ${Oe(String(V),!0)} +
+ ${ot.join("")} +
+ `}return Oe(String(V),!0)})((C=>{const Q={},V=Object.keys(C),ne=K.accessor(C);if(ne&&(Q[K.label]=ne),!m.ordering||!m.ordering.order&&!m.ordering.include){const Ge=Object.entries(C).findIndex(([tt,ot])=>K.accessor({[tt]:ot}));Ge!==-1&&V.splice(Ge,1);for(const tt of V)Q[tt]=C[tt];return Q}const Ve=m.ordering.order||[];let Re=m.ordering.include?new Set(m.ordering.include):null;if(Re||(Re=new Set(V)),Ve.length>0)for(const Ge of Ve)Ge in C&&(Q[Ge]=C[Ge]);for(const Ge in C)!Object.prototype.hasOwnProperty.call(Q,Ge)&&Re.has(Ge)&&(Q[Ge]=C[Ge]);return Q})(N)),N=>{N.preventDefault()},p,N=>{f==null||f.setOpen(N)},n,a,function(N){Ft[N?"unshift":"push"](()=>{s=N,t(5,s)})},function(N){y=N,t(0,y)},function(N){r=N,t(12,r),t(21,p),t(2,E),t(1,m),t(3,k)},function(N){Ft[N?"unshift":"push"](()=>{l=N,t(6,l)})},function(N){k=N,t(3,k)},function(N){Ft[N?"unshift":"push"](()=>{f=N,t(10,f)})},function(N){Ft[N?"unshift":"push"](()=>{d=N,t(7,d)})}]}class zA extends hr{constructor(e){super(),fr(this,e,MA,NA,Zi,{config:1,data:21,textInput:0,setListState:22},null,[-1,-1])}get setListState(){return this.$$.ctx[22]}}let BA=class{constructor(e,t){this._config={},this._containerNode=e,this._config=La(Ss,t!=null?t:{}),this._search=new zA({target:e,props:{config:this._config}}),this._search.$on(cn.Input,({detail:r})=>{var n,a;return(a=(n=this._config.events)===null||n===void 0?void 0:n.onSearch)===null||a===void 0?void 0:a.call(n,r)}),this._search.$on(cn.Select,({detail:r})=>{var n,a;return(a=(n=this._config.events)===null||n===void 0?void 0:n.onSelect)===null||a===void 0?void 0:a.call(n,r)}),this._search.$on(cn.Enter,({detail:r})=>{var n,a;return(a=(n=this._config.events)===null||n===void 0?void 0:n.onEnter)===null||a===void 0?void 0:a.call(n,r)}),this._search.$on(cn.AccessorSelect,({detail:r})=>{var n,a;return(a=(n=this._config.events)===null||n===void 0?void 0:n.onAccessorSelect)===null||a===void 0?void 0:a.call(n,r)})}setData(e){this._search.$set({data:e,textInput:""})}setConfig(e){this._config=La(Ss,e!=null?e:{}),this._search.$set({config:this._config,textInput:""})}setListState(e){this._search.setListState(e)}clearInput(){this._search.$set({textInput:""})}getConfig(){return this._config}destroy(){this._containerNode.innerHTML=""}};const UA='',GA="modulepreload",jA=function(i){return"/static/"+i},Qp={},Do=function(e,t,r){let n=Promise.resolve();if(t&&t.length>0){const a=document.getElementsByTagName("link");n=Promise.all(t.map(o=>{if(o=jA(o),o in Qp)return;Qp[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let u=a.length-1;u>=0;u--){const f=a[u];if(f.href===o&&(!s||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":GA,s||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),s)return new Promise((u,f)=>{c.addEventListener("load",u),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})}))}return n.then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},VA=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Do(()=>Promise.resolve().then(()=>Bs),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)};class qu extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}}class HA extends qu{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class qA extends qu{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class WA extends qu{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var XA=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{d(r.next(c))}catch(u){o(u)}}function l(c){try{d(r.throw(c))}catch(u){o(u)}}function d(c){c.done?a(c.value):n(c.value).then(s,l)}d((r=r.apply(i,e||[])).next())})};class YA{constructor(e,{headers:t={},customFetch:r}={}){this.url=e,this.headers=t,this.fetch=VA(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var r;return XA(this,void 0,void 0,function*(){try{const{headers:n,method:a,body:o}=t;let s={},l;o&&(n&&!Object.prototype.hasOwnProperty.call(n,"Content-Type")||!n)&&(typeof Blob!="undefined"&&o instanceof Blob||o instanceof ArrayBuffer?(s["Content-Type"]="application/octet-stream",l=o):typeof o=="string"?(s["Content-Type"]="text/plain",l=o):typeof FormData!="undefined"&&o instanceof FormData?l=o:(s["Content-Type"]="application/json",l=JSON.stringify(o)));const d=yield this.fetch(`${this.url}/${e}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},s),this.headers),n),body:l}).catch(m=>{throw new HA(m)}),c=d.headers.get("x-relay-error");if(c&&c==="true")throw new qA(d);if(!d.ok)throw new WA(d);let u=((r=d.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),f;return u==="application/json"?f=yield d.json():u==="application/octet-stream"?f=yield d.blob():u==="multipart/form-data"?f=yield d.formData():f=yield d.text(),{data:f,error:null}}catch(n){return{data:null,error:n}}})}}var ZA=function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("unable to locate global object")},Mo=ZA();const KA=Mo.fetch,Wu=Mo.fetch.bind(Mo),Y0=Mo.Headers,JA=Mo.Request,QA=Mo.Response,Bs=Object.freeze(Object.defineProperty({__proto__:null,Headers:Y0,Request:JA,Response:QA,default:Wu,fetch:KA},Symbol.toStringTag,{value:"Module"}));class e4 extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}class t4{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch=="undefined"?this.fetch=Wu:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(e,t){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let n=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(a=>fe(this,null,function*(){var o,s,l;let d=null,c=null,u=null,f=a.status,m=a.statusText;if(a.ok){if(this.method!=="HEAD"){const E=yield a.text();E===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=E:c=JSON.parse(E))}const y=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),x=(s=a.headers.get("content-range"))===null||s===void 0?void 0:s.split("/");y&&x&&x.length>1&&(u=parseInt(x[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(d={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,u=null,f=406,m="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const y=yield a.text();try{d=JSON.parse(y),Array.isArray(d)&&a.status===404&&(c=[],d=null,f=200,m="OK")}catch(x){a.status===404&&y===""?(f=204,m="No Content"):d={message:y}}if(d&&this.isMaybeSingle&&(!((l=d==null?void 0:d.details)===null||l===void 0)&&l.includes("0 rows"))&&(d=null,f=200,m="OK"),d&&this.shouldThrowOnError)throw new e4(d)}return{error:d,data:c,count:u,status:f,statusText:m}}));return this.shouldThrowOnError||(n=n.catch(a=>{var o,s,l;return{error:{message:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:`${(s=a==null?void 0:a.stack)!==null&&s!==void 0?s:""}`,hint:"",code:`${(l=a==null?void 0:a.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),n.then(e,t)}}class i4 extends t4{select(e){let t=!1;const r=(e!=null?e:"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:a=n}={}){const o=a?`${a}.order`:"order",s=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${s?`${s},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r=="undefined"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const a=typeof n=="undefined"?"offset":`${n}.offset`,o=typeof n=="undefined"?"limit":`${n}.limit`;return this.url.searchParams.set(a,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:a=!1,format:o="text"}={}){var s;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,a?"wal":null].filter(Boolean).join("|"),d=(s=this.headers.Accept)!==null&&s!==void 0?s:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${d}"; options=${l};`,o==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}class vo extends i4{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const r=t.map(n=>typeof n=="string"&&new RegExp("[,()]").test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let a="";n==="plain"?a="pl":n==="phrase"?a="ph":n==="websearch"&&(a="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${a}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}}class r4{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=t,this.schema=r,this.fetch=n}select(e,{head:t=!1,count:r}={}){const n=t?"HEAD":"GET";let a=!1;const o=(e!=null?e:"*").split("").map(s=>/\s/.test(s)&&!a?"":(s==='"'&&(a=!a),s)).join("");return this.url.searchParams.set("select",o),r&&(this.headers.Prefer=`count=${r}`),new vo({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:r=!0}={}){const n="POST",a=[];if(this.headers.Prefer&&a.push(this.headers.Prefer),t&&a.push(`count=${t}`),r||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const o=e.reduce((s,l)=>s.concat(Object.keys(l)),[]);if(o.length>0){const s=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",s.join(","))}}return new vo({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:a=!0}={}){const o="POST",s=[`resolution=${r?"ignore":"merge"}-duplicates`];if(t!==void 0&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),a||s.push("missing=default"),this.headers.Prefer=s.join(","),Array.isArray(e)){const l=e.reduce((d,c)=>d.concat(Object.keys(c)),[]);if(l.length>0){const d=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",d.join(","))}}return new vo({method:o,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const r="PATCH",n=[];return this.headers.Prefer&&n.push(this.headers.Prefer),t&&n.push(`count=${t}`),this.headers.Prefer=n.join(","),new vo({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t="DELETE",r=[];return e&&r.push(`count=${e}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new vo({method:t,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const n4="1.9.2",a4={"X-Client-Info":`postgrest-js/${n4}`};class Xu{constructor(e,{headers:t={},schema:r,fetch:n}={}){this.url=e,this.headers=Object.assign(Object.assign({},a4),t),this.schemaName=r,this.fetch=n}from(e){const t=new URL(`${this.url}/${e}`);return new r4(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new Xu(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:r=!1,count:n}={}){let a;const o=new URL(`${this.url}/rpc/${e}`);let s;r?(a="HEAD",Object.entries(t).forEach(([d,c])=>{o.searchParams.append(d,`${c}`)})):(a="POST",s=t);const l=Object.assign({},this.headers);return n&&(l.Prefer=`count=${n}`),new vo({method:a,url:o,headers:l,schema:this.schemaName,body:s,fetch:this.fetch,allowEmpty:!1})}}const o4="2.9.3",s4={"X-Client-Info":`realtime-js/${o4}`},l4="1.0.0",Z0=1e4,d4=1e3;var Io;(function(i){i[i.connecting=0]="connecting",i[i.open=1]="open",i[i.closing=2]="closing",i[i.closed=3]="closed"})(Io||(Io={}));var Fr;(function(i){i.closed="closed",i.errored="errored",i.joined="joined",i.joining="joining",i.leaving="leaving"})(Fr||(Fr={}));var Wr;(function(i){i.close="phx_close",i.error="phx_error",i.join="phx_join",i.reply="phx_reply",i.leave="phx_leave",i.access_token="access_token"})(Wr||(Wr={}));var bu;(function(i){i.websocket="websocket"})(bu||(bu={}));var wa;(function(i){i.Connecting="connecting",i.Open="open",i.Closing="closing",i.Closed="closed"})(wa||(wa={}));class K0{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}class c4{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,t,r)}_decodeBroadcast(e,t,r){const n=t.getUint8(1),a=t.getUint8(2);let o=this.HEADER_LENGTH+2;const s=r.decode(e.slice(o,o+n));o=o+n;const l=r.decode(e.slice(o,o+a));o=o+a;const d=JSON.parse(r.decode(e.slice(o,e.byteLength)));return{ref:null,topic:s,event:l,payload:d}}}class Bc{constructor(e,t,r={},n=Z0){this.channel=e,this.event=t,this.payload=r,this.timeout=n,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var r;return this._hasReceived(e)&&t((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=t=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=t,this._matchReceive(t)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var eg;(function(i){i.SYNC="sync",i.JOIN="join",i.LEAVE="leave"})(eg||(eg={}));class Ts{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(t==null?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},n=>{const{onJoin:a,onLeave:o,onSync:s}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ts.syncState(this.state,n,a,o),this.pendingDiffs.forEach(l=>{this.state=Ts.syncDiff(this.state,l,a,o)}),this.pendingDiffs=[],s()}),this.channel._on(r.diff,{},n=>{const{onJoin:a,onLeave:o,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(n):(this.state=Ts.syncDiff(this.state,n,a,o),s())}),this.onJoin((n,a,o)=>{this.channel._trigger("presence",{event:"join",key:n,currentPresences:a,newPresences:o})}),this.onLeave((n,a,o)=>{this.channel._trigger("presence",{event:"leave",key:n,currentPresences:a,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,r,n){const a=this.cloneDeep(e),o=this.transformState(t),s={},l={};return this.map(a,(d,c)=>{o[d]||(l[d]=c)}),this.map(o,(d,c)=>{const u=a[d];if(u){const f=c.map(x=>x.presence_ref),m=u.map(x=>x.presence_ref),p=c.filter(x=>m.indexOf(x.presence_ref)<0),y=u.filter(x=>f.indexOf(x.presence_ref)<0);p.length>0&&(s[d]=p),y.length>0&&(l[d]=y)}else s[d]=c}),this.syncDiff(a,{joins:s,leaves:l},r,n)}static syncDiff(e,t,r,n){const{joins:a,leaves:o}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return r||(r=()=>{}),n||(n=()=>{}),this.map(a,(s,l)=>{var d;const c=(d=e[s])!==null&&d!==void 0?d:[];if(e[s]=this.cloneDeep(l),c.length>0){const u=e[s].map(m=>m.presence_ref),f=c.filter(m=>u.indexOf(m.presence_ref)<0);e[s].unshift(...f)}r(s,c,l)}),this.map(o,(s,l)=>{let d=e[s];if(!d)return;const c=l.map(u=>u.presence_ref);d=d.filter(u=>c.indexOf(u.presence_ref)<0),e[s]=d,n(s,d,l),d.length===0&&delete e[s]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(r=>t(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,r)=>{const n=e[r];return"metas"in n?t[r]=n.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):t[r]=n,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var gi;(function(i){i.abstime="abstime",i.bool="bool",i.date="date",i.daterange="daterange",i.float4="float4",i.float8="float8",i.int2="int2",i.int4="int4",i.int4range="int4range",i.int8="int8",i.int8range="int8range",i.json="json",i.jsonb="jsonb",i.money="money",i.numeric="numeric",i.oid="oid",i.reltime="reltime",i.text="text",i.time="time",i.timestamp="timestamp",i.timestamptz="timestamptz",i.timetz="timetz",i.tsrange="tsrange",i.tstzrange="tstzrange"})(gi||(gi={}));const tg=(i,e,t={})=>{var r;const n=(r=t.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(e).reduce((a,o)=>(a[o]=u4(o,i,e,n),a),{})},u4=(i,e,t,r)=>{const n=e.find(s=>s.name===i),a=n==null?void 0:n.type,o=t[i];return a&&!r.includes(a)?J0(a,o):_u(o)},J0=(i,e)=>{if(i.charAt(0)==="_"){const t=i.slice(1,i.length);return p4(e,t)}switch(i){case gi.bool:return f4(e);case gi.float4:case gi.float8:case gi.int2:case gi.int4:case gi.int8:case gi.numeric:case gi.oid:return h4(e);case gi.json:case gi.jsonb:return m4(e);case gi.timestamp:return g4(e);case gi.abstime:case gi.date:case gi.daterange:case gi.int4range:case gi.int8range:case gi.money:case gi.reltime:case gi.text:case gi.time:case gi.timestamptz:case gi.timetz:case gi.tsrange:case gi.tstzrange:return _u(e);default:return _u(e)}},_u=i=>i,f4=i=>{switch(i){case"t":return!0;case"f":return!1;default:return i}},h4=i=>{if(typeof i=="string"){const e=parseFloat(i);if(!Number.isNaN(e))return e}return i},m4=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch(e){return console.log(`JSON parse error: ${e}`),i}return i},p4=(i,e)=>{if(typeof i!="string")return i;const t=i.length-1,r=i[t];if(i[0]==="{"&&r==="}"){let a;const o=i.slice(1,t);try{a=JSON.parse("["+o+"]")}catch(s){a=o?o.split(","):[]}return a.map(s=>J0(e,s))}return i},g4=i=>typeof i=="string"?i.replace(" ","T"):i;var ig;(function(i){i.ALL="*",i.INSERT="INSERT",i.UPDATE="UPDATE",i.DELETE="DELETE"})(ig||(ig={}));var rg;(function(i){i.BROADCAST="broadcast",i.PRESENCE="presence",i.POSTGRES_CHANGES="postgres_changes"})(rg||(rg={}));var ng;(function(i){i.SUBSCRIBED="SUBSCRIBED",i.TIMED_OUT="TIMED_OUT",i.CLOSED="CLOSED",i.CHANNEL_ERROR="CHANNEL_ERROR"})(ng||(ng={}));class Yu{constructor(e,t={config:{}},r){this.topic=e,this.params=t,this.socket=r,this.bindings={},this.state=Fr.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},t.config),this.timeout=this.socket.timeout,this.joinPush=new Bc(this,Wr.join,this.params,this.timeout),this.rejoinTimer=new K0(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Fr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Fr.closed,this.socket._remove(this)}),this._onError(n=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,n),this.state=Fr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Fr.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Wr.reply,{},(n,a)=>{this._trigger(this._replyEventName(a),n)}),this.presence=new Ts(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(e,t=this.timeout){var r,n;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:a,presence:o}}=this.params;this._onError(d=>e&&e("CHANNEL_ERROR",d)),this._onClose(()=>e&&e("CLOSED"));const s={},l={broadcast:a,presence:o,postgres_changes:(n=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(d=>d.filter))!==null&&n!==void 0?n:[]};this.socket.accessToken&&(s.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:l},s)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",({postgres_changes:d})=>{var c;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),d===void 0){e&&e("SUBSCRIBED");return}else{const u=this.bindings.postgres_changes,f=(c=u==null?void 0:u.length)!==null&&c!==void 0?c:0,m=[];for(let p=0;p{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}track(r){return fe(this,arguments,function*(e,t={}){return yield this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)})}untrack(){return fe(this,arguments,function*(e={}){return yield this.send({type:"presence",event:"untrack"},e)})}on(e,t,r){return this._on(e,t,r)}send(r){return fe(this,arguments,function*(e,t={}){var n,a;if(!this._canPush()&&e.type==="broadcast"){const{event:o,payload:s}=e,l={method:"POST",headers:{apikey:(n=this.socket.apiKey)!==null&&n!==void 0?n:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:s}]})};try{return(yield this._fetchWithTimeout(this.broadcastEndpointURL,l,(a=t.timeout)!==null&&a!==void 0?a:this.timeout)).ok?"ok":"error"}catch(d){return d.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var s,l,d;const c=this._push(e.type,e,t.timeout||this.timeout);e.type==="broadcast"&&!(!((d=(l=(s=this.params)===null||s===void 0?void 0:s.config)===null||l===void 0?void 0:l.broadcast)===null||d===void 0)&&d.ack)&&o("ok"),c.receive("ok",()=>o("ok")),c.receive("timeout",()=>o("timed out"))})})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Fr.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Wr.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const n=new Bc(this,Wr.leave,{},e);n.receive("ok",()=>{t(),r("ok")}).receive("timeout",()=>{t(),r("timed out")}).receive("error",()=>{r("error")}),n.send(),this._canPush()||n.trigger("ok",{})})}_broadcastEndpointURL(){let e=this.socket.endPoint;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"}_fetchWithTimeout(e,t,r){return fe(this,null,function*(){const n=new AbortController,a=setTimeout(()=>n.abort(),r),o=yield this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return clearTimeout(a),o})}_push(e,t,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let n=new Bc(this,e,t,r);return this._canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}_onMessage(e,t,r){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,r){var n,a;const o=e.toLocaleLowerCase(),{close:s,error:l,leave:d,join:c}=Wr;if(r&&[s,l,d,c].indexOf(o)>=0&&r!==this._joinRef())return;let f=this._onMessage(o,t,r);if(t&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(n=this.bindings.postgres_changes)===null||n===void 0||n.filter(m=>{var p,y,x;return((p=m.filter)===null||p===void 0?void 0:p.event)==="*"||((x=(y=m.filter)===null||y===void 0?void 0:y.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===o}).map(m=>m.callback(f,r)):(a=this.bindings[o])===null||a===void 0||a.filter(m=>{var p,y,x,E,k,I;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in m){const v=m.id,M=(p=m.filter)===null||p===void 0?void 0:p.event;return v&&((y=t.ids)===null||y===void 0?void 0:y.includes(v))&&(M==="*"||(M==null?void 0:M.toLocaleLowerCase())===((x=t.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))}else{const v=(k=(E=m==null?void 0:m.filter)===null||E===void 0?void 0:E.event)===null||k===void 0?void 0:k.toLocaleLowerCase();return v==="*"||v===((I=t==null?void 0:t.event)===null||I===void 0?void 0:I.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===o}).map(m=>{if(typeof f=="object"&&"ids"in f){const p=f.data,{schema:y,table:x,commit_timestamp:E,type:k,errors:I}=p;f=Object.assign(Object.assign({},{schema:y,table:x,commit_timestamp:E,eventType:k,new:{},old:{},errors:I}),this._getPayloadRecords(p))}m.callback(f,r)})}_isClosed(){return this.state===Fr.closed}_isJoined(){return this.state===Fr.joined}_isJoining(){return this.state===Fr.joining}_isLeaving(){return this.state===Fr.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,r){const n=e.toLocaleLowerCase(),a={type:n,filter:t,callback:r};return this.bindings[n]?this.bindings[n].push(a):this.bindings[n]=[a],this}_off(e,t){const r=e.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(n=>{var a;return!(((a=n.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===r&&Yu.isEqual(n.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Wr.close,{},e)}_onError(e){this._on(Wr.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Fr.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(t.new=tg(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(t.old=tg(e.columns,e.old_record)),t}}const v4=()=>{},b4=typeof WebSocket!="undefined";class _4{constructor(e,t){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.headers=s4,this.params={},this.timeout=Z0,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=v4,this.conn=null,this.sendBuffer=[],this.serializer=new c4,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=a=>{let o;return a?o=a:typeof fetch=="undefined"?o=(...s)=>Do(()=>Promise.resolve().then(()=>Bs),void 0).then(({default:l})=>l(...s)):o=fetch,(...s)=>o(...s)},this.endPoint=`${e}/${bu.websocket}`,t!=null&&t.transport?this.transport=t.transport:this.transport=null,t!=null&&t.params&&(this.params=t.params),t!=null&&t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),t!=null&&t.timeout&&(this.timeout=t.timeout),t!=null&&t.logger&&(this.logger=t.logger),t!=null&&t.heartbeatIntervalMs&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const n=(r=t==null?void 0:t.params)===null||r===void 0?void 0:r.apikey;n&&(this.accessToken=n,this.apiKey=n),this.reconnectAfterMs=t!=null&&t.reconnectAfterMs?t.reconnectAfterMs:a=>[1e3,2e3,5e3,1e4][a-1]||1e4,this.encode=t!=null&&t.encode?t.encode:(a,o)=>o(JSON.stringify(a)),this.decode=t!=null&&t.decode?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new K0(()=>fe(this,null,function*(){this.disconnect(),this.connect()}),this.reconnectAfterMs),this.fetch=this._resolveFetch(t==null?void 0:t.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(b4){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new y4(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),Do(()=>import("./browser-C1tfp1OT.js").then(e=>e.b),__vite__mapDeps([])).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,t!=null?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}removeChannel(e){return fe(this,null,function*(){const t=yield e.unsubscribe();return this.channels.length===0&&this.disconnect(),t})}removeAllChannels(){return fe(this,null,function*(){const e=yield Promise.all(this.channels.map(t=>t.unsubscribe()));return this.disconnect(),e})}log(e,t,r){this.logger(e,t,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Io.connecting:return wa.Connecting;case Io.open:return wa.Open;case Io.closing:return wa.Closing;default:return wa.Closed}}isConnected(){return this.connectionState()===wa.Open}channel(e,t={config:{}}){const r=new Yu(`realtime:${e}`,t,this);return this.channels.push(r),r}push(e){const{topic:t,event:r,payload:n,ref:a}=e,o=()=>{this.encode(e,s=>{var l;(l=this.conn)===null||l===void 0||l.send(s)})};this.log("push",`${t} ${r} (${a})`,n),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(e){this.accessToken=e,this.channels.forEach(t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(Wr.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:l4}))}_onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:a,ref:o}=t;(o&&o===this.pendingHeartbeatRef||n===(a==null?void 0:a.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${a.status||""} ${r} ${n} ${o&&"("+o+")"||""}`,a),this.channels.filter(s=>s._isMember(r)).forEach(s=>s._trigger(n,a,o)),this.stateChangeCallbacks.message.forEach(s=>s(t))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(Wr.error))}_appendParams(e,t){if(Object.keys(t).length===0)return e;const r=e.match(/\?/)?"&":"?",n=new URLSearchParams(t);return`${e}${r}${n}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(d4,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class y4{constructor(e,t,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=Io.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=r.close}}class Zu extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function pr(i){return typeof i=="object"&&i!==null&&"__isStorageError"in i}class x4 extends Zu{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class ag extends Zu{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}var w4=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{d(r.next(c))}catch(u){o(u)}}function l(c){try{d(r.throw(c))}catch(u){o(u)}}function d(c){c.done?a(c.value):n(c.value).then(s,l)}d((r=r.apply(i,e||[])).next())})};const Q0=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Do(()=>Promise.resolve().then(()=>Bs),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)},S4=()=>w4(void 0,void 0,void 0,function*(){return typeof Response=="undefined"?(yield Do(()=>Promise.resolve().then(()=>Bs),void 0)).Response:Response});var zo=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{d(r.next(c))}catch(u){o(u)}}function l(c){try{d(r.throw(c))}catch(u){o(u)}}function d(c){c.done?a(c.value):n(c.value).then(s,l)}d((r=r.apply(i,e||[])).next())})};const Uc=i=>i.msg||i.message||i.error_description||i.error||JSON.stringify(i),E4=(i,e)=>zo(void 0,void 0,void 0,function*(){const t=yield S4();i instanceof t?i.json().then(r=>{e(new x4(Uc(r),i.status||500))}).catch(r=>{e(new ag(Uc(r),r))}):e(new ag(Uc(i),i))}),T4=(i,e,t,r)=>{const n={method:i,headers:(e==null?void 0:e.headers)||{}};return i==="GET"?n:(n.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),n.body=JSON.stringify(r),Object.assign(Object.assign({},n),t))};function Sd(i,e,t,r,n,a){return zo(this,void 0,void 0,function*(){return new Promise((o,s)=>{i(t,T4(e,r,n,a)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>E4(l,s))})})}function yu(i,e,t,r){return zo(this,void 0,void 0,function*(){return Sd(i,"GET",e,t,r)})}function Wn(i,e,t,r,n){return zo(this,void 0,void 0,function*(){return Sd(i,"POST",e,r,n,t)})}function I4(i,e,t,r,n){return zo(this,void 0,void 0,function*(){return Sd(i,"PUT",e,r,n,t)})}function ev(i,e,t,r,n){return zo(this,void 0,void 0,function*(){return Sd(i,"DELETE",e,r,n,t)})}var zr=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{d(r.next(c))}catch(u){o(u)}}function l(c){try{d(r.throw(c))}catch(u){o(u)}}function d(c){c.done?a(c.value):n(c.value).then(s,l)}d((r=r.apply(i,e||[])).next())})};const A4={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},og={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class C4{constructor(e,t={},r,n){this.url=e,this.headers=t,this.bucketId=r,this.fetch=Q0(n)}uploadOrUpdate(e,t,r,n){return zr(this,void 0,void 0,function*(){try{let a;const o=Object.assign(Object.assign({},og),n),s=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});typeof Blob!="undefined"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),a.append("",r)):typeof FormData!="undefined"&&r instanceof FormData?(a=r,a.append("cacheControl",o.cacheControl)):(a=r,s["cache-control"]=`max-age=${o.cacheControl}`,s["content-type"]=o.contentType);const l=this._removeEmptyFolders(t),d=this._getFinalPath(l),c=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:e,body:a,headers:s},o!=null&&o.duplex?{duplex:o.duplex}:{})),u=yield c.json();return c.ok?{data:{path:l,id:u.Id,fullPath:u.Key},error:null}:{data:null,error:u}}catch(a){if(pr(a))return{data:null,error:a};throw a}})}upload(e,t,r){return zr(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,r)})}uploadToSignedUrl(e,t,r,n){return zr(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(e),o=this._getFinalPath(a),s=new URL(this.url+`/object/upload/sign/${o}`);s.searchParams.set("token",t);try{let l;const d=Object.assign({upsert:og.upsert},n),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(d.upsert)});typeof Blob!="undefined"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",d.cacheControl),l.append("",r)):typeof FormData!="undefined"&&r instanceof FormData?(l=r,l.append("cacheControl",d.cacheControl)):(l=r,c["cache-control"]=`max-age=${d.cacheControl}`,c["content-type"]=d.contentType);const u=yield this.fetch(s.toString(),{method:"PUT",body:l,headers:c}),f=yield u.json();return u.ok?{data:{path:a,fullPath:f.Key},error:null}:{data:null,error:f}}catch(l){if(pr(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e){return zr(this,void 0,void 0,function*(){try{let t=this._getFinalPath(e);const r=yield Wn(this.fetch,`${this.url}/object/upload/sign/${t}`,{},{headers:this.headers}),n=new URL(this.url+r.url),a=n.searchParams.get("token");if(!a)throw new Zu("No token returned by API");return{data:{signedUrl:n.toString(),path:e,token:a},error:null}}catch(t){if(pr(t))return{data:null,error:t};throw t}})}update(e,t,r){return zr(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,r)})}move(e,t){return zr(this,void 0,void 0,function*(){try{return{data:yield Wn(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers}),error:null}}catch(r){if(pr(r))return{data:null,error:r};throw r}})}copy(e,t){return zr(this,void 0,void 0,function*(){try{return{data:{path:(yield Wn(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers})).Key},error:null}}catch(r){if(pr(r))return{data:null,error:r};throw r}})}createSignedUrl(e,t,r){return zr(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e),a=yield Wn(this.fetch,`${this.url}/object/sign/${n}`,Object.assign({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${o}`)},{data:a,error:null}}catch(n){if(pr(n))return{data:null,error:n};throw n}})}createSignedUrls(e,t,r){return zr(this,void 0,void 0,function*(){try{const n=yield Wn(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:n.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${a}`):null})),error:null}}catch(n){if(pr(n))return{data:null,error:n};throw n}})}download(e,t){return zr(this,void 0,void 0,function*(){const n=typeof(t==null?void 0:t.transform)!="undefined"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),o=a?`?${a}`:"";try{const s=this._getFinalPath(e);return{data:yield(yield yu(this.fetch,`${this.url}/${n}/${s}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(s){if(pr(s))return{data:null,error:s};throw s}})}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],a=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";a!==""&&n.push(a);const s=typeof(t==null?void 0:t.transform)!="undefined"?"render/image":"object",l=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});l!==""&&n.push(l);let d=n.join("&");return d!==""&&(d=`?${d}`),{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${r}${d}`)}}}remove(e){return zr(this,void 0,void 0,function*(){try{return{data:yield ev(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(pr(t))return{data:null,error:t};throw t}})}list(e,t,r){return zr(this,void 0,void 0,function*(){try{const n=Object.assign(Object.assign(Object.assign({},A4),t),{prefix:e||""});return{data:yield Wn(this.fetch,`${this.url}/object/list/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(pr(n))return{data:null,error:n};throw n}})}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const k4="2.5.5",$4={"X-Client-Info":`storage-js/${k4}`};var co=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{d(r.next(c))}catch(u){o(u)}}function l(c){try{d(r.throw(c))}catch(u){o(u)}}function d(c){c.done?a(c.value):n(c.value).then(s,l)}d((r=r.apply(i,e||[])).next())})};class L4{constructor(e,t={},r){this.url=e,this.headers=Object.assign(Object.assign({},$4),t),this.fetch=Q0(r)}listBuckets(){return co(this,void 0,void 0,function*(){try{return{data:yield yu(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(pr(e))return{data:null,error:e};throw e}})}getBucket(e){return co(this,void 0,void 0,function*(){try{return{data:yield yu(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(t){if(pr(t))return{data:null,error:t};throw t}})}createBucket(e,t={public:!1}){return co(this,void 0,void 0,function*(){try{return{data:yield Wn(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(pr(r))return{data:null,error:r};throw r}})}updateBucket(e,t){return co(this,void 0,void 0,function*(){try{return{data:yield I4(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(pr(r))return{data:null,error:r};throw r}})}emptyBucket(e){return co(this,void 0,void 0,function*(){try{return{data:yield Wn(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(pr(t))return{data:null,error:t};throw t}})}deleteBucket(e){return co(this,void 0,void 0,function*(){try{return{data:yield ev(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(pr(t))return{data:null,error:t};throw t}})}}class O4 extends L4{constructor(e,t={},r){super(e,t,r)}from(e){return new C4(this.url,this.headers,e,this.fetch)}}const R4="2.39.7";let ys="";typeof Deno!="undefined"?ys="deno":typeof document!="undefined"?ys="web":typeof navigator!="undefined"&&navigator.product==="ReactNative"?ys="react-native":ys="node";const F4={"X-Client-Info":`supabase-js-${ys}/${R4}`},N4={headers:F4},P4={schema:"public"},D4={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},M4={};var z4=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{d(r.next(c))}catch(u){o(u)}}function l(c){try{d(r.throw(c))}catch(u){o(u)}}function d(c){c.done?a(c.value):n(c.value).then(s,l)}d((r=r.apply(i,e||[])).next())})};const B4=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=Wu:e=fetch,(...t)=>e(...t)},U4=()=>typeof Headers=="undefined"?Y0:Headers,G4=(i,e,t)=>{const r=B4(t),n=U4();return(a,o)=>z4(void 0,void 0,void 0,function*(){var s;const l=(s=yield e())!==null&&s!==void 0?s:i;let d=new n(o==null?void 0:o.headers);return d.has("apikey")||d.set("apikey",i),d.has("Authorization")||d.set("Authorization",`Bearer ${l}`),r(a,Object.assign(Object.assign({},o),{headers:d}))})};function j4(i){return i.replace(/\/$/,"")}function V4(i,e){const{db:t,auth:r,realtime:n,global:a}=i,{db:o,auth:s,realtime:l,global:d}=e;return{db:Object.assign(Object.assign({},o),t),auth:Object.assign(Object.assign({},s),r),realtime:Object.assign(Object.assign({},l),n),global:Object.assign(Object.assign({},d),a)}}function H4(i){return Math.round(Date.now()/1e3)+i}function q4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){const e=Math.random()*16|0;return(i=="x"?e:e&3|8).toString(16)})}const qr=()=>typeof document!="undefined",ba={tested:!1,writable:!1},Is=()=>{if(!qr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch(e){return!1}if(ba.tested)return ba.writable;const i=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(i,i),globalThis.localStorage.removeItem(i),ba.tested=!0,ba.writable=!0}catch(e){ba.tested=!0,ba.writable=!1}return ba.writable};function Gc(i){const e={},t=new URL(i);if(t.hash&&t.hash[0]==="#")try{new URLSearchParams(t.hash.substring(1)).forEach((n,a)=>{e[a]=n})}catch(r){}return t.searchParams.forEach((r,n)=>{e[n]=r}),e}const tv=i=>{let e;return i?e=i:typeof fetch=="undefined"?e=(...t)=>Do(()=>Promise.resolve().then(()=>Bs),void 0).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)},W4=i=>typeof i=="object"&&i!==null&&"status"in i&&"ok"in i&&"json"in i&&typeof i.json=="function",_a=(i,e,t)=>fe(void 0,null,function*(){yield i.setItem(e,JSON.stringify(t))}),Ml=(i,e)=>fe(void 0,null,function*(){const t=yield i.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(r){return t}}),jc=(i,e)=>fe(void 0,null,function*(){yield i.removeItem(e)});function X4(i){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let t="",r,n,a,o,s,l,d,c=0;for(i=i.replace("-","+").replace("_","/");c>4,n=(s&15)<<4|l>>2,a=(l&3)<<6|d,t=t+String.fromCharCode(r),l!=64&&n!=0&&(t=t+String.fromCharCode(n)),d!=64&&a!=0&&(t=t+String.fromCharCode(a));return t}class Ed{constructor(){this.promise=new Ed.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}Ed.promiseConstructor=Promise;function sg(i){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,t=i.split(".");if(t.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=t[1];return JSON.parse(X4(r))}function Y4(i){return fe(this,null,function*(){return yield new Promise(e=>{setTimeout(()=>e(null),i)})})}function Z4(i,e){return new Promise((r,n)=>{fe(this,null,function*(){for(let a=0;a<1/0;a++)try{const o=yield i(a);if(!e(a,null,o)){r(o);return}}catch(o){if(!e(a,o)){n(o);return}}})})}function K4(i){return("0"+i.toString(16)).substr(-2)}function uo(){const e=new Uint32Array(56);if(typeof crypto=="undefined"){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=t.length;let n="";for(let a=0;a<56;a++)n+=t.charAt(Math.floor(Math.random()*r));return n}return crypto.getRandomValues(e),Array.from(e,K4).join("")}function J4(i){return fe(this,null,function*(){const t=new TextEncoder().encode(i),r=yield crypto.subtle.digest("SHA-256",t),n=new Uint8Array(r);return Array.from(n).map(a=>String.fromCharCode(a)).join("")})}function Q4(i){return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function fo(i){return fe(this,null,function*(){if(!(typeof crypto!="undefined"&&typeof crypto.subtle!="undefined"&&typeof TextEncoder!="undefined"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),i;const t=yield J4(i);return Q4(t)})}class Ku extends Error{constructor(e,t){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t}}function Bt(i){return typeof i=="object"&&i!==null&&"__isAuthError"in i}class e5 extends Ku{constructor(e,t){super(e,t),this.name="AuthApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}function t5(i){return Bt(i)&&i.name==="AuthApiError"}class iv extends Ku{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class Da extends Ku{constructor(e,t,r){super(e),this.name=t,this.status=r}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class ho extends Da{constructor(){super("Auth session missing!","AuthSessionMissingError",400)}}class Vc extends Da{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500)}}class zl extends Da{constructor(e){super(e,"AuthInvalidCredentialsError",400)}}class Bl extends Da{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class lg extends Da{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class xu extends Da{constructor(e,t){super(e,"AuthRetryableFetchError",t)}}function Hc(i){return Bt(i)&&i.name==="AuthRetryableFetchError"}class i5 extends Da{constructor(e,t,r){super(e,"AuthWeakPasswordError",t),this.reasons=r}}var r5=function(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(i);ni.msg||i.message||i.error_description||i.error||JSON.stringify(i),n5=[502,503,504];function dg(i){return fe(this,null,function*(){if(!W4(i))throw new xu(bo(i),0);if(n5.includes(i.status))throw new xu(bo(i),i.status);let e;try{e=yield i.json()}catch(t){throw new iv(bo(t),t)}throw typeof e=="object"&&e&&typeof e.weak_password=="object"&&e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.reasons.reduce((t,r)=>t&&typeof r=="string",!0)?new i5(bo(e),i.status,e.weak_password.reasons):new e5(bo(e),i.status||500)})}const a5=(i,e,t,r)=>{const n={method:i,headers:(e==null?void 0:e.headers)||{}};return i==="GET"?n:(n.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),n.body=JSON.stringify(r),Object.assign(Object.assign({},n),t))};function jt(i,e,t,r){return fe(this,null,function*(){var n;const a=Object.assign({},r==null?void 0:r.headers);r!=null&&r.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const o=(n=r==null?void 0:r.query)!==null&&n!==void 0?n:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const s=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=yield o5(i,e,t+s,{headers:a,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}})}function o5(i,e,t,r,n,a){return fe(this,null,function*(){const o=a5(e,r,n,a);let s;try{s=yield i(t,o)}catch(l){throw console.error(l),new xu(bo(l),0)}if(s.ok||(yield dg(s)),r!=null&&r.noResolveJson)return s;try{return yield s.json()}catch(l){yield dg(l)}})}function ya(i){var e;let t=null;c5(i)&&(t=Object.assign({},i),i.expires_at||(t.expires_at=H4(i.expires_in)));const r=(e=i.user)!==null&&e!==void 0?e:i;return{data:{session:t,user:r},error:null}}function cg(i){const e=ya(i);return!e.error&&i.weak_password&&typeof i.weak_password=="object"&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.message&&typeof i.weak_password.message=="string"&&i.weak_password.reasons.reduce((t,r)=>t&&typeof r=="string",!0)&&(e.data.weak_password=i.weak_password),e}function Xn(i){var e;return{data:{user:(e=i.user)!==null&&e!==void 0?e:i},error:null}}function s5(i){return{data:i,error:null}}function l5(i){const{action_link:e,email_otp:t,hashed_token:r,redirect_to:n,verification_type:a}=i,o=r5(i,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),s={action_link:e,email_otp:t,hashed_token:r,redirect_to:n,verification_type:a},l=Object.assign({},o);return{data:{properties:s,user:l},error:null}}function d5(i){return i}function c5(i){return i.access_token&&i.refresh_token&&i.expires_in}var u5=function(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(i);n0&&(m.forEach(p=>{const y=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(p.split(";")[1].split("=")[1]);d[`${x}Page`]=y}),d.total=parseInt(f)),{data:Object.assign(Object.assign({},u),d),error:null}}catch(d){if(Bt(d))return{data:{users:[]},error:d};throw d}})}getUserById(e){return fe(this,null,function*(){try{return yield jt(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Xn})}catch(t){if(Bt(t))return{data:{user:null},error:t};throw t}})}updateUserById(e,t){return fe(this,null,function*(){try{return yield jt(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:Xn})}catch(r){if(Bt(r))return{data:{user:null},error:r};throw r}})}deleteUser(e,t=!1){return fe(this,null,function*(){try{return yield jt(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:Xn})}catch(r){if(Bt(r))return{data:{user:null},error:r};throw r}})}_listFactors(e){return fe(this,null,function*(){try{const{data:t,error:r}=yield jt(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:n=>({data:{factors:n},error:null})});return{data:t,error:r}}catch(t){if(Bt(t))return{data:null,error:t};throw t}})}_deleteFactor(e){return fe(this,null,function*(){try{return{data:yield jt(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(Bt(t))return{data:null,error:t};throw t}})}}const rv="0.0.0",h5="http://localhost:9999",m5="supabase.auth.token",p5={"X-Client-Info":`gotrue-js/${rv}`},ug=10,g5={getItem:i=>Is()?globalThis.localStorage.getItem(i):null,setItem:(i,e)=>{Is()&&globalThis.localStorage.setItem(i,e)},removeItem:i=>{Is()&&globalThis.localStorage.removeItem(i)}};function fg(i={}){return{getItem:e=>i[e]||null,setItem:(e,t)=>{i[e]=t},removeItem:e=>{delete i[e]}}}function v5(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(i){typeof self!="undefined"&&(self.globalThis=self)}}const mo={debug:!!(globalThis&&Is()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class nv extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class b5 extends nv{}function _5(i,e,t){return fe(this,null,function*(){mo.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",i,e);const r=new globalThis.AbortController;return e>0&&setTimeout(()=>{r.abort(),mo.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",i)},e),yield globalThis.navigator.locks.request(i,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},n=>fe(this,null,function*(){if(n){mo.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",i,n.name);try{return yield t()}finally{mo.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",i,n.name)}}else{if(e===0)throw mo.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",i),new b5(`Acquiring an exclusive Navigator LockManager lock "${i}" immediately failed`);if(mo.debug)try{const a=yield globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),yield t()}}))})}v5();const y5={url:h5,storageKey:m5,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:p5,flowType:"implicit",debug:!1},ms=30*1e3,hg=3;function mg(i,e,t){return fe(this,null,function*(){return yield t()})}class Ns{constructor(e){var t,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=Ns.nextInstanceID,Ns.nextInstanceID+=1,this.instanceID>0&&qr()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const n=Object.assign(Object.assign({},y5),e);if(this.logDebugMessages=!!n.debug,typeof n.debug=="function"&&(this.logger=n.debug),this.persistSession=n.persistSession,this.storageKey=n.storageKey,this.autoRefreshToken=n.autoRefreshToken,this.admin=new f5({url:n.url,headers:n.headers,fetch:n.fetch}),this.url=n.url,this.headers=n.headers,this.fetch=tv(n.fetch),this.lock=n.lock||mg,this.detectSessionInUrl=n.detectSessionInUrl,this.flowType=n.flowType,n.lock?this.lock=n.lock:qr()&&(!((t=globalThis==null?void 0:globalThis.navigator)===null||t===void 0)&&t.locks)?this.lock=_5:this.lock=mg,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?n.storage?this.storage=n.storage:Is()?this.storage=g5:(this.memoryStorage={},this.storage=fg(this.memoryStorage)):(this.memoryStorage={},this.storage=fg(this.memoryStorage)),qr()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",a=>fe(this,null,function*(){this._debug("received broadcast notification from other tab or client",a),yield this._notifyAllSubscribers(a.data.event,a.data.session,!1)}))}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${rv}) ${new Date().toISOString()}`,...e),this}initialize(){return fe(this,null,function*(){return this.initializePromise?yield this.initializePromise:(this.initializePromise=fe(this,null,function*(){return yield this._acquireLock(-1,()=>fe(this,null,function*(){return yield this._initialize()}))}),yield this.initializePromise)})}_initialize(){return fe(this,null,function*(){try{const e=qr()?yield this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:t,error:r}=yield this._getSessionFromURL(e);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.message)==="Identity is already linked"||(r==null?void 0:r.message)==="Identity is already linked to another user"?{error:r}:(yield this._removeSession(),{error:r});const{session:n,redirectType:a}=t;return this._debug("#_initialize()","detected session in URL",n,"redirect type",a),yield this._saveSession(n),setTimeout(()=>fe(this,null,function*(){a==="recovery"?yield this._notifyAllSubscribers("PASSWORD_RECOVERY",n):yield this._notifyAllSubscribers("SIGNED_IN",n)}),0),{error:null}}return yield this._recoverAndRefresh(),{error:null}}catch(e){return Bt(e)?{error:e}:{error:new iv("Unexpected error during initialization",e)}}finally{yield this._handleVisibilityChange(),this._debug("#_initialize()","end")}})}signUp(e){return fe(this,null,function*(){var t,r,n;try{yield this._removeSession();let a;if("email"in e){const{email:c,password:u,options:f}=e;let m=null,p=null;if(this.flowType==="pkce"){const y=uo();yield _a(this.storage,`${this.storageKey}-code-verifier`,y),m=yield fo(y),p=y===m?"plain":"s256"}a=yield jt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:u,data:(t=f==null?void 0:f.data)!==null&&t!==void 0?t:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:m,code_challenge_method:p},xform:ya})}else if("phone"in e){const{phone:c,password:u,options:f}=e;a=yield jt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:u,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(n=f==null?void 0:f.channel)!==null&&n!==void 0?n:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:ya})}else throw new zl("You must provide either an email or phone number and a password");const{data:o,error:s}=a;if(s||!o)return{data:{user:null,session:null},error:s};const l=o.session,d=o.user;return o.session&&(yield this._saveSession(o.session),yield this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:d,session:l},error:null}}catch(a){if(Bt(a))return{data:{user:null,session:null},error:a};throw a}})}signInWithPassword(e){return fe(this,null,function*(){try{yield this._removeSession();let t;if("email"in e){const{email:a,password:o,options:s}=e;t=yield jt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:cg})}else if("phone"in e){const{phone:a,password:o,options:s}=e;t=yield jt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:cg})}else throw new zl("You must provide either an email or phone number and a password");const{data:r,error:n}=t;return n?{data:{user:null,session:null},error:n}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Vc}:(r.session&&(yield this._saveSession(r.session),yield this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:n})}catch(t){if(Bt(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOAuth(e){return fe(this,null,function*(){var t,r,n,a;return yield this._removeSession(),yield this._handleProviderSignIn(e.provider,{redirectTo:(t=e.options)===null||t===void 0?void 0:t.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(n=e.options)===null||n===void 0?void 0:n.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})})}exchangeCodeForSession(e){return fe(this,null,function*(){return yield this.initializePromise,this._acquireLock(-1,()=>fe(this,null,function*(){return this._exchangeCodeForSession(e)}))})}_exchangeCodeForSession(e){return fe(this,null,function*(){const t=yield Ml(this.storage,`${this.storageKey}-code-verifier`),[r,n]=(t!=null?t:"").split("/"),{data:a,error:o}=yield jt(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:ya});return yield jc(this.storage,`${this.storageKey}-code-verifier`),o?{data:{user:null,session:null,redirectType:null},error:o}:!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new Vc}:(a.session&&(yield this._saveSession(a.session),yield this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:n!=null?n:null}),error:o})})}signInWithIdToken(e){return fe(this,null,function*(){yield this._removeSession();try{const{options:t,provider:r,token:n,access_token:a,nonce:o}=e,s=yield jt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:n,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:t==null?void 0:t.captchaToken}},xform:ya}),{data:l,error:d}=s;return d?{data:{user:null,session:null},error:d}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Vc}:(l.session&&(yield this._saveSession(l.session),yield this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:d})}catch(t){if(Bt(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOtp(e){return fe(this,null,function*(){var t,r,n,a,o;try{if(yield this._removeSession(),"email"in e){const{email:s,options:l}=e;let d=null,c=null;if(this.flowType==="pkce"){const f=uo();yield _a(this.storage,`${this.storageKey}-code-verifier`,f),d=yield fo(f),c=f===d?"plain":"s256"}const{error:u}=yield jt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:s,data:(t=l==null?void 0:l.data)!==null&&t!==void 0?t:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:d,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:u}}if("phone"in e){const{phone:s,options:l}=e,{data:d,error:c}=yield jt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:s,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:c}}throw new zl("You must provide either an email or phone number.")}catch(s){if(Bt(s))return{data:{user:null,session:null},error:s};throw s}})}verifyOtp(e){return fe(this,null,function*(){var t,r;try{e.type!=="email_change"&&e.type!=="phone_change"&&(yield this._removeSession());let n,a;"options"in e&&(n=(t=e.options)===null||t===void 0?void 0:t.redirectTo,a=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:s}=yield jt(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:n,xform:ya});if(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,d=o.user;return l!=null&&l.access_token&&(yield this._saveSession(l),yield this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:d,session:l},error:null}}catch(n){if(Bt(n))return{data:{user:null,session:null},error:n};throw n}})}signInWithSSO(e){return fe(this,null,function*(){var t,r,n;try{yield this._removeSession();let a=null,o=null;if(this.flowType==="pkce"){const s=uo();yield _a(this.storage,`${this.storageKey}-code-verifier`,s),a=yield fo(s),o=s===a?"plain":"s256"}return yield jt(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(t=e.options)===null||t===void 0?void 0:t.redirectTo)!==null&&r!==void 0?r:void 0}),!((n=e==null?void 0:e.options)===null||n===void 0)&&n.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:o}),headers:this.headers,xform:s5})}catch(a){if(Bt(a))return{data:null,error:a};throw a}})}reauthenticate(){return fe(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>fe(this,null,function*(){return yield this._reauthenticate()}))})}_reauthenticate(){return fe(this,null,function*(){try{return yield this._useSession(e=>fe(this,null,function*(){const{data:{session:t},error:r}=e;if(r)throw r;if(!t)throw new ho;const{error:n}=yield jt(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:n}}))}catch(e){if(Bt(e))return{data:{user:null,session:null},error:e};throw e}})}resend(e){return fe(this,null,function*(){try{e.type!="email_change"&&e.type!="phone_change"&&(yield this._removeSession());const t=`${this.url}/resend`;if("email"in e){const{email:r,type:n,options:a}=e,{error:o}=yield jt(this.fetch,"POST",t,{headers:this.headers,body:{email:r,type:n,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:r,type:n,options:a}=e,{data:o,error:s}=yield jt(this.fetch,"POST",t,{headers:this.headers,body:{phone:r,type:n,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:s}}throw new zl("You must provide either an email or phone number and a type")}catch(t){if(Bt(t))return{data:{user:null,session:null},error:t};throw t}})}getSession(){return fe(this,null,function*(){return yield this.initializePromise,this._acquireLock(-1,()=>fe(this,null,function*(){return this._useSession(e=>fe(this,null,function*(){return e}))}))})}_acquireLock(e,t){return fe(this,null,function*(){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=fe(this,null,function*(){return yield r,yield t()});return this.pendingInLock.push(fe(this,null,function*(){try{yield n}catch(a){}})),n}return yield this.lock(`lock:${this.storageKey}`,e,()=>fe(this,null,function*(){this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=t();for(this.pendingInLock.push(fe(this,null,function*(){try{yield r}catch(n){}})),yield r;this.pendingInLock.length;){const n=[...this.pendingInLock];yield Promise.all(n),this.pendingInLock.splice(0,n.length)}return yield r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}})}_useSession(e){return fe(this,null,function*(){this._debug("#_useSession","begin");try{const t=yield this.__loadSession();return yield e(t)}finally{this._debug("#_useSession","end")}})}__loadSession(){return fe(this,null,function*(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const t=yield Ml(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),t!==null&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),yield this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r)return{data:{session:e},error:null};const{session:n,error:a}=yield this._callRefreshToken(e.refresh_token);return a?{data:{session:null},error:a}:{data:{session:n},error:null}}finally{this._debug("#__loadSession()","end")}})}getUser(e){return fe(this,null,function*(){return e?yield this._getUser(e):(yield this.initializePromise,this._acquireLock(-1,()=>fe(this,null,function*(){return yield this._getUser()})))})}_getUser(e){return fe(this,null,function*(){try{return e?yield jt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Xn}):yield this._useSession(t=>fe(this,null,function*(){var r,n;const{data:a,error:o}=t;if(o)throw o;return yield jt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(n=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&n!==void 0?n:void 0,xform:Xn})}))}catch(t){if(Bt(t))return{data:{user:null},error:t};throw t}})}updateUser(r){return fe(this,arguments,function*(e,t={}){return yield this.initializePromise,yield this._acquireLock(-1,()=>fe(this,null,function*(){return yield this._updateUser(e,t)}))})}_updateUser(r){return fe(this,arguments,function*(e,t={}){try{return yield this._useSession(n=>fe(this,null,function*(){const{data:a,error:o}=n;if(o)throw o;if(!a.session)throw new ho;const s=a.session;let l=null,d=null;if(this.flowType==="pkce"&&e.email!=null){const f=uo();yield _a(this.storage,`${this.storageKey}-code-verifier`,f),l=yield fo(f),d=f===l?"plain":"s256"}const{data:c,error:u}=yield jt(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:t==null?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:d}),jwt:s.access_token,xform:Xn});if(u)throw u;return s.user=c.user,yield this._saveSession(s),yield this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}}))}catch(n){if(Bt(n))return{data:{user:null},error:n};throw n}})}_decodeJWT(e){return sg(e)}setSession(e){return fe(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>fe(this,null,function*(){return yield this._setSession(e)}))})}_setSession(e){return fe(this,null,function*(){try{if(!e.access_token||!e.refresh_token)throw new ho;const t=Date.now()/1e3;let r=t,n=!0,a=null;const o=sg(e.access_token);if(o.exp&&(r=o.exp,n=r<=t),n){const{session:s,error:l}=yield this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!s)return{data:{user:null,session:null},error:null};a=s}else{const{data:s,error:l}=yield this._getUser(e.access_token);if(l)throw l;a={access_token:e.access_token,refresh_token:e.refresh_token,user:s.user,token_type:"bearer",expires_in:r-t,expires_at:r},yield this._saveSession(a),yield this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(t){if(Bt(t))return{data:{session:null,user:null},error:t};throw t}})}refreshSession(e){return fe(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>fe(this,null,function*(){return yield this._refreshSession(e)}))})}_refreshSession(e){return fe(this,null,function*(){try{return yield this._useSession(t=>fe(this,null,function*(){var r;if(!e){const{data:o,error:s}=t;if(s)throw s;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new ho;const{session:n,error:a}=yield this._callRefreshToken(e.refresh_token);return a?{data:{user:null,session:null},error:a}:n?{data:{user:n.user,session:n},error:null}:{data:{user:null,session:null},error:null}}))}catch(t){if(Bt(t))return{data:{user:null,session:null},error:t};throw t}})}_getSessionFromURL(e){return fe(this,null,function*(){try{if(!qr())throw new Bl("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new Bl("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!e)throw new lg("Not a valid PKCE flow url.");const t=Gc(window.location.href);if(e){if(!t.code)throw new lg("No code detected.");const{data:k,error:I}=yield this._exchangeCodeForSession(t.code);if(I)throw I;const v=new URL(window.location.href);return v.searchParams.delete("code"),window.history.replaceState(window.history.state,"",v.toString()),{data:{session:k.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new Bl(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:n,access_token:a,refresh_token:o,expires_in:s,expires_at:l,token_type:d}=t;if(!a||!s||!o||!d)throw new Bl("No session defined in URL");const c=Math.round(Date.now()/1e3),u=parseInt(s);let f=c+u;l&&(f=parseInt(l));const m=f-c;m*1e3<=ms&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${u}s`);const p=f-u;c-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,f,c):c-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",p,f,c);const{data:y,error:x}=yield this._getUser(a);if(x)throw x;const E={provider_token:r,provider_refresh_token:n,access_token:a,expires_in:u,expires_at:f,refresh_token:o,token_type:d,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:E,redirectType:t.type},error:null}}catch(t){if(Bt(t))return{data:{session:null,redirectType:null},error:t};throw t}})}_isImplicitGrantFlow(){const e=Gc(window.location.href);return!!(qr()&&(e.access_token||e.error_description))}_isPKCEFlow(){return fe(this,null,function*(){const e=Gc(window.location.href),t=yield Ml(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)})}signOut(){return fe(this,arguments,function*(e={scope:"global"}){return yield this.initializePromise,yield this._acquireLock(-1,()=>fe(this,null,function*(){return yield this._signOut(e)}))})}_signOut(){return fe(this,arguments,function*({scope:e}={scope:"global"}){return yield this._useSession(t=>fe(this,null,function*(){var r;const{data:n,error:a}=t;if(a)return{error:a};const o=(r=n.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:s}=yield this.admin.signOut(o,e);if(s&&!(t5(s)&&(s.status===404||s.status===401)))return{error:s}}return e!=="others"&&(yield this._removeSession(),yield jc(this.storage,`${this.storageKey}-code-verifier`),yield this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}}))})}onAuthStateChange(e){const t=q4(),r={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,r),fe(this,null,function*(){yield this.initializePromise,yield this._acquireLock(-1,()=>fe(this,null,function*(){this._emitInitialSession(t)}))}),{data:{subscription:r}}}_emitInitialSession(e){return fe(this,null,function*(){return yield this._useSession(t=>fe(this,null,function*(){var r,n;try{const{data:{session:a},error:o}=t;if(o)throw o;yield(r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){yield(n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",null),this._debug("INITIAL_SESSION","callback id",e,"error",a),console.error(a)}}))})}resetPasswordForEmail(r){return fe(this,arguments,function*(e,t={}){let n=null,a=null;if(this.flowType==="pkce"){const o=uo();yield _a(this.storage,`${this.storageKey}-code-verifier`,`${o}/PASSWORD_RECOVERY`),n=yield fo(o),a=o===n?"plain":"s256"}try{return yield jt(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:a,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(o){if(Bt(o))return{data:null,error:o};throw o}})}getUserIdentities(){return fe(this,null,function*(){var e;try{const{data:t,error:r}=yield this.getUser();if(r)throw r;return{data:{identities:(e=t.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(t){if(Bt(t))return{data:null,error:t};throw t}})}linkIdentity(e){return fe(this,null,function*(){var t;try{const{data:r,error:n}=yield this._useSession(a=>fe(this,null,function*(){var o,s,l,d,c;const{data:u,error:f}=a;if(f)throw f;const m=yield this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return yield jt(this.fetch,"GET",m,{headers:this.headers,jwt:(c=(d=u.session)===null||d===void 0?void 0:d.access_token)!==null&&c!==void 0?c:void 0})}));if(n)throw n;return qr()&&!(!((t=e.options)===null||t===void 0)&&t.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:e.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(Bt(r))return{data:{provider:e.provider,url:null},error:r};throw r}})}unlinkIdentity(e){return fe(this,null,function*(){try{return yield this._useSession(t=>fe(this,null,function*(){var r,n;const{data:a,error:o}=t;if(o)throw o;return yield jt(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(n=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&n!==void 0?n:void 0})}))}catch(t){if(Bt(t))return{data:null,error:t};throw t}})}_refreshAccessToken(e){return fe(this,null,function*(){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const r=Date.now();return yield Z4(n=>fe(this,null,function*(){return yield Y4(n*200),this._debug(t,"refreshing attempt",n),yield jt(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:ya})}),(n,a,o)=>o&&o.error&&Hc(o.error)&&Date.now()+(n+1)*200-rfe(this,null,function*(){try{yield s.callback(e,t)}catch(l){a.push(l)}}));if(yield Promise.all(o),a.length>0){for(let s=0;sthis._autoRefreshTokenTick(),ms);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno!="undefined"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(()=>fe(this,null,function*(){yield this.initializePromise,yield this._autoRefreshTokenTick()}),0)})}_stopAutoRefresh(){return fe(this,null,function*(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)})}startAutoRefresh(){return fe(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._startAutoRefresh()})}stopAutoRefresh(){return fe(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._stopAutoRefresh()})}_autoRefreshTokenTick(){return fe(this,null,function*(){this._debug("#_autoRefreshTokenTick()","begin");try{yield this._acquireLock(0,()=>fe(this,null,function*(){try{const e=Date.now();try{return yield this._useSession(t=>fe(this,null,function*(){const{data:{session:r}}=t;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const n=Math.floor((r.expires_at*1e3-e)/ms);this._debug("#_autoRefreshTokenTick()",`access token expires in ${n} ticks, a tick lasts ${ms}ms, refresh threshold is ${hg} ticks`),n<=hg&&(yield this._callRefreshToken(r.refresh_token))}))}catch(t){console.error("Auto refresh tick failed with error. This is likely a transient error.",t)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(e){if(e.isAcquireTimeout||e instanceof nv)this._debug("auto refresh token tick lock not available");else throw e}})}_handleVisibilityChange(){return fe(this,null,function*(){if(this._debug("#_handleVisibilityChange()"),!qr()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=()=>fe(this,null,function*(){return yield this._onVisibilityChanged(!1)}),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),yield this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}})}_onVisibilityChanged(e){return fe(this,null,function*(){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(yield this.initializePromise,yield this._acquireLock(-1,()=>fe(this,null,function*(){if(document.visibilityState!=="visible"){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}yield this._recoverAndRefresh()})))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()})}_getUrlForProvider(e,t,r){return fe(this,null,function*(){const n=[`provider=${encodeURIComponent(t)}`];if(r!=null&&r.redirectTo&&n.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&n.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const a=uo();yield _a(this.storage,`${this.storageKey}-code-verifier`,a);const o=yield fo(a),s=a===o?"plain":"s256";this._debug("PKCE","code verifier",`${a.substring(0,5)}...`,"code challenge",o,"method",s);const l=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(s)}`});n.push(l.toString())}if(r!=null&&r.queryParams){const a=new URLSearchParams(r.queryParams);n.push(a.toString())}return r!=null&&r.skipBrowserRedirect&&n.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${n.join("&")}`})}_unenroll(e){return fe(this,null,function*(){try{return yield this._useSession(t=>fe(this,null,function*(){var r;const{data:n,error:a}=t;return a?{data:null,error:a}:yield jt(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token})}))}catch(t){if(Bt(t))return{data:null,error:t};throw t}})}_enroll(e){return fe(this,null,function*(){try{return yield this._useSession(t=>fe(this,null,function*(){var r,n;const{data:a,error:o}=t;if(o)return{data:null,error:o};const{data:s,error:l}=yield jt(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:e.friendlyName,factor_type:e.factorType,issuer:e.issuer},headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(!((n=s==null?void 0:s.totp)===null||n===void 0)&&n.qr_code&&(s.totp.qr_code=`data:image/svg+xml;utf-8,${s.totp.qr_code}`),{data:s,error:null})}))}catch(t){if(Bt(t))return{data:null,error:t};throw t}})}_verify(e){return fe(this,null,function*(){return this._acquireLock(-1,()=>fe(this,null,function*(){try{return yield this._useSession(t=>fe(this,null,function*(){var r;const{data:n,error:a}=t;if(a)return{data:null,error:a};const{data:o,error:s}=yield jt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token});return s?{data:null,error:s}:(yield this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),yield this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:s})}))}catch(t){if(Bt(t))return{data:null,error:t};throw t}}))})}_challenge(e){return fe(this,null,function*(){return this._acquireLock(-1,()=>fe(this,null,function*(){try{return yield this._useSession(t=>fe(this,null,function*(){var r;const{data:n,error:a}=t;return a?{data:null,error:a}:yield jt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token})}))}catch(t){if(Bt(t))return{data:null,error:t};throw t}}))})}_challengeAndVerify(e){return fe(this,null,function*(){const{data:t,error:r}=yield this._challenge({factorId:e.factorId});return r?{data:null,error:r}:yield this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})})}_listFactors(){return fe(this,null,function*(){const{data:{user:e},error:t}=yield this.getUser();if(t)return{data:null,error:t};const r=(e==null?void 0:e.factors)||[],n=r.filter(a=>a.factor_type==="totp"&&a.status==="verified");return{data:{all:r,totp:n},error:null}})}_getAuthenticatorAssuranceLevel(){return fe(this,null,function*(){return this._acquireLock(-1,()=>fe(this,null,function*(){return yield this._useSession(e=>fe(this,null,function*(){var t,r;const{data:{session:n},error:a}=e;if(a)return{data:null,error:a};if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(n.access_token);let s=null;o.aal&&(s=o.aal);let l=s;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(u=>u.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=o.amr||[];return{data:{currentLevel:s,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}))})}}Ns.nextInstanceID=0;class x5 extends Ns{constructor(e){super(e)}}var w5=function(i,e,t,r){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{d(r.next(c))}catch(u){o(u)}}function l(c){try{d(r.throw(c))}catch(u){o(u)}}function d(c){c.done?a(c.value):n(c.value).then(s,l)}d((r=r.apply(i,e||[])).next())})};class S5{constructor(e,t,r){var n,a,o,s,l,d,c,u;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const f=j4(e);this.realtimeUrl=`${f}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${f}/auth/v1`,this.storageUrl=`${f}/storage/v1`,this.functionsUrl=`${f}/functions/v1`;const m=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,p={db:P4,realtime:M4,auth:Object.assign(Object.assign({},D4),{storageKey:m}),global:N4},y=V4(r!=null?r:{},p);this.storageKey=(a=(n=y.auth)===null||n===void 0?void 0:n.storageKey)!==null&&a!==void 0?a:"",this.headers=(s=(o=y.global)===null||o===void 0?void 0:o.headers)!==null&&s!==void 0?s:{},this.auth=this._initSupabaseAuthClient((l=y.auth)!==null&&l!==void 0?l:{},this.headers,(d=y.global)===null||d===void 0?void 0:d.fetch),this.fetch=G4(t,this._getAccessToken.bind(this),(c=y.global)===null||c===void 0?void 0:c.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},y.realtime)),this.rest=new Xu(`${f}/rest/v1`,{headers:this.headers,schema:(u=y.db)===null||u===void 0?void 0:u.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new YA(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new O4(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return w5(this,void 0,void 0,function*(){const{data:r}=yield this.auth.getSession();return(t=(e=r.session)===null||e===void 0?void 0:e.access_token)!==null&&t!==void 0?t:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,storageKey:a,flowType:o,debug:s},l,d){const c={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new x5({url:this.authUrl,headers:Object.assign(Object.assign({},c),l),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,flowType:o,debug:s,fetch:d})}_initRealtimeClient(e){return new _4(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,r)=>{this._handleTokenChanged(t,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r!=null?r:null),this.changedAccessToken=r):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const E5=(i,e,t)=>new S5(i,e,t),T5=E5("https://xovkkfhojasbjinfslpx.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhvdmtrZmhvamFzYmppbmZzbHB4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTM1ODQ0ODAsImV4cCI6MjAwOTE2MDQ4MH0.L3-X0p_un0oSTNubPwtfGo0D8g2bkPIfz7CaZ-iRYXY");function I5(i){return fe(this,null,function*(){const{error:e}=yield T5.from("metrics").insert(i);return e})}var pg=[],ps=[];function A5(i,e){if(i&&typeof document!="undefined"){var t,r=e.prepend===!0?"prepend":"append",n=e.singleTag===!0,a=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var o=pg.indexOf(a);o===-1&&(o=pg.push(a)-1,ps[o]={}),t=ps[o]&&ps[o][r]?ps[o][r]:ps[o][r]=s()}else t=s();i.charCodeAt(0)===65279&&(i=i.substring(1)),t.styleSheet?t.styleSheet.cssText+=i:t.appendChild(document.createTextNode(i))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var d=Object.keys(e.attributes),c=0;ci.id,nodeLabelClassName:void 0,nodeLabelColor:void 0,hoveredNodeLabelClassName:void 0,hoveredNodeLabelColor:void 0,onSetData:void 0,onNodesFiltered:void 0,onLinksFiltered:void 0,onLabelClick:void 0};let Ju=Ao,vg=Ao,bg=Ao,av=sv,ov=lv;typeof Uint8Array!="undefined"&&(Ju=function(i){return new Uint8Array(i)},vg=function(i){return new Uint16Array(i)},bg=function(i){return new Uint32Array(i)},av=function(i,e){if(i.length>=e)return i;var t=new i.constructor(e);return t.set(i),t},ov=function(i,e){var t;switch(e){case 16:t=vg(i.length);break;case 32:t=bg(i.length);break;default:throw new Error("invalid array width!")}return t.set(i),t});function Ao(i){for(var e=new Array(i),t=-1;++t32)throw new Error("invalid array width!");return i}function gn(i){this.length=i,this.subarrays=1,this.width=8,this.masks={0:0},this[0]=Ju(i)}gn.prototype.lengthen=function(i){var e,t;for(e=0,t=this.subarrays;e>>0,!(e>=32&&!t))return e<32&&t&1<=i;r--)this[e][r]=0;this.length=i};gn.prototype.zero=function(i){var e,t;for(e=0,t=this.subarrays;e>>0),a!=(o===r?n:0))return!1;return!0};const Yn={array8:Ao,array16:Ao,array32:Ao,arrayLengthen:sv,arrayWiden:lv,bitarray:gn},k5=(i,e)=>function(t){var r=t.length;return[i.left(t,e,0,r),i.right(t,e,0,r)]},$5=(i,e)=>{var t=e[0],r=e[1];return function(n){var a=n.length;return[i.left(n,t,0,a),i.left(n,r,0,a)]}},L5=i=>[0,i.length],po={filterExact:k5,filterRange:$5,filterAll:L5},Ps=i=>i,sn=()=>null,Ul=()=>0;function dv(i){function e(n,a,o){for(var s=o-a,l=(s>>>1)+1;--l>0;)r(n,l,s,a);return n}function t(n,a,o){for(var s=o-a,l;--s>0;)l=n[a],n[a]=n[a+s],n[a+s]=l,r(n,1,s,a);return n}function r(n,a,o,s){for(var l=n[--s+a],d=i(l),c;(c=a<<1)<=o&&(ci(n[s+c+1])&&c++,!(d<=i(n[s+c])));)n[s+a]=n[s+c],a=c;n[s+a]=l}return e.sort=t,e}const Td=dv(Ps);Td.by=dv;function cv(i){var e=Td.by(i);function t(r,n,a,o){var s=new Array(o=Math.min(a-n,o)),l,d,c;for(d=0;dl&&(s[0]=c,l=i(e(s,0,o)[0]));while(++n>>1;i(r[s])>>1;n{for(var r=0,n=e.length,a=t?JSON.parse(JSON.stringify(i)):new Array(n);ri+1,R5=i=>i-1,F5=i=>function(e,t){return e+ +i(t)},N5=i=>function(e,t){return e-i(t)},Vn={reduceIncrement:O5,reduceDecrement:R5,reduceAdd:F5,reduceSubtract:N5};function P5(i,e,t,r,n){for(n in r=(t=t.split(".")).splice(-1,1),t)e=e[t[n]]=e[t[n]]||{};return i(e,r)}const D5=(i,e)=>{const t=i[e];return typeof t=="function"?t.call(i):t},M5=/\[([\w\d]+)\]/g,z5=(i,e)=>P5(D5,i,e.replace(M5,".$1"));var Hn=-1;Us.heap=Td;Us.heapselect=Qu;Us.bisect=vd;Us.permute=Zl;function Us(){var i={add:l,remove:d,dimension:f,groupAll:m,size:p,all:y,allFiltered:x,onChange:E,isElementFiltered:u},e=[],t=0,r,n=[],a=[],o=[],s=[];r=new Yn.bitarray(0);function l(I){var v=t,M=I.length;return M&&(e=e.concat(I),r.lengthen(t+=M),a.forEach(function(K){K(I,v,M)}),k("dataAdded")),i}function d(I){for(var v=new Array(t),M=[],K=typeof I=="function",L=function(de){return K?I(e[de],de):r.zero(de)},R=0,W=0;R>7]&=~(1<<(L&63));return R}function u(I,v){var M=c(v||[]);return r.zeroExceptMask(I,M)}function f(I,v){if(typeof I=="string"){var M=I;I=function(Ze){return z5(Ze,M)}}var K={filter:It,filterExact:ii,filterRange:vi,filterFunction:Vt,filterAll:Ki,currentFilter:st,hasCurrentFilter:ft,top:Qt,bottom:_,group:X,groupAll:bi,dispose:Ma,remove:Ma,accessor:I,id:function(){return Oe}},L,R,W,Oe,me,de,N,C,Q,V,ne=[],Ve=function(Ze){return qc(Ze).sort(function(et,ge){var ie=N[et],Et=N[ge];return ieEt?1:et-ge})},Re=po.filterAll,Ge,tt,ot,he=[],bt=[],wt=0,pt=0,Lt=0,xe;a.unshift(Qe),a.push(dt),o.push(Se);var le=r.add();W=le.offset,L=le.one,R=~L,Oe=W<<7|Math.log(L)/Math.log(2),Qe(e,0,t),dt(e,0,t);function Qe(Ze,et,ge){var ie,Et;if(v){Lt=0,cr=0,xe=[];for(var nt=0;ntwt)for(ie=wt,Et=Math.min(et,pt);iept)for(ie=Math.max(et,pt),Et=ge;ie0&&(nt=et);--ie>=wt&&Ze>0;)r.zero(Et=de[ie])&&(nt>0?--nt:(ge.push(e[Et]),--Ze));if(v)for(ie=0;ie0;ie++)r.zero(Et=ne[ie])&&(nt>0?--nt:(ge.push(e[Et]),--Ze));return ge}function _(Ze,et){var ge=[],ie,Et,nt=0;if(et&&et>0&&(nt=et),v)for(ie=0;ie0;ie++)r.zero(Et=ne[ie])&&(nt>0?--nt:(ge.push(e[Et]),--Ze));for(ie=wt;ie0;)r.zero(Et=de[ie])&&(nt>0?--nt:(ge.push(e[Et]),--Ze)),ie++;return ge}function X(Ze){var et={top:Id,all:Wi,reduce:Bo,reduceCount:Gs,reduceSum:Ad,order:js,orderNatural:Vs,size:Hs,dispose:_i,remove:_i};bt.push(et);var ge,ie,Et=8,nt=_g(Et),at=0,ri,qt,Ri,Ai,mr,Si=sn,ni=sn,qi=!0,_r=Ze===sn,Gr;arguments.length<1&&(Ze=Ps),n.push(Si),he.push(vn),o.push(ea),vn(me,de,0,t);function vn(Ke,Pt,Ht,Di){v&&(Gr=Ht,Ht=me.length-Ke.length,Di=Ke.length);var Dt=ge,kt=v?[]:xa(at,nt),Wt=Ri,ai=Ai,Xi=mr,Ji=at,Qi=0,bn=0,Pr,Rn,za,_n,yn,Uo;for(qi&&(Wt=Xi=sn),qi&&(ai=Xi=sn),ge=new Array(at),at=0,v?ie=Ji?ie:[]:ie=Ji>1?Yn.arrayLengthen(ie,t):xa(t,nt),Ji&&(za=(Rn=Dt[0]).key);bn=_n);)++bn;for(;bn=Di));)_n=Ze(Ke[bn]);qs()}for(;QiQi)if(v)for(Qi=0;Qi1||v?(Si=On,ni=ta):(!at&&_r&&(at=1,ge=[{key:null,value:Xi()}]),at===1?(Si=di,ni=cr):(Si=sn,ni=sn),ie=null),n[Pr]=Si;function qs(){if(v){at++;return}++at===nt&&(kt=Yn.arrayWiden(kt,Et<<=1),ie=Yn.arrayWiden(ie,Et),nt=_g(Et))}}function ea(Ke){if(at>1||v){var Pt=at,Ht=ge,Di=xa(Pt,Pt),Dt,kt,Wt;if(v){for(Dt=0,Wt=0;Dt1||v)if(v)for(Dt=0;Dt1||v?(ni=ta,Si=On):at===1?(ni=cr,Si=di):ni=Si=sn}else if(at===1){if(_r)return;for(var ai=0;ai=0&&n.splice(Ke,1),Ke=he.indexOf(vn),Ke>=0&&he.splice(Ke,1),Ke=o.indexOf(ea),Ke>=0&&o.splice(Ke,1),Ke=bt.indexOf(et),Ke>=0&&bt.splice(Ke,1),et}return Gs().orderNatural()}function bi(){var Ze=X(sn),et=Ze.all;return delete Ze.all,delete Ze.top,delete Ze.order,delete Ze.orderNatural,delete Ze.size,Ze.value=function(){return et()[0].value},Ze}function Ma(){bt.forEach(function(et){et.dispose()});var Ze=a.indexOf(Qe);return Ze>=0&&a.splice(Ze,1),Ze=a.indexOf(dt),Ze>=0&&a.splice(Ze,1),Ze=o.indexOf(Se),Ze>=0&&o.splice(Ze,1),r.masks[W]&=R,Ki()}return K}function m(){var I={reduce:de,reduceCount:N,reduceSum:C,value:Q,dispose:V,remove:V},v,M,K,L,R=!0;n.push(Oe),a.push(W),W(e,0);function W(ne,Ve){var Re;if(!R)for(Re=Ve;Re=0&&n.splice(ne,1),ne=a.indexOf(W),ne>=0&&a.splice(ne,1),I}return N()}function p(){return t}function y(){return e}function x(I){var v=[],M=0,K=c(I||[]);for(M=0;M{var r,n,a;switch(t){case"filtered":(r=this.onFiltered)===null||r===void 0||r.call(this),this._filters.forEach(o=>{var s;(s=o.onFiltered)===null||s===void 0||s.call(o)});break;case"dataAdded":(n=this.onDataAdded)===null||n===void 0||n.call(this),this._filters.forEach(o=>{var s;(s=o.onDataAdded)===null||s===void 0||s.call(o)});break;case"dataRemoved":(a=this.onDataRemoved)===null||a===void 0||a.call(this),this._filters.forEach(o=>{var s;(s=o.onDataRemoved)===null||s===void 0||s.call(o)})}})}addRecords(e){const{_crossfilter:t}=this;this._records=e,t.remove(),t.add(e)}getFilteredRecords(e){const{_crossfilter:t}=this;return(e==null?void 0:e.getFilteredRecords())||t.allFiltered()}addFilter(e=!0){const t=new B5(this._crossfilter,()=>{this._filters.delete(t)},e?this._syncUpFunction:void 0);return this._filters.add(t),t}clearFilters(){this._filters.forEach(e=>{e.clear()})}isAnyFiltersActive(e){for(const t of this._filters.values())if(t!==e&&t.isActive())return!0;return!1}getAllRecords(){return this._records}}class U5{constructor(e,t){var r;this._data={nodes:[],links:[]},this._previousData={nodes:[],links:[]},this._cosmographConfig={},this._cosmosConfig={},this._nodesForTopLabels=new Set,this._nodesForForcedLabels=new Set,this._trackedNodeToLabel=new Map,this._isLabelsDestroyed=!1,this._svgParser=new DOMParser,this._nodesCrossfilter=new yg(this._applyLinksFilter.bind(this)),this._linksCrossfilter=new yg(this._applyNodesFilter.bind(this)),this._nodesFilter=this._nodesCrossfilter.addFilter(!1),this._linksFilter=this._linksCrossfilter.addFilter(!1),this._selectedNodesFilter=this._nodesCrossfilter.addFilter(),this._isDataDifferent=()=>{const a=JSON.stringify(this._data.nodes),o=JSON.stringify(this._previousData.nodes),s=JSON.stringify(this._data.links),l=JSON.stringify(this._previousData.links);return a!==o||s!==l},this._onClick=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onClick)===null||s===void 0||s.call(o,...a)},this._onLabelClick=(a,o)=>{var s,l,d;const c=(s=this._cosmos)===null||s===void 0?void 0:s.graph.getNodeById(o.id);c&&((d=(l=this._cosmographConfig).onLabelClick)===null||d===void 0||d.call(l,c,a))},this._onHoveredNodeClick=a=>{var o,s;this._hoveredNode&&((s=(o=this._cosmographConfig).onLabelClick)===null||s===void 0||s.call(o,this._hoveredNode,a))},this._onNodeMouseOver=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onNodeMouseOver)===null||s===void 0||s.call(o,...a);const[l,,d]=a;this._hoveredNode=l,this._renderLabelForHovered(l,d)},this._onNodeMouseOut=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onNodeMouseOut)===null||s===void 0||s.call(o,...a),this._renderLabelForHovered()},this._onMouseMove=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onMouseMove)===null||s===void 0||s.call(o,...a);const[l,,d]=a;this._renderLabelForHovered(l,d)},this._onZoomStart=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onZoomStart)===null||s===void 0||s.call(o,...a)},this._onZoom=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onZoom)===null||s===void 0||s.call(o,...a),this._renderLabelForHovered(),this._renderLabels()},this._onZoomEnd=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onZoomEnd)===null||s===void 0||s.call(o,...a)},this._onStart=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onSimulationStart)===null||s===void 0||s.call(o,...a)},this._onTick=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onSimulationTick)===null||s===void 0||s.call(o,...a),this._renderLabels()},this._onEnd=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onSimulationEnd)===null||s===void 0||s.call(o,...a)},this._onPause=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onSimulationPause)===null||s===void 0||s.call(o,...a)},this._onRestart=(...a)=>{var o,s;(s=(o=this._cosmographConfig).onSimulationRestart)===null||s===void 0||s.call(o,...a)},this._containerNode=e,this._containerNode.classList.add(gs.cosmograph),this._cosmographConfig=La(gg,t!=null?t:{}),this._cosmosConfig=this._createCosmosConfig(t),this._canvasElement=document.createElement("canvas"),this._labelsDivElement=document.createElement("div"),this._watermarkDivElement=document.createElement("div"),this._watermarkDivElement.classList.add(gs.watermark),this._watermarkDivElement.onclick=()=>{var a;return(a=window.open("https://cosmograph.app/","_blank"))===null||a===void 0?void 0:a.focus()},e.appendChild(this._canvasElement),e.appendChild(this._labelsDivElement),e.appendChild(this._watermarkDivElement),this._cssLabelsRenderer=new oE(this._labelsDivElement,{dispatchWheelEventElement:this._canvasElement,pointerEvents:"all",onLabelClick:this._onLabelClick.bind(this)}),this._hoveredCssLabel=new I0(this._labelsDivElement),this._hoveredCssLabel.setPointerEvents("all"),this._hoveredCssLabel.element.addEventListener("click",this._onHoveredNodeClick.bind(this)),this._linksFilter.setAccessor(a=>[a.source,a.target]),this._nodesFilter.setAccessor(a=>a.id),this._selectedNodesFilter.setAccessor(a=>a.id),this._nodesCrossfilter.onFiltered=()=>{var a,o,s,l;let d;this._nodesCrossfilter.isAnyFiltersActive()?(d=this._nodesCrossfilter.getFilteredRecords(),(a=this._cosmos)===null||a===void 0||a.selectNodesByIds(d.map(c=>c.id))):(o=this._cosmos)===null||o===void 0||o.unselectNodes(),this._updateSelectedNodesSet(d),(l=(s=this._cosmographConfig).onNodesFiltered)===null||l===void 0||l.call(s,d)},this._linksCrossfilter.onFiltered=()=>{var a,o;let s;this._linksCrossfilter.isAnyFiltersActive()&&(s=this._linksCrossfilter.getFilteredRecords()),(o=(a=this._cosmographConfig).onLinksFiltered)===null||o===void 0||o.call(a,s)};const n=this._svgParser.parseFromString(UA,"image/svg+xml").firstChild;(r=this._watermarkDivElement)===null||r===void 0||r.appendChild(n)}get data(){return this._data}get progress(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.progress}get isSimulationRunning(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.isSimulationRunning}get maxPointSize(){var e;return(e=this._cosmos)===null||e===void 0?void 0:e.maxPointSize}setData(e,t){var r,n,a,o;const{_cosmographConfig:s}=this;this._data={nodes:e,links:t};const l=s.disableSimulation===null?!t.length:s.disableSimulation;this._cosmos||(this._disableSimulation=l,this._cosmosConfig.disableSimulation=this._disableSimulation,this._cosmos=new iE(this._canvasElement,this._cosmosConfig),this.cosmos=this._cosmos),this._disableSimulation!==l&&console.warn(`The \`disableSimulation\` was initialized to \`${this._disableSimulation}\` during initialization and will not be modified.`),this._cosmos.setData(e,t),this._nodesCrossfilter.addRecords(e),this._linksCrossfilter.addRecords(t),this._updateLabels(),(n=(r=this._cosmographConfig).onSetData)===null||n===void 0||n.call(r,e,t),this._isDataDifferent()&&(["cosmograph.app"].includes(window.location.hostname)||I5({browser:navigator.userAgent,hostname:window.location.hostname,mode:null,is_library_metric:!0,links_count:t.length,links_have_time:null,links_raw_columns:t.length&&(a=Object.keys(t==null?void 0:t[0]).length)!==null&&a!==void 0?a:0,links_raw_lines:null,nodes_count:e.length,nodes_have_time:null,nodes_raw_columns:e.length&&(o=Object.keys(e==null?void 0:e[0]).length)!==null&&o!==void 0?o:0,nodes_raw_lines:null})),this._previousData={nodes:e,links:t}}setConfig(e){var t,r;if(this._cosmographConfig=La(gg,e!=null?e:{}),this._cosmosConfig=this._createCosmosConfig(e),(t=this._cosmos)===null||t===void 0||t.setConfig(this._cosmosConfig),e==null?void 0:e.backgroundColor){const n=(r=An(e==null?void 0:e.backgroundColor))===null||r===void 0?void 0:r.formatHex();if(n){const a=this._checkBrightness(n),o=document.querySelector(":root");a>.65?o==null||o.style.setProperty("--cosmograph-watermark-color","#000000"):o==null||o.style.setProperty("--cosmograph-watermark-color","#ffffff")}}this._updateLabels()}addNodesFilter(){return this._nodesCrossfilter.addFilter()}addLinksFilter(){return this._linksCrossfilter.addFilter()}selectNodesInRange(e){var t;if(!this._cosmos)return;this._cosmos.selectNodesInRange(e);const r=new Set(((t=this.getSelectedNodes())!==null&&t!==void 0?t:[]).map(n=>n.id));this._selectedNodesFilter.applyFilter(n=>r.has(n))}selectNodes(e){if(!this._cosmos)return;const t=new Set(e.map(r=>r.id));this._selectedNodesFilter.applyFilter(r=>t.has(r))}selectNode(e,t=!1){if(!this._cosmos)return;const r=new Set([e,...t&&this._cosmos.getAdjacentNodes(e.id)||[]].map(n=>n.id));this._selectedNodesFilter.applyFilter(n=>r.has(n))}unselectNodes(){this._cosmos&&this._selectedNodesFilter.clear()}getSelectedNodes(){if(this._cosmos)return this._cosmos.getSelectedNodes()}zoomToNode(e){this._cosmos&&this._cosmos.zoomToNodeById(e.id)}setZoomLevel(e,t=0){this._cosmos&&this._cosmos.setZoomLevel(e,t)}getZoomLevel(){if(this._cosmos)return this._cosmos.getZoomLevel()}getNodePositions(){if(this._cosmos)return this._cosmos.getNodePositions()}getNodePositionsMap(){if(this._cosmos)return this._cosmos.getNodePositionsMap()}getNodePositionsArray(){if(this._cosmos)return this._cosmos.getNodePositionsArray()}fitView(e=250){this._cosmos&&this._cosmos.fitView(e)}fitViewByNodeIds(e,t=250){this._cosmos&&this._cosmos.fitViewByNodeIds(e,t)}focusNode(e){this._cosmos&&this._cosmos.setFocusedNodeById(e==null?void 0:e.id)}getAdjacentNodes(e){if(this._cosmos)return this._cosmos.getAdjacentNodes(e)}spaceToScreenPosition(e){if(this._cosmos)return this._cosmos.spaceToScreenPosition(e)}spaceToScreenRadius(e){if(this._cosmos)return this._cosmos.spaceToScreenRadius(e)}getNodeRadiusByIndex(e){if(this._cosmos)return this._cosmos.getNodeRadiusByIndex(e)}getNodeRadiusById(e){if(this._cosmos)return this._cosmos.getNodeRadiusById(e)}getSampledNodePositionsMap(){if(this._cosmos)return this._cosmos.getSampledNodePositionsMap()}start(e=1){this._cosmos&&this._cosmos.start(e)}pause(){this._cosmos&&this._cosmos.pause()}restart(){this._cosmos&&this._cosmos.restart()}step(){this._cosmos&&this._cosmos.step()}remove(){var e;(e=this._cosmos)===null||e===void 0||e.destroy(),this._isLabelsDestroyed||(this._containerNode.innerHTML="",this._isLabelsDestroyed=!0,this._hoveredCssLabel.element.removeEventListener("click",this._onHoveredNodeClick.bind(this)),this._hoveredCssLabel.destroy(),this._cssLabelsRenderer.destroy())}create(){this._cosmos&&this._cosmos.create()}getNodeDegrees(){if(this._cosmos)return this._cosmos.graph.degree}_createCosmosConfig(e){const t=Il(Ei({},e),{simulation:Il(Ei({},Object.keys(e!=null?e:{}).filter(r=>r.indexOf("simulation")!==-1).reduce((r,n)=>{const a=n.replace("simulation","");return r[a.charAt(0).toLowerCase()+a.slice(1)]=e==null?void 0:e[n],r},{})),{onStart:this._onStart.bind(this),onTick:this._onTick.bind(this),onEnd:this._onEnd.bind(this),onPause:this._onPause.bind(this),onRestart:this._onRestart.bind(this)}),events:{onClick:this._onClick.bind(this),onNodeMouseOver:this._onNodeMouseOver.bind(this),onNodeMouseOut:this._onNodeMouseOut.bind(this),onMouseMove:this._onMouseMove.bind(this),onZoomStart:this._onZoomStart.bind(this),onZoom:this._onZoom.bind(this),onZoomEnd:this._onZoomEnd.bind(this)}});return delete t.disableSimulation,t}_updateLabels(){if(this._isLabelsDestroyed||!this._cosmos)return;const{_cosmos:e,data:{nodes:t},_cosmographConfig:{showTopLabels:r,showTopLabelsLimit:n,showLabelsFor:a,showTopLabelsValueKey:o,nodeLabelAccessor:s}}=this;if(this._nodesForTopLabels.clear(),r&&n){let l;l=o?[...t].sort((d,c)=>{const u=d[o],f=c[o];return typeof u=="number"&&typeof f=="number"?f-u:0}):Object.entries(e.graph.degree).sort((d,c)=>c[1]-d[1]).slice(0,n).map(d=>e.graph.getNodeByIndex(+d[0]));for(let d=0;d=t.length);d++){const c=l[d];c&&this._nodesForTopLabels.add(c)}}this._nodesForForcedLabels.clear(),a==null||a.forEach(this._nodesForForcedLabels.add,this._nodesForForcedLabels),this._trackedNodeToLabel.clear(),e.trackNodePositionsByIds([...r?this._nodesForTopLabels:[],...this._nodesForForcedLabels].map(l=>{var d;return this._trackedNodeToLabel.set(l,(d=s==null?void 0:s(l))!==null&&d!==void 0?d:l.id),l.id})),this._renderLabels()}_updateSelectedNodesSet(e){this._isLabelsDestroyed||(e?(this._selectedNodesSet=new Set,e==null||e.forEach(this._selectedNodesSet.add,this._selectedNodesSet)):this._selectedNodesSet=void 0,this._renderLabels())}_renderLabels(){if(this._isLabelsDestroyed||!this._cosmos)return;const{_cosmos:e,_selectedNodesSet:t,_cosmographConfig:{showDynamicLabels:r,nodeLabelAccessor:n,nodeLabelColor:a,nodeLabelClassName:o}}=this;let s=[];const l=e.getTrackedNodePositionsMap(),d=new Map;if(r){const c=this.getSampledNodePositionsMap();c==null||c.forEach((u,f)=>{var m;const p=e.graph.getNodeById(f);p&&d.set(p,[(m=n==null?void 0:n(p))!==null&&m!==void 0?m:p.id,u,gs.cosmographShowDynamicLabels,.7])})}this._nodesForTopLabels.forEach(c=>{d.set(c,[this._trackedNodeToLabel.get(c),l.get(c.id),gs.cosmographShowTopLabels,.9])}),this._nodesForForcedLabels.forEach(c=>{d.set(c,[this._trackedNodeToLabel.get(c),l.get(c.id),gs.cosmographShowLabelsFor,1])}),s=[...d.entries()].map(([c,[u,f,m,p]])=>{var y,x,E;const k=this.spaceToScreenPosition([(y=f==null?void 0:f[0])!==null&&y!==void 0?y:0,(x=f==null?void 0:f[1])!==null&&x!==void 0?x:0]),I=this.spaceToScreenRadius(e.config.nodeSizeScale*this.getNodeRadiusById(c.id)),v=!!t,M=t==null?void 0:t.has(c);return{id:c.id,text:u!=null?u:"",x:k[0],y:k[1]-(I+2),weight:v&&!M?.1:p,shouldBeShown:this._nodesForForcedLabels.has(c),style:v&&!M?"opacity: 0.1;":"",color:a&&(typeof a=="string"?a:a==null?void 0:a(c)),className:(E=typeof o=="string"?o:o==null?void 0:o(c))!==null&&E!==void 0?E:m}}),this._cssLabelsRenderer.setLabels(s),this._cssLabelsRenderer.draw(!0)}_renderLabelForHovered(e,t){var r,n;if(!this._cosmos)return;const{_cosmographConfig:{showHoveredNodeLabel:a,nodeLabelAccessor:o,hoveredNodeLabelClassName:s,hoveredNodeLabelColor:l}}=this;if(!this._isLabelsDestroyed){if(a&&e&&t){const d=this.spaceToScreenPosition(t),c=this.spaceToScreenRadius(this.getNodeRadiusById(e.id));this._hoveredCssLabel.setText((r=o==null?void 0:o(e))!==null&&r!==void 0?r:e.id),this._hoveredCssLabel.setVisibility(!0),this._hoveredCssLabel.setPosition(d[0],d[1]-(c+2)),this._hoveredCssLabel.setClassName(typeof s=="string"?s:(n=s==null?void 0:s(e))!==null&&n!==void 0?n:"");const u=l&&(typeof l=="string"?l:l==null?void 0:l(e));u&&this._hoveredCssLabel.setColor(u)}else this._hoveredCssLabel.setVisibility(!1);this._hoveredCssLabel.draw()}}_applyLinksFilter(){if(this._nodesCrossfilter.isAnyFiltersActive(this._nodesFilter)){const e=this._nodesCrossfilter.getFilteredRecords(this._nodesFilter),t=new Set(e.map(r=>r.id));this._linksFilter.applyFilter(r=>{const n=r==null?void 0:r[0],a=r==null?void 0:r[1];return t.has(n)&&t.has(a)})}else this._linksFilter.clear()}_applyNodesFilter(){if(this._linksCrossfilter.isAnyFiltersActive(this._linksFilter)){const e=this._linksCrossfilter.getFilteredRecords(this._linksFilter),t=new Set(e.map(r=>[r.source,r.target]).flat());this._nodesFilter.applyFilter(r=>t.has(r))}else this._nodesFilter.clear()}_checkBrightness(e){const t=(r=>{const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return n?{r:parseInt((n[1]||0).toString(),16),g:parseInt((n[2]||0).toString(),16),b:parseInt((n[3]||0).toString(),16)}:{r:0,g:0,b:0}})(e);return(.2126*t.r+.7152*t.g+.0722*t.b)/255}}const xg={onSelectResult:void 0,accessors:void 0};class G5{constructor(e,t,r){this._config={},this._data=[],this._defaultAccessors=[],this._createDefaultAccessorOptions=n=>n.length>0&&n[0]?Object.keys(n[0]).map(a=>({label:a,accessor:o=>String(o[a])})):[{label:"id",accessor:a=>a.id}],this._onSelect=(...n)=>{this._onSelectResult(...n)},this._onSearch=(...n)=>{var a,o;(o=(a=this._config).onSearch)===null||o===void 0||o.call(a,...n)},this._onEnter=(...n)=>{var a,o;(o=(a=this._config).onEnter)===null||o===void 0||o.call(a,...n)},this._onAccessorSelect=(...n)=>{var a,o;(o=(a=this._config).onAccessorSelect)===null||o===void 0||o.call(a,...n)},this._cosmograph=e,this._config=La(xg,r!=null?r:{}),this.search=new BA(t,this._createSearchConfig(r)),this._filter=this._cosmograph.addNodesFilter(),this._filter.onDataAdded=()=>{this._updateData()},this._updateData()}setConfig(e){const t=La(xg,e!=null?e:{});this._data.length&&t.accessors===void 0&&(t.accessors=this._defaultAccessors),this.search.setConfig(this._createSearchConfig(t)),this._config=t}_updateData(){const e=this._cosmograph.data.nodes;e!=null&&e.length&&(this._data=e,this.search.setData(this._data),this._config.accessors===void 0&&(this._defaultAccessors=this._createDefaultAccessorOptions(this._data),this.setConfig({accessors:this._defaultAccessors})))}getConfig(){return this._config}remove(){this.search.destroy()}setListState(e){this.search.setListState(e)}clearInput(){this.search.clearInput()}_onSelectResult(e){var t,r;this._cosmograph.pause(),this._cosmograph.zoomToNode(e),this._cosmograph.selectNode(e),(r=(t=this._config).onSelectResult)===null||r===void 0||r.call(t,e)}_createSearchConfig(e){return Il(Ei({},e),{events:{onSelect:this._onSelect.bind(this),onSearch:this._onSearch.bind(this),onEnter:this._onEnter.bind(this),onAccessorSelect:this._onAccessorSelect.bind(this)}})}}var bd;(function(i){i.Nodes="nodes",i.Links="links"})(bd||(bd={}));bd.Links;bd.Nodes;var wg={},Wc={},Xc=34,vs=10,Yc=13;function fv(i){return new Function("d","return {"+i.map(function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'}).join(",")+"}")}function j5(i,e){var t=fv(i);return function(r,n){return e(t(r),n,i)}}function Sg(i){var e=Object.create(null),t=[];return i.forEach(function(r){for(var n in r)n in e||t.push(e[n]=n)}),t}function Er(i,e){var t=i+"",r=t.length;return r9999?"+"+Er(i,6):Er(i,4)}function H5(i){var e=i.getUTCHours(),t=i.getUTCMinutes(),r=i.getUTCSeconds(),n=i.getUTCMilliseconds();return isNaN(i)?"Invalid Date":V5(i.getUTCFullYear())+"-"+Er(i.getUTCMonth()+1,2)+"-"+Er(i.getUTCDate(),2)+(n?"T"+Er(e,2)+":"+Er(t,2)+":"+Er(r,2)+"."+Er(n,3)+"Z":r?"T"+Er(e,2)+":"+Er(t,2)+":"+Er(r,2)+"Z":t||e?"T"+Er(e,2)+":"+Er(t,2)+"Z":"")}function q5(i){var e=new RegExp('["'+i+` +\r]`),t=i.charCodeAt(0);function r(u,f){var m,p,y=n(u,function(x,E){if(m)return m(x,E-1);p=x,m=f?j5(x,f):fv(x)});return y.columns=p||[],y}function n(u,f){var m=[],p=u.length,y=0,x=0,E,k=p<=0,I=!1;u.charCodeAt(p-1)===vs&&--p,u.charCodeAt(p-1)===Yc&&--p;function v(){if(k)return Wc;if(I)return I=!1,wg;var K,L=y,R;if(u.charCodeAt(L)===Xc){for(;y++=p?k=!0:(R=u.charCodeAt(y++))===vs?I=!0:R===Yc&&(I=!0,u.charCodeAt(y)===vs&&++y),u.slice(L+1,K-1).replace(/""/g,'"')}for(;y{const t=i.map(d=>({source:parseInt(d.source),target:parseInt(d.target)})),r=e.map(d=>({id:parseInt(d.id),label:d.label,color:d.color})),n=document.getElementById("app");iC.style.visibility="hidden",rC.style.visibility="visible",n.appendChild(wu);const a=document.createElement("div");n.appendChild(a);const o={nodeColor:d=>d.color,nodeLabelAccessor:d=>d.label,nodeLabelColor:"white",hoveredNodeLabelColor:"white",linkWidth:2},s=new U5(wu,o),l=new G5(s,a);s.setData(r,t),l.setData(r)});export{Yg as g}; +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = [] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} diff --git a/static/vite/manifest.info b/static/vite/manifest.info new file mode 100644 index 0000000..2181a2d --- /dev/null +++ b/static/vite/manifest.info @@ -0,0 +1,17 @@ +{ + "_browser-C1tfp1OT.js": { + "file": "browser-C1tfp1OT.js", + "isDynamicEntry": true, + "imports": [ + "js/main.js" + ] + }, + "js/main.js": { + "file": "main-CE-ujooY.js", + "src": "js/main.js", + "isEntry": true, + "dynamicImports": [ + "_browser-C1tfp1OT.js" + ] + } +} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 65b40b9..662e3e9 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,9 +1,10 @@ + + {% block title %}PMB{% endblock %} - {% include "partials/head.html" %} @@ -17,26 +18,27 @@ {% block scripts2 %} {% endblock scripts2 %} - - -{% block scripts %} -{% endblock %} + const csrftoken = getCookie('csrftoken'); + + {% block scripts %} + {% endblock %} + + \ No newline at end of file diff --git a/templates/partials/footer.html b/templates/partials/footer.html index 94074dc..d1e322c 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -43,7 +43,6 @@
Lizenz der Inhalte: e-Mail

-

@@ -54,7 +53,6 @@
Lizenz der Inhalte: © Copyright OEAW | Impressum diff --git a/templates/partials/head.html b/templates/partials/head.html index e9837f5..0ecda4c 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -9,7 +9,7 @@ rel="stylesheet" href="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.css" /> - + diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..4f06dfa --- /dev/null +++ b/vite.config.js @@ -0,0 +1,30 @@ +const { resolve } = require('path'); + +module.exports = { + root: resolve('./static/src'), + base: '/static/', + server: { + host: 'localhost', + port: 5173, + open: false, + watch: { + usePolling: true, + disableGlobbing: false, + }, + }, + resolve: { + extensions: ['.js', '.json'], + }, + build: { + outDir: resolve('./static/vite'), + assetsDir: '', + manifest: "manifest.info", + emptyOutDir: true, + target: 'es2015', + rollupOptions: { + input: { + main: resolve('./static/src/js/main.js'), + }, + }, + }, +};