From 2acfa2779c782cf0c4d189c2871663f7292b176e Mon Sep 17 00:00:00 2001 From: Pascal Garber Date: Fri, 23 Jun 2023 13:16:54 +0200 Subject: [PATCH] chore(typedoc-theme): Replaced original sidebars with its own --- @types | 2 +- .../scripts/components/index.scss | 4 +- .../scripts/components/index.ts | 4 +- .../module-menu.component.scss} | 2 +- .../module-menu.component.tsx} | 18 +- .../navigation-secondary.component.scss | 69 - .../sidebar-content.component.scss | 0 .../sidebar-content.component.tsx} | 14 +- packages/typedoc-theme-client/scripts/main.ts | 8 +- .../scripts/original/bootstrap.ts | 37 +- .../scripts/original/typedoc/Application.ts | 28 +- .../original/typedoc/components/Filter.ts | 77 - .../original/typedoc/components/Search.ts | 294 --- .../scripts/types/index.ts | 8 +- .../scripts/types/jsx/index.ts | 4 +- .../scripts/types/jsx/intrinsic-elements.ts | 8 +- .../types/jsx/jsx-member-signatures-props.ts | 2 +- .../types/jsx/jsx-module-menu-props.ts | 3 + .../scripts/types/jsx/jsx-navbar-props.ts | 2 +- .../types/jsx/jsx-navigation-primary-props.ts | 3 - .../jsx/jsx-navigation-secondary-props.ts | 3 - .../scripts/types/jsx/jsx-search-props.ts | 2 +- .../types/jsx/jsx-sidebar-content-props.ts | 3 + .../types/module-menu-component-scope.ts | 9 + .../{navigation-primary.ts => module-menu.ts} | 2 +- .../navigation-primary-component-scope.ts | 10 - ....ts => sidebar-content-component-scope.ts} | 2 +- ...gation-secondary.ts => sidebar-content.ts} | 2 +- .../typedoc-theme-client/styles/_layout.scss | 6 +- .../styles/components/bs5-sidebar.scss | 2 +- .../typedoc-theme-client/styles/original.scss | 2110 ++++++++--------- packages/typedoc-theme/assets/main.bundle.js | 37 +- .../typedoc-theme/assets/main.bundle.js.map | 2 +- packages/typedoc-theme/assets/main.css | 2 +- packages/typedoc-theme/package.json | 2 +- packages/typedoc-theme/src/constants/index.ts | 1 + .../typedoc-theme/src/constants/version.ts | 1 + .../src/jsx/intrinsic-elements.ts | 9 +- .../typedoc-theme/src/jsx/jsx-children.ts | 2 +- packages/typedoc-theme/src/jsx/jsx-element.ts | 2 +- .../typedoc-theme/src/layouts/default.tsx | 20 +- .../typedoc-theme/src/partials/footer.tsx | 28 +- .../src/partials/gjsify-sidebar.tsx | 25 +- packages/typedoc-theme/src/partials/icon.tsx | 24 + .../src/partials/navigation-secondary.tsx | 125 - .../typedoc-theme/src/partials/navigation.tsx | 125 +- .../typedoc-theme/src/partials/toolbar.tsx | 66 +- .../typedoc-theme/src/theme-render-context.ts | 25 +- 48 files changed, 1260 insertions(+), 1974 deletions(-) rename packages/typedoc-theme-client/scripts/components/{navigation-primary/navigation-primary.component.scss => module-menu/module-menu.component.scss} (99%) rename packages/typedoc-theme-client/scripts/components/{navigation-primary/navigation-primary.component.tsx => module-menu/module-menu.component.tsx} (89%) delete mode 100644 packages/typedoc-theme-client/scripts/components/navigation-secondary/navigation-secondary.component.scss create mode 100644 packages/typedoc-theme-client/scripts/components/sidebar-content/sidebar-content.component.scss rename packages/typedoc-theme-client/scripts/components/{navigation-secondary/navigation-secondary.component.tsx => sidebar-content/sidebar-content.component.tsx} (71%) delete mode 100644 packages/typedoc-theme-client/scripts/original/typedoc/components/Filter.ts delete mode 100644 packages/typedoc-theme-client/scripts/original/typedoc/components/Search.ts create mode 100644 packages/typedoc-theme-client/scripts/types/jsx/jsx-module-menu-props.ts delete mode 100644 packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-primary-props.ts delete mode 100644 packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-secondary-props.ts create mode 100644 packages/typedoc-theme-client/scripts/types/jsx/jsx-sidebar-content-props.ts create mode 100644 packages/typedoc-theme-client/scripts/types/module-menu-component-scope.ts rename packages/typedoc-theme-client/scripts/types/{navigation-primary.ts => module-menu.ts} (80%) delete mode 100644 packages/typedoc-theme-client/scripts/types/navigation-primary-component-scope.ts rename packages/typedoc-theme-client/scripts/types/{navigation-secondary-component-scope.ts => sidebar-content-component-scope.ts} (75%) rename packages/typedoc-theme-client/scripts/types/{navigation-secondary.ts => sidebar-content.ts} (78%) create mode 100644 packages/typedoc-theme/src/constants/index.ts create mode 100644 packages/typedoc-theme/src/constants/version.ts delete mode 100644 packages/typedoc-theme/src/partials/navigation-secondary.tsx diff --git a/@types b/@types index d68b24de6..7431ec061 160000 --- a/@types +++ b/@types @@ -1 +1 @@ -Subproject commit d68b24de6addc8ab47f5f87296fdfbb19fd1e9d4 +Subproject commit 7431ec0610caa693511fe785cb1ccfa60c948264 diff --git a/packages/typedoc-theme-client/scripts/components/index.scss b/packages/typedoc-theme-client/scripts/components/index.scss index 764cb74ad..5eb672d67 100644 --- a/packages/typedoc-theme-client/scripts/components/index.scss +++ b/packages/typedoc-theme-client/scripts/components/index.scss @@ -2,6 +2,6 @@ @import "./header/header.component"; @import "./member-signatures/member-signatures.component"; @import "./navbar/navbar.component"; -@import "./navigation-secondary/navigation-secondary.component"; -@import "./navigation-primary/navigation-primary.component"; +@import "./sidebar-content/sidebar-content.component"; +@import "./module-menu/module-menu.component"; @import "./search/search.component"; \ No newline at end of file diff --git a/packages/typedoc-theme-client/scripts/components/index.ts b/packages/typedoc-theme-client/scripts/components/index.ts index a0e02ce66..c80ba329f 100644 --- a/packages/typedoc-theme-client/scripts/components/index.ts +++ b/packages/typedoc-theme-client/scripts/components/index.ts @@ -2,6 +2,6 @@ export * from "./footer/footer.component"; export * from "./header/header.component"; export * from "./member-signatures/member-signatures.component.js"; export * from "./navbar/navbar.component.js"; -export * from "./navigation-secondary/navigation-secondary.component.js"; -export * from "./navigation-primary/navigation-primary.component.js"; +export * from "./sidebar-content/sidebar-content.component.js"; +export * from "./module-menu/module-menu.component.js"; export * from "./search/search.component.js"; diff --git a/packages/typedoc-theme-client/scripts/components/navigation-primary/navigation-primary.component.scss b/packages/typedoc-theme-client/scripts/components/module-menu/module-menu.component.scss similarity index 99% rename from packages/typedoc-theme-client/scripts/components/navigation-primary/navigation-primary.component.scss rename to packages/typedoc-theme-client/scripts/components/module-menu/module-menu.component.scss index 284cb199f..3b2b87607 100644 --- a/packages/typedoc-theme-client/scripts/components/navigation-primary/navigation-primary.component.scss +++ b/packages/typedoc-theme-client/scripts/components/module-menu/module-menu.component.scss @@ -1,4 +1,4 @@ -tsd-navigation-primary { +tsd-module-menu { .dropdown { .dropdown-toggle { diff --git a/packages/typedoc-theme-client/scripts/components/navigation-primary/navigation-primary.component.tsx b/packages/typedoc-theme-client/scripts/components/module-menu/module-menu.component.tsx similarity index 89% rename from packages/typedoc-theme-client/scripts/components/navigation-primary/navigation-primary.component.tsx rename to packages/typedoc-theme-client/scripts/components/module-menu/module-menu.component.tsx index 583b5eb95..cad1d6343 100644 --- a/packages/typedoc-theme-client/scripts/components/navigation-primary/navigation-primary.component.tsx +++ b/packages/typedoc-theme-client/scripts/components/module-menu/module-menu.component.tsx @@ -5,26 +5,26 @@ import { Pjax } from "@ribajs/router"; import type {} from "@ribajs/fuse"; import type { - NavigationPrimaryComponentScope, + ModuleMenuScope, Module, - JsxTsdNavigationPrimaryProps, + JsxTsdModuleMenuProps, Dataset, } from "../../types/index.js"; -export class NavigationPrimaryComponent extends Component { - public static tagName = "tsd-navigation-primary"; +export class ModuleMenuComponent extends Component { + public static tagName = "tsd-module-menu"; - static get observedAttributes(): (keyof JsxTsdNavigationPrimaryProps)[] { + static get observedAttributes(): (keyof JsxTsdModuleMenuProps)[] { return []; } - protected requiredAttributes(): (keyof JsxTsdNavigationPrimaryProps)[] { + protected requiredAttributes(): (keyof JsxTsdModuleMenuProps)[] { return []; } protected routerEvents = new EventDispatcher("main"); - public scope: NavigationPrimaryComponentScope = { + public scope: ModuleMenuScope = { selectedModule: "Modules", onModuleSelect: this.onModuleSelect, }; @@ -35,7 +35,7 @@ export class NavigationPrimaryComponent extends Component { protected connectedCallback() { super.connectedCallback(); - this.init(NavigationPrimaryComponent.observedAttributes); + this.init(ModuleMenuComponent.observedAttributes); } protected async beforeBind() { @@ -87,7 +87,7 @@ export class NavigationPrimaryComponent extends Component { protected async fetchData() { const data = await HttpService.getJSON("/assets/modules.json"); this.scope.modules = data.body; - console.debug("NavigationPrimaryComponent", this.scope.modules); + console.debug("ModuleMenu", this.scope.modules); } protected template(): ReturnType { diff --git a/packages/typedoc-theme-client/scripts/components/navigation-secondary/navigation-secondary.component.scss b/packages/typedoc-theme-client/scripts/components/navigation-secondary/navigation-secondary.component.scss deleted file mode 100644 index 74eec78dc..000000000 --- a/packages/typedoc-theme-client/scripts/components/navigation-secondary/navigation-secondary.component.scss +++ /dev/null @@ -1,69 +0,0 @@ -tsd-navigation-secondary { - .tsd-navigation { - a { - display: block; - padding-top: 2px; - padding-bottom: 2px; - border-left: 2px solid transparent; - color: var(--bs-body-color); - text-decoration: none; - transition: border-left-color 0.1s; - &:hover { - text-decoration: underline; - } - } - ul { - margin: 0; - padding: 0; - list-style: none; - } - li { - padding: 0; - } - - &.secondary { - ul { - transition: opacity 0.2s; - li { - a { - padding-left: 25px; - } - li { - a { - padding-left: 45px; - } - li { - a { - padding-left: 65px; - } - li { - a { - padding-left: 85px; - } - li { - a { - padding-left: 105px; - } - li { - a { - padding-left: 125px; - } - } - } - } - } - } - } - } - li { - &.current { - margin-top: 20px; - margin-bottom: 20px; - & > a { - font-weight: bold; - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/typedoc-theme-client/scripts/components/sidebar-content/sidebar-content.component.scss b/packages/typedoc-theme-client/scripts/components/sidebar-content/sidebar-content.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/packages/typedoc-theme-client/scripts/components/navigation-secondary/navigation-secondary.component.tsx b/packages/typedoc-theme-client/scripts/components/sidebar-content/sidebar-content.component.tsx similarity index 71% rename from packages/typedoc-theme-client/scripts/components/navigation-secondary/navigation-secondary.component.tsx rename to packages/typedoc-theme-client/scripts/components/sidebar-content/sidebar-content.component.tsx index be3b4bdb6..44cba1b95 100644 --- a/packages/typedoc-theme-client/scripts/components/navigation-secondary/navigation-secondary.component.tsx +++ b/packages/typedoc-theme-client/scripts/components/sidebar-content/sidebar-content.component.tsx @@ -2,10 +2,10 @@ import { Component, TemplateFunction } from "@ribajs/core"; import { hasChildNodesTrim } from "@ribajs/utils"; import { EventDispatcher } from "@ribajs/events"; -import type { NavigationSecondaryComponentScope } from "../../types/index.js"; +import type { SidebarContentComponentScope } from "../../types/index.js"; -export class NavigationComponent extends Component { - public static tagName = "tsd-navigation-secondary"; +export class SidebarContentComponent extends Component { + public static tagName = "tsd-sidebar-content"; static get observedAttributes() { return []; @@ -13,7 +13,7 @@ export class NavigationComponent extends Component { protected routerEvents = new EventDispatcher("main"); - public scope: NavigationSecondaryComponentScope = {}; + public scope: SidebarContentComponentScope = {}; constructor() { super(); @@ -21,7 +21,7 @@ export class NavigationComponent extends Component { protected connectedCallback() { super.connectedCallback(); - this.init(NavigationComponent.observedAttributes); + this.init(SidebarContentComponent.observedAttributes); } protected async beforeBind() { @@ -35,10 +35,10 @@ export class NavigationComponent extends Component { protected onNewPage() { const templateEl = document.getElementById( - "tsd-navigation-secondary-template" + "tsd-sidebar-content-template" ) as HTMLTemplateElement | null; if (!templateEl) { - console.warn("[NavigationComponent] No template found!"); + console.warn("[SidebarContentComponent] No template found!"); return; } this.scope.template = templateEl.innerHTML; diff --git a/packages/typedoc-theme-client/scripts/main.ts b/packages/typedoc-theme-client/scripts/main.ts index 86e59affe..5bce7252e 100644 --- a/packages/typedoc-theme-client/scripts/main.ts +++ b/packages/typedoc-theme-client/scripts/main.ts @@ -1,12 +1,13 @@ import { ready } from "@ribajs/utils"; import { Riba, coreModule } from "@ribajs/core"; +// import { EventDispatcher } from "@ribajs/events"; import { routerModule, FadeTransition } from "@ribajs/router"; import { bs5Module, ThemeService } from "@ribajs/bs5"; import { fuseModule } from "@ribajs/fuse"; import { gjsifyTypedocModule } from "./module"; // Import original typedoc bootstrap -import "./original/bootstrap.js"; +import { bootstrap as bootstrapOriginal } from "./original/bootstrap.js"; declare global { interface Window { @@ -45,6 +46,11 @@ const bootstrap = () => { console.error(error); }); + // EventDispatcher.getInstance("main").on("newPageReady", () => { + // bootstrapOriginal(); + // }); + bootstrapOriginal(); + // Also add theme class to body for TypeDoc Theme backward compatibility theme.onChange((data) => { document.body.classList.remove("os", "dark", "light"); diff --git a/packages/typedoc-theme-client/scripts/original/bootstrap.ts b/packages/typedoc-theme-client/scripts/original/bootstrap.ts index 425f1876b..9dd27218a 100644 --- a/packages/typedoc-theme-client/scripts/original/bootstrap.ts +++ b/packages/typedoc-theme-client/scripts/original/bootstrap.ts @@ -1,31 +1,28 @@ import { Application, registerComponent } from "./typedoc/Application"; -// import { initSearch } from "./typedoc/components/Search"; import { Toggle } from "./typedoc/components/Toggle"; -import { Filter } from "./typedoc/components/Filter"; import { Accordion } from "./typedoc/components/Accordion"; import { initTheme } from "./typedoc/Theme"; -console.debug("bootstrap original..."); +export const bootstrap = () => { + console.debug("bootstrap original..."); -// initSearch(); + registerComponent(Toggle, "a[data-toggle]"); + registerComponent(Accordion, ".tsd-index-accordion"); -registerComponent(Toggle, "a[data-toggle]"); -registerComponent(Accordion, ".tsd-index-accordion"); -registerComponent(Filter, ".tsd-filter-item input[type=checkbox]"); + const themeChoice = document.getElementById("tsd-theme"); + if (themeChoice) { + initTheme(themeChoice as HTMLOptionElement); + } -const themeChoice = document.getElementById("tsd-theme"); -if (themeChoice) { - initTheme(themeChoice as HTMLOptionElement); -} + const app = new Application(); -const app = new Application(); + Object.defineProperty(window, "app", { value: app }); -Object.defineProperty(window, "app", { value: app }); - -// Safari is broken and doesn't let you click on a link within -// a tag, so we have to manually handle clicks there. -document.querySelectorAll("summary a").forEach((el) => { - el.addEventListener("click", () => { - location.assign((el as HTMLAnchorElement).href); + // Safari is broken and doesn't let you click on a link within + // a tag, so we have to manually handle clicks there. + document.querySelectorAll("summary a").forEach((el) => { + el.addEventListener("click", () => { + location.assign((el as HTMLAnchorElement).href); + }); }); -}); +}; diff --git a/packages/typedoc-theme-client/scripts/original/typedoc/Application.ts b/packages/typedoc-theme-client/scripts/original/typedoc/Application.ts index 89e0ca0e9..a0473df1c 100644 --- a/packages/typedoc-theme-client/scripts/original/typedoc/Application.ts +++ b/packages/typedoc-theme-client/scripts/original/typedoc/Application.ts @@ -37,7 +37,6 @@ export class Application { */ constructor() { this.createComponents(document.body); - this.ensureActivePageVisible(); this.ensureFocusedElementVisible(); this.listenForCodeCopies(); window.addEventListener("hashchange", () => @@ -63,27 +62,6 @@ export class Application { this.ensureFocusedElementVisible(); } - private ensureActivePageVisible() { - const pageLink = document.querySelector(".tsd-navigation .current"); - let iter = pageLink?.parentElement; - while (iter && !iter.classList.contains(".tsd-navigation")) { - // Expand parent namespaces if collapsed, and this module - if (iter instanceof HTMLDetailsElement) { - iter.open = true; - } - iter = iter.parentElement; - } - - if (pageLink) { - const top = - pageLink.getBoundingClientRect().top - - document.documentElement.clientHeight / 4; - // If we are showing three columns, this will scroll the site menu down to - // show the page we just loaded in the navigation. - document.querySelector(".site-menu")!.scrollTop = top; - } - } - /** * Ensures that if a user was linked to a reflection which is hidden because of filter * settings, that reflection is still shown. @@ -91,7 +69,7 @@ export class Application { private ensureFocusedElementVisible() { if (this.alwaysVisibleMember) { this.alwaysVisibleMember.classList.remove("always-visible"); - this.alwaysVisibleMember.firstElementChild!.remove(); + this.alwaysVisibleMember.firstElementChild?.remove(); this.alwaysVisibleMember = null; } @@ -100,9 +78,9 @@ export class Application { const reflAnchor = document.getElementById(location.hash.substring(1)); if (!reflAnchor) return; - let reflContainer = reflAnchor.parentElement!; + let reflContainer = reflAnchor.parentElement; while (reflContainer && reflContainer.tagName !== "SECTION") { - reflContainer = reflContainer.parentElement!; + reflContainer = reflContainer.parentElement; } if (!reflContainer) { diff --git a/packages/typedoc-theme-client/scripts/original/typedoc/components/Filter.ts b/packages/typedoc-theme-client/scripts/original/typedoc/components/Filter.ts deleted file mode 100644 index 93fc9a3e3..000000000 --- a/packages/typedoc-theme-client/scripts/original/typedoc/components/Filter.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Component, IComponentOptions } from "../Component"; -import { storage } from "../utils/storage"; - -const style = document.head.appendChild(document.createElement("style")); -style.dataset.for = "filters"; - -/** - * Handles sidebar filtering functionality. - */ -export class Filter extends Component { - override el: HTMLInputElement; - - /** - * The class name & ID by which to store the filter value. - */ - private readonly key: string; - - /** - * Current filter value, to keep in sync with checkbox state. - */ - private value: boolean; - - constructor(options: IComponentOptions) { - super(options); - this.el = options.el as HTMLInputElement; - this.key = `filter-${this.el.name}`; - this.value = this.el.checked; - this.el.addEventListener("change", () => { - this.setLocalStorage(this.el.checked); - }); - this.setLocalStorage(this.fromLocalStorage()); - - style.innerHTML += `html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }\n`; - } - - /** - * Retrieve value from storage. - */ - private fromLocalStorage(): boolean { - const fromStorage = storage.getItem(this.key); - return fromStorage ? fromStorage === "true" : this.el.checked; - } - - /** - * Set value to local storage. - * - * @param value Value to set. - */ - private setLocalStorage(value: boolean): void { - storage.setItem(this.key, value.toString()); - this.value = value; - this.handleValueChange(); - } - - /** - * Synchronize DOM based on value change. - */ - private handleValueChange(): void { - this.el.checked = this.value; - document.documentElement.classList.toggle(this.key, this.value); - - this.app.filterChanged(); - - // Hide index headings where all index items are hidden. - // offsetParent == null checks for display: none - document - .querySelectorAll(".tsd-index-section") - .forEach((el) => { - el.style.display = "block"; - const allChildrenHidden = Array.from( - el.querySelectorAll(".tsd-index-link") - ).every((child) => child.offsetParent == null); - - el.style.display = allChildrenHidden ? "none" : "block"; - }); - } -} diff --git a/packages/typedoc-theme-client/scripts/original/typedoc/components/Search.ts b/packages/typedoc-theme-client/scripts/original/typedoc/components/Search.ts deleted file mode 100644 index f7dfe0eef..000000000 --- a/packages/typedoc-theme-client/scripts/original/typedoc/components/Search.ts +++ /dev/null @@ -1,294 +0,0 @@ -import { debounce } from "../utils/debounce"; -import { Index } from "lunr"; - -/** - * Keep this in sync with the interface in src/lib/output/plugins/JavascriptIndexPlugin.ts - * It's not imported because these are separate TS projects today. - */ -interface SearchDocument { - id: number; - - kind: number; - name: string; - url: string; - classes?: string; - parent?: string; -} - -interface IData { - rows: SearchDocument[]; - index: object; -} - -declare global { - interface Window { - searchData?: IData; - } -} - -interface SearchState { - base: string; - data?: IData; - index?: Index; -} - -export function initSearch() { - const searchEl = document.getElementById("tsd-search"); - if (!searchEl) return; - - const searchScript = document.getElementById( - "tsd-search-script" - ) as HTMLScriptElement | null; - searchEl.classList.add("loading"); - if (searchScript) { - searchScript.addEventListener("error", () => { - searchEl.classList.remove("loading"); - searchEl.classList.add("failure"); - }); - searchScript.addEventListener("load", () => { - searchEl.classList.remove("loading"); - searchEl.classList.add("ready"); - }); - if (window.searchData) { - searchEl.classList.remove("loading"); - } - } - - const field = document.querySelector("#tsd-search input"); - const results = document.querySelector("#tsd-search .results"); - - if (!field || !results) { - throw new Error("The input field or the result list wrapper was not found"); - } - - let resultClicked = false; - results.addEventListener("mousedown", () => (resultClicked = true)); - results.addEventListener("mouseup", () => { - resultClicked = false; - searchEl.classList.remove("has-focus"); - }); - - field.addEventListener("focus", () => searchEl.classList.add("has-focus")); - field.addEventListener("blur", () => { - if (!resultClicked) { - resultClicked = false; - searchEl.classList.remove("has-focus"); - } - }); - - const state: SearchState = { - base: searchEl.dataset["base"] + "/", - }; - - bindEvents(searchEl, results, field, state); -} - -function bindEvents( - searchEl: HTMLElement, - results: HTMLElement, - field: HTMLInputElement, - state: SearchState -) { - field.addEventListener( - "input", - debounce(() => { - updateResults(searchEl, results, field, state); - }, 200) - ); - - let preventPress = false; - field.addEventListener("keydown", (e) => { - preventPress = true; - if (e.key == "Enter") { - gotoCurrentResult(results, field); - } else if (e.key == "Escape") { - field.blur(); - } else if (e.key == "ArrowUp") { - setCurrentResult(results, -1); - } else if (e.key === "ArrowDown") { - setCurrentResult(results, 1); - } else { - preventPress = false; - } - }); - field.addEventListener("keypress", (e) => { - if (preventPress) e.preventDefault(); - }); - - /** - * Start searching by pressing slash. - */ - document.body.addEventListener("keydown", (e) => { - if (e.altKey || e.ctrlKey || e.metaKey) return; - if (!field.matches(":focus") && e.key === "/") { - field.focus(); - e.preventDefault(); - } - }); -} - -function checkIndex(state: SearchState, searchEl: HTMLElement) { - if (state.index) return; - - if (window.searchData) { - searchEl.classList.remove("loading"); - searchEl.classList.add("ready"); - state.data = window.searchData; - state.index = Index.load(window.searchData.index); - } -} - -function updateResults( - searchEl: HTMLElement, - results: HTMLElement, - query: HTMLInputElement, - state: SearchState -) { - checkIndex(state, searchEl); - // Don't clear results if loading state is not ready, - // because loading or error message can be removed. - if (!state.index || !state.data) return; - - results.textContent = ""; - - const searchText = query.value.trim(); - - // Perform a wildcard search - // Set empty `res` to prevent getting random results with wildcard search - // when the `searchText` is empty. - const res = searchText ? state.index.search(`*${searchText}*`) : []; - - for (let i = 0; i < res.length; i++) { - const item = res[i]; - const row = state.data.rows[Number(item.ref)]; - let boost = 1; - - // boost by exact match on name - if (row.name.toLowerCase().startsWith(searchText.toLowerCase())) { - boost *= 1 + 1 / (1 + Math.abs(row.name.length - searchText.length)); - } - - item.score *= boost; - } - - res.sort((a, b) => b.score - a.score); - - for (let i = 0, c = Math.min(10, res.length); i < c; i++) { - const row = state.data.rows[Number(res[i].ref)]; - - // Bold the matched part of the query in the search results - let name = boldMatches(row.name, searchText); - if ((globalThis as any).DEBUG_SEARCH_WEIGHTS) { - name += ` (score: ${res[i].score.toFixed(2)})`; - } - if (row.parent) { - name = `${boldMatches( - row.parent, - searchText - )}.${name}`; - } - - const item = document.createElement("li"); - item.classList.value = row.classes ?? ""; - - const anchor = document.createElement("a"); - anchor.href = state.base + row.url; - anchor.innerHTML = name; - item.append(anchor); - - results.appendChild(item); - } -} - -/** - * Move the highlight within the result set. - */ -function setCurrentResult(results: HTMLElement, dir: number) { - let current = results.querySelector(".current"); - if (!current) { - current = results.querySelector( - dir == 1 ? "li:first-child" : "li:last-child" - ); - if (current) { - current.classList.add("current"); - } - } else { - let rel: Element | undefined = current; - // Tricky: We have to check that rel has an offsetParent so that users can't mark a hidden result as - // current with the arrow keys. - if (dir === 1) { - do { - rel = rel.nextElementSibling ?? undefined; - } while (rel instanceof HTMLElement && rel.offsetParent == null); - } else { - do { - rel = rel.previousElementSibling ?? undefined; - } while (rel instanceof HTMLElement && rel.offsetParent == null); - } - - if (rel) { - current.classList.remove("current"); - rel.classList.add("current"); - } - } -} - -/** - * Navigate to the highlighted result. - */ -function gotoCurrentResult(results: HTMLElement, field: HTMLInputElement) { - let current = results.querySelector(".current"); - - if (!current) { - current = results.querySelector("li:first-child"); - } - - if (current) { - const link = current.querySelector("a"); - if (link) { - window.location.href = link.href; - } - field.blur(); - } -} - -function boldMatches(text: string, search: string) { - if (search === "") { - return text; - } - - const lowerText = text.toLocaleLowerCase(); - const lowerSearch = search.toLocaleLowerCase(); - - const parts: string[] = []; - let lastIndex = 0; - let index = lowerText.indexOf(lowerSearch); - while (index != -1) { - parts.push( - escapeHtml(text.substring(lastIndex, index)), - `${escapeHtml(text.substring(index, index + lowerSearch.length))}` - ); - - lastIndex = index + lowerSearch.length; - index = lowerText.indexOf(lowerSearch, lastIndex); - } - - parts.push(escapeHtml(text.substring(lastIndex))); - - return parts.join(""); -} - -const SPECIAL_HTML = { - "&": "&", - "<": "<", - ">": ">", - "'": "'", - '"': """, -} as const; - -function escapeHtml(text: string) { - return text.replace( - /[&<>"'"]/g, - (match) => SPECIAL_HTML[match as keyof typeof SPECIAL_HTML] - ); -} diff --git a/packages/typedoc-theme-client/scripts/types/index.ts b/packages/typedoc-theme-client/scripts/types/index.ts index f13767c94..9766b8f96 100644 --- a/packages/typedoc-theme-client/scripts/types/index.ts +++ b/packages/typedoc-theme-client/scripts/types/index.ts @@ -9,11 +9,11 @@ export * from "./module-info.js"; export * from "./module-options.js"; export * from "./navbar-component-scope.js"; export * from "./module.js"; -export * from "./navigation-primary-component-scope.js"; -export * from "./navigation-primary.js"; -export * from "./navigation-secondary-component-scope.js"; -export * from "./navigation-secondary.js"; +export * from "./module-menu-component-scope.js"; +export * from "./module-menu.js"; export * from "./navigation.js"; export * from "./search-component-scope.js"; export * from "./search-options.js"; export * from "./search-result.js"; +export * from "./sidebar-content-component-scope.js"; +export * from "./sidebar-content.js"; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/index.ts b/packages/typedoc-theme-client/scripts/types/jsx/index.ts index ab24f81fc..f03a16a20 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/index.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/index.ts @@ -1,6 +1,6 @@ export * from "./intrinsic-elements.js"; export * from "./jsx-member-signatures-props.js"; export * from "./jsx-navbar-props.js"; -export * from "./jsx-navigation-primary-props.js"; -export * from "./jsx-navigation-secondary-props.js"; +export * from "./jsx-module-menu-props.js"; export * from "./jsx-search-props.js"; +export * from "./jsx-sidebar-content-props.js"; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/intrinsic-elements.ts b/packages/typedoc-theme-client/scripts/types/jsx/intrinsic-elements.ts index 8b82fa85f..074e8f341 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/intrinsic-elements.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/intrinsic-elements.ts @@ -2,8 +2,8 @@ /* eslint-disable @typescript-eslint/no-namespace */ import type { JsxTsdSearchProps, - JsxTsdNavigationPrimaryProps, - JsxTsdNavigationSecondaryProps, + JsxTsdModuleMenuProps, + JsxTsdSidebarContentProps, JsxTsdNavbarProps, JsxTsdMemberSignaturesProps, } from "./index.js"; @@ -11,8 +11,8 @@ import type { export interface TsdIntrinsicElements { // Custom Elements "tsd-search": JsxTsdSearchProps; - "tsd-navigation-primary": JsxTsdNavigationPrimaryProps; - "tsd-navigation-secondary": JsxTsdNavigationSecondaryProps; + "tsd-module-menu": JsxTsdModuleMenuProps; + "tsd-sidebar-content": JsxTsdSidebarContentProps; "tsd-navbar": JsxTsdNavbarProps; "tsd-member-signatures": JsxTsdMemberSignaturesProps; } diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-member-signatures-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-member-signatures-props.ts index 908fb1b9f..eff26105f 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-member-signatures-props.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-member-signatures-props.ts @@ -1,3 +1,3 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; +import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; export type JsxTsdMemberSignaturesProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-module-menu-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-module-menu-props.ts new file mode 100644 index 000000000..1c4e19395 --- /dev/null +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-module-menu-props.ts @@ -0,0 +1,3 @@ +import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; + +export type JsxTsdModuleMenuProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navbar-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navbar-props.ts index 0ab4c5095..3c7b49ec2 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navbar-props.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navbar-props.ts @@ -1,3 +1,3 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; +import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; export type JsxTsdNavbarProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-primary-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-primary-props.ts deleted file mode 100644 index 503281358..000000000 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-primary-props.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; - -export type JsxTsdNavigationPrimaryProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-secondary-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-secondary-props.ts deleted file mode 100644 index a3e278306..000000000 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-secondary-props.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; - -export type JsxTsdNavigationSecondaryProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-search-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-search-props.ts index c28d3acb5..48eb48715 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-search-props.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-search-props.ts @@ -1,4 +1,4 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; +import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; export interface JsxTsdSearchProps extends JsxHtmlGlobalProps { /** The base url of the remote search server */ diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-sidebar-content-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-sidebar-content-props.ts new file mode 100644 index 000000000..606072dc7 --- /dev/null +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-sidebar-content-props.ts @@ -0,0 +1,3 @@ +import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; + +export type JsxTsdSidebarContentProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/module-menu-component-scope.ts b/packages/typedoc-theme-client/scripts/types/module-menu-component-scope.ts new file mode 100644 index 000000000..4e7048b76 --- /dev/null +++ b/packages/typedoc-theme-client/scripts/types/module-menu-component-scope.ts @@ -0,0 +1,9 @@ +import type { ScopeBase } from "@ribajs/core"; +import type { Module, Dataset } from "./index.js"; +import type { ModuleMenuComponent } from "../components/module-menu/module-menu.component.js"; + +export interface ModuleMenuScope extends ScopeBase<{ dataset: Dataset }> { + modules?: Module[]; + selectedModule: string; + onModuleSelect: ModuleMenuComponent["onModuleSelect"]; +} diff --git a/packages/typedoc-theme-client/scripts/types/navigation-primary.ts b/packages/typedoc-theme-client/scripts/types/module-menu.ts similarity index 80% rename from packages/typedoc-theme-client/scripts/types/navigation-primary.ts rename to packages/typedoc-theme-client/scripts/types/module-menu.ts index 4ad0009bd..a378805bf 100644 --- a/packages/typedoc-theme-client/scripts/types/navigation-primary.ts +++ b/packages/typedoc-theme-client/scripts/types/module-menu.ts @@ -1,6 +1,6 @@ import type { Navigation } from "./navigation.js"; -export interface NavigationPrimary { +export interface ModuleMenu { name: string; href?: string; classNames: string; diff --git a/packages/typedoc-theme-client/scripts/types/navigation-primary-component-scope.ts b/packages/typedoc-theme-client/scripts/types/navigation-primary-component-scope.ts deleted file mode 100644 index 41c9e245c..000000000 --- a/packages/typedoc-theme-client/scripts/types/navigation-primary-component-scope.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { ScopeBase } from "@ribajs/core"; -import type { Module, Dataset } from "./index.js"; -import type { NavigationPrimaryComponent } from "../components/navigation-primary/navigation-primary.component.js"; - -export interface NavigationPrimaryComponentScope - extends ScopeBase<{ dataset: Dataset }> { - modules?: Module[]; - selectedModule: string; - onModuleSelect: NavigationPrimaryComponent["onModuleSelect"]; -} diff --git a/packages/typedoc-theme-client/scripts/types/navigation-secondary-component-scope.ts b/packages/typedoc-theme-client/scripts/types/sidebar-content-component-scope.ts similarity index 75% rename from packages/typedoc-theme-client/scripts/types/navigation-secondary-component-scope.ts rename to packages/typedoc-theme-client/scripts/types/sidebar-content-component-scope.ts index f00060ed6..6361be9d0 100644 --- a/packages/typedoc-theme-client/scripts/types/navigation-secondary-component-scope.ts +++ b/packages/typedoc-theme-client/scripts/types/sidebar-content-component-scope.ts @@ -1,7 +1,7 @@ import type { ScopeBase } from "@ribajs/core"; import type { Dataset } from "./index.js"; -export interface NavigationSecondaryComponentScope +export interface SidebarContentComponentScope extends ScopeBase<{ dataset: Dataset }> { template?: string; } diff --git a/packages/typedoc-theme-client/scripts/types/navigation-secondary.ts b/packages/typedoc-theme-client/scripts/types/sidebar-content.ts similarity index 78% rename from packages/typedoc-theme-client/scripts/types/navigation-secondary.ts rename to packages/typedoc-theme-client/scripts/types/sidebar-content.ts index 4f34cb5e4..2a033fe71 100644 --- a/packages/typedoc-theme-client/scripts/types/navigation-secondary.ts +++ b/packages/typedoc-theme-client/scripts/types/sidebar-content.ts @@ -1,6 +1,6 @@ import type { Navigation } from "./navigation.js"; -export interface NavigationSecondary { +export interface SidebarContent { name?: string; href?: string; classNames?: string; diff --git a/packages/typedoc-theme-client/styles/_layout.scss b/packages/typedoc-theme-client/styles/_layout.scss index 1226ec228..fc5db863b 100644 --- a/packages/typedoc-theme-client/styles/_layout.scss +++ b/packages/typedoc-theme-client/styles/_layout.scss @@ -1,3 +1,3 @@ -body { - padding-top: $default-navbar-height; -} \ No newline at end of file +// body { +// padding-top: $default-navbar-height; +// } \ No newline at end of file diff --git a/packages/typedoc-theme-client/styles/components/bs5-sidebar.scss b/packages/typedoc-theme-client/styles/components/bs5-sidebar.scss index f206f760e..5196d820c 100644 --- a/packages/typedoc-theme-client/styles/components/bs5-sidebar.scss +++ b/packages/typedoc-theme-client/styles/components/bs5-sidebar.scss @@ -2,7 +2,7 @@ bs5-sidebar { margin-top: $default-navbar-height; max-height: calc(100vh - $default-navbar-height); overflow: auto; - tsd-navigation-primary { + tsd-module-menu { .dropdown { .dropdown-toggle, .dropdown-menu { width: 100%; diff --git a/packages/typedoc-theme-client/styles/original.scss b/packages/typedoc-theme-client/styles/original.scss index 10b5d5f07..4442314de 100644 --- a/packages/typedoc-theme-client/styles/original.scss +++ b/packages/typedoc-theme-client/styles/original.scss @@ -2,571 +2,596 @@ :root { /* Light */ - --light-color-background: #f2f4f8; - --light-color-background-secondary: #eff0f1; - --light-color-warning-text: #222; - --light-color-background-warning: #e6e600; - --light-color-icon-background: var(--light-color-background); - --light-color-accent: #c5c7c9; - --light-color-active-menu-item: var(--light-color-accent); - --light-color-text: #222; - --light-color-text-aside: #6e6e6e; - --light-color-link: #1f70c2; - - --light-color-ts-project: #b111c9; - --light-color-ts-module: var(--light-color-ts-project); - --light-color-ts-namespace: var(--light-color-ts-project); - --light-color-ts-enum: #7e6f15; - --light-color-ts-enum-member: var(--light-color-ts-enum); - --light-color-ts-variable: #4760ec; - --light-color-ts-function: #572be7; - --light-color-ts-class: #1f70c2; - --light-color-ts-interface: #108024; - --light-color-ts-constructor: var(--light-color-ts-class); - --light-color-ts-property: var(--light-color-ts-variable); - --light-color-ts-method: var(--light-color-ts-function); - --light-color-ts-call-signature: var(--light-color-ts-method); - --light-color-ts-index-signature: var(--light-color-ts-property); - --light-color-ts-constructor-signature: var(--light-color-ts-constructor); - --light-color-ts-parameter: var(--light-color-ts-variable); + --light-color-background:#f2f4f8; + --light-color-background-secondary:#eff0f1; + --light-color-warning-text:#222; + --light-color-background-warning:#e6e600; + --light-color-icon-background:var(--light-color-background); + --light-color-accent:#c5c7c9; + --light-color-active-menu-item:var(--light-color-accent); + --light-color-text:#222; + --light-color-text-aside:#6e6e6e; + --light-color-link:#1f70c2; + --light-color-ts-project:#b111c9; + --light-color-ts-module:var(--light-color-ts-project); + --light-color-ts-namespace:var(--light-color-ts-project); + --light-color-ts-enum:#7e6f15; + --light-color-ts-enum-member:var(--light-color-ts-enum); + --light-color-ts-variable:#4760ec; + --light-color-ts-function:#572be7; + --light-color-ts-class:#1f70c2; + --light-color-ts-interface:#108024; + --light-color-ts-constructor:var(--light-color-ts-class); + --light-color-ts-property:var(--light-color-ts-variable); + --light-color-ts-method:var(--light-color-ts-function); + --light-color-ts-call-signature:var(--light-color-ts-method); + --light-color-ts-index-signature:var(--light-color-ts-property); + --light-color-ts-constructor-signature:var(--light-color-ts-constructor); + --light-color-ts-parameter:var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ - --light-color-ts-type-parameter: var(--light-color-ts-type-alias); - --light-color-ts-accessor: var(--light-color-ts-property); - --light-color-ts-get-signature: var(--light-color-ts-accessor); - --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-parameter:var(--light-color-ts-type-alias); + --light-color-ts-accessor:var(--light-color-ts-property); + --light-color-ts-get-signature:var(--light-color-ts-accessor); + --light-color-ts-set-signature:var(--light-color-ts-accessor); + /* object literal not included as it is not used and will be removed in 0.25 */ - --light-color-ts-type-alias: #d51270; + --light-color-ts-type-alias:#d51270; + /* reference not included as links will be colored with the kind that it points to */ - - --light-external-icon: url("data:image/svg+xml;utf8,"); - --light-color-scheme: light; - + + --light-external-icon:url("data:image/svg+xml;utf8,"); + --light-color-scheme:light; + /* Dark */ - --dark-color-background: #2b2e33; - --dark-color-background-secondary: #1e2024; - --dark-color-background-warning: #bebe00; - --dark-color-warning-text: #222; - --dark-color-icon-background: var(--dark-color-background-secondary); - --dark-color-accent: #9096a2; - --dark-color-active-menu-item: #5d5d6a; - --dark-color-text: #f5f5f5; - --dark-color-text-aside: #dddddd; - --dark-color-link: #00aff4; - - --dark-color-ts-project: #e358ff; - --dark-color-ts-module: var(--dark-color-ts-project); - --dark-color-ts-namespace: var(--dark-color-ts-project); - --dark-color-ts-enum: #f4d93e; - --dark-color-ts-enum-member: var(--dark-color-ts-enum); - --dark-color-ts-variable: #798dff; - --dark-color-ts-function: #a280ff; - --dark-color-ts-class: #8ac4ff; - --dark-color-ts-interface: #6cff87; - --dark-color-ts-constructor: var(--dark-color-ts-class); - --dark-color-ts-property: var(--dark-color-ts-variable); - --dark-color-ts-method: var(--dark-color-ts-function); - --dark-color-ts-call-signature: var(--dark-color-ts-method); - --dark-color-ts-index-signature: var(--dark-color-ts-property); - --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); - --dark-color-ts-parameter: var(--dark-color-ts-variable); + --dark-color-background:#2b2e33; + --dark-color-background-secondary:#1e2024; + --dark-color-background-warning:#bebe00; + --dark-color-warning-text:#222; + --dark-color-icon-background:var(--dark-color-background-secondary); + --dark-color-accent:#9096a2; + --dark-color-active-menu-item:#5d5d6a; + --dark-color-text:#f5f5f5; + --dark-color-text-aside:#dddddd; + --dark-color-link:#00aff4; + --dark-color-ts-project:#e358ff; + --dark-color-ts-module:var(--dark-color-ts-project); + --dark-color-ts-namespace:var(--dark-color-ts-project); + --dark-color-ts-enum:#f4d93e; + --dark-color-ts-enum-member:var(--dark-color-ts-enum); + --dark-color-ts-variable:#798dff; + --dark-color-ts-function:#a280ff; + --dark-color-ts-class:#8ac4ff; + --dark-color-ts-interface:#6cff87; + --dark-color-ts-constructor:var(--dark-color-ts-class); + --dark-color-ts-property:var(--dark-color-ts-variable); + --dark-color-ts-method:var(--dark-color-ts-function); + --dark-color-ts-call-signature:var(--dark-color-ts-method); + --dark-color-ts-index-signature:var(--dark-color-ts-property); + --dark-color-ts-constructor-signature:var(--dark-color-ts-constructor); + --dark-color-ts-parameter:var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ - --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); - --dark-color-ts-accessor: var(--dark-color-ts-property); - --dark-color-ts-get-signature: var(--dark-color-ts-accessor); - --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-parameter:var(--dark-color-ts-type-alias); + --dark-color-ts-accessor:var(--dark-color-ts-property); + --dark-color-ts-get-signature:var(--dark-color-ts-accessor); + --dark-color-ts-set-signature:var(--dark-color-ts-accessor); + /* object literal not included as it is not used and will be removed in 0.25 */ - --dark-color-ts-type-alias: #ff6492; + --dark-color-ts-type-alias:#ff6492; + /* reference not included as links will be colored with the kind that it points to */ - - --dark-external-icon: url("data:image/svg+xml;utf8,"); - --dark-color-scheme: dark; -} - -@media (prefers-color-scheme: light) { + + --dark-external-icon:url("data:image/svg+xml;utf8,"); + --dark-color-scheme:dark; + } + + @media (prefers-color-scheme: light) { :root { - --color-background: var(--light-color-background); - --color-background-secondary: var(--light-color-background-secondary); - --color-background-warning: var(--light-color-background-warning); - --color-warning-text: var(--light-color-warning-text); - --color-icon-background: var(--light-color-icon-background); - --color-accent: var(--light-color-accent); - --color-active-menu-item: var(--light-color-active-menu-item); - --color-text: var(--light-color-text); - --color-text-aside: var(--light-color-text-aside); - --color-link: var(--light-color-link); - - --color-ts-module: var(--light-color-ts-module); - --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-enum-member: var(--light-color-ts-enum-member); - --color-ts-variable: var(--light-color-ts-variable); - --color-ts-function: var(--light-color-ts-function); - --color-ts-class: var(--light-color-ts-class); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-constructor: var(--light-color-ts-constructor); - --color-ts-property: var(--light-color-ts-property); - --color-ts-method: var(--light-color-ts-method); - --color-ts-call-signature: var(--light-color-ts-call-signature); - --color-ts-index-signature: var(--light-color-ts-index-signature); - --color-ts-constructor-signature: var( - --light-color-ts-constructor-signature - ); - --color-ts-parameter: var(--light-color-ts-parameter); - --color-ts-type-parameter: var(--light-color-ts-type-parameter); - --color-ts-accessor: var(--light-color-ts-accessor); - --color-ts-get-signature: var(--light-color-ts-get-signature); - --color-ts-set-signature: var(--light-color-ts-set-signature); - --color-ts-type-alias: var(--light-color-ts-type-alias); - - --external-icon: var(--light-external-icon); - --color-scheme: var(--light-color-scheme); + --color-background:var(--light-color-background); + --color-background-secondary:var(--light-color-background-secondary); + --color-background-warning:var(--light-color-background-warning); + --color-warning-text:var(--light-color-warning-text); + --color-icon-background:var(--light-color-icon-background); + --color-accent:var(--light-color-accent); + --color-active-menu-item:var(--light-color-active-menu-item); + --color-text:var(--light-color-text); + --color-text-aside:var(--light-color-text-aside); + --color-link:var(--light-color-link); + --color-ts-module:var(--light-color-ts-module); + --color-ts-namespace:var(--light-color-ts-namespace); + --color-ts-enum:var(--light-color-ts-enum); + --color-ts-enum-member:var(--light-color-ts-enum-member); + --color-ts-variable:var(--light-color-ts-variable); + --color-ts-function:var(--light-color-ts-function); + --color-ts-class:var(--light-color-ts-class); + --color-ts-interface:var(--light-color-ts-interface); + --color-ts-constructor:var(--light-color-ts-constructor); + --color-ts-property:var(--light-color-ts-property); + --color-ts-method:var(--light-color-ts-method); + --color-ts-call-signature:var(--light-color-ts-call-signature); + --color-ts-index-signature:var(--light-color-ts-index-signature); + --color-ts-constructor-signature:var(--light-color-ts-constructor-signature); + --color-ts-parameter:var(--light-color-ts-parameter); + --color-ts-type-parameter:var(--light-color-ts-type-parameter); + --color-ts-accessor:var(--light-color-ts-accessor); + --color-ts-get-signature:var(--light-color-ts-get-signature); + --color-ts-set-signature:var(--light-color-ts-set-signature); + --color-ts-type-alias:var(--light-color-ts-type-alias); + --external-icon:var(--light-external-icon); + --color-scheme:var(--light-color-scheme); } -} - -@media (prefers-color-scheme: dark) { + } + + @media (prefers-color-scheme: dark) { :root { - --color-background: var(--dark-color-background); - --color-background-secondary: var(--dark-color-background-secondary); - --color-background-warning: var(--dark-color-background-warning); - --color-warning-text: var(--dark-color-warning-text); - --color-icon-background: var(--dark-color-icon-background); - --color-accent: var(--dark-color-accent); - --color-active-menu-item: var(--dark-color-active-menu-item); - --color-text: var(--dark-color-text); - --color-text-aside: var(--dark-color-text-aside); - --color-link: var(--dark-color-link); - - --color-ts-module: var(--dark-color-ts-module); - --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-enum-member: var(--dark-color-ts-enum-member); - --color-ts-variable: var(--dark-color-ts-variable); - --color-ts-function: var(--dark-color-ts-function); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-constructor: var(--dark-color-ts-constructor); - --color-ts-property: var(--dark-color-ts-property); - --color-ts-method: var(--dark-color-ts-method); - --color-ts-call-signature: var(--dark-color-ts-call-signature); - --color-ts-index-signature: var(--dark-color-ts-index-signature); - --color-ts-constructor-signature: var( - --dark-color-ts-constructor-signature - ); - --color-ts-parameter: var(--dark-color-ts-parameter); - --color-ts-type-parameter: var(--dark-color-ts-type-parameter); - --color-ts-accessor: var(--dark-color-ts-accessor); - --color-ts-get-signature: var(--dark-color-ts-get-signature); - --color-ts-set-signature: var(--dark-color-ts-set-signature); - --color-ts-type-alias: var(--dark-color-ts-type-alias); - - --external-icon: var(--dark-external-icon); - --color-scheme: var(--dark-color-scheme); + --color-background:var(--dark-color-background); + --color-background-secondary:var(--dark-color-background-secondary); + --color-background-warning:var(--dark-color-background-warning); + --color-warning-text:var(--dark-color-warning-text); + --color-icon-background:var(--dark-color-icon-background); + --color-accent:var(--dark-color-accent); + --color-active-menu-item:var(--dark-color-active-menu-item); + --color-text:var(--dark-color-text); + --color-text-aside:var(--dark-color-text-aside); + --color-link:var(--dark-color-link); + --color-ts-module:var(--dark-color-ts-module); + --color-ts-namespace:var(--dark-color-ts-namespace); + --color-ts-enum:var(--dark-color-ts-enum); + --color-ts-enum-member:var(--dark-color-ts-enum-member); + --color-ts-variable:var(--dark-color-ts-variable); + --color-ts-function:var(--dark-color-ts-function); + --color-ts-class:var(--dark-color-ts-class); + --color-ts-interface:var(--dark-color-ts-interface); + --color-ts-constructor:var(--dark-color-ts-constructor); + --color-ts-property:var(--dark-color-ts-property); + --color-ts-method:var(--dark-color-ts-method); + --color-ts-call-signature:var(--dark-color-ts-call-signature); + --color-ts-index-signature:var(--dark-color-ts-index-signature); + --color-ts-constructor-signature:var(--dark-color-ts-constructor-signature); + --color-ts-parameter:var(--dark-color-ts-parameter); + --color-ts-type-parameter:var(--dark-color-ts-type-parameter); + --color-ts-accessor:var(--dark-color-ts-accessor); + --color-ts-get-signature:var(--dark-color-ts-get-signature); + --color-ts-set-signature:var(--dark-color-ts-set-signature); + --color-ts-type-alias:var(--dark-color-ts-type-alias); + --external-icon:var(--dark-external-icon); + --color-scheme:var(--dark-color-scheme); } -} - -html { + } + + html { color-scheme: var(--color-scheme); -} - -body { + } + + body { margin: 0; -} - -:root[data-theme="light"], :root[data-bs-theme="light"] { - --color-background: var(--light-color-background); - --color-background-secondary: var(--light-color-background-secondary); - --color-background-warning: var(--light-color-background-warning); - --color-warning-text: var(--light-color-warning-text); - --color-icon-background: var(--light-color-icon-background); - --color-accent: var(--light-color-accent); - --color-active-menu-item: var(--light-color-active-menu-item); - --color-text: var(--light-color-text); - --color-text-aside: var(--light-color-text-aside); - --color-link: var(--light-color-link); - - --color-ts-module: var(--light-color-ts-module); - --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-enum-member: var(--light-color-ts-enum-member); - --color-ts-variable: var(--light-color-ts-variable); - --color-ts-function: var(--light-color-ts-function); - --color-ts-class: var(--light-color-ts-class); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-constructor: var(--light-color-ts-constructor); - --color-ts-property: var(--light-color-ts-property); - --color-ts-method: var(--light-color-ts-method); - --color-ts-call-signature: var(--light-color-ts-call-signature); - --color-ts-index-signature: var(--light-color-ts-index-signature); - --color-ts-constructor-signature: var( - --light-color-ts-constructor-signature - ); - --color-ts-parameter: var(--light-color-ts-parameter); - --color-ts-type-parameter: var(--light-color-ts-type-parameter); - --color-ts-accessor: var(--light-color-ts-accessor); - --color-ts-get-signature: var(--light-color-ts-get-signature); - --color-ts-set-signature: var(--light-color-ts-set-signature); - --color-ts-type-alias: var(--light-color-ts-type-alias); - - --external-icon: var(--light-external-icon); - --color-scheme: var(--light-color-scheme); -} - -:root[data-theme="dark"], :root[data-bs-theme="dark"] { - --color-background: var(--dark-color-background); - --color-background-secondary: var(--dark-color-background-secondary); - --color-background-warning: var(--dark-color-background-warning); - --color-warning-text: var(--dark-color-warning-text); - --color-icon-background: var(--dark-color-icon-background); - --color-accent: var(--dark-color-accent); - --color-active-menu-item: var(--dark-color-active-menu-item); - --color-text: var(--dark-color-text); - --color-text-aside: var(--dark-color-text-aside); - --color-link: var(--dark-color-link); - - --color-ts-module: var(--dark-color-ts-module); - --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-enum-member: var(--dark-color-ts-enum-member); - --color-ts-variable: var(--dark-color-ts-variable); - --color-ts-function: var(--dark-color-ts-function); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-constructor: var(--dark-color-ts-constructor); - --color-ts-property: var(--dark-color-ts-property); - --color-ts-method: var(--dark-color-ts-method); - --color-ts-call-signature: var(--dark-color-ts-call-signature); - --color-ts-index-signature: var(--dark-color-ts-index-signature); - --color-ts-constructor-signature: var( - --dark-color-ts-constructor-signature - ); - --color-ts-parameter: var(--dark-color-ts-parameter); - --color-ts-type-parameter: var(--dark-color-ts-type-parameter); - --color-ts-accessor: var(--dark-color-ts-accessor); - --color-ts-get-signature: var(--dark-color-ts-get-signature); - --color-ts-set-signature: var(--dark-color-ts-set-signature); - --color-ts-type-alias: var(--dark-color-ts-type-alias); - - --external-icon: var(--dark-external-icon); - --color-scheme: var(--dark-color-scheme); -} - -.always-visible, -.always-visible .tsd-signatures { + } + + :root { + &[data-theme="light"], &[data-bs-theme="light"] { + --color-background:var(--light-color-background); + --color-background-secondary:var(--light-color-background-secondary); + --color-background-warning:var(--light-color-background-warning); + --color-warning-text:var(--light-color-warning-text); + --color-icon-background:var(--light-color-icon-background); + --color-accent:var(--light-color-accent); + --color-active-menu-item:var(--light-color-active-menu-item); + --color-text:var(--light-color-text); + --color-text-aside:var(--light-color-text-aside); + --color-link:var(--light-color-link); + --color-ts-module:var(--light-color-ts-module); + --color-ts-namespace:var(--light-color-ts-namespace); + --color-ts-enum:var(--light-color-ts-enum); + --color-ts-enum-member:var(--light-color-ts-enum-member); + --color-ts-variable:var(--light-color-ts-variable); + --color-ts-function:var(--light-color-ts-function); + --color-ts-class:var(--light-color-ts-class); + --color-ts-interface:var(--light-color-ts-interface); + --color-ts-constructor:var(--light-color-ts-constructor); + --color-ts-property:var(--light-color-ts-property); + --color-ts-method:var(--light-color-ts-method); + --color-ts-call-signature:var(--light-color-ts-call-signature); + --color-ts-index-signature:var(--light-color-ts-index-signature); + --color-ts-constructor-signature:var(--light-color-ts-constructor-signature); + --color-ts-parameter:var(--light-color-ts-parameter); + --color-ts-type-parameter:var(--light-color-ts-type-parameter); + --color-ts-accessor:var(--light-color-ts-accessor); + --color-ts-get-signature:var(--light-color-ts-get-signature); + --color-ts-set-signature:var(--light-color-ts-set-signature); + --color-ts-type-alias:var(--light-color-ts-type-alias); + --external-icon:var(--light-external-icon); + --color-scheme:var(--light-color-scheme); + } + + &[data-theme="dark"], &[data-bs-theme="dark"] { + --color-background:var(--dark-color-background); + --color-background-secondary:var(--dark-color-background-secondary); + --color-background-warning:var(--dark-color-background-warning); + --color-warning-text:var(--dark-color-warning-text); + --color-icon-background:var(--dark-color-icon-background); + --color-accent:var(--dark-color-accent); + --color-active-menu-item:var(--dark-color-active-menu-item); + --color-text:var(--dark-color-text); + --color-text-aside:var(--dark-color-text-aside); + --color-link:var(--dark-color-link); + --color-ts-module:var(--dark-color-ts-module); + --color-ts-namespace:var(--dark-color-ts-namespace); + --color-ts-enum:var(--dark-color-ts-enum); + --color-ts-enum-member:var(--dark-color-ts-enum-member); + --color-ts-variable:var(--dark-color-ts-variable); + --color-ts-function:var(--dark-color-ts-function); + --color-ts-class:var(--dark-color-ts-class); + --color-ts-interface:var(--dark-color-ts-interface); + --color-ts-constructor:var(--dark-color-ts-constructor); + --color-ts-property:var(--dark-color-ts-property); + --color-ts-method:var(--dark-color-ts-method); + --color-ts-call-signature:var(--dark-color-ts-call-signature); + --color-ts-index-signature:var(--dark-color-ts-index-signature); + --color-ts-constructor-signature:var(--dark-color-ts-constructor-signature); + --color-ts-parameter:var(--dark-color-ts-parameter); + --color-ts-type-parameter:var(--dark-color-ts-type-parameter); + --color-ts-accessor:var(--dark-color-ts-accessor); + --color-ts-get-signature:var(--dark-color-ts-get-signature); + --color-ts-set-signature:var(--dark-color-ts-set-signature); + --color-ts-type-alias:var(--dark-color-ts-type-alias); + --external-icon:var(--dark-external-icon); + --color-scheme:var(--dark-color-scheme); + } + } + + .always-visible { display: inherit !important; -} - -h1, -h2, -h3, -h4, -h5, -h6 { + + .tsd-signatures { + display: inherit !important; + } + } + + h1, h2, h3, h4, h5, h6 { line-height: 1.2; -} - -h1 > a, -h2 > a, -h3 > a, -h4 > a, -h5 > a, -h6 > a { + } + + h1 > a, h2 > a, h3 > a, h4 > a, h5 > a, h6 > a { text-decoration: none; color: var(--color-text); -} - -h1 { + } + + h1 { font-size: 1.875rem; margin: 0.67rem 0; -} - -h2 { + } + + h2 { font-size: 1.5rem; margin: 0.83rem 0; -} - -h3 { + } + + h3 { font-size: 1.25rem; margin: 1rem 0; -} - -h4 { + } + + h4 { font-size: 1.05rem; margin: 1.33rem 0; -} - -h5 { + } + + h5 { font-size: 1rem; margin: 1.5rem 0; -} - -h6 { + } + + h6 { font-size: 0.875rem; margin: 2.33rem 0; -} - -.uppercase { + } + + .uppercase { text-transform: uppercase; -} - -dl, -menu, -ol, -ul { + } + + dl, menu, ol, ul { margin: 1em 0; -} - -dd { + } + + dd { margin: 0 0 0 40px; -} - -.container { - max-width: 1700px; - padding: 0 2rem; -} - -/* Footer */ -.tsd-generator { + } + + /* Footer */ + + .tsd-generator { border-top: 1px solid var(--color-accent); padding-top: 1rem; padding-bottom: 1rem; max-height: 3.5rem; -} - -.tsd-generator > p { - margin-top: 0; - margin-bottom: 0; - padding: 0 1rem; -} - -.container-main { + + > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; + } + } + + .container-main { margin: 0 auto; + padding: 2rem; + /* toolbar, footer, margin */ - min-height: calc(100vh - 41px - 56px - 4rem); -} - -@keyframes fade-in { + min-height: calc(100vh - 55px - 56px - 4rem); + } + + @keyframes fade-in { from { - opacity: 0; + opacity: 0; } + to { - opacity: 1; + opacity: 1; } -} -@keyframes fade-out { + } + + @keyframes fade-out { from { - opacity: 1; - visibility: visible; + opacity: 1; + visibility: visible; } + to { - opacity: 0; + opacity: 0; } -} -@keyframes fade-in-delayed { + } + + @keyframes fade-in-delayed { 0% { - opacity: 0; + opacity: 0; } + 33% { - opacity: 0; + opacity: 0; } + 100% { - opacity: 1; + opacity: 1; } -} -@keyframes fade-out-delayed { + } + + @keyframes fade-out-delayed { 0% { - opacity: 1; - visibility: visible; + opacity: 1; + visibility: visible; } + 66% { - opacity: 0; + opacity: 0; } + 100% { - opacity: 0; + opacity: 0; } -} -@keyframes pop-in-from-right { + } + + @keyframes pop-in-from-right { from { - transform: translate(100%, 0); + transform: translate(100%, 0); } + to { - transform: translate(0, 0); + transform: translate(0, 0); } -} -@keyframes pop-out-to-right { + } + + @keyframes pop-out-to-right { from { - transform: translate(0, 0); - visibility: visible; + transform: translate(0, 0); + visibility: visible; } + to { - transform: translate(100%, 0); + transform: translate(100%, 0); } -} -body { + } + + body { background: var(--color-background); font-family: "Segoe UI", sans-serif; font-size: 16px; color: var(--color-text); -} - -a { + } + + a { color: var(--color-link); text-decoration: none; -} -a:hover { - text-decoration: underline; -} -a.external[target="_blank"] { - background-image: var(--external-icon); - background-position: top 3px right; - background-repeat: no-repeat; - padding-right: 13px; -} - -code, -pre { + + &:hover { + text-decoration: underline; + } + + &.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; + } + } + + code { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; + } + + pre { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 0.2em; margin: 0; font-size: 0.875rem; border-radius: 0.8em; -} - -pre { position: relative; white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 10px; border: 1px solid var(--color-accent); -} -pre code { - padding: 0; - font-size: 100%; -} -pre > button { - position: absolute; - top: 10px; - right: 10px; - opacity: 0; - transition: opacity 0.1s; - box-sizing: border-box; -} -pre:hover > button, -pre > button.visible { - opacity: 1; -} - -blockquote { + + code { + padding: 0; + font-size: 100%; + } + + > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; + } + + &:hover > button, > button.visible { + opacity: 1; + } + } + + blockquote { margin: 1em 0; padding-left: 1em; border-left: 4px solid gray; -} - -.tsd-typography { + } + + .tsd-typography { line-height: 1.333em; -} -.tsd-typography ul { - list-style: square; - padding: 0 0 0 20px; - margin: 0; -} -.tsd-typography h4, -.tsd-typography .tsd-index-panel h3, -.tsd-index-panel .tsd-typography h3, -.tsd-typography h5, -.tsd-typography h6 { + + ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; + } + + h4, .tsd-index-panel h3 { + font-size: 1em; + margin: 0; + } + } + + .tsd-index-panel .tsd-typography h3 { font-size: 1em; margin: 0; -} -.tsd-typography h5, -.tsd-typography h6 { - font-weight: normal; -} -.tsd-typography p, -.tsd-typography ul, -.tsd-typography ol { - margin: 1em 0; -} - -.tsd-breadcrumb { + } + + .tsd-typography { + h5, h6 { + font-size: 1em; + margin: 0; + } + + h5, h6 { + font-weight: normal; + } + + p, ul, ol { + margin: 1em 0; + } + } + + .tsd-breadcrumb { margin: 0; padding: 0; color: var(--color-text-aside); -} -.tsd-breadcrumb a { - color: var(--color-text-aside); - text-decoration: none; -} -.tsd-breadcrumb a:hover { - text-decoration: underline; -} -.tsd-breadcrumb li { - display: inline; -} -.tsd-breadcrumb li:after { - content: " / "; -} - -.tsd-comment-tags { + + a { + color: var(--color-text-aside); + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + li { + display: inline; + + &:after { + content: " / "; + } + } + } + + .tsd-comment-tags { display: flex; flex-direction: column; -} -dl.tsd-comment-tag-group { + } + + dl.tsd-comment-tag-group { display: flex; align-items: center; overflow: hidden; margin: 0.5em 0; -} -dl.tsd-comment-tag-group dt { - display: flex; - margin-right: 0.5em; - font-size: 0.875em; - font-weight: normal; -} -dl.tsd-comment-tag-group dd { - margin: 0; -} -code.tsd-tag { + + dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; + } + + dd { + margin: 0; + } + } + + code.tsd-tag { padding: 0.25em 0.4em; border: 0.1em solid var(--color-accent); margin-right: 0.25em; font-size: 70%; -} -h1 code.tsd-tag:first-of-type { + } + + h1 code.tsd-tag:first-of-type { margin-left: 0.25em; -} - -dl.tsd-comment-tag-group dd:before, -dl.tsd-comment-tag-group dd:after { - content: " "; -} -dl.tsd-comment-tag-group dd pre, -dl.tsd-comment-tag-group dd:after { - clear: both; -} -dl.tsd-comment-tag-group p { - margin: 0; -} - -.tsd-panel.tsd-comment .lead { + } + + dl.tsd-comment-tag-group { + dd { + &:before, &:after { + content: " "; + } + + pre, &:after { + clear: both; + } + } + + p { + margin: 0; + } + } + + .tsd-panel.tsd-comment .lead { font-size: 1.1em; line-height: 1.333em; margin-bottom: 2em; -} -.tsd-panel.tsd-comment .lead:last-child { - margin-bottom: 0; -} - -.tsd-filter-visibility h4 { + + &:last-child { + margin-bottom: 0; + } + } + + .tsd-filter-visibility h4 { font-size: 1rem; padding-top: 0.75rem; padding-bottom: 0.5rem; margin: 0; -} -.tsd-filter-item:not(:last-child) { + } + + .tsd-filter-item:not(:last-child) { margin-bottom: 0.5rem; -} -.tsd-filter-input { + } + + .tsd-filter-input { display: flex; width: fit-content; width: -moz-fit-content; @@ -576,69 +601,86 @@ dl.tsd-comment-tag-group p { -moz-user-select: none; -ms-user-select: none; cursor: pointer; -} -.tsd-filter-input input[type="checkbox"] { - cursor: pointer; - position: absolute; - width: 1.5em; - height: 1.5em; - opacity: 0; -} -.tsd-filter-input input[type="checkbox"]:disabled { - pointer-events: none; -} -.tsd-filter-input svg { - cursor: pointer; - width: 1.5em; - height: 1.5em; - margin-right: 0.5em; - border-radius: 0.33em; - /* Leaving this at full opacity breaks event listeners on Firefox. - Don't remove unless you know what you're doing. */ - opacity: 0.99; -} -.tsd-filter-input input[type="checkbox"]:focus + svg { - transform: scale(0.95); -} -.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { - transform: scale(1); -} -.tsd-checkbox-background { + + input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; + + &:disabled { + pointer-events: none; + } + } + + svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; + } + + input[type="checkbox"]:focus { + + svg { + transform: scale(0.95); + } + + &:not(:focus-visible) + svg { + transform: scale(1); + } + } + } + + .tsd-checkbox-background { fill: var(--color-accent); -} -input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + } + + input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { stroke: var(--color-text); -} -.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { - fill: var(--color-background); - stroke: var(--color-accent); - stroke-width: 0.25rem; -} -.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { - stroke: var(--color-accent); -} - -.tsd-theme-toggle { + } + + .tsd-filter-input input:disabled ~ svg > { + .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; + } + + .tsd-checkbox-checkmark { + stroke: var(--color-accent); + } + } + + .tsd-theme-toggle { padding-top: 0.75rem; -} -.tsd-theme-toggle > h4 { - display: inline; - vertical-align: middle; - margin-right: 0.75rem; -} - -.tsd-hierarchy { + + > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; + } + } + + .tsd-hierarchy { list-style: square; margin: 0; -} -.tsd-hierarchy .target { - font-weight: bold; -} - -.tsd-panel-group.tsd-index-group { + + .target { + font-weight: bold; + } + } + + .tsd-panel-group.tsd-index-group { margin-bottom: 0; -} -.tsd-index-panel .tsd-index-list { + } + + .tsd-index-panel .tsd-index-list { list-style: none; line-height: 1.333em; margin: 0; @@ -648,26 +690,29 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { grid-template-columns: repeat(3, 1fr); column-gap: 1rem; grid-template-rows: auto; -} -@media (max-width: 1024px) { + + li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; + } + } + + @media (max-width: 1024px) { .tsd-index-panel .tsd-index-list { - grid-template-columns: repeat(2, 1fr); + grid-template-columns: repeat(2, 1fr); } -} -@media (max-width: 768px) { + } + + @media (max-width: 768px) { .tsd-index-panel .tsd-index-list { - grid-template-columns: repeat(1, 1fr); - } -} -.tsd-index-panel .tsd-index-list li { - -webkit-page-break-inside: avoid; - -moz-page-break-inside: avoid; - -ms-page-break-inside: avoid; - -o-page-break-inside: avoid; - page-break-inside: avoid; -} - -.tsd-flag { + grid-template-columns: repeat(1, 1fr); + } + } + + .tsd-flag { display: inline-block; padding: 0.25em 0.4em; border-radius: 4px; @@ -677,277 +722,238 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { font-size: 75%; line-height: 1; font-weight: normal; -} - -.tsd-anchor { + } + + .tsd-anchor { position: relative; top: -100px; -} - -.tsd-member { + } + + .tsd-member { position: relative; -} -.tsd-member .tsd-anchor + h3 { - display: flex; - align-items: center; - margin-top: 0; - margin-bottom: 0; - border-bottom: none; -} - -.tsd-navigation.settings { - margin: 1rem 0; -} -.tsd-navigation > a, -.tsd-navigation .tsd-accordion-summary { - width: calc(100% - 0.5rem); -} -.tsd-navigation a, -.tsd-navigation summary > span, -.tsd-page-navigation a { + + .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; + } + } + + .tsd-navigation { + &.settings { + margin: 1rem 0; + } + + > a, .tsd-accordion-summary { + width: calc(100% - 0.5rem); + } + + a, summary > span { + display: inline-flex; + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; + } + } + + .tsd-page-navigation a { display: inline-flex; align-items: center; padding: 0.25rem; color: var(--color-text); text-decoration: none; box-sizing: border-box; -} -.tsd-navigation a.current, -.tsd-page-navigation a.current { + } + + .tsd-navigation a.current, .tsd-page-navigation a.current { background: var(--color-active-menu-item); -} -.tsd-navigation a:hover, -.tsd-page-navigation a:hover { + } + + .tsd-navigation a:hover, .tsd-page-navigation a:hover { text-decoration: underline; -} -.tsd-navigation ul, -.tsd-page-navigation ul { + } + + .tsd-navigation ul, .tsd-page-navigation ul { margin-top: 0; margin-bottom: 0; padding: 0; list-style: none; -} -.tsd-navigation li, -.tsd-page-navigation li { + } + + .tsd-navigation li, .tsd-page-navigation li { padding: 0; max-width: 100%; -} -.tsd-nested-navigation { + } + + .tsd-nested-navigation { margin-left: 3rem; -} -.tsd-nested-navigation > li > details { - margin-left: -1.5rem; -} -.tsd-small-nested-navigation { + + > li > details { + margin-left: -1.5rem; + } + } + + .tsd-small-nested-navigation { margin-left: 1.5rem; -} -.tsd-small-nested-navigation > li > details { - margin-left: -1.5rem; -} - -.tsd-nested-navigation > li > a, -.tsd-nested-navigation > li > span { - width: calc(100% - 1.75rem - 0.5rem); -} - -.tsd-page-navigation ul { + + > li > details { + margin-left: -1.5rem; + } + } + + .tsd-nested-navigation > li > { + a, span { + width: calc(100% - 1.75rem - 0.5rem); + } + } + + .tsd-page-navigation ul { padding-left: 1.75rem; -} - -#tsd-sidebar-links a { + } + + #tsd-sidebar-links a { margin-top: 0; margin-bottom: 0.5rem; line-height: 1.25rem; -} -#tsd-sidebar-links a:last-of-type { - margin-bottom: 0; -} - -a.tsd-index-link { + + &:last-of-type { + margin-bottom: 0; + } + } + + a.tsd-index-link { padding: 0.25rem 0 !important; font-size: 1rem; line-height: 1.25rem; display: inline-flex; align-items: center; color: var(--color-text); -} -.tsd-accordion-summary { - list-style-type: none; /* hide marker on non-safari */ - outline: none; /* broken on safari, so just hide it */ -} -.tsd-accordion-summary::-webkit-details-marker { - display: none; /* hide marker on safari */ -} -.tsd-accordion-summary, -.tsd-accordion-summary a { + } + + .tsd-accordion-summary { + list-style-type: none; + + /* hide marker on non-safari */ + outline: none; + + /* broken on safari, so just hide it */ + + &::-webkit-details-marker { + display: none; + + /* hide marker on safari */ + } + user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; - cursor: pointer; -} -.tsd-accordion-summary a { - width: calc(100% - 1.5rem); -} -.tsd-accordion-summary > * { - margin-top: 0; - margin-bottom: 0; - padding-top: 0; - padding-bottom: 0; -} -.tsd-index-accordion .tsd-accordion-summary > svg { - margin-left: 0.25rem; -} -.tsd-index-content > :not(:first-child) { + + a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + cursor: pointer; + width: calc(100% - 1.5rem); + } + + > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; + } + } + + .tsd-index-accordion { + .tsd-accordion-summary svg { + transform: rotate(-90deg); + margin-left: 0.25rem; + margin-left: 0.25rem; + } + &[open] { + > .tsd-accordion-summary { + > svg { + transform: rotate(0); + } + > h2, > h3, > h4, > h5, > h6 { + > svg { + transform: rotate(0); + } + } + } + } + } + + .tsd-index-content > :not(:first-child) { margin-top: 0.75rem; -} -.tsd-index-heading { + } + + .tsd-index-heading { margin-top: 1.5rem; margin-bottom: 0.75rem; -} - -.tsd-kind-icon { + } + + .tsd-kind-icon { margin-right: 0.5rem; width: 1.25rem; height: 1.25rem; min-width: 1.25rem; min-height: 1.25rem; -} -.tsd-kind-icon path { - transform-origin: center; - transform: scale(1.1); -} -.tsd-signature > .tsd-kind-icon { + + path { + transform-origin: center; + transform: scale(1.1); + } + } + + .tsd-signature > .tsd-kind-icon { margin-right: 0.8rem; -} - -.tsd-panel { + } + + .tsd-panel { margin-bottom: 2.5rem; -} -.tsd-panel.tsd-member { - margin-bottom: 4rem; -} -.tsd-panel:empty { - display: none; -} -.tsd-panel > h1, -.tsd-panel > h2, -.tsd-panel > h3 { - margin: 1.5rem -1.5rem 0.75rem -1.5rem; - padding: 0 1.5rem 0.75rem 1.5rem; -} -.tsd-panel > h1.tsd-before-signature, -.tsd-panel > h2.tsd-before-signature, -.tsd-panel > h3.tsd-before-signature { - margin-bottom: 0; - border-bottom: none; -} - -.tsd-panel-group { + + &.tsd-member { + margin-bottom: 4rem; + } + + &:empty { + display: none; + } + + > { + h1, h2, h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; + } + + h1.tsd-before-signature, h2.tsd-before-signature, h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; + } + } + } + + .tsd-panel-group { margin: 4rem 0; -} -.tsd-panel-group.tsd-index-group { - margin: 2rem 0; -} -.tsd-panel-group.tsd-index-group details { - margin: 2rem 0; -} - -// #tsd-search { -// transition: background-color 0.2s; -// } -// #tsd-search .title { -// position: relative; -// z-index: 2; -// } -// #tsd-search .field { -// position: absolute; -// left: 0; -// top: 0; -// right: 2.5rem; -// height: 100%; -// } -// #tsd-search .field input { -// box-sizing: border-box; -// position: relative; -// top: -50px; -// z-index: 1; -// width: 100%; -// padding: 0 10px; -// opacity: 0; -// outline: 0; -// border: 0; -// background: transparent; -// color: var(--color-text); -// } -// #tsd-search .field label { -// position: absolute; -// overflow: hidden; -// right: -40px; -// } -// #tsd-search .field input, -// #tsd-search .title, -// #tsd-toolbar-links a { -// transition: opacity 0.2s; -// } -// #tsd-search .results { -// position: absolute; -// visibility: hidden; -// top: 40px; -// width: 100%; -// margin: 0; -// padding: 0; -// list-style: none; -// box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); -// } -// #tsd-search .results li { -// padding: 0 10px; -// background-color: var(--color-background); -// } -// #tsd-search .results li:nth-child(even) { -// background-color: var(--color-background-secondary); -// } -// #tsd-search .results li.state { -// display: none; -// } -// #tsd-search .results li.current, -// #tsd-search .results li:hover { -// background-color: var(--color-accent); -// } -// #tsd-search .results a { -// display: block; -// } -// #tsd-search .results a:before { -// top: 10px; -// } -// #tsd-search .results span.parent { -// color: var(--color-text-aside); -// font-weight: normal; -// } -// #tsd-search.has-focus { -// background-color: var(--color-accent); -// } -// #tsd-search.has-focus .field input { -// top: 0; -// opacity: 1; -// } -// #tsd-search.has-focus .title, -// #tsd-search.has-focus #tsd-toolbar-links a { -// z-index: 0; -// opacity: 0; -// } -// #tsd-search.has-focus .results { -// visibility: visible; -// } -// #tsd-search.loading .results li.state.loading { -// display: block; -// } -// #tsd-search.failure .results li.state.failure { -// display: block; -// } - -#tsd-toolbar-links { + + &.tsd-index-group { + margin: 2rem 0; + + details { + margin: 2rem 0; + } + } + } + + #tsd-toolbar-links { position: absolute; top: 0; right: 2rem; @@ -955,78 +961,85 @@ a.tsd-index-link { display: flex; align-items: center; justify-content: flex-end; -} -#tsd-toolbar-links a { - margin-left: 1.5rem; -} -#tsd-toolbar-links a:hover { - text-decoration: underline; -} - -.tsd-signature { + + a { + margin-left: 1.5rem; + + &:hover { + text-decoration: underline; + } + } + } + + .tsd-signature { margin: 0 0 1rem 0; padding: 1rem 0.5rem; border: 1px solid var(--color-accent); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; overflow-x: auto; -} - -.tsd-signature-symbol { + } + + .tsd-signature-symbol { color: var(--color-text-aside); font-weight: normal; -} - -.tsd-signature-type { + } + + .tsd-signature-type { font-style: italic; font-weight: normal; -} - -.tsd-signatures { + } + + .tsd-signatures { padding: 0; - margin: 0 0 1em 0; + margin: 1em 0; list-style-type: none; -} -.tsd-signatures .tsd-signature { - margin: 0; - border-color: var(--color-accent); - border-width: 1px 0; - transition: background-color 0.1s; -} -.tsd-description .tsd-signatures .tsd-signature { - border-width: 1px; -} - -ul.tsd-parameter-list, -ul.tsd-type-parameter-list { - list-style: square; - margin: 0; - padding-left: 20px; -} -ul.tsd-parameter-list > li.tsd-parameter-signature, -ul.tsd-type-parameter-list > li.tsd-parameter-signature { - list-style: none; - margin-left: -20px; -} -ul.tsd-parameter-list h5, -ul.tsd-type-parameter-list h5 { - font-size: 16px; - margin: 1em 0 0.5em 0; -} -.tsd-sources { + } + + // .tsd-signatures .tsd-signature { + // margin: 0; + // border-color: var(--color-accent); + // border-width: 1px 0; + // transition: background-color 0.1s; + // } + // .tsd-description .tsd-signatures .tsd-signature { + // border-width: 1px; + // } + + ul { + &.tsd-parameter-list, &.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; + } + + &.tsd-parameter-list > li.tsd-parameter-signature, &.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; + } + + &.tsd-parameter-list h5, &.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; + } + } + + .tsd-sources { margin-top: 1rem; font-size: 0.875em; -} -.tsd-sources a { - color: var(--color-text-aside); - text-decoration: underline; -} -.tsd-sources ul { - list-style: none; - padding: 0; -} - -.tsd-page-toolbar { + + a { + color: var(--color-text-aside); + text-decoration: underline; + } + + ul { + list-style: none; + padding: 0; + } + } + + .tsd-page-toolbar { position: sticky; z-index: 1; top: 0; @@ -1036,38 +1049,45 @@ ul.tsd-type-parameter-list h5 { background: var(--color-background-secondary); border-bottom: 1px var(--color-accent) solid; transition: transform 0.3s ease-in-out; -} -.tsd-page-toolbar a { - color: var(--color-text); - text-decoration: none; -} -.tsd-page-toolbar a.title { - font-weight: bold; -} -.tsd-page-toolbar a.title:hover { - text-decoration: underline; -} -.tsd-page-toolbar .tsd-toolbar-contents { - display: flex; - justify-content: space-between; - height: 2.5rem; - margin: 0 auto; -} -.tsd-page-toolbar .table-cell { - position: relative; - white-space: nowrap; - line-height: 40px; -} -.tsd-page-toolbar .table-cell:first-child { - width: 100%; -} -.tsd-page-toolbar .tsd-toolbar-icon { - box-sizing: border-box; - line-height: 0; - padding: 12px 0; -} - -.tsd-widget { + + a { + color: var(--color-text); + text-decoration: none; + + &.title { + font-weight: bold; + + &:hover { + text-decoration: underline; + } + } + } + + .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; + } + + .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; + + &:first-child { + width: 100%; + } + } + + .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; + } + } + + .tsd-widget { display: inline-block; overflow: hidden; opacity: 0.8; @@ -1075,189 +1095,204 @@ ul.tsd-type-parameter-list h5 { transition: opacity 0.1s, background-color 0.2s; vertical-align: bottom; cursor: pointer; -} -.tsd-widget:hover { - opacity: 0.9; -} -.tsd-widget.active { - opacity: 1; - background-color: var(--color-accent); -} -.tsd-widget.no-caption { - width: 40px; -} -.tsd-widget.no-caption:before { - margin: 0; -} - -.tsd-widget.options, -.tsd-widget.menu { - display: none; -} -input[type="checkbox"] + .tsd-widget:before { - background-position: -120px 0; -} -input[type="checkbox"]:checked + .tsd-widget:before { - background-position: -160px 0; -} - -img { + + &:hover { + opacity: 0.9; + } + + &.active { + opacity: 1; + background-color: var(--color-accent); + } + + &.no-caption { + width: 40px; + + &:before { + margin: 0; + } + } + + &.options, &.menu { + display: none; + } + } + + input[type="checkbox"] { + + .tsd-widget:before { + background-position: -120px 0; + } + + &:checked + .tsd-widget:before { + background-position: -160px 0; + } + } + + img { max-width: 100%; -} - -.tsd-anchor-icon { + } + + .tsd-anchor-icon { display: inline-flex; align-items: center; margin-left: 0.5rem; vertical-align: middle; color: var(--color-text); -} - -.tsd-anchor-icon svg { - width: 1em; - height: 1em; - visibility: hidden; -} - -.tsd-anchor-link:hover > .tsd-anchor-icon svg { + + svg { + width: 1em; + height: 1em; + visibility: hidden; + } + } + + .tsd-anchor-link:hover > .tsd-anchor-icon svg { visibility: visible; -} - -.deprecated { + } + + .deprecated { text-decoration: line-through; -} - -.warning { + } + + .warning { padding: 1rem; color: var(--color-warning-text); background: var(--color-background-warning); -} - -.tsd-kind-project { + } + + .tsd-kind-project { color: var(--color-ts-project); -} -.tsd-kind-module { + } + + .tsd-kind-module { color: var(--color-ts-module); -} -.tsd-kind-namespace { + } + + .tsd-kind-namespace { color: var(--color-ts-namespace); -} -.tsd-kind-enum { + } + + .tsd-kind-enum { color: var(--color-ts-enum); -} -.tsd-kind-enum-member { + } + + .tsd-kind-enum-member { color: var(--color-ts-enum-member); -} -.tsd-kind-variable { + } + + .tsd-kind-variable { color: var(--color-ts-variable); -} -.tsd-kind-function { + } + + .tsd-kind-function { color: var(--color-ts-function); -} -.tsd-kind-class { + } + + .tsd-kind-class { color: var(--color-ts-class); -} -.tsd-kind-interface { + } + + .tsd-kind-interface { color: var(--color-ts-interface); -} -.tsd-kind-constructor { + } + + .tsd-kind-constructor { color: var(--color-ts-constructor); -} -.tsd-kind-property { + } + + .tsd-kind-property { color: var(--color-ts-property); -} -.tsd-kind-method { + } + + .tsd-kind-method { color: var(--color-ts-method); -} -.tsd-kind-call-signature { + } + + .tsd-kind-call-signature { color: var(--color-ts-call-signature); -} -.tsd-kind-index-signature { + } + + .tsd-kind-index-signature { color: var(--color-ts-index-signature); -} -.tsd-kind-constructor-signature { + } + + .tsd-kind-constructor-signature { color: var(--color-ts-constructor-signature); -} -.tsd-kind-parameter { + } + + .tsd-kind-parameter { color: var(--color-ts-parameter); -} -.tsd-kind-type-literal { + } + + .tsd-kind-type-literal { color: var(--color-ts-type-literal); -} -.tsd-kind-type-parameter { + } + + .tsd-kind-type-parameter { color: var(--color-ts-type-parameter); -} -.tsd-kind-accessor { + } + + .tsd-kind-accessor { color: var(--color-ts-accessor); -} -.tsd-kind-get-signature { + } + + .tsd-kind-get-signature { color: var(--color-ts-get-signature); -} -.tsd-kind-set-signature { + } + + .tsd-kind-set-signature { color: var(--color-ts-set-signature); -} -.tsd-kind-type-alias { + } + + .tsd-kind-type-alias { color: var(--color-ts-type-alias); -} - -/* if we have a kind icon, don't color the text by kind */ -.tsd-kind-icon ~ span { + } + + /* if we have a kind icon, don't color the text by kind */ + + .tsd-kind-icon ~ span { color: var(--color-text); -} - -* { + } + + * { scrollbar-width: thin; scrollbar-color: var(--color-accent) var(--color-icon-background); -} - -*::-webkit-scrollbar { - width: 0.75rem; -} - -*::-webkit-scrollbar-track { - background: var(--color-icon-background); -} - -*::-webkit-scrollbar-thumb { - background-color: var(--color-accent); - border-radius: 999rem; - border: 0.25rem solid var(--color-icon-background); -} - -/* mobile */ -@media (max-width: 769px) { - .tsd-widget.options, - .tsd-widget.menu { + + &::-webkit-scrollbar { + width: 0.75rem; + } + + &::-webkit-scrollbar-track { + background: var(--color-icon-background); + } + + &::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); + } + } + + /* mobile */ + @media (max-width: 769px) { + .tsd-widget { + &.options, &.menu { display: inline-block; + } } - + .container-main { - display: flex; + display: flex; } - html .col-content { + + html { + .col-content { float: none; max-width: 100%; width: 100%; - } - html .col-sidebar { - position: fixed !important; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 1024; - top: 0 !important; - bottom: 0 !important; - left: auto !important; - right: 0 !important; - padding: 1.5rem 1.5rem 0 0; - width: 75vw; - visibility: hidden; - background-color: var(--color-background); - transform: translate(100%, 0); - } - html .col-sidebar > *:last-child { - padding-bottom: 20px; - } - html .overlay { + } + + .overlay { content: ""; display: block; position: fixed; @@ -1268,102 +1303,25 @@ img { bottom: 0; background-color: rgba(0, 0, 0, 0.75); visibility: hidden; + } } - + .to-has-menu .overlay { - animation: fade-in 0.4s; - } - - .to-has-menu .col-sidebar { - animation: pop-in-from-right 0.4s; + animation: fade-in 0.4s; } - - .from-has-menu .overlay { - animation: fade-out 0.4s; - } - - .from-has-menu .col-sidebar { - animation: pop-out-to-right 0.4s; - } - - .has-menu body { + + .has-menu { + body { overflow: hidden; - } - .has-menu .overlay { - visibility: visible; - } - .has-menu .col-sidebar { + } + + .overlay { visibility: visible; - transform: translate(0, 0); - display: flex; - flex-direction: column; - gap: 1.5rem; - max-height: 100vh; - padding: 1rem 2rem; - } - .has-menu .tsd-navigation { + } + + .tsd-navigation { max-height: 100%; + } } -} - -/* one sidebar */ -@media (min-width: 770px) { - .container-main { - display: grid; - grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); - grid-template-areas: "sidebar content"; - margin: 2rem auto; - } - - .col-sidebar { - grid-area: sidebar; - } - .col-content { - grid-area: content; - padding: 0 1rem; - } -} -@media (min-width: 770px) and (max-width: 1399px) { - .col-sidebar { - max-height: calc(100vh - 2rem - 42px); - overflow: auto; - position: sticky; - top: 42px; - padding-top: 1rem; - } - .site-menu { - margin-top: 1rem; - } -} - -/* two sidebars */ -@media (min-width: 1200px) { - .container-main { - grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); - grid-template-areas: "sidebar content toc"; - } - - .col-sidebar { - display: contents; - } - - .page-menu { - grid-area: toc; - padding-left: 1rem; - } - .site-menu { - grid-area: sidebar; - } - - .site-menu { - margin-top: 1rem 0; - } - - .page-menu, - .site-menu { - max-height: calc(100vh - 2rem - 42px); - overflow: auto; - position: sticky; - top: 42px; - } -} + } + \ No newline at end of file diff --git a/packages/typedoc-theme/assets/main.bundle.js b/packages/typedoc-theme/assets/main.bundle.js index 097e4a220..9a0f1caf3 100644 --- a/packages/typedoc-theme/assets/main.bundle.js +++ b/packages/typedoc-theme/assets/main.bundle.js @@ -1,16 +1,16 @@ -var Nh=Object.defineProperty;var xh=(i,e,t)=>e in i?Nh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var o=(i,e,t)=>(xh(i,typeof e!="symbol"?e+"":e,t),t);const Eo=()=>{const i="0123456789ABCDEF";let e="#";for(let t=0;t<6;t++)e+=i[Math.floor(Math.random()*16)];return e},Ih=(i,...e)=>{const t=[];i.color?(i.namespace?t.push(`%c[${i.namespace}] ${i.mode.toUpperCase()}: `):t.push(`%c${i.mode.toUpperCase()}: `),t.push(`color: ${i.color}`)):i.namespace?t.push(`[${i.namespace}] ${i.mode.toUpperCase()}: `):t.push(`${i.mode.toUpperCase()}: `),t.push(...e),console[i.mode](...t)},Ai="base64:";const Oh=/^'.*'$|^".*"$/,Dh=(i,e)=>{for(let t=0;t{const i={},e=new Promise((t,s)=>{i.resolve=t,i.reject=s});return i.promise=e,i},Ph=(i,e=100)=>{let t;return(...s)=>{clearTimeout(t),t=setTimeout(()=>i(...s),e)}},Mh=(i,e=100)=>{let t,s;const n=new Promise((a,l)=>{t=a,s=l});let r;return(...a)=>(r||(r=Ph(()=>{try{t(i(...a)),r=void 0}catch(l){s(l)}},e)),r(...a),n)},$h=i=>{let e=null,t,s,n=new Promise((r,a)=>{t=r,s=a});return(...r)=>(e&&cancelAnimationFrame(e),e=window.requestAnimationFrame(()=>{try{t(i(...r))}catch(a){s(a)}e=null,n=new Promise((a,l)=>{t=a,s=l})}),n)},Et=(i,e)=>typeof e=="number"?Mh(i,e):$h(i),Oe=(i,e=100)=>{let t=null,s,n,r=new Promise((a,l)=>{s=a,n=l});return(...a)=>{if(t===null){t=window.setTimeout(()=>{t=null,r=new Promise((l,c)=>{s=l,n=c})},e);try{s(i(...a))}catch(l){n(l)}}return r}},Fi=(i,e=2,t=!0)=>{const s=JSON.stringify(i,null,e);return t&&s?s.replace(/'/g,"'"):s},Vi=i=>{let e=null;if(!i||!ir(i))return e;if(Aa(i))e=JSON.parse(i)||null;else try{e=JSON.parse(i.replace(/'/g,'"'))||null}catch(t){console.warn(`Can't parse json string of "${i}" `,t)}return e},ir=i=>!i||typeof i!="string"?!1:(i=i.trim(),i.charAt(0)==="{"&&i.charAt(i.length-1)==="}"||i.charAt(0)==="["&&i.charAt(i.length-1)==="]"),Rh=i=>!i||typeof i!="string"?!1:i.startsWith(Ai),Bh=i=>{let e;return j(i)?e=JSON.stringify(i,null,0):e=i.toString(),Ai+btoa(encodeURIComponent(e))},Hh=i=>{if(typeof i!="string")return"Not a base64 string!";i.startsWith(Ai)&&(i=i.substring(Ai.length));const e=atob(i);let t;try{t=decodeURIComponent(e)}catch{t=e}return Ut(t,!1).value},Aa=i=>{if(!i||!ir(i))return!1;try{const e=JSON.parse(i);return!!(Array.isArray(e)||typeof e=="object")}catch{return!1}},Ut=(i,e=!1)=>{let t=0,s=i;if(i===void 0)return{type:t,value:void 0};if(i===null)return{type:t,value:null};if(Oh.test(i))s=Ut(i.slice(1,-1),e).value;else if(i==="true")s=!0;else if(i==="false")s=!1;else if(i==="null")s=null;else if(i==="undefined")s=void 0;else if(i.startsWith("http://")||i.startsWith("https://"))s=i;else if(i==="")e?s=!0:s="";else if(!isNaN(Number(i)))s=Number(i),s>=Number.MAX_SAFE_INTEGER&&(s=i);else if(Rh(s))s=Hh(s);else if(ir(s)){const n=Vi(s);s=n||s}else t=1;return{type:t,value:s}},Ta=i=>typeof i>"u",ie=i=>!Ta(i),j=i=>ie(i)&&typeof i=="object"&&i!==null,Lt=i=>i!=null&&i.toString?i.toString():void 0,Fh=i=>i?parseFloat(i):void 0,xt=i=>!isNaN(parseFloat(i))&&!isNaN(i-0),ye=i=>typeof i=="boolean",ae=i=>typeof i=="string",ps=i=>{if(typeof i=="number")return i;const e=i.replace(/[^-\d.]/g,"");return xt(e)?Number(e):0},Vh=i=>i.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e]),Uh=i=>(i=i.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""),i),jh=i=>(i=i.replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").replace(/Ä/g,"Ae").replace(/Ö/g,"Oe").replace(/Ü/g,"Üe"),i),Wh=i=>(i=i.replace(/\s\s+/g," "),i),zh=i=>(i=i.trim(),i=i.toLowerCase(),i=Wh(i),i=Uh(i),i=jh(i),i=i.replace(/ /g,"-"),i),Ti=i=>{const e=document.createElement("DIV");return e.innerHTML=i,e.textContent||e.innerText||""},mt=i=>i.replace(/-([a-z0-9])/g,e=>e[1].toUpperCase()),qh=i=>i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),Yh=i=>typeof i!="string"?"":i.charAt(0).toUpperCase()+i.slice(1),ue=(i={},e={},...t)=>{const s=n=>{for(const r in n)Object.hasOwnProperty.bind(n)(r)&&(i.deep&&Object.prototype.toString.call(n[r])==="[object Object]"?e[r]=ue(i,e[r],n[r]):i.keepValues?typeof e[r]>"u"&&(e[r]=n[r]):i.onlyDefined?typeof n[r]<"u"&&(e[r]=n[r]):i.mergeArrays&&Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=[...e[r],...n[r]]:e[r]=n[r])};for(let n=0;nArray.isArray(e)?i?e.map(t=>Ca(!0,t)):e.slice():j(e)?ue({deep:i},{},e):e;const La=(i,e,t)=>{if(!e)throw new Error("Can't set attribute of "+e);const s=i.getAttribute(e);let n,r=!1;switch(typeof t){case"string":case"number":case"boolean":n=String(t);break;case"undefined":n=void 0;case"object":t===null?n=null:n=Fi(t,0);break;default:n=String(t);break}return n==null?(i.removeAttribute(e),r=!0):s!==n&&(i.setAttribute(e,n),r=!0),{name:e,newValue:n,oldValue:s,changed:r}},yo=i=>{const e=Ca(!1,i.dataset);for(const t in e)e[t]&&(e[t]=Ut(e[t],!0).value);return e},K=i=>{var t;if(!i.hasChildNodes())return!1;const e=i.childNodes;return!(e.length===1&&e[0].nodeType===3&&(!e[0].nodeValue||((t=e[0].nodeValue)==null?void 0:t.trim())===""))},fs=i=>{const e=[];if(i.type==="checkbox")return i.checked;if(i.type==="select-multiple"){const t=i.options;for(const s in t)if(t[s]){const n=t[s];n.selected&&e.push(n.value)}return e}else return i.hasAttribute&&i.hasAttribute("contenteditable")?i.innerHTML:i.value},ka=async i=>new Promise(e=>{let t;const s=()=>{t!==void 0&&clearTimeout(t),t=setTimeout(()=>{e()},100)};i.removeEventListener("scroll",s),i.addEventListener("scroll",s,{passive:!0}),s()}),je=async(i,e=0,t=window,s="vertical",n="smooth")=>{t||(t=window);const r=ka(t);let a=0,l=0;if(t.document)if(s==="vertical"){const c=t.scrollY||t.pageYOffset;a=Math.round(i.getBoundingClientRect().top+c-e)}else{const c=t.scrollX||t.pageXOffset;l=Math.round(i.getBoundingClientRect().left+c-e)}else if(s==="vertical"){const c=ps(window.getComputedStyle(t).marginTop);a=Math.round(i.offsetTop-e-c)}else{const c=ps(window.getComputedStyle(t).marginLeft);l=Math.round(i.offsetLeft-e-c)}return t.scroll({behavior:n,left:l,top:a}),r},wo=i=>{if(i.document){const e=i,t=e.document;return e.scrollMaxY||Math.max(t.body.scrollHeight,t.body.offsetHeight,t.documentElement.clientHeight,t.documentElement.scrollHeight,t.documentElement.offsetHeight,0)}return i.scrollHeight},_o=i=>{if(i.document){const e=i,t=e.document;return e.scrollMaxX||Math.max(t.body.scrollWidth,t.body.offsetWidth,t.documentElement.clientWidth,t.documentElement.scrollWidth,t.documentElement.offsetWidth)}return i.scrollWidth},nr=async(i,e,t="vertical",s="smooth")=>{var l,c;let n,r;if(!i)return;const a=ka(i);if(t==="vertical"||t==="both")switch(e){case"start":n=0;break;case"end":n=wo(i);break;case"center":n=wo(i),n&&(n/=2,i.document?n-=(((l=i.visualViewport)==null?void 0:l.height)||0)/2:n-=i.clientHeight/2);break;default:n=e;break}if(t==="horizontal"||t==="both")switch(e){case"start":r=0;break;case"end":r=_o(i);break;case"center":r=_o(i),r&&(r/=2,i.document?r-=(((c=i.visualViewport)==null?void 0:c.width)||0)/2:r-=i.clientWidth/2);break;default:r=e;break}return i.scroll({behavior:s,top:n,left:r}),a},Ui=i=>i.target||i.currentTarget||i.relatedTarget||i.delegateTarget||i.fromElement,rr=()=>{const i=Math.max(document.documentElement?document.documentElement.clientWidth:0,window.innerWidth||0);return{h:Math.max(document.documentElement?document.documentElement.clientHeight:0,window.innerHeight||0),w:i}},Kh=(i,e={})=>{if(!i)return!1;const t=i.getBoundingClientRect(),s=rr();e.top||(e.top=0),e.left||(e.left=0),e.bottom||(e.bottom=0),e.right||(e.right=0),e.top+=s.h-t.height,e.left+=s.w-t.width;const n=t.top+t.height>=e.bottom&&t.bottom-t.height<=e.top,r=t.left+t.width>=e.right&&t.right-t.width<=e.left;return n&&r},Gh=i=>{if(!i||typeof i!="function")return new Error("The callback is required!");const e=t=>{t!=null&&t.fake||document.readyState!=="loading"&&(i(),document.attachEvent&&document.detachEvent("onreadystatechange",e),document.removeEventListener("DOMContentLoaded",e))};document.attachEvent&&document.attachEvent("onreadystatechange",e),document.addEventListener&&document.addEventListener("DOMContentLoaded",e),e()},Xh=async(i,e,t=!0,s=!0)=>await new Promise((r,a)=>{let l=document.getElementById(e);if(l){if(console.warn("script already loaded, do nothing."),l.hasAttribute("loaded"))return r(l)}else l=document.createElement("script"),l.type="text/javascript",l.id=e,l.src=i,t&&(l.async=!0),s&&(l.defer=!0),(document.head||document.getElementsByTagName("head")[0]).appendChild(l);l.readyState&&(l.onreadystatechange=function(){(l.readyState==="loaded"||l.readyState==="complete")&&(l.onreadystatechange=null,l==null||l.setAttribute("loaded","true"),r(l))}),l.addEventListener("load",()=>{l==null||l.setAttribute("loaded","true"),r(l)}),l.addEventListener("error",(...c)=>{const h=new Error("Error on load script "+(l==null?void 0:l.src));console.error(h),console.error(...c),a(h)})}),Na=i=>{do i+=~~(Math.random()*1e3);while(document.getElementById(i));return i},Ft=(i,e=!1,t=!1)=>{const s=typeof i=="string"?i:i.localName,n=s.includes("-");if(n&&e&&customElements){const r=customElements.get(s);return r?t?r===i.constructor:!0:!1}return n},Nn=async i=>(await customElements.whenDefined(i.localName),i),So=i=>{if(!i)return-1;let e=0;do e++,i=i.previousElementSibling;while(i);return e},Qh=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;!Qh&&typeof WorkerGlobalScope<"u"&&typeof importScripts=="function"&&navigator instanceof WorkerNavigator;typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));typeof Deno<"u"&&typeof Deno.core<"u";const xa={};let cn=!1;const Ao="setImmediate$"+Math.random()+"$",Jh=function(i){i.source===window&&typeof i.data=="string"&&i.data.indexOf(Ao)===0&&Ia(+i.data.slice(Ao.length))};window&&window.addEventListener("message",Jh,!1);function Zh(i){delete xa[i]}function td(i){const e=i.callback,t=i.args;e(...t)}function Ia(i){if(cn)setTimeout(Ia,0,i);else{const e=xa[i];if(e){cn=!0;try{td(e)}finally{Zh(i),cn=!1}}}}const ed=i=>{const e=document.createElement("textarea");e.value=i,e.style.top="0",e.style.left="0",e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{const s=document.execCommand("copy")?"successful":"unsuccessful";console.log(`Fallback: Copying text command was ${s}: ${i}`)}catch(t){console.error("Fallback: Oops, unable to copy",t)}document.body.removeChild(e)},sd=async i=>{if(!navigator.clipboard){ed(i);return}try{await navigator.clipboard.writeText(i),console.log("Copying to clipboard was successful: "+i)}catch(e){console.error("Could not copy text: ",e)}},Oa=()=>{const i=navigator.userAgent,e=window.navigator.platform,t={windows7:/Windows NT 6.1/,windows8:/Windows NT 6.2/,windows81:/Windows NT 6.3/,windows10:/Windows NT 10.0/,windows:/windows/i,windowsPhone:/trident/i,android:/android/i,ios:/(ipad|iphone|ipod)/i,linux:/(linux)/i,unix:/(openbsd|freebsd|netbsd)/i,osxCatalina:/macintosh.+10(_|\.)15/i,osxBigSur:/macintosh.+((10(_|\.)16)|(11(_|\.)))/i,osx:/macintosh/i,mac:/mac/i},s={linux:/Linux/i,unix:/(FreeBSD|OpenBSD|X11|SunOS)/i,webOS:/webOS/i,playstation3:/playstation 3/i,playstation4:/playstation 4/i,PlaystationPortable:/psp/i,newNintendo3Ds:/new nintendo 3ds/i,nintendoDsi:/nintendo dsi/i,nintendo3Ds:/nintendo 3ds/i,nintendoWii:/nintendo wii/i,nintendoWiiU:/nintendo wiiu/i,palmos:/palmos/i,symbian:/(nokia_series_40|s60|symbian)/i};for(const n of Object.keys(t))if(t[n].test(i))return n==="mac"&&"ontouchend"in document?"ios":n;for(const n of Object.keys(s))if(s[n].test(e))return n;return"Unknown"},Da=()=>{const i=Oa();let e=!1,t=!1,s=!1;switch(i){case"windows":case"windows10":case"windows7":case"windows8":case"windows81":case"osxBigSur":case"osxCatalina":case"osx":case"mac":case"linux":case"unix":t=!0;break;case"ios":case"android":case"windowsPhone":case"symbian":e=!0;break}return(i.includes("playstation")||i.includes("nintendo"))&&(s=!0),{isMobile:e,isDesktop:t,isGameConsole:s}},id=()=>Da().isMobile,nd=()=>Da().isDesktop,yt=i=>{if(!i)return window.location;const e=document.createElement("a");return e.href=i,e},ut=i=>{const e=yt(i),t=yt().hostname;return e.hostname===t?{url:e.pathname+e.search+e.hash,location:e}:{url:Ci(i),location:e}},Ci=i=>{const e=yt(i);return e.protocol+"//"+e.host+e.pathname+e.search+e.hash},ji=(i,e=!1)=>{if(i){const t=yt(),s=yt(i);return e&&t.search!==s.search?!1:t.hostname===s.hostname&&t.pathname===s.pathname}return!1},rd=i=>{if(i){const e=yt(),t=e.pathname,s=e.hostname,n=yt(i),r=n.pathname,a=n.hostname;return s===a&&t.startsWith(r)}return!1},hn=i=>i.replace(/#.*/,""),To=(i,e)=>{const t=yt(e),s=typeof i<"u"?i:t.port,n=t.protocol;if(s!=="")return Number(s);if(n==="http:")return 80;if(n==="https:")return 443},od=i=>i?new RegExp("^(?:[a-z]+:)?//","i").test(i)||i.startsWith("mailto:")||i.startsWith("tel:")||i.startsWith("fax:"):!1,ad=i=>{if(od(i)){const e=yt(),t=e.protocol+"//"+e.hostname;let s=!0;return i.startsWith(t)&&(s=!1),s}return!1};class Wi{constructor(e){o(this,"elements");this.elements=e}registerAll(e){if(!j(e))throw new Error("Elements to register must be an object of elements");for(const t in e)if(e[t]&&t!=="__esModule"){const s=e[t];this.register(s,t)}return this.elements}}const x=class{constructor(e,t,s){o(this,"keypath");o(this,"callback");o(this,"objectPath");o(this,"obj");o(this,"target");o(this,"key");o(this,"tokens");this.keypath=t,this.callback=s,this.objectPath=[];const n=this.parse();this.key=n.key,this.tokens=n.tokens,this.obj=this.getRootObject(e),this.target=this.realize(),j(this.target)&&x.set(!0,this.key,this.target,this.callback)}static updateOptions(e){if(!e.adapters)throw new Error("adapters are required!");if(e.adapters&&(x.adapters={...x.adapters,...e.adapters},x.interfaces=Object.keys(x.adapters)),x.rootInterface=e.rootInterface||x.interfaces[0],!x.rootInterface)throw new Error("rootInterface is required!")}static tokenize(e,t){const s=[];let n={i:t,path:""},r,a;for(r=0;r{e.options.ignore||(this.resetTimeout(),this.components[e.tagName]=this.components[e.tagName]||this.getEmpty(),this.components[e.tagName].components.push(e.component))}),this.events.on("Component:disconnected",e=>{e.options.ignore||(this.resetTimeout(),this.checkStates())}),this.events.on("Component:afterBind",e=>{e.options.ignore||(this.resetTimeout(),this.checkStates())}),this.events.on("Component:error",(e,t)=>{this.onError(e,t)}),this.routerEvents.on("newPageReady",(e,t,s,n,r,a,l)=>{this.debug&&console.debug("newPageReady",e,t,s,"firstPageLoad",l),l||this.reset()})}getState(e){let t=0,s=0;for(const n of this.components[e].components)n.connected&&(t++,n.bound&&s++);return{connected:t,bound:s}}getStates(){const e={};for(const t in this.components){const s=this.getState(t);e[t]={state:s,components:this.components[t].components}}return e}checkStates(){let e=!0;const t=this.getStates();for(const s in t){const n=t[s].state;if(n.connected!==n.bound){e=!1;break}}return e&&!this.allBound&&this.onAllBound(),this.allBound=e,{states:t,allBound:e}}onAllBound(){this.clearTimeout(),this.events.trigger("ComponentLifecycle:allBound",this.components),this.debug&&console.debug("[ComponentLifecycle] All components bound!")}onError(e,t){this.clearTimeout(),console.error(`The component "${t.tagName}" has caused an error:`,e),this.events.trigger("ComponentLifecycle:error",e,t)}onTimeout(){this.clearTimeout();const e=this.getStates();let t=`[ComponentLifecycle] Timeout! {count} component(s) takes too long! +var Lh=Object.defineProperty;var kh=(i,e,t)=>e in i?Lh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var o=(i,e,t)=>(kh(i,typeof e!="symbol"?e+"":e,t),t);const vo=()=>{const i="0123456789ABCDEF";let e="#";for(let t=0;t<6;t++)e+=i[Math.floor(Math.random()*16)];return e},Nh=(i,...e)=>{const t=[];i.color?(i.namespace?t.push(`%c[${i.namespace}] ${i.mode.toUpperCase()}: `):t.push(`%c${i.mode.toUpperCase()}: `),t.push(`color: ${i.color}`)):i.namespace?t.push(`[${i.namespace}] ${i.mode.toUpperCase()}: `):t.push(`${i.mode.toUpperCase()}: `),t.push(...e),console[i.mode](...t)},Si="base64:";const xh=/^'.*'$|^".*"$/,Ih=(i,e)=>{for(let t=0;t{const i={},e=new Promise((t,s)=>{i.resolve=t,i.reject=s});return i.promise=e,i},Oh=(i,e=100)=>{let t;return(...s)=>{clearTimeout(t),t=setTimeout(()=>i(...s),e)}},Dh=(i,e=100)=>{let t,s;const n=new Promise((a,l)=>{t=a,s=l});let r;return(...a)=>(r||(r=Oh(()=>{try{t(i(...a)),r=void 0}catch(l){s(l)}},e)),r(...a),n)},Ph=i=>{let e=null,t,s,n=new Promise((r,a)=>{t=r,s=a});return(...r)=>(e&&cancelAnimationFrame(e),e=window.requestAnimationFrame(()=>{try{t(i(...r))}catch(a){s(a)}e=null,n=new Promise((a,l)=>{t=a,s=l})}),n)},Et=(i,e)=>typeof e=="number"?Dh(i,e):Ph(i),Oe=(i,e=100)=>{let t=null,s,n,r=new Promise((a,l)=>{s=a,n=l});return(...a)=>{if(t===null){t=window.setTimeout(()=>{t=null,r=new Promise((l,c)=>{s=l,n=c})},e);try{s(i(...a))}catch(l){n(l)}}return r}},Fi=(i,e=2,t=!0)=>{const s=JSON.stringify(i,null,e);return t&&s?s.replace(/'/g,"'"):s},Vi=i=>{let e=null;if(!i||!ir(i))return e;if(_a(i))e=JSON.parse(i)||null;else try{e=JSON.parse(i.replace(/'/g,'"'))||null}catch(t){console.warn(`Can't parse json string of "${i}" `,t)}return e},ir=i=>!i||typeof i!="string"?!1:(i=i.trim(),i.charAt(0)==="{"&&i.charAt(i.length-1)==="}"||i.charAt(0)==="["&&i.charAt(i.length-1)==="]"),Mh=i=>!i||typeof i!="string"?!1:i.startsWith(Si),$h=i=>{let e;return j(i)?e=JSON.stringify(i,null,0):e=i.toString(),Si+btoa(encodeURIComponent(e))},Rh=i=>{if(typeof i!="string")return"Not a base64 string!";i.startsWith(Si)&&(i=i.substring(Si.length));const e=atob(i);let t;try{t=decodeURIComponent(e)}catch{t=e}return Ut(t,!1).value},_a=i=>{if(!i||!ir(i))return!1;try{const e=JSON.parse(i);return!!(Array.isArray(e)||typeof e=="object")}catch{return!1}},Ut=(i,e=!1)=>{let t=0,s=i;if(i===void 0)return{type:t,value:void 0};if(i===null)return{type:t,value:null};if(xh.test(i))s=Ut(i.slice(1,-1),e).value;else if(i==="true")s=!0;else if(i==="false")s=!1;else if(i==="null")s=null;else if(i==="undefined")s=void 0;else if(i.startsWith("http://")||i.startsWith("https://"))s=i;else if(i==="")e?s=!0:s="";else if(!isNaN(Number(i)))s=Number(i),s>=Number.MAX_SAFE_INTEGER&&(s=i);else if(Mh(s))s=Rh(s);else if(ir(s)){const n=Vi(s);s=n||s}else t=1;return{type:t,value:s}},Sa=i=>typeof i>"u",ie=i=>!Sa(i),j=i=>ie(i)&&typeof i=="object"&&i!==null,Lt=i=>i!=null&&i.toString?i.toString():void 0,Bh=i=>i?parseFloat(i):void 0,xt=i=>!isNaN(parseFloat(i))&&!isNaN(i-0),ye=i=>typeof i=="boolean",ae=i=>typeof i=="string",us=i=>{if(typeof i=="number")return i;const e=i.replace(/[^-\d.]/g,"");return xt(e)?Number(e):0},Hh=i=>i.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e]),Fh=i=>(i=i.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""),i),Vh=i=>(i=i.replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").replace(/Ä/g,"Ae").replace(/Ö/g,"Oe").replace(/Ü/g,"Üe"),i),Uh=i=>(i=i.replace(/\s\s+/g," "),i),jh=i=>(i=i.trim(),i=i.toLowerCase(),i=Uh(i),i=Fh(i),i=Vh(i),i=i.replace(/ /g,"-"),i),Ai=i=>{const e=document.createElement("DIV");return e.innerHTML=i,e.textContent||e.innerText||""},mt=i=>i.replace(/-([a-z0-9])/g,e=>e[1].toUpperCase()),Wh=i=>i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),zh=i=>typeof i!="string"?"":i.charAt(0).toUpperCase()+i.slice(1),ue=(i={},e={},...t)=>{const s=n=>{for(const r in n)Object.hasOwnProperty.bind(n)(r)&&(i.deep&&Object.prototype.toString.call(n[r])==="[object Object]"?e[r]=ue(i,e[r],n[r]):i.keepValues?typeof e[r]>"u"&&(e[r]=n[r]):i.onlyDefined?typeof n[r]<"u"&&(e[r]=n[r]):i.mergeArrays&&Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=[...e[r],...n[r]]:e[r]=n[r])};for(let n=0;nArray.isArray(e)?i?e.map(t=>Aa(!0,t)):e.slice():j(e)?ue({deep:i},{},e):e;const Ta=(i,e,t)=>{if(!e)throw new Error("Can't set attribute of "+e);const s=i.getAttribute(e);let n,r=!1;switch(typeof t){case"string":case"number":case"boolean":n=String(t);break;case"undefined":n=void 0;case"object":t===null?n=null:n=Fi(t,0);break;default:n=String(t);break}return n==null?(i.removeAttribute(e),r=!0):s!==n&&(i.setAttribute(e,n),r=!0),{name:e,newValue:n,oldValue:s,changed:r}},bo=i=>{const e=Aa(!1,i.dataset);for(const t in e)e[t]&&(e[t]=Ut(e[t],!0).value);return e},K=i=>{var t;if(!i.hasChildNodes())return!1;const e=i.childNodes;return!(e.length===1&&e[0].nodeType===3&&(!e[0].nodeValue||((t=e[0].nodeValue)==null?void 0:t.trim())===""))},ps=i=>{const e=[];if(i.type==="checkbox")return i.checked;if(i.type==="select-multiple"){const t=i.options;for(const s in t)if(t[s]){const n=t[s];n.selected&&e.push(n.value)}return e}else return i.hasAttribute&&i.hasAttribute("contenteditable")?i.innerHTML:i.value},Ca=async i=>new Promise(e=>{let t;const s=()=>{t!==void 0&&clearTimeout(t),t=setTimeout(()=>{e()},100)};i.removeEventListener("scroll",s),i.addEventListener("scroll",s,{passive:!0}),s()}),Ue=async(i,e=0,t=window,s="vertical",n="smooth")=>{t||(t=window);const r=Ca(t);let a=0,l=0;if(t.document)if(s==="vertical"){const c=t.scrollY||t.pageYOffset;a=Math.round(i.getBoundingClientRect().top+c-e)}else{const c=t.scrollX||t.pageXOffset;l=Math.round(i.getBoundingClientRect().left+c-e)}else if(s==="vertical"){const c=us(window.getComputedStyle(t).marginTop);a=Math.round(i.offsetTop-e-c)}else{const c=us(window.getComputedStyle(t).marginLeft);l=Math.round(i.offsetLeft-e-c)}return t.scroll({behavior:n,left:l,top:a}),r},Eo=i=>{if(i.document){const e=i,t=e.document;return e.scrollMaxY||Math.max(t.body.scrollHeight,t.body.offsetHeight,t.documentElement.clientHeight,t.documentElement.scrollHeight,t.documentElement.offsetHeight,0)}return i.scrollHeight},yo=i=>{if(i.document){const e=i,t=e.document;return e.scrollMaxX||Math.max(t.body.scrollWidth,t.body.offsetWidth,t.documentElement.clientWidth,t.documentElement.scrollWidth,t.documentElement.offsetWidth)}return i.scrollWidth},nr=async(i,e,t="vertical",s="smooth")=>{var l,c;let n,r;if(!i)return;const a=Ca(i);if(t==="vertical"||t==="both")switch(e){case"start":n=0;break;case"end":n=Eo(i);break;case"center":n=Eo(i),n&&(n/=2,i.document?n-=(((l=i.visualViewport)==null?void 0:l.height)||0)/2:n-=i.clientHeight/2);break;default:n=e;break}if(t==="horizontal"||t==="both")switch(e){case"start":r=0;break;case"end":r=yo(i);break;case"center":r=yo(i),r&&(r/=2,i.document?r-=(((c=i.visualViewport)==null?void 0:c.width)||0)/2:r-=i.clientWidth/2);break;default:r=e;break}return i.scroll({behavior:s,top:n,left:r}),a},Ui=i=>i.target||i.currentTarget||i.relatedTarget||i.delegateTarget||i.fromElement,rr=()=>{const i=Math.max(document.documentElement?document.documentElement.clientWidth:0,window.innerWidth||0);return{h:Math.max(document.documentElement?document.documentElement.clientHeight:0,window.innerHeight||0),w:i}},qh=(i,e={})=>{if(!i)return!1;const t=i.getBoundingClientRect(),s=rr();e.top||(e.top=0),e.left||(e.left=0),e.bottom||(e.bottom=0),e.right||(e.right=0),e.top+=s.h-t.height,e.left+=s.w-t.width;const n=t.top+t.height>=e.bottom&&t.bottom-t.height<=e.top,r=t.left+t.width>=e.right&&t.right-t.width<=e.left;return n&&r},Yh=i=>{if(!i||typeof i!="function")return new Error("The callback is required!");const e=t=>{t!=null&&t.fake||document.readyState!=="loading"&&(i(),document.attachEvent&&document.detachEvent("onreadystatechange",e),document.removeEventListener("DOMContentLoaded",e))};document.attachEvent&&document.attachEvent("onreadystatechange",e),document.addEventListener&&document.addEventListener("DOMContentLoaded",e),e()},Kh=async(i,e,t=!0,s=!0)=>await new Promise((r,a)=>{let l=document.getElementById(e);if(l){if(console.warn("script already loaded, do nothing."),l.hasAttribute("loaded"))return r(l)}else l=document.createElement("script"),l.type="text/javascript",l.id=e,l.src=i,t&&(l.async=!0),s&&(l.defer=!0),(document.head||document.getElementsByTagName("head")[0]).appendChild(l);l.readyState&&(l.onreadystatechange=function(){(l.readyState==="loaded"||l.readyState==="complete")&&(l.onreadystatechange=null,l==null||l.setAttribute("loaded","true"),r(l))}),l.addEventListener("load",()=>{l==null||l.setAttribute("loaded","true"),r(l)}),l.addEventListener("error",(...c)=>{const h=new Error("Error on load script "+(l==null?void 0:l.src));console.error(h),console.error(...c),a(h)})}),La=i=>{do i+=~~(Math.random()*1e3);while(document.getElementById(i));return i},Ft=(i,e=!1,t=!1)=>{const s=typeof i=="string"?i:i.localName,n=s.includes("-");if(n&&e&&customElements){const r=customElements.get(s);return r?t?r===i.constructor:!0:!1}return n},Nn=async i=>(await customElements.whenDefined(i.localName),i),wo=i=>{if(!i)return-1;let e=0;do e++,i=i.previousElementSibling;while(i);return e},Gh=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;!Gh&&typeof WorkerGlobalScope<"u"&&typeof importScripts=="function"&&navigator instanceof WorkerNavigator;typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));typeof Deno<"u"&&typeof Deno.core<"u";const ka={};let cn=!1;const _o="setImmediate$"+Math.random()+"$",Xh=function(i){i.source===window&&typeof i.data=="string"&&i.data.indexOf(_o)===0&&Na(+i.data.slice(_o.length))};window&&window.addEventListener("message",Xh,!1);function Qh(i){delete ka[i]}function Jh(i){const e=i.callback,t=i.args;e(...t)}function Na(i){if(cn)setTimeout(Na,0,i);else{const e=ka[i];if(e){cn=!0;try{Jh(e)}finally{Qh(i),cn=!1}}}}const Zh=i=>{const e=document.createElement("textarea");e.value=i,e.style.top="0",e.style.left="0",e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{const s=document.execCommand("copy")?"successful":"unsuccessful";console.log(`Fallback: Copying text command was ${s}: ${i}`)}catch(t){console.error("Fallback: Oops, unable to copy",t)}document.body.removeChild(e)},td=async i=>{if(!navigator.clipboard){Zh(i);return}try{await navigator.clipboard.writeText(i),console.log("Copying to clipboard was successful: "+i)}catch(e){console.error("Could not copy text: ",e)}},xa=()=>{const i=navigator.userAgent,e=window.navigator.platform,t={windows7:/Windows NT 6.1/,windows8:/Windows NT 6.2/,windows81:/Windows NT 6.3/,windows10:/Windows NT 10.0/,windows:/windows/i,windowsPhone:/trident/i,android:/android/i,ios:/(ipad|iphone|ipod)/i,linux:/(linux)/i,unix:/(openbsd|freebsd|netbsd)/i,osxCatalina:/macintosh.+10(_|\.)15/i,osxBigSur:/macintosh.+((10(_|\.)16)|(11(_|\.)))/i,osx:/macintosh/i,mac:/mac/i},s={linux:/Linux/i,unix:/(FreeBSD|OpenBSD|X11|SunOS)/i,webOS:/webOS/i,playstation3:/playstation 3/i,playstation4:/playstation 4/i,PlaystationPortable:/psp/i,newNintendo3Ds:/new nintendo 3ds/i,nintendoDsi:/nintendo dsi/i,nintendo3Ds:/nintendo 3ds/i,nintendoWii:/nintendo wii/i,nintendoWiiU:/nintendo wiiu/i,palmos:/palmos/i,symbian:/(nokia_series_40|s60|symbian)/i};for(const n of Object.keys(t))if(t[n].test(i))return n==="mac"&&"ontouchend"in document?"ios":n;for(const n of Object.keys(s))if(s[n].test(e))return n;return"Unknown"},Ia=()=>{const i=xa();let e=!1,t=!1,s=!1;switch(i){case"windows":case"windows10":case"windows7":case"windows8":case"windows81":case"osxBigSur":case"osxCatalina":case"osx":case"mac":case"linux":case"unix":t=!0;break;case"ios":case"android":case"windowsPhone":case"symbian":e=!0;break}return(i.includes("playstation")||i.includes("nintendo"))&&(s=!0),{isMobile:e,isDesktop:t,isGameConsole:s}},ed=()=>Ia().isMobile,sd=()=>Ia().isDesktop,yt=i=>{if(!i)return window.location;const e=document.createElement("a");return e.href=i,e},ut=i=>{const e=yt(i),t=yt().hostname;return e.hostname===t?{url:e.pathname+e.search+e.hash,location:e}:{url:Ti(i),location:e}},Ti=i=>{const e=yt(i);return e.protocol+"//"+e.host+e.pathname+e.search+e.hash},ji=(i,e=!1)=>{if(i){const t=yt(),s=yt(i);return e&&t.search!==s.search?!1:t.hostname===s.hostname&&t.pathname===s.pathname}return!1},id=i=>{if(i){const e=yt(),t=e.pathname,s=e.hostname,n=yt(i),r=n.pathname,a=n.hostname;return s===a&&t.startsWith(r)}return!1},hn=i=>i.replace(/#.*/,""),So=(i,e)=>{const t=yt(e),s=typeof i<"u"?i:t.port,n=t.protocol;if(s!=="")return Number(s);if(n==="http:")return 80;if(n==="https:")return 443},nd=i=>i?new RegExp("^(?:[a-z]+:)?//","i").test(i)||i.startsWith("mailto:")||i.startsWith("tel:")||i.startsWith("fax:"):!1,rd=i=>{if(nd(i)){const e=yt(),t=e.protocol+"//"+e.hostname;let s=!0;return i.startsWith(t)&&(s=!1),s}return!1};class Wi{constructor(e){o(this,"elements");this.elements=e}registerAll(e){if(!j(e))throw new Error("Elements to register must be an object of elements");for(const t in e)if(e[t]&&t!=="__esModule"){const s=e[t];this.register(s,t)}return this.elements}}const x=class{constructor(e,t,s){o(this,"keypath");o(this,"callback");o(this,"objectPath");o(this,"obj");o(this,"target");o(this,"key");o(this,"tokens");this.keypath=t,this.callback=s,this.objectPath=[];const n=this.parse();this.key=n.key,this.tokens=n.tokens,this.obj=this.getRootObject(e),this.target=this.realize(),j(this.target)&&x.set(!0,this.key,this.target,this.callback)}static updateOptions(e){if(!e.adapters)throw new Error("adapters are required!");if(e.adapters&&(x.adapters={...x.adapters,...e.adapters},x.interfaces=Object.keys(x.adapters)),x.rootInterface=e.rootInterface||x.interfaces[0],!x.rootInterface)throw new Error("rootInterface is required!")}static tokenize(e,t){const s=[];let n={i:t,path:""},r,a;for(r=0;r{e.options.ignore||(this.resetTimeout(),this.components[e.tagName]=this.components[e.tagName]||this.getEmpty(),this.components[e.tagName].components.push(e.component))}),this.events.on("Component:disconnected",e=>{e.options.ignore||(this.resetTimeout(),this.checkStates())}),this.events.on("Component:afterBind",e=>{e.options.ignore||(this.resetTimeout(),this.checkStates())}),this.events.on("Component:error",(e,t)=>{this.onError(e,t)}),this.routerEvents.on("newPageReady",(e,t,s,n,r,a,l)=>{this.debug&&console.debug("newPageReady",e,t,s,"firstPageLoad",l),l||this.reset()})}getState(e){let t=0,s=0;for(const n of this.components[e].components)n.connected&&(t++,n.bound&&s++);return{connected:t,bound:s}}getStates(){const e={};for(const t in this.components){const s=this.getState(t);e[t]={state:s,components:this.components[t].components}}return e}checkStates(){let e=!0;const t=this.getStates();for(const s in t){const n=t[s].state;if(n.connected!==n.bound){e=!1;break}}return e&&!this.allBound&&this.onAllBound(),this.allBound=e,{states:t,allBound:e}}onAllBound(){this.clearTimeout(),this.events.trigger("ComponentLifecycle:allBound",this.components),this.debug&&console.debug("[ComponentLifecycle] All components bound!")}onError(e,t){this.clearTimeout(),console.error(`The component "${t.tagName}" has caused an error:`,e),this.events.trigger("ComponentLifecycle:error",e,t)}onTimeout(){this.clearTimeout();const e=this.getStates();let t=`[ComponentLifecycle] Timeout! {count} component(s) takes too long! Unfinished components: `,s=0;for(const n in e){const r=e[n].state;r.connected!==r.bound&&(s++,t+=`${n}: connected: ${e[n].state.connected}, bound: ${e[n].state.bound} -`)}if(s<=0){console.warn("No component found"),this.events.trigger("ComponentLifecycle:noComponents");return}t=t.replace("{count}",s.toString()),this.events.trigger("ComponentLifecycle:error",new Error(t),{})}clearTimeout(){this.timeout&&window.clearTimeout(this.timeout)}resetTimeout(){var e;return this.debug&&console.debug("[ComponentLifecycle] reset timeout.."),this.clearTimeout(),this.timeout=window.setTimeout(this.onTimeout.bind(this),((e=ms.options.lifecycle)==null?void 0:e.timeout)||5e3),this.timeout}reset(){this.debug&&console.debug("[ComponentLifecycle] reset!"),this.allBound=!1,this.components={},this.resetTimeout()}};let ss=$t;o(ss,"instance");class $a extends Wi{constructor(t){super(t);o(this,"type","components")}register(t,s,n=!1){const r=n?s||t.tagName:t.tagName||s;return r?(this.elements[r]=t,this.elements):(console.warn(new Error("Component name not found!"),t),this.elements)}}class Ra extends Wi{constructor(t){super(t);o(this,"type","formatter")}register(t,s,n=!1){const r=n?s||t.name:t.name||s;if(!r)throw new Error("Formatter name not found!");return this.elements[r]=t,this.elements}}class We{static setRequestHeaderEachRequest(e,t){this._requestHeadersEachRequest.push({name:e,value:t})}static async getJSON(e,t,s={},n={}){return this.fetch(e,"GET",t,"json",s,n)}static async post(e,t,s,n={},r={}){return this.fetch(e,"POST",t,s,n,r)}static async delete(e,t,s,n={},r={}){return this.fetch(e,"DELETE",t,s,n,r)}static async put(e,t,s,n={},r={}){return this.fetch(e,"PUT",t,s,n,r)}static async get(e,t,s,n={},r={}){return this.fetch(e,"GET",t,s,n,r)}static parseDataType(e){const t={};let s="application/x-www-form-urlencoded",n="*/*";switch(e){case"script":s="application/javascript";break;case"json":s="application/json",n="application/json, text/javascript";break;case"xml":s="application/xml",n="application/xml, text/xml";break;case"text":s="text/plain",n="text/plain";break;case"html":s="text/html",n="text/html";break;case"form":s="application/x-www-form-urlencoded";break}return s&&(t["Content-Type"]=s,t.Accept=n),t}static async fetch(e,t="GET",s={},n,r={},a={}){if(!fetch)throw new Error("Your browser does not support the fetch API, use xhr instead or install a polyfill.");let l;for(const u of this._requestHeadersEachRequest)r[u.name]=u.value;n&&(r=ue({deep:!1},r,this.parseDataType(n))),!a.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest");const c=a.cache?a.cache:"default";if(t==="GET"&&s){if(new URLSearchParams(s).toString()){const f=e.includes("?")?"&":"?";e=e+f+new URLSearchParams(s).toString()}}else s&&(n==="form"?l=new URLSearchParams(s):l=JSON.stringify(s));const h=await fetch(e,{credentials:"same-origin",cache:c,method:t,body:l,headers:r,mode:a.mode||"cors"});let d=await h.text();if(typeof d=="string"&&Aa(d)&&(d=JSON.parse(d)),typeof d=="string")switch(d){case"null":d=null;break;case"true":d=!0;break;case"false":d=!1;break;case"undefined":d=void 0;break}return{status:h.status,headers:h.headers,ok:h.ok,redirected:h.redirected,statusText:h.statusText,type:h.type,url:h.url,arrayBuffer:h.arrayBuffer,blob:h.blob,bodyUsed:h.bodyUsed,clone:h.clone,formData:h.formData,text:h.text,body:d}}}o(We,"_requestHeadersEachRequest",[]);const ld=Object.freeze(Object.defineProperty({__proto__:null,AdapterService:Pa,BindersService:Ma,ComponentService:$a,CoreService:ms,FormatterService:Ra,HttpService:We,LifecycleService:ss},Symbol.toStringTag,{value:"Module"})),Or=class{constructor(){o(this,"name",".");o(this,"counter",0);o(this,"weakmap",{})}weakReference(e){if(!Object.hasOwnProperty.bind(e)("__rv")){const t=this.counter++;Object.defineProperty(e,"__rv",{value:t})}return this.weakmap[e.__rv]||(this.weakmap[e.__rv]={callbacks:{}}),this.weakmap[e.__rv]}cleanupWeakReference(e,t){Object.keys(e.callbacks).length||e.pointers&&Object.keys(e.pointers).length||delete this.weakmap[t]}stubFunction(e,t){const s=e[t],n=this.weakReference(e),r=this.weakmap;e[t]=(...a)=>{const l=s.apply(e,a);return Object.keys(n.pointers).forEach(c=>{const h=n.pointers[c];r[c]&&Array.isArray(r[c].callbacks[h])&&r[c].callbacks[h].forEach(d=>{d.sync()})}),l}}observeMutations(e,t,s){if(Array.isArray(e)){const n=this.weakReference(e);n.pointers||(n.pointers={},Or.ARRAY_METHODS.forEach(r=>{this.stubFunction(e,r)})),n.pointers[t]||(n.pointers[t]=[]),n.pointers[t].indexOf(s)===-1&&n.pointers[t].push(s)}}unobserveMutations(e,t,s){if(Array.isArray(e)&&e.__rv!=null){const n=this.weakmap[e.__rv];if(n){const r=n.pointers[t];if(r){const a=r.indexOf(s);a>-1&&r.splice(a,1),r.length||delete n.pointers[t],this.cleanupWeakReference(n,e.__rv)}}}}observe(e,t,s){let n;const r=this.weakReference(e).callbacks;if(!r[t]){r[t]=[];const a=Object.getOwnPropertyDescriptor(e,t);(!a||!(a.get||a.set||!a.configurable))&&(n=e[t],Object.defineProperty(e,t,{enumerable:!0,get:()=>n,set:l=>{if(l!==n){this.unobserveMutations(n,e.__rv,t),n=l;const c=this.weakmap[e.__rv];if(c){const h=c.callbacks[t];h&&h.forEach(d=>{d.sync()}),this.observeMutations(l,e.__rv,t)}}}}))}r[t].indexOf(s)===-1&&r[t].push(s),this.observeMutations(e[t],e.__rv,t)}unobserve(e,t,s){const n=this.weakmap[e.__rv];if(n){const r=n.callbacks[t];if(r){const a=r.indexOf(s);a>-1&&(r.splice(a,1),r.length||(delete n.callbacks[t],this.unobserveMutations(e[t],e.__rv,t))),this.cleanupWeakReference(n,e.__rv)}}}get(e,t){return e[t]}set(e,t,s){e[t]=s}};let zs=Or;o(zs,"ARRAY_METHODS",["push","pop","shift","unshift","sort","reverse","splice"]);const cd=new zs,hd=Object.freeze(Object.defineProperty({__proto__:null,dotAdapter:cd},Symbol.toStringTag,{value:"Module"})),dd=/[^\s']+|'([^']|'[^\s])*'|"([^"]|"[^\s])*"/g,ud=/\s+/;class E{constructor(e,t,s,n,r,a,l){o(this,"name");o(this,"publishes",!1);o(this,"priority",0);o(this,"value");o(this,"observer");o(this,"view");o(this,"el");o(this,"type");o(this,"formatters");o(this,"formatterObservers",{});o(this,"keypath");o(this,"args");o(this,"model");o(this,"marker");this.view=e,this.el=t,this.type=s,this.name=n,this.keypath=r,this.formatters=a,this.model=void 0,l&&s?this.args=this.getStarArguments(l,s):this.args=new Array}observe(e,t,s){return new At(e,t,s)}parseTarget(){if(this.keypath){const e=Ut(this.keypath,!0);if(e.type===0)this.value=e.value;else if(e.type===1)this.observer=this.observe(this.view.models,this.keypath,this),this.model=this.observer.target;else throw new Error(`[${this.name}] Unknown type in token`)}else this.value=void 0}getIterationAlias(e){return"%"+e+"%"}parseFormatterArguments(e,t){return e.map(s=>Ut(s,!0)).map(({type:s,value:n},r)=>{if(s===0)return n;if(s===1){const a=n;this.formatterObservers[t]||(this.formatterObservers[t]={});let l=this.formatterObservers[t][r];return l||(l=this.observe(this.view.models,a,this),this.formatterObservers[t][r]=l),l.value()}else throw new Error(`[${this.name}] Unknown argument type`)})}formattedValue(e,t=0){if(this.formatters===null)throw new Error(`[${this.name} formatters is null`);let s=!1;const n=t?this.formatters.slice(t):this.formatters;return n.reduce((r,a,l)=>{if(s)return r;const c=a.match(dd);if(c===null)return console.warn(new Error(`[${this.name}] No args matched with regex "FORMATTER_ARGS"! +`)}if(s<=0){console.warn("No component found"),this.events.trigger("ComponentLifecycle:noComponents");return}t=t.replace("{count}",s.toString()),this.events.trigger("ComponentLifecycle:error",new Error(t),{})}clearTimeout(){this.timeout&&window.clearTimeout(this.timeout)}resetTimeout(){var e;return this.debug&&console.debug("[ComponentLifecycle] reset timeout.."),this.clearTimeout(),this.timeout=window.setTimeout(this.onTimeout.bind(this),((e=fs.options.lifecycle)==null?void 0:e.timeout)||5e3),this.timeout}reset(){this.debug&&console.debug("[ComponentLifecycle] reset!"),this.allBound=!1,this.components={},this.resetTimeout()}};let es=$t;o(es,"instance");class Pa extends Wi{constructor(t){super(t);o(this,"type","components")}register(t,s,n=!1){const r=n?s||t.tagName:t.tagName||s;return r?(this.elements[r]=t,this.elements):(console.warn(new Error("Component name not found!"),t),this.elements)}}class Ma extends Wi{constructor(t){super(t);o(this,"type","formatter")}register(t,s,n=!1){const r=n?s||t.name:t.name||s;if(!r)throw new Error("Formatter name not found!");return this.elements[r]=t,this.elements}}class je{static setRequestHeaderEachRequest(e,t){this._requestHeadersEachRequest.push({name:e,value:t})}static async getJSON(e,t,s={},n={}){return this.fetch(e,"GET",t,"json",s,n)}static async post(e,t,s,n={},r={}){return this.fetch(e,"POST",t,s,n,r)}static async delete(e,t,s,n={},r={}){return this.fetch(e,"DELETE",t,s,n,r)}static async put(e,t,s,n={},r={}){return this.fetch(e,"PUT",t,s,n,r)}static async get(e,t,s,n={},r={}){return this.fetch(e,"GET",t,s,n,r)}static parseDataType(e){const t={};let s="application/x-www-form-urlencoded",n="*/*";switch(e){case"script":s="application/javascript";break;case"json":s="application/json",n="application/json, text/javascript";break;case"xml":s="application/xml",n="application/xml, text/xml";break;case"text":s="text/plain",n="text/plain";break;case"html":s="text/html",n="text/html";break;case"form":s="application/x-www-form-urlencoded";break}return s&&(t["Content-Type"]=s,t.Accept=n),t}static async fetch(e,t="GET",s={},n,r={},a={}){if(!fetch)throw new Error("Your browser does not support the fetch API, use xhr instead or install a polyfill.");let l;for(const u of this._requestHeadersEachRequest)r[u.name]=u.value;n&&(r=ue({deep:!1},r,this.parseDataType(n))),!a.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest");const c=a.cache?a.cache:"default";if(t==="GET"&&s){if(new URLSearchParams(s).toString()){const f=e.includes("?")?"&":"?";e=e+f+new URLSearchParams(s).toString()}}else s&&(n==="form"?l=new URLSearchParams(s):l=JSON.stringify(s));const h=await fetch(e,{credentials:"same-origin",cache:c,method:t,body:l,headers:r,mode:a.mode||"cors"});let d=await h.text();if(typeof d=="string"&&_a(d)&&(d=JSON.parse(d)),typeof d=="string")switch(d){case"null":d=null;break;case"true":d=!0;break;case"false":d=!1;break;case"undefined":d=void 0;break}return{status:h.status,headers:h.headers,ok:h.ok,redirected:h.redirected,statusText:h.statusText,type:h.type,url:h.url,arrayBuffer:h.arrayBuffer,blob:h.blob,bodyUsed:h.bodyUsed,clone:h.clone,formData:h.formData,text:h.text,body:d}}}o(je,"_requestHeadersEachRequest",[]);const od=Object.freeze(Object.defineProperty({__proto__:null,AdapterService:Oa,BindersService:Da,ComponentService:Pa,CoreService:fs,FormatterService:Ma,HttpService:je,LifecycleService:es},Symbol.toStringTag,{value:"Module"})),xr=class{constructor(){o(this,"name",".");o(this,"counter",0);o(this,"weakmap",{})}weakReference(e){if(!Object.hasOwnProperty.bind(e)("__rv")){const t=this.counter++;Object.defineProperty(e,"__rv",{value:t})}return this.weakmap[e.__rv]||(this.weakmap[e.__rv]={callbacks:{}}),this.weakmap[e.__rv]}cleanupWeakReference(e,t){Object.keys(e.callbacks).length||e.pointers&&Object.keys(e.pointers).length||delete this.weakmap[t]}stubFunction(e,t){const s=e[t],n=this.weakReference(e),r=this.weakmap;e[t]=(...a)=>{const l=s.apply(e,a);return Object.keys(n.pointers).forEach(c=>{const h=n.pointers[c];r[c]&&Array.isArray(r[c].callbacks[h])&&r[c].callbacks[h].forEach(d=>{d.sync()})}),l}}observeMutations(e,t,s){if(Array.isArray(e)){const n=this.weakReference(e);n.pointers||(n.pointers={},xr.ARRAY_METHODS.forEach(r=>{this.stubFunction(e,r)})),n.pointers[t]||(n.pointers[t]=[]),n.pointers[t].indexOf(s)===-1&&n.pointers[t].push(s)}}unobserveMutations(e,t,s){if(Array.isArray(e)&&e.__rv!=null){const n=this.weakmap[e.__rv];if(n){const r=n.pointers[t];if(r){const a=r.indexOf(s);a>-1&&r.splice(a,1),r.length||delete n.pointers[t],this.cleanupWeakReference(n,e.__rv)}}}}observe(e,t,s){let n;const r=this.weakReference(e).callbacks;if(!r[t]){r[t]=[];const a=Object.getOwnPropertyDescriptor(e,t);(!a||!(a.get||a.set||!a.configurable))&&(n=e[t],Object.defineProperty(e,t,{enumerable:!0,get:()=>n,set:l=>{if(l!==n){this.unobserveMutations(n,e.__rv,t),n=l;const c=this.weakmap[e.__rv];if(c){const h=c.callbacks[t];h&&h.forEach(d=>{d.sync()}),this.observeMutations(l,e.__rv,t)}}}}))}r[t].indexOf(s)===-1&&r[t].push(s),this.observeMutations(e[t],e.__rv,t)}unobserve(e,t,s){const n=this.weakmap[e.__rv];if(n){const r=n.callbacks[t];if(r){const a=r.indexOf(s);a>-1&&(r.splice(a,1),r.length||(delete n.callbacks[t],this.unobserveMutations(e[t],e.__rv,t))),this.cleanupWeakReference(n,e.__rv)}}}get(e,t){return e[t]}set(e,t,s){e[t]=s}};let Ws=xr;o(Ws,"ARRAY_METHODS",["push","pop","shift","unshift","sort","reverse","splice"]);const ad=new Ws,ld=Object.freeze(Object.defineProperty({__proto__:null,dotAdapter:ad},Symbol.toStringTag,{value:"Module"})),cd=/[^\s']+|'([^']|'[^\s])*'|"([^"]|"[^\s])*"/g,hd=/\s+/;class E{constructor(e,t,s,n,r,a,l){o(this,"name");o(this,"publishes",!1);o(this,"priority",0);o(this,"value");o(this,"observer");o(this,"view");o(this,"el");o(this,"type");o(this,"formatters");o(this,"formatterObservers",{});o(this,"keypath");o(this,"args");o(this,"model");o(this,"marker");this.view=e,this.el=t,this.type=s,this.name=n,this.keypath=r,this.formatters=a,this.model=void 0,l&&s?this.args=this.getStarArguments(l,s):this.args=new Array}observe(e,t,s){return new At(e,t,s)}parseTarget(){if(this.keypath){const e=Ut(this.keypath,!0);if(e.type===0)this.value=e.value;else if(e.type===1)this.observer=this.observe(this.view.models,this.keypath,this),this.model=this.observer.target;else throw new Error(`[${this.name}] Unknown type in token`)}else this.value=void 0}getIterationAlias(e){return"%"+e+"%"}parseFormatterArguments(e,t){return e.map(s=>Ut(s,!0)).map(({type:s,value:n},r)=>{if(s===0)return n;if(s===1){const a=n;this.formatterObservers[t]||(this.formatterObservers[t]={});let l=this.formatterObservers[t][r];return l||(l=this.observe(this.view.models,a,this),this.formatterObservers[t][r]=l),l.value()}else throw new Error(`[${this.name}] Unknown argument type`)})}formattedValue(e,t=0){if(this.formatters===null)throw new Error(`[${this.name} formatters is null`);let s=!1;const n=t?this.formatters.slice(t):this.formatters;return n.reduce((r,a,l)=>{if(s)return r;const c=a.match(cd);if(c===null)return console.warn(new Error(`[${this.name}] No args matched with regex "FORMATTER_ARGS"! value: ${JSON.stringify(e)} result: ${JSON.stringify(r)} declaration: ${JSON.stringify(a)} index: ${l} -`)),r;const h=c.shift();if(!h)throw new Error(`[${this.name}] No formatter id found in args!`);if(!this.view.options.formatters)throw new Error(`[${this.name}] No formatters are defined!`);const d=this.view.options.formatters[h];if(!d)throw new Error(`[${this.name}] No formatters with id "${h}" found!`);const p=this.parseFormatterArguments(c,l);return d&&typeof d.read=="function"&&(r=d.read.apply(this.model,[r,...p])),lthis.formattedValue(u,l+1))):r},e)}eventHandler(e,t){const s=this.view.options.handler;return n=>{if(!s)throw new Error("No handler defined in binding.view.options.handler");s.call(e,this,n,this,t)}}set(e){try{e=this.formattedValue(e)}catch(t){return console.error(t),e}typeof this.routine=="function"&&(e&&typeof e.then=="function"&&typeof e.catch=="function"?e.then(t=>{this.routine(this.el,t)}).catch(t=>{console.error(t)}):this.routine(this.el,e))}sync(){this.observer?(this.model=this.observer.target,this.set(this.observer.value())):this.set(this.value)}publish(){if(this.observer){if(this.formatters===null)throw new Error("formatters is null");const e=this.formatters.reduceRight((t,s,n)=>{const r=s.split(ud),a=r.shift();if(!a)throw new Error("id not defined");if(!this.view.options.formatters)return;const l=this.view.options.formatters[a],c=this.parseFormatterArguments(r,n);return l&&typeof l.publish=="function"&&(t=l.publish(t,...c)),t},this._getValue(this.el));this.observer.setValue(e)}}_bind(){if(this.parseTarget(),this.bind){if(typeof this.bind!="function")throw new Error("the method bind is not a function");this.bind(this.el)}this.view.options.preloadData&&this.sync()}_unbind(){this.unbind&&this.unbind(this.el),this.observer&&this.observer.unobserve(),Object.keys(this.formatterObservers).forEach(e=>{const t=this.formatterObservers[e];Object.keys(t).forEach(s=>{t[s].unobserve()})}),this.formatterObservers={}}_update(e={}){this.observer&&(this.model=this.observer.target),typeof this.update=="function"&&this.update(e)}_getValue(e){return typeof this.getValue=="function"?this.getValue(e):fs(e)}getStarArguments(e,t){var r;const s=this.view.binderRegex(e);return((r=t.match(s))==null?void 0:r.slice(1))||[]}}o(E,"key",""),o(E,"block",!1);class Ba extends E{constructor(){super(...arguments);o(this,"function",!0);o(this,"priority",1e3)}bind(t){const s=this.args[0];t.classList.add(s)}routine(t,s){const n=this.args[0];s?(t.classList.add(n+"-start"),t.classList.remove(n+"-done")):(t.classList.remove(n+"-start"),t.classList.add(n+"-done"))}}o(Ba,"key","animate-*");class Ha extends E{constructor(){super(...arguments);o(this,"function",!0);o(this,"priority",1e3);o(this,"staticClasses")}bind(t){const s=t.getAttribute("class")||"";this.staticClasses=s.split(" ")}unbind(){delete this.staticClasses}routine(t,s){var r;s?((r=this.staticClasses)==null?void 0:r.indexOf(s))===-1&&t.setAttribute("class",this.staticClasses.join(" ")+" "+s):this.staticClasses&&t.setAttribute("class",this.staticClasses.join(" "));const n=t.getAttribute("class");n&&t.setAttribute("class",n.trim())}}o(Ha,"key","add-class");class Fa extends E{routine(e,t){const s=mt(this.args[0].trim());this.view.models[s]=t}}o(Fa,"key","assign-*");class Va extends E{routine(e,t){if(typeof t=="object")return ue({deep:!1},this.view.models,t);console.warn("Value must be an object or propertyName is required")}}o(Va,"key","assign");class zi extends E{routine(e,t){var a;if(!this.type)throw new Error("Can't set attribute of "+this.type);const{newValue:s,oldValue:n,changed:r}=La(e,this.type,t);this.type==="src"&&e.tagName.toUpperCase()==="SOURCE"&&((a=e.parentElement)==null?void 0:a.tagName.toUpperCase())==="VIDEO"&&e.parentElement.load(),r&&e.dispatchEvent(new CustomEvent("binder-changed",{detail:{name:this.type,newValue:s,oldValue:n}}))}}o(zi,"key","attr-*");class xn extends E{routine(){}}o(xn,"key","block"),o(xn,"block",!0);class Ua extends E{constructor(){super(...arguments);o(this,"publishes",!0);o(this,"priority",2e3);o(this,"onChange",this.publish.bind(this))}bind(t){t.addEventListener("change",this.onChange)}unbind(t){t.removeEventListener("change",this.onChange)}routine(t,s){let n;this._getValue?n=this._getValue(t):(console.warn("this._getValue is not a function, this: ",this),n=fs(t)),t.type==="radio"?t.checked=Lt(n)===Lt(s):n!==s&&(t.checked=!!s)}getValue(t){return fs(t)}}o(Ua,"key","checked");class ja extends E{routine(e,t){if(this.args===null)throw new Error("args is null");const s=e.getAttribute("class")||"",n=s.split(" ").filter(l=>l!==""),r=this.args[0].trim(),a=n.indexOf(r);a===-1?t&&e.setAttribute("class",`${s} ${r}`):t||e.setAttribute("class",n.filter((l,c)=>c!==a).join(" "))}}o(ja,"key","class-*");const Ds='[componentAttributeBinder] You can only use the "rv-co-*" binder on Riba components, but "{tagName}" is not registered.';class Li extends E{constructor(){super(...arguments);o(this,"publishes",!0);o(this,"componentAttributeObserver");o(this,"attributeName")}__routine(t,s){const n=this.args[0].trim();t.setBinderAttribute?t.setBinderAttribute(n,s):console.warn(Ds.replace("{tagName}",t.tagName),t)}async routine(t,s){Ft(t,!0,!0)?this.__routine(t,s):Ft(t,!0)?(await Nn(t),this.__routine(t,s)):console.warn(Ds.replace("{tagName}",t.tagName),t)}__bind(t){if(this.attributeName=this.args[0].toString().trim(),typeof t.observeAttribute!="function"){console.warn(Ds.replace("{tagName}",t.tagName),t);return}this.componentAttributeObserver=t.observeAttribute(this.attributeName,{sync:()=>{this.publish()}})}async bind(t){Ft(t,!0,!0)?this.__bind(t):Ft(t,!0)?(await Nn(t),this.__bind(t)):console.warn(Ds.replace("{tagName}",t.tagName),t)}unbind(){var t;(t=this.componentAttributeObserver)==null||t.unobserve()}getValue(t){const s=this.args[0].trim();return t.getBinderAttribute(s)}}o(Li,"key","co-*");class Wa extends E{routine(e,t){e.disabled=!!t}}o(Wa,"key","disabled");class za extends E{constructor(){super(...arguments);o(this,"enable",!1);o(this,"onDrag",this._onDrag.bind(this))}_onDrag(t){this.enable||t.preventDefault()}routine(t,s){this.enable=s,t.setAttribute("draggable",s?"true":"false")}bind(t){t.addEventListener("dragstart",this.onDrag,!0)}unbind(t){t.removeAttribute("draggable"),t.removeEventListener("dragstart",this.onDrag,!0)}}o(za,"key","draggable");class qa extends E{routine(e,t){e.data=t??""}}o(qa,"key","mustache-text");const Ps=0,Ya=1,pd=/((?:'[^']*')*(?:(?:[^|']*(?:'[^']*')+[^|']*)+|[^|]+))|^$/g;function Ka(i,e){let t=null;const s=i.length;let n=0,r=0;const a=e[0],l=e[1];for(;r0&&r0)for(let n=0;nn.trim());return{keypath:t.shift()||void 0,pipes:t}}const Te=class{constructor(e,t,s){o(this,"els");o(this,"models");o(this,"options");o(this,"bindings",[]);o(this,"webComponents",[]);if(Array.isArray(e)?this.els=e:this.els=[e],this.models=t,this.models.$root)for(const n of Object.keys(this.models.$root))Te.$rootScope[n]=this.models.$root[n];this.models.$root=Te.$rootScope,this.options=s,this.build()}static create(e,t,s){var a;const n=e.el.cloneNode(!0),r=new Te(n,t,e.view.options);return r.bind(),(a=e==null?void 0:e.marker)!=null&&a.parentNode?e.marker.parentNode.insertBefore(n,s):console.warn("[View]: No parent node for binding!"),r}bind(){this.bindings.forEach(e=>{e._bind()})}unbind(){Array.isArray(this.bindings)&&this.bindings.forEach(e=>{e._unbind(),typeof e.el&&this.options.removeBinderAttributes}),Array.isArray(this.webComponents)&&this.webComponents.forEach(e=>{typeof e.unbind=="function"&&e.unbind()})}sync(){this.bindings.forEach(e=>{e.sync&&e.sync()})}publish(){this.bindings.forEach(e=>{e.publishes&&e.publish&&e.publish()})}update(e={}){Object.keys(e).forEach(t=>{this.models[t]=e[t]});for(const t of this.bindings)t._update&&t._update(e)}build(){if(this.bindings=[],!this.options.templateDelimiters)throw new Error("templateDelimiters required");const e=this.els;for(let t=0;t1?s=new RegExp(`^${e.replace("*","([^-]*)").replaceAll("-*","-(.+)")}$`):s=new RegExp(`^${e.replaceAll("*","(.+)")}$`),s}bindBinders(e,t,s=this.options.attributeBinders){let n=!1;if(!this.options.binders)return n;const r=[];for(let a=0,l=e.length;a{const s=e.priority||0;return(t.priority||0)-s});class In extends E{constructor(){super(...arguments);o(this,"priority",4e3);o(this,"iterated",[])}bind(t){var s,n;this.marker?this.iterated.forEach(r=>{r.bind()}):(this.marker=(s=window==null?void 0:window.document)==null?void 0:s.createComment(` riba: ${this.type} `),!((n=t.parentNode)!=null&&n.insertBefore)||!this.marker||(t.parentNode.insertBefore(this.marker,t),t.parentNode.removeChild(t)))}unbind(){this.iterated&&this.iterated.forEach(t=>{t.unbind()})}routine(t,s){if(this.args===null)throw new Error("args is null");let n=!1;const r=mt(this.args[0].toString());if(s=s||[],!Array.isArray(s)&&typeof s=="object"&&s!==null&&(s=Object.entries(s).map(([l,c])=>({key:l,value:c})),n=!0),!Array.isArray(s))throw new Error(`each-${this.args[0]} needs an array or object to iterate over, but it is ${typeof s}`);const a=t.getAttribute("index-property")||this.getIterationAlias(r);s.forEach((l,c)=>{var p;const h={$parent:this.view.models};n?(h[a]=l.key,h[r]=l.value):(h[a]=c,h[r]=l);let d=this.iterated[c];if(d)if(d.models[r]!==l){let u,f=this.iterated[c];for(let m=c+1;ms.length&&Dh(this.iterated.length-s.length,()=>{const l=this.iterated.pop();if(!l)throw new Error("view is undefined!");if(l.unbind(),!this.marker||!this.marker.parentNode)throw new Error("Marker has no parent node");this.marker.parentNode.removeChild(l.els[0])}),t.nodeName==="OPTION"&&this.view.bindings&&this.view.bindings.forEach(l=>{this.marker&&l.el===this.marker.parentNode&&l.type==="value"&&l.sync&&l.sync()})}update(t){const s={};Object.keys(t).forEach(n=>{if(this.args===null)throw new Error("args is null");n!==this.args[0]&&(s[n]=t[n])}),this.iterated.forEach(n=>{n.update(s)})}}o(In,"key","each-*"),o(In,"block",!0);class Xa extends E{constructor(){super(...arguments);o(this,"publishes",!0)}bind(){this.publish()}routine(){}getValue(t){return t}}o(Xa,"key","element");class Qa extends E{routine(e,t){e.disabled=!t}}o(Qa,"key","enabled");class Ja extends E{constructor(){super(...arguments);o(this,"priority",9e4)}routine(t,s){const n=Array.from(t.children);n.sort((r,a)=>!r.dataset.sortBy||!a.dataset.sortBy?0:r.dataset.sortBya.dataset.sortBy?s?-1:1:0);for(let r=0;r0){const r=n.length>0?", ":"";n+=`${r}${t} ${s}`}else{let r=n.split(",");r=r.map(a=>a.trim()),r=r.filter(a=>!a.includes(s)),n=r.join(", ")||""}e.setAttribute("srcset",n)}}o(al,"key","srcset-*");class ll extends E{routine(e,t){const s="background-image";t==null||t===""?e.style.removeProperty(s):e.style.setProperty(s,`url(${t})`)}}o(ll,"key","style-background-image");class cl extends E{routine(e,t){const s=this.args[0];t==null||t===""?e.style.removeProperty(s.toString()):e.style.setProperty(s.toString(),t)}}o(cl,"key","style-*");class hl extends E{routine(e,t){if(t)if(typeof t=="string")e.setAttribute("style",t);else for(const s of Object.keys(t))e.style.setProperty(qh(s),t[s]||null);else for(const s of Object.keys(e.style))e.style.removeProperty(s)}}o(hl,"key","style");class dl extends E{constructor(){super(...arguments);o(this,"priority",-1e3);o(this,"originalTag")}bind(t){this.originalTag=t.tagName.toLowerCase()}routine(t,s){if(this.args===null)throw new Error("args is null");const n=this.el.tagName.toLowerCase();let r;if(s)r=this.args[0].trim().toLowerCase();else if(this.originalTag)r=this.originalTag.toLowerCase();else throw new Error("Tag name not found!");if(n!==r){const a=document.createElement(r);for(;t.childNodes.length>0;)t.firstChild&&a.appendChild(t.firstChild);const l=Array.prototype.slice.call(t.attributes);for(const c of l)a.setAttribute(c.name,c.value);t.parentNode?t.parentNode.replaceChild(a,t):console.warn("No parent"),this.el=a}}}o(dl,"key","tag-*");class ul extends E{constructor(){super(...arguments);o(this,"nested")}bind(t){this.nested=new ot(t,this.view.models,this.view.options)}routine(t,s){var n,r;(n=this.nested)==null||n.unbind(),t.innerHTML=s||"",this.nested=new ot(t,this.view.models,this.view.options),(r=this.nested)==null||r.bind()}unbind(){var t;(t=this.nested)==null||t.unbind()}update(t){var s;(s=this.nested)==null||s.update(t)}}o(ul,"key","template");class pl extends E{routine(e,t){typeof t!="string"&&typeof(t==null?void 0:t.toString)=="function"&&(t=t.toString()),e.textContent=t||""}}o(pl,"key","text");class fl extends E{constructor(){super(...arguments);o(this,"propertyKey")}toggle(){this.propertyKey&&(this.view.models[this.propertyKey]=!this.view.models[this.propertyKey])}bind(t){const s=this.args[0],n=this.el.dataset.passive==="true";t.addEventListener(s,this.toggle,{passive:n})}unbind(t){if(this.args===null)throw new Error("args is null");const s=this.args[0];t.removeEventListener(s,this.toggle)}routine(t,s){if(this.args===null)throw new Error("args is null");this.propertyKey=s}}o(fl,"key","toggle-on-*");class ml extends E{constructor(){super(...arguments);o(this,"publishes",!0);o(this,"priority",2e3);o(this,"onChange",this.publish.bind(this))}bind(t){t.addEventListener("change",this.onChange)}unbind(t){t.removeEventListener("change",this.onChange)}routine(t,s){t.type==="radio"?t.checked=Lt(t.value)!==Lt(s):t.checked=!s}getValue(t){return fs(t)}}o(ml,"key","unchecked");class gl extends ki{routine(e,t){return super.routine(e,!t)}}o(gl,"key","unless");const md="change input paste blur focus";class vl extends E{constructor(){super(...arguments);o(this,"publishes",!0);o(this,"priority",3e3);o(this,"event");o(this,"onChange",this.publish.bind(this))}getData(t){const s={type:t.type,tagName:t.tagName,contenteditable:!!t.getAttribute("contenteditable"),isRadio:!1,isOption:!1};return s.isRadio=s.tagName==="INPUT"&&s.type==="radio",s.isOption=s.tagName==="OPTION",s}bind(t){if(t.tagName==="OPTION")return;if(!this.getData(t).isRadio){this.event=t.getAttribute("event-name")||md;const n=this.event.split(" ");for(const r of n)t.addEventListener(r.trim(),this.onChange,!1)}}unbind(t){if(this.event){const s=this.event.split(" ");for(const n in s)t.removeEventListener(n.trim(),this.onChange)}}routine(t,s){let n=this.getValue(t);if(Array.isArray(s)||(s!=null?s=Lt(s):s=""),Array.isArray(n)||(n!=null?n=Lt(n):n=""),n===s)return;const r=this.getData(t);if(r.isRadio||r.isOption)return La(t,"value",s);if(t.type==="select-multiple"){if(Array.isArray(s))for(let a=0;a-1}}else t.getAttribute("contenteditable")?t.innerHTML=s:t.value=s}getValue(t){return fs(t)}}o(vl,"key","value");const gd=Object.freeze(Object.defineProperty({__proto__:null,AddClassBinder:Ha,AnimateStarBinder:Ba,AssignBinder:Va,AssignPropertyBinder:Fa,AttributeBinder:zi,BlockBinder:xn,CheckedBinder:Ua,ClassStarBinder:ja,ComponentAttributeBinder:Li,DisabledBinder:Wa,EachStarBinder:In,ElementBinder:Xa,EnabledBinder:Qa,FlexSortChildsBinder:Ja,HideBinder:Za,HtmlBinder:tl,IfBinder:ki,MaxlengthBinder:el,NoDragBinder:za,OnEventBinder:sl,ParentBinder:il,ReadonlyBinder:nl,RemoveClassBinder:rl,ShowBinder:ol,SrcsetSizeBinder:al,StyleBackgroundImageBinder:ll,StyleBinder:hl,StyleStarBinder:cl,TagStarBinder:dl,TemplateBinder:ul,TextBinder:pl,ToggleOnEventBinder:fl,UncheckedBinder:ml,UnlessBinder:gl,ValueBinder:vl},Symbol.toStringTag,{value:"Module"}));class vd{constructor(e,t,s,n){o(this,"binder");o(this,"component");o(this,"formatter");o(this,"adapter");this.binder=new Ma(e),this.component=new $a(t),this.formatter=new Ra(s),this.adapter=new Pa(n)}register(e){if(!e)throw console.error(e),new Error("The Riba module is falsy!");e.binders&&this.binder.registerAll(e.binders),e.components&&this.component.registerAll(e.components),e.formatters&&this.formatter.registerAll(e.formatters),e.adapters&&this.adapter.registerAll(e.adapters)}}const Ce=class{constructor(){o(this,"module");o(this,"lifecycle",ss.getInstance());o(this,"binders",{});o(this,"components",{});o(this,"formatters",{});o(this,"adapters",{});o(this,"parseTemplate",Ka);o(this,"parseType",Ut);o(this,"templateDelimiters",["{","}"]);o(this,"rootInterface",".");o(this,"preloadData",!0);o(this,"removeBinderAttributes",!0);o(this,"blockNodeNames",["SCRIPT","STYLE","TEMPLATE","CODE"]);o(this,"blockUnknownCustomElements",!0);o(this,"_prefix",["rv"]);o(this,"_fullPrefix",["rv-"]);if(this.module=new vd(this.binders,this.components,this.formatters,this.adapters),Ce.instance)return Ce.instance;Ce.instance=this}static handler(e,t,s,n){if(!this||!this.call){const r=new Error(`[rv-${s.type}="${s.keypath}"] Event handler "${s.keypath}" not found!"`);throw console.error(r,s,n,s.view.models),r}this.call(e,t,s.view.models,n)}set prefix(e){if(Array.isArray(e)){this._prefix=[],this._fullPrefix=[];for(const t of e)this._prefix.push(t),this._fullPrefix.push(t+"-")}}get prefix(){return this._prefix}get fullPrefix(){return this._fullPrefix}configure(e){if(e)for(const[t,s]of Object.entries(e))switch(t){case"binders":this.binders={...this.binders,...s};break;case"formatters":this.formatters={...this.formatters,...s};break;case"components":this.components={...this.components,...s};break;case"adapters":this.adapters={...this.adapters,...s};break;case"prefix":this.prefix=s;break;case"parseTemplate":this.parseTemplate=s;break;case"parseType":this.parseType=s;break;case"templateDelimiters":this.templateDelimiters=s;break;case"rootInterface":this.rootInterface=s;break;case"preloadData":this.preloadData=s;break;case"blockNodeNames":this.blockNodeNames=s;break;case"blockUnknownCustomElements":this.blockUnknownCustomElements=!!s;break;default:console.warn("Option not supported",t,s);break}}getViewOptions(e){const t={adapters:{},binders:{},components:{},formatters:{},attributeBinders:[],rootInterface:{}};if(e&&(t.binders={...t.binders,...e.binders},t.formatters={...t.formatters,...e.formatters},t.components={...t.components,...e.components},t.adapters={...t.adapters,...e.adapters}),e!=null&&e.prefix&&Array.isArray(e==null?void 0:e.prefix)){t.prefix=[],t.fullPrefix=[];for(const s of e.prefix)t.prefix.push(s),t.fullPrefix.push(s+"-")}else t.prefix=this.prefix,t.fullPrefix=this.fullPrefix;if(t.templateDelimiters=(e==null?void 0:e.templateDelimiters)||this.templateDelimiters,t.rootInterface=(e==null?void 0:e.rootInterface)||this.rootInterface,t.removeBinderAttributes=typeof(e==null?void 0:e.removeBinderAttributes)=="boolean"?e.removeBinderAttributes:this.removeBinderAttributes,t.blockNodeNames=(e==null?void 0:e.blockNodeNames)||this.blockNodeNames,t.preloadData=typeof(e==null?void 0:e.preloadData)=="boolean"?e.preloadData:this.preloadData,t.handler=(e==null?void 0:e.handler)||Ce.handler,t.binders={...this.binders,...t.binders},t.formatters={...this.formatters,...t.formatters},t.components={...this.components,...t.components},t.adapters={...this.adapters,...t.adapters},t.attributeBinders||(t.attributeBinders=[]),t.binders){const s=Object.keys(t.binders).filter(n=>n.indexOf("*")>=1);t.attributeBinders.push(...s)}return t}bind(e,t={},s){const n=this.getViewOptions(s);At.updateOptions(n);const r=new ot(e,t,n);return r.bind(),r}};let Ne=Ce;o(Ne,"instance");window.Riba=Ne;const qs=Symbol();function bd(i){return null}const Ed=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function yd(i,e,...t){return{tag:i,props:e,children:t}}function On(i){if(!i)return"";const{tag:e,props:t,children:s}=i;if(typeof e=="function")return e===bd?String(t.html):On(e(Object.assign({children:s},t)));const n=[];if(e!==qs){n.push("<",e);for(const[l,c]of Object.entries(t??{}))c!=null&&(typeof c=="boolean"&&!Ft(e)?c&&n.push(" ",l):n.push(" ",l,"=",Fi(c)))}let r=!1;return s.length&&(r=!0,e!==qs&&n.push(">"),a(s)),e!==qs&&(r?n.push(""):Ed.has(e)?n.push("/>"):n.push(">")),n.join("");function a(l){for(const c of l)c&&(Array.isArray(c)?a(c):typeof c=="string"||typeof c=="number"?n.push(Vh(c.toString())):n.push(On(c)))}}globalThis.jsxCreateElement=yd;globalThis.jsxFragment=qs;class or extends HTMLElement{constructor(){super();o(this,"_debug",!1);o(this,"_color");o(this,"templateLoaded",!1);o(this,"observedAttributesToCheck",{});o(this,"observedAttributes",[]);this._debug&&(this._color=Eo())}remove(){this&&this.parentElement&&this.parentElement.removeChild(this)}_log(t,...s){const n=this.constructor.name||this.tagName;this._color||(this._color=Eo()),Ih({namespace:n,color:this._color,mode:t},...s)}info(...t){return this._log("info",...t)}debug(...t){if(this._debug)return this._log("debug",...t)}error(...t){console.error(...t)}requiredAttributes(){return[]}async init(t){this.loadAttributes(t),this.getPassedObservedAttributes(t)}ready(){return this.allPassedObservedAttributesAreInitialized()&&this.checkRequiredAttributes()}attributeIsPassed(t){return this.hasAttribute(t)}getPassedObservedAttributes(t){const s=this.observedAttributesToCheck;for(const n of t)s[n]?s[n].passed||(s[n].passed=this.attributeIsPassed(n)):s[n]={passed:!1,initialized:!1}}allPassedObservedAttributesAreInitialized(){return Object.keys(this.observedAttributesToCheck).every(t=>{var s,n;return!((s=this.observedAttributesToCheck[t])!=null&&s.passed)||((n=this.observedAttributesToCheck[t])==null?void 0:n.initialized)})}checkRequiredAttributes(){return this.requiredAttributes().every(t=>(t=mt(t),this.scope.hasOwnProperty(t)&&typeof this.scope[t]<"u"))}parseAttribute(t){let s=t;if(typeof t!="string")return t;if(t==="true")s=!0;else if(t==="false")s=!1;else if(t==="null")s=null;else if(t==="undefined")s=void 0;else if(t==="")s=void 0;else if(!isNaN(Number(t)))s=Number(t),s>=Number.MAX_SAFE_INTEGER&&(s=t);else{const n=Vi(s);s=n||s}return s}eventHandler(t){return function(s,n,r,a){if(!this||!this.call){const l=new Error(`[rv-${r.type}="${r.keypath}"] Event handler "${r.keypath}" not found!"`);throw console.error(r,a),l}this.call(t,n,r.view.models,a)}}connectedCallback(){}disconnectedCallback(){}async attributeChangedCallback(t,s,n,r){this.observedAttributesToCheck&&this.observedAttributesToCheck[t]&&(this.observedAttributesToCheck[t].initialized=!0),n=this.parseAttribute(n);const a=mt(t);this.scope&&this.scope[a]&&(s=this.scope[a]),this.scope[a]=n,this.parsedAttributeChangedCallback(a,s,n,r)}parsedAttributeChangedCallback(t,s,n,r){this.debug("parsedAttributeChangedCallback called",t,s,n,r)}adoptedCallback(t,s){this.debug("adoptedCallback called",t,s)}async loadTemplate(){if(this.templateLoaded===!0)return null;if(!this.checkRequiredAttributes())return this.debug("Not all required attributes are set to load the template"),null;this.templateLoaded=!0;const t=await this.template();try{return t&&(t instanceof HTMLElement?(this.innerHTML="",this.appendChild(t)):typeof t=="string"?this.innerHTML=t:t.tag&&(this.innerHTML=On(t))),t}catch(s){throw this.templateLoaded=!1,s}}async beforeTemplate(){}async afterTemplate(t){this.debug("afterTemplate",t)}async onReady(){}observe(t,s){return new At(this.scope,t,s)}observeAttribute(t,s){const n=mt(t);return this.observe(n,s)}setBinderAttribute(t,s,n=null){const r=mt(t),a=this.scope[r];this.attributeChangedCallback(t,a,s,n)}getBinderAttribute(t){const s=mt(t);return this.scope[s]}loadAttributes(t){const s=this.attributes;for(const n in s){const r=s[n],a=r.nodeName;if(t.indexOf(a)!==-1){const l=r.nodeValue;this.attributeChangedCallback(a,void 0,l,null)}}}}o(or,"tagName");let P=class extends or{constructor(){super();o(this,"view",null);o(this,"riba");o(this,"_binds",!1);o(this,"_bound",!1);o(this,"_connected",!1);o(this,"_disconnected",!1);o(this,"lifecycleEvents",D.getInstance("lifecycle"));o(this,"lifecycleOptions",{});o(this,"autobind",!0);this.lifecycleEvents.trigger("Component:constructor",this.getLifecycleEventData()),this.lifecycleEvents.on("ComponentLifecycle:allBound",this.afterAllBind,this)}get binds(){return this._binds}get bound(){return this._bound}get connected(){return this._connected}get disconnected(){return this._disconnected}async init(t){try{return await super.init(t),this.lifecycleEvents.trigger("Component:init",this.getLifecycleEventData()),await this.bindIfReady()}catch(s){this.throw(s)}}throw(t){t.message&&console.error(`[${this.tagName}] ${t.message}`),this.lifecycleEvents.trigger("Component:error",t,this.getLifecycleEventData()),this.error(t)}async bindIfReady(){if(this.ready()){await this.beforeTemplate();const t=await this.loadTemplate();await this.afterTemplate(t),this.autobind&&await this.bind(),await this.onReady();return}this.debug("Not all required or passed attributes are set to load and bind the template",this.observedAttributesToCheck,this.scope)}async _beforeBind(){this._binds=!0,this.debug("Start to bind Riba"),this.lifecycleEvents.trigger("Component:beforeBind",this.getLifecycleEventData())}async beforeBind(){}async _afterBind(){this._binds=!1,this._bound=!0,this.lifecycleEvents.trigger("Component:afterBind",this.getLifecycleEventData())}async afterBind(){}async afterAllBind(){}getLifecycleEventData(){return{tagName:this.tagName.toLowerCase(),component:this,options:this.lifecycleOptions}}disconnectedCallback(){try{this._disconnected=!0,this._connected=!1,super.disconnectedCallback(),this.lifecycleEvents.trigger("Component:disconnected",this.getLifecycleEventData()),this.lifecycleEvents.off("ComponentLifecycle:allBound",this.afterAllBind,this),this.lifecycleEvents.off("ComponentLifecycle:error",this.afterAllBind,this)}catch(t){this.throw(t)}}connectedCallback(){try{this._disconnected=!1,this._connected=!0,super.connectedCallback(),this.lifecycleEvents.trigger("Component:connected",this.getLifecycleEventData())}catch(t){this.throw(t)}}async attributeChangedCallback(t,s,n,r){try{super.attributeChangedCallback(t,s,n,r),await this.bindIfReady()}catch(a){this.throw(a)}}callFormatterHandler(t){return{name:"call",read:(s,...n)=>{if(!s)throw new Error(`[${t.tagName}] Can not use "call" formatter: fn is undefined!`);return s.apply(t,n)}}}argsFormatterHandler(t){return{name:"args",read:(s,...n)=>(r,a,l,c)=>{if(!s)throw new Error(`[${t.tagName}] Can not use "args" formatter: fn is undefined!`);return n.push(r),n.push(a),n.push(l),n.push(c),s.apply(t,n)}}}async bind(){if(this.binds||this.bound)return this.view;if(!this.checkRequiredAttributes()){this.debug("Not all required attributes are set for bind");return}try{await this._beforeBind(),await this.beforeBind(),this.riba=new Ne,this.view=this.getView(),this.view&&(this.scope=this.view.models,this.view.bind()),await this._afterBind(),await this.afterBind()}catch(t){this._binds=!1,this._bound=!1,this.throw(t)}return this.view}getView(){var t;try{const s=(t=this.riba)==null?void 0:t.getViewOptions({handler:this.eventHandler(this),formatters:{call:this.callFormatterHandler(this),args:this.argsFormatterHandler(this)}});return s?new ot(Array.prototype.slice.call(this.childNodes),this.scope,s):null}catch(s){this.throw(s)}}async unbind(){try{this.view&&(this._binds=!1,this._bound=!1,this.view.unbind(),this.view=null)}catch(t){this.throw(t)}}async build(){try{this.view&&this.view.build()}catch(t){this.throw(t)}}};const wd=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class ar extends P{constructor(){super(...arguments);o(this,"templateAttributes",[]);o(this,"templateReady",!1)}connectedCallback(){this.addItemsByTemplate(),super.connectedCallback(),this.removeTemplates(),this.bindIfReady()}ready(){return super.ready()&&this.templateReady}transformTemplateAttribute(t,s,n){switch(n){case"number":return Number(s);case"boolean":return s==="true";case"string":if(typeof s=="string")return s;if(typeof(s==null?void 0:s.toString)=="function")return s.toString();case"object":return Vi(s)}return Ut(s).value}transformTemplateAttributes(t,s){return t.index=t.index||s,t}getTemplateAttributes(t,s){const n={};for(const r of this.templateAttributes)typeof t.getAttribute(r.name)!="string"&&r.required?console.error(new Error(`template "${r.name}" attribute is required!`)):n[mt(r.name)]=this.transformTemplateAttribute(r.name,t.getAttribute(r.name));return this.transformTemplateAttributes(n,s)}addItemByTemplate(t,s){const n=this.getTemplateAttributes(t,s),r=t.innerHTML;this.scope.items||(this.scope.items=[]),this.scope.items.push({...n,content:r})}addItemsByTemplate(){const t=this.querySelectorAll("template, .template");for(let s=0;s{var s;return t.nodeName!=="TEMPLATE"&&!((s=t.classList)!=null&&s.contains("template"))&&t.nodeName!=="#text"})}}const _d={name:"contains",read(i,e,t){if(ae(i))return i.indexOf(e)>-1;if(Array.isArray(i)){if(xt(e)||console.warn("[containsFormatter] The second parameter must be of type number for arrays but is "+typeof e),e=Number(e),ie(e))return ie(t)?i[e]===t:i.includes(e)}else if(j(i)&&ie(e))return ie(t)?i[e]===t:(ae(e)||console.warn("[containsFormatter] The second parameter must be of type string for objects"+typeof e),Object.keys(i).includes(String(e)));return!1}},bl={name:"size",read(i){return i&&i.length?i.length:0}},El={name:"empty",read(i){return bl.read(i)<=0}},lr={name:"get",read(i,e){return j(i)||Array.isArray(i)?i[e]:ae(i)&&xt(e)?i.charAt(e):null}},Sd={name:"first",read(i){return lr.read(i,0)}},Ad={name:"isLast",read(i,e){return i.length===e+1}},Td={name:"last",read(i){return lr.read(i,i.length-1)}},Cd={name:"random",read(i,e=0){if(Array.isArray(i))return i[Math.floor(Math.random()*i.length)];if(xt(i)){const t=i;return Math.floor(Math.random()*(t-e+1)+e)}return null}},Ld={name:"range",read(i,e,t){return e=Number(xt(e)?e:0),t=Number(xt(t)?t:i.length-1),t>i.length-1&&(t=i.length-1),e>t?[]:i.slice(Number(e||0),1+t)}},kd={name:"set",read(i,e,t){return t||(t=e),j(i)||Array.isArray(i)?i[e]=t:i=t,i}},Nd={name:"overlaps",read(i,e){for(const t of i)for(const s of e)if(t.equals&&t.equals(s)||t===s)return!0;return!1}},xd={name:"join",read(i,e){return i.join(e)}},Id={name:"and",read(i,e){return i&&e}},Od={name:"between",read(i,...e){return i>=e[0]&&i<=e[1]}},Dd={name:"egt",read(i,e){return i>=e}},Pd={name:"eq",read(i,e){return i===e}},Md={name:"gt",read(i,e){return i>e}},$d={name:"ne",read(i,e){return i!==e}},Rd={name:"lt",read(i,e){return ie===0?i:yl(e,i%e),qd={name:"gcd",read:yl},Yd={name:"even",read(i){return i%2===0}},Kd={name:"uneven",read(i){return i%2!==0}},Gd={name:"digits",read(i){return xt(i)?i:ps(i)}},Xd={name:"args",read(i,...e){return(t,s,n,r)=>(e.push(t),e.push(s),e.push(n),e.push(r),i.apply(this,e))}},Qd={name:"debug",read(i,e="debug"){return console[e](i),i}},Jd={name:"default",read(i,e){return ie(i)?ae(i)?i.length>0?i:e:i===null?e:i:e}},Zd={name:"is-desktop",read(){return nd()}},tu={name:"is-mobile",read(){return id()}},eu={name:"call",read(i,...e){return i.apply(this,e)}},su={name:"call-name",read:function(i,e,...t){return i[e](...t)}},iu={name:"map",read(i,e,t){const s=Array.prototype.slice.call(arguments);return s.splice(1,2),e[t].apply(e,s)}},nu={name:"os",read(){return Oa()}},ru={name:"prefer",read(i,e){return e||i}},ou={name:"ternary",read(i,e,t){return i?e:t}},au={name:"append",read(i,e){return i+e}},lu={name:"capitalize",read(i){return Yh(i)}},cu={name:"cut",read(i,e,t=""){return i?typeof i!="string"?(console.warn("[cutFormatter] Value must be of type string"),i):i.length>e?i.substring(e,e===-1?void 0:-1)+t:i:""}},hu={name:"downcase",read(i){return i.toLowerCase()}},du={name:"ends-with",read(i,e){return typeof i!="string"?(console.warn("[endsWithFormatter] Value must be of type string"),i):i.endsWith(e)}},uu={name:"filled",read(i){return ae(i)&&!El.read(i.replace(/\s/g,""))}},qi={name:"handleize",read(i){return i?zh(i):(console.warn("[handleizeFormatter] str is not set"),"")}},pu={name:"match",read(i,e,t){return!i||!e?!1:i.match(new RegExp(e,t))}},fu={name:"padStart",read(i,e=2,t="0"){return i.padStart(e,t)}},mu={name:"padEnd",read(i,e=2,t="0"){return i.padEnd(e,t)}},Dn={name:"to-integer",read(i){const e=parseInt(i*1,10);return isNaN(e)?0:e}},Pn={name:"to-float",read(i){const e=parseFloat(i*1);return isNaN(e)?0:e}},Mn={name:"to-decimal",read(i){if(!Dn.read)throw new Error("toIntegerFormatter must have a read function");if(!Pn.read)throw new Error("toFloatFormatter must have a read function");const e=Dn.read(i*1),t=Pn.read(i);return e==t?e:t}},$n={name:"is-integer",read(i){return i===+i&&i===(i|0)}},gu=".",vu="'",Co=2,bu={name:"numberFormat",read(i,e=Co,t=gu,s=vu){if(!Mn.read)throw new Error("toDecimalFormatter must have a read function");if(!$n.read)throw new Error("isIntegerFormatter must have a read function");i=xt(i)?i:Mn.read(i),$n.read(e)||(e=Co);let n=(+(Math.round(+(Math.abs(i)+"e"+e))+"e"+-e)).toFixed(e);i<0&&(n="-"+n);const r=n.split(".");return r.length==2?r[0].replace(/\B(?=(\d{3})+(?!\d))/g,s)+t+r[1]:r[0].replace(/\B(?=(\d{3})+(?!\d))/g,s)}},Eu={name:"pluralize",read(i,e,t){return t===null&&(t=e+"s"),Array.isArray(i)&&(i=i.length),i===1?e:t}},yu={name:"prepend",read(i,e){return e+i}},wu={name:"upcase",read(i){return i.toUpperCase()}},_u={name:"replace",read(i,e,t){return i.replace(new RegExp(e,"g"),t)}},Su={name:"replaceFirst",read(i,e,t){return i.replace(e,t)}},Au={name:"slice",read(i,e,t){return i.slice(e,t)}},Tu={name:"starts-with",read(i,e){return typeof i!="string"?(console.warn("[startsWithFormatter] Value must be of type string"),i):i.startsWith(e)}},Cu={name:"strip",read(i){return i.trim()}},Lu={name:"strip-html",read(i){return Ti(i)}},ku={name:"boolean",read(i){return i==="true"?!0:i==="false"?!1:!!i}},Nu={name:"is-array",read:Array.isArray},xu={name:"is-boolean",read:ye},Iu={name:"is-defined",read:ie},Ou={name:"is-number",read:xt},Du={name:"is-object",read:j},Pu={name:"is-string",read(i){return ae(i)}},Mu={name:"is-undefined",read:Ta},$u={name:"json",read(i,e=2,t=!0){return Fi(i,e,t)}},Ru={name:"parse",read(i){return j(i)||Array.isArray(i)||typeof i=="boolean"||typeof i=="number"?(console.warn("[parseFormatter] You do not need to parse the value because since it already been parsed"),i):typeof i=="string"?Ut(i,!0).value:null}},Bu={name:"toBase64",read(i){return Bh(i)}},Hu={name:"to-string",read(i,e){if(Array.isArray(i))for(const t in i)i[t]&&(i[t]=Lt(i[t]));else if(j(i))for(const t in i)i[t]=Lt(i[t]);else i=Lt(i);return e?i||e:i}},Fu={name:"to-number",read(i,e){const t=Fh(i);return e?t||e:t}},Vu=Object.freeze(Object.defineProperty({__proto__:null,andFormatter:Id,appendFormatter:au,argsFormatter:Xd,betweenFormatter:Od,booleanFormatter:ku,callFormatter:eu,callNameFormatter:su,capitalizeFormatter:lu,containsFormatter:_d,cutFormatter:cu,debugFormatter:Qd,defaultFormatter:Jd,digitsFormatter:Gd,dividedByFormatter:Wd,downcaseFormatter:hu,egtFormatter:Dd,eltFormatter:Bd,emptyFormatter:El,endsWithFormatter:du,eqFormatter:Pd,evenFormatter:Yd,filledFormatter:uu,firstFormatter:Sd,gcdFormatter:qd,getFormatter:lr,gtFormatter:Md,handleizeFormatter:qi,isArrayFormatter:Nu,isBooleanFormatter:xu,isDefinedFormatter:Iu,isDesktopFormatter:Zd,isIntegerFormatter:$n,isLastFormatter:Ad,isMobileFormatter:tu,isNumberFormatter:Ou,isObjectFormatter:Du,isStringFormatter:Pu,isUndefinedFormatter:Mu,joinFormatter:xd,jsonFormatter:$u,lastFormatter:Td,ltFormatter:Rd,mapFormatter:iu,matchFormatter:pu,minusFormatter:Ud,moduloFormatter:zd,neFormatter:$d,notFormatter:Fd,numberFormatFormatter:bu,orFormatter:Hd,osFormatter:nu,overlapsFormatter:Nd,padEndFormatter:mu,padStartFormatter:fu,parseFormatter:Ru,pluralizeFormatter:Eu,plusFormatter:Vd,preferFormatter:ru,prependFormatter:yu,randomFormatter:Cd,rangeFormatter:Ld,replaceFirstFormatter:Su,replaceFormatter:_u,setFormatter:kd,sizeFormatter:bl,sliceFormatter:Au,startsWithFormatter:Tu,stripFormatter:Cu,stripHtmlFormatter:Lu,ternaryFormatter:ou,timesFormatter:jd,toBase64Formatter:Bu,toDecimalFormatter:Mn,toFloatFormatter:Pn,toIntegerFormatter:Dn,toNumberFormatter:Fu,toStringFormatter:Hu,unevenFormatter:Kd,upcaseFormatter:wu},Symbol.toStringTag,{value:"Module"})),Uu={formatters:Vu,binders:gd,services:ld,components:wd,adapters:hd,init(i={}){return ms.setSingleton(i),window.onerror=(e,t,s,n,r)=>{console.error(e,t,s,n,r)},window.addEventListener("error",e=>{console.error(e)}),this}},Le=class{constructor(){o(this,"history",[]);return Le.instance||(Le.instance=this),Le.instance}currentStatus(){return this.history[this.history.length-1]}prevStatus(){const e=this.history;return e.length<2?null:e[e.length-2]}add(e,t=null){this.history.push({namespace:t,url:e})}};let Ys=Le;o(Ys,"instance");const is="router-error",ju="no-barba",Wu="no-barba-prefetch";class Yi{constructor(e="replace"){o(this,"oldContainer");o(this,"newContainer");o(this,"newContainerLoading");o(this,"deferred",ln());o(this,"action");this.action=e}async init(e,t){this.oldContainer=e,this.deferred=ln();const s=ln();return this.newContainerLoading=s.promise,this.start(),this.newContainer=await t,s.resolve(this.newContainer),this.deferred.promise}async done(){if(!this.oldContainer)throw new Error("Can't remove old container");if(this.action==="replace"&&this.oldContainer.remove(),!this.newContainer)throw new Error("Can't show new container");return this.newContainer.style.visibility="visible",this.deferred.resolve(void 0)}}class zu extends Yi{async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");await this.newContainerLoading,this.finish()}async finish(){return document.body.scrollTop=0,this.done()}}class wl extends Yi{constructor(t=!0){super("replace");o(this,"scrollToTop");o(this,"durationMs",200);this.scrollToTop=t}async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");this.oldContainer&&(this.oldContainer.style.transition=`opacity ${this.durationMs}ms`,this.oldContainer.style.opacity="0"),this.scrollToTop&&await nr(window,"start","vertical","smooth");const t=await this.newContainerLoading;t.style.opacity="0",t.style.transition=`opacity ${this.durationMs}ms`,setTimeout(()=>{this.finish(t)},this.durationMs)}async finish(t){return t.style.opacity="1",this.done()}}class gs extends Yi{constructor(t="replace",s=!0){super(t);o(this,"action");o(this,"scrollToTop");this.action=t,this.scrollToTop=s}async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");this.oldContainer&&(this.oldContainer.style.display="none"),this.scrollToTop&&await nr(window,"start","vertical","smooth"),await this.newContainerLoading,await this.finish(),this.oldContainer&&(this.oldContainer.style.display="")}async finish(){return this.done()}}class qu{constructor(){o(this,"namespace");o(this,"container");o(this,"dispatcher",D.getInstance())}extend(e){return ue({deep:!1},this,e)}init(){this.dispatcher.on("initStateChange",(e,t,s)=>{s&&s.namespace===this.namespace&&this.onLeave()}),this.dispatcher.on("newPageReady",(e,t,s,n)=>{this.container=n,t.namespace===this.namespace&&this.onEnter()}),this.dispatcher.on("transitionCompleted",(e,t,s)=>{t.namespace===this.namespace&&this.onEnterCompleted(),s&&s.namespace===this.namespace&&this.onLeaveCompleted()})}}class Zt{static getPrefetchLinkElements(e){return e.querySelectorAll('link[href][rel="dns-prefetch"], link[href][rel="preconnect"], link[href][rel="prefetch"], link[href][rel="subresource"], link[href][rel="preload"], link[href][rel="router-preload"]')}static parseTitle(e){let t="";const s=e.querySelector("title");return s&&s.innerText&&(t=s.innerText),t}static parseResponse(e,t,s,n=!0){let r="",a=[];const l=document.createElement("template");return l.innerHTML=e,t&&(r=this.parseTitle(l.content)),n&&(a=this.getPrefetchLinkElements(l.content)),{container:this.getContainer(l,s),title:r,prefetchLinks:a}}static parseInitial(e,t,s=!0){let n="",r=[];const a=this.getContainer(document,t);return e&&(n=this.parseTitle(document)),s&&(r=this.getPrefetchLinkElements(document)),{container:a,title:n,prefetchLinks:r}}static getContainer(e,t){if(!e)throw new Error("Barba.js: [getContainer] No element to get container from, maybe the DOM is not ready!");const s=this.parseContainer(e,t);if(!s)throw new Error("[DOM] No container found");return s}static getNamespace(e){return e&&e.dataset&&e.dataset.namespace?e.dataset.namespace:null}static putContainer(e,t){e=e,e.style.visibility="hidden",t.appendChild(e)}static parseContainer(e,t){if(!e){const n=new Error("New page not loaded!");throw console.error(n,e),n}let s;if(e.content?s=e.content.querySelector(t):s=e.querySelector(t),!s){const n=new Error(`No container with selector "${t}" found!`);throw console.error(n,e),n}return s}}const ke=class{constructor(e){if(this.viewId=e,this.viewId=e,ke.instances[this.viewId])return ke.instances[this.viewId];ke.instances[this.viewId]=this,this.onLinkEnterIntern=this.onLinkEnterIntern.bind(this)}static getInstance(e="main"){const t=ke.instances[e];return t||new this(e)}init(e=!1){if(!window.history.pushState)return!1;e&&(this.deInit(),document.body.addEventListener("mouseover",this.onLinkEnterIntern,{passive:!0}),document.body.addEventListener("touchstart",this.onLinkEnterIntern,{passive:!0}))}deInit(){document.body.removeEventListener("mouseover",this.onLinkEnterIntern),document.body.removeEventListener("touchstart",this.onLinkEnterIntern)}initBinder(e,t){if(!window.history.pushState)return!1;this.deInitBinder(e,t),e.addEventListener("mouseover",this.onLinkEnter.bind(this,t,e),{passive:!0}),e.addEventListener("touchstart",this.onLinkEnter.bind(this,t,e),{passive:!0})}deInitBinder(e,t){e.removeEventListener("mouseover",this.onLinkEnter.bind(this,t,e)),e.removeEventListener("touchstart",this.onLinkEnter.bind(this,t,e))}onLinkEnter(e,t,s){if(t.classList&&(t.classList.contains(Wu)||t.classList.contains(is)))return;e=ut(e).url;const n=z.preventCheck(e,t,s);if(e&&n){const r=z.getInstance(this.viewId);r?r.loadResponseCached(e,!1,!1).catch(a=>{t.classList.add(is),console.error(e),console.error(a)}):(console.warn(`[Prefetch.onLinkEnter] No pjax instance for viewId "${this.viewId}" found!`),t.classList.add(is))}}url(e){e=ut(e).url;const t=z.preventCheck(e);if(e&&t){const s=z.getInstance(this.viewId);s?s.loadResponseCached(e,!1,!1).catch(n=>{console.error(n)}):console.warn(`[Prefetch.url] No pjax instance for viewId "${this.viewId}" found!`)}}onLinkEnterIntern(e){let t=Ui(e);if(!t)throw new Error("HTML Element not set");for(;t&&!z.getHref(t);)t=t.parentNode;if(!t||t.nodeName!=="A")return;const s=z.getHref(t);if(!(t.classList.contains("route")||t.hasAttribute("rv-route"))){if(!s){console.warn("Url is not defined, you can't cache the link without the url. Please make sure your element has the href attribute or pass the url directly to this function.",t);return}return this.onLinkEnter(s,t,e)}}};let xe=ke;o(xe,"instances",{});var _l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yu(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var De=1e3,Pe=De*60,Me=Pe*60,le=Me*24,Ku=le*7,Gu=le*365.25,Xu=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return Qu(i);if(t==="number"&&isFinite(i))return e.long?Zu(i):Ju(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function Qu(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return t*Gu;case"weeks":case"week":case"w":return t*Ku;case"days":case"day":case"d":return t*le;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Me;case"minutes":case"minute":case"mins":case"min":case"m":return t*Pe;case"seconds":case"second":case"secs":case"sec":case"s":return t*De;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Ju(i){var e=Math.abs(i);return e>=le?Math.round(i/le)+"d":e>=Me?Math.round(i/Me)+"h":e>=Pe?Math.round(i/Pe)+"m":e>=De?Math.round(i/De)+"s":i+"ms"}function Zu(i){var e=Math.abs(i);return e>=le?Ms(i,e,le,"day"):e>=Me?Ms(i,e,Me,"hour"):e>=Pe?Ms(i,e,Pe,"minute"):e>=De?Ms(i,e,De,"second"):i+" ms"}function Ms(i,e,t,s){var n=e>=t*1.5;return Math.round(i/t)+" "+s+(n?"s":"")}let tp=class{constructor(){this.cache=new Map}get(e){return this.cache.get(e)}set(e,t){this.cache.set(e,t)}keys(){return Array.from(this.cache.keys())}del(e){this.cache.delete(e)}clear(){this.cache.clear()}};var ep=tp;const Lo=Xu,sp=ep;function ip({cleanupInterval:i="5 mins",customStorage:e}={}){let t=e||new sp,s;const n=m=>typeof m>"u",r=m=>typeof m<"u",a=m=>typeof m=="function",l=m=>typeof m=="number",c=m=>m&&new Date(m).getTime(){w.indexOf(m)===0&&t.del(w)});return}t.del(m)}function u(){return t.clear()}function f(){clearInterval(s)}return i&&(s=setInterval(async()=>{(await t.keys()).forEach(async v=>{const b=await t.get(v);if(b){const w=b[1];c(w)&&t.del(v)}})},Lo(i))),{resolve:d,del:p,clear:u,teardown:f}}var np=ip;const rp=Yu(np);class Sl{constructor(){o(this,"data");this.data={}}set(e,t){return this.data[e]=t,this.data[e]}get(e){return this.data[e]}reset(){this.data={}}}function pe(i){return new Promise((e,t)=>{i.oncomplete=i.onsuccess=()=>e(i.result),i.onabort=i.onerror=()=>t(i.error)})}function op(i,e){const t=indexedDB.open(i);t.onupgradeneeded=()=>t.result.createObjectStore(e);const s=pe(t);return(n,r)=>s.then(a=>r(a.transaction(e,n).objectStore(e)))}let dn;function ys(){return dn||(dn=op("keyval-store","keyval")),dn}function ap(i,e=ys()){return e("readonly",t=>pe(t.get(i)))}function lp(i,e,t=ys()){return t("readwrite",s=>(s.put(e,i),pe(s.transaction)))}function cp(i,e=ys()){return e("readwrite",t=>(t.delete(i),pe(t.transaction)))}function hp(i=ys()){return i("readwrite",e=>(e.clear(),pe(e.transaction)))}function dp(i,e){return i.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},pe(i.transaction)}function up(i=ys()){return i("readonly",e=>{if(e.getAllKeys)return pe(e.getAllKeys());const t=[];return dp(e,s=>t.push(s.key)).then(()=>t)})}const pp={get:ap,set:lp,keys:up,del:cp,clear:()=>hp()};rp({customStorage:window.ssr?void 0:pp});const G=class{constructor({id:e,action:t="replace",wrapper:s,containerSelector:n="[data-namespace]",listenAllLinks:r=!1,listenPopstate:a=!0,parseTitle:l=!0,changeBrowserUrl:c=!0,prefetchLinks:h=!0,scrollToTop:d=!0,scrollToAnchorOffset:p=ce.options.scrollToAnchorOffset}){o(this,"history",new Ys);o(this,"cacheEnabled",!0);o(this,"transitionProgress",!1);o(this,"listenAllLinks");o(this,"listenPopstate");o(this,"parseTitle");o(this,"changeBrowserUrl");o(this,"dispatcher");o(this,"transition");o(this,"wrapper");o(this,"viewId","main");o(this,"containerSelector");o(this,"prefetchLinks");o(this,"scrollToAnchorOffset");e&&(this.viewId=e);let u=this;return this.scrollToAnchorOffset=p||0,this.dispatcher=new D(this.viewId),this.listenAllLinks=r,this.listenPopstate=a,this.parseTitle=l,this.changeBrowserUrl=c,this.containerSelector=n,this.prefetchLinks=h,G.instances[this.viewId]&&(u=G.instances[this.viewId]),u.transition=u.transition||new gs(t,d),u.wrapper=u.wrapper||s,u.containerSelector=u.containerSelector||n,u.listenAllLinks=ye(u.listenAllLinks)?u.listenAllLinks:r,u.listenPopstate=ye(u.listenPopstate)?u.listenPopstate:a,u.parseTitle=ye(u.parseTitle)?u.parseTitle:l,u.changeBrowserUrl=ye(u.changeBrowserUrl)?u.changeBrowserUrl:c,u.prefetchLinks=ye(u.prefetchLinks)?u.prefetchLinks:h,u.wrapper&&u.wrapper.setAttribute("aria-live","polite"),G.instances[this.viewId]=u,G.instances[this.viewId]}static getInstance(e="main"){const t=G.instances[e];return t||console.warn(`[Pjax.getInstance] No pjax instance for viewId "${e}" found!`),t}static preventCheckUrl(e){const t=document.createElement("a");return t.setAttribute("href",e),!(!t||!e||hn(e)===hn(location.href)||window.location.protocol!==t.protocol||window.location.hostname!==t.hostname||To()!==To(t.port))}static preventCheck(e,t,s){return!(!window.history.pushState||!this.preventCheckUrl(e)||s&&(s&&s.which&&s.which>1||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)||t&&(t.target&&t.target==="_blank"||t.getAttribute&&typeof t.getAttribute("download")=="string"||t.classList.contains(ju)))}static getHref(e){if(e){if(e.getAttribute&&typeof e.getAttribute("xlink:href")=="string")return e.getAttribute("xlink:href")||void 0;if(typeof e.href=="string"||e.hasAttribute&&e.hasAttribute("href")){const t=e.href||e.getAttribute("href");if(!t)throw console.error("href attribute not found for element: ",e),new Error("href attribute not found!");return t}}}setActiveWrapper(e){this.wrapper=e}start(){if(this.wrapper)try{this.init(this.wrapper,this.listenAllLinks,this.listenPopstate)}catch(e){console.error(e)}else console.error("Can't init pjax without wrapper")}getCurrentUrl(){return hn(Ci())}goTo(e,t=!1){if(t){const s=window.open(e,"_blank");return s?s.focus():!1}if(e.startsWith("http")&&(e=ut(e).url),e.startsWith("http"))this.forceGoTo(e);else return this.changeBrowserUrl&&window.history.pushState(null,"",e),this.onStateChange(void 0,e)}getTransition(){return this.transition||new gs}prefetchLink(e){if(e=ut(e).url,G.preventCheckUrl(e))return this.loadResponseCached(e,!0,!1)}prefetchLinkElement(e,t){const s=e.getAttribute("rel"),n=G.getHref(e);if(s==="router-preload"&&n&&this.cacheEnabled&&!e.classList.contains(is))try{this.prefetchLink(n)}catch(r){e.classList.add(is),console.error(r)}t.appendChild(e)}removePrefetchLinks(e){e.querySelectorAll('link[href][rel="dns-prefetch"], link[href][rel="preconnect"], link[href][rel="prefetch"], link[href][rel="subresource"], link[href][rel="preload"], link[href][rel="router-preload"]').forEach(s=>{s&&s.parentNode&&s.parentNode.removeChild(s)})}replacePrefetchLinkElements(e){const t=document.head||document.getElementsByTagName("head")[0];this.removePrefetchLinks(t),e.forEach(s=>{this.prefetchLinkElement(s,t)})}async loadCached(e){try{const{responsePromise:t}=await this.loadResponseCached(e,!1,!0);if(!this.wrapper)throw new Error("[Pjax] you need a wrapper!");const s=await t;return Zt.putContainer(s.container,this.wrapper),this.parseTitle===!0&&s.title&&(document.title=s.title),this.prefetchLinks===!0&&s.prefetchLinks&&this.replacePrefetchLinkElements(s.prefetchLinks),s.container}catch(t){throw console.error(t),this.forceGoTo(e),t}}async loadResponseCached(e,t=!1,s=!0){let n;try{if(this.cacheEnabled&&(n=G.cache.get(e),n))return{fromCache:!0,responsePromise:n};n=this.loadResponse(e,t),this.cacheEnabled&&n&&G.cache.set(e,n)}catch(r){throw console.error(r),s&&this.forceGoTo(e),r}return{fromCache:!1,responsePromise:n}}async loadResponse(e,t=!1){const s=t?{cache:"force-cache"}:{},n=await We.get(e,void 0,"html",{},s);if(!n||!n.body)throw new Error("No body!");return Zt.parseResponse(n.body,this.parseTitle,this.containerSelector,this.prefetchLinks)}bindEvents(e,t){e&&document.addEventListener("click",this.onLinkClickIntern.bind(this)),t&&window.addEventListener("popstate",this.onStateChange.bind(this))}forceGoTo(e){console.warn("forceGoTo",e),e&&e.href&&(window.location=e),typeof e=="string"&&(window.location.href=e)}onLinkClickIntern(e){let t=Ui(e);for(;t&&!G.getHref(t);)t=t.parentNode;if(!t||t.nodeName!=="A")return;const s=G.getHref(t);if(!(t.classList.contains("route")||t.hasAttribute("rv-route"))){if(!s)throw new Error("Url is not defined, you can't cache the link without the url. Please make sure your element has the href attribute or pass the url directly to this function.");return t.classList.contains("route")||t.hasAttribute("rv-route")?!1:this.onLinkClick(e,t,s)}}onLinkClick(e,t,s,n=!1){const{url:r,location:a}=ut(s),{location:l}=ut();if(a.hash&&l.pathname===a.pathname){let h=a.hash.slice(1);h=decodeURI(h);const d=document.getElementById(h);if(d)return e.stopPropagation(),e.preventDefault(),this.changeBrowserUrl&&window.history.pushState(null,"",r),je(d,this.scrollToAnchorOffset)}if(!r)throw new Error("url is falsy");G.preventCheck(r,t,e)&&(e.stopPropagation(),e.preventDefault(),this.dispatcher.trigger("linkClicked",t,e),this.goTo(r,n))}async onStateChange(e,t=this.getCurrentUrl()){t=ut(t).url;const s=ut(this.history.currentStatus().url).url;if(this.changeBrowserUrl&&s===t)return!1;this.history.add(t),this.dispatcher.trigger("initStateChange",this.viewId,this.history.currentStatus(),this.history.prevStatus());const n=Zt.getContainer(document,this.containerSelector),r=this.loadCached(t),a=this.getTransition();this.transitionProgress=!0;const l=a.init(n,r);this.onNewContainerLoaded(await r),await l,this.onTransitionEnd()}onNewContainerLoaded(e){const t=this.history.currentStatus();t.namespace=Zt.getNamespace(e);const s=yo(e);this.dispatcher.trigger("newPageReady",this.viewId,this.history.currentStatus(),this.history.prevStatus(),e,e.innerHTML,s,!1)}onTransitionEnd(){this.transitionProgress=!1,this.dispatcher.trigger("transitionCompleted",this.viewId,this.history.currentStatus(),this.history.prevStatus())}init(e,t,s){const n=Zt.parseInitial(this.parseTitle,this.containerSelector,this.prefetchLinks),r=window.location.pathname;if(this.cacheEnabled){const l=ut(window.location.href).url;G.cache.get(r)||this.loadResponseCached(l,!1,!1)}this.replacePrefetchLinkElements(n.prefetchLinks),this.wrapper=e,this.history.add(this.getCurrentUrl(),Zt.getNamespace(n.container)),this.dispatcher.trigger("initStateChange",this.viewId,this.history.currentStatus());const a=yo(n.container);this.dispatcher.trigger("newPageReady",this.viewId,this.history.currentStatus(),{},n.container,n.container.innerHTML,a,!0),this.dispatcher.trigger("transitionCompleted",this.viewId,this.history.currentStatus()),this.bindEvents(t,s)}};let z=G;o(z,"cache",new Sl),o(z,"instances",{});class ce{static get options(){return this._options}constructor(){}static getSingleton(){if(this.instance)return this.instance;throw new Error("Singleton of RouterService not defined, please call setSingleton first!")}static setSingleton(e={}){return this.instance?(console.warn("Singleton of RouterService already defined!"),this.instance):(e.defaultTransition=e.defaultTransition??new gs,e.scrollToAnchorOffset=e.scrollToAnchorOffset??0,this._options=e,this.instance=new this,this.instance)}}o(ce,"_options"),o(ce,"instance");const fp=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Yi,BaseView:qu,CustomTransition:zu,Dom:Zt,FadeTransition:wl,HideShowTransition:gs,Pjax:z,Prefetch:xe,RouterService:ce},Symbol.toStringTag,{value:"Module"})),mp=qi.read;class Rn extends E{constructor(){super(...arguments);o(this,"nested",null)}async routine(t,s){const n=t;s=s||{},s.listenAllLinks=!1,s.listenPopstate=!1,s.parseTitle=!1,s.transition=s.transition||new gs,s.viewId=s.viewId||t.getAttribute("id")||mp(s.url),s.containerSelector=s.containerSelector||"[data-namespace]",s.changeBrowserUrl=!1;const r=new z(s),{responsePromise:a}=await r.loadResponseCached(s.url,!1,!1),l=await a;n.replaceWith(l.container),l.container.style.visibility="visible",j(this.view.models)||(this.view.models={}),this.nested&&this.nested.unbind(),this.nested=new ot(l.container,this.view.models,this.view.options),this.nested.bind()}unbind(){this.nested&&this.nested.unbind()}}o(Rn,"key","view-static"),o(Rn,"block",!0);class Al extends E{constructor(){super(...arguments);o(this,"prefetch");o(this,"options",{url:"",viewId:"main",removeAfterActivation:!1,newTab:!1,newTabOnExtern:!0});o(this,"onClick",this._onClick.bind(this))}_onClick(t){const s=z.getInstance(this.options.viewId);if(ji(this.options.url,!0))console.info("already on this site, do nothing"),t.stopPropagation(),t.preventDefault();else if(ad(this.options.url)){if(!s)return;t.stopPropagation(),t.preventDefault();const n=this.options.newTab||this.options.newTabOnExtern;s.goTo(this.options.url,n)}else if(this.options.url){if(!s)return;s.onLinkClick(t,this.el,this.options.url,this.options.newTab)}this.options.removeAfterActivation&&this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}bind(t){t.classList.add("route"),!window.ssr&&(this.onClick=this.onClick.bind(this),t.addEventListener("click",this.onClick))}routine(t,s){ae(s)?this.options.url=s:j(s)&&(this.options=s),this.options.viewId=this.options.viewId||"main",this.prefetch=new xe(this.options.viewId),this.options.newTab=!1;const n=t.tagName==="A";if(!this.options.url&&n){const r=t.getAttribute("href");r&&(this.options.url=r)}t.getAttribute("target")==="_blank"&&(this.options.newTab=!0),this.options.url=ut(this.options.url).url,n&&(!t.href||!t.getAttribute("href"))&&this.options.url&&(t.setAttribute("href",this.options.url),t.href=this.options.url),this.options.newTab||this.prefetch.initBinder(t,this.options.url)}unbind(t){var s;(s=this.prefetch)==null||s.deInitBinder(t,this.options.url),t.removeEventListener("click",this.onClick)}}o(Al,"key","route");class Tl extends E{constructor(){super(...arguments);o(this,"dispatcher",new D("main"));o(this,"url");o(this,"className","");o(this,"onUrlChange",this._onUrlChange.bind(this))}_onUrlChange(){if(this.url){if(ji(this.url))return this.el.classList.add(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!0),!0;this.el.classList.remove(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!1)}return!1}bind(){this.dispatcher.on("newPageReady",this.onUrlChange)}routine(t,s){this.url=s,this.className=this.args[0].toString()||"active";const n=t.tagName==="A";if(!this.url&&n){const r=t.getAttribute("href");r&&(this.url=r)}this.onUrlChange()}unbind(){this.dispatcher.off("newPageReady",this.onUrlChange)}}o(Tl,"key","route-class-*");class Cl extends E{routine(e,t){var n;if(window.ssr)return;const s=e.tagName==="A";if(!t&&s){const r=e.getAttribute("href");r&&(t=r)}t&&((n=z.getInstance())==null||n.prefetchLink(t))}}o(Cl,"key","route-preload");class Ll extends E{constructor(){super(...arguments);o(this,"dispatcher",new D("main"));o(this,"className");o(this,"url");o(this,"onUrlChange",this._onUrlChange.bind(this))}_onUrlChange(){if(!this.url)throw new Error("url is not defined!");if(!this.className)throw new Error("className is not defined!");return rd(this.url)?(this.el.classList.add(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!0),!0):(this.el.classList.remove(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!1),!1)}routine(t,s){this.url=s,this.className=this.args[0].toString()||"active";const n=t.tagName==="A";if(!this.url&&n){const r=t.getAttribute("href");r&&(this.url=r)}this.onUrlChange()}bind(){this.dispatcher.on("newPageReady",this.onUrlChange)}unbind(){this.dispatcher.off("newPageReady",this.onUrlChange)}}o(Ll,"class","parent-route-class-*");const un=()=>{window.history.back()};class kl extends E{constructor(){super(...arguments);o(this,"priority",3e3);o(this,"eventName")}unbind(t){this.eventName&&t.removeEventListener(this.eventName,un)}routine(t){if(this.args===null)throw new Error("args is null");this.eventName&&t.removeEventListener(this.eventName,un),this.eventName=this.args[0],t.addEventListener(this.args[0],un)}}o(kl,"key","route-back-on-*");const gp=Object.freeze(Object.defineProperty({__proto__:null,ParentRouteClassStarBinder:Ll,RouteBackOnStarBinder:kl,RouteBinder:Al,RouteClassStarBinder:Tl,RoutePreloadBinder:Cl,ViewStaticBinder:Rn},Symbol.toStringTag,{value:"Module"})),Dr=class extends P{constructor(){super();o(this,"autobind",!1);o(this,"scope",{src:"",id:"",async:!0,defer:!0})}static get observedAttributes(){return["src","id","async","defer"]}connectedCallback(){super.connectedCallback(),super.init(Dr.observedAttributes)}async onReady(){await super.onReady(),this.scope.id||(this.scope.id=Na("script-")),Xh(this.scope.src,this.scope.id,this.scope.async)}requiredAttributes(){return["src"]}template(){return null}};let Ks=Dr;o(Ks,"tagName","router-load-script");const hs=class extends P{constructor(){super();o(this,"events",D.getInstance("main"));o(this,"nested",null);o(this,"wrapper",null);o(this,"pjax",null);o(this,"prefetch",null);o(this,"scope",{id:"main",action:"replace",scrollToTop:!0,listenAllLinks:!0,listenPopstate:!0,scrollToAnchorHash:!0,scrollToAnchorOffset:ce.options.scrollToAnchorOffset,datasetToRootScope:!0,parseTitle:!0,changeBrowserUrl:!0,prefetchLinks:!0,transition:ce.options.defaultTransition})}static get observedAttributes(){return["id","action","container-selector","scroll-to-top","listen-all-links","listen-popstate","scroll-to-anchor-hash","scroll-to-anchor-offset","dataset-to-root-scope","parse-title","change-browser-url","prefetch-links"]}connectedCallback(){super.connectedCallback(),this.init(hs.observedAttributes)}addEventListeners(){this.events.on("newPageReady",this.onPageReady,this),this.events.on("initStateChange",this.onTransitionInit,this),this.events.on("transitionCompleted",this.onTransitionCompleted,this)}removeEventListeners(){this.events.off("newPageReady",this.onPageReady,this),this.events.off("initStateChange",this.onTransitionInit,this),this.events.off("transitionCompleted",this.onTransitionCompleted,this)}getContainerSelector(){return this.scope.id==="main"?`${hs.tagName} > *:first-child`:`${hs.tagName}#${this.scope.id} > *:first-child`}initAndStartPjax(){if(!this.scope.id){console.error("Id attribute is required!");return}const t={id:this.scope.id,action:this.scope.action,wrapper:this,containerSelector:this.getContainerSelector(),listenAllLinks:!!this.scope.listenAllLinks,listenPopstate:!!this.scope.listenPopstate,transition:this.scope.transition,parseTitle:!!this.scope.parseTitle,changeBrowserUrl:!!this.scope.changeBrowserUrl,prefetchLinks:!!this.scope.prefetchLinks,scrollToTop:!!this.scope.scrollToTop};this.pjax=new z(t),this.pjax.setActiveWrapper(this),this.prefetch=new xe(this.scope.id),this.prefetch.init(t.prefetchLinks),this.pjax.start()}onPageReady(t,s,n,r,a,l,c){if(t!==this.scope.id){console.warn("not the right view",this.scope.id,t,l);return}if(this.debug("New page ready!",this.innerHTML),this.scope.datasetToRootScope&&(this.scope.$root||(this.scope.$root={}),this.scope.$root.dataset=l),!c){if(this.view=this.getView(),!this.view){console.warn("View ist not ready!");return}this.view.bind()}}async onTransitionInit(t){t===this.scope.id&&this.setTransitionClass("init")}async onTransitionCompleted(t){if(t===this.scope.id){if(this.setTransitionClass("complete"),this.scope.scrollToAnchorHash){let s=null;if(window.location.hash.substr(1)&&(s=document.getElementById(window.location.hash.substr(1)),s))return await je(s,this.scope.scrollToAnchorOffset,window)}if(this.scope.scrollToTop)return await nr(window,"start","vertical","smooth")}}setTransitionClass(t){this.classList.remove("transition-init"),this.classList.remove("transition-complete"),this.classList.add(`transition-${t}`)}requiredAttributes(){return[]}parsedAttributeChangedCallback(t,s,n,r){switch(super.parsedAttributeChangedCallback(t,s,n,r),t){case"id":this.events=D.getInstance(this.scope.id);break}}async beforeBind(){await super.beforeBind(),this.addEventListeners(),this.initAndStartPjax()}template(){return null}};let Gs=hs;o(Gs,"tagName","router-view");const vp=Object.freeze(Object.defineProperty({__proto__:null,RouterLoadScriptComponent:Ks,RouterViewComponent:Gs},Symbol.toStringTag,{value:"Module"})),bp={binders:gp,components:vp,services:fp,formatters:{},init(i={}){return ce.setSingleton(i),this}},cr=["os","dark","light"],Nl={dimension:0,name:"xs"},xl={dimension:576,name:"sm"},Il={dimension:768,name:"md"},Ol={dimension:992,name:"lg"},Dl={dimension:1200,name:"xl"},Pl={dimension:1400,name:"xxl"},Ni={breakpoints:[Nl,xl,Il,Ol,Dl,Pl],allowStoreDataInBrowser:!0},k={nsPrefix:"bs5-toggle-button:",eventNames:{toggle:"toggle",toggled:"toggled",init:"init",state:"state"}},Bn={elEventNames:{removed:"removed",added:"added"}},Hn={elEventNames:{removed:"removed",added:"added"}},Ep=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_BP_LG:Ol,DEFAULT_BP_MD:Il,DEFAULT_BP_SM:xl,DEFAULT_BP_XL:Dl,DEFAULT_BP_XS:Nl,DEFAULT_BP_XXL:Pl,DEFAULT_MODULE_OPTIONS:Ni,TOGGLE_ATTRIBUTE:Bn,TOGGLE_BUTTON:k,TOGGLE_CLASS:Hn,themeChoices:cr},Symbol.toStringTag,{value:"Module"})),Rt=class{constructor(e){o(this,"_options",Ni);o(this,"_events",D.getInstance("bs5"));o(this,"_activeBreakpoint",null);o(this,"onViewChanges",Et(this._onViewChanges.bind(this)));this._options=e,this.sortBreakpoints(this._options.breakpoints),this._onViewChanges(),this.addEventListeners()}static getSingleton(){if(Rt.instance)return Rt.instance;throw new Error("Singleton of Bs5Service not defined, please call `Bs5Service.setSingleton` or `bs5Module.init` first!")}static setSingleton(e=Ni){if(Rt.instance)throw new Error("Singleton of Bs5Service already defined!");return Rt.instance=new Rt(e),Rt.instance}onBreakpointChanges(){this._events.trigger("breakpoint:changed",this.activeBreakpoint)}setActiveBreakpoint(e){var t;e&&e.name!==((t=this.activeBreakpoint)==null?void 0:t.name)&&(this._activeBreakpoint=e,this.onBreakpointChanges())}addEventListeners(){window.addEventListener("resize",this.onViewChanges,{passive:!0})}removeEventListeners(){window.removeEventListener("resize",this.onViewChanges)}_onViewChanges(){const e=this.getBreakpointByDimension(rr().w)||this.getBreakpointByName("xs");e&&this.setActiveBreakpoint(e)}sortBreakpoints(e){e.sort((t,s)=>t.dimension-s.dimension)}get options(){return this._options}get activeBreakpoint(){return this._activeBreakpoint}get breakpointNames(){return this.options.breakpoints.map(e=>e.name)}get events(){return this._events}on(e,t,s){return this.events.on(e,t,s)}once(e,t,s){return this.events.once(e,t,s)}off(e,t,s){return this.events.off(e,t,s)}getBreakpointByDimension(e,t){t=t||this.options.breakpoints;for(let n=0;nr.dimension&&e=s.dimension?s:null}getBreakpointByName(e,t){t=t||this.options.breakpoints;const s=t.find(n=>n.name===e);return s||null}getNextBreakpointByName(e){const t=this.breakpointNames,s=t.indexOf(e);if(s<0)throw new Error(`the breakpoint "${e}" does not exist!`);return s===t.length-1?null:t[s+1]}getPrevBreakpointByName(e){const t=this.breakpointNames,s=t.indexOf(e);if(s<0)throw new Error(`the breakpoint "${e}" does not exist!`);return s===0?null:t[s-1]}isBreakpointGreaterThan(e,t){const s=this.getBreakpointByName(e),n=this.getBreakpointByName(t);return s&&n?s.dimension>n.dimension:null}isBreakpointSmallerThan(e,t){const s=this.getBreakpointByName(e),n=this.getBreakpointByName(t);return s&&n?s.dimension"u")return!1;var e=nt(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function yp(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var s=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];!at(r)||!wt(r)||(Object.assign(r.style,s),Object.keys(n).forEach(function(a){var l=n[a];l===!1?r.removeAttribute(a):r.setAttribute(a,l===!0?"":l)}))})}function wp(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(s){var n=e.elements[s],r=e.attributes[s]||{},a=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:t[s]),l=a.reduce(function(c,h){return c[h]="",c},{});!at(n)||!wt(n)||(Object.assign(n.style,l),Object.keys(r).forEach(function(c){n.removeAttribute(c)}))})}}const pr={name:"applyStyles",enabled:!0,phase:"write",fn:yp,effect:wp,requires:["computeStyles"]};function bt(i){return i.split("-")[0]}var oe=Math.max,xi=Math.min,Re=Math.round;function Vn(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Yl(){return!/^((?!chrome|android).)*safari/i.test(Vn())}function Be(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var s=i.getBoundingClientRect(),n=1,r=1;e&&at(i)&&(n=i.offsetWidth>0&&Re(s.width)/i.offsetWidth||1,r=i.offsetHeight>0&&Re(s.height)/i.offsetHeight||1);var a=de(i)?nt(i):window,l=a.visualViewport,c=!Yl()&&t,h=(s.left+(c&&l?l.offsetLeft:0))/n,d=(s.top+(c&&l?l.offsetTop:0))/r,p=s.width/n,u=s.height/r;return{width:p,height:u,top:d,right:h+p,bottom:d+u,left:h,x:h,y:d}}function fr(i){var e=Be(i),t=i.offsetWidth,s=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:s}}function Kl(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&ur(t)){var s=e;do{if(s&&i.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function It(i){return nt(i).getComputedStyle(i)}function _p(i){return["table","td","th"].indexOf(wt(i))>=0}function qt(i){return((de(i)?i.ownerDocument:i.document)||window.document).documentElement}function Gi(i){return wt(i)==="html"?i:i.assignedSlot||i.parentNode||(ur(i)?i.host:null)||qt(i)}function ko(i){return!at(i)||It(i).position==="fixed"?null:i.offsetParent}function Sp(i){var e=/firefox/i.test(Vn()),t=/Trident/i.test(Vn());if(t&&at(i)){var s=It(i);if(s.position==="fixed")return null}var n=Gi(i);for(ur(n)&&(n=n.host);at(n)&&["html","body"].indexOf(wt(n))<0;){var r=It(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function ws(i){for(var e=nt(i),t=ko(i);t&&_p(t)&&It(t).position==="static";)t=ko(t);return t&&(wt(t)==="html"||wt(t)==="body"&&It(t).position==="static")?e:t||Sp(i)||e}function mr(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function ns(i,e,t){return oe(i,xi(e,t))}function Ap(i,e,t){var s=ns(i,e,t);return s>t?t:s}function Gl(){return{top:0,right:0,bottom:0,left:0}}function Xl(i){return Object.assign({},Gl(),i)}function Ql(i,e){return e.reduce(function(t,s){return t[s]=i,t},{})}var Tp=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Xl(typeof e!="number"?e:Ql(e,ze))};function Cp(i){var e,t=i.state,s=i.name,n=i.options,r=t.elements.arrow,a=t.modifiersData.popperOffsets,l=bt(t.placement),c=mr(l),h=[Q,it].indexOf(l)>=0,d=h?"height":"width";if(!(!r||!a)){var p=Tp(n.padding,t),u=fr(r),f=c==="y"?X:Q,m=c==="y"?st:it,v=t.rects.reference[d]+t.rects.reference[c]-a[c]-t.rects.popper[d],b=a[c]-t.rects.reference[c],w=ws(r),I=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,O=v/2-b/2,S=p[f],A=I-u[d]-p[m],N=I/2-u[d]/2+O,C=ns(S,N,A),R=c;t.modifiersData[s]=(e={},e[R]=C,e.centerOffset=C-N,e)}}function Lp(i){var e=i.state,t=i.options,s=t.element,n=s===void 0?"[data-popper-arrow]":s;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||Kl(e.elements.popper,n)&&(e.elements.arrow=n))}const Jl={name:"arrow",enabled:!0,phase:"main",fn:Cp,effect:Lp,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function He(i){return i.split("-")[1]}var kp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Np(i,e){var t=i.x,s=i.y,n=e.devicePixelRatio||1;return{x:Re(t*n)/n||0,y:Re(s*n)/n||0}}function No(i){var e,t=i.popper,s=i.popperRect,n=i.placement,r=i.variation,a=i.offsets,l=i.position,c=i.gpuAcceleration,h=i.adaptive,d=i.roundOffsets,p=i.isFixed,u=a.x,f=u===void 0?0:u,m=a.y,v=m===void 0?0:m,b=typeof d=="function"?d({x:f,y:v}):{x:f,y:v};f=b.x,v=b.y;var w=a.hasOwnProperty("x"),I=a.hasOwnProperty("y"),O=Q,S=X,A=window;if(h){var N=ws(t),C="clientHeight",R="clientWidth";if(N===nt(t)&&(N=qt(t),It(N).position!=="static"&&l==="absolute"&&(C="scrollHeight",R="scrollWidth")),N=N,n===X||(n===Q||n===it)&&r===$e){S=st;var $=p&&N===A&&A.visualViewport?A.visualViewport.height:N[C];v-=$-s.height,v*=c?1:-1}if(n===Q||(n===X||n===st)&&r===$e){O=it;var H=p&&N===A&&A.visualViewport?A.visualViewport.width:N[R];f-=H-s.width,f*=c?1:-1}}var F=Object.assign({position:l},h&&kp),U=d===!0?Np({x:f,y:v},nt(t)):{x:f,y:v};if(f=U.x,v=U.y,c){var q;return Object.assign({},F,(q={},q[S]=I?"0":"",q[O]=w?"0":"",q.transform=(A.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",q))}return Object.assign({},F,(e={},e[S]=I?v+"px":"",e[O]=w?f+"px":"",e.transform="",e))}function xp(i){var e=i.state,t=i.options,s=t.gpuAcceleration,n=s===void 0?!0:s,r=t.adaptive,a=r===void 0?!0:r,l=t.roundOffsets,c=l===void 0?!0:l,h={placement:bt(e.placement),variation:He(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,No(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,No(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const gr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xp,data:{}};var $s={passive:!0};function Ip(i){var e=i.state,t=i.instance,s=i.options,n=s.scroll,r=n===void 0?!0:n,a=s.resize,l=a===void 0?!0:a,c=nt(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&h.forEach(function(d){d.addEventListener("scroll",t.update,$s)}),l&&c.addEventListener("resize",t.update,$s),function(){r&&h.forEach(function(d){d.removeEventListener("scroll",t.update,$s)}),l&&c.removeEventListener("resize",t.update,$s)}}const vr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ip,data:{}};var Op={left:"right",right:"left",bottom:"top",top:"bottom"};function Xs(i){return i.replace(/left|right|bottom|top/g,function(e){return Op[e]})}var Dp={start:"end",end:"start"};function xo(i){return i.replace(/start|end/g,function(e){return Dp[e]})}function br(i){var e=nt(i),t=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:t,scrollTop:s}}function Er(i){return Be(qt(i)).left+br(i).scrollLeft}function Pp(i,e){var t=nt(i),s=qt(i),n=t.visualViewport,r=s.clientWidth,a=s.clientHeight,l=0,c=0;if(n){r=n.width,a=n.height;var h=Yl();(h||!h&&e==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}return{width:r,height:a,x:l+Er(i),y:c}}function Mp(i){var e,t=qt(i),s=br(i),n=(e=i.ownerDocument)==null?void 0:e.body,r=oe(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=oe(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),l=-s.scrollLeft+Er(i),c=-s.scrollTop;return It(n||t).direction==="rtl"&&(l+=oe(t.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:l,y:c}}function yr(i){var e=It(i),t=e.overflow,s=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+s)}function Zl(i){return["html","body","#document"].indexOf(wt(i))>=0?i.ownerDocument.body:at(i)&&yr(i)?i:Zl(Gi(i))}function rs(i,e){var t;e===void 0&&(e=[]);var s=Zl(i),n=s===((t=i.ownerDocument)==null?void 0:t.body),r=nt(s),a=n?[r].concat(r.visualViewport||[],yr(s)?s:[]):s,l=e.concat(a);return n?l:l.concat(rs(Gi(a)))}function Un(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function $p(i,e){var t=Be(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function Io(i,e,t){return e===hr?Un(Pp(i,t)):de(e)?$p(e,t):Un(Mp(qt(i)))}function Rp(i){var e=rs(Gi(i)),t=["absolute","fixed"].indexOf(It(i).position)>=0,s=t&&at(i)?ws(i):i;return de(s)?e.filter(function(n){return de(n)&&Kl(n,s)&&wt(n)!=="body"}):[]}function Bp(i,e,t,s){var n=e==="clippingParents"?Rp(i):[].concat(e),r=[].concat(n,[t]),a=r[0],l=r.reduce(function(c,h){var d=Io(i,h,s);return c.top=oe(d.top,c.top),c.right=xi(d.right,c.right),c.bottom=xi(d.bottom,c.bottom),c.left=oe(d.left,c.left),c},Io(i,a,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function tc(i){var e=i.reference,t=i.element,s=i.placement,n=s?bt(s):null,r=s?He(s):null,a=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,c;switch(n){case X:c={x:a,y:e.y-t.height};break;case st:c={x:a,y:e.y+e.height};break;case it:c={x:e.x+e.width,y:l};break;case Q:c={x:e.x-t.width,y:l};break;default:c={x:e.x,y:e.y}}var h=n?mr(n):null;if(h!=null){var d=h==="y"?"height":"width";switch(r){case he:c[h]=c[h]-(e[d]/2-t[d]/2);break;case $e:c[h]=c[h]+(e[d]/2-t[d]/2);break}}return c}function Fe(i,e){e===void 0&&(e={});var t=e,s=t.placement,n=s===void 0?i.placement:s,r=t.strategy,a=r===void 0?i.strategy:r,l=t.boundary,c=l===void 0?Ml:l,h=t.rootBoundary,d=h===void 0?hr:h,p=t.elementContext,u=p===void 0?we:p,f=t.altBoundary,m=f===void 0?!1:f,v=t.padding,b=v===void 0?0:v,w=Xl(typeof b!="number"?b:Ql(b,ze)),I=u===we?$l:we,O=i.rects.popper,S=i.elements[m?I:u],A=Bp(de(S)?S:S.contextElement||qt(i.elements.popper),c,d,a),N=Be(i.elements.reference),C=tc({reference:N,element:O,strategy:"absolute",placement:n}),R=Un(Object.assign({},O,C)),$=u===we?R:N,H={top:A.top-$.top+w.top,bottom:$.bottom-A.bottom+w.bottom,left:A.left-$.left+w.left,right:$.right-A.right+w.right},F=i.modifiersData.offset;if(u===we&&F){var U=F[n];Object.keys(H).forEach(function(q){var V=[it,st].indexOf(q)>=0?1:-1,rt=[X,st].indexOf(q)>=0?"y":"x";H[q]+=U[rt]*V})}return H}function Hp(i,e){e===void 0&&(e={});var t=e,s=t.placement,n=t.boundary,r=t.rootBoundary,a=t.padding,l=t.flipVariations,c=t.allowedAutoPlacements,h=c===void 0?dr:c,d=He(s),p=d?l?Fn:Fn.filter(function(m){return He(m)===d}):ze,u=p.filter(function(m){return h.indexOf(m)>=0});u.length===0&&(u=p);var f=u.reduce(function(m,v){return m[v]=Fe(i,{placement:v,boundary:n,rootBoundary:r,padding:a})[bt(v)],m},{});return Object.keys(f).sort(function(m,v){return f[m]-f[v]})}function Fp(i){if(bt(i)===Ki)return[];var e=Xs(i);return[xo(i),e,xo(e)]}function Vp(i){var e=i.state,t=i.options,s=i.name;if(!e.modifiersData[s]._skip){for(var n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,l=a===void 0?!0:a,c=t.fallbackPlacements,h=t.padding,d=t.boundary,p=t.rootBoundary,u=t.altBoundary,f=t.flipVariations,m=f===void 0?!0:f,v=t.allowedAutoPlacements,b=e.options.placement,w=bt(b),I=w===b,O=c||(I||!m?[Xs(b)]:Fp(b)),S=[b].concat(O).reduce(function(ve,Pt){return ve.concat(bt(Pt)===Ki?Hp(e,{placement:Pt,boundary:d,rootBoundary:p,padding:h,flipVariations:m,allowedAutoPlacements:v}):Pt)},[]),A=e.rects.reference,N=e.rects.popper,C=new Map,R=!0,$=S[0],H=0;H=0,rt=V?"width":"height",Y=Fe(e,{placement:F,boundary:d,rootBoundary:p,altBoundary:u,padding:h}),dt=V?q?it:Q:q?st:X;A[rt]>N[rt]&&(dt=Xs(dt));var ks=Xs(dt),Xt=[];if(r&&Xt.push(Y[U]<=0),l&&Xt.push(Y[dt]<=0,Y[ks]<=0),Xt.every(function(ve){return ve})){$=F,R=!1;break}C.set(F,Xt)}if(R)for(var Ns=m?3:1,nn=function(Pt){var Xe=S.find(function(Is){var Qt=C.get(Is);if(Qt)return Qt.slice(0,Pt).every(function(rn){return rn})});if(Xe)return $=Xe,"break"},Ge=Ns;Ge>0;Ge--){var xs=nn(Ge);if(xs==="break")break}e.placement!==$&&(e.modifiersData[s]._skip=!0,e.placement=$,e.reset=!0)}}const ec={name:"flip",enabled:!0,phase:"main",fn:Vp,requiresIfExists:["offset"],data:{_skip:!1}};function Oo(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function Do(i){return[X,it,st,Q].some(function(e){return i[e]>=0})}function Up(i){var e=i.state,t=i.name,s=e.rects.reference,n=e.rects.popper,r=e.modifiersData.preventOverflow,a=Fe(e,{elementContext:"reference"}),l=Fe(e,{altBoundary:!0}),c=Oo(a,s),h=Oo(l,n,r),d=Do(c),p=Do(h);e.modifiersData[t]={referenceClippingOffsets:c,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const sc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Up};function jp(i,e,t){var s=bt(i),n=[Q,X].indexOf(s)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,a=r[0],l=r[1];return a=a||0,l=(l||0)*n,[Q,it].indexOf(s)>=0?{x:l,y:a}:{x:a,y:l}}function Wp(i){var e=i.state,t=i.options,s=i.name,n=t.offset,r=n===void 0?[0,0]:n,a=dr.reduce(function(d,p){return d[p]=jp(p,e.rects,r),d},{}),l=a[e.placement],c=l.x,h=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=h),e.modifiersData[s]=a}const ic={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Wp};function zp(i){var e=i.state,t=i.name;e.modifiersData[t]=tc({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const wr={name:"popperOffsets",enabled:!0,phase:"read",fn:zp,data:{}};function qp(i){return i==="x"?"y":"x"}function Yp(i){var e=i.state,t=i.options,s=i.name,n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,l=a===void 0?!1:a,c=t.boundary,h=t.rootBoundary,d=t.altBoundary,p=t.padding,u=t.tether,f=u===void 0?!0:u,m=t.tetherOffset,v=m===void 0?0:m,b=Fe(e,{boundary:c,rootBoundary:h,padding:p,altBoundary:d}),w=bt(e.placement),I=He(e.placement),O=!I,S=mr(w),A=qp(S),N=e.modifiersData.popperOffsets,C=e.rects.reference,R=e.rects.popper,$=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,H=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),F=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,U={x:0,y:0};if(N){if(r){var q,V=S==="y"?X:Q,rt=S==="y"?st:it,Y=S==="y"?"height":"width",dt=N[S],ks=dt+b[V],Xt=dt-b[rt],Ns=f?-R[Y]/2:0,nn=I===he?C[Y]:R[Y],Ge=I===he?-R[Y]:-C[Y],xs=e.elements.arrow,ve=f&&xs?fr(xs):{width:0,height:0},Pt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Gl(),Xe=Pt[V],Is=Pt[rt],Qt=ns(0,C[Y],ve[Y]),rn=O?C[Y]/2-Ns-Qt-Xe-H.mainAxis:nn-Qt-Xe-H.mainAxis,Sh=O?-C[Y]/2+Ns+Qt+Is+H.mainAxis:Ge+Qt+Is+H.mainAxis,on=e.elements.arrow&&ws(e.elements.arrow),Ah=on?S==="y"?on.clientTop||0:on.clientLeft||0:0,co=(q=F==null?void 0:F[S])!=null?q:0,Th=dt+rn-co-Ah,Ch=dt+Sh-co,ho=ns(f?xi(ks,Th):ks,dt,f?oe(Xt,Ch):Xt);N[S]=ho,U[S]=ho-dt}if(l){var uo,Lh=S==="x"?X:Q,kh=S==="x"?st:it,Jt=N[A],Os=A==="y"?"height":"width",po=Jt+b[Lh],fo=Jt-b[kh],an=[X,Q].indexOf(w)!==-1,mo=(uo=F==null?void 0:F[A])!=null?uo:0,go=an?po:Jt-C[Os]-R[Os]-mo+H.altAxis,vo=an?Jt+C[Os]+R[Os]-mo-H.altAxis:fo,bo=f&&an?Ap(go,Jt,vo):ns(f?go:po,Jt,f?vo:fo);N[A]=bo,U[A]=bo-Jt}e.modifiersData[s]=U}}const nc={name:"preventOverflow",enabled:!0,phase:"main",fn:Yp,requiresIfExists:["offset"]};function Kp(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function Gp(i){return i===nt(i)||!at(i)?br(i):Kp(i)}function Xp(i){var e=i.getBoundingClientRect(),t=Re(e.width)/i.offsetWidth||1,s=Re(e.height)/i.offsetHeight||1;return t!==1||s!==1}function Qp(i,e,t){t===void 0&&(t=!1);var s=at(e),n=at(e)&&Xp(e),r=qt(e),a=Be(i,n,t),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!t)&&((wt(e)!=="body"||yr(r))&&(l=Gp(e)),at(e)?(c=Be(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):r&&(c.x=Er(r))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Jp(i){var e=new Map,t=new Set,s=[];i.forEach(function(r){e.set(r.name,r)});function n(r){t.add(r.name);var a=[].concat(r.requires||[],r.requiresIfExists||[]);a.forEach(function(l){if(!t.has(l)){var c=e.get(l);c&&n(c)}}),s.push(r)}return i.forEach(function(r){t.has(r.name)||n(r)}),s}function Zp(i){var e=Jp(i);return ql.reduce(function(t,s){return t.concat(e.filter(function(n){return n.phase===s}))},[])}function tf(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function ef(i){var e=i.reduce(function(t,s){var n=t[s.name];return t[s.name]=n?Object.assign({},n,s,{options:Object.assign({},n.options,s.options),data:Object.assign({},n.data,s.data)}):s,t},{});return Object.keys(e).map(function(t){return e[t]})}var Po={placement:"bottom",modifiers:[],strategy:"absolute"};function Mo(){for(var i=arguments.length,e=new Array(i),t=0;tthis.formattedValue(u,l+1))):r},e)}eventHandler(e,t){const s=this.view.options.handler;return n=>{if(!s)throw new Error("No handler defined in binding.view.options.handler");s.call(e,this,n,this,t)}}set(e){try{e=this.formattedValue(e)}catch(t){return console.error(t),e}typeof this.routine=="function"&&(e&&typeof e.then=="function"&&typeof e.catch=="function"?e.then(t=>{this.routine(this.el,t)}).catch(t=>{console.error(t)}):this.routine(this.el,e))}sync(){this.observer?(this.model=this.observer.target,this.set(this.observer.value())):this.set(this.value)}publish(){if(this.observer){if(this.formatters===null)throw new Error("formatters is null");const e=this.formatters.reduceRight((t,s,n)=>{const r=s.split(hd),a=r.shift();if(!a)throw new Error("id not defined");if(!this.view.options.formatters)return;const l=this.view.options.formatters[a],c=this.parseFormatterArguments(r,n);return l&&typeof l.publish=="function"&&(t=l.publish(t,...c)),t},this._getValue(this.el));this.observer.setValue(e)}}_bind(){if(this.parseTarget(),this.bind){if(typeof this.bind!="function")throw new Error("the method bind is not a function");this.bind(this.el)}this.view.options.preloadData&&this.sync()}_unbind(){this.unbind&&this.unbind(this.el),this.observer&&this.observer.unobserve(),Object.keys(this.formatterObservers).forEach(e=>{const t=this.formatterObservers[e];Object.keys(t).forEach(s=>{t[s].unobserve()})}),this.formatterObservers={}}_update(e={}){this.observer&&(this.model=this.observer.target),typeof this.update=="function"&&this.update(e)}_getValue(e){return typeof this.getValue=="function"?this.getValue(e):ps(e)}getStarArguments(e,t){var r;const s=this.view.binderRegex(e);return((r=t.match(s))==null?void 0:r.slice(1))||[]}}o(E,"key",""),o(E,"block",!1);class $a extends E{constructor(){super(...arguments);o(this,"function",!0);o(this,"priority",1e3)}bind(t){const s=this.args[0];t.classList.add(s)}routine(t,s){const n=this.args[0];s?(t.classList.add(n+"-start"),t.classList.remove(n+"-done")):(t.classList.remove(n+"-start"),t.classList.add(n+"-done"))}}o($a,"key","animate-*");class Ra extends E{constructor(){super(...arguments);o(this,"function",!0);o(this,"priority",1e3);o(this,"staticClasses")}bind(t){const s=t.getAttribute("class")||"";this.staticClasses=s.split(" ")}unbind(){delete this.staticClasses}routine(t,s){var r;s?((r=this.staticClasses)==null?void 0:r.indexOf(s))===-1&&t.setAttribute("class",this.staticClasses.join(" ")+" "+s):this.staticClasses&&t.setAttribute("class",this.staticClasses.join(" "));const n=t.getAttribute("class");n&&t.setAttribute("class",n.trim())}}o(Ra,"key","add-class");class Ba extends E{routine(e,t){const s=mt(this.args[0].trim());this.view.models[s]=t}}o(Ba,"key","assign-*");class Ha extends E{routine(e,t){if(typeof t=="object")return ue({deep:!1},this.view.models,t);console.warn("Value must be an object or propertyName is required")}}o(Ha,"key","assign");class zi extends E{routine(e,t){var a;if(!this.type)throw new Error("Can't set attribute of "+this.type);const{newValue:s,oldValue:n,changed:r}=Ta(e,this.type,t);this.type==="src"&&e.tagName.toUpperCase()==="SOURCE"&&((a=e.parentElement)==null?void 0:a.tagName.toUpperCase())==="VIDEO"&&e.parentElement.load(),r&&e.dispatchEvent(new CustomEvent("binder-changed",{detail:{name:this.type,newValue:s,oldValue:n}}))}}o(zi,"key","attr-*");class xn extends E{routine(){}}o(xn,"key","block"),o(xn,"block",!0);class Fa extends E{constructor(){super(...arguments);o(this,"publishes",!0);o(this,"priority",2e3);o(this,"onChange",this.publish.bind(this))}bind(t){t.addEventListener("change",this.onChange)}unbind(t){t.removeEventListener("change",this.onChange)}routine(t,s){let n;this._getValue?n=this._getValue(t):(console.warn("this._getValue is not a function, this: ",this),n=ps(t)),t.type==="radio"?t.checked=Lt(n)===Lt(s):n!==s&&(t.checked=!!s)}getValue(t){return ps(t)}}o(Fa,"key","checked");class Va extends E{routine(e,t){if(this.args===null)throw new Error("args is null");const s=e.getAttribute("class")||"",n=s.split(" ").filter(l=>l!==""),r=this.args[0].trim(),a=n.indexOf(r);a===-1?t&&e.setAttribute("class",`${s} ${r}`):t||e.setAttribute("class",n.filter((l,c)=>c!==a).join(" "))}}o(Va,"key","class-*");const Os='[componentAttributeBinder] You can only use the "rv-co-*" binder on Riba components, but "{tagName}" is not registered.';class Ci extends E{constructor(){super(...arguments);o(this,"publishes",!0);o(this,"componentAttributeObserver");o(this,"attributeName")}__routine(t,s){const n=this.args[0].trim();t.setBinderAttribute?t.setBinderAttribute(n,s):console.warn(Os.replace("{tagName}",t.tagName),t)}async routine(t,s){Ft(t,!0,!0)?this.__routine(t,s):Ft(t,!0)?(await Nn(t),this.__routine(t,s)):console.warn(Os.replace("{tagName}",t.tagName),t)}__bind(t){if(this.attributeName=this.args[0].toString().trim(),typeof t.observeAttribute!="function"){console.warn(Os.replace("{tagName}",t.tagName),t);return}this.componentAttributeObserver=t.observeAttribute(this.attributeName,{sync:()=>{this.publish()}})}async bind(t){Ft(t,!0,!0)?this.__bind(t):Ft(t,!0)?(await Nn(t),this.__bind(t)):console.warn(Os.replace("{tagName}",t.tagName),t)}unbind(){var t;(t=this.componentAttributeObserver)==null||t.unobserve()}getValue(t){const s=this.args[0].trim();return t.getBinderAttribute(s)}}o(Ci,"key","co-*");class Ua extends E{routine(e,t){e.disabled=!!t}}o(Ua,"key","disabled");class ja extends E{constructor(){super(...arguments);o(this,"enable",!1);o(this,"onDrag",this._onDrag.bind(this))}_onDrag(t){this.enable||t.preventDefault()}routine(t,s){this.enable=s,t.setAttribute("draggable",s?"true":"false")}bind(t){t.addEventListener("dragstart",this.onDrag,!0)}unbind(t){t.removeAttribute("draggable"),t.removeEventListener("dragstart",this.onDrag,!0)}}o(ja,"key","draggable");class Wa extends E{routine(e,t){e.data=t??""}}o(Wa,"key","mustache-text");const Ds=0,za=1,dd=/((?:'[^']*')*(?:(?:[^|']*(?:'[^']*')+[^|']*)+|[^|]+))|^$/g;function qa(i,e){let t=null;const s=i.length;let n=0,r=0;const a=e[0],l=e[1];for(;r0&&r0)for(let n=0;nn.trim());return{keypath:t.shift()||void 0,pipes:t}}const Te=class{constructor(e,t,s){o(this,"els");o(this,"models");o(this,"options");o(this,"bindings",[]);o(this,"webComponents",[]);if(Array.isArray(e)?this.els=e:this.els=[e],this.models=t,this.models.$root)for(const n of Object.keys(this.models.$root))Te.$rootScope[n]=this.models.$root[n];this.models.$root=Te.$rootScope,this.options=s,this.build()}static create(e,t,s){var a;const n=e.el.cloneNode(!0),r=new Te(n,t,e.view.options);return r.bind(),(a=e==null?void 0:e.marker)!=null&&a.parentNode?e.marker.parentNode.insertBefore(n,s):console.warn("[View]: No parent node for binding!"),r}bind(){this.bindings.forEach(e=>{e._bind()})}unbind(){Array.isArray(this.bindings)&&this.bindings.forEach(e=>{e._unbind(),typeof e.el&&this.options.removeBinderAttributes}),Array.isArray(this.webComponents)&&this.webComponents.forEach(e=>{typeof e.unbind=="function"&&e.unbind()})}sync(){this.bindings.forEach(e=>{e.sync&&e.sync()})}publish(){this.bindings.forEach(e=>{e.publishes&&e.publish&&e.publish()})}update(e={}){Object.keys(e).forEach(t=>{this.models[t]=e[t]});for(const t of this.bindings)t._update&&t._update(e)}build(){if(this.bindings=[],!this.options.templateDelimiters)throw new Error("templateDelimiters required");const e=this.els;for(let t=0;t1?s=new RegExp(`^${e.replace("*","([^-]*)").replaceAll("-*","-(.+)")}$`):s=new RegExp(`^${e.replaceAll("*","(.+)")}$`),s}bindBinders(e,t,s=this.options.attributeBinders){let n=!1;if(!this.options.binders)return n;const r=[];for(let a=0,l=e.length;a{const s=e.priority||0;return(t.priority||0)-s});class In extends E{constructor(){super(...arguments);o(this,"priority",4e3);o(this,"iterated",[])}bind(t){var s,n;this.marker?this.iterated.forEach(r=>{r.bind()}):(this.marker=(s=window==null?void 0:window.document)==null?void 0:s.createComment(` riba: ${this.type} `),!((n=t.parentNode)!=null&&n.insertBefore)||!this.marker||(t.parentNode.insertBefore(this.marker,t),t.parentNode.removeChild(t)))}unbind(){this.iterated&&this.iterated.forEach(t=>{t.unbind()})}routine(t,s){if(this.args===null)throw new Error("args is null");let n=!1;const r=mt(this.args[0].toString());if(s=s||[],!Array.isArray(s)&&typeof s=="object"&&s!==null&&(s=Object.entries(s).map(([l,c])=>({key:l,value:c})),n=!0),!Array.isArray(s))throw new Error(`each-${this.args[0]} needs an array or object to iterate over, but it is ${typeof s}`);const a=t.getAttribute("index-property")||this.getIterationAlias(r);s.forEach((l,c)=>{var p;const h={$parent:this.view.models};n?(h[a]=l.key,h[r]=l.value):(h[a]=c,h[r]=l);let d=this.iterated[c];if(d)if(d.models[r]!==l){let u,f=this.iterated[c];for(let m=c+1;ms.length&&Ih(this.iterated.length-s.length,()=>{const l=this.iterated.pop();if(!l)throw new Error("view is undefined!");if(l.unbind(),!this.marker||!this.marker.parentNode)throw new Error("Marker has no parent node");this.marker.parentNode.removeChild(l.els[0])}),t.nodeName==="OPTION"&&this.view.bindings&&this.view.bindings.forEach(l=>{this.marker&&l.el===this.marker.parentNode&&l.type==="value"&&l.sync&&l.sync()})}update(t){const s={};Object.keys(t).forEach(n=>{if(this.args===null)throw new Error("args is null");n!==this.args[0]&&(s[n]=t[n])}),this.iterated.forEach(n=>{n.update(s)})}}o(In,"key","each-*"),o(In,"block",!0);class Ka extends E{constructor(){super(...arguments);o(this,"publishes",!0)}bind(){this.publish()}routine(){}getValue(t){return t}}o(Ka,"key","element");class Ga extends E{routine(e,t){e.disabled=!t}}o(Ga,"key","enabled");class Xa extends E{constructor(){super(...arguments);o(this,"priority",9e4)}routine(t,s){const n=Array.from(t.children);n.sort((r,a)=>!r.dataset.sortBy||!a.dataset.sortBy?0:r.dataset.sortBya.dataset.sortBy?s?-1:1:0);for(let r=0;r0){const r=n.length>0?", ":"";n+=`${r}${t} ${s}`}else{let r=n.split(",");r=r.map(a=>a.trim()),r=r.filter(a=>!a.includes(s)),n=r.join(", ")||""}e.setAttribute("srcset",n)}}o(rl,"key","srcset-*");class ol extends E{routine(e,t){const s="background-image";t==null||t===""?e.style.removeProperty(s):e.style.setProperty(s,`url(${t})`)}}o(ol,"key","style-background-image");class al extends E{routine(e,t){const s=this.args[0];t==null||t===""?e.style.removeProperty(s.toString()):e.style.setProperty(s.toString(),t)}}o(al,"key","style-*");class ll extends E{routine(e,t){if(t)if(typeof t=="string")e.setAttribute("style",t);else for(const s of Object.keys(t))e.style.setProperty(Wh(s),t[s]||null);else for(const s of Object.keys(e.style))e.style.removeProperty(s)}}o(ll,"key","style");class cl extends E{constructor(){super(...arguments);o(this,"priority",-1e3);o(this,"originalTag")}bind(t){this.originalTag=t.tagName.toLowerCase()}routine(t,s){if(this.args===null)throw new Error("args is null");const n=this.el.tagName.toLowerCase();let r;if(s)r=this.args[0].trim().toLowerCase();else if(this.originalTag)r=this.originalTag.toLowerCase();else throw new Error("Tag name not found!");if(n!==r){const a=document.createElement(r);for(;t.childNodes.length>0;)t.firstChild&&a.appendChild(t.firstChild);const l=Array.prototype.slice.call(t.attributes);for(const c of l)a.setAttribute(c.name,c.value);t.parentNode?t.parentNode.replaceChild(a,t):console.warn("No parent"),this.el=a}}}o(cl,"key","tag-*");class hl extends E{constructor(){super(...arguments);o(this,"nested")}bind(t){this.nested=new ot(t,this.view.models,this.view.options)}routine(t,s){var n,r;(n=this.nested)==null||n.unbind(),t.innerHTML=s||"",this.nested=new ot(t,this.view.models,this.view.options),(r=this.nested)==null||r.bind()}unbind(){var t;(t=this.nested)==null||t.unbind()}update(t){var s;(s=this.nested)==null||s.update(t)}}o(hl,"key","template");class dl extends E{routine(e,t){typeof t!="string"&&typeof(t==null?void 0:t.toString)=="function"&&(t=t.toString()),e.textContent=t||""}}o(dl,"key","text");class ul extends E{constructor(){super(...arguments);o(this,"propertyKey")}toggle(){this.propertyKey&&(this.view.models[this.propertyKey]=!this.view.models[this.propertyKey])}bind(t){const s=this.args[0],n=this.el.dataset.passive==="true";t.addEventListener(s,this.toggle,{passive:n})}unbind(t){if(this.args===null)throw new Error("args is null");const s=this.args[0];t.removeEventListener(s,this.toggle)}routine(t,s){if(this.args===null)throw new Error("args is null");this.propertyKey=s}}o(ul,"key","toggle-on-*");class pl extends E{constructor(){super(...arguments);o(this,"publishes",!0);o(this,"priority",2e3);o(this,"onChange",this.publish.bind(this))}bind(t){t.addEventListener("change",this.onChange)}unbind(t){t.removeEventListener("change",this.onChange)}routine(t,s){t.type==="radio"?t.checked=Lt(t.value)!==Lt(s):t.checked=!s}getValue(t){return ps(t)}}o(pl,"key","unchecked");class fl extends Li{routine(e,t){return super.routine(e,!t)}}o(fl,"key","unless");const pd="change input paste blur focus";class ml extends E{constructor(){super(...arguments);o(this,"publishes",!0);o(this,"priority",3e3);o(this,"event");o(this,"onChange",this.publish.bind(this))}getData(t){const s={type:t.type,tagName:t.tagName,contenteditable:!!t.getAttribute("contenteditable"),isRadio:!1,isOption:!1};return s.isRadio=s.tagName==="INPUT"&&s.type==="radio",s.isOption=s.tagName==="OPTION",s}bind(t){if(t.tagName==="OPTION")return;if(!this.getData(t).isRadio){this.event=t.getAttribute("event-name")||pd;const n=this.event.split(" ");for(const r of n)t.addEventListener(r.trim(),this.onChange,!1)}}unbind(t){if(this.event){const s=this.event.split(" ");for(const n in s)t.removeEventListener(n.trim(),this.onChange)}}routine(t,s){let n=this.getValue(t);if(Array.isArray(s)||(s!=null?s=Lt(s):s=""),Array.isArray(n)||(n!=null?n=Lt(n):n=""),n===s)return;const r=this.getData(t);if(r.isRadio||r.isOption)return Ta(t,"value",s);if(t.type==="select-multiple"){if(Array.isArray(s))for(let a=0;a-1}}else t.getAttribute("contenteditable")?t.innerHTML=s:t.value=s}getValue(t){return ps(t)}}o(ml,"key","value");const fd=Object.freeze(Object.defineProperty({__proto__:null,AddClassBinder:Ra,AnimateStarBinder:$a,AssignBinder:Ha,AssignPropertyBinder:Ba,AttributeBinder:zi,BlockBinder:xn,CheckedBinder:Fa,ClassStarBinder:Va,ComponentAttributeBinder:Ci,DisabledBinder:Ua,EachStarBinder:In,ElementBinder:Ka,EnabledBinder:Ga,FlexSortChildsBinder:Xa,HideBinder:Qa,HtmlBinder:Ja,IfBinder:Li,MaxlengthBinder:Za,NoDragBinder:ja,OnEventBinder:tl,ParentBinder:el,ReadonlyBinder:sl,RemoveClassBinder:il,ShowBinder:nl,SrcsetSizeBinder:rl,StyleBackgroundImageBinder:ol,StyleBinder:ll,StyleStarBinder:al,TagStarBinder:cl,TemplateBinder:hl,TextBinder:dl,ToggleOnEventBinder:ul,UncheckedBinder:pl,UnlessBinder:fl,ValueBinder:ml},Symbol.toStringTag,{value:"Module"}));class md{constructor(e,t,s,n){o(this,"binder");o(this,"component");o(this,"formatter");o(this,"adapter");this.binder=new Da(e),this.component=new Pa(t),this.formatter=new Ma(s),this.adapter=new Oa(n)}register(e){if(!e)throw console.error(e),new Error("The Riba module is falsy!");e.binders&&this.binder.registerAll(e.binders),e.components&&this.component.registerAll(e.components),e.formatters&&this.formatter.registerAll(e.formatters),e.adapters&&this.adapter.registerAll(e.adapters)}}const Ce=class{constructor(){o(this,"module");o(this,"lifecycle",es.getInstance());o(this,"binders",{});o(this,"components",{});o(this,"formatters",{});o(this,"adapters",{});o(this,"parseTemplate",qa);o(this,"parseType",Ut);o(this,"templateDelimiters",["{","}"]);o(this,"rootInterface",".");o(this,"preloadData",!0);o(this,"removeBinderAttributes",!0);o(this,"blockNodeNames",["SCRIPT","STYLE","TEMPLATE","CODE"]);o(this,"blockUnknownCustomElements",!0);o(this,"_prefix",["rv"]);o(this,"_fullPrefix",["rv-"]);if(this.module=new md(this.binders,this.components,this.formatters,this.adapters),Ce.instance)return Ce.instance;Ce.instance=this}static handler(e,t,s,n){if(!this||!this.call){const r=new Error(`[rv-${s.type}="${s.keypath}"] Event handler "${s.keypath}" not found!"`);throw console.error(r,s,n,s.view.models),r}this.call(e,t,s.view.models,n)}set prefix(e){if(Array.isArray(e)){this._prefix=[],this._fullPrefix=[];for(const t of e)this._prefix.push(t),this._fullPrefix.push(t+"-")}}get prefix(){return this._prefix}get fullPrefix(){return this._fullPrefix}configure(e){if(e)for(const[t,s]of Object.entries(e))switch(t){case"binders":this.binders={...this.binders,...s};break;case"formatters":this.formatters={...this.formatters,...s};break;case"components":this.components={...this.components,...s};break;case"adapters":this.adapters={...this.adapters,...s};break;case"prefix":this.prefix=s;break;case"parseTemplate":this.parseTemplate=s;break;case"parseType":this.parseType=s;break;case"templateDelimiters":this.templateDelimiters=s;break;case"rootInterface":this.rootInterface=s;break;case"preloadData":this.preloadData=s;break;case"blockNodeNames":this.blockNodeNames=s;break;case"blockUnknownCustomElements":this.blockUnknownCustomElements=!!s;break;default:console.warn("Option not supported",t,s);break}}getViewOptions(e){const t={adapters:{},binders:{},components:{},formatters:{},attributeBinders:[],rootInterface:{}};if(e&&(t.binders={...t.binders,...e.binders},t.formatters={...t.formatters,...e.formatters},t.components={...t.components,...e.components},t.adapters={...t.adapters,...e.adapters}),e!=null&&e.prefix&&Array.isArray(e==null?void 0:e.prefix)){t.prefix=[],t.fullPrefix=[];for(const s of e.prefix)t.prefix.push(s),t.fullPrefix.push(s+"-")}else t.prefix=this.prefix,t.fullPrefix=this.fullPrefix;if(t.templateDelimiters=(e==null?void 0:e.templateDelimiters)||this.templateDelimiters,t.rootInterface=(e==null?void 0:e.rootInterface)||this.rootInterface,t.removeBinderAttributes=typeof(e==null?void 0:e.removeBinderAttributes)=="boolean"?e.removeBinderAttributes:this.removeBinderAttributes,t.blockNodeNames=(e==null?void 0:e.blockNodeNames)||this.blockNodeNames,t.preloadData=typeof(e==null?void 0:e.preloadData)=="boolean"?e.preloadData:this.preloadData,t.handler=(e==null?void 0:e.handler)||Ce.handler,t.binders={...this.binders,...t.binders},t.formatters={...this.formatters,...t.formatters},t.components={...this.components,...t.components},t.adapters={...this.adapters,...t.adapters},t.attributeBinders||(t.attributeBinders=[]),t.binders){const s=Object.keys(t.binders).filter(n=>n.indexOf("*")>=1);t.attributeBinders.push(...s)}return t}bind(e,t={},s){const n=this.getViewOptions(s);At.updateOptions(n);const r=new ot(e,t,n);return r.bind(),r}};let Ne=Ce;o(Ne,"instance");window.Riba=Ne;const zs=Symbol();function gd(i){return null}const vd=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function bd(i,e,...t){return{tag:i,props:e,children:t}}function On(i){if(!i)return"";const{tag:e,props:t,children:s}=i;if(typeof e=="function")return e===gd?String(t.html):On(e(Object.assign({children:s},t)));const n=[];if(e!==zs){n.push("<",e);for(const[l,c]of Object.entries(t??{}))c!=null&&(typeof c=="boolean"&&!Ft(e)?c&&n.push(" ",l):n.push(" ",l,"=",Fi(c)))}let r=!1;return s.length&&(r=!0,e!==zs&&n.push(">"),a(s)),e!==zs&&(r?n.push(""):vd.has(e)?n.push("/>"):n.push(">")),n.join("");function a(l){for(const c of l)c&&(Array.isArray(c)?a(c):typeof c=="string"||typeof c=="number"?n.push(Hh(c.toString())):n.push(On(c)))}}globalThis.jsxCreateElement=bd;globalThis.jsxFragment=zs;class or extends HTMLElement{constructor(){super();o(this,"_debug",!1);o(this,"_color");o(this,"templateLoaded",!1);o(this,"observedAttributesToCheck",{});o(this,"observedAttributes",[]);this._debug&&(this._color=vo())}remove(){this&&this.parentElement&&this.parentElement.removeChild(this)}_log(t,...s){const n=this.constructor.name||this.tagName;this._color||(this._color=vo()),Nh({namespace:n,color:this._color,mode:t},...s)}info(...t){return this._log("info",...t)}debug(...t){if(this._debug)return this._log("debug",...t)}error(...t){console.error(...t)}requiredAttributes(){return[]}async init(t){this.loadAttributes(t),this.getPassedObservedAttributes(t)}ready(){return this.allPassedObservedAttributesAreInitialized()&&this.checkRequiredAttributes()}attributeIsPassed(t){return this.hasAttribute(t)}getPassedObservedAttributes(t){const s=this.observedAttributesToCheck;for(const n of t)s[n]?s[n].passed||(s[n].passed=this.attributeIsPassed(n)):s[n]={passed:!1,initialized:!1}}allPassedObservedAttributesAreInitialized(){return Object.keys(this.observedAttributesToCheck).every(t=>{var s,n;return!((s=this.observedAttributesToCheck[t])!=null&&s.passed)||((n=this.observedAttributesToCheck[t])==null?void 0:n.initialized)})}checkRequiredAttributes(){return this.requiredAttributes().every(t=>(t=mt(t),this.scope.hasOwnProperty(t)&&typeof this.scope[t]<"u"))}parseAttribute(t){let s=t;if(typeof t!="string")return t;if(t==="true")s=!0;else if(t==="false")s=!1;else if(t==="null")s=null;else if(t==="undefined")s=void 0;else if(t==="")s=void 0;else if(!isNaN(Number(t)))s=Number(t),s>=Number.MAX_SAFE_INTEGER&&(s=t);else{const n=Vi(s);s=n||s}return s}eventHandler(t){return function(s,n,r,a){if(!this||!this.call){const l=new Error(`[rv-${r.type}="${r.keypath}"] Event handler "${r.keypath}" not found!"`);throw console.error(r,a),l}this.call(t,n,r.view.models,a)}}connectedCallback(){}disconnectedCallback(){}async attributeChangedCallback(t,s,n,r){this.observedAttributesToCheck&&this.observedAttributesToCheck[t]&&(this.observedAttributesToCheck[t].initialized=!0),n=this.parseAttribute(n);const a=mt(t);this.scope&&this.scope[a]&&(s=this.scope[a]),this.scope[a]=n,this.parsedAttributeChangedCallback(a,s,n,r)}parsedAttributeChangedCallback(t,s,n,r){this.debug("parsedAttributeChangedCallback called",t,s,n,r)}adoptedCallback(t,s){this.debug("adoptedCallback called",t,s)}async loadTemplate(){if(this.templateLoaded===!0)return null;if(!this.checkRequiredAttributes())return this.debug("Not all required attributes are set to load the template"),null;this.templateLoaded=!0;const t=await this.template();try{return t&&(t instanceof HTMLElement?(this.innerHTML="",this.appendChild(t)):typeof t=="string"?this.innerHTML=t:t.tag&&(this.innerHTML=On(t))),t}catch(s){throw this.templateLoaded=!1,s}}async beforeTemplate(){}async afterTemplate(t){this.debug("afterTemplate",t)}async onReady(){}observe(t,s){return new At(this.scope,t,s)}observeAttribute(t,s){const n=mt(t);return this.observe(n,s)}setBinderAttribute(t,s,n=null){const r=mt(t),a=this.scope[r];this.attributeChangedCallback(t,a,s,n)}getBinderAttribute(t){const s=mt(t);return this.scope[s]}loadAttributes(t){const s=this.attributes;for(const n in s){const r=s[n],a=r.nodeName;if(t.indexOf(a)!==-1){const l=r.nodeValue;this.attributeChangedCallback(a,void 0,l,null)}}}}o(or,"tagName");let P=class extends or{constructor(){super();o(this,"view",null);o(this,"riba");o(this,"_binds",!1);o(this,"_bound",!1);o(this,"_connected",!1);o(this,"_disconnected",!1);o(this,"lifecycleEvents",D.getInstance("lifecycle"));o(this,"lifecycleOptions",{});o(this,"autobind",!0);this.lifecycleEvents.trigger("Component:constructor",this.getLifecycleEventData()),this.lifecycleEvents.on("ComponentLifecycle:allBound",this.afterAllBind,this)}get binds(){return this._binds}get bound(){return this._bound}get connected(){return this._connected}get disconnected(){return this._disconnected}async init(t){try{return await super.init(t),this.lifecycleEvents.trigger("Component:init",this.getLifecycleEventData()),await this.bindIfReady()}catch(s){this.throw(s)}}throw(t){t.message&&console.error(`[${this.tagName}] ${t.message}`),this.lifecycleEvents.trigger("Component:error",t,this.getLifecycleEventData()),this.error(t)}async bindIfReady(){if(this.ready()){await this.beforeTemplate();const t=await this.loadTemplate();await this.afterTemplate(t),this.autobind&&await this.bind(),await this.onReady();return}this.debug("Not all required or passed attributes are set to load and bind the template",this.observedAttributesToCheck,this.scope)}async _beforeBind(){this._binds=!0,this.debug("Start to bind Riba"),this.lifecycleEvents.trigger("Component:beforeBind",this.getLifecycleEventData())}async beforeBind(){}async _afterBind(){this._binds=!1,this._bound=!0,this.lifecycleEvents.trigger("Component:afterBind",this.getLifecycleEventData())}async afterBind(){}async afterAllBind(){}getLifecycleEventData(){return{tagName:this.tagName.toLowerCase(),component:this,options:this.lifecycleOptions}}disconnectedCallback(){try{this._disconnected=!0,this._connected=!1,super.disconnectedCallback(),this.lifecycleEvents.trigger("Component:disconnected",this.getLifecycleEventData()),this.lifecycleEvents.off("ComponentLifecycle:allBound",this.afterAllBind,this),this.lifecycleEvents.off("ComponentLifecycle:error",this.afterAllBind,this)}catch(t){this.throw(t)}}connectedCallback(){try{this._disconnected=!1,this._connected=!0,super.connectedCallback(),this.lifecycleEvents.trigger("Component:connected",this.getLifecycleEventData())}catch(t){this.throw(t)}}async attributeChangedCallback(t,s,n,r){try{super.attributeChangedCallback(t,s,n,r),await this.bindIfReady()}catch(a){this.throw(a)}}callFormatterHandler(t){return{name:"call",read:(s,...n)=>{if(!s)throw new Error(`[${t.tagName}] Can not use "call" formatter: fn is undefined!`);return s.apply(t,n)}}}argsFormatterHandler(t){return{name:"args",read:(s,...n)=>(r,a,l,c)=>{if(!s)throw new Error(`[${t.tagName}] Can not use "args" formatter: fn is undefined!`);return n.push(r),n.push(a),n.push(l),n.push(c),s.apply(t,n)}}}async bind(){if(this.binds||this.bound)return this.view;if(!this.checkRequiredAttributes()){this.debug("Not all required attributes are set for bind");return}try{await this._beforeBind(),await this.beforeBind(),this.riba=new Ne,this.view=this.getView(),this.view&&(this.scope=this.view.models,this.view.bind()),await this._afterBind(),await this.afterBind()}catch(t){this._binds=!1,this._bound=!1,this.throw(t)}return this.view}getView(){var t;try{const s=(t=this.riba)==null?void 0:t.getViewOptions({handler:this.eventHandler(this),formatters:{call:this.callFormatterHandler(this),args:this.argsFormatterHandler(this)}});return s?new ot(Array.prototype.slice.call(this.childNodes),this.scope,s):null}catch(s){this.throw(s)}}async unbind(){try{this.view&&(this._binds=!1,this._bound=!1,this.view.unbind(),this.view=null)}catch(t){this.throw(t)}}async build(){try{this.view&&this.view.build()}catch(t){this.throw(t)}}};const Ed=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class ar extends P{constructor(){super(...arguments);o(this,"templateAttributes",[]);o(this,"templateReady",!1)}connectedCallback(){this.addItemsByTemplate(),super.connectedCallback(),this.removeTemplates(),this.bindIfReady()}ready(){return super.ready()&&this.templateReady}transformTemplateAttribute(t,s,n){switch(n){case"number":return Number(s);case"boolean":return s==="true";case"string":if(typeof s=="string")return s;if(typeof(s==null?void 0:s.toString)=="function")return s.toString();case"object":return Vi(s)}return Ut(s).value}transformTemplateAttributes(t,s){return t.index=t.index||s,t}getTemplateAttributes(t,s){const n={};for(const r of this.templateAttributes)typeof t.getAttribute(r.name)!="string"&&r.required?console.error(new Error(`template "${r.name}" attribute is required!`)):n[mt(r.name)]=this.transformTemplateAttribute(r.name,t.getAttribute(r.name));return this.transformTemplateAttributes(n,s)}addItemByTemplate(t,s){const n=this.getTemplateAttributes(t,s),r=t.innerHTML;this.scope.items||(this.scope.items=[]),this.scope.items.push({...n,content:r})}addItemsByTemplate(){const t=this.querySelectorAll("template, .template");for(let s=0;s{var s;return t.nodeName!=="TEMPLATE"&&!((s=t.classList)!=null&&s.contains("template"))&&t.nodeName!=="#text"})}}const yd={name:"contains",read(i,e,t){if(ae(i))return i.indexOf(e)>-1;if(Array.isArray(i)){if(xt(e)||console.warn("[containsFormatter] The second parameter must be of type number for arrays but is "+typeof e),e=Number(e),ie(e))return ie(t)?i[e]===t:i.includes(e)}else if(j(i)&&ie(e))return ie(t)?i[e]===t:(ae(e)||console.warn("[containsFormatter] The second parameter must be of type string for objects"+typeof e),Object.keys(i).includes(String(e)));return!1}},gl={name:"size",read(i){return i&&i.length?i.length:0}},vl={name:"empty",read(i){return gl.read(i)<=0}},lr={name:"get",read(i,e){return j(i)||Array.isArray(i)?i[e]:ae(i)&&xt(e)?i.charAt(e):null}},wd={name:"first",read(i){return lr.read(i,0)}},_d={name:"isLast",read(i,e){return i.length===e+1}},Sd={name:"last",read(i){return lr.read(i,i.length-1)}},Ad={name:"random",read(i,e=0){if(Array.isArray(i))return i[Math.floor(Math.random()*i.length)];if(xt(i)){const t=i;return Math.floor(Math.random()*(t-e+1)+e)}return null}},Td={name:"range",read(i,e,t){return e=Number(xt(e)?e:0),t=Number(xt(t)?t:i.length-1),t>i.length-1&&(t=i.length-1),e>t?[]:i.slice(Number(e||0),1+t)}},Cd={name:"set",read(i,e,t){return t||(t=e),j(i)||Array.isArray(i)?i[e]=t:i=t,i}},Ld={name:"overlaps",read(i,e){for(const t of i)for(const s of e)if(t.equals&&t.equals(s)||t===s)return!0;return!1}},kd={name:"join",read(i,e){return i.join(e)}},Nd={name:"and",read(i,e){return i&&e}},xd={name:"between",read(i,...e){return i>=e[0]&&i<=e[1]}},Id={name:"egt",read(i,e){return i>=e}},Od={name:"eq",read(i,e){return i===e}},Dd={name:"gt",read(i,e){return i>e}},Pd={name:"ne",read(i,e){return i!==e}},Md={name:"lt",read(i,e){return ie===0?i:bl(e,i%e),Wd={name:"gcd",read:bl},zd={name:"even",read(i){return i%2===0}},qd={name:"uneven",read(i){return i%2!==0}},Yd={name:"digits",read(i){return xt(i)?i:us(i)}},Kd={name:"args",read(i,...e){return(t,s,n,r)=>(e.push(t),e.push(s),e.push(n),e.push(r),i.apply(this,e))}},Gd={name:"debug",read(i,e="debug"){return console[e](i),i}},Xd={name:"default",read(i,e){return ie(i)?ae(i)?i.length>0?i:e:i===null?e:i:e}},Qd={name:"is-desktop",read(){return sd()}},Jd={name:"is-mobile",read(){return ed()}},Zd={name:"call",read(i,...e){return i.apply(this,e)}},tu={name:"call-name",read:function(i,e,...t){return i[e](...t)}},eu={name:"map",read(i,e,t){const s=Array.prototype.slice.call(arguments);return s.splice(1,2),e[t].apply(e,s)}},su={name:"os",read(){return xa()}},iu={name:"prefer",read(i,e){return e||i}},nu={name:"ternary",read(i,e,t){return i?e:t}},ru={name:"append",read(i,e){return i+e}},ou={name:"capitalize",read(i){return zh(i)}},au={name:"cut",read(i,e,t=""){return i?typeof i!="string"?(console.warn("[cutFormatter] Value must be of type string"),i):i.length>e?i.substring(e,e===-1?void 0:-1)+t:i:""}},lu={name:"downcase",read(i){return i.toLowerCase()}},cu={name:"ends-with",read(i,e){return typeof i!="string"?(console.warn("[endsWithFormatter] Value must be of type string"),i):i.endsWith(e)}},hu={name:"filled",read(i){return ae(i)&&!vl.read(i.replace(/\s/g,""))}},qi={name:"handleize",read(i){return i?jh(i):(console.warn("[handleizeFormatter] str is not set"),"")}},du={name:"match",read(i,e,t){return!i||!e?!1:i.match(new RegExp(e,t))}},uu={name:"padStart",read(i,e=2,t="0"){return i.padStart(e,t)}},pu={name:"padEnd",read(i,e=2,t="0"){return i.padEnd(e,t)}},Dn={name:"to-integer",read(i){const e=parseInt(i*1,10);return isNaN(e)?0:e}},Pn={name:"to-float",read(i){const e=parseFloat(i*1);return isNaN(e)?0:e}},Mn={name:"to-decimal",read(i){if(!Dn.read)throw new Error("toIntegerFormatter must have a read function");if(!Pn.read)throw new Error("toFloatFormatter must have a read function");const e=Dn.read(i*1),t=Pn.read(i);return e==t?e:t}},$n={name:"is-integer",read(i){return i===+i&&i===(i|0)}},fu=".",mu="'",Ao=2,gu={name:"numberFormat",read(i,e=Ao,t=fu,s=mu){if(!Mn.read)throw new Error("toDecimalFormatter must have a read function");if(!$n.read)throw new Error("isIntegerFormatter must have a read function");i=xt(i)?i:Mn.read(i),$n.read(e)||(e=Ao);let n=(+(Math.round(+(Math.abs(i)+"e"+e))+"e"+-e)).toFixed(e);i<0&&(n="-"+n);const r=n.split(".");return r.length==2?r[0].replace(/\B(?=(\d{3})+(?!\d))/g,s)+t+r[1]:r[0].replace(/\B(?=(\d{3})+(?!\d))/g,s)}},vu={name:"pluralize",read(i,e,t){return t===null&&(t=e+"s"),Array.isArray(i)&&(i=i.length),i===1?e:t}},bu={name:"prepend",read(i,e){return e+i}},Eu={name:"upcase",read(i){return i.toUpperCase()}},yu={name:"replace",read(i,e,t){return i.replace(new RegExp(e,"g"),t)}},wu={name:"replaceFirst",read(i,e,t){return i.replace(e,t)}},_u={name:"slice",read(i,e,t){return i.slice(e,t)}},Su={name:"starts-with",read(i,e){return typeof i!="string"?(console.warn("[startsWithFormatter] Value must be of type string"),i):i.startsWith(e)}},Au={name:"strip",read(i){return i.trim()}},Tu={name:"strip-html",read(i){return Ai(i)}},Cu={name:"boolean",read(i){return i==="true"?!0:i==="false"?!1:!!i}},Lu={name:"is-array",read:Array.isArray},ku={name:"is-boolean",read:ye},Nu={name:"is-defined",read:ie},xu={name:"is-number",read:xt},Iu={name:"is-object",read:j},Ou={name:"is-string",read(i){return ae(i)}},Du={name:"is-undefined",read:Sa},Pu={name:"json",read(i,e=2,t=!0){return Fi(i,e,t)}},Mu={name:"parse",read(i){return j(i)||Array.isArray(i)||typeof i=="boolean"||typeof i=="number"?(console.warn("[parseFormatter] You do not need to parse the value because since it already been parsed"),i):typeof i=="string"?Ut(i,!0).value:null}},$u={name:"toBase64",read(i){return $h(i)}},Ru={name:"to-string",read(i,e){if(Array.isArray(i))for(const t in i)i[t]&&(i[t]=Lt(i[t]));else if(j(i))for(const t in i)i[t]=Lt(i[t]);else i=Lt(i);return e?i||e:i}},Bu={name:"to-number",read(i,e){const t=Bh(i);return e?t||e:t}},Hu=Object.freeze(Object.defineProperty({__proto__:null,andFormatter:Nd,appendFormatter:ru,argsFormatter:Kd,betweenFormatter:xd,booleanFormatter:Cu,callFormatter:Zd,callNameFormatter:tu,capitalizeFormatter:ou,containsFormatter:yd,cutFormatter:au,debugFormatter:Gd,defaultFormatter:Xd,digitsFormatter:Yd,dividedByFormatter:Ud,downcaseFormatter:lu,egtFormatter:Id,eltFormatter:$d,emptyFormatter:vl,endsWithFormatter:cu,eqFormatter:Od,evenFormatter:zd,filledFormatter:hu,firstFormatter:wd,gcdFormatter:Wd,getFormatter:lr,gtFormatter:Dd,handleizeFormatter:qi,isArrayFormatter:Lu,isBooleanFormatter:ku,isDefinedFormatter:Nu,isDesktopFormatter:Qd,isIntegerFormatter:$n,isLastFormatter:_d,isMobileFormatter:Jd,isNumberFormatter:xu,isObjectFormatter:Iu,isStringFormatter:Ou,isUndefinedFormatter:Du,joinFormatter:kd,jsonFormatter:Pu,lastFormatter:Sd,ltFormatter:Md,mapFormatter:eu,matchFormatter:du,minusFormatter:Fd,moduloFormatter:jd,neFormatter:Pd,notFormatter:Bd,numberFormatFormatter:gu,orFormatter:Rd,osFormatter:su,overlapsFormatter:Ld,padEndFormatter:pu,padStartFormatter:uu,parseFormatter:Mu,pluralizeFormatter:vu,plusFormatter:Hd,preferFormatter:iu,prependFormatter:bu,randomFormatter:Ad,rangeFormatter:Td,replaceFirstFormatter:wu,replaceFormatter:yu,setFormatter:Cd,sizeFormatter:gl,sliceFormatter:_u,startsWithFormatter:Su,stripFormatter:Au,stripHtmlFormatter:Tu,ternaryFormatter:nu,timesFormatter:Vd,toBase64Formatter:$u,toDecimalFormatter:Mn,toFloatFormatter:Pn,toIntegerFormatter:Dn,toNumberFormatter:Bu,toStringFormatter:Ru,unevenFormatter:qd,upcaseFormatter:Eu},Symbol.toStringTag,{value:"Module"})),Fu={formatters:Hu,binders:fd,services:od,components:Ed,adapters:ld,init(i={}){return fs.setSingleton(i),window.onerror=(e,t,s,n,r)=>{console.error(e,t,s,n,r)},window.addEventListener("error",e=>{console.error(e)}),this}},Le=class{constructor(){o(this,"history",[]);return Le.instance||(Le.instance=this),Le.instance}currentStatus(){return this.history[this.history.length-1]}prevStatus(){const e=this.history;return e.length<2?null:e[e.length-2]}add(e,t=null){this.history.push({namespace:t,url:e})}};let qs=Le;o(qs,"instance");const ss="router-error",Vu="no-barba",Uu="no-barba-prefetch";class Yi{constructor(e="replace"){o(this,"oldContainer");o(this,"newContainer");o(this,"newContainerLoading");o(this,"deferred",ln());o(this,"action");this.action=e}async init(e,t){this.oldContainer=e,this.deferred=ln();const s=ln();return this.newContainerLoading=s.promise,this.start(),this.newContainer=await t,s.resolve(this.newContainer),this.deferred.promise}async done(){if(!this.oldContainer)throw new Error("Can't remove old container");if(this.action==="replace"&&this.oldContainer.remove(),!this.newContainer)throw new Error("Can't show new container");return this.newContainer.style.visibility="visible",this.deferred.resolve(void 0)}}class ju extends Yi{async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");await this.newContainerLoading,this.finish()}async finish(){return document.body.scrollTop=0,this.done()}}class El extends Yi{constructor(t=!0){super("replace");o(this,"scrollToTop");o(this,"durationMs",200);this.scrollToTop=t}async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");this.oldContainer&&(this.oldContainer.style.transition=`opacity ${this.durationMs}ms`,this.oldContainer.style.opacity="0"),this.scrollToTop&&await nr(window,"start","vertical","smooth");const t=await this.newContainerLoading;t.style.opacity="0",t.style.transition=`opacity ${this.durationMs}ms`,setTimeout(()=>{this.finish(t)},this.durationMs)}async finish(t){return t.style.opacity="1",this.done()}}class ms extends Yi{constructor(t="replace",s=!0){super(t);o(this,"action");o(this,"scrollToTop");this.action=t,this.scrollToTop=s}async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");this.oldContainer&&(this.oldContainer.style.display="none"),this.scrollToTop&&await nr(window,"start","vertical","smooth"),await this.newContainerLoading,await this.finish(),this.oldContainer&&(this.oldContainer.style.display="")}async finish(){return this.done()}}class Wu{constructor(){o(this,"namespace");o(this,"container");o(this,"dispatcher",D.getInstance())}extend(e){return ue({deep:!1},this,e)}init(){this.dispatcher.on("initStateChange",(e,t,s)=>{s&&s.namespace===this.namespace&&this.onLeave()}),this.dispatcher.on("newPageReady",(e,t,s,n)=>{this.container=n,t.namespace===this.namespace&&this.onEnter()}),this.dispatcher.on("transitionCompleted",(e,t,s)=>{t.namespace===this.namespace&&this.onEnterCompleted(),s&&s.namespace===this.namespace&&this.onLeaveCompleted()})}}class Zt{static getPrefetchLinkElements(e){return e.querySelectorAll('link[href][rel="dns-prefetch"], link[href][rel="preconnect"], link[href][rel="prefetch"], link[href][rel="subresource"], link[href][rel="preload"], link[href][rel="router-preload"]')}static parseTitle(e){let t="";const s=e.querySelector("title");return s&&s.innerText&&(t=s.innerText),t}static parseResponse(e,t,s,n=!0){let r="",a=[];const l=document.createElement("template");return l.innerHTML=e,t&&(r=this.parseTitle(l.content)),n&&(a=this.getPrefetchLinkElements(l.content)),{container:this.getContainer(l,s),title:r,prefetchLinks:a}}static parseInitial(e,t,s=!0){let n="",r=[];const a=this.getContainer(document,t);return e&&(n=this.parseTitle(document)),s&&(r=this.getPrefetchLinkElements(document)),{container:a,title:n,prefetchLinks:r}}static getContainer(e,t){if(!e)throw new Error("Barba.js: [getContainer] No element to get container from, maybe the DOM is not ready!");const s=this.parseContainer(e,t);if(!s)throw new Error("[DOM] No container found");return s}static getNamespace(e){return e&&e.dataset&&e.dataset.namespace?e.dataset.namespace:null}static putContainer(e,t){e=e,e.style.visibility="hidden",t.appendChild(e)}static parseContainer(e,t){if(!e){const n=new Error("New page not loaded!");throw console.error(n,e),n}let s;if(e.content?s=e.content.querySelector(t):s=e.querySelector(t),!s){const n=new Error(`No container with selector "${t}" found!`);throw console.error(n,e),n}return s}}const ke=class{constructor(e){if(this.viewId=e,this.viewId=e,ke.instances[this.viewId])return ke.instances[this.viewId];ke.instances[this.viewId]=this,this.onLinkEnterIntern=this.onLinkEnterIntern.bind(this)}static getInstance(e="main"){const t=ke.instances[e];return t||new this(e)}init(e=!1){if(!window.history.pushState)return!1;e&&(this.deInit(),document.body.addEventListener("mouseover",this.onLinkEnterIntern,{passive:!0}),document.body.addEventListener("touchstart",this.onLinkEnterIntern,{passive:!0}))}deInit(){document.body.removeEventListener("mouseover",this.onLinkEnterIntern),document.body.removeEventListener("touchstart",this.onLinkEnterIntern)}initBinder(e,t){if(!window.history.pushState)return!1;this.deInitBinder(e,t),e.addEventListener("mouseover",this.onLinkEnter.bind(this,t,e),{passive:!0}),e.addEventListener("touchstart",this.onLinkEnter.bind(this,t,e),{passive:!0})}deInitBinder(e,t){e.removeEventListener("mouseover",this.onLinkEnter.bind(this,t,e)),e.removeEventListener("touchstart",this.onLinkEnter.bind(this,t,e))}onLinkEnter(e,t,s){if(t.classList&&(t.classList.contains(Uu)||t.classList.contains(ss)))return;e=ut(e).url;const n=z.preventCheck(e,t,s);if(e&&n){const r=z.getInstance(this.viewId);r?r.loadResponseCached(e,!1,!1).catch(a=>{t.classList.add(ss),console.error(e),console.error(a)}):(console.warn(`[Prefetch.onLinkEnter] No pjax instance for viewId "${this.viewId}" found!`),t.classList.add(ss))}}url(e){e=ut(e).url;const t=z.preventCheck(e);if(e&&t){const s=z.getInstance(this.viewId);s?s.loadResponseCached(e,!1,!1).catch(n=>{console.error(n)}):console.warn(`[Prefetch.url] No pjax instance for viewId "${this.viewId}" found!`)}}onLinkEnterIntern(e){let t=Ui(e);if(!t)throw new Error("HTML Element not set");for(;t&&!z.getHref(t);)t=t.parentNode;if(!t||t.nodeName!=="A")return;const s=z.getHref(t);if(!(t.classList.contains("route")||t.hasAttribute("rv-route"))){if(!s){console.warn("Url is not defined, you can't cache the link without the url. Please make sure your element has the href attribute or pass the url directly to this function.",t);return}return this.onLinkEnter(s,t,e)}}};let xe=ke;o(xe,"instances",{});var yl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zu(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var De=1e3,Pe=De*60,Me=Pe*60,le=Me*24,qu=le*7,Yu=le*365.25,Ku=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return Gu(i);if(t==="number"&&isFinite(i))return e.long?Qu(i):Xu(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function Gu(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return t*Yu;case"weeks":case"week":case"w":return t*qu;case"days":case"day":case"d":return t*le;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Me;case"minutes":case"minute":case"mins":case"min":case"m":return t*Pe;case"seconds":case"second":case"secs":case"sec":case"s":return t*De;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Xu(i){var e=Math.abs(i);return e>=le?Math.round(i/le)+"d":e>=Me?Math.round(i/Me)+"h":e>=Pe?Math.round(i/Pe)+"m":e>=De?Math.round(i/De)+"s":i+"ms"}function Qu(i){var e=Math.abs(i);return e>=le?Ps(i,e,le,"day"):e>=Me?Ps(i,e,Me,"hour"):e>=Pe?Ps(i,e,Pe,"minute"):e>=De?Ps(i,e,De,"second"):i+" ms"}function Ps(i,e,t,s){var n=e>=t*1.5;return Math.round(i/t)+" "+s+(n?"s":"")}let Ju=class{constructor(){this.cache=new Map}get(e){return this.cache.get(e)}set(e,t){this.cache.set(e,t)}keys(){return Array.from(this.cache.keys())}del(e){this.cache.delete(e)}clear(){this.cache.clear()}};var Zu=Ju;const To=Ku,tp=Zu;function ep({cleanupInterval:i="5 mins",customStorage:e}={}){let t=e||new tp,s;const n=m=>typeof m>"u",r=m=>typeof m<"u",a=m=>typeof m=="function",l=m=>typeof m=="number",c=m=>m&&new Date(m).getTime(){w.indexOf(m)===0&&t.del(w)});return}t.del(m)}function u(){return t.clear()}function f(){clearInterval(s)}return i&&(s=setInterval(async()=>{(await t.keys()).forEach(async v=>{const b=await t.get(v);if(b){const w=b[1];c(w)&&t.del(v)}})},To(i))),{resolve:d,del:p,clear:u,teardown:f}}var sp=ep;const ip=zu(sp);class wl{constructor(){o(this,"data");this.data={}}set(e,t){return this.data[e]=t,this.data[e]}get(e){return this.data[e]}reset(){this.data={}}}function pe(i){return new Promise((e,t)=>{i.oncomplete=i.onsuccess=()=>e(i.result),i.onabort=i.onerror=()=>t(i.error)})}function np(i,e){const t=indexedDB.open(i);t.onupgradeneeded=()=>t.result.createObjectStore(e);const s=pe(t);return(n,r)=>s.then(a=>r(a.transaction(e,n).objectStore(e)))}let dn;function Es(){return dn||(dn=np("keyval-store","keyval")),dn}function rp(i,e=Es()){return e("readonly",t=>pe(t.get(i)))}function op(i,e,t=Es()){return t("readwrite",s=>(s.put(e,i),pe(s.transaction)))}function ap(i,e=Es()){return e("readwrite",t=>(t.delete(i),pe(t.transaction)))}function lp(i=Es()){return i("readwrite",e=>(e.clear(),pe(e.transaction)))}function cp(i,e){return i.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},pe(i.transaction)}function hp(i=Es()){return i("readonly",e=>{if(e.getAllKeys)return pe(e.getAllKeys());const t=[];return cp(e,s=>t.push(s.key)).then(()=>t)})}const dp={get:rp,set:op,keys:hp,del:ap,clear:()=>lp()};ip({customStorage:window.ssr?void 0:dp});const G=class{constructor({id:e,action:t="replace",wrapper:s,containerSelector:n="[data-namespace]",listenAllLinks:r=!1,listenPopstate:a=!0,parseTitle:l=!0,changeBrowserUrl:c=!0,prefetchLinks:h=!0,scrollToTop:d=!0,scrollToAnchorOffset:p=ce.options.scrollToAnchorOffset}){o(this,"history",new qs);o(this,"cacheEnabled",!0);o(this,"transitionProgress",!1);o(this,"listenAllLinks");o(this,"listenPopstate");o(this,"parseTitle");o(this,"changeBrowserUrl");o(this,"dispatcher");o(this,"transition");o(this,"wrapper");o(this,"viewId","main");o(this,"containerSelector");o(this,"prefetchLinks");o(this,"scrollToAnchorOffset");e&&(this.viewId=e);let u=this;return this.scrollToAnchorOffset=p||0,this.dispatcher=new D(this.viewId),this.listenAllLinks=r,this.listenPopstate=a,this.parseTitle=l,this.changeBrowserUrl=c,this.containerSelector=n,this.prefetchLinks=h,G.instances[this.viewId]&&(u=G.instances[this.viewId]),u.transition=u.transition||new ms(t,d),u.wrapper=u.wrapper||s,u.containerSelector=u.containerSelector||n,u.listenAllLinks=ye(u.listenAllLinks)?u.listenAllLinks:r,u.listenPopstate=ye(u.listenPopstate)?u.listenPopstate:a,u.parseTitle=ye(u.parseTitle)?u.parseTitle:l,u.changeBrowserUrl=ye(u.changeBrowserUrl)?u.changeBrowserUrl:c,u.prefetchLinks=ye(u.prefetchLinks)?u.prefetchLinks:h,u.wrapper&&u.wrapper.setAttribute("aria-live","polite"),G.instances[this.viewId]=u,G.instances[this.viewId]}static getInstance(e="main"){const t=G.instances[e];return t||console.warn(`[Pjax.getInstance] No pjax instance for viewId "${e}" found!`),t}static preventCheckUrl(e){const t=document.createElement("a");return t.setAttribute("href",e),!(!t||!e||hn(e)===hn(location.href)||window.location.protocol!==t.protocol||window.location.hostname!==t.hostname||So()!==So(t.port))}static preventCheck(e,t,s){return!(!window.history.pushState||!this.preventCheckUrl(e)||s&&(s&&s.which&&s.which>1||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)||t&&(t.target&&t.target==="_blank"||t.getAttribute&&typeof t.getAttribute("download")=="string"||t.classList.contains(Vu)))}static getHref(e){if(e){if(e.getAttribute&&typeof e.getAttribute("xlink:href")=="string")return e.getAttribute("xlink:href")||void 0;if(typeof e.href=="string"||e.hasAttribute&&e.hasAttribute("href")){const t=e.href||e.getAttribute("href");if(!t)throw console.error("href attribute not found for element: ",e),new Error("href attribute not found!");return t}}}setActiveWrapper(e){this.wrapper=e}start(){if(this.wrapper)try{this.init(this.wrapper,this.listenAllLinks,this.listenPopstate)}catch(e){console.error(e)}else console.error("Can't init pjax without wrapper")}getCurrentUrl(){return hn(Ti())}goTo(e,t=!1){if(t){const s=window.open(e,"_blank");return s?s.focus():!1}if(e.startsWith("http")&&(e=ut(e).url),e.startsWith("http"))this.forceGoTo(e);else return this.changeBrowserUrl&&window.history.pushState(null,"",e),this.onStateChange(void 0,e)}getTransition(){return this.transition||new ms}prefetchLink(e){if(e=ut(e).url,G.preventCheckUrl(e))return this.loadResponseCached(e,!0,!1)}prefetchLinkElement(e,t){const s=e.getAttribute("rel"),n=G.getHref(e);if(s==="router-preload"&&n&&this.cacheEnabled&&!e.classList.contains(ss))try{this.prefetchLink(n)}catch(r){e.classList.add(ss),console.error(r)}t.appendChild(e)}removePrefetchLinks(e){e.querySelectorAll('link[href][rel="dns-prefetch"], link[href][rel="preconnect"], link[href][rel="prefetch"], link[href][rel="subresource"], link[href][rel="preload"], link[href][rel="router-preload"]').forEach(s=>{s&&s.parentNode&&s.parentNode.removeChild(s)})}replacePrefetchLinkElements(e){const t=document.head||document.getElementsByTagName("head")[0];this.removePrefetchLinks(t),e.forEach(s=>{this.prefetchLinkElement(s,t)})}async loadCached(e){try{const{responsePromise:t}=await this.loadResponseCached(e,!1,!0);if(!this.wrapper)throw new Error("[Pjax] you need a wrapper!");const s=await t;return Zt.putContainer(s.container,this.wrapper),this.parseTitle===!0&&s.title&&(document.title=s.title),this.prefetchLinks===!0&&s.prefetchLinks&&this.replacePrefetchLinkElements(s.prefetchLinks),s.container}catch(t){throw console.error(t),this.forceGoTo(e),t}}async loadResponseCached(e,t=!1,s=!0){let n;try{if(this.cacheEnabled&&(n=G.cache.get(e),n))return{fromCache:!0,responsePromise:n};n=this.loadResponse(e,t),this.cacheEnabled&&n&&G.cache.set(e,n)}catch(r){throw console.error(r),s&&this.forceGoTo(e),r}return{fromCache:!1,responsePromise:n}}async loadResponse(e,t=!1){const s=t?{cache:"force-cache"}:{},n=await je.get(e,void 0,"html",{},s);if(!n||!n.body)throw new Error("No body!");return Zt.parseResponse(n.body,this.parseTitle,this.containerSelector,this.prefetchLinks)}bindEvents(e,t){e&&document.addEventListener("click",this.onLinkClickIntern.bind(this)),t&&window.addEventListener("popstate",this.onStateChange.bind(this))}forceGoTo(e){console.warn("forceGoTo",e),e&&e.href&&(window.location=e),typeof e=="string"&&(window.location.href=e)}onLinkClickIntern(e){let t=Ui(e);for(;t&&!G.getHref(t);)t=t.parentNode;if(!t||t.nodeName!=="A")return;const s=G.getHref(t);if(!(t.classList.contains("route")||t.hasAttribute("rv-route"))){if(!s)throw new Error("Url is not defined, you can't cache the link without the url. Please make sure your element has the href attribute or pass the url directly to this function.");return t.classList.contains("route")||t.hasAttribute("rv-route")?!1:this.onLinkClick(e,t,s)}}onLinkClick(e,t,s,n=!1){const{url:r,location:a}=ut(s),{location:l}=ut();if(a.hash&&l.pathname===a.pathname){let h=a.hash.slice(1);h=decodeURI(h);const d=document.getElementById(h);if(d)return e.stopPropagation(),e.preventDefault(),this.changeBrowserUrl&&window.history.pushState(null,"",r),Ue(d,this.scrollToAnchorOffset)}if(!r)throw new Error("url is falsy");G.preventCheck(r,t,e)&&(e.stopPropagation(),e.preventDefault(),this.dispatcher.trigger("linkClicked",t,e),this.goTo(r,n))}async onStateChange(e,t=this.getCurrentUrl()){t=ut(t).url;const s=ut(this.history.currentStatus().url).url;if(this.changeBrowserUrl&&s===t)return!1;this.history.add(t),this.dispatcher.trigger("initStateChange",this.viewId,this.history.currentStatus(),this.history.prevStatus());const n=Zt.getContainer(document,this.containerSelector),r=this.loadCached(t),a=this.getTransition();this.transitionProgress=!0;const l=a.init(n,r);this.onNewContainerLoaded(await r),await l,this.onTransitionEnd()}onNewContainerLoaded(e){const t=this.history.currentStatus();t.namespace=Zt.getNamespace(e);const s=bo(e);this.dispatcher.trigger("newPageReady",this.viewId,this.history.currentStatus(),this.history.prevStatus(),e,e.innerHTML,s,!1)}onTransitionEnd(){this.transitionProgress=!1,this.dispatcher.trigger("transitionCompleted",this.viewId,this.history.currentStatus(),this.history.prevStatus())}init(e,t,s){const n=Zt.parseInitial(this.parseTitle,this.containerSelector,this.prefetchLinks),r=window.location.pathname;if(this.cacheEnabled){const l=ut(window.location.href).url;G.cache.get(r)||this.loadResponseCached(l,!1,!1)}this.replacePrefetchLinkElements(n.prefetchLinks),this.wrapper=e,this.history.add(this.getCurrentUrl(),Zt.getNamespace(n.container)),this.dispatcher.trigger("initStateChange",this.viewId,this.history.currentStatus());const a=bo(n.container);this.dispatcher.trigger("newPageReady",this.viewId,this.history.currentStatus(),{},n.container,n.container.innerHTML,a,!0),this.dispatcher.trigger("transitionCompleted",this.viewId,this.history.currentStatus()),this.bindEvents(t,s)}};let z=G;o(z,"cache",new wl),o(z,"instances",{});class ce{static get options(){return this._options}constructor(){}static getSingleton(){if(this.instance)return this.instance;throw new Error("Singleton of RouterService not defined, please call setSingleton first!")}static setSingleton(e={}){return this.instance?(console.warn("Singleton of RouterService already defined!"),this.instance):(e.defaultTransition=e.defaultTransition??new ms,e.scrollToAnchorOffset=e.scrollToAnchorOffset??0,this._options=e,this.instance=new this,this.instance)}}o(ce,"_options"),o(ce,"instance");const up=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Yi,BaseView:Wu,CustomTransition:ju,Dom:Zt,FadeTransition:El,HideShowTransition:ms,Pjax:z,Prefetch:xe,RouterService:ce},Symbol.toStringTag,{value:"Module"})),pp=qi.read;class Rn extends E{constructor(){super(...arguments);o(this,"nested",null)}async routine(t,s){const n=t;s=s||{},s.listenAllLinks=!1,s.listenPopstate=!1,s.parseTitle=!1,s.transition=s.transition||new ms,s.viewId=s.viewId||t.getAttribute("id")||pp(s.url),s.containerSelector=s.containerSelector||"[data-namespace]",s.changeBrowserUrl=!1;const r=new z(s),{responsePromise:a}=await r.loadResponseCached(s.url,!1,!1),l=await a;n.replaceWith(l.container),l.container.style.visibility="visible",j(this.view.models)||(this.view.models={}),this.nested&&this.nested.unbind(),this.nested=new ot(l.container,this.view.models,this.view.options),this.nested.bind()}unbind(){this.nested&&this.nested.unbind()}}o(Rn,"key","view-static"),o(Rn,"block",!0);class _l extends E{constructor(){super(...arguments);o(this,"prefetch");o(this,"options",{url:"",viewId:"main",removeAfterActivation:!1,newTab:!1,newTabOnExtern:!0});o(this,"onClick",this._onClick.bind(this))}_onClick(t){const s=z.getInstance(this.options.viewId);if(ji(this.options.url,!0))console.info("already on this site, do nothing"),t.stopPropagation(),t.preventDefault();else if(rd(this.options.url)){if(!s)return;t.stopPropagation(),t.preventDefault();const n=this.options.newTab||this.options.newTabOnExtern;s.goTo(this.options.url,n)}else if(this.options.url){if(!s)return;s.onLinkClick(t,this.el,this.options.url,this.options.newTab)}this.options.removeAfterActivation&&this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}bind(t){t.classList.add("route"),!window.ssr&&(this.onClick=this.onClick.bind(this),t.addEventListener("click",this.onClick))}routine(t,s){ae(s)?this.options.url=s:j(s)&&(this.options=s),this.options.viewId=this.options.viewId||"main",this.prefetch=new xe(this.options.viewId),this.options.newTab=!1;const n=t.tagName==="A";if(!this.options.url&&n){const r=t.getAttribute("href");r&&(this.options.url=r)}t.getAttribute("target")==="_blank"&&(this.options.newTab=!0),this.options.url=ut(this.options.url).url,n&&(!t.href||!t.getAttribute("href"))&&this.options.url&&(t.setAttribute("href",this.options.url),t.href=this.options.url),this.options.newTab||this.prefetch.initBinder(t,this.options.url)}unbind(t){var s;(s=this.prefetch)==null||s.deInitBinder(t,this.options.url),t.removeEventListener("click",this.onClick)}}o(_l,"key","route");class Sl extends E{constructor(){super(...arguments);o(this,"dispatcher",new D("main"));o(this,"url");o(this,"className","");o(this,"onUrlChange",this._onUrlChange.bind(this))}_onUrlChange(){if(this.url){if(ji(this.url))return this.el.classList.add(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!0),!0;this.el.classList.remove(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!1)}return!1}bind(){this.dispatcher.on("newPageReady",this.onUrlChange)}routine(t,s){this.url=s,this.className=this.args[0].toString()||"active";const n=t.tagName==="A";if(!this.url&&n){const r=t.getAttribute("href");r&&(this.url=r)}this.onUrlChange()}unbind(){this.dispatcher.off("newPageReady",this.onUrlChange)}}o(Sl,"key","route-class-*");class Al extends E{routine(e,t){var n;if(window.ssr)return;const s=e.tagName==="A";if(!t&&s){const r=e.getAttribute("href");r&&(t=r)}t&&((n=z.getInstance())==null||n.prefetchLink(t))}}o(Al,"key","route-preload");class Tl extends E{constructor(){super(...arguments);o(this,"dispatcher",new D("main"));o(this,"className");o(this,"url");o(this,"onUrlChange",this._onUrlChange.bind(this))}_onUrlChange(){if(!this.url)throw new Error("url is not defined!");if(!this.className)throw new Error("className is not defined!");return id(this.url)?(this.el.classList.add(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!0),!0):(this.el.classList.remove(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!1),!1)}routine(t,s){this.url=s,this.className=this.args[0].toString()||"active";const n=t.tagName==="A";if(!this.url&&n){const r=t.getAttribute("href");r&&(this.url=r)}this.onUrlChange()}bind(){this.dispatcher.on("newPageReady",this.onUrlChange)}unbind(){this.dispatcher.off("newPageReady",this.onUrlChange)}}o(Tl,"class","parent-route-class-*");const un=()=>{window.history.back()};class Cl extends E{constructor(){super(...arguments);o(this,"priority",3e3);o(this,"eventName")}unbind(t){this.eventName&&t.removeEventListener(this.eventName,un)}routine(t){if(this.args===null)throw new Error("args is null");this.eventName&&t.removeEventListener(this.eventName,un),this.eventName=this.args[0],t.addEventListener(this.args[0],un)}}o(Cl,"key","route-back-on-*");const fp=Object.freeze(Object.defineProperty({__proto__:null,ParentRouteClassStarBinder:Tl,RouteBackOnStarBinder:Cl,RouteBinder:_l,RouteClassStarBinder:Sl,RoutePreloadBinder:Al,ViewStaticBinder:Rn},Symbol.toStringTag,{value:"Module"})),Ir=class extends P{constructor(){super();o(this,"autobind",!1);o(this,"scope",{src:"",id:"",async:!0,defer:!0})}static get observedAttributes(){return["src","id","async","defer"]}connectedCallback(){super.connectedCallback(),super.init(Ir.observedAttributes)}async onReady(){await super.onReady(),this.scope.id||(this.scope.id=La("script-")),Kh(this.scope.src,this.scope.id,this.scope.async)}requiredAttributes(){return["src"]}template(){return null}};let Ys=Ir;o(Ys,"tagName","router-load-script");const cs=class extends P{constructor(){super();o(this,"events",D.getInstance("main"));o(this,"nested",null);o(this,"wrapper",null);o(this,"pjax",null);o(this,"prefetch",null);o(this,"scope",{id:"main",action:"replace",scrollToTop:!0,listenAllLinks:!0,listenPopstate:!0,scrollToAnchorHash:!0,scrollToAnchorOffset:ce.options.scrollToAnchorOffset,datasetToRootScope:!0,parseTitle:!0,changeBrowserUrl:!0,prefetchLinks:!0,transition:ce.options.defaultTransition})}static get observedAttributes(){return["id","action","container-selector","scroll-to-top","listen-all-links","listen-popstate","scroll-to-anchor-hash","scroll-to-anchor-offset","dataset-to-root-scope","parse-title","change-browser-url","prefetch-links"]}connectedCallback(){super.connectedCallback(),this.init(cs.observedAttributes)}addEventListeners(){this.events.on("newPageReady",this.onPageReady,this),this.events.on("initStateChange",this.onTransitionInit,this),this.events.on("transitionCompleted",this.onTransitionCompleted,this)}removeEventListeners(){this.events.off("newPageReady",this.onPageReady,this),this.events.off("initStateChange",this.onTransitionInit,this),this.events.off("transitionCompleted",this.onTransitionCompleted,this)}getContainerSelector(){return this.scope.id==="main"?`${cs.tagName} > *:first-child`:`${cs.tagName}#${this.scope.id} > *:first-child`}initAndStartPjax(){if(!this.scope.id){console.error("Id attribute is required!");return}const t={id:this.scope.id,action:this.scope.action,wrapper:this,containerSelector:this.getContainerSelector(),listenAllLinks:!!this.scope.listenAllLinks,listenPopstate:!!this.scope.listenPopstate,transition:this.scope.transition,parseTitle:!!this.scope.parseTitle,changeBrowserUrl:!!this.scope.changeBrowserUrl,prefetchLinks:!!this.scope.prefetchLinks,scrollToTop:!!this.scope.scrollToTop};this.pjax=new z(t),this.pjax.setActiveWrapper(this),this.prefetch=new xe(this.scope.id),this.prefetch.init(t.prefetchLinks),this.pjax.start()}onPageReady(t,s,n,r,a,l,c){if(t!==this.scope.id){console.warn("not the right view",this.scope.id,t,l);return}if(this.debug("New page ready!",this.innerHTML),this.scope.datasetToRootScope&&(this.scope.$root||(this.scope.$root={}),this.scope.$root.dataset=l),!c){if(this.view=this.getView(),!this.view){console.warn("View ist not ready!");return}this.view.bind()}}async onTransitionInit(t){t===this.scope.id&&this.setTransitionClass("init")}async onTransitionCompleted(t){if(t===this.scope.id){if(this.setTransitionClass("complete"),this.scope.scrollToAnchorHash){let s=null;if(window.location.hash.substr(1)&&(s=document.getElementById(window.location.hash.substr(1)),s))return await Ue(s,this.scope.scrollToAnchorOffset,window)}if(this.scope.scrollToTop)return await nr(window,"start","vertical","smooth")}}setTransitionClass(t){this.classList.remove("transition-init"),this.classList.remove("transition-complete"),this.classList.add(`transition-${t}`)}requiredAttributes(){return[]}parsedAttributeChangedCallback(t,s,n,r){switch(super.parsedAttributeChangedCallback(t,s,n,r),t){case"id":this.events=D.getInstance(this.scope.id);break}}async beforeBind(){await super.beforeBind(),this.addEventListeners(),this.initAndStartPjax()}template(){return null}};let Ks=cs;o(Ks,"tagName","router-view");const mp=Object.freeze(Object.defineProperty({__proto__:null,RouterLoadScriptComponent:Ys,RouterViewComponent:Ks},Symbol.toStringTag,{value:"Module"})),gp={binders:fp,components:mp,services:up,formatters:{},init(i={}){return ce.setSingleton(i),this}},cr=["os","dark","light"],Ll={dimension:0,name:"xs"},kl={dimension:576,name:"sm"},Nl={dimension:768,name:"md"},xl={dimension:992,name:"lg"},Il={dimension:1200,name:"xl"},Ol={dimension:1400,name:"xxl"},ki={breakpoints:[Ll,kl,Nl,xl,Il,Ol],allowStoreDataInBrowser:!0},k={nsPrefix:"bs5-toggle-button:",eventNames:{toggle:"toggle",toggled:"toggled",init:"init",state:"state"}},Bn={elEventNames:{removed:"removed",added:"added"}},Hn={elEventNames:{removed:"removed",added:"added"}},vp=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_BP_LG:xl,DEFAULT_BP_MD:Nl,DEFAULT_BP_SM:kl,DEFAULT_BP_XL:Il,DEFAULT_BP_XS:Ll,DEFAULT_BP_XXL:Ol,DEFAULT_MODULE_OPTIONS:ki,TOGGLE_ATTRIBUTE:Bn,TOGGLE_BUTTON:k,TOGGLE_CLASS:Hn,themeChoices:cr},Symbol.toStringTag,{value:"Module"})),Rt=class{constructor(e){o(this,"_options",ki);o(this,"_events",D.getInstance("bs5"));o(this,"_activeBreakpoint",null);o(this,"onViewChanges",Et(this._onViewChanges.bind(this)));this._options=e,this.sortBreakpoints(this._options.breakpoints),this._onViewChanges(),this.addEventListeners()}static getSingleton(){if(Rt.instance)return Rt.instance;throw new Error("Singleton of Bs5Service not defined, please call `Bs5Service.setSingleton` or `bs5Module.init` first!")}static setSingleton(e=ki){if(Rt.instance)throw new Error("Singleton of Bs5Service already defined!");return Rt.instance=new Rt(e),Rt.instance}onBreakpointChanges(){this._events.trigger("breakpoint:changed",this.activeBreakpoint)}setActiveBreakpoint(e){var t;e&&e.name!==((t=this.activeBreakpoint)==null?void 0:t.name)&&(this._activeBreakpoint=e,this.onBreakpointChanges())}addEventListeners(){window.addEventListener("resize",this.onViewChanges,{passive:!0})}removeEventListeners(){window.removeEventListener("resize",this.onViewChanges)}_onViewChanges(){const e=this.getBreakpointByDimension(rr().w)||this.getBreakpointByName("xs");e&&this.setActiveBreakpoint(e)}sortBreakpoints(e){e.sort((t,s)=>t.dimension-s.dimension)}get options(){return this._options}get activeBreakpoint(){return this._activeBreakpoint}get breakpointNames(){return this.options.breakpoints.map(e=>e.name)}get events(){return this._events}on(e,t,s){return this.events.on(e,t,s)}once(e,t,s){return this.events.once(e,t,s)}off(e,t,s){return this.events.off(e,t,s)}getBreakpointByDimension(e,t){t=t||this.options.breakpoints;for(let n=0;nr.dimension&&e=s.dimension?s:null}getBreakpointByName(e,t){t=t||this.options.breakpoints;const s=t.find(n=>n.name===e);return s||null}getNextBreakpointByName(e){const t=this.breakpointNames,s=t.indexOf(e);if(s<0)throw new Error(`the breakpoint "${e}" does not exist!`);return s===t.length-1?null:t[s+1]}getPrevBreakpointByName(e){const t=this.breakpointNames,s=t.indexOf(e);if(s<0)throw new Error(`the breakpoint "${e}" does not exist!`);return s===0?null:t[s-1]}isBreakpointGreaterThan(e,t){const s=this.getBreakpointByName(e),n=this.getBreakpointByName(t);return s&&n?s.dimension>n.dimension:null}isBreakpointSmallerThan(e,t){const s=this.getBreakpointByName(e),n=this.getBreakpointByName(t);return s&&n?s.dimension"u")return!1;var e=nt(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function bp(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var s=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];!at(r)||!wt(r)||(Object.assign(r.style,s),Object.keys(n).forEach(function(a){var l=n[a];l===!1?r.removeAttribute(a):r.setAttribute(a,l===!0?"":l)}))})}function Ep(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(s){var n=e.elements[s],r=e.attributes[s]||{},a=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:t[s]),l=a.reduce(function(c,h){return c[h]="",c},{});!at(n)||!wt(n)||(Object.assign(n.style,l),Object.keys(r).forEach(function(c){n.removeAttribute(c)}))})}}const pr={name:"applyStyles",enabled:!0,phase:"write",fn:bp,effect:Ep,requires:["computeStyles"]};function bt(i){return i.split("-")[0]}var oe=Math.max,Ni=Math.min,Re=Math.round;function Vn(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function zl(){return!/^((?!chrome|android).)*safari/i.test(Vn())}function Be(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var s=i.getBoundingClientRect(),n=1,r=1;e&&at(i)&&(n=i.offsetWidth>0&&Re(s.width)/i.offsetWidth||1,r=i.offsetHeight>0&&Re(s.height)/i.offsetHeight||1);var a=de(i)?nt(i):window,l=a.visualViewport,c=!zl()&&t,h=(s.left+(c&&l?l.offsetLeft:0))/n,d=(s.top+(c&&l?l.offsetTop:0))/r,p=s.width/n,u=s.height/r;return{width:p,height:u,top:d,right:h+p,bottom:d+u,left:h,x:h,y:d}}function fr(i){var e=Be(i),t=i.offsetWidth,s=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:s}}function ql(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&ur(t)){var s=e;do{if(s&&i.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function It(i){return nt(i).getComputedStyle(i)}function yp(i){return["table","td","th"].indexOf(wt(i))>=0}function qt(i){return((de(i)?i.ownerDocument:i.document)||window.document).documentElement}function Gi(i){return wt(i)==="html"?i:i.assignedSlot||i.parentNode||(ur(i)?i.host:null)||qt(i)}function Co(i){return!at(i)||It(i).position==="fixed"?null:i.offsetParent}function wp(i){var e=/firefox/i.test(Vn()),t=/Trident/i.test(Vn());if(t&&at(i)){var s=It(i);if(s.position==="fixed")return null}var n=Gi(i);for(ur(n)&&(n=n.host);at(n)&&["html","body"].indexOf(wt(n))<0;){var r=It(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function ys(i){for(var e=nt(i),t=Co(i);t&&yp(t)&&It(t).position==="static";)t=Co(t);return t&&(wt(t)==="html"||wt(t)==="body"&&It(t).position==="static")?e:t||wp(i)||e}function mr(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function is(i,e,t){return oe(i,Ni(e,t))}function _p(i,e,t){var s=is(i,e,t);return s>t?t:s}function Yl(){return{top:0,right:0,bottom:0,left:0}}function Kl(i){return Object.assign({},Yl(),i)}function Gl(i,e){return e.reduce(function(t,s){return t[s]=i,t},{})}var Sp=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Kl(typeof e!="number"?e:Gl(e,We))};function Ap(i){var e,t=i.state,s=i.name,n=i.options,r=t.elements.arrow,a=t.modifiersData.popperOffsets,l=bt(t.placement),c=mr(l),h=[Q,it].indexOf(l)>=0,d=h?"height":"width";if(!(!r||!a)){var p=Sp(n.padding,t),u=fr(r),f=c==="y"?X:Q,m=c==="y"?st:it,v=t.rects.reference[d]+t.rects.reference[c]-a[c]-t.rects.popper[d],b=a[c]-t.rects.reference[c],w=ys(r),I=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,O=v/2-b/2,S=p[f],A=I-u[d]-p[m],N=I/2-u[d]/2+O,C=is(S,N,A),R=c;t.modifiersData[s]=(e={},e[R]=C,e.centerOffset=C-N,e)}}function Tp(i){var e=i.state,t=i.options,s=t.element,n=s===void 0?"[data-popper-arrow]":s;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||ql(e.elements.popper,n)&&(e.elements.arrow=n))}const Xl={name:"arrow",enabled:!0,phase:"main",fn:Ap,effect:Tp,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function He(i){return i.split("-")[1]}var Cp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Lp(i,e){var t=i.x,s=i.y,n=e.devicePixelRatio||1;return{x:Re(t*n)/n||0,y:Re(s*n)/n||0}}function Lo(i){var e,t=i.popper,s=i.popperRect,n=i.placement,r=i.variation,a=i.offsets,l=i.position,c=i.gpuAcceleration,h=i.adaptive,d=i.roundOffsets,p=i.isFixed,u=a.x,f=u===void 0?0:u,m=a.y,v=m===void 0?0:m,b=typeof d=="function"?d({x:f,y:v}):{x:f,y:v};f=b.x,v=b.y;var w=a.hasOwnProperty("x"),I=a.hasOwnProperty("y"),O=Q,S=X,A=window;if(h){var N=ys(t),C="clientHeight",R="clientWidth";if(N===nt(t)&&(N=qt(t),It(N).position!=="static"&&l==="absolute"&&(C="scrollHeight",R="scrollWidth")),N=N,n===X||(n===Q||n===it)&&r===$e){S=st;var $=p&&N===A&&A.visualViewport?A.visualViewport.height:N[C];v-=$-s.height,v*=c?1:-1}if(n===Q||(n===X||n===st)&&r===$e){O=it;var H=p&&N===A&&A.visualViewport?A.visualViewport.width:N[R];f-=H-s.width,f*=c?1:-1}}var F=Object.assign({position:l},h&&Cp),U=d===!0?Lp({x:f,y:v},nt(t)):{x:f,y:v};if(f=U.x,v=U.y,c){var q;return Object.assign({},F,(q={},q[S]=I?"0":"",q[O]=w?"0":"",q.transform=(A.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",q))}return Object.assign({},F,(e={},e[S]=I?v+"px":"",e[O]=w?f+"px":"",e.transform="",e))}function kp(i){var e=i.state,t=i.options,s=t.gpuAcceleration,n=s===void 0?!0:s,r=t.adaptive,a=r===void 0?!0:r,l=t.roundOffsets,c=l===void 0?!0:l,h={placement:bt(e.placement),variation:He(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Lo(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Lo(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const gr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kp,data:{}};var Ms={passive:!0};function Np(i){var e=i.state,t=i.instance,s=i.options,n=s.scroll,r=n===void 0?!0:n,a=s.resize,l=a===void 0?!0:a,c=nt(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&h.forEach(function(d){d.addEventListener("scroll",t.update,Ms)}),l&&c.addEventListener("resize",t.update,Ms),function(){r&&h.forEach(function(d){d.removeEventListener("scroll",t.update,Ms)}),l&&c.removeEventListener("resize",t.update,Ms)}}const vr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Np,data:{}};var xp={left:"right",right:"left",bottom:"top",top:"bottom"};function Gs(i){return i.replace(/left|right|bottom|top/g,function(e){return xp[e]})}var Ip={start:"end",end:"start"};function ko(i){return i.replace(/start|end/g,function(e){return Ip[e]})}function br(i){var e=nt(i),t=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:t,scrollTop:s}}function Er(i){return Be(qt(i)).left+br(i).scrollLeft}function Op(i,e){var t=nt(i),s=qt(i),n=t.visualViewport,r=s.clientWidth,a=s.clientHeight,l=0,c=0;if(n){r=n.width,a=n.height;var h=zl();(h||!h&&e==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}return{width:r,height:a,x:l+Er(i),y:c}}function Dp(i){var e,t=qt(i),s=br(i),n=(e=i.ownerDocument)==null?void 0:e.body,r=oe(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=oe(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),l=-s.scrollLeft+Er(i),c=-s.scrollTop;return It(n||t).direction==="rtl"&&(l+=oe(t.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:l,y:c}}function yr(i){var e=It(i),t=e.overflow,s=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+s)}function Ql(i){return["html","body","#document"].indexOf(wt(i))>=0?i.ownerDocument.body:at(i)&&yr(i)?i:Ql(Gi(i))}function ns(i,e){var t;e===void 0&&(e=[]);var s=Ql(i),n=s===((t=i.ownerDocument)==null?void 0:t.body),r=nt(s),a=n?[r].concat(r.visualViewport||[],yr(s)?s:[]):s,l=e.concat(a);return n?l:l.concat(ns(Gi(a)))}function Un(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Pp(i,e){var t=Be(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function No(i,e,t){return e===hr?Un(Op(i,t)):de(e)?Pp(e,t):Un(Dp(qt(i)))}function Mp(i){var e=ns(Gi(i)),t=["absolute","fixed"].indexOf(It(i).position)>=0,s=t&&at(i)?ys(i):i;return de(s)?e.filter(function(n){return de(n)&&ql(n,s)&&wt(n)!=="body"}):[]}function $p(i,e,t,s){var n=e==="clippingParents"?Mp(i):[].concat(e),r=[].concat(n,[t]),a=r[0],l=r.reduce(function(c,h){var d=No(i,h,s);return c.top=oe(d.top,c.top),c.right=Ni(d.right,c.right),c.bottom=Ni(d.bottom,c.bottom),c.left=oe(d.left,c.left),c},No(i,a,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Jl(i){var e=i.reference,t=i.element,s=i.placement,n=s?bt(s):null,r=s?He(s):null,a=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,c;switch(n){case X:c={x:a,y:e.y-t.height};break;case st:c={x:a,y:e.y+e.height};break;case it:c={x:e.x+e.width,y:l};break;case Q:c={x:e.x-t.width,y:l};break;default:c={x:e.x,y:e.y}}var h=n?mr(n):null;if(h!=null){var d=h==="y"?"height":"width";switch(r){case he:c[h]=c[h]-(e[d]/2-t[d]/2);break;case $e:c[h]=c[h]+(e[d]/2-t[d]/2);break}}return c}function Fe(i,e){e===void 0&&(e={});var t=e,s=t.placement,n=s===void 0?i.placement:s,r=t.strategy,a=r===void 0?i.strategy:r,l=t.boundary,c=l===void 0?Dl:l,h=t.rootBoundary,d=h===void 0?hr:h,p=t.elementContext,u=p===void 0?we:p,f=t.altBoundary,m=f===void 0?!1:f,v=t.padding,b=v===void 0?0:v,w=Kl(typeof b!="number"?b:Gl(b,We)),I=u===we?Pl:we,O=i.rects.popper,S=i.elements[m?I:u],A=$p(de(S)?S:S.contextElement||qt(i.elements.popper),c,d,a),N=Be(i.elements.reference),C=Jl({reference:N,element:O,strategy:"absolute",placement:n}),R=Un(Object.assign({},O,C)),$=u===we?R:N,H={top:A.top-$.top+w.top,bottom:$.bottom-A.bottom+w.bottom,left:A.left-$.left+w.left,right:$.right-A.right+w.right},F=i.modifiersData.offset;if(u===we&&F){var U=F[n];Object.keys(H).forEach(function(q){var V=[it,st].indexOf(q)>=0?1:-1,rt=[X,st].indexOf(q)>=0?"y":"x";H[q]+=U[rt]*V})}return H}function Rp(i,e){e===void 0&&(e={});var t=e,s=t.placement,n=t.boundary,r=t.rootBoundary,a=t.padding,l=t.flipVariations,c=t.allowedAutoPlacements,h=c===void 0?dr:c,d=He(s),p=d?l?Fn:Fn.filter(function(m){return He(m)===d}):We,u=p.filter(function(m){return h.indexOf(m)>=0});u.length===0&&(u=p);var f=u.reduce(function(m,v){return m[v]=Fe(i,{placement:v,boundary:n,rootBoundary:r,padding:a})[bt(v)],m},{});return Object.keys(f).sort(function(m,v){return f[m]-f[v]})}function Bp(i){if(bt(i)===Ki)return[];var e=Gs(i);return[ko(i),e,ko(e)]}function Hp(i){var e=i.state,t=i.options,s=i.name;if(!e.modifiersData[s]._skip){for(var n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,l=a===void 0?!0:a,c=t.fallbackPlacements,h=t.padding,d=t.boundary,p=t.rootBoundary,u=t.altBoundary,f=t.flipVariations,m=f===void 0?!0:f,v=t.allowedAutoPlacements,b=e.options.placement,w=bt(b),I=w===b,O=c||(I||!m?[Gs(b)]:Bp(b)),S=[b].concat(O).reduce(function(ve,Pt){return ve.concat(bt(Pt)===Ki?Rp(e,{placement:Pt,boundary:d,rootBoundary:p,padding:h,flipVariations:m,allowedAutoPlacements:v}):Pt)},[]),A=e.rects.reference,N=e.rects.popper,C=new Map,R=!0,$=S[0],H=0;H=0,rt=V?"width":"height",Y=Fe(e,{placement:F,boundary:d,rootBoundary:p,altBoundary:u,padding:h}),dt=V?q?it:Q:q?st:X;A[rt]>N[rt]&&(dt=Gs(dt));var Ls=Gs(dt),Xt=[];if(r&&Xt.push(Y[U]<=0),l&&Xt.push(Y[dt]<=0,Y[Ls]<=0),Xt.every(function(ve){return ve})){$=F,R=!1;break}C.set(F,Xt)}if(R)for(var ks=m?3:1,nn=function(Pt){var Ge=S.find(function(xs){var Qt=C.get(xs);if(Qt)return Qt.slice(0,Pt).every(function(rn){return rn})});if(Ge)return $=Ge,"break"},Ke=ks;Ke>0;Ke--){var Ns=nn(Ke);if(Ns==="break")break}e.placement!==$&&(e.modifiersData[s]._skip=!0,e.placement=$,e.reset=!0)}}const Zl={name:"flip",enabled:!0,phase:"main",fn:Hp,requiresIfExists:["offset"],data:{_skip:!1}};function xo(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function Io(i){return[X,it,st,Q].some(function(e){return i[e]>=0})}function Fp(i){var e=i.state,t=i.name,s=e.rects.reference,n=e.rects.popper,r=e.modifiersData.preventOverflow,a=Fe(e,{elementContext:"reference"}),l=Fe(e,{altBoundary:!0}),c=xo(a,s),h=xo(l,n,r),d=Io(c),p=Io(h);e.modifiersData[t]={referenceClippingOffsets:c,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const tc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Fp};function Vp(i,e,t){var s=bt(i),n=[Q,X].indexOf(s)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,a=r[0],l=r[1];return a=a||0,l=(l||0)*n,[Q,it].indexOf(s)>=0?{x:l,y:a}:{x:a,y:l}}function Up(i){var e=i.state,t=i.options,s=i.name,n=t.offset,r=n===void 0?[0,0]:n,a=dr.reduce(function(d,p){return d[p]=Vp(p,e.rects,r),d},{}),l=a[e.placement],c=l.x,h=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=h),e.modifiersData[s]=a}const ec={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Up};function jp(i){var e=i.state,t=i.name;e.modifiersData[t]=Jl({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const wr={name:"popperOffsets",enabled:!0,phase:"read",fn:jp,data:{}};function Wp(i){return i==="x"?"y":"x"}function zp(i){var e=i.state,t=i.options,s=i.name,n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,l=a===void 0?!1:a,c=t.boundary,h=t.rootBoundary,d=t.altBoundary,p=t.padding,u=t.tether,f=u===void 0?!0:u,m=t.tetherOffset,v=m===void 0?0:m,b=Fe(e,{boundary:c,rootBoundary:h,padding:p,altBoundary:d}),w=bt(e.placement),I=He(e.placement),O=!I,S=mr(w),A=Wp(S),N=e.modifiersData.popperOffsets,C=e.rects.reference,R=e.rects.popper,$=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,H=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),F=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,U={x:0,y:0};if(N){if(r){var q,V=S==="y"?X:Q,rt=S==="y"?st:it,Y=S==="y"?"height":"width",dt=N[S],Ls=dt+b[V],Xt=dt-b[rt],ks=f?-R[Y]/2:0,nn=I===he?C[Y]:R[Y],Ke=I===he?-R[Y]:-C[Y],Ns=e.elements.arrow,ve=f&&Ns?fr(Ns):{width:0,height:0},Pt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Yl(),Ge=Pt[V],xs=Pt[rt],Qt=is(0,C[Y],ve[Y]),rn=O?C[Y]/2-ks-Qt-Ge-H.mainAxis:nn-Qt-Ge-H.mainAxis,wh=O?-C[Y]/2+ks+Qt+xs+H.mainAxis:Ke+Qt+xs+H.mainAxis,on=e.elements.arrow&&ys(e.elements.arrow),_h=on?S==="y"?on.clientTop||0:on.clientLeft||0:0,ao=(q=F==null?void 0:F[S])!=null?q:0,Sh=dt+rn-ao-_h,Ah=dt+wh-ao,lo=is(f?Ni(Ls,Sh):Ls,dt,f?oe(Xt,Ah):Xt);N[S]=lo,U[S]=lo-dt}if(l){var co,Th=S==="x"?X:Q,Ch=S==="x"?st:it,Jt=N[A],Is=A==="y"?"height":"width",ho=Jt+b[Th],uo=Jt-b[Ch],an=[X,Q].indexOf(w)!==-1,po=(co=F==null?void 0:F[A])!=null?co:0,fo=an?ho:Jt-C[Is]-R[Is]-po+H.altAxis,mo=an?Jt+C[Is]+R[Is]-po-H.altAxis:uo,go=f&&an?_p(fo,Jt,mo):is(f?fo:ho,Jt,f?mo:uo);N[A]=go,U[A]=go-Jt}e.modifiersData[s]=U}}const sc={name:"preventOverflow",enabled:!0,phase:"main",fn:zp,requiresIfExists:["offset"]};function qp(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function Yp(i){return i===nt(i)||!at(i)?br(i):qp(i)}function Kp(i){var e=i.getBoundingClientRect(),t=Re(e.width)/i.offsetWidth||1,s=Re(e.height)/i.offsetHeight||1;return t!==1||s!==1}function Gp(i,e,t){t===void 0&&(t=!1);var s=at(e),n=at(e)&&Kp(e),r=qt(e),a=Be(i,n,t),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!t)&&((wt(e)!=="body"||yr(r))&&(l=Yp(e)),at(e)?(c=Be(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):r&&(c.x=Er(r))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Xp(i){var e=new Map,t=new Set,s=[];i.forEach(function(r){e.set(r.name,r)});function n(r){t.add(r.name);var a=[].concat(r.requires||[],r.requiresIfExists||[]);a.forEach(function(l){if(!t.has(l)){var c=e.get(l);c&&n(c)}}),s.push(r)}return i.forEach(function(r){t.has(r.name)||n(r)}),s}function Qp(i){var e=Xp(i);return Wl.reduce(function(t,s){return t.concat(e.filter(function(n){return n.phase===s}))},[])}function Jp(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function Zp(i){var e=i.reduce(function(t,s){var n=t[s.name];return t[s.name]=n?Object.assign({},n,s,{options:Object.assign({},n.options,s.options),data:Object.assign({},n.data,s.data)}):s,t},{});return Object.keys(e).map(function(t){return e[t]})}var Oo={placement:"bottom",modifiers:[],strategy:"absolute"};function Do(){for(var i=arguments.length,e=new Array(i),t=0;t(i&&window.CSS&&window.CSS.escape&&(i=i.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),i),cf=i=>i==null?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase(),hf=i=>{do i+=Math.floor(Math.random()*af);while(document.getElementById(i));return i},df=i=>{if(!i)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(i);const s=Number.parseFloat(e),n=Number.parseFloat(t);return!s&&!n?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*lf)},ac=i=>{i.dispatchEvent(new Event(jn))},kt=i=>!i||typeof i!="object"?!1:(typeof i.jquery<"u"&&(i=i[0]),typeof i.nodeType<"u"),jt=i=>kt(i)?i.jquery?i[0]:i:typeof i=="string"&&i.length>0?document.querySelector(oc(i)):null,qe=i=>{if(!kt(i)||i.getClientRects().length===0)return!1;const e=getComputedStyle(i).getPropertyValue("visibility")==="visible",t=i.closest("details:not([open])");if(!t)return e;if(t!==i){const s=i.closest("summary");if(s&&s.parentNode!==t||s===null)return!1}return e},Wt=i=>!i||i.nodeType!==Node.ELEMENT_NODE||i.classList.contains("disabled")?!0:typeof i.disabled<"u"?i.disabled:i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false",lc=i=>{if(!document.documentElement.attachShadow)return null;if(typeof i.getRootNode=="function"){const e=i.getRootNode();return e instanceof ShadowRoot?e:null}return i instanceof ShadowRoot?i:i.parentNode?lc(i.parentNode):null},Ii=()=>{},_s=i=>{i.offsetHeight},cc=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,fn=[],uf=i=>{document.readyState==="loading"?(fn.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of fn)e()}),fn.push(i)):i()},lt=()=>document.documentElement.dir==="rtl",ht=i=>{uf(()=>{const e=cc();if(e){const t=i.NAME,s=e.fn[t];e.fn[t]=i.jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=()=>(e.fn[t]=s,i.jQueryInterface)}})},Z=(i,e=[],t=i)=>typeof i=="function"?i(...e):t,hc=(i,e,t=!0)=>{if(!t){Z(i);return}const s=5,n=df(e)+s;let r=!1;const a=({target:l})=>{l===e&&(r=!0,e.removeEventListener(jn,a),Z(i))};e.addEventListener(jn,a),setTimeout(()=>{r||ac(e)},n)},_r=(i,e,t,s)=>{const n=i.length;let r=i.indexOf(e);return r===-1?!t&&s?i[n-1]:i[0]:(r+=t?1:-1,s&&(r=(r+n)%n),i[Math.max(0,Math.min(r,n-1))])},pf=/[^.]*(?=\..*)\.|.*/,ff=/\..*/,mf=/::\d+$/,mn={};let $o=1;const dc={mouseenter:"mouseover",mouseleave:"mouseout"},gf=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function uc(i,e){return e&&`${e}::${$o++}`||i.uidEvent||$o++}function pc(i){const e=uc(i);return i.uidEvent=e,mn[e]=mn[e]||{},mn[e]}function vf(i,e){return function t(s){return Sr(s,{delegateTarget:i}),t.oneOff&&g.off(i,s.type,e),e.apply(i,[s])}}function bf(i,e,t){return function s(n){const r=i.querySelectorAll(e);for(let{target:a}=n;a&&a!==this;a=a.parentNode)for(const l of r)if(l===a)return Sr(n,{delegateTarget:a}),s.oneOff&&g.off(i,n.type,e,t),t.apply(a,[n])}}function fc(i,e,t=null){return Object.values(i).find(s=>s.callable===e&&s.delegationSelector===t)}function mc(i,e,t){const s=typeof e=="string",n=s?t:e||t;let r=gc(i);return gf.has(r)||(r=i),[s,n,r]}function Ro(i,e,t,s,n){if(typeof e!="string"||!i)return;let[r,a,l]=mc(e,t,s);e in dc&&(a=(m=>function(v){if(!v.relatedTarget||v.relatedTarget!==v.delegateTarget&&!v.delegateTarget.contains(v.relatedTarget))return m.call(this,v)})(a));const c=pc(i),h=c[l]||(c[l]={}),d=fc(h,a,r?t:null);if(d){d.oneOff=d.oneOff&&n;return}const p=uc(a,e.replace(pf,"")),u=r?bf(i,t,a):vf(i,a);u.delegationSelector=r?t:null,u.callable=a,u.oneOff=n,u.uidEvent=p,h[p]=u,i.addEventListener(l,u,r)}function Wn(i,e,t,s,n){const r=fc(e[t],s,n);r&&(i.removeEventListener(t,r,!!n),delete e[t][r.uidEvent])}function Ef(i,e,t,s){const n=e[t]||{};for(const[r,a]of Object.entries(n))r.includes(s)&&Wn(i,e,t,a.callable,a.delegationSelector)}function gc(i){return i=i.replace(ff,""),dc[i]||i}const g={on(i,e,t,s){Ro(i,e,t,s,!1)},one(i,e,t,s){Ro(i,e,t,s,!0)},off(i,e,t,s){if(typeof e!="string"||!i)return;const[n,r,a]=mc(e,t,s),l=a!==e,c=pc(i),h=c[a]||{},d=e.startsWith(".");if(typeof r<"u"){if(!Object.keys(h).length)return;Wn(i,c,a,r,n?t:null);return}if(d)for(const p of Object.keys(c))Ef(i,c,p,e.slice(1));for(const[p,u]of Object.entries(h)){const f=p.replace(mf,"");(!l||e.includes(f))&&Wn(i,c,a,u.callable,u.delegationSelector)}},trigger(i,e,t){if(typeof e!="string"||!i)return null;const s=cc(),n=gc(e),r=e!==n;let a=null,l=!0,c=!0,h=!1;r&&s&&(a=s.Event(e,t),s(i).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented());const d=Sr(new Event(e,{bubbles:l,cancelable:!0}),t);return h&&d.preventDefault(),c&&i.dispatchEvent(d),d.defaultPrevented&&a&&a.preventDefault(),d}};function Sr(i,e={}){for(const[t,s]of Object.entries(e))try{i[t]=s}catch{Object.defineProperty(i,t,{configurable:!0,get(){return s}})}return i}function Bo(i){if(i==="true")return!0;if(i==="false")return!1;if(i===Number(i).toString())return Number(i);if(i===""||i==="null")return null;if(typeof i!="string")return i;try{return JSON.parse(decodeURIComponent(i))}catch{return i}}function gn(i){return i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Nt={setDataAttribute(i,e,t){i.setAttribute(`data-bs-${gn(e)}`,t)},removeDataAttribute(i,e){i.removeAttribute(`data-bs-${gn(e)}`)},getDataAttributes(i){if(!i)return{};const e={},t=Object.keys(i.dataset).filter(s=>s.startsWith("bs")&&!s.startsWith("bsConfig"));for(const s of t){let n=s.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=Bo(i.dataset[s])}return e},getDataAttribute(i,e){return Bo(i.getAttribute(`data-bs-${gn(e)}`))}};let Ss=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const s=kt(t)?Nt.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof s=="object"?s:{},...kt(t)?Nt.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[s,n]of Object.entries(t)){const r=e[s],a=kt(r)?"element":cf(r);if(!new RegExp(n).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${a}" but expected type "${n}".`)}}};const yf="5.3.0";class pt extends Ss{constructor(e,t){super(),e=jt(e),e&&(this._element=e,this._config=this._getConfig(t),pn.set(this._element,this.constructor.DATA_KEY,this))}dispose(){pn.remove(this._element,this.constructor.DATA_KEY),g.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,s=!0){hc(e,t,s)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return pn.get(jt(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return yf}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const vn=i=>{let e=i.getAttribute("data-bs-target");if(!e||e==="#"){let t=i.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return oc(e)},y={find(i,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,i))},findOne(i,e=document.documentElement){return Element.prototype.querySelector.call(e,i)},children(i,e){return[].concat(...i.children).filter(t=>t.matches(e))},parents(i,e){const t=[];let s=i.parentNode.closest(e);for(;s;)t.push(s),s=s.parentNode.closest(e);return t},prev(i,e){let t=i.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(i,e){let t=i.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(i){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,i).filter(t=>!Wt(t)&&qe(t))},getSelectorFromElement(i){const e=vn(i);return e&&y.findOne(e)?e:null},getElementFromSelector(i){const e=vn(i);return e?y.findOne(e):null},getMultipleElementsFromSelector(i){const e=vn(i);return e?y.find(e):[]}},Ji=(i,e="hide")=>{const t=`click.dismiss${i.EVENT_KEY}`,s=i.NAME;g.on(document,t,`[data-bs-dismiss="${s}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Wt(this))return;const r=y.getElementFromSelector(this)||this.closest(`.${s}`);i.getOrCreateInstance(r)[e]()})},wf="alert",_f="bs.alert",vc=`.${_f}`,Sf=`close${vc}`,Af=`closed${vc}`,Tf="fade",Cf="show";class Zi extends pt{static get NAME(){return wf}close(){if(g.trigger(this._element,Sf).defaultPrevented)return;this._element.classList.remove(Cf);const t=this._element.classList.contains(Tf);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),g.trigger(this._element,Af),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Zi.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}Ji(Zi,"close");ht(Zi);const Lf="button",kf="bs.button",Nf=`.${kf}`,xf=".data-api",If="active",Ho='[data-bs-toggle="button"]',Of=`click${Nf}${xf}`;class tn extends pt{static get NAME(){return Lf}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(If))}static jQueryInterface(e){return this.each(function(){const t=tn.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}g.on(document,Of,Ho,i=>{i.preventDefault();const e=i.target.closest(Ho);tn.getOrCreateInstance(e).toggle()});ht(tn);const Df="swipe",Ye=".bs.swipe",Pf=`touchstart${Ye}`,Mf=`touchmove${Ye}`,$f=`touchend${Ye}`,Rf=`pointerdown${Ye}`,Bf=`pointerup${Ye}`,Hf="touch",Ff="pen",Vf="pointer-event",Uf=40,jf={endCallback:null,leftCallback:null,rightCallback:null},Wf={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Oi extends Ss{constructor(e,t){super(),this._element=e,!(!e||!Oi.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return jf}static get DefaultType(){return Wf}static get NAME(){return Df}dispose(){g.off(this._element,Ye)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Z(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=Uf)return;const t=e/this._deltaX;this._deltaX=0,t&&Z(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(g.on(this._element,Rf,e=>this._start(e)),g.on(this._element,Bf,e=>this._end(e)),this._element.classList.add(Vf)):(g.on(this._element,Pf,e=>this._start(e)),g.on(this._element,Mf,e=>this._move(e)),g.on(this._element,$f,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Ff||e.pointerType===Hf)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const zf="carousel",qf="bs.carousel",Yt=`.${qf}`,bc=".data-api",Yf="ArrowLeft",Kf="ArrowRight",Gf=500,Qe="next",be="prev",_e="left",Qs="right",Xf=`slide${Yt}`,bn=`slid${Yt}`,Qf=`keydown${Yt}`,Jf=`mouseenter${Yt}`,Zf=`mouseleave${Yt}`,tm=`dragstart${Yt}`,em=`load${Yt}${bc}`,sm=`click${Yt}${bc}`,Ec="carousel",Rs="active",im="slide",nm="carousel-item-end",rm="carousel-item-start",om="carousel-item-next",am="carousel-item-prev",yc=".active",wc=".carousel-item",lm=yc+wc,cm=".carousel-item img",hm=".carousel-indicators",dm="[data-bs-slide], [data-bs-slide-to]",um='[data-bs-ride="carousel"]',pm={[Yf]:Qs,[Kf]:_e},fm={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},mm={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};let en=class _c extends pt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=y.findOne(hm,this._element),this._addEventListeners(),this._config.ride===Ec&&this.cycle()}static get Default(){return fm}static get DefaultType(){return mm}static get NAME(){return zf}next(){this._slide(Qe)}nextWhenVisible(){!document.hidden&&qe(this._element)&&this.next()}prev(){this._slide(be)}pause(){this._isSliding&&ac(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){g.one(this._element,bn,()=>this.cycle());return}this.cycle()}}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){g.one(this._element,bn,()=>this.to(e));return}const s=this._getItemIndex(this._getActive());if(s===e)return;const n=e>s?Qe:be;this._slide(n,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&g.on(this._element,Qf,e=>this._keydown(e)),this._config.pause==="hover"&&(g.on(this._element,Jf,()=>this.pause()),g.on(this._element,Zf,()=>this._maybeEnableCycle())),this._config.touch&&Oi.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const s of y.find(cm,this._element))g.on(s,tm,n=>n.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(_e)),rightCallback:()=>this._slide(this._directionToOrder(Qs)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Gf+this._config.interval))}};this._swipeHelper=new Oi(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=pm[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=y.findOne(yc,this._indicatorsElement);t.classList.remove(Rs),t.removeAttribute("aria-current");const s=y.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);s&&(s.classList.add(Rs),s.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const s=this._getActive(),n=e===Qe,r=t||_r(this._getItems(),s,n,this._config.wrap);if(r===s)return;const a=this._getItemIndex(r),l=f=>g.trigger(this._element,f,{relatedTarget:r,direction:this._orderToDirection(e),from:this._getItemIndex(s),to:a});if(l(Xf).defaultPrevented||!s||!r)return;const h=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=r;const d=n?rm:nm,p=n?om:am;r.classList.add(p),_s(r),s.classList.add(d),r.classList.add(d);const u=()=>{r.classList.remove(d,p),r.classList.add(Rs),s.classList.remove(Rs,p,d),this._isSliding=!1,l(bn)};this._queueCallback(u,s,this._isAnimated()),h&&this.cycle()}_isAnimated(){return this._element.classList.contains(im)}_getActive(){return y.findOne(lm,this._element)}_getItems(){return y.find(wc,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return lt()?e===_e?be:Qe:e===_e?Qe:be}_orderToDirection(e){return lt()?e===be?_e:Qs:e===be?Qs:_e}static jQueryInterface(e){return this.each(function(){const t=_c.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}};g.on(document,sm,dm,function(i){const e=y.getElementFromSelector(this);if(!e||!e.classList.contains(Ec))return;i.preventDefault();const t=en.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");if(s){t.to(s),t._maybeEnableCycle();return}if(Nt.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()});g.on(window,em,()=>{const i=y.find(um);for(const e of i)en.getOrCreateInstance(e)});ht(en);const gm="collapse",vm="bs.collapse",As=`.${vm}`,bm=".data-api",Em=`show${As}`,ym=`shown${As}`,wm=`hide${As}`,_m=`hidden${As}`,Sm=`click${As}${bm}`,En="show",Ae="collapse",Bs="collapsing",Am="collapsed",Tm=`:scope .${Ae} .${Ae}`,Cm="collapse-horizontal",Lm="width",km="height",Nm=".collapse.show, .collapse.collapsing",zn='[data-bs-toggle="collapse"]',xm={parent:null,toggle:!0},Im={parent:"(null|element)",toggle:"boolean"};let Ar=class qn extends pt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const s=y.find(zn);for(const n of s){const r=y.getSelectorFromElement(n),a=y.find(r).filter(l=>l===this._element);r!==null&&a.length&&this._triggerArray.push(n)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xm}static get DefaultType(){return Im}static get NAME(){return gm}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(Nm).filter(l=>l!==this._element).map(l=>qn.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||g.trigger(this._element,Em).defaultPrevented)return;for(const l of e)l.hide();const s=this._getDimension();this._element.classList.remove(Ae),this._element.classList.add(Bs),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(Bs),this._element.classList.add(Ae,En),this._element.style[s]="",g.trigger(this._element,ym)},a=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback(n,this._element,!0),this._element.style[s]=`${this._element[a]}px`}hide(){if(this._isTransitioning||!this._isShown()||g.trigger(this._element,wm).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,_s(this._element),this._element.classList.add(Bs),this._element.classList.remove(Ae,En);for(const n of this._triggerArray){const r=y.getElementFromSelector(n);r&&!this._isShown(r)&&this._addAriaAndCollapsedClass([n],!1)}this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(Bs),this._element.classList.add(Ae),g.trigger(this._element,_m)};this._element.style[t]="",this._queueCallback(s,this._element,!0)}_isShown(e=this._element){return e.classList.contains(En)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=jt(e.parent),e}_getDimension(){return this._element.classList.contains(Cm)?Lm:km}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(zn);for(const t of e){const s=y.getElementFromSelector(t);s&&this._addAriaAndCollapsedClass([t],this._isShown(s))}}_getFirstLevelChildren(e){const t=y.find(Tm,this._config.parent);return y.find(e,this._config.parent).filter(s=>!t.includes(s))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const s of e)s.classList.toggle(Am,!t),s.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const s=qn.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof s[e]>"u")throw new TypeError(`No method named "${e}"`);s[e]()}})}};g.on(document,Sm,zn,function(i){(i.target.tagName==="A"||i.delegateTarget&&i.delegateTarget.tagName==="A")&&i.preventDefault();for(const e of y.getMultipleElementsFromSelector(this))Ar.getOrCreateInstance(e,{toggle:!1}).toggle()});ht(Ar);const Fo="dropdown",Om="bs.dropdown",fe=`.${Om}`,Tr=".data-api",Dm="Escape",Vo="Tab",Pm="ArrowUp",Uo="ArrowDown",Mm=2,$m=`hide${fe}`,Rm=`hidden${fe}`,Bm=`show${fe}`,Hm=`shown${fe}`,Sc=`click${fe}${Tr}`,Ac=`keydown${fe}${Tr}`,Fm=`keyup${fe}${Tr}`,Se="show",Vm="dropup",Um="dropend",jm="dropstart",Wm="dropup-center",zm="dropdown-center",ne='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',qm=`${ne}.${Se}`,Js=".dropdown-menu",Ym=".navbar",Km=".navbar-nav",Gm=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Xm=lt()?"top-end":"top-start",Qm=lt()?"top-start":"top-end",Jm=lt()?"bottom-end":"bottom-start",Zm=lt()?"bottom-start":"bottom-end",tg=lt()?"left-start":"right-start",eg=lt()?"right-start":"left-start",sg="top",ig="bottom",ng={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},rg={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};let me=class Zs extends pt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=y.next(this._element,Js)[0]||y.prev(this._element,Js)[0]||y.findOne(Js,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return ng}static get DefaultType(){return rg}static get NAME(){return Fo}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Wt(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!g.trigger(this._element,Bm,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Km))for(const s of[].concat(...document.body.children))g.on(s,"mouseover",Ii);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Se),this._element.classList.add(Se),g.trigger(this._element,Hm,e)}}hide(){if(Wt(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!g.trigger(this._element,$m,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))g.off(s,"mouseover",Ii);this._popper&&this._popper.destroy(),this._menu.classList.remove(Se),this._element.classList.remove(Se),this._element.setAttribute("aria-expanded","false"),Nt.removeDataAttribute(this._menu,"popper"),g.trigger(this._element,Rm,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!kt(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Fo.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof rc>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:kt(this._config.reference)?e=jt(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Qi(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Se)}_getPlacement(){const e=this._parent;if(e.classList.contains(Um))return tg;if(e.classList.contains(jm))return eg;if(e.classList.contains(Wm))return sg;if(e.classList.contains(zm))return ig;const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(Vm)?t?Qm:Xm:t?Zm:Jm}_detectNavbar(){return this._element.closest(Ym)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Nt.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Z(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const s=y.find(Gm,this._menu).filter(n=>qe(n));s.length&&_r(s,t,e===Uo,!s.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Zs.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===Mm||e.type==="keyup"&&e.key!==Vo)return;const t=y.find(qm);for(const s of t){const n=Zs.getInstance(s);if(!n||n._config.autoClose===!1)continue;const r=e.composedPath(),a=r.includes(n._menu);if(r.includes(n._element)||n._config.autoClose==="inside"&&!a||n._config.autoClose==="outside"&&a||n._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Vo||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:n._element};e.type==="click"&&(l.clickEvent=e),n._completeHide(l)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),s=e.key===Dm,n=[Pm,Uo].includes(e.key);if(!n&&!s||t&&!s)return;e.preventDefault();const r=this.matches(ne)?this:y.prev(this,ne)[0]||y.next(this,ne)[0]||y.findOne(ne,e.delegateTarget.parentNode),a=Zs.getOrCreateInstance(r);if(n){e.stopPropagation(),a.show(),a._selectMenuItem(e);return}a._isShown()&&(e.stopPropagation(),a.hide(),r.focus())}};g.on(document,Ac,ne,me.dataApiKeydownHandler);g.on(document,Ac,Js,me.dataApiKeydownHandler);g.on(document,Sc,me.clearMenus);g.on(document,Fm,me.clearMenus);g.on(document,Sc,ne,function(i){i.preventDefault(),me.getOrCreateInstance(this).toggle()});ht(me);const Tc="backdrop",og="fade",jo="show",Wo=`mousedown.bs.${Tc}`,ag={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},lg={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Cc extends Ss{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return ag}static get DefaultType(){return lg}static get NAME(){return Tc}show(e){if(!this._config.isVisible){Z(e);return}this._append();const t=this._getElement();this._config.isAnimated&&_s(t),t.classList.add(jo),this._emulateAnimation(()=>{Z(e)})}hide(e){if(!this._config.isVisible){Z(e);return}this._getElement().classList.remove(jo),this._emulateAnimation(()=>{this.dispose(),Z(e)})}dispose(){this._isAppended&&(g.off(this._element,Wo),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(og),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=jt(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),g.on(e,Wo,()=>{Z(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){hc(e,this._getElement(),this._config.isAnimated)}}const cg="focustrap",hg="bs.focustrap",Di=`.${hg}`,dg=`focusin${Di}`,ug=`keydown.tab${Di}`,pg="Tab",fg="forward",zo="backward",mg={autofocus:!0,trapElement:null},gg={autofocus:"boolean",trapElement:"element"};class Lc extends Ss{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return mg}static get DefaultType(){return gg}static get NAME(){return cg}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),g.off(document,Di),g.on(document,dg,e=>this._handleFocusin(e)),g.on(document,ug,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,g.off(document,Di))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const s=y.focusableChildren(t);s.length===0?t.focus():this._lastTabNavDirection===zo?s[s.length-1].focus():s[0].focus()}_handleKeydown(e){e.key===pg&&(this._lastTabNavDirection=e.shiftKey?zo:fg)}}const qo=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Yo=".sticky-top",Hs="padding-right",Ko="margin-right";class Yn{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Hs,t=>t+e),this._setElementAttributes(qo,Hs,t=>t+e),this._setElementAttributes(Yo,Ko,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Hs),this._resetElementAttributes(qo,Hs),this._resetElementAttributes(Yo,Ko)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,s){const n=this.getWidth(),r=a=>{if(a!==this._element&&window.innerWidth>a.clientWidth+n)return;this._saveInitialAttribute(a,t);const l=window.getComputedStyle(a).getPropertyValue(t);a.style.setProperty(t,`${s(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,r)}_saveInitialAttribute(e,t){const s=e.style.getPropertyValue(t);s&&Nt.setDataAttribute(e,t,s)}_resetElementAttributes(e,t){const s=n=>{const r=Nt.getDataAttribute(n,t);if(r===null){n.style.removeProperty(t);return}Nt.removeDataAttribute(n,t),n.style.setProperty(t,r)};this._applyManipulationCallback(e,s)}_applyManipulationCallback(e,t){if(kt(e)){t(e);return}for(const s of y.find(e,this._element))t(s)}}const vg="modal",bg="bs.modal",ct=`.${bg}`,Eg=".data-api",yg="Escape",wg=`hide${ct}`,_g=`hidePrevented${ct}`,kc=`hidden${ct}`,Nc=`show${ct}`,Sg=`shown${ct}`,Ag=`resize${ct}`,Tg=`click.dismiss${ct}`,Cg=`mousedown.dismiss${ct}`,Lg=`keydown.dismiss${ct}`,kg=`click${ct}${Eg}`,Go="modal-open",Ng="fade",Xo="show",yn="modal-static",xg=".modal.show",Ig=".modal-dialog",Og=".modal-body",Dg='[data-bs-toggle="modal"]',Pg={backdrop:!0,focus:!0,keyboard:!0},Mg={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};let vs=class xc extends pt{constructor(e,t){super(e,t),this._dialog=y.findOne(Ig,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Yn,this._addEventListeners()}static get Default(){return Pg}static get DefaultType(){return Mg}static get NAME(){return vg}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||g.trigger(this._element,Nc,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Go),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||g.trigger(this._element,wg).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Xo),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){g.off(window,ct),g.off(this._dialog,ct),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Cc({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Lc({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=y.findOne(Og,this._dialog);t&&(t.scrollTop=0),_s(this._element),this._element.classList.add(Xo);const s=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,g.trigger(this._element,Sg,{relatedTarget:e})};this._queueCallback(s,this._dialog,this._isAnimated())}_addEventListeners(){g.on(this._element,Lg,e=>{if(e.key===yg){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),g.on(window,Ag,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),g.on(this._element,Cg,e=>{g.one(this._element,Tg,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Go),this._resetAdjustments(),this._scrollBar.reset(),g.trigger(this._element,kc)})}_isAnimated(){return this._element.classList.contains(Ng)}_triggerBackdropTransition(){if(g.trigger(this._element,_g).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,s=this._element.style.overflowY;s==="hidden"||this._element.classList.contains(yn)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(yn),this._queueCallback(()=>{this._element.classList.remove(yn),this._queueCallback(()=>{this._element.style.overflowY=s},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),s=t>0;if(s&&!e){const n=lt()?"paddingLeft":"paddingRight";this._element.style[n]=`${t}px`}if(!s&&e){const n=lt()?"paddingRight":"paddingLeft";this._element.style[n]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const s=xc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof s[e]>"u")throw new TypeError(`No method named "${e}"`);s[e](t)}})}};g.on(document,kg,Dg,function(i){const e=y.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&i.preventDefault(),g.one(e,Nc,n=>{n.defaultPrevented||g.one(e,kc,()=>{qe(this)&&this.focus()})});const t=y.findOne(xg);t&&vs.getInstance(t).hide(),vs.getOrCreateInstance(e).toggle(this)});Ji(vs);ht(vs);const $g="offcanvas",Rg="bs.offcanvas",Dt=`.${Rg}`,Ic=".data-api",Bg=`load${Dt}${Ic}`,Hg="Escape",Qo="show",Jo="showing",Zo="hiding",Fg="offcanvas-backdrop",Oc=".offcanvas.show",Vg=`show${Dt}`,Ug=`shown${Dt}`,jg=`hide${Dt}`,ta=`hidePrevented${Dt}`,Dc=`hidden${Dt}`,Wg=`resize${Dt}`,zg=`click${Dt}${Ic}`,qg=`keydown.dismiss${Dt}`,Yg='[data-bs-toggle="offcanvas"]',Kg={backdrop:!0,keyboard:!0,scroll:!1},Gg={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class zt extends pt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Kg}static get DefaultType(){return Gg}static get NAME(){return $g}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||g.trigger(this._element,Vg,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Yn().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Jo);const s=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Qo),this._element.classList.remove(Jo),g.trigger(this._element,Ug,{relatedTarget:e})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown||g.trigger(this._element,jg).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Zo),this._backdrop.hide();const t=()=>{this._element.classList.remove(Qo,Zo),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Yn().reset(),g.trigger(this._element,Dc)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){g.trigger(this._element,ta);return}this.hide()},t=!!this._config.backdrop;return new Cc({className:Fg,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new Lc({trapElement:this._element})}_addEventListeners(){g.on(this._element,qg,e=>{if(e.key===Hg){if(this._config.keyboard){this.hide();return}g.trigger(this._element,ta)}})}static jQueryInterface(e){return this.each(function(){const t=zt.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}g.on(document,zg,Yg,function(i){const e=y.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Wt(this))return;g.one(e,Dc,()=>{qe(this)&&this.focus()});const t=y.findOne(Oc);t&&t!==e&&zt.getInstance(t).hide(),zt.getOrCreateInstance(e).toggle(this)});g.on(window,Bg,()=>{for(const i of y.find(Oc))zt.getOrCreateInstance(i).show()});g.on(window,Wg,()=>{for(const i of y.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(i).position!=="fixed"&&zt.getOrCreateInstance(i).hide()});Ji(zt);ht(zt);const Xg=/^aria-[\w-]*$/i,Pc={"*":["class","dir","id","lang","role",Xg],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Qg=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Jg=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Zg=(i,e)=>{const t=i.nodeName.toLowerCase();return e.includes(t)?Qg.has(t)?!!Jg.test(i.nodeValue):!0:e.filter(s=>s instanceof RegExp).some(s=>s.test(t))};function tv(i,e,t){if(!i.length)return i;if(t&&typeof t=="function")return t(i);const n=new window.DOMParser().parseFromString(i,"text/html"),r=[].concat(...n.body.querySelectorAll("*"));for(const a of r){const l=a.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){a.remove();continue}const c=[].concat(...a.attributes),h=[].concat(e["*"]||[],e[l]||[]);for(const d of c)Zg(d,h)||a.removeAttribute(d.nodeName)}return n.body.innerHTML}const ev="TemplateFactory",sv={allowList:Pc,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},iv={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},nv={entry:"(string|element|function|null)",selector:"(string|element)"};class rv extends Ss{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return sv}static get DefaultType(){return iv}static get NAME(){return ev}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[n,r]of Object.entries(this._config.content))this._setContent(e,r,n);const t=e.children[0],s=this._resolvePossibleFunction(this._config.extraClass);return s&&t.classList.add(...s.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,s]of Object.entries(e))super._typeCheckConfig({selector:t,entry:s},nv)}_setContent(e,t,s){const n=y.findOne(s,e);if(n){if(t=this._resolvePossibleFunction(t),!t){n.remove();return}if(kt(t)){this._putElementInTemplate(jt(t),n);return}if(this._config.html){n.innerHTML=this._maybeSanitize(t);return}n.textContent=t}}_maybeSanitize(e){return this._config.sanitize?tv(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Z(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const ov="tooltip",av=new Set(["sanitize","allowList","sanitizeFn"]),wn="fade",lv="modal",Fs="show",cv=".tooltip-inner",ea=`.${lv}`,sa="hide.bs.modal",Je="hover",_n="focus",hv="click",dv="manual",uv="hide",pv="hidden",fv="show",mv="shown",gv="inserted",vv="click",bv="focusin",Ev="focusout",yv="mouseenter",wv="mouseleave",_v={AUTO:"auto",TOP:"top",RIGHT:lt()?"left":"right",BOTTOM:"bottom",LEFT:lt()?"right":"left"},Sv={allowList:Pc,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Av={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};let Ts=class Mc extends pt{constructor(e,t){if(typeof rc>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Sv}static get DefaultType(){return Av}static get NAME(){return ov}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),g.off(this._element.closest(ea),sa,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=g.trigger(this._element,this.constructor.eventName(fv)),s=(lc(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!s)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),g.trigger(this._element,this.constructor.eventName(gv))),this._popper=this._createPopper(n),n.classList.add(Fs),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))g.on(l,"mouseover",Ii);const a=()=>{g.trigger(this._element,this.constructor.eventName(mv)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(a,this.tip,this._isAnimated())}hide(){if(!this._isShown()||g.trigger(this._element,this.constructor.eventName(uv)).defaultPrevented)return;if(this._getTipElement().classList.remove(Fs),"ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))g.off(n,"mouseover",Ii);this._activeTrigger[hv]=!1,this._activeTrigger[_n]=!1,this._activeTrigger[Je]=!1,this._isHovered=null;const s=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),g.trigger(this._element,this.constructor.eventName(pv)))};this._queueCallback(s,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(wn,Fs),t.classList.add(`bs-${this.constructor.NAME}-auto`);const s=hf(this.constructor.NAME).toString();return t.setAttribute("id",s),this._isAnimated()&&t.classList.add(wn),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new rv({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[cv]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(wn)}_isShown(){return this.tip&&this.tip.classList.contains(Fs)}_createPopper(e){const t=Z(this._config.placement,[this,e,this._element]),s=_v[t.toUpperCase()];return Qi(this._element,e,this._getPopperConfig(s))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Z(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:s=>{this._getTipElement().setAttribute("data-popper-placement",s.state.placement)}}]};return{...t,...Z(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")g.on(this._element,this.constructor.eventName(vv),this._config.selector,s=>{this._initializeOnDelegatedTarget(s).toggle()});else if(t!==dv){const s=t===Je?this.constructor.eventName(yv):this.constructor.eventName(bv),n=t===Je?this.constructor.eventName(wv):this.constructor.eventName(Ev);g.on(this._element,s,this._config.selector,r=>{const a=this._initializeOnDelegatedTarget(r);a._activeTrigger[r.type==="focusin"?_n:Je]=!0,a._enter()}),g.on(this._element,n,this._config.selector,r=>{const a=this._initializeOnDelegatedTarget(r);a._activeTrigger[r.type==="focusout"?_n:Je]=a._element.contains(r.relatedTarget),a._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},g.on(this._element.closest(ea),sa,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=Nt.getDataAttributes(this._element);for(const s of Object.keys(t))av.has(s)&&delete t[s];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:jt(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,s]of Object.entries(this._config))this.constructor.Default[t]!==s&&(e[t]=s);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=Mc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}};ht(Ts);const Tv="popover",Cv=".popover-header",Lv=".popover-body",kv={...Ts.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Nv={...Ts.DefaultType,content:"(null|string|element|function)"};let $c=class Rc extends Ts{static get Default(){return kv}static get DefaultType(){return Nv}static get NAME(){return Tv}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Cv]:this._getTitle(),[Lv]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=Rc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}};ht($c);const xv="scrollspy",Iv="bs.scrollspy",Cr=`.${Iv}`,Ov=".data-api",Dv=`activate${Cr}`,ia=`click${Cr}`,Pv=`load${Cr}${Ov}`,Mv="dropdown-item",Ee="active",$v='[data-bs-spy="scroll"]',Sn="[href]",Rv=".nav, .list-group",na=".nav-link",Bv=".nav-item",Hv=".list-group-item",Fv=`${na}, ${Bv} > ${na}, ${Hv}`,Vv=".dropdown",Uv=".dropdown-toggle",jv={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Wv={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class sn extends pt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return jv}static get DefaultType(){return Wv}static get NAME(){return xv}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=jt(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(g.off(this._config.target,ia),g.on(this._config.target,ia,Sn,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const s=this._rootElement||window,n=t.offsetTop-this._element.offsetTop;if(s.scrollTo){s.scrollTo({top:n,behavior:"smooth"});return}s.scrollTop=n}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){const t=a=>this._targetLinks.get(`#${a.target.id}`),s=a=>{this._previousScrollData.visibleEntryTop=a.target.offsetTop,this._process(t(a))},n=(this._rootElement||document.documentElement).scrollTop,r=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const a of e){if(!a.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(a));continue}const l=a.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&l){if(s(a),!n)return;continue}!r&&!l&&s(a)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=y.find(Sn,this._config.target);for(const t of e){if(!t.hash||Wt(t))continue;const s=y.findOne(decodeURI(t.hash),this._element);qe(s)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,s))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Ee),this._activateParents(e),g.trigger(this._element,Dv,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(Mv)){y.findOne(Uv,e.closest(Vv)).classList.add(Ee);return}for(const t of y.parents(e,Rv))for(const s of y.prev(t,Fv))s.classList.add(Ee)}_clearActiveClass(e){e.classList.remove(Ee);const t=y.find(`${Sn}.${Ee}`,e);for(const s of t)s.classList.remove(Ee)}static jQueryInterface(e){return this.each(function(){const t=sn.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}g.on(window,Pv,()=>{for(const i of y.find($v))sn.getOrCreateInstance(i)});ht(sn);const zv="tab",qv="bs.tab",ge=`.${qv}`,Yv=`hide${ge}`,Kv=`hidden${ge}`,Gv=`show${ge}`,Xv=`shown${ge}`,Qv=`click${ge}`,Jv=`keydown${ge}`,Zv=`load${ge}`,tb="ArrowLeft",ra="ArrowRight",eb="ArrowUp",oa="ArrowDown",re="active",aa="fade",An="show",sb="dropdown",ib=".dropdown-toggle",nb=".dropdown-menu",Tn=":not(.dropdown-toggle)",rb='.list-group, .nav, [role="tablist"]',ob=".nav-item, .list-group-item",ab=`.nav-link${Tn}, .list-group-item${Tn}, [role="tab"]${Tn}`,Bc='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Cn=`${ab}, ${Bc}`,lb=`.${re}[data-bs-toggle="tab"], .${re}[data-bs-toggle="pill"], .${re}[data-bs-toggle="list"]`;class Ve extends pt{constructor(e){super(e),this._parent=this._element.closest(rb),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),g.on(this._element,Jv,t=>this._keydown(t)))}static get NAME(){return zv}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),s=t?g.trigger(t,Yv,{relatedTarget:e}):null;g.trigger(e,Gv,{relatedTarget:t}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(re),this._activate(y.getElementFromSelector(e));const s=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(An);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),g.trigger(e,Xv,{relatedTarget:t})};this._queueCallback(s,e,e.classList.contains(aa))}_deactivate(e,t){if(!e)return;e.classList.remove(re),e.blur(),this._deactivate(y.getElementFromSelector(e));const s=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(An);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),g.trigger(e,Kv,{relatedTarget:t})};this._queueCallback(s,e,e.classList.contains(aa))}_keydown(e){if(![tb,ra,eb,oa].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[ra,oa].includes(e.key),s=_r(this._getChildren().filter(n=>!Wt(n)),e.target,t,!0);s&&(s.focus({preventScroll:!0}),Ve.getOrCreateInstance(s).show())}_getChildren(){return y.find(Cn,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const s of t)this._setInitialAttributesOnChild(s)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),s=this._getOuterElement(e);e.setAttribute("aria-selected",t),s!==e&&this._setAttributeIfNotExists(s,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=y.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const s=this._getOuterElement(e);if(!s.classList.contains(sb))return;const n=(r,a)=>{const l=y.findOne(r,s);l&&l.classList.toggle(a,t)};n(ib,re),n(nb,An),s.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,s){e.hasAttribute(t)||e.setAttribute(t,s)}_elemIsActive(e){return e.classList.contains(re)}_getInnerElement(e){return e.matches(Cn)?e:y.findOne(Cn,e)}_getOuterElement(e){return e.closest(ob)||e}static jQueryInterface(e){return this.each(function(){const t=Ve.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}g.on(document,Qv,Bc,function(i){["A","AREA"].includes(this.tagName)&&i.preventDefault(),!Wt(this)&&Ve.getOrCreateInstance(this).show()});g.on(window,Zv,()=>{for(const i of y.find(lb))Ve.getOrCreateInstance(i)});ht(Ve);const cb="toast",hb="bs.toast",Kt=`.${hb}`,db=`mouseover${Kt}`,ub=`mouseout${Kt}`,pb=`focusin${Kt}`,fb=`focusout${Kt}`,mb=`hide${Kt}`,gb=`hidden${Kt}`,vb=`show${Kt}`,bb=`shown${Kt}`,Eb="fade",la="hide",Vs="show",Us="showing",yb={animation:"boolean",autohide:"boolean",delay:"number"},wb={animation:!0,autohide:!0,delay:5e3};let Lr=class Hc extends pt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return wb}static get DefaultType(){return yb}static get NAME(){return cb}show(){if(g.trigger(this._element,vb).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Eb);const t=()=>{this._element.classList.remove(Us),g.trigger(this._element,bb),this._maybeScheduleHide()};this._element.classList.remove(la),_s(this._element),this._element.classList.add(Vs,Us),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||g.trigger(this._element,mb).defaultPrevented)return;const t=()=>{this._element.classList.add(la),this._element.classList.remove(Us,Vs),g.trigger(this._element,gb)};this._element.classList.add(Us),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Vs),super.dispose()}isShown(){return this._element.classList.contains(Vs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const s=e.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){g.on(this._element,db,e=>this._onInteraction(e,!0)),g.on(this._element,ub,e=>this._onInteraction(e,!1)),g.on(this._element,pb,e=>this._onInteraction(e,!0)),g.on(this._element,fb,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=Hc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}};Ji(Lr);ht(Lr);class te extends en{}class B extends Ar{}o(B,"CLASS_NAME_SHOW","show"),o(B,"CLASS_NAME_COLLAPSE","collapse"),o(B,"CLASS_NAME_COLLAPSING","collapsing"),o(B,"CLASS_NAME_COLLAPSED","collapsed"),o(B,"SELECTOR_ACTIVES",".show, .collapsing"),o(B,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="collapse"]');const Pr=class extends P{constructor(){super();o(this,"scope",{toggle:this.toggle,show:this.show,hide:this.hide,update:this.update,isShown:!1});o(this,"dropdown");o(this,"toggler",null);o(this,"onShown",this._onShown.bind(this));o(this,"onHidden",this._onHidden.bind(this))}static get observedAttributes(){return["offset","boundary","reference","display","popper-config","auto-close"]}isShown(){var t;return((t=this.dropdown)==null?void 0:t._isShown())||!1}toggle(t,s,n){if(!this.dropdown)throw new Error("Dropdown not ready!");n!==this.toggler&&this.dropdown.toggle()}show(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.show()}hide(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.hide()}update(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.update()}connectedCallback(){super.connectedCallback(),this.init(Pr.observedAttributes)}async afterBind(){this.initDropdown(),this.addEventListeners(),await super.afterBind()}initDropdown(){this.toggler=this.classList.contains("dropdown-toggle")?this:this.querySelector(".dropdown-toggle")||this,this.toggler.dataset.bsToggle="dropdown",this.dropdown=new T(this.toggler,this.scope),this.dropdown.hide(),this.scope.isShown=this.isShown()}_onShown(){console.debug("onShown"),this.scope.isShown=this.isShown()}_onHidden(){console.debug("onHidden"),this.scope.isShown=this.isShown()}addEventListeners(){var t,s;(t=this.toggler)==null||t.addEventListener(T.EVENT_SHOWN,this.onShown),(s=this.toggler)==null||s.addEventListener(T.EVENT_HIDDEN,this.onHidden)}template(){return null}};let os=Pr;o(os,"tagName","bs5-dropdown");const js=".data-api",ca="ArrowDown",ha="ArrowUp",da="Escape",ft=class extends me{static hideAll(){this.clearMenus()}static getAllComponents(){const e=document.querySelectorAll(os.tagName);return Array.from(e)}static hideAllComponents(){var t;const e=this.getAllComponents();for(const s of Array.from(e))(t=s.dropdown)==null||t.hide()}constructor(e,t){super(e,t)}};let T=ft;o(T,"DATA_API_KEY",js),o(T,"ESCAPE_KEY",da),o(T,"SPACE_KEY","Space"),o(T,"TAB_KEY","Tab"),o(T,"ARROW_UP_KEY",ha),o(T,"ARROW_DOWN_KEY",ca),o(T,"RIGHT_MOUSE_BUTTON",2),o(T,"REGEXP_KEYDOWN",new RegExp(`${ha}|${ca}|${da}`)),o(T,"EVENT_HIDE",`hide${ft.EVENT_KEY}`),o(T,"EVENT_HIDDEN",`hidden${ft.EVENT_KEY}`),o(T,"EVENT_SHOW",`show${ft.EVENT_KEY}`),o(T,"EVENT_SHOWN",`shown${ft.EVENT_KEY}`),o(T,"EVENT_CLICK",`click${ft.EVENT_KEY}`),o(T,"EVENT_CLICK_DATA_API",`click${ft.EVENT_KEY}${js}`),o(T,"EVENT_KEYDOWN_DATA_API",`keydown${ft.EVENT_KEY}${js}`),o(T,"EVENT_KEYUP_DATA_API",`keyup${ft.EVENT_KEY}${js}`),o(T,"CLASS_NAME_DISABLED","disabled"),o(T,"CLASS_NAME_SHOW","show"),o(T,"CLASS_NAME_DROPUP","dropup"),o(T,"CLASS_NAME_DROPEND","dropend"),o(T,"CLASS_NAME_DROPSTART","dropstart"),o(T,"CLASS_NAME_NAVBAR","navbar"),o(T,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="dropdown"]'),o(T,"SELECTOR_FORM_CHILD",".dropdown form"),o(T,"SELECTOR_MENU",".dropdown-menu"),o(T,"SELECTOR_NAVBAR_NAV",".navbar-nav"),o(T,"SELECTOR_VISIBLE_ITEMS",".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)");var Tt=(i=>(i.show="show.bs.collapse",i.shown="shown.bs.collapse",i.hide="hide.bs.collapse",i.hidden="hidden.bs.collapse",i))(Tt||{});class Fc{constructor(e,t){o(this,"type");o(this,"title");o(this,"channel");o(this,"$event");o(this,"$context");this.type=e,this.title=t}}class _b extends Fc{constructor({title:t,message:s,iconUrl:n,focus:r,keyboard:a,backdrop:l,buttons:c,modalService:h,contextualClass:d,channel:p,$event:u,$context:f}){super("modal",t);o(this,"message");o(this,"iconUrl");o(this,"focus");o(this,"keyboard");o(this,"backdrop");o(this,"buttons",[]);o(this,"modalService");o(this,"contextualClass");this.message=s,this.iconUrl=n,this.focus=r||!1,this.keyboard=a||!0,this.backdrop=l||!0,this.buttons=c||[],this.modalService=h,this.contextualClass=d,this.channel=p,this.$event=u,this.$context=f}}const Vc="bs.modal",ua=".data-api",tt=`.${Vc}`;class M extends vs{static get DATA_KEY(){return Vc}static get DATA_API_KEY(){return ua}static get EVENT_KEY(){return tt}}o(M,"ESCAPE_KEY","Escape"),o(M,"EVENT_HIDE",`hide${tt}`),o(M,"EVENT_HIDE_PREVENTED",`hidePrevented${tt}`),o(M,"EVENT_HIDDEN",`hidden${tt}`),o(M,"EVENT_SHOW",`show${tt}`),o(M,"EVENT_SHOWN",`shown${tt}`),o(M,"EVENT_FOCUSIN",`focusin${tt}`),o(M,"EVENT_RESIZE",`resize${tt}`),o(M,"EVENT_CLICK_DISMISS",`click.dismiss${tt}`),o(M,"EVENT_KEYDOWN_DISMISS",`keydown.dismiss${tt}`),o(M,"EVENT_MOUSEUP_DISMISS",`mouseup.dismiss${tt}`),o(M,"EVENT_MOUSEDOWN_DISMISS",`mousedown.dismiss${tt}`),o(M,"EVENT_CLICK_DATA_API",`click${tt}${ua}`),o(M,"CLASS_NAME_SCROLLBAR_MEASURER","modal-scrollbar-measure"),o(M,"CLASS_NAME_BACKDROP","modal-backdrop"),o(M,"CLASS_NAME_OPEN","modal-open"),o(M,"CLASS_NAME_FADE","fade"),o(M,"CLASS_NAME_SHOW","show"),o(M,"CLASS_NAME_STATIC","modal-static"),o(M,"SELECTOR_DIALOG",".modal-dialog"),o(M,"SELECTOR_MODAL_BODY",".modal-body"),o(M,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="modal"]'),o(M,"SELECTOR_DATA_DISMISS",'[data-bs-dismiss="modal"]'),o(M,"SELECTOR_FIXED_CONTENT",".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"),o(M,"SELECTOR_STICKY_CONTENT",".sticky-top");class Sb extends Ts{}class Kn extends $c{}const Bt=class{constructor(){o(this,"eventDispatcher",D.getInstance());o(this,"bs5",vt.getSingleton());o(this,"current","os");this.addEventListeners();const e=this.init(),t=document.getElementById("theme");t&&this.select(e.choice,t)}static getSingleton(){return Bt.instance?Bt.instance:this.setSingleton()}static setSingleton(){if(Bt.instance)throw new Error("Singleton of ThemeService already defined!");return Bt.instance=new Bt,Bt.instance}addEventListeners(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{this.triggerChange(e)})}init(){let e="os";return this.bs5.options.allowStoreDataInBrowser&&(e=localStorage.getItem("bs5-theme")||"os"),this.set(e)}select(e,t){(t==null?void 0:t.nodeName)==="SELECT"&&(t.value=e)}getDefaultData(){return{supported:!!window.matchMedia,isDark:!1,isLight:!1,systemIsDark:!1,systemIsLight:!0,bySystem:!0,byUser:!1,choice:"os"}}triggerChange(e,t){t||(t=this.getDefaultData());const s=this.getScheme();return this.eventDispatcher.trigger("theme-change",{oldValue:t,newValue:s}),s}onceChange(e,t){this.eventDispatcher.once("theme-change",e,t)}onChange(e,t){this.eventDispatcher.on("theme-change",e,t)}offChange(e,t){this.eventDispatcher.off("theme-change",e,t)}set(e){const t=this.getScheme();if(cr.includes(e)||(console.warn(`Unsupported theme "${e}", set instead the default "os".`),e="os"),this.bs5.options.allowStoreDataInBrowser&&localStorage.setItem("bs5-theme",e),e==="os"){const s=this.getScheme(e);document.documentElement.setAttribute("data-bs-theme",s.isDark?"dark":"light")}else document.documentElement.setAttribute("data-bs-theme",e);return this.current=e,this.triggerChange(void 0,t)}getScheme(e=this.current){const t=this.getDefaultData();return t.systemIsDark=window.matchMedia("(prefers-color-scheme: dark)").matches,t.systemIsLight=!t.systemIsDark,e==="os"?(t.bySystem=!0,t.byUser=!1,t.choice="os",t.isDark=t.systemIsDark,t.isLight=t.systemIsLight):(t.bySystem=!1,t.byUser=!0,e==="dark"&&(t.isDark=!0,t.choice="dark"),e==="light"&&(t.isLight=!0,t.choice="light")),t}};let Ie=Bt;o(Ie,"instance");class Uc extends Fc{constructor({title:t,message:s,iconUrl:n,delay:r,autoHide:a,animation:l,toastService:c,contextualClass:h,channel:d,$event:p,$context:u}){super("toast",t);o(this,"message");o(this,"iconUrl");o(this,"delay");o(this,"autoHide");o(this,"animation");o(this,"toastService");o(this,"contextualClass");this.message=s,this.iconUrl=n,this.delay=r,this.autoHide=a,this.animation=l,this.toastService=c,this.contextualClass=h,this.channel=d,this.$event=p,this.$context=u}}const se=class extends Lr{};let J=se;o(J,"EVENT_CLICK_DISMISS",`click.dismiss${se.EVENT_KEY}`),o(J,"EVENT_HIDE",`hide${se.EVENT_KEY}`),o(J,"EVENT_HIDDEN",`hidden${se.EVENT_KEY}`),o(J,"EVENT_SHOW",`show${se.EVENT_KEY}`),o(J,"EVENT_SHOWN",`shown${se.EVENT_KEY}`),o(J,"CLASS_NAME_FADE","fade"),o(J,"CLASS_NAME_HIDE","hide"),o(J,"CLASS_NAME_SHOW","show"),o(J,"CLASS_NAME_SHOWING","showing");const Ab=Object.freeze(Object.defineProperty({__proto__:null,Bs5Service:vt,Carousel:te,Collapse:B,Dropdown:T,Modal:M,ModalNotification:_b,Popover:Kn,ThemeService:Ie,Toast:J,ToastNotification:Uc,Tooltip:Sb},Symbol.toStringTag,{value:"Module"}));class jc extends E{constructor(t,s,n,r,a,l,c){super(t,s,n,r,a,l,c);o(this,"bs5");o(this,"breakpoint");o(this,"attributeName");o(this,"val");if(this.bs5=vt.getSingleton(),this.args.length!==2)throw new Error("The Bs5AttributeBreakpointBinder was not initialized correctly!");const h=this.args[0].toString(),d=this.args[1].toString();if(!this.bs5.breakpointNames.includes(h))throw new Error(`Unknown breakpoint "${h}"! You can define breakpoints at the initialization of the Bs5Module.`);this.breakpoint=h,this.attributeName=d}onBreakpointChanges(){this.setAttributeOnMatch()}setAttributeOnMatch(){if(this.bs5.activeBreakpoint){if(this.isBreakpointMatch(this.breakpoint))return this.defaultAttributeBinder.routine(this.el,this.val);this.breakpointUnhandled(this.bs5.activeBreakpoint.name)&&this.defaultAttributeBinder.routine(this.el,void 0)}}isBreakpointMatch(t=this.breakpoint){return this.bs5.activeBreakpoint?!!(this.bs5.activeBreakpoint.name===t||this.myBreakpoints(t).includes(this.bs5.activeBreakpoint.name)):!1}myBreakpoints(t=this.breakpoint){const s=[t];let n=t;for(;n&&(n=this.bs5.getNextBreakpointByName(n),!(!n||this.breakpointHandledByAnother(n)));)s.push(n);return s}breakpointHandledByAnother(t){return!!this.getHandledBreakpoints().includes(t)}breakpointUnhandled(t){let s=t,n=!0;for(;s&&n;){if(this.breakpointHandledByAnother(s)){n=!1;break}if(s=this.bs5.getPrevBreakpointByName(s),!s)break}return n}addToHandledBreakpoints(){const t=this.getHandledBreakpoints();t.push(this.breakpoint),this.el.dataset[mt(this.attributeName)]=Fi(t)}getHandledBreakpoints(){const t=Vi(this.el.dataset[mt(this.attributeName)]||"[]");if(!Array.isArray(t))throw new Error("breakpoints dataset has unsupported values!");return t}bind(t){this.bs5.on("breakpoint:changed",this.onBreakpointChanges,this),typeof this.defaultAttributeBinder.bind=="function"&&this.defaultAttributeBinder.bind(t)}routine(t,s){this.addToHandledBreakpoints(),this.val=s,this.setAttributeOnMatch()}unbind(t){var s;(s=this.bs5)==null||s.off("breakpoint:changed",this.onBreakpointChanges,this),typeof this.defaultAttributeBinder.unbind=="function"&&this.defaultAttributeBinder.unbind(t)}}class Wc extends jc{constructor(t,s,n,r,a,l,c){super(t,s,n,r,a,l,c);o(this,"defaultAttributeBinder");this.defaultAttributeBinder=new zi(t,s,this.attributeName,r,a,l,"*")}}o(Wc,"key","bs5-attr-*-*");class zc extends E{constructor(){super(...arguments);o(this,"dispatcher",D.getInstance("main"));o(this,"collapseService");o(this,"url");o(this,"checkURL",this._checkURL.bind(this))}_checkURL(){var t;return this.url&&ji(this.url)?((t=this.collapseService)==null||t.hide(),!0):!1}bind(t){this.collapseService=new B(t,{toggle:!1})}unbind(){this.checkURL&&this.dispatcher.off("newPageReady",this.checkURL)}routine(t,s){this.url=s,this.checkURL&&this.dispatcher.off("newPageReady",this.checkURL),this.dispatcher.on("newPageReady",this.checkURL)}}o(zc,"key","bs5-collapse-on-url");class qc extends jc{constructor(t,s,n,r,a,l,c){super(t,s,n,r,a,l,c);o(this,"defaultAttributeBinder");this.defaultAttributeBinder=new Li(t,s,`co-${this.attributeName}`,r,a,l,Li.key)}}o(qc,"key","bs5-co-*-*");class Yc extends E{constructor(){super(...arguments);o(this,"targets",new Map);o(this,"onEvent",this._onEvent.bind(this))}_onEvent(t){t.preventDefault();for(const s of this.targets.values())s.toggle()}bind(t){if(this.args===null)throw new Error("args is null");const s=this.args[0];t.addEventListener(s,this.onEvent)}unbind(){const t=this.args[0];this.el.removeEventListener(t,this.onEvent)}routine(t,s){var r;const n=Array.from(document.querySelectorAll(s));n.length<=0&&console.warn(`[toggleCollapseOnEventBinder] No element with selector "${s}" found.`);for(const a of this.targets.keys())n.find(l=>l===a)||((r=this.targets.get(a))==null||r.dispose(),this.targets.delete(a));for(const a of n)this.targets.has(a)||this.targets.set(a,new B(a,{toggle:!1}))}}o(Yc,"key","bs5-toggle-collapse-on-*");class Kc extends E{constructor(){super(...arguments);o(this,"toggler");o(this,"dropdownService")}bind(t){this.toggler=(t.classList.contains("dropdown-toggle")?t:t.querySelector(".dropdown-toggle"))||t}routine(t,s={}){if(!this.toggler)throw new Error("No dropdown toggle element found!");this.dropdownService&&(this.dropdownService.dispose(),this.toggler.dataset.bsToggle="");const n=new T(this.toggler,s);this.toggler.dataset.bsToggle="dropdown",this.dropdownService=n,this.dropdownService.hide()}}o(Kc,"key","bs5-dropdown");class Gc extends E{routine(e,t){const s=new B(e,{toggle:!1}),n=new D("main"),r=a=>a&&ji(a)?(s.show(),!0):(s.hide(),!1);n.on("newPageReady",()=>r(t)),r(t)}}o(Gc,"key","bs5-expand-on-url");class Xc extends E{constructor(){super(...arguments);o(this,"popover");o(this,"listeners",{})}routine(t,s){let n={};typeof s=="string"?n.content=s:typeof s=="object"&&(n={...s}),n.placement=n.placement||"auto";const r=new Kn(t,{...Kn.Default,...n});this.popover&&this.popover.dispose(),this.popover=r;const a=["show","hide","toggle","dispose","enable","disable","update"];if(this.listeners)for(const[l,c]of Object.entries(this.listeners))this.el.removeEventListener(l,c);this.listeners=Object.create(null);for(const l of a)if(r[l]&&typeof r[l]=="function"){const c=`trigger-${String(l)}`,h=r[l].bind(r);this.el.addEventListener(c,h),this.listeners[c]=h}else console.warn("Unknown method "+l)}bind(t){t.dispatchEvent(new CustomEvent("bound.bs.popover",{bubbles:!0,cancelable:!0}))}unbind(){if(this.popover&&this.popover.dispose(),this.listeners)for(const[t,s]of Object.entries(this.listeners))this.el.removeEventListener(t,s)}}o(Xc,"key","bs5-popover");class Qc extends E{constructor(){super(...arguments);o(this,"toastData");o(this,"onEvent",this._onEvent.bind(this))}_onEvent(t){if(!this.toastData)throw new Error("Toast data not set!");this.toastData.$event=t,this.toastData.$context=this.view.models;const s=new Uc(this.toastData);new D(s.channel||"toast").trigger("show-notification",s)}bind(t){const s=this.args[0];t.addEventListener(s,this.onEvent)}routine(t,s){if(this.args===null)throw new Error("args is null");this.toastData=s}unbind(t){const s=this.args[0];t.removeEventListener(s,this.onEvent)}}o(Qc,"key","show-toast-on-*");class Jc extends E{constructor(){super(...arguments);o(this,"target");o(this,"className");o(this,"onScroll",Et(this._onScroll.bind(this)));o(this,"isInViewport",this._isInViewport.bind(this))}_onScroll(){if(!this.target)throw new Error("No target element found!");if(!this.className)throw new Error("className not set!");this.isInViewport(this.target)?(this.el.classList.add(this.className),this.el.type==="radio"&&(this.el.checked=!0)):(this.el.classList.remove(this.className),this.el.type==="radio"&&(this.el.checked=!1))}_isInViewport(t){if(!t)return!1;const s=Number(this.el.dataset.offset||0),n=Number(this.el.dataset.offsetBottom||0);return Kh(t,{top:s,bottom:n})}bind(){window.addEventListener("scroll",this.onScroll,{passive:!0}),this.onScroll()}routine(t,s){const n=s.replace("#","");this.target=document.getElementById(n)||void 0,this.className=this.args[0]}unbind(){window.removeEventListener("scroll",this.onScroll)}}o(Jc,"key","bs5-scrollspy-*");const Cs=document.createElement("div");Cs.classList.add("tooltip");Cs.setAttribute("role","tooltip");const Zc=document.createElement("div");Zc.classList.add("arrow");Cs.appendChild(Zc);const th=document.createElement("div");th.classList.add("tooltip-inner");Cs.appendChild(th);class eh extends E{constructor(){super(...arguments);o(this,"popper");o(this,"tip",Cs.cloneNode(!0));o(this,"show",this._show.bind(this));o(this,"hide",this._hide.bind(this))}_show(){const t=this.el.dataset.placement||"start",s=0;this.popper=Qi(this.el,this.tip,{placement:t,modifiers:[{name:"flip",options:{altBoundary:!0,behavior:"flip"}},{name:"offset",options:{offset:s}},{name:"arrow",options:{element:".arrow"}},{name:"preventOverflow",options:{boundariesElement:"scrollParent"}}],strategy:void 0}),document.body.appendChild(this.tip),this.tip.classList.add("show"),this.tip.classList.add("bs-tooltip-"+t)}_hide(){this.tip.classList.remove("show"),this.popper&&this.popper.destroy()}bind(t){t.addEventListener("mouseenter",this.show),t.addEventListener("mouseleave",this.hide)}routine(t,s){const n=this.tip.querySelector(".tooltip-inner");n.innerHTML=s}unbind(){this.hide(),this.el.removeEventListener("mouseenter",this.show),this.el.removeEventListener("mouseleave",this.hide)}}o(eh,"key","bs5-tooltip");class sh extends E{constructor(){super(...arguments);o(this,"target");o(this,"onEvent",this._onEvent.bind(this))}_onEvent(t){const s=Number(this.el.dataset.offset||0),n=this.el.dataset.scrollElement?document.querySelector(this.el.dataset.scrollElement):window;this.target&&(je(this.target,s,n),t.preventDefault())}bind(t){this.onEvent=this.onEvent.bind(this);const s=this.args[0];t.addEventListener(s,this.onEvent)}routine(t,s){this.target=document.querySelector(s)||void 0}unbind(t){const s=this.args[0];t.removeEventListener(s,this.onEvent)}}o(sh,"key","scroll-to-on-*");class ih extends E{constructor(){super(...arguments);o(this,"toggleButtonEvents");o(this,"state","off");o(this,"triggerState",this._triggerState.bind(this));o(this,"onToggle",this._onToggle.bind(this))}_triggerState(){var t;(t=this.toggleButtonEvents)==null||t.trigger(k.eventNames.state,this.state)}_onToggle(){this.toggle.bind(this)(this.el)}toggle(t){this.state==="removed"?this.add.bind(this)(t):this.remove.bind(this)(t)}remove(t){const s=this.args[0];t.removeAttribute(s),this.state="removed",t.dispatchEvent(new CustomEvent(Bn.elEventNames.removed,{detail:{attributeName:s}})),this.triggerState()}add(t){const s=this.args[0];t.setAttribute(s,s),this.state="added",t.dispatchEvent(new CustomEvent(Bn.elEventNames.added,{detail:{attributeName:s}})),this.triggerState()}bind(t){const s=this.args[0];this.state=t.hasAttribute(s)?"added":"removed"}unbind(){var t,s;(t=this.toggleButtonEvents)==null||t.off(k.eventNames.toggle,this.onToggle,this),(s=this.toggleButtonEvents)==null||s.off(k.eventNames.init,this.triggerState,this)}routine(t,s){const n=this._getValue(t);let r=this.toggleButtonEvents;n&&r&&(r.off(k.eventNames.toggle,this.onToggle,this),r.off(k.eventNames.init,this.triggerState,this)),this.toggleButtonEvents||(this.toggleButtonEvents=new D(k.nsPrefix+s),r=this.toggleButtonEvents,r.on(k.eventNames.toggle,this.onToggle,this),r.on(k.eventNames.init,this.triggerState,this))}}o(ih,"key","bs5-toggle-attribute-*");class nh extends E{constructor(){super(...arguments);o(this,"toggleButtonEvents");o(this,"state","off");o(this,"triggerState",this._triggerState.bind(this));o(this,"onToggle",this._onToggle.bind(this))}_triggerState(){var t;(t=this.toggleButtonEvents)==null||t.trigger(k.eventNames.state,this.state)}_onToggle(){this.toggle.bind(this)(this.el)}toggle(t){this.state==="removed"?this.add.bind(this)(t):this.remove.bind(this)(t)}remove(t){const s=this.args[0];t.classList.remove(s),this.state="removed",t.dispatchEvent(new CustomEvent(Hn.elEventNames.removed,{detail:{className:s}})),this.triggerState()}add(t){const s=this.args[0];t.classList.add(s,s),this.state="added",t.dispatchEvent(new CustomEvent(Hn.elEventNames.added,{detail:{className:s}})),this.triggerState()}bind(t){const s=this.args[0];this.state=t.classList.contains(s)?"added":"removed"}unbind(){var t,s;(t=this.toggleButtonEvents)==null||t.off(k.eventNames.toggle,this.onToggle,this),(s=this.toggleButtonEvents)==null||s.off(k.eventNames.init,this.triggerState,this)}routine(t,s){const n=this._getValue(t);let r=this.toggleButtonEvents;n&&r&&(r.off(k.eventNames.toggle,this.onToggle,this),r.off(k.eventNames.init,this.triggerState,this)),this.toggleButtonEvents||(this.toggleButtonEvents=new D(k.nsPrefix+s),r=this.toggleButtonEvents,r.on(k.eventNames.toggle,this.onToggle,this),r.on(k.eventNames.init,this.triggerState,this))}}o(nh,"key","bs5-toggle-class-*");const Tb=Object.freeze(Object.defineProperty({__proto__:null,Bs5AttributeBreakpointBinder:Wc,Bs5ComponentAttributeBreakpointBinder:qc,CollapseOnUrlBinder:zc,DropdownBinder:Kc,ExpandOnUrlBinder:Gc,PopoverBinder:Xc,ScrollToOnEventBinder:sh,ScrollspyClassBinder:Jc,ShowToastOnEventBinder:Qc,ToggleAttributeBinder:ih,ToggleClassBinder:nh,ToggleCollapseOnEventBinder:Yc,TooltipBinder:eh},Symbol.toStringTag,{value:"Module"})),Cb="modulepreload",Lb=function(i){return"/"+i},pa={},Ls=function(e,t,s){if(!t||t.length===0)return e();const n=document.getElementsByTagName("link");return Promise.all(t.map(r=>{if(r=Lb(r),r in pa)return;pa[r]=!0;const a=r.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!s)for(let d=n.length-1;d>=0;d--){const p=n[d];if(p.href===r&&(!a||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const h=document.createElement("link");if(h.rel=a?"stylesheet":Cb,a||(h.as="script",h.crossOrigin=""),h.href=r,document.head.appendChild(h),a)return new Promise((d,p)=>{h.addEventListener("load",d),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>e())},kb=qi.read,Mr=class extends ar{constructor(){super();o(this,"autobind",!0);o(this,"templateAttributes",[{name:"title",required:!0},{name:"show",required:!1},{name:"icon-direction",required:!1}]);o(this,"scope",{items:[],toggle:this.toggle,show:this.show,hide:this.hide,collapseIconSize:16,showOnlyOne:!0})}static get observedAttributes(){return["items","collapse-icon-src","collapse-icon-size","show-only-one"]}hide(t,s){const n=this.querySelector(`[data-index="${s}"]`);n&&(this.initItemEventListeners(t,n),new B(n,{toggle:!1}).hide())}show(t,s){const n=this.querySelector(`[data-index="${s}"]`),r=Array.from(this.querySelectorAll(`[data-index]:not([data-index="${s}"])`));if(r&&this.scope.showOnlyOne)for(const a of r)new B(a,{toggle:!1}).hide();n&&(this.initItemEventListeners(t,n),new B(n,{toggle:!1}).show())}toggle(t,s){const n=this.querySelector(`[data-index="${s}"]`),r=Array.from(this.querySelectorAll(`[data-index]:not([data-index="${s}"])`));if(r&&this.scope.showOnlyOne)for(const a of r)new B(a,{toggle:!1}).hide();n&&(this.initItemEventListeners(t,n),new B(n,{toggle:!1}).toggle())}initItemEventListeners(t,s){s.removeEventListener(Tt.hide,this.onHide.bind(this,s,t)),s.removeEventListener(Tt.show,this.onShow.bind(this,s,t)),s.addEventListener(Tt.hide,this.onHide.bind(this,s,t),{once:!0}),s.addEventListener(Tt.show,this.onShow.bind(this,s,t),{once:!0})}getContentChildByIndex(){return this.querySelector(".card-body > *")||void 0}onShow(t,s){s.show=!0,s.iconDirection="up";const n=this.getContentChildByIndex();n&&this.triggerVisibilityChangedForElement(n,s.show)}onHide(t,s){s.show=!1,s.iconDirection="down";const n=this.getContentChildByIndex();n&&this.triggerVisibilityChangedForElement(n,s.show)}transformTemplateAttributes(t){return t.handle=t.handle||kb(t.title),t.show=!!t.show,t.iconDirection=t.iconDirection||t.show?"up":"down",t}triggerVisibilityChangedForElement(t,s){setTimeout(()=>{t.dispatchEvent(new CustomEvent("visibility-changed",{detail:{visible:s}}))},200)}connectedCallback(){super.connectedCallback(),this.init(Mr.observedAttributes)}async init(t){return super.init(t).then(s=>s)}async beforeBind(){return await super.beforeBind()}async afterBind(){return await super.afterBind()}requiredAttributes(){return[]}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r)}disconnectedCallback(){super.disconnectedCallback()}async template(){if(!K(this)||this.hasOnlyTemplateChilds()){const{default:t}=await Ls(()=>import("./bs5-accordion.component-cad06286.chunk.js"),[]);return t}else return null}};let ti=Mr;o(ti,"tagName","bs5-accordion");const $r=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"scope",{animationClass:"btn-animation-start",onClick:this.onClick.bind(this)})}static get observedAttributes(){return["animation-class"]}onClick(){this.startAnimation()}connectedCallback(){super.connectedCallback(),this.init($r.observedAttributes)}startAnimation(){this.classList.add(this.scope.animationClass)}onStartAnimation(){}onEndAnimation(){setTimeout(()=>{this.classList.remove(this.scope.animationClass)})}async init(t){return super.init(t).then(s=>(this.onStartAnimation=this.onStartAnimation.bind(this),this.addEventListener("webkitAnimationStart",this.onStartAnimation),this.addEventListener("animationstart",this.onStartAnimation),this.onEndAnimation=this.onEndAnimation.bind(this),this.addEventListener("webkitAnimationEnd",this.onEndAnimation),this.addEventListener("animationend",this.onEndAnimation),this.addEventListener("click",this.scope.onClick),s))}requiredAttributes(){return[]}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("webkitAnimationStart",this.onStartAnimation),this.removeEventListener("animationstart",this.onStartAnimation),this.removeEventListener("webkitAnimationEnd",this.onEndAnimation),this.removeEventListener("animationend",this.onEndAnimation),this.removeEventListener("click",this.scope.onClick)}template(){return null}};let ei=$r;o(ei,"tagName","bs5-button");const Rr=class extends P{constructor(){super();o(this,"scope",{interval:te.Default.interval,keyboard:te.Default.keyboard,pause:te.Default.pause||!1,wrap:te.Default.wrap,touch:te.Default.touch,fade:!1,next:this.next,nextWhenVisible:this.nextWhenVisible,prev:this.prev,startPause:this.pause,cycle:this.cycle,to:this.to,dispose:this.dispose});o(this,"autobind",!0);o(this,"carouselService")}static get observedAttributes(){return["interval","keyboard","pause","wrap","touch","fade"]}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.classList.add("carousel","slide")}async afterBind(){this.carouselService=new te(this,{interval:this.scope.interval,keyboard:this.scope.keyboard,pause:this.scope.pause,wrap:this.scope.wrap,touch:this.scope.touch}),this.scope.fade&&this.classList.add("carousel-fade"),this.carouselService.cycle(),await super.afterBind()}next(){this.carouselService&&this.carouselService.next()}nextWhenVisible(){this.carouselService&&this.carouselService.nextWhenVisible()}prev(){this.carouselService&&this.carouselService.prev()}pause(){this.carouselService&&this.carouselService.pause()}cycle(){this.carouselService&&this.carouselService.cycle()}to(){if(this.carouselService)throw new Error("TODO")}dispose(){this.carouselService&&this.carouselService.dispose()}connectedCallback(){super.connectedCallback(),super.init(Rr.observedAttributes)}template(){return null}};let si=Rr;o(si,"tagName","bs5-carousel");const Br=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"collapse");o(this,"scope",{title:"",content:"Please set the content of the collapse using the content attribute or just by set the content as the child of this element",collapsed:!0,toggle:this.toggle,show:this.show,hide:this.hide})}static get observedAttributes(){return["title","content","collapsed"]}requiredAttributes(){return["title"]}hide(){console.debug("hide"),this.collapse&&(this.scope.collapsed=!0,this.collapse.hide())}show(){this.collapse&&(this.scope.collapsed=!1,this.collapse.show())}toggle(){this.collapse&&(this.collapse.toggle(),this.scope.collapsed=!!this.scope.collapsed)}addEventListeners(){this.scope.collapseEl&&(this.scope.collapseEl.addEventListener(Tt.hide,this.onHide.bind(this)),this.scope.collapseEl.addEventListener(Tt.show,this.onShow.bind(this)))}removeEventListeners(){this.scope.collapseEl&&(this.scope.collapseEl.removeEventListener(Tt.hide,this.onHide.bind(this)),this.scope.collapseEl.removeEventListener(Tt.show,this.onShow.bind(this)))}onShow(){console.debug("onShow"),this.scope.collapsed=!1,this.triggerVisibilityChangedForElement(!this.scope.collapsed)}onHide(){console.debug("onShow"),this.scope.collapsed=!0,this.triggerVisibilityChangedForElement(!this.scope.collapsed)}triggerVisibilityChangedForElement(t){setTimeout(()=>{const s=new CustomEvent("visibility-changed",{detail:{visible:t}});this.dispatchEvent(s),this.scope.collapseEl&&this.scope.collapseEl.dispatchEvent(s)},200)}connectedCallback(){super.connectedCallback(),this.init(Br.observedAttributes)}async afterBind(){if(console.debug("afterBind",this.scope.collapsed),this.scope.collapseEl=this.querySelector(".collapse")||void 0,!this.scope.collapseEl)throw new Error("No collapse element found!");this.collapse=new B(this.scope.collapseEl,{toggle:!this.scope.collapsed})}template(){return K(this)&&(this.scope.content=this.innerHTML),jsxCreateElement("div",null,jsxCreateElement("button",{"rv-on-click":"toggle",class:"btn btn-primary",type:"button","aria-expanded":"false","rv-aria-controls":"title | handleize","rv-text":"title"}),jsxCreateElement("div",{class:"collapse mt-2","rv-id":"title"},jsxCreateElement("div",{class:"card card-body","rv-template":"content"})))}};let ii=Br;o(ii,"tagName","bs5-collapse");String.prototype.startsWith=String.prototype.startsWith||function(i){return this.indexOf(i)===0};String.prototype.padStart=String.prototype.padStart||function(i,e){let t=this;for(;t.length0?i.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):i.toString())||"0"}class _t{constructor(e,t,s,n){const r=this;function a(l){if(l.startsWith("hsl")){let[c,h,d,p]=l.match(/([\-\d\.e]+)/g).map(Number);p===void 0&&(p=1),c/=360,h/=100,d/=100,r.hsla=[c,h,d,p]}else if(l.startsWith("rgb")){let[c,h,d,p]=l.match(/([\-\d\.e]+)/g).map(Number);p===void 0&&(p=1),r.rgba=[c,h,d,p]}else l.startsWith("#")?r.rgba=_t.hexToRgb(l):r.rgba=_t.nameToRgb(l)||_t.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(s===void 0){const l=e&&""+e;l&&a(l.toLowerCase())}else this.rgba=[e,t,s,n===void 0?1:n]}get rgba(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=_t.hslToRgb(this._hsla)}set rgba(e){e.length===3&&(e[3]=1),this._rgba=e,this._hsla=null}printRGB(e){const t=e?this.rgba:this.rgba.slice(0,3),s=t.map((n,r)=>fa(n,r===3?3:0));return e?`rgba(${s})`:`rgb(${s})`}get rgbString(){return this.printRGB()}get rgbaString(){return this.printRGB(!0)}get hsla(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=_t.rgbToHsl(this._rgba)}set hsla(e){e.length===3&&(e[3]=1),this._hsla=e,this._rgba=null}printHSL(e){const t=[360,100,100,1],s=["","%","%",""],n=e?this.hsla:this.hsla.slice(0,3),r=n.map((a,l)=>fa(a*t[l],l===3?3:1)+s[l]);return e?`hsla(${r})`:`hsl(${r})`}get hslString(){return this.printHSL()}get hslaString(){return this.printHSL(!0)}get hex(){return"#"+this.rgba.map((s,n)=>n<3?s.toString(16):Math.round(s*255).toString(16)).map(s=>s.padStart(2,"0")).join("")}set hex(e){this.rgba=_t.hexToRgb(e)}printHex(e){const t=this.hex;return e?t:t.substring(0,7)}static hexToRgb(e){const t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);const s=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(n=>parseInt(n,16));return s[3]=s[3]/255,s}static nameToRgb(e){const t=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),s=Nb[t];return s===void 0?s:_t.hexToRgb(s.replace(/\-/g,"00").padStart(6,"f"))}static rgbToHsl([e,t,s,n]){e/=255,t/=255,s/=255;const r=Math.max(e,t,s),a=Math.min(e,t,s);let l,c,h=(r+a)/2;if(r===a)l=c=0;else{const d=r-a;switch(c=h>.5?d/(2-r-a):d/(r+a),r){case e:l=(t-s)/d+(t1&&(m-=1),m<.16666666666666666?u+(f-u)*6*m:m<.5?f:m<.6666666666666666?u+(f-u)*(.6666666666666666-m)*6:u},d=s<.5?s*(1+t):s+t-s*t,p=2*s-d;r=h(p,d,e+1/3),a=h(p,d,e),l=h(p,d,e-1/3)}const c=[r*255,a*255,l*255].map(Math.round);return c[3]=n,c}}class Pi{constructor(){o(this,"events",[])}add(e,t,s){e.addEventListener(t,s,!1),this.events.push({target:e,type:t,handler:s})}remove(e,t,s){this.events=this.events.filter(n=>{let r=!0;return e&&e!==n.target&&(r=!1),t&&t!==n.type&&(r=!1),s&&s!==n.handler&&(r=!1),r&&Pi._doRemove(n.target,n.type,n.handler),!r})}static _doRemove(e,t,s){e.removeEventListener(t,s,!1)}destroy(){this.events.forEach(e=>Pi._doRemove(e.target,e.type,e.handler)),this.events=[]}}const xb=(i,e,t)=>{let s=!1;const n=(c,h,d)=>Math.max(h,Math.min(c,d)),r=(c,h,d)=>{if(d&&(s=!0),!s)return;c.preventDefault();const p=e.getBoundingClientRect(),u=p.width,f=p.height,m=h.clientX,v=h.clientY,b=n(m-p.left,0,u),w=n(v-p.top,0,f);t(b/u,w/f)},a=(c,h)=>{(c.buttons===void 0?c.which:c.buttons)===1?r(c,c,h):s=!1};function l(c,h){c.touches.length===1?r(c,c.touches[0],h):s=!1}i.add(e,"mousedown",c=>{a(c,!0)}),i.add(e,"touchstart",c=>{l(c,!0)}),i.add(window,"mousemove",a),i.add(e,"touchmove",l),i.add(window,"mouseup",()=>{s=!1}),i.add(e,"touchend",()=>{s=!1}),i.add(e,"touchcancel",()=>{s=!1})},Ib=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E")`,Ob=360,Db="keydown";function Pb(i){i.preventDefault(),i.stopPropagation()}function Mb(i,e,t,s,n=!1){i.add(e,Db,function(r){t.indexOf(r.key)>=0&&(n&&Pb(r),s(r))})}const Hr=class extends P{constructor(){super();o(this,"eventDispatcher");o(this,"color");o(this,"_debug",!1);o(this,"scope",{namespace:"main",hsl:[],cssHue:"",cssHsl:"",cssHsla:"",alphaBg:"",color:"#0cf",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,okayButton:!1});o(this,"events",new Pi);o(this,"_domH",null);o(this,"_domSL",null);o(this,"_domA",null);o(this,"_domEdit",null);o(this,"_domSample",null);o(this,"_domOkay",null);o(this,"_domCancel",null);o(this,"setColor",Et(this._setColor.bind(this)));o(this,"updateUI",Et(this._updateUI.bind(this)))}static get observedAttributes(){return["namespace","alpha","editor","editor-format","cancel-button","okay-button","color"]}connectedCallback(){super.connectedCallback(),super.init(Hr.observedAttributes)}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.eventDispatcher=D.getInstance("bs5-colorpicker:"+this.scope.namespace),this.setColor(this.scope.color),this.updateUI(),this.bindEvents()}async afterTemplate(t){await super.afterTemplate(t),this.setElements()}onChange(t){var s;this.debug("onChange",t),(s=this.eventDispatcher)==null||s.trigger("change",t)}onDone(t){var s;this.debug("onDone",t),(s=this.eventDispatcher)==null||s.trigger("done",t)}async template(){if(K(this))return null;{const{default:t}=await Ls(()=>import("./bs5-colorpicker.component-1e5e88ee.chunk.js"),[]);return t}}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r),t==="color"&&this.setColor(this.scope.color)}_setColor(t,s={silent:!1}){if(typeof t=="string"&&(t=t.trim()),!t)return;s=s||{};let n;try{n=new _t(t)}catch(r){if(s.failSilently)return;throw r}if(!this.scope.alpha){const r=n.hsla;r[3]=1,n.hsla=r}this.color=n,this.setHSLA(null,null,null,null,s)}setElements(){this._domH=this.querySelector(".picker-hue"),this._domSL=this.querySelector(".picker-sl"),this._domA=this.querySelector(".picker-alpha"),this._domEdit=this.querySelector(".picker-editor")||null,this._domSample=this.querySelector(".picker-sample"),this._domOkay=this.querySelector(".picker-done"),this._domCancel=this.querySelector(".picker-cancel")}disconnectedCallback(){this.events.destroy()}bindEvents(){const t=this.events,s=(a,l,c)=>{t.add(a,l,c)};s(this,"click",a=>a.preventDefault());const n=xb.bind(this);if(!this._domH||!this._domSL||!this._domA||!this._domEdit||!this._domOkay)throw new Error("Not ready!");n(t,this._domH,a=>this.setHSLA(a)),n(t,this._domSL,(a,l)=>this.setHSLA(null,a,1-l)),this.scope.alpha&&n(t,this._domA,(a,l)=>this.setHSLA(null,null,null,1-l)),s(this._domEdit,"input",a=>{const l=a.target;this.setColor(l.value,{fromEditor:!0,failSilently:!0})}),s(this._domEdit,"focus",a=>{const l=a.target;l.selectionStart===l.selectionEnd&&l.select()});const r=()=>{this.onDone(this.color)};s(this._domOkay,"click",r),Mb(t,this,["Enter"],r)}setHSLA(t=null,s=null,n=null,r=null,a={}){if(!this.color)throw new Error("Not ready!");const l=this.color.hsla;[t,s,n,r].forEach((c,h)=>{(c||c===0)&&(l[h]=c)}),this.color.hsla=l,this.updateUI(a),this.onChange&&!a.silent&&this.onChange(this.color)}_updateUI(t={}){if(!this||!this.color)return;if(this.scope.hsl=this.color.hsla,this.scope.cssHue=`hsl(${this.scope.hsl[0]*Ob}, 100%, 50%)`,this.scope.cssHsl=this.color.hslString,this.scope.cssHsla=this.color.hslaString,!this._domH||!this._domSL||!this._domA)throw new Error("Color ui elements not found!");const s=this._domH.querySelector(".picker-selector"),n=this._domSL.querySelector(".picker-selector"),r=this._domA.querySelector(".picker-selector");if(!s||!n||!r||!this._domEdit||!this._domSample)throw console.error(s,n,r,this._domA,this._domSL,this._domH,this._domEdit,this._domSample),new Error("Not ready!");const a=(p,u,f)=>{u.style.left=f*100+"%"},l=(p,u,f)=>{u.style.top=f*100+"%"};a(this._domH,s,this.scope.hsl[0]),a(this._domSL,n,this.scope.hsl[1]),l(this._domSL,n,1-this.scope.hsl[2]),l(this._domA,r,1-this.scope.hsl[3]);const c=this.scope.cssHsl,h=c.replace("hsl","hsla").replace(")",", 0)"),d=`linear-gradient(${[c,h]})`;if(this.scope.alphaBg=d+", "+Ib,!t.fromEditor){const p=this.scope.editorFormat,u=this.scope.alpha;let f;switch(p){case"rgb":f=this.color.printRGB(u);break;case"hsl":f=this.color.printHSL(u);break;default:f=this.color.printHex(u)}this.scope.color=f}}};let ni=Hr;o(ni,"tagName","bs5-colorpicker");const Fr=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"wrapperElement");o(this,"scope",{headersDepth:1,headersStart:2,findHeaderIdDepth:1,headerParentSelector:void 0,scrollOffset:0,anchors:[]})}static get observedAttributes(){return["headers-start","headers-depth","find-header-id-depth","header-parent-selector","scroll-offset","scroll-element"]}connectedCallback(){super.connectedCallback(),this.init(Fr.observedAttributes)}getIdFromElementOrParent(t,s=1){return t.id?t.id:s<=this.scope.findHeaderIdDepth&&t.parentElement?this.getIdFromElementOrParent(t.parentElement,++s):null}pushHeaders(t,s,n,r){t.querySelectorAll("h"+s).forEach(l=>{const c=this.getIdFromElementOrParent(l);c&&(r.push({element:l,href:"#"+c,title:l.innerHTML,childs:[]}),l.parentElement&&n>=s+1&&this.pushHeaders(l.parentElement,s+1,n,r[r.length-1].childs))})}async afterBind(){if(this.scope.headerParentSelector&&this.scope.headersStart&&this.scope.headersDepth){if(this.wrapperElement=document.querySelector(this.scope.headerParentSelector)||void 0,this.scope.anchors=[],!this.wrapperElement){console.error("No wrapper element found!");return}this.pushHeaders(this.wrapperElement,this.scope.headersStart,this.scope.headersDepth,this.scope.anchors)}await super.afterBind()}requiredAttributes(){return["headersStart","headersDepth","headerParentSelector"]}async attributeChangedCallback(t,s,n,r){super.attributeChangedCallback(t,s,n,r)}disconnectedCallback(){super.disconnectedCallback(),this.scope.anchors=[]}async template(){if(K(this))return null;{const{default:t}=await Ls(()=>import("./bs5-contents.component-9014ea28.chunk.js"),[]);return t}}};let as=Fr;o(as,"tagName","bs5-contents");const Vr=class extends P{constructor(){super();o(this,"_debug",!1);o(this,"autobind",!0);o(this,"formEl",null);o(this,"scope",this.getDefaultScope());this.enableSubmit=this.enableSubmit.bind(this)}static get observedAttributes(){return["id","disable-submit-until-change","use-ajax","ajax-request-type","auto-set-form-data","strip-html","scroll-invalid-element","animate-invalid-element"]}getDefaultScope(){return{id:Na("form"),form:{fields:{},valid:!1,error:void 0},disableSubmitUntilChange:!1,submitDisabled:!1,onSubmit:this.onSubmit,useAjax:!0,ajaxRequestType:"form",autoSetFormData:!0,stripHtml:!0,scrollToInvalidElement:!0,animateInvalidElement:!0}}connectedCallback(){super.connectedCallback(),this.init(Vr.observedAttributes),this.addEventListeners()}addEventListeners(){this.scope.disableSubmitUntilChange&&this.addEventListener("input",this.enableSubmit)}removeEventListeners(){this.removeEventListener("input",this.enableSubmit)}enableSubmit(){this.scope.submitDisabled=!1}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.id=this.scope.id}async afterBind(){await super.afterBind()}stripHtml(){for(const t in this.scope.form.fields)this.scope.form.fields[t]&&typeof this.scope.form.fields[t]=="string"&&(this.scope.form.fields[t]=Ti(this.scope.form.fields[t]))}onSubmit(t,s){if(this.debug("onSubmit",t,s),!this.formEl)return console.warn("No form found"),!1;if(this.scope.autoSetFormData&&this.getFormValues(),this.scope.stripHtml&&this.stripHtml(),this.validate(this.formEl,this.scope.form),!this.scope.form.valid){this.onInvalidForm(t);return}const n=this.getSubmitSettings(t);if((n==null?void 0:n.target)==="_blank")return!0;this.scope.useAjax&&(t.preventDefault(),t.stopPropagation(),this.ajaxSubmit(t,s))}async ajaxSubmit(t,s){this.debug("onSubmit",t,s,this.scope);const n=this.getSubmitSettings(t);if(!n){console.warn("Can't get submit settings");return}this.scope.autoSetFormData&&this.getFormValues();try{const r=await We.fetch(n.action,n.method,this.scope.form.fields,n.type);if(!r||!r.body)return this.onErrorSubmit("500","Error","Empty body!");const a=r.body&&r.body.message?r.body.message:"";return Number(r.status)>=400&&this.onErrorSubmit(r.status.toString(),a,r.body),this.onSuccessSubmit(r.status.toString(),a,r.body)}catch(r){if(r.status&&r.body)this.onErrorSubmit(r.status,r.body.message,r.body);else throw this.error}}getSubmitSettings(t){var l,c;if(!this.formEl)return console.warn("No form found"),null;let s=this.formEl.action,n=this.formEl.method,r=this.formEl.method;if((l=t==null?void 0:t.originalEvent)!=null&&l.submitter){const h=(c=t==null?void 0:t.originalEvent)==null?void 0:c.submitter;s=(h==null?void 0:h.formAction)||s,n=(h==null?void 0:h.formMethod)||n,r=(h==null?void 0:h.formTarget)||r}return{action:s,method:n.toUpperCase(),target:r,type:this.scope.ajaxRequestType}}onInvalidForm(t){if(this.debug("Form not valid",this.scope),t.preventDefault(),t.stopPropagation(),!this.formEl){console.warn("No form found");return}const s=this.formEl.querySelectorAll(":invalid");if(s&&s.length){const n=s[0];this.scope.scrollToInvalidElement&&this.scrollToElement(n),this.scope.animateInvalidElement&&this.scrollToElement(n)}this.dispatchEvent(new CustomEvent("invalid",{detail:{elements:s}}))}scrollToElement(t){const n=rr().h/2;je(t,n,window),this.animateInvalidElement(t)}animateInvalidElement(t,s=3e3){t.classList.add("invalid-flashing-animation"),setTimeout(()=>{t.classList.remove("invalid-flashing-animation")},s)}onErrorSubmit(t,s,n){this.debug("onErrorSubmit"),this.dispatchEvent(new CustomEvent("submit-error",{detail:{status:t,message:s,response:n}}))}onSuccessSubmit(t,s,n){this.debug("onSuccessSubmit"),this.scope.disableSubmitUntilChange&&(this.scope.submitDisabled=!0),this.dispatchEvent(new CustomEvent("submit-success",{detail:{status:t,message:s,response:n}}))}validate(t,s,n="validation-error"){s.valid=t.checkValidity(),s.error=t.validationMessage,s.valid||(this.dispatchEvent(new CustomEvent(n)),t.classList.add("was-validated"))}getFormValues(){return this.formEl?(this.scope.form.fields=new FormData(this.formEl),this.scope.form.fields):(console.warn("No form found"),null)}initForm(){const t=this.querySelector("form");t&&t.length>0?(this.formEl=t,this.formEl.classList.add("needs-validation"),this.formEl.setAttribute("novalidate","")):console.warn("bs5 form without children found")}async template(){if(K(this))return this.initForm(),null;{const{default:t}=await Ls(()=>import("./bs5-form.component-56e21618.chunk.js"),[]);return t}}};let ri=Vr;o(ri,"tagName","bs5-form");const ds=class extends or{constructor(){super();o(this,"scope",{})}static get observedAttributes(){return["size","width","height","src","color","direction","alt"]}getSvg(){return this.querySelector("svg")}async fetchCached(t){let s=ds.cache.get(t);return s||(s=We.get(t),s&&ds.cache.set(t,s),s)}async fetchIcon(t){var n;let s;if(window!=null&&window.ssr&&!t.startsWith("http")&&!t.startsWith("ftp")&&!t.startsWith("sftp")){let r;if(window.ssr.env.NEST_INTERN_URL)r=new URL(t,window.ssr.env.NEST_INTERN_URL);else if(window.ssr.ctx)r=new URL(t,window.ssr.ctx.protocol+"://"+window.ssr.ctx.hostname);else throw new Error("Host for SSR not found!");s=await this.fetchCached(r.href)}else s=await this.fetchCached(t);return s.status!==200?(console.error(s.status),""):(n=s.headers.get("content-type"))!=null&&n.includes("image/svg+xml")?s.body:(console.error("[bs5-icon] Only SVG's are supported! But content-type is "+s.headers.get("content-type")),"")}getBasename(t){const s=yt(t).pathname.split("/");return s==null?void 0:s[s.length-1]}getAlternativeText(t){var n;return(n=this.getBasename(t).split(".")[0])==null?void 0:n.replaceAll("_"," ")}async onSrcChanged(){let t="";if(!this.scope.src){this.innerHTML="";return}const s=this.getAlternativeText(this.scope.src);s&&this.setAttribute("alt",s);const n=this.getSvg();if((n?n.getAttribute("src"):"")===this.scope.src)return;try{t=await this.fetchIcon(this.scope.src)}catch(l){console.warn(`Error on fetch icon "${this.scope.src}"! Try to switch the protocol...`,l),this.scope.src.startsWith("//")&&(this.scope.src=location.protocol+this.scope.src);const c=new URL(this.scope.src);c.protocol==="http:"?c.protocol="https:":c.protocol="http:";try{t=await this.fetchIcon(c.href)}catch(h){console.error(`Error on fetch icon "${this.scope.src}"!`,l,h);return}}if(!t){console.error(`Error on fetch icon "${this.scope.src}"!`);return}this.innerHTML=t;const a=this.getSvg();a&&a.setAttribute("src",this.scope.src)}removeColor(){this.className=this.className.replace(/(^|\s)color-\S+/g,""),this.style.color=""}setColor(t){if(!t)return this.removeColor();if(t.includes(",")){const s=t.split(",");if(s.length>0){this.className=this.className.replace(/(^|\s)color-\S+/g,"");for(let n=0;n + */const Mt=new Map,pn={set(i,e,t){Mt.has(i)||Mt.set(i,new Map);const s=Mt.get(i);if(!s.has(e)&&s.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`);return}s.set(e,t)},get(i,e){return Mt.has(i)&&Mt.get(i).get(e)||null},remove(i,e){if(!Mt.has(i))return;const t=Mt.get(i);t.delete(e),t.size===0&&Mt.delete(i)}},rf=1e6,of=1e3,jn="transitionend",nc=i=>(i&&window.CSS&&window.CSS.escape&&(i=i.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),i),af=i=>i==null?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase(),lf=i=>{do i+=Math.floor(Math.random()*rf);while(document.getElementById(i));return i},cf=i=>{if(!i)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(i);const s=Number.parseFloat(e),n=Number.parseFloat(t);return!s&&!n?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*of)},rc=i=>{i.dispatchEvent(new Event(jn))},kt=i=>!i||typeof i!="object"?!1:(typeof i.jquery<"u"&&(i=i[0]),typeof i.nodeType<"u"),jt=i=>kt(i)?i.jquery?i[0]:i:typeof i=="string"&&i.length>0?document.querySelector(nc(i)):null,ze=i=>{if(!kt(i)||i.getClientRects().length===0)return!1;const e=getComputedStyle(i).getPropertyValue("visibility")==="visible",t=i.closest("details:not([open])");if(!t)return e;if(t!==i){const s=i.closest("summary");if(s&&s.parentNode!==t||s===null)return!1}return e},Wt=i=>!i||i.nodeType!==Node.ELEMENT_NODE||i.classList.contains("disabled")?!0:typeof i.disabled<"u"?i.disabled:i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false",oc=i=>{if(!document.documentElement.attachShadow)return null;if(typeof i.getRootNode=="function"){const e=i.getRootNode();return e instanceof ShadowRoot?e:null}return i instanceof ShadowRoot?i:i.parentNode?oc(i.parentNode):null},xi=()=>{},ws=i=>{i.offsetHeight},ac=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,fn=[],hf=i=>{document.readyState==="loading"?(fn.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of fn)e()}),fn.push(i)):i()},lt=()=>document.documentElement.dir==="rtl",ht=i=>{hf(()=>{const e=ac();if(e){const t=i.NAME,s=e.fn[t];e.fn[t]=i.jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=()=>(e.fn[t]=s,i.jQueryInterface)}})},Z=(i,e=[],t=i)=>typeof i=="function"?i(...e):t,lc=(i,e,t=!0)=>{if(!t){Z(i);return}const s=5,n=cf(e)+s;let r=!1;const a=({target:l})=>{l===e&&(r=!0,e.removeEventListener(jn,a),Z(i))};e.addEventListener(jn,a),setTimeout(()=>{r||rc(e)},n)},_r=(i,e,t,s)=>{const n=i.length;let r=i.indexOf(e);return r===-1?!t&&s?i[n-1]:i[0]:(r+=t?1:-1,s&&(r=(r+n)%n),i[Math.max(0,Math.min(r,n-1))])},df=/[^.]*(?=\..*)\.|.*/,uf=/\..*/,pf=/::\d+$/,mn={};let Po=1;const cc={mouseenter:"mouseover",mouseleave:"mouseout"},ff=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function hc(i,e){return e&&`${e}::${Po++}`||i.uidEvent||Po++}function dc(i){const e=hc(i);return i.uidEvent=e,mn[e]=mn[e]||{},mn[e]}function mf(i,e){return function t(s){return Sr(s,{delegateTarget:i}),t.oneOff&&g.off(i,s.type,e),e.apply(i,[s])}}function gf(i,e,t){return function s(n){const r=i.querySelectorAll(e);for(let{target:a}=n;a&&a!==this;a=a.parentNode)for(const l of r)if(l===a)return Sr(n,{delegateTarget:a}),s.oneOff&&g.off(i,n.type,e,t),t.apply(a,[n])}}function uc(i,e,t=null){return Object.values(i).find(s=>s.callable===e&&s.delegationSelector===t)}function pc(i,e,t){const s=typeof e=="string",n=s?t:e||t;let r=fc(i);return ff.has(r)||(r=i),[s,n,r]}function Mo(i,e,t,s,n){if(typeof e!="string"||!i)return;let[r,a,l]=pc(e,t,s);e in cc&&(a=(m=>function(v){if(!v.relatedTarget||v.relatedTarget!==v.delegateTarget&&!v.delegateTarget.contains(v.relatedTarget))return m.call(this,v)})(a));const c=dc(i),h=c[l]||(c[l]={}),d=uc(h,a,r?t:null);if(d){d.oneOff=d.oneOff&&n;return}const p=hc(a,e.replace(df,"")),u=r?gf(i,t,a):mf(i,a);u.delegationSelector=r?t:null,u.callable=a,u.oneOff=n,u.uidEvent=p,h[p]=u,i.addEventListener(l,u,r)}function Wn(i,e,t,s,n){const r=uc(e[t],s,n);r&&(i.removeEventListener(t,r,!!n),delete e[t][r.uidEvent])}function vf(i,e,t,s){const n=e[t]||{};for(const[r,a]of Object.entries(n))r.includes(s)&&Wn(i,e,t,a.callable,a.delegationSelector)}function fc(i){return i=i.replace(uf,""),cc[i]||i}const g={on(i,e,t,s){Mo(i,e,t,s,!1)},one(i,e,t,s){Mo(i,e,t,s,!0)},off(i,e,t,s){if(typeof e!="string"||!i)return;const[n,r,a]=pc(e,t,s),l=a!==e,c=dc(i),h=c[a]||{},d=e.startsWith(".");if(typeof r<"u"){if(!Object.keys(h).length)return;Wn(i,c,a,r,n?t:null);return}if(d)for(const p of Object.keys(c))vf(i,c,p,e.slice(1));for(const[p,u]of Object.entries(h)){const f=p.replace(pf,"");(!l||e.includes(f))&&Wn(i,c,a,u.callable,u.delegationSelector)}},trigger(i,e,t){if(typeof e!="string"||!i)return null;const s=ac(),n=fc(e),r=e!==n;let a=null,l=!0,c=!0,h=!1;r&&s&&(a=s.Event(e,t),s(i).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented());const d=Sr(new Event(e,{bubbles:l,cancelable:!0}),t);return h&&d.preventDefault(),c&&i.dispatchEvent(d),d.defaultPrevented&&a&&a.preventDefault(),d}};function Sr(i,e={}){for(const[t,s]of Object.entries(e))try{i[t]=s}catch{Object.defineProperty(i,t,{configurable:!0,get(){return s}})}return i}function $o(i){if(i==="true")return!0;if(i==="false")return!1;if(i===Number(i).toString())return Number(i);if(i===""||i==="null")return null;if(typeof i!="string")return i;try{return JSON.parse(decodeURIComponent(i))}catch{return i}}function gn(i){return i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Nt={setDataAttribute(i,e,t){i.setAttribute(`data-bs-${gn(e)}`,t)},removeDataAttribute(i,e){i.removeAttribute(`data-bs-${gn(e)}`)},getDataAttributes(i){if(!i)return{};const e={},t=Object.keys(i.dataset).filter(s=>s.startsWith("bs")&&!s.startsWith("bsConfig"));for(const s of t){let n=s.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=$o(i.dataset[s])}return e},getDataAttribute(i,e){return $o(i.getAttribute(`data-bs-${gn(e)}`))}};let _s=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const s=kt(t)?Nt.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof s=="object"?s:{},...kt(t)?Nt.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[s,n]of Object.entries(t)){const r=e[s],a=kt(r)?"element":af(r);if(!new RegExp(n).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${a}" but expected type "${n}".`)}}};const bf="5.3.0";class pt extends _s{constructor(e,t){super(),e=jt(e),e&&(this._element=e,this._config=this._getConfig(t),pn.set(this._element,this.constructor.DATA_KEY,this))}dispose(){pn.remove(this._element,this.constructor.DATA_KEY),g.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,s=!0){lc(e,t,s)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return pn.get(jt(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return bf}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const vn=i=>{let e=i.getAttribute("data-bs-target");if(!e||e==="#"){let t=i.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return nc(e)},y={find(i,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,i))},findOne(i,e=document.documentElement){return Element.prototype.querySelector.call(e,i)},children(i,e){return[].concat(...i.children).filter(t=>t.matches(e))},parents(i,e){const t=[];let s=i.parentNode.closest(e);for(;s;)t.push(s),s=s.parentNode.closest(e);return t},prev(i,e){let t=i.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(i,e){let t=i.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(i){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,i).filter(t=>!Wt(t)&&ze(t))},getSelectorFromElement(i){const e=vn(i);return e&&y.findOne(e)?e:null},getElementFromSelector(i){const e=vn(i);return e?y.findOne(e):null},getMultipleElementsFromSelector(i){const e=vn(i);return e?y.find(e):[]}},Ji=(i,e="hide")=>{const t=`click.dismiss${i.EVENT_KEY}`,s=i.NAME;g.on(document,t,`[data-bs-dismiss="${s}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Wt(this))return;const r=y.getElementFromSelector(this)||this.closest(`.${s}`);i.getOrCreateInstance(r)[e]()})},Ef="alert",yf="bs.alert",mc=`.${yf}`,wf=`close${mc}`,_f=`closed${mc}`,Sf="fade",Af="show";class Zi extends pt{static get NAME(){return Ef}close(){if(g.trigger(this._element,wf).defaultPrevented)return;this._element.classList.remove(Af);const t=this._element.classList.contains(Sf);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),g.trigger(this._element,_f),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Zi.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}Ji(Zi,"close");ht(Zi);const Tf="button",Cf="bs.button",Lf=`.${Cf}`,kf=".data-api",Nf="active",Ro='[data-bs-toggle="button"]',xf=`click${Lf}${kf}`;class tn extends pt{static get NAME(){return Tf}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Nf))}static jQueryInterface(e){return this.each(function(){const t=tn.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}g.on(document,xf,Ro,i=>{i.preventDefault();const e=i.target.closest(Ro);tn.getOrCreateInstance(e).toggle()});ht(tn);const If="swipe",qe=".bs.swipe",Of=`touchstart${qe}`,Df=`touchmove${qe}`,Pf=`touchend${qe}`,Mf=`pointerdown${qe}`,$f=`pointerup${qe}`,Rf="touch",Bf="pen",Hf="pointer-event",Ff=40,Vf={endCallback:null,leftCallback:null,rightCallback:null},Uf={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ii extends _s{constructor(e,t){super(),this._element=e,!(!e||!Ii.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Vf}static get DefaultType(){return Uf}static get NAME(){return If}dispose(){g.off(this._element,qe)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Z(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=Ff)return;const t=e/this._deltaX;this._deltaX=0,t&&Z(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(g.on(this._element,Mf,e=>this._start(e)),g.on(this._element,$f,e=>this._end(e)),this._element.classList.add(Hf)):(g.on(this._element,Of,e=>this._start(e)),g.on(this._element,Df,e=>this._move(e)),g.on(this._element,Pf,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Bf||e.pointerType===Rf)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const jf="carousel",Wf="bs.carousel",Yt=`.${Wf}`,gc=".data-api",zf="ArrowLeft",qf="ArrowRight",Yf=500,Xe="next",be="prev",_e="left",Xs="right",Kf=`slide${Yt}`,bn=`slid${Yt}`,Gf=`keydown${Yt}`,Xf=`mouseenter${Yt}`,Qf=`mouseleave${Yt}`,Jf=`dragstart${Yt}`,Zf=`load${Yt}${gc}`,tm=`click${Yt}${gc}`,vc="carousel",$s="active",em="slide",sm="carousel-item-end",im="carousel-item-start",nm="carousel-item-next",rm="carousel-item-prev",bc=".active",Ec=".carousel-item",om=bc+Ec,am=".carousel-item img",lm=".carousel-indicators",cm="[data-bs-slide], [data-bs-slide-to]",hm='[data-bs-ride="carousel"]',dm={[zf]:Xs,[qf]:_e},um={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},pm={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};let en=class yc extends pt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=y.findOne(lm,this._element),this._addEventListeners(),this._config.ride===vc&&this.cycle()}static get Default(){return um}static get DefaultType(){return pm}static get NAME(){return jf}next(){this._slide(Xe)}nextWhenVisible(){!document.hidden&&ze(this._element)&&this.next()}prev(){this._slide(be)}pause(){this._isSliding&&rc(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){g.one(this._element,bn,()=>this.cycle());return}this.cycle()}}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){g.one(this._element,bn,()=>this.to(e));return}const s=this._getItemIndex(this._getActive());if(s===e)return;const n=e>s?Xe:be;this._slide(n,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&g.on(this._element,Gf,e=>this._keydown(e)),this._config.pause==="hover"&&(g.on(this._element,Xf,()=>this.pause()),g.on(this._element,Qf,()=>this._maybeEnableCycle())),this._config.touch&&Ii.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const s of y.find(am,this._element))g.on(s,Jf,n=>n.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(_e)),rightCallback:()=>this._slide(this._directionToOrder(Xs)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Yf+this._config.interval))}};this._swipeHelper=new Ii(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=dm[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=y.findOne(bc,this._indicatorsElement);t.classList.remove($s),t.removeAttribute("aria-current");const s=y.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);s&&(s.classList.add($s),s.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const s=this._getActive(),n=e===Xe,r=t||_r(this._getItems(),s,n,this._config.wrap);if(r===s)return;const a=this._getItemIndex(r),l=f=>g.trigger(this._element,f,{relatedTarget:r,direction:this._orderToDirection(e),from:this._getItemIndex(s),to:a});if(l(Kf).defaultPrevented||!s||!r)return;const h=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=r;const d=n?im:sm,p=n?nm:rm;r.classList.add(p),ws(r),s.classList.add(d),r.classList.add(d);const u=()=>{r.classList.remove(d,p),r.classList.add($s),s.classList.remove($s,p,d),this._isSliding=!1,l(bn)};this._queueCallback(u,s,this._isAnimated()),h&&this.cycle()}_isAnimated(){return this._element.classList.contains(em)}_getActive(){return y.findOne(om,this._element)}_getItems(){return y.find(Ec,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return lt()?e===_e?be:Xe:e===_e?Xe:be}_orderToDirection(e){return lt()?e===be?_e:Xs:e===be?Xs:_e}static jQueryInterface(e){return this.each(function(){const t=yc.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}};g.on(document,tm,cm,function(i){const e=y.getElementFromSelector(this);if(!e||!e.classList.contains(vc))return;i.preventDefault();const t=en.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");if(s){t.to(s),t._maybeEnableCycle();return}if(Nt.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()});g.on(window,Zf,()=>{const i=y.find(hm);for(const e of i)en.getOrCreateInstance(e)});ht(en);const fm="collapse",mm="bs.collapse",Ss=`.${mm}`,gm=".data-api",vm=`show${Ss}`,bm=`shown${Ss}`,Em=`hide${Ss}`,ym=`hidden${Ss}`,wm=`click${Ss}${gm}`,En="show",Ae="collapse",Rs="collapsing",_m="collapsed",Sm=`:scope .${Ae} .${Ae}`,Am="collapse-horizontal",Tm="width",Cm="height",Lm=".collapse.show, .collapse.collapsing",zn='[data-bs-toggle="collapse"]',km={parent:null,toggle:!0},Nm={parent:"(null|element)",toggle:"boolean"};let Ar=class qn extends pt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const s=y.find(zn);for(const n of s){const r=y.getSelectorFromElement(n),a=y.find(r).filter(l=>l===this._element);r!==null&&a.length&&this._triggerArray.push(n)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return km}static get DefaultType(){return Nm}static get NAME(){return fm}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(Lm).filter(l=>l!==this._element).map(l=>qn.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||g.trigger(this._element,vm).defaultPrevented)return;for(const l of e)l.hide();const s=this._getDimension();this._element.classList.remove(Ae),this._element.classList.add(Rs),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(Rs),this._element.classList.add(Ae,En),this._element.style[s]="",g.trigger(this._element,bm)},a=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback(n,this._element,!0),this._element.style[s]=`${this._element[a]}px`}hide(){if(this._isTransitioning||!this._isShown()||g.trigger(this._element,Em).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,ws(this._element),this._element.classList.add(Rs),this._element.classList.remove(Ae,En);for(const n of this._triggerArray){const r=y.getElementFromSelector(n);r&&!this._isShown(r)&&this._addAriaAndCollapsedClass([n],!1)}this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(Rs),this._element.classList.add(Ae),g.trigger(this._element,ym)};this._element.style[t]="",this._queueCallback(s,this._element,!0)}_isShown(e=this._element){return e.classList.contains(En)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=jt(e.parent),e}_getDimension(){return this._element.classList.contains(Am)?Tm:Cm}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(zn);for(const t of e){const s=y.getElementFromSelector(t);s&&this._addAriaAndCollapsedClass([t],this._isShown(s))}}_getFirstLevelChildren(e){const t=y.find(Sm,this._config.parent);return y.find(e,this._config.parent).filter(s=>!t.includes(s))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const s of e)s.classList.toggle(_m,!t),s.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const s=qn.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof s[e]>"u")throw new TypeError(`No method named "${e}"`);s[e]()}})}};g.on(document,wm,zn,function(i){(i.target.tagName==="A"||i.delegateTarget&&i.delegateTarget.tagName==="A")&&i.preventDefault();for(const e of y.getMultipleElementsFromSelector(this))Ar.getOrCreateInstance(e,{toggle:!1}).toggle()});ht(Ar);const Bo="dropdown",xm="bs.dropdown",fe=`.${xm}`,Tr=".data-api",Im="Escape",Ho="Tab",Om="ArrowUp",Fo="ArrowDown",Dm=2,Pm=`hide${fe}`,Mm=`hidden${fe}`,$m=`show${fe}`,Rm=`shown${fe}`,wc=`click${fe}${Tr}`,_c=`keydown${fe}${Tr}`,Bm=`keyup${fe}${Tr}`,Se="show",Hm="dropup",Fm="dropend",Vm="dropstart",Um="dropup-center",jm="dropdown-center",ne='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Wm=`${ne}.${Se}`,Qs=".dropdown-menu",zm=".navbar",qm=".navbar-nav",Ym=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Km=lt()?"top-end":"top-start",Gm=lt()?"top-start":"top-end",Xm=lt()?"bottom-end":"bottom-start",Qm=lt()?"bottom-start":"bottom-end",Jm=lt()?"left-start":"right-start",Zm=lt()?"right-start":"left-start",tg="top",eg="bottom",sg={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ig={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};let me=class Js extends pt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=y.next(this._element,Qs)[0]||y.prev(this._element,Qs)[0]||y.findOne(Qs,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return sg}static get DefaultType(){return ig}static get NAME(){return Bo}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Wt(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!g.trigger(this._element,$m,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(qm))for(const s of[].concat(...document.body.children))g.on(s,"mouseover",xi);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Se),this._element.classList.add(Se),g.trigger(this._element,Rm,e)}}hide(){if(Wt(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!g.trigger(this._element,Pm,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))g.off(s,"mouseover",xi);this._popper&&this._popper.destroy(),this._menu.classList.remove(Se),this._element.classList.remove(Se),this._element.setAttribute("aria-expanded","false"),Nt.removeDataAttribute(this._menu,"popper"),g.trigger(this._element,Mm,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!kt(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Bo.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof ic>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:kt(this._config.reference)?e=jt(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Qi(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Se)}_getPlacement(){const e=this._parent;if(e.classList.contains(Fm))return Jm;if(e.classList.contains(Vm))return Zm;if(e.classList.contains(Um))return tg;if(e.classList.contains(jm))return eg;const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(Hm)?t?Gm:Km:t?Qm:Xm}_detectNavbar(){return this._element.closest(zm)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Nt.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Z(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const s=y.find(Ym,this._menu).filter(n=>ze(n));s.length&&_r(s,t,e===Fo,!s.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Js.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===Dm||e.type==="keyup"&&e.key!==Ho)return;const t=y.find(Wm);for(const s of t){const n=Js.getInstance(s);if(!n||n._config.autoClose===!1)continue;const r=e.composedPath(),a=r.includes(n._menu);if(r.includes(n._element)||n._config.autoClose==="inside"&&!a||n._config.autoClose==="outside"&&a||n._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Ho||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:n._element};e.type==="click"&&(l.clickEvent=e),n._completeHide(l)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),s=e.key===Im,n=[Om,Fo].includes(e.key);if(!n&&!s||t&&!s)return;e.preventDefault();const r=this.matches(ne)?this:y.prev(this,ne)[0]||y.next(this,ne)[0]||y.findOne(ne,e.delegateTarget.parentNode),a=Js.getOrCreateInstance(r);if(n){e.stopPropagation(),a.show(),a._selectMenuItem(e);return}a._isShown()&&(e.stopPropagation(),a.hide(),r.focus())}};g.on(document,_c,ne,me.dataApiKeydownHandler);g.on(document,_c,Qs,me.dataApiKeydownHandler);g.on(document,wc,me.clearMenus);g.on(document,Bm,me.clearMenus);g.on(document,wc,ne,function(i){i.preventDefault(),me.getOrCreateInstance(this).toggle()});ht(me);const Sc="backdrop",ng="fade",Vo="show",Uo=`mousedown.bs.${Sc}`,rg={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},og={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ac extends _s{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return rg}static get DefaultType(){return og}static get NAME(){return Sc}show(e){if(!this._config.isVisible){Z(e);return}this._append();const t=this._getElement();this._config.isAnimated&&ws(t),t.classList.add(Vo),this._emulateAnimation(()=>{Z(e)})}hide(e){if(!this._config.isVisible){Z(e);return}this._getElement().classList.remove(Vo),this._emulateAnimation(()=>{this.dispose(),Z(e)})}dispose(){this._isAppended&&(g.off(this._element,Uo),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(ng),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=jt(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),g.on(e,Uo,()=>{Z(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){lc(e,this._getElement(),this._config.isAnimated)}}const ag="focustrap",lg="bs.focustrap",Oi=`.${lg}`,cg=`focusin${Oi}`,hg=`keydown.tab${Oi}`,dg="Tab",ug="forward",jo="backward",pg={autofocus:!0,trapElement:null},fg={autofocus:"boolean",trapElement:"element"};class Tc extends _s{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return pg}static get DefaultType(){return fg}static get NAME(){return ag}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),g.off(document,Oi),g.on(document,cg,e=>this._handleFocusin(e)),g.on(document,hg,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,g.off(document,Oi))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const s=y.focusableChildren(t);s.length===0?t.focus():this._lastTabNavDirection===jo?s[s.length-1].focus():s[0].focus()}_handleKeydown(e){e.key===dg&&(this._lastTabNavDirection=e.shiftKey?jo:ug)}}const Wo=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",zo=".sticky-top",Bs="padding-right",qo="margin-right";class Yn{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Bs,t=>t+e),this._setElementAttributes(Wo,Bs,t=>t+e),this._setElementAttributes(zo,qo,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Bs),this._resetElementAttributes(Wo,Bs),this._resetElementAttributes(zo,qo)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,s){const n=this.getWidth(),r=a=>{if(a!==this._element&&window.innerWidth>a.clientWidth+n)return;this._saveInitialAttribute(a,t);const l=window.getComputedStyle(a).getPropertyValue(t);a.style.setProperty(t,`${s(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,r)}_saveInitialAttribute(e,t){const s=e.style.getPropertyValue(t);s&&Nt.setDataAttribute(e,t,s)}_resetElementAttributes(e,t){const s=n=>{const r=Nt.getDataAttribute(n,t);if(r===null){n.style.removeProperty(t);return}Nt.removeDataAttribute(n,t),n.style.setProperty(t,r)};this._applyManipulationCallback(e,s)}_applyManipulationCallback(e,t){if(kt(e)){t(e);return}for(const s of y.find(e,this._element))t(s)}}const mg="modal",gg="bs.modal",ct=`.${gg}`,vg=".data-api",bg="Escape",Eg=`hide${ct}`,yg=`hidePrevented${ct}`,Cc=`hidden${ct}`,Lc=`show${ct}`,wg=`shown${ct}`,_g=`resize${ct}`,Sg=`click.dismiss${ct}`,Ag=`mousedown.dismiss${ct}`,Tg=`keydown.dismiss${ct}`,Cg=`click${ct}${vg}`,Yo="modal-open",Lg="fade",Ko="show",yn="modal-static",kg=".modal.show",Ng=".modal-dialog",xg=".modal-body",Ig='[data-bs-toggle="modal"]',Og={backdrop:!0,focus:!0,keyboard:!0},Dg={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};let gs=class kc extends pt{constructor(e,t){super(e,t),this._dialog=y.findOne(Ng,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Yn,this._addEventListeners()}static get Default(){return Og}static get DefaultType(){return Dg}static get NAME(){return mg}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||g.trigger(this._element,Lc,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Yo),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||g.trigger(this._element,Eg).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ko),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){g.off(window,ct),g.off(this._dialog,ct),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ac({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Tc({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=y.findOne(xg,this._dialog);t&&(t.scrollTop=0),ws(this._element),this._element.classList.add(Ko);const s=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,g.trigger(this._element,wg,{relatedTarget:e})};this._queueCallback(s,this._dialog,this._isAnimated())}_addEventListeners(){g.on(this._element,Tg,e=>{if(e.key===bg){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),g.on(window,_g,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),g.on(this._element,Ag,e=>{g.one(this._element,Sg,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Yo),this._resetAdjustments(),this._scrollBar.reset(),g.trigger(this._element,Cc)})}_isAnimated(){return this._element.classList.contains(Lg)}_triggerBackdropTransition(){if(g.trigger(this._element,yg).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,s=this._element.style.overflowY;s==="hidden"||this._element.classList.contains(yn)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(yn),this._queueCallback(()=>{this._element.classList.remove(yn),this._queueCallback(()=>{this._element.style.overflowY=s},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),s=t>0;if(s&&!e){const n=lt()?"paddingLeft":"paddingRight";this._element.style[n]=`${t}px`}if(!s&&e){const n=lt()?"paddingRight":"paddingLeft";this._element.style[n]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const s=kc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof s[e]>"u")throw new TypeError(`No method named "${e}"`);s[e](t)}})}};g.on(document,Cg,Ig,function(i){const e=y.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&i.preventDefault(),g.one(e,Lc,n=>{n.defaultPrevented||g.one(e,Cc,()=>{ze(this)&&this.focus()})});const t=y.findOne(kg);t&&gs.getInstance(t).hide(),gs.getOrCreateInstance(e).toggle(this)});Ji(gs);ht(gs);const Pg="offcanvas",Mg="bs.offcanvas",Dt=`.${Mg}`,Nc=".data-api",$g=`load${Dt}${Nc}`,Rg="Escape",Go="show",Xo="showing",Qo="hiding",Bg="offcanvas-backdrop",xc=".offcanvas.show",Hg=`show${Dt}`,Fg=`shown${Dt}`,Vg=`hide${Dt}`,Jo=`hidePrevented${Dt}`,Ic=`hidden${Dt}`,Ug=`resize${Dt}`,jg=`click${Dt}${Nc}`,Wg=`keydown.dismiss${Dt}`,zg='[data-bs-toggle="offcanvas"]',qg={backdrop:!0,keyboard:!0,scroll:!1},Yg={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class zt extends pt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return qg}static get DefaultType(){return Yg}static get NAME(){return Pg}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||g.trigger(this._element,Hg,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Yn().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Xo);const s=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Go),this._element.classList.remove(Xo),g.trigger(this._element,Fg,{relatedTarget:e})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown||g.trigger(this._element,Vg).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Qo),this._backdrop.hide();const t=()=>{this._element.classList.remove(Go,Qo),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Yn().reset(),g.trigger(this._element,Ic)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){g.trigger(this._element,Jo);return}this.hide()},t=!!this._config.backdrop;return new Ac({className:Bg,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new Tc({trapElement:this._element})}_addEventListeners(){g.on(this._element,Wg,e=>{if(e.key===Rg){if(this._config.keyboard){this.hide();return}g.trigger(this._element,Jo)}})}static jQueryInterface(e){return this.each(function(){const t=zt.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}g.on(document,jg,zg,function(i){const e=y.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Wt(this))return;g.one(e,Ic,()=>{ze(this)&&this.focus()});const t=y.findOne(xc);t&&t!==e&&zt.getInstance(t).hide(),zt.getOrCreateInstance(e).toggle(this)});g.on(window,$g,()=>{for(const i of y.find(xc))zt.getOrCreateInstance(i).show()});g.on(window,Ug,()=>{for(const i of y.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(i).position!=="fixed"&&zt.getOrCreateInstance(i).hide()});Ji(zt);ht(zt);const Kg=/^aria-[\w-]*$/i,Oc={"*":["class","dir","id","lang","role",Kg],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Gg=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Xg=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Qg=(i,e)=>{const t=i.nodeName.toLowerCase();return e.includes(t)?Gg.has(t)?!!Xg.test(i.nodeValue):!0:e.filter(s=>s instanceof RegExp).some(s=>s.test(t))};function Jg(i,e,t){if(!i.length)return i;if(t&&typeof t=="function")return t(i);const n=new window.DOMParser().parseFromString(i,"text/html"),r=[].concat(...n.body.querySelectorAll("*"));for(const a of r){const l=a.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){a.remove();continue}const c=[].concat(...a.attributes),h=[].concat(e["*"]||[],e[l]||[]);for(const d of c)Qg(d,h)||a.removeAttribute(d.nodeName)}return n.body.innerHTML}const Zg="TemplateFactory",tv={allowList:Oc,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},ev={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},sv={entry:"(string|element|function|null)",selector:"(string|element)"};class iv extends _s{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return tv}static get DefaultType(){return ev}static get NAME(){return Zg}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[n,r]of Object.entries(this._config.content))this._setContent(e,r,n);const t=e.children[0],s=this._resolvePossibleFunction(this._config.extraClass);return s&&t.classList.add(...s.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,s]of Object.entries(e))super._typeCheckConfig({selector:t,entry:s},sv)}_setContent(e,t,s){const n=y.findOne(s,e);if(n){if(t=this._resolvePossibleFunction(t),!t){n.remove();return}if(kt(t)){this._putElementInTemplate(jt(t),n);return}if(this._config.html){n.innerHTML=this._maybeSanitize(t);return}n.textContent=t}}_maybeSanitize(e){return this._config.sanitize?Jg(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Z(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const nv="tooltip",rv=new Set(["sanitize","allowList","sanitizeFn"]),wn="fade",ov="modal",Hs="show",av=".tooltip-inner",Zo=`.${ov}`,ta="hide.bs.modal",Qe="hover",_n="focus",lv="click",cv="manual",hv="hide",dv="hidden",uv="show",pv="shown",fv="inserted",mv="click",gv="focusin",vv="focusout",bv="mouseenter",Ev="mouseleave",yv={AUTO:"auto",TOP:"top",RIGHT:lt()?"left":"right",BOTTOM:"bottom",LEFT:lt()?"right":"left"},wv={allowList:Oc,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},_v={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};let As=class Dc extends pt{constructor(e,t){if(typeof ic>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return wv}static get DefaultType(){return _v}static get NAME(){return nv}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),g.off(this._element.closest(Zo),ta,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=g.trigger(this._element,this.constructor.eventName(uv)),s=(oc(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!s)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),g.trigger(this._element,this.constructor.eventName(fv))),this._popper=this._createPopper(n),n.classList.add(Hs),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))g.on(l,"mouseover",xi);const a=()=>{g.trigger(this._element,this.constructor.eventName(pv)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(a,this.tip,this._isAnimated())}hide(){if(!this._isShown()||g.trigger(this._element,this.constructor.eventName(hv)).defaultPrevented)return;if(this._getTipElement().classList.remove(Hs),"ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))g.off(n,"mouseover",xi);this._activeTrigger[lv]=!1,this._activeTrigger[_n]=!1,this._activeTrigger[Qe]=!1,this._isHovered=null;const s=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),g.trigger(this._element,this.constructor.eventName(dv)))};this._queueCallback(s,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(wn,Hs),t.classList.add(`bs-${this.constructor.NAME}-auto`);const s=lf(this.constructor.NAME).toString();return t.setAttribute("id",s),this._isAnimated()&&t.classList.add(wn),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new iv({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[av]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(wn)}_isShown(){return this.tip&&this.tip.classList.contains(Hs)}_createPopper(e){const t=Z(this._config.placement,[this,e,this._element]),s=yv[t.toUpperCase()];return Qi(this._element,e,this._getPopperConfig(s))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Z(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:s=>{this._getTipElement().setAttribute("data-popper-placement",s.state.placement)}}]};return{...t,...Z(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")g.on(this._element,this.constructor.eventName(mv),this._config.selector,s=>{this._initializeOnDelegatedTarget(s).toggle()});else if(t!==cv){const s=t===Qe?this.constructor.eventName(bv):this.constructor.eventName(gv),n=t===Qe?this.constructor.eventName(Ev):this.constructor.eventName(vv);g.on(this._element,s,this._config.selector,r=>{const a=this._initializeOnDelegatedTarget(r);a._activeTrigger[r.type==="focusin"?_n:Qe]=!0,a._enter()}),g.on(this._element,n,this._config.selector,r=>{const a=this._initializeOnDelegatedTarget(r);a._activeTrigger[r.type==="focusout"?_n:Qe]=a._element.contains(r.relatedTarget),a._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},g.on(this._element.closest(Zo),ta,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=Nt.getDataAttributes(this._element);for(const s of Object.keys(t))rv.has(s)&&delete t[s];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:jt(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,s]of Object.entries(this._config))this.constructor.Default[t]!==s&&(e[t]=s);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=Dc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}};ht(As);const Sv="popover",Av=".popover-header",Tv=".popover-body",Cv={...As.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Lv={...As.DefaultType,content:"(null|string|element|function)"};let Pc=class Mc extends As{static get Default(){return Cv}static get DefaultType(){return Lv}static get NAME(){return Sv}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Av]:this._getTitle(),[Tv]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=Mc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}};ht(Pc);const kv="scrollspy",Nv="bs.scrollspy",Cr=`.${Nv}`,xv=".data-api",Iv=`activate${Cr}`,ea=`click${Cr}`,Ov=`load${Cr}${xv}`,Dv="dropdown-item",Ee="active",Pv='[data-bs-spy="scroll"]',Sn="[href]",Mv=".nav, .list-group",sa=".nav-link",$v=".nav-item",Rv=".list-group-item",Bv=`${sa}, ${$v} > ${sa}, ${Rv}`,Hv=".dropdown",Fv=".dropdown-toggle",Vv={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Uv={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class sn extends pt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Vv}static get DefaultType(){return Uv}static get NAME(){return kv}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=jt(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(g.off(this._config.target,ea),g.on(this._config.target,ea,Sn,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const s=this._rootElement||window,n=t.offsetTop-this._element.offsetTop;if(s.scrollTo){s.scrollTo({top:n,behavior:"smooth"});return}s.scrollTop=n}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){const t=a=>this._targetLinks.get(`#${a.target.id}`),s=a=>{this._previousScrollData.visibleEntryTop=a.target.offsetTop,this._process(t(a))},n=(this._rootElement||document.documentElement).scrollTop,r=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const a of e){if(!a.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(a));continue}const l=a.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&l){if(s(a),!n)return;continue}!r&&!l&&s(a)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=y.find(Sn,this._config.target);for(const t of e){if(!t.hash||Wt(t))continue;const s=y.findOne(decodeURI(t.hash),this._element);ze(s)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,s))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Ee),this._activateParents(e),g.trigger(this._element,Iv,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(Dv)){y.findOne(Fv,e.closest(Hv)).classList.add(Ee);return}for(const t of y.parents(e,Mv))for(const s of y.prev(t,Bv))s.classList.add(Ee)}_clearActiveClass(e){e.classList.remove(Ee);const t=y.find(`${Sn}.${Ee}`,e);for(const s of t)s.classList.remove(Ee)}static jQueryInterface(e){return this.each(function(){const t=sn.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}g.on(window,Ov,()=>{for(const i of y.find(Pv))sn.getOrCreateInstance(i)});ht(sn);const jv="tab",Wv="bs.tab",ge=`.${Wv}`,zv=`hide${ge}`,qv=`hidden${ge}`,Yv=`show${ge}`,Kv=`shown${ge}`,Gv=`click${ge}`,Xv=`keydown${ge}`,Qv=`load${ge}`,Jv="ArrowLeft",ia="ArrowRight",Zv="ArrowUp",na="ArrowDown",re="active",ra="fade",An="show",tb="dropdown",eb=".dropdown-toggle",sb=".dropdown-menu",Tn=":not(.dropdown-toggle)",ib='.list-group, .nav, [role="tablist"]',nb=".nav-item, .list-group-item",rb=`.nav-link${Tn}, .list-group-item${Tn}, [role="tab"]${Tn}`,$c='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Cn=`${rb}, ${$c}`,ob=`.${re}[data-bs-toggle="tab"], .${re}[data-bs-toggle="pill"], .${re}[data-bs-toggle="list"]`;class Ve extends pt{constructor(e){super(e),this._parent=this._element.closest(ib),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),g.on(this._element,Xv,t=>this._keydown(t)))}static get NAME(){return jv}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),s=t?g.trigger(t,zv,{relatedTarget:e}):null;g.trigger(e,Yv,{relatedTarget:t}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(re),this._activate(y.getElementFromSelector(e));const s=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(An);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),g.trigger(e,Kv,{relatedTarget:t})};this._queueCallback(s,e,e.classList.contains(ra))}_deactivate(e,t){if(!e)return;e.classList.remove(re),e.blur(),this._deactivate(y.getElementFromSelector(e));const s=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(An);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),g.trigger(e,qv,{relatedTarget:t})};this._queueCallback(s,e,e.classList.contains(ra))}_keydown(e){if(![Jv,ia,Zv,na].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[ia,na].includes(e.key),s=_r(this._getChildren().filter(n=>!Wt(n)),e.target,t,!0);s&&(s.focus({preventScroll:!0}),Ve.getOrCreateInstance(s).show())}_getChildren(){return y.find(Cn,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const s of t)this._setInitialAttributesOnChild(s)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),s=this._getOuterElement(e);e.setAttribute("aria-selected",t),s!==e&&this._setAttributeIfNotExists(s,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=y.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const s=this._getOuterElement(e);if(!s.classList.contains(tb))return;const n=(r,a)=>{const l=y.findOne(r,s);l&&l.classList.toggle(a,t)};n(eb,re),n(sb,An),s.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,s){e.hasAttribute(t)||e.setAttribute(t,s)}_elemIsActive(e){return e.classList.contains(re)}_getInnerElement(e){return e.matches(Cn)?e:y.findOne(Cn,e)}_getOuterElement(e){return e.closest(nb)||e}static jQueryInterface(e){return this.each(function(){const t=Ve.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}g.on(document,Gv,$c,function(i){["A","AREA"].includes(this.tagName)&&i.preventDefault(),!Wt(this)&&Ve.getOrCreateInstance(this).show()});g.on(window,Qv,()=>{for(const i of y.find(ob))Ve.getOrCreateInstance(i)});ht(Ve);const ab="toast",lb="bs.toast",Kt=`.${lb}`,cb=`mouseover${Kt}`,hb=`mouseout${Kt}`,db=`focusin${Kt}`,ub=`focusout${Kt}`,pb=`hide${Kt}`,fb=`hidden${Kt}`,mb=`show${Kt}`,gb=`shown${Kt}`,vb="fade",oa="hide",Fs="show",Vs="showing",bb={animation:"boolean",autohide:"boolean",delay:"number"},Eb={animation:!0,autohide:!0,delay:5e3};let Lr=class Rc extends pt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Eb}static get DefaultType(){return bb}static get NAME(){return ab}show(){if(g.trigger(this._element,mb).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(vb);const t=()=>{this._element.classList.remove(Vs),g.trigger(this._element,gb),this._maybeScheduleHide()};this._element.classList.remove(oa),ws(this._element),this._element.classList.add(Fs,Vs),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||g.trigger(this._element,pb).defaultPrevented)return;const t=()=>{this._element.classList.add(oa),this._element.classList.remove(Vs,Fs),g.trigger(this._element,fb)};this._element.classList.add(Vs),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Fs),super.dispose()}isShown(){return this._element.classList.contains(Fs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const s=e.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){g.on(this._element,cb,e=>this._onInteraction(e,!0)),g.on(this._element,hb,e=>this._onInteraction(e,!1)),g.on(this._element,db,e=>this._onInteraction(e,!0)),g.on(this._element,ub,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=Rc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}};Ji(Lr);ht(Lr);class te extends en{}class B extends Ar{}o(B,"CLASS_NAME_SHOW","show"),o(B,"CLASS_NAME_COLLAPSE","collapse"),o(B,"CLASS_NAME_COLLAPSING","collapsing"),o(B,"CLASS_NAME_COLLAPSED","collapsed"),o(B,"SELECTOR_ACTIVES",".show, .collapsing"),o(B,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="collapse"]');const Or=class extends P{constructor(){super();o(this,"scope",{toggle:this.toggle,show:this.show,hide:this.hide,update:this.update,isShown:!1});o(this,"dropdown");o(this,"toggler",null);o(this,"onShown",this._onShown.bind(this));o(this,"onHidden",this._onHidden.bind(this))}static get observedAttributes(){return["offset","boundary","reference","display","popper-config","auto-close"]}isShown(){var t;return((t=this.dropdown)==null?void 0:t._isShown())||!1}toggle(t,s,n){if(!this.dropdown)throw new Error("Dropdown not ready!");n!==this.toggler&&this.dropdown.toggle()}show(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.show()}hide(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.hide()}update(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.update()}connectedCallback(){super.connectedCallback(),this.init(Or.observedAttributes)}async afterBind(){this.initDropdown(),this.addEventListeners(),await super.afterBind()}initDropdown(){this.toggler=this.classList.contains("dropdown-toggle")?this:this.querySelector(".dropdown-toggle")||this,this.toggler.dataset.bsToggle="dropdown",this.dropdown=new T(this.toggler,this.scope),this.dropdown.hide(),this.scope.isShown=this.isShown()}_onShown(){console.debug("onShown"),this.scope.isShown=this.isShown()}_onHidden(){console.debug("onHidden"),this.scope.isShown=this.isShown()}addEventListeners(){var t,s;(t=this.toggler)==null||t.addEventListener(T.EVENT_SHOWN,this.onShown),(s=this.toggler)==null||s.addEventListener(T.EVENT_HIDDEN,this.onHidden)}template(){return null}};let rs=Or;o(rs,"tagName","bs5-dropdown");const Us=".data-api",aa="ArrowDown",la="ArrowUp",ca="Escape",ft=class extends me{static hideAll(){this.clearMenus()}static getAllComponents(){const e=document.querySelectorAll(rs.tagName);return Array.from(e)}static hideAllComponents(){var t;const e=this.getAllComponents();for(const s of Array.from(e))(t=s.dropdown)==null||t.hide()}constructor(e,t){super(e,t)}};let T=ft;o(T,"DATA_API_KEY",Us),o(T,"ESCAPE_KEY",ca),o(T,"SPACE_KEY","Space"),o(T,"TAB_KEY","Tab"),o(T,"ARROW_UP_KEY",la),o(T,"ARROW_DOWN_KEY",aa),o(T,"RIGHT_MOUSE_BUTTON",2),o(T,"REGEXP_KEYDOWN",new RegExp(`${la}|${aa}|${ca}`)),o(T,"EVENT_HIDE",`hide${ft.EVENT_KEY}`),o(T,"EVENT_HIDDEN",`hidden${ft.EVENT_KEY}`),o(T,"EVENT_SHOW",`show${ft.EVENT_KEY}`),o(T,"EVENT_SHOWN",`shown${ft.EVENT_KEY}`),o(T,"EVENT_CLICK",`click${ft.EVENT_KEY}`),o(T,"EVENT_CLICK_DATA_API",`click${ft.EVENT_KEY}${Us}`),o(T,"EVENT_KEYDOWN_DATA_API",`keydown${ft.EVENT_KEY}${Us}`),o(T,"EVENT_KEYUP_DATA_API",`keyup${ft.EVENT_KEY}${Us}`),o(T,"CLASS_NAME_DISABLED","disabled"),o(T,"CLASS_NAME_SHOW","show"),o(T,"CLASS_NAME_DROPUP","dropup"),o(T,"CLASS_NAME_DROPEND","dropend"),o(T,"CLASS_NAME_DROPSTART","dropstart"),o(T,"CLASS_NAME_NAVBAR","navbar"),o(T,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="dropdown"]'),o(T,"SELECTOR_FORM_CHILD",".dropdown form"),o(T,"SELECTOR_MENU",".dropdown-menu"),o(T,"SELECTOR_NAVBAR_NAV",".navbar-nav"),o(T,"SELECTOR_VISIBLE_ITEMS",".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)");var Tt=(i=>(i.show="show.bs.collapse",i.shown="shown.bs.collapse",i.hide="hide.bs.collapse",i.hidden="hidden.bs.collapse",i))(Tt||{});class Bc{constructor(e,t){o(this,"type");o(this,"title");o(this,"channel");o(this,"$event");o(this,"$context");this.type=e,this.title=t}}class yb extends Bc{constructor({title:t,message:s,iconUrl:n,focus:r,keyboard:a,backdrop:l,buttons:c,modalService:h,contextualClass:d,channel:p,$event:u,$context:f}){super("modal",t);o(this,"message");o(this,"iconUrl");o(this,"focus");o(this,"keyboard");o(this,"backdrop");o(this,"buttons",[]);o(this,"modalService");o(this,"contextualClass");this.message=s,this.iconUrl=n,this.focus=r||!1,this.keyboard=a||!0,this.backdrop=l||!0,this.buttons=c||[],this.modalService=h,this.contextualClass=d,this.channel=p,this.$event=u,this.$context=f}}const Hc="bs.modal",ha=".data-api",tt=`.${Hc}`;class M extends gs{static get DATA_KEY(){return Hc}static get DATA_API_KEY(){return ha}static get EVENT_KEY(){return tt}}o(M,"ESCAPE_KEY","Escape"),o(M,"EVENT_HIDE",`hide${tt}`),o(M,"EVENT_HIDE_PREVENTED",`hidePrevented${tt}`),o(M,"EVENT_HIDDEN",`hidden${tt}`),o(M,"EVENT_SHOW",`show${tt}`),o(M,"EVENT_SHOWN",`shown${tt}`),o(M,"EVENT_FOCUSIN",`focusin${tt}`),o(M,"EVENT_RESIZE",`resize${tt}`),o(M,"EVENT_CLICK_DISMISS",`click.dismiss${tt}`),o(M,"EVENT_KEYDOWN_DISMISS",`keydown.dismiss${tt}`),o(M,"EVENT_MOUSEUP_DISMISS",`mouseup.dismiss${tt}`),o(M,"EVENT_MOUSEDOWN_DISMISS",`mousedown.dismiss${tt}`),o(M,"EVENT_CLICK_DATA_API",`click${tt}${ha}`),o(M,"CLASS_NAME_SCROLLBAR_MEASURER","modal-scrollbar-measure"),o(M,"CLASS_NAME_BACKDROP","modal-backdrop"),o(M,"CLASS_NAME_OPEN","modal-open"),o(M,"CLASS_NAME_FADE","fade"),o(M,"CLASS_NAME_SHOW","show"),o(M,"CLASS_NAME_STATIC","modal-static"),o(M,"SELECTOR_DIALOG",".modal-dialog"),o(M,"SELECTOR_MODAL_BODY",".modal-body"),o(M,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="modal"]'),o(M,"SELECTOR_DATA_DISMISS",'[data-bs-dismiss="modal"]'),o(M,"SELECTOR_FIXED_CONTENT",".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"),o(M,"SELECTOR_STICKY_CONTENT",".sticky-top");class wb extends As{}class Kn extends Pc{}const Bt=class{constructor(){o(this,"eventDispatcher",D.getInstance());o(this,"bs5",vt.getSingleton());o(this,"current","os");this.addEventListeners();const e=this.init(),t=document.getElementById("theme");t&&this.select(e.choice,t)}static getSingleton(){return Bt.instance?Bt.instance:this.setSingleton()}static setSingleton(){if(Bt.instance)throw new Error("Singleton of ThemeService already defined!");return Bt.instance=new Bt,Bt.instance}addEventListeners(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{this.triggerChange(e)})}init(){let e="os";return this.bs5.options.allowStoreDataInBrowser&&(e=localStorage.getItem("bs5-theme")||"os"),this.set(e)}select(e,t){(t==null?void 0:t.nodeName)==="SELECT"&&(t.value=e)}getDefaultData(){return{supported:!!window.matchMedia,isDark:!1,isLight:!1,systemIsDark:!1,systemIsLight:!0,bySystem:!0,byUser:!1,choice:"os"}}triggerChange(e,t){t||(t=this.getDefaultData());const s=this.getScheme();return this.eventDispatcher.trigger("theme-change",{oldValue:t,newValue:s}),s}onceChange(e,t){this.eventDispatcher.once("theme-change",e,t)}onChange(e,t){this.eventDispatcher.on("theme-change",e,t)}offChange(e,t){this.eventDispatcher.off("theme-change",e,t)}set(e){const t=this.getScheme();if(cr.includes(e)||(console.warn(`Unsupported theme "${e}", set instead the default "os".`),e="os"),this.bs5.options.allowStoreDataInBrowser&&localStorage.setItem("bs5-theme",e),e==="os"){const s=this.getScheme(e);document.documentElement.setAttribute("data-bs-theme",s.isDark?"dark":"light")}else document.documentElement.setAttribute("data-bs-theme",e);return this.current=e,this.triggerChange(void 0,t)}getScheme(e=this.current){const t=this.getDefaultData();return t.systemIsDark=window.matchMedia("(prefers-color-scheme: dark)").matches,t.systemIsLight=!t.systemIsDark,e==="os"?(t.bySystem=!0,t.byUser=!1,t.choice="os",t.isDark=t.systemIsDark,t.isLight=t.systemIsLight):(t.bySystem=!1,t.byUser=!0,e==="dark"&&(t.isDark=!0,t.choice="dark"),e==="light"&&(t.isLight=!0,t.choice="light")),t}};let Ie=Bt;o(Ie,"instance");class Fc extends Bc{constructor({title:t,message:s,iconUrl:n,delay:r,autoHide:a,animation:l,toastService:c,contextualClass:h,channel:d,$event:p,$context:u}){super("toast",t);o(this,"message");o(this,"iconUrl");o(this,"delay");o(this,"autoHide");o(this,"animation");o(this,"toastService");o(this,"contextualClass");this.message=s,this.iconUrl=n,this.delay=r,this.autoHide=a,this.animation=l,this.toastService=c,this.contextualClass=h,this.channel=d,this.$event=p,this.$context=u}}const se=class extends Lr{};let J=se;o(J,"EVENT_CLICK_DISMISS",`click.dismiss${se.EVENT_KEY}`),o(J,"EVENT_HIDE",`hide${se.EVENT_KEY}`),o(J,"EVENT_HIDDEN",`hidden${se.EVENT_KEY}`),o(J,"EVENT_SHOW",`show${se.EVENT_KEY}`),o(J,"EVENT_SHOWN",`shown${se.EVENT_KEY}`),o(J,"CLASS_NAME_FADE","fade"),o(J,"CLASS_NAME_HIDE","hide"),o(J,"CLASS_NAME_SHOW","show"),o(J,"CLASS_NAME_SHOWING","showing");const _b=Object.freeze(Object.defineProperty({__proto__:null,Bs5Service:vt,Carousel:te,Collapse:B,Dropdown:T,Modal:M,ModalNotification:yb,Popover:Kn,ThemeService:Ie,Toast:J,ToastNotification:Fc,Tooltip:wb},Symbol.toStringTag,{value:"Module"}));class Vc extends E{constructor(t,s,n,r,a,l,c){super(t,s,n,r,a,l,c);o(this,"bs5");o(this,"breakpoint");o(this,"attributeName");o(this,"val");if(this.bs5=vt.getSingleton(),this.args.length!==2)throw new Error("The Bs5AttributeBreakpointBinder was not initialized correctly!");const h=this.args[0].toString(),d=this.args[1].toString();if(!this.bs5.breakpointNames.includes(h))throw new Error(`Unknown breakpoint "${h}"! You can define breakpoints at the initialization of the Bs5Module.`);this.breakpoint=h,this.attributeName=d}onBreakpointChanges(){this.setAttributeOnMatch()}setAttributeOnMatch(){if(this.bs5.activeBreakpoint){if(this.isBreakpointMatch(this.breakpoint))return this.defaultAttributeBinder.routine(this.el,this.val);this.breakpointUnhandled(this.bs5.activeBreakpoint.name)&&this.defaultAttributeBinder.routine(this.el,void 0)}}isBreakpointMatch(t=this.breakpoint){return this.bs5.activeBreakpoint?!!(this.bs5.activeBreakpoint.name===t||this.myBreakpoints(t).includes(this.bs5.activeBreakpoint.name)):!1}myBreakpoints(t=this.breakpoint){const s=[t];let n=t;for(;n&&(n=this.bs5.getNextBreakpointByName(n),!(!n||this.breakpointHandledByAnother(n)));)s.push(n);return s}breakpointHandledByAnother(t){return!!this.getHandledBreakpoints().includes(t)}breakpointUnhandled(t){let s=t,n=!0;for(;s&&n;){if(this.breakpointHandledByAnother(s)){n=!1;break}if(s=this.bs5.getPrevBreakpointByName(s),!s)break}return n}addToHandledBreakpoints(){const t=this.getHandledBreakpoints();t.push(this.breakpoint),this.el.dataset[mt(this.attributeName)]=Fi(t)}getHandledBreakpoints(){const t=Vi(this.el.dataset[mt(this.attributeName)]||"[]");if(!Array.isArray(t))throw new Error("breakpoints dataset has unsupported values!");return t}bind(t){this.bs5.on("breakpoint:changed",this.onBreakpointChanges,this),typeof this.defaultAttributeBinder.bind=="function"&&this.defaultAttributeBinder.bind(t)}routine(t,s){this.addToHandledBreakpoints(),this.val=s,this.setAttributeOnMatch()}unbind(t){var s;(s=this.bs5)==null||s.off("breakpoint:changed",this.onBreakpointChanges,this),typeof this.defaultAttributeBinder.unbind=="function"&&this.defaultAttributeBinder.unbind(t)}}class Uc extends Vc{constructor(t,s,n,r,a,l,c){super(t,s,n,r,a,l,c);o(this,"defaultAttributeBinder");this.defaultAttributeBinder=new zi(t,s,this.attributeName,r,a,l,"*")}}o(Uc,"key","bs5-attr-*-*");class jc extends E{constructor(){super(...arguments);o(this,"dispatcher",D.getInstance("main"));o(this,"collapseService");o(this,"url");o(this,"checkURL",this._checkURL.bind(this))}_checkURL(){var t;return this.url&&ji(this.url)?((t=this.collapseService)==null||t.hide(),!0):!1}bind(t){this.collapseService=new B(t,{toggle:!1})}unbind(){this.checkURL&&this.dispatcher.off("newPageReady",this.checkURL)}routine(t,s){this.url=s,this.checkURL&&this.dispatcher.off("newPageReady",this.checkURL),this.dispatcher.on("newPageReady",this.checkURL)}}o(jc,"key","bs5-collapse-on-url");class Wc extends Vc{constructor(t,s,n,r,a,l,c){super(t,s,n,r,a,l,c);o(this,"defaultAttributeBinder");this.defaultAttributeBinder=new Ci(t,s,`co-${this.attributeName}`,r,a,l,Ci.key)}}o(Wc,"key","bs5-co-*-*");class zc extends E{constructor(){super(...arguments);o(this,"targets",new Map);o(this,"onEvent",this._onEvent.bind(this))}_onEvent(t){t.preventDefault();for(const s of this.targets.values())s.toggle()}bind(t){if(this.args===null)throw new Error("args is null");const s=this.args[0];t.addEventListener(s,this.onEvent)}unbind(){const t=this.args[0];this.el.removeEventListener(t,this.onEvent)}routine(t,s){var r;const n=Array.from(document.querySelectorAll(s));n.length<=0&&console.warn(`[toggleCollapseOnEventBinder] No element with selector "${s}" found.`);for(const a of this.targets.keys())n.find(l=>l===a)||((r=this.targets.get(a))==null||r.dispose(),this.targets.delete(a));for(const a of n)this.targets.has(a)||this.targets.set(a,new B(a,{toggle:!1}))}}o(zc,"key","bs5-toggle-collapse-on-*");class qc extends E{constructor(){super(...arguments);o(this,"toggler");o(this,"dropdownService")}bind(t){this.toggler=(t.classList.contains("dropdown-toggle")?t:t.querySelector(".dropdown-toggle"))||t}routine(t,s={}){if(!this.toggler)throw new Error("No dropdown toggle element found!");this.dropdownService&&(this.dropdownService.dispose(),this.toggler.dataset.bsToggle="");const n=new T(this.toggler,s);this.toggler.dataset.bsToggle="dropdown",this.dropdownService=n,this.dropdownService.hide()}}o(qc,"key","bs5-dropdown");class Yc extends E{routine(e,t){const s=new B(e,{toggle:!1}),n=new D("main"),r=a=>a&&ji(a)?(s.show(),!0):(s.hide(),!1);n.on("newPageReady",()=>r(t)),r(t)}}o(Yc,"key","bs5-expand-on-url");class Kc extends E{constructor(){super(...arguments);o(this,"popover");o(this,"listeners",{})}routine(t,s){let n={};typeof s=="string"?n.content=s:typeof s=="object"&&(n={...s}),n.placement=n.placement||"auto";const r=new Kn(t,{...Kn.Default,...n});this.popover&&this.popover.dispose(),this.popover=r;const a=["show","hide","toggle","dispose","enable","disable","update"];if(this.listeners)for(const[l,c]of Object.entries(this.listeners))this.el.removeEventListener(l,c);this.listeners=Object.create(null);for(const l of a)if(r[l]&&typeof r[l]=="function"){const c=`trigger-${String(l)}`,h=r[l].bind(r);this.el.addEventListener(c,h),this.listeners[c]=h}else console.warn("Unknown method "+l)}bind(t){t.dispatchEvent(new CustomEvent("bound.bs.popover",{bubbles:!0,cancelable:!0}))}unbind(){if(this.popover&&this.popover.dispose(),this.listeners)for(const[t,s]of Object.entries(this.listeners))this.el.removeEventListener(t,s)}}o(Kc,"key","bs5-popover");class Gc extends E{constructor(){super(...arguments);o(this,"toastData");o(this,"onEvent",this._onEvent.bind(this))}_onEvent(t){if(!this.toastData)throw new Error("Toast data not set!");this.toastData.$event=t,this.toastData.$context=this.view.models;const s=new Fc(this.toastData);new D(s.channel||"toast").trigger("show-notification",s)}bind(t){const s=this.args[0];t.addEventListener(s,this.onEvent)}routine(t,s){if(this.args===null)throw new Error("args is null");this.toastData=s}unbind(t){const s=this.args[0];t.removeEventListener(s,this.onEvent)}}o(Gc,"key","show-toast-on-*");class Xc extends E{constructor(){super(...arguments);o(this,"target");o(this,"className");o(this,"onScroll",Et(this._onScroll.bind(this)));o(this,"isInViewport",this._isInViewport.bind(this))}_onScroll(){if(!this.target)throw new Error("No target element found!");if(!this.className)throw new Error("className not set!");this.isInViewport(this.target)?(this.el.classList.add(this.className),this.el.type==="radio"&&(this.el.checked=!0)):(this.el.classList.remove(this.className),this.el.type==="radio"&&(this.el.checked=!1))}_isInViewport(t){if(!t)return!1;const s=Number(this.el.dataset.offset||0),n=Number(this.el.dataset.offsetBottom||0);return qh(t,{top:s,bottom:n})}bind(){window.addEventListener("scroll",this.onScroll,{passive:!0}),this.onScroll()}routine(t,s){const n=s.replace("#","");this.target=document.getElementById(n)||void 0,this.className=this.args[0]}unbind(){window.removeEventListener("scroll",this.onScroll)}}o(Xc,"key","bs5-scrollspy-*");const Ts=document.createElement("div");Ts.classList.add("tooltip");Ts.setAttribute("role","tooltip");const Qc=document.createElement("div");Qc.classList.add("arrow");Ts.appendChild(Qc);const Jc=document.createElement("div");Jc.classList.add("tooltip-inner");Ts.appendChild(Jc);class Zc extends E{constructor(){super(...arguments);o(this,"popper");o(this,"tip",Ts.cloneNode(!0));o(this,"show",this._show.bind(this));o(this,"hide",this._hide.bind(this))}_show(){const t=this.el.dataset.placement||"start",s=0;this.popper=Qi(this.el,this.tip,{placement:t,modifiers:[{name:"flip",options:{altBoundary:!0,behavior:"flip"}},{name:"offset",options:{offset:s}},{name:"arrow",options:{element:".arrow"}},{name:"preventOverflow",options:{boundariesElement:"scrollParent"}}],strategy:void 0}),document.body.appendChild(this.tip),this.tip.classList.add("show"),this.tip.classList.add("bs-tooltip-"+t)}_hide(){this.tip.classList.remove("show"),this.popper&&this.popper.destroy()}bind(t){t.addEventListener("mouseenter",this.show),t.addEventListener("mouseleave",this.hide)}routine(t,s){const n=this.tip.querySelector(".tooltip-inner");n.innerHTML=s}unbind(){this.hide(),this.el.removeEventListener("mouseenter",this.show),this.el.removeEventListener("mouseleave",this.hide)}}o(Zc,"key","bs5-tooltip");class th extends E{constructor(){super(...arguments);o(this,"target");o(this,"onEvent",this._onEvent.bind(this))}_onEvent(t){const s=Number(this.el.dataset.offset||0),n=this.el.dataset.scrollElement?document.querySelector(this.el.dataset.scrollElement):window;this.target&&(Ue(this.target,s,n),t.preventDefault())}bind(t){this.onEvent=this.onEvent.bind(this);const s=this.args[0];t.addEventListener(s,this.onEvent)}routine(t,s){this.target=document.querySelector(s)||void 0}unbind(t){const s=this.args[0];t.removeEventListener(s,this.onEvent)}}o(th,"key","scroll-to-on-*");class eh extends E{constructor(){super(...arguments);o(this,"toggleButtonEvents");o(this,"state","off");o(this,"triggerState",this._triggerState.bind(this));o(this,"onToggle",this._onToggle.bind(this))}_triggerState(){var t;(t=this.toggleButtonEvents)==null||t.trigger(k.eventNames.state,this.state)}_onToggle(){this.toggle.bind(this)(this.el)}toggle(t){this.state==="removed"?this.add.bind(this)(t):this.remove.bind(this)(t)}remove(t){const s=this.args[0];t.removeAttribute(s),this.state="removed",t.dispatchEvent(new CustomEvent(Bn.elEventNames.removed,{detail:{attributeName:s}})),this.triggerState()}add(t){const s=this.args[0];t.setAttribute(s,s),this.state="added",t.dispatchEvent(new CustomEvent(Bn.elEventNames.added,{detail:{attributeName:s}})),this.triggerState()}bind(t){const s=this.args[0];this.state=t.hasAttribute(s)?"added":"removed"}unbind(){var t,s;(t=this.toggleButtonEvents)==null||t.off(k.eventNames.toggle,this.onToggle,this),(s=this.toggleButtonEvents)==null||s.off(k.eventNames.init,this.triggerState,this)}routine(t,s){const n=this._getValue(t);let r=this.toggleButtonEvents;n&&r&&(r.off(k.eventNames.toggle,this.onToggle,this),r.off(k.eventNames.init,this.triggerState,this)),this.toggleButtonEvents||(this.toggleButtonEvents=new D(k.nsPrefix+s),r=this.toggleButtonEvents,r.on(k.eventNames.toggle,this.onToggle,this),r.on(k.eventNames.init,this.triggerState,this))}}o(eh,"key","bs5-toggle-attribute-*");class sh extends E{constructor(){super(...arguments);o(this,"toggleButtonEvents");o(this,"state","off");o(this,"triggerState",this._triggerState.bind(this));o(this,"onToggle",this._onToggle.bind(this))}_triggerState(){var t;(t=this.toggleButtonEvents)==null||t.trigger(k.eventNames.state,this.state)}_onToggle(){this.toggle.bind(this)(this.el)}toggle(t){this.state==="removed"?this.add.bind(this)(t):this.remove.bind(this)(t)}remove(t){const s=this.args[0];t.classList.remove(s),this.state="removed",t.dispatchEvent(new CustomEvent(Hn.elEventNames.removed,{detail:{className:s}})),this.triggerState()}add(t){const s=this.args[0];t.classList.add(s,s),this.state="added",t.dispatchEvent(new CustomEvent(Hn.elEventNames.added,{detail:{className:s}})),this.triggerState()}bind(t){const s=this.args[0];this.state=t.classList.contains(s)?"added":"removed"}unbind(){var t,s;(t=this.toggleButtonEvents)==null||t.off(k.eventNames.toggle,this.onToggle,this),(s=this.toggleButtonEvents)==null||s.off(k.eventNames.init,this.triggerState,this)}routine(t,s){const n=this._getValue(t);let r=this.toggleButtonEvents;n&&r&&(r.off(k.eventNames.toggle,this.onToggle,this),r.off(k.eventNames.init,this.triggerState,this)),this.toggleButtonEvents||(this.toggleButtonEvents=new D(k.nsPrefix+s),r=this.toggleButtonEvents,r.on(k.eventNames.toggle,this.onToggle,this),r.on(k.eventNames.init,this.triggerState,this))}}o(sh,"key","bs5-toggle-class-*");const Sb=Object.freeze(Object.defineProperty({__proto__:null,Bs5AttributeBreakpointBinder:Uc,Bs5ComponentAttributeBreakpointBinder:Wc,CollapseOnUrlBinder:jc,DropdownBinder:qc,ExpandOnUrlBinder:Yc,PopoverBinder:Kc,ScrollToOnEventBinder:th,ScrollspyClassBinder:Xc,ShowToastOnEventBinder:Gc,ToggleAttributeBinder:eh,ToggleClassBinder:sh,ToggleCollapseOnEventBinder:zc,TooltipBinder:Zc},Symbol.toStringTag,{value:"Module"})),Ab="modulepreload",Tb=function(i){return"/"+i},da={},Cs=function(e,t,s){if(!t||t.length===0)return e();const n=document.getElementsByTagName("link");return Promise.all(t.map(r=>{if(r=Tb(r),r in da)return;da[r]=!0;const a=r.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!s)for(let d=n.length-1;d>=0;d--){const p=n[d];if(p.href===r&&(!a||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const h=document.createElement("link");if(h.rel=a?"stylesheet":Ab,a||(h.as="script",h.crossOrigin=""),h.href=r,document.head.appendChild(h),a)return new Promise((d,p)=>{h.addEventListener("load",d),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>e())},Cb=qi.read,Dr=class extends ar{constructor(){super();o(this,"autobind",!0);o(this,"templateAttributes",[{name:"title",required:!0},{name:"show",required:!1},{name:"icon-direction",required:!1}]);o(this,"scope",{items:[],toggle:this.toggle,show:this.show,hide:this.hide,collapseIconSize:16,showOnlyOne:!0})}static get observedAttributes(){return["items","collapse-icon-src","collapse-icon-size","show-only-one"]}hide(t,s){const n=this.querySelector(`[data-index="${s}"]`);n&&(this.initItemEventListeners(t,n),new B(n,{toggle:!1}).hide())}show(t,s){const n=this.querySelector(`[data-index="${s}"]`),r=Array.from(this.querySelectorAll(`[data-index]:not([data-index="${s}"])`));if(r&&this.scope.showOnlyOne)for(const a of r)new B(a,{toggle:!1}).hide();n&&(this.initItemEventListeners(t,n),new B(n,{toggle:!1}).show())}toggle(t,s){const n=this.querySelector(`[data-index="${s}"]`),r=Array.from(this.querySelectorAll(`[data-index]:not([data-index="${s}"])`));if(r&&this.scope.showOnlyOne)for(const a of r)new B(a,{toggle:!1}).hide();n&&(this.initItemEventListeners(t,n),new B(n,{toggle:!1}).toggle())}initItemEventListeners(t,s){s.removeEventListener(Tt.hide,this.onHide.bind(this,s,t)),s.removeEventListener(Tt.show,this.onShow.bind(this,s,t)),s.addEventListener(Tt.hide,this.onHide.bind(this,s,t),{once:!0}),s.addEventListener(Tt.show,this.onShow.bind(this,s,t),{once:!0})}getContentChildByIndex(){return this.querySelector(".card-body > *")||void 0}onShow(t,s){s.show=!0,s.iconDirection="up";const n=this.getContentChildByIndex();n&&this.triggerVisibilityChangedForElement(n,s.show)}onHide(t,s){s.show=!1,s.iconDirection="down";const n=this.getContentChildByIndex();n&&this.triggerVisibilityChangedForElement(n,s.show)}transformTemplateAttributes(t){return t.handle=t.handle||Cb(t.title),t.show=!!t.show,t.iconDirection=t.iconDirection||t.show?"up":"down",t}triggerVisibilityChangedForElement(t,s){setTimeout(()=>{t.dispatchEvent(new CustomEvent("visibility-changed",{detail:{visible:s}}))},200)}connectedCallback(){super.connectedCallback(),this.init(Dr.observedAttributes)}async init(t){return super.init(t).then(s=>s)}async beforeBind(){return await super.beforeBind()}async afterBind(){return await super.afterBind()}requiredAttributes(){return[]}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r)}disconnectedCallback(){super.disconnectedCallback()}async template(){if(!K(this)||this.hasOnlyTemplateChilds()){const{default:t}=await Cs(()=>import("./bs5-accordion.component-cad06286.chunk.js"),[]);return t}else return null}};let Zs=Dr;o(Zs,"tagName","bs5-accordion");const Pr=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"scope",{animationClass:"btn-animation-start",onClick:this.onClick.bind(this)})}static get observedAttributes(){return["animation-class"]}onClick(){this.startAnimation()}connectedCallback(){super.connectedCallback(),this.init(Pr.observedAttributes)}startAnimation(){this.classList.add(this.scope.animationClass)}onStartAnimation(){}onEndAnimation(){setTimeout(()=>{this.classList.remove(this.scope.animationClass)})}async init(t){return super.init(t).then(s=>(this.onStartAnimation=this.onStartAnimation.bind(this),this.addEventListener("webkitAnimationStart",this.onStartAnimation),this.addEventListener("animationstart",this.onStartAnimation),this.onEndAnimation=this.onEndAnimation.bind(this),this.addEventListener("webkitAnimationEnd",this.onEndAnimation),this.addEventListener("animationend",this.onEndAnimation),this.addEventListener("click",this.scope.onClick),s))}requiredAttributes(){return[]}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("webkitAnimationStart",this.onStartAnimation),this.removeEventListener("animationstart",this.onStartAnimation),this.removeEventListener("webkitAnimationEnd",this.onEndAnimation),this.removeEventListener("animationend",this.onEndAnimation),this.removeEventListener("click",this.scope.onClick)}template(){return null}};let ti=Pr;o(ti,"tagName","bs5-button");const Mr=class extends P{constructor(){super();o(this,"scope",{interval:te.Default.interval,keyboard:te.Default.keyboard,pause:te.Default.pause||!1,wrap:te.Default.wrap,touch:te.Default.touch,fade:!1,next:this.next,nextWhenVisible:this.nextWhenVisible,prev:this.prev,startPause:this.pause,cycle:this.cycle,to:this.to,dispose:this.dispose});o(this,"autobind",!0);o(this,"carouselService")}static get observedAttributes(){return["interval","keyboard","pause","wrap","touch","fade"]}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.classList.add("carousel","slide")}async afterBind(){this.carouselService=new te(this,{interval:this.scope.interval,keyboard:this.scope.keyboard,pause:this.scope.pause,wrap:this.scope.wrap,touch:this.scope.touch}),this.scope.fade&&this.classList.add("carousel-fade"),this.carouselService.cycle(),await super.afterBind()}next(){this.carouselService&&this.carouselService.next()}nextWhenVisible(){this.carouselService&&this.carouselService.nextWhenVisible()}prev(){this.carouselService&&this.carouselService.prev()}pause(){this.carouselService&&this.carouselService.pause()}cycle(){this.carouselService&&this.carouselService.cycle()}to(){if(this.carouselService)throw new Error("TODO")}dispose(){this.carouselService&&this.carouselService.dispose()}connectedCallback(){super.connectedCallback(),super.init(Mr.observedAttributes)}template(){return null}};let ei=Mr;o(ei,"tagName","bs5-carousel");const $r=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"collapse");o(this,"scope",{title:"",content:"Please set the content of the collapse using the content attribute or just by set the content as the child of this element",collapsed:!0,toggle:this.toggle,show:this.show,hide:this.hide})}static get observedAttributes(){return["title","content","collapsed"]}requiredAttributes(){return["title"]}hide(){console.debug("hide"),this.collapse&&(this.scope.collapsed=!0,this.collapse.hide())}show(){this.collapse&&(this.scope.collapsed=!1,this.collapse.show())}toggle(){this.collapse&&(this.collapse.toggle(),this.scope.collapsed=!!this.scope.collapsed)}addEventListeners(){this.scope.collapseEl&&(this.scope.collapseEl.addEventListener(Tt.hide,this.onHide.bind(this)),this.scope.collapseEl.addEventListener(Tt.show,this.onShow.bind(this)))}removeEventListeners(){this.scope.collapseEl&&(this.scope.collapseEl.removeEventListener(Tt.hide,this.onHide.bind(this)),this.scope.collapseEl.removeEventListener(Tt.show,this.onShow.bind(this)))}onShow(){console.debug("onShow"),this.scope.collapsed=!1,this.triggerVisibilityChangedForElement(!this.scope.collapsed)}onHide(){console.debug("onShow"),this.scope.collapsed=!0,this.triggerVisibilityChangedForElement(!this.scope.collapsed)}triggerVisibilityChangedForElement(t){setTimeout(()=>{const s=new CustomEvent("visibility-changed",{detail:{visible:t}});this.dispatchEvent(s),this.scope.collapseEl&&this.scope.collapseEl.dispatchEvent(s)},200)}connectedCallback(){super.connectedCallback(),this.init($r.observedAttributes)}async afterBind(){if(console.debug("afterBind",this.scope.collapsed),this.scope.collapseEl=this.querySelector(".collapse")||void 0,!this.scope.collapseEl)throw new Error("No collapse element found!");this.collapse=new B(this.scope.collapseEl,{toggle:!this.scope.collapsed})}template(){return K(this)&&(this.scope.content=this.innerHTML),jsxCreateElement("div",null,jsxCreateElement("button",{"rv-on-click":"toggle",class:"btn btn-primary",type:"button","aria-expanded":"false","rv-aria-controls":"title | handleize","rv-text":"title"}),jsxCreateElement("div",{class:"collapse mt-2","rv-id":"title"},jsxCreateElement("div",{class:"card card-body","rv-template":"content"})))}};let si=$r;o(si,"tagName","bs5-collapse");String.prototype.startsWith=String.prototype.startsWith||function(i){return this.indexOf(i)===0};String.prototype.padStart=String.prototype.padStart||function(i,e){let t=this;for(;t.length0?i.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):i.toString())||"0"}class _t{constructor(e,t,s,n){const r=this;function a(l){if(l.startsWith("hsl")){let[c,h,d,p]=l.match(/([\-\d\.e]+)/g).map(Number);p===void 0&&(p=1),c/=360,h/=100,d/=100,r.hsla=[c,h,d,p]}else if(l.startsWith("rgb")){let[c,h,d,p]=l.match(/([\-\d\.e]+)/g).map(Number);p===void 0&&(p=1),r.rgba=[c,h,d,p]}else l.startsWith("#")?r.rgba=_t.hexToRgb(l):r.rgba=_t.nameToRgb(l)||_t.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(s===void 0){const l=e&&""+e;l&&a(l.toLowerCase())}else this.rgba=[e,t,s,n===void 0?1:n]}get rgba(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=_t.hslToRgb(this._hsla)}set rgba(e){e.length===3&&(e[3]=1),this._rgba=e,this._hsla=null}printRGB(e){const t=e?this.rgba:this.rgba.slice(0,3),s=t.map((n,r)=>ua(n,r===3?3:0));return e?`rgba(${s})`:`rgb(${s})`}get rgbString(){return this.printRGB()}get rgbaString(){return this.printRGB(!0)}get hsla(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=_t.rgbToHsl(this._rgba)}set hsla(e){e.length===3&&(e[3]=1),this._hsla=e,this._rgba=null}printHSL(e){const t=[360,100,100,1],s=["","%","%",""],n=e?this.hsla:this.hsla.slice(0,3),r=n.map((a,l)=>ua(a*t[l],l===3?3:1)+s[l]);return e?`hsla(${r})`:`hsl(${r})`}get hslString(){return this.printHSL()}get hslaString(){return this.printHSL(!0)}get hex(){return"#"+this.rgba.map((s,n)=>n<3?s.toString(16):Math.round(s*255).toString(16)).map(s=>s.padStart(2,"0")).join("")}set hex(e){this.rgba=_t.hexToRgb(e)}printHex(e){const t=this.hex;return e?t:t.substring(0,7)}static hexToRgb(e){const t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);const s=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(n=>parseInt(n,16));return s[3]=s[3]/255,s}static nameToRgb(e){const t=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),s=Lb[t];return s===void 0?s:_t.hexToRgb(s.replace(/\-/g,"00").padStart(6,"f"))}static rgbToHsl([e,t,s,n]){e/=255,t/=255,s/=255;const r=Math.max(e,t,s),a=Math.min(e,t,s);let l,c,h=(r+a)/2;if(r===a)l=c=0;else{const d=r-a;switch(c=h>.5?d/(2-r-a):d/(r+a),r){case e:l=(t-s)/d+(t1&&(m-=1),m<.16666666666666666?u+(f-u)*6*m:m<.5?f:m<.6666666666666666?u+(f-u)*(.6666666666666666-m)*6:u},d=s<.5?s*(1+t):s+t-s*t,p=2*s-d;r=h(p,d,e+1/3),a=h(p,d,e),l=h(p,d,e-1/3)}const c=[r*255,a*255,l*255].map(Math.round);return c[3]=n,c}}class Di{constructor(){o(this,"events",[])}add(e,t,s){e.addEventListener(t,s,!1),this.events.push({target:e,type:t,handler:s})}remove(e,t,s){this.events=this.events.filter(n=>{let r=!0;return e&&e!==n.target&&(r=!1),t&&t!==n.type&&(r=!1),s&&s!==n.handler&&(r=!1),r&&Di._doRemove(n.target,n.type,n.handler),!r})}static _doRemove(e,t,s){e.removeEventListener(t,s,!1)}destroy(){this.events.forEach(e=>Di._doRemove(e.target,e.type,e.handler)),this.events=[]}}const kb=(i,e,t)=>{let s=!1;const n=(c,h,d)=>Math.max(h,Math.min(c,d)),r=(c,h,d)=>{if(d&&(s=!0),!s)return;c.preventDefault();const p=e.getBoundingClientRect(),u=p.width,f=p.height,m=h.clientX,v=h.clientY,b=n(m-p.left,0,u),w=n(v-p.top,0,f);t(b/u,w/f)},a=(c,h)=>{(c.buttons===void 0?c.which:c.buttons)===1?r(c,c,h):s=!1};function l(c,h){c.touches.length===1?r(c,c.touches[0],h):s=!1}i.add(e,"mousedown",c=>{a(c,!0)}),i.add(e,"touchstart",c=>{l(c,!0)}),i.add(window,"mousemove",a),i.add(e,"touchmove",l),i.add(window,"mouseup",()=>{s=!1}),i.add(e,"touchend",()=>{s=!1}),i.add(e,"touchcancel",()=>{s=!1})},Nb=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E")`,xb=360,Ib="keydown";function Ob(i){i.preventDefault(),i.stopPropagation()}function Db(i,e,t,s,n=!1){i.add(e,Ib,function(r){t.indexOf(r.key)>=0&&(n&&Ob(r),s(r))})}const Rr=class extends P{constructor(){super();o(this,"eventDispatcher");o(this,"color");o(this,"_debug",!1);o(this,"scope",{namespace:"main",hsl:[],cssHue:"",cssHsl:"",cssHsla:"",alphaBg:"",color:"#0cf",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,okayButton:!1});o(this,"events",new Di);o(this,"_domH",null);o(this,"_domSL",null);o(this,"_domA",null);o(this,"_domEdit",null);o(this,"_domSample",null);o(this,"_domOkay",null);o(this,"_domCancel",null);o(this,"setColor",Et(this._setColor.bind(this)));o(this,"updateUI",Et(this._updateUI.bind(this)))}static get observedAttributes(){return["namespace","alpha","editor","editor-format","cancel-button","okay-button","color"]}connectedCallback(){super.connectedCallback(),super.init(Rr.observedAttributes)}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.eventDispatcher=D.getInstance("bs5-colorpicker:"+this.scope.namespace),this.setColor(this.scope.color),this.updateUI(),this.bindEvents()}async afterTemplate(t){await super.afterTemplate(t),this.setElements()}onChange(t){var s;this.debug("onChange",t),(s=this.eventDispatcher)==null||s.trigger("change",t)}onDone(t){var s;this.debug("onDone",t),(s=this.eventDispatcher)==null||s.trigger("done",t)}async template(){if(K(this))return null;{const{default:t}=await Cs(()=>import("./bs5-colorpicker.component-1e5e88ee.chunk.js"),[]);return t}}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r),t==="color"&&this.setColor(this.scope.color)}_setColor(t,s={silent:!1}){if(typeof t=="string"&&(t=t.trim()),!t)return;s=s||{};let n;try{n=new _t(t)}catch(r){if(s.failSilently)return;throw r}if(!this.scope.alpha){const r=n.hsla;r[3]=1,n.hsla=r}this.color=n,this.setHSLA(null,null,null,null,s)}setElements(){this._domH=this.querySelector(".picker-hue"),this._domSL=this.querySelector(".picker-sl"),this._domA=this.querySelector(".picker-alpha"),this._domEdit=this.querySelector(".picker-editor")||null,this._domSample=this.querySelector(".picker-sample"),this._domOkay=this.querySelector(".picker-done"),this._domCancel=this.querySelector(".picker-cancel")}disconnectedCallback(){this.events.destroy()}bindEvents(){const t=this.events,s=(a,l,c)=>{t.add(a,l,c)};s(this,"click",a=>a.preventDefault());const n=kb.bind(this);if(!this._domH||!this._domSL||!this._domA||!this._domEdit||!this._domOkay)throw new Error("Not ready!");n(t,this._domH,a=>this.setHSLA(a)),n(t,this._domSL,(a,l)=>this.setHSLA(null,a,1-l)),this.scope.alpha&&n(t,this._domA,(a,l)=>this.setHSLA(null,null,null,1-l)),s(this._domEdit,"input",a=>{const l=a.target;this.setColor(l.value,{fromEditor:!0,failSilently:!0})}),s(this._domEdit,"focus",a=>{const l=a.target;l.selectionStart===l.selectionEnd&&l.select()});const r=()=>{this.onDone(this.color)};s(this._domOkay,"click",r),Db(t,this,["Enter"],r)}setHSLA(t=null,s=null,n=null,r=null,a={}){if(!this.color)throw new Error("Not ready!");const l=this.color.hsla;[t,s,n,r].forEach((c,h)=>{(c||c===0)&&(l[h]=c)}),this.color.hsla=l,this.updateUI(a),this.onChange&&!a.silent&&this.onChange(this.color)}_updateUI(t={}){if(!this||!this.color)return;if(this.scope.hsl=this.color.hsla,this.scope.cssHue=`hsl(${this.scope.hsl[0]*xb}, 100%, 50%)`,this.scope.cssHsl=this.color.hslString,this.scope.cssHsla=this.color.hslaString,!this._domH||!this._domSL||!this._domA)throw new Error("Color ui elements not found!");const s=this._domH.querySelector(".picker-selector"),n=this._domSL.querySelector(".picker-selector"),r=this._domA.querySelector(".picker-selector");if(!s||!n||!r||!this._domEdit||!this._domSample)throw console.error(s,n,r,this._domA,this._domSL,this._domH,this._domEdit,this._domSample),new Error("Not ready!");const a=(p,u,f)=>{u.style.left=f*100+"%"},l=(p,u,f)=>{u.style.top=f*100+"%"};a(this._domH,s,this.scope.hsl[0]),a(this._domSL,n,this.scope.hsl[1]),l(this._domSL,n,1-this.scope.hsl[2]),l(this._domA,r,1-this.scope.hsl[3]);const c=this.scope.cssHsl,h=c.replace("hsl","hsla").replace(")",", 0)"),d=`linear-gradient(${[c,h]})`;if(this.scope.alphaBg=d+", "+Nb,!t.fromEditor){const p=this.scope.editorFormat,u=this.scope.alpha;let f;switch(p){case"rgb":f=this.color.printRGB(u);break;case"hsl":f=this.color.printHSL(u);break;default:f=this.color.printHex(u)}this.scope.color=f}}};let ii=Rr;o(ii,"tagName","bs5-colorpicker");const Br=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"wrapperElement");o(this,"scope",{headersDepth:1,headersStart:2,findHeaderIdDepth:1,headerParentSelector:void 0,scrollOffset:0,anchors:[]})}static get observedAttributes(){return["headers-start","headers-depth","find-header-id-depth","header-parent-selector","scroll-offset","scroll-element"]}connectedCallback(){super.connectedCallback(),this.init(Br.observedAttributes)}getIdFromElementOrParent(t,s=1){return t.id?t.id:s<=this.scope.findHeaderIdDepth&&t.parentElement?this.getIdFromElementOrParent(t.parentElement,++s):null}pushHeaders(t,s,n,r){t.querySelectorAll("h"+s).forEach(l=>{const c=this.getIdFromElementOrParent(l);c&&(r.push({element:l,href:"#"+c,title:l.innerHTML,childs:[]}),l.parentElement&&n>=s+1&&this.pushHeaders(l.parentElement,s+1,n,r[r.length-1].childs))})}async afterBind(){if(this.scope.headerParentSelector&&this.scope.headersStart&&this.scope.headersDepth){if(this.wrapperElement=document.querySelector(this.scope.headerParentSelector)||void 0,this.scope.anchors=[],!this.wrapperElement){console.error("No wrapper element found!");return}this.pushHeaders(this.wrapperElement,this.scope.headersStart,this.scope.headersDepth,this.scope.anchors)}await super.afterBind()}requiredAttributes(){return["headersStart","headersDepth","headerParentSelector"]}async attributeChangedCallback(t,s,n,r){super.attributeChangedCallback(t,s,n,r)}disconnectedCallback(){super.disconnectedCallback(),this.scope.anchors=[]}async template(){if(K(this))return null;{const{default:t}=await Cs(()=>import("./bs5-contents.component-9014ea28.chunk.js"),[]);return t}}};let os=Br;o(os,"tagName","bs5-contents");const Hr=class extends P{constructor(){super();o(this,"_debug",!1);o(this,"autobind",!0);o(this,"formEl",null);o(this,"scope",this.getDefaultScope());this.enableSubmit=this.enableSubmit.bind(this)}static get observedAttributes(){return["id","disable-submit-until-change","use-ajax","ajax-request-type","auto-set-form-data","strip-html","scroll-invalid-element","animate-invalid-element"]}getDefaultScope(){return{id:La("form"),form:{fields:{},valid:!1,error:void 0},disableSubmitUntilChange:!1,submitDisabled:!1,onSubmit:this.onSubmit,useAjax:!0,ajaxRequestType:"form",autoSetFormData:!0,stripHtml:!0,scrollToInvalidElement:!0,animateInvalidElement:!0}}connectedCallback(){super.connectedCallback(),this.init(Hr.observedAttributes),this.addEventListeners()}addEventListeners(){this.scope.disableSubmitUntilChange&&this.addEventListener("input",this.enableSubmit)}removeEventListeners(){this.removeEventListener("input",this.enableSubmit)}enableSubmit(){this.scope.submitDisabled=!1}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.id=this.scope.id}async afterBind(){await super.afterBind()}stripHtml(){for(const t in this.scope.form.fields)this.scope.form.fields[t]&&typeof this.scope.form.fields[t]=="string"&&(this.scope.form.fields[t]=Ai(this.scope.form.fields[t]))}onSubmit(t,s){if(this.debug("onSubmit",t,s),!this.formEl)return console.warn("No form found"),!1;if(this.scope.autoSetFormData&&this.getFormValues(),this.scope.stripHtml&&this.stripHtml(),this.validate(this.formEl,this.scope.form),!this.scope.form.valid){this.onInvalidForm(t);return}const n=this.getSubmitSettings(t);if((n==null?void 0:n.target)==="_blank")return!0;this.scope.useAjax&&(t.preventDefault(),t.stopPropagation(),this.ajaxSubmit(t,s))}async ajaxSubmit(t,s){this.debug("onSubmit",t,s,this.scope);const n=this.getSubmitSettings(t);if(!n){console.warn("Can't get submit settings");return}this.scope.autoSetFormData&&this.getFormValues();try{const r=await je.fetch(n.action,n.method,this.scope.form.fields,n.type);if(!r||!r.body)return this.onErrorSubmit("500","Error","Empty body!");const a=r.body&&r.body.message?r.body.message:"";return Number(r.status)>=400&&this.onErrorSubmit(r.status.toString(),a,r.body),this.onSuccessSubmit(r.status.toString(),a,r.body)}catch(r){if(r.status&&r.body)this.onErrorSubmit(r.status,r.body.message,r.body);else throw this.error}}getSubmitSettings(t){var l,c;if(!this.formEl)return console.warn("No form found"),null;let s=this.formEl.action,n=this.formEl.method,r=this.formEl.method;if((l=t==null?void 0:t.originalEvent)!=null&&l.submitter){const h=(c=t==null?void 0:t.originalEvent)==null?void 0:c.submitter;s=(h==null?void 0:h.formAction)||s,n=(h==null?void 0:h.formMethod)||n,r=(h==null?void 0:h.formTarget)||r}return{action:s,method:n.toUpperCase(),target:r,type:this.scope.ajaxRequestType}}onInvalidForm(t){if(this.debug("Form not valid",this.scope),t.preventDefault(),t.stopPropagation(),!this.formEl){console.warn("No form found");return}const s=this.formEl.querySelectorAll(":invalid");if(s&&s.length){const n=s[0];this.scope.scrollToInvalidElement&&this.scrollToElement(n),this.scope.animateInvalidElement&&this.scrollToElement(n)}this.dispatchEvent(new CustomEvent("invalid",{detail:{elements:s}}))}scrollToElement(t){const n=rr().h/2;Ue(t,n,window),this.animateInvalidElement(t)}animateInvalidElement(t,s=3e3){t.classList.add("invalid-flashing-animation"),setTimeout(()=>{t.classList.remove("invalid-flashing-animation")},s)}onErrorSubmit(t,s,n){this.debug("onErrorSubmit"),this.dispatchEvent(new CustomEvent("submit-error",{detail:{status:t,message:s,response:n}}))}onSuccessSubmit(t,s,n){this.debug("onSuccessSubmit"),this.scope.disableSubmitUntilChange&&(this.scope.submitDisabled=!0),this.dispatchEvent(new CustomEvent("submit-success",{detail:{status:t,message:s,response:n}}))}validate(t,s,n="validation-error"){s.valid=t.checkValidity(),s.error=t.validationMessage,s.valid||(this.dispatchEvent(new CustomEvent(n)),t.classList.add("was-validated"))}getFormValues(){return this.formEl?(this.scope.form.fields=new FormData(this.formEl),this.scope.form.fields):(console.warn("No form found"),null)}initForm(){const t=this.querySelector("form");t&&t.length>0?(this.formEl=t,this.formEl.classList.add("needs-validation"),this.formEl.setAttribute("novalidate","")):console.warn("bs5 form without children found")}async template(){if(K(this))return this.initForm(),null;{const{default:t}=await Cs(()=>import("./bs5-form.component-56e21618.chunk.js"),[]);return t}}};let ni=Hr;o(ni,"tagName","bs5-form");const hs=class extends or{constructor(){super();o(this,"scope",{})}static get observedAttributes(){return["size","width","height","src","color","direction","alt"]}getSvg(){return this.querySelector("svg")}async fetchCached(t){let s=hs.cache.get(t);return s||(s=je.get(t),s&&hs.cache.set(t,s),s)}async fetchIcon(t){var n;let s;if(window!=null&&window.ssr&&!t.startsWith("http")&&!t.startsWith("ftp")&&!t.startsWith("sftp")){let r;if(window.ssr.env.NEST_INTERN_URL)r=new URL(t,window.ssr.env.NEST_INTERN_URL);else if(window.ssr.ctx)r=new URL(t,window.ssr.ctx.protocol+"://"+window.ssr.ctx.hostname);else throw new Error("Host for SSR not found!");s=await this.fetchCached(r.href)}else s=await this.fetchCached(t);return s.status!==200?(console.error(s.status),""):(n=s.headers.get("content-type"))!=null&&n.includes("image/svg+xml")?s.body:(console.error("[bs5-icon] Only SVG's are supported! But content-type is "+s.headers.get("content-type")),"")}getBasename(t){const s=yt(t).pathname.split("/");return s==null?void 0:s[s.length-1]}getAlternativeText(t){var n;return(n=this.getBasename(t).split(".")[0])==null?void 0:n.replaceAll("_"," ")}async onSrcChanged(){let t="";if(!this.scope.src){this.innerHTML="";return}const s=this.getAlternativeText(this.scope.src);s&&this.setAttribute("alt",s);const n=this.getSvg();if((n?n.getAttribute("src"):"")===this.scope.src)return;try{t=await this.fetchIcon(this.scope.src)}catch(l){console.warn(`Error on fetch icon "${this.scope.src}"! Try to switch the protocol...`,l),this.scope.src.startsWith("//")&&(this.scope.src=location.protocol+this.scope.src);const c=new URL(this.scope.src);c.protocol==="http:"?c.protocol="https:":c.protocol="http:";try{t=await this.fetchIcon(c.href)}catch(h){console.error(`Error on fetch icon "${this.scope.src}"!`,l,h);return}}if(!t){console.error(`Error on fetch icon "${this.scope.src}"!`);return}this.innerHTML=t;const a=this.getSvg();a&&a.setAttribute("src",this.scope.src)}removeColor(){this.className=this.className.replace(/(^|\s)color-\S+/g,""),this.style.color=""}setColor(t){if(!t)return this.removeColor();if(t.includes(",")){const s=t.split(",");if(s.length>0){this.className=this.className.replace(/(^|\s)color-\S+/g,"");for(let n=0;n -`,Ur=class extends P{constructor(){super();o(this,"_debug",!1);o(this,"autobind",!0);o(this,"modalService");o(this,"scope",{onHidden:this.onHidden.bind(this),index:-1,dismiss:this.dismiss.bind(this)})}static get observedAttributes(){return["modal","index"]}requiredAttributes(){return["modal"]}connectedCallback(){super.connectedCallback(),this.init(Ur.observedAttributes)}async afterBind(){this.initModal(),await super.afterBind()}initModal(){const t=this.scope.modal,s=this.firstElementChild;t&&s&&(this.modalService=new M(s,{focus:t.focus!==void 0?t.focus:!0,keyboard:t.keyboard!==void 0?t.keyboard:!0,backdrop:t.backdrop!==void 0?t.backdrop:!0}),s.addEventListener(M.EVENT_HIDDEN,this.scope.onHidden,{once:!0}),this.modalService.show())}dismiss(){var t;(t=this.modalService)==null||t.hide()}onHidden(t,s){var r;s||(s=Ui(t));const n=((r=this.scope.$parent)==null?void 0:r.$parent)||null;typeof(n==null?void 0:n.onItemHide)=="function"&&this.scope.modal&&s&&n.onItemHide(t,s,this.scope.index,this.scope.modal)}async template(){return $b}};let oi=Ur;o(oi,"tagName","bs5-modal-item");const jr=class extends P{constructor(){super();o(this,"scope",{toggle:this.toggle,show:this.show,hide:this.hide,isCollapsed:!0,collapseSelector:".navbar-collapse"});o(this,"collapseTargets",new Map);o(this,"routerEvents");this.onStateChange=this.onStateChange.bind(this)}static get observedAttributes(){return["collapse-selector"]}async afterBind(){this.hide(),await super.afterBind()}toggle(t){for(const s of this.collapseTargets.values())s.toggle();t&&(t.preventDefault(),t.stopPropagation())}show(t){for(const s of this.collapseTargets.values())s.show();t&&(t.preventDefault(),t.stopPropagation())}hide(t){for(const s of this.collapseTargets.values())s.hide();t&&(t.preventDefault(),t.stopPropagation())}connectedCallback(){super.connectedCallback(),this.routerEvents=new D("main"),this.routerEvents.on("newPageReady",this.onNewPageReady,this),this.setCollapseElement(),this.onStateChange(),this.init(jr.observedAttributes)}setCollapseElement(){const t=Array.from(this.querySelectorAll(this.scope.collapseSelector)||[]);for(const s of this.collapseTargets.keys())t.find(n=>n===s)||this.disposeCollapseTarget(s);for(const s of t)this.collapseTargets.has(s)||(this.collapseTargets.set(s,new B(s,{toggle:!1})),s.addEventListener(B.Events.shown,this.onStateChange),s.addEventListener(B.Events.hidden,this.onStateChange));this.hide()}disposeCollapseTargets(){for(const t of this.collapseTargets.keys())this.disposeCollapseTarget(t)}disposeCollapseTarget(t){const s=this.collapseTargets.get(t);s&&s.dispose(),this.collapseTargets.delete(t),t.removeEventListener(B.Events.shown,this.onStateChange),t.removeEventListener(B.Events.hidden,this.onStateChange)}disconnectedCallback(){super.disconnectedCallback(),this.disposeCollapseTargets(),this.routerEvents&&this.routerEvents.off("newPageReady",this.onNewPageReady,this)}onStateChange(){var t;this.scope.isCollapsed=(t=this.collapseTargets.values().next().value)==null?void 0:t.isCollapsed(),this.scope.isCollapsed?(this.classList.add(B.CLASS_NAME_COLLAPSED),this.setAttribute("aria-expanded","false")):(this.classList.remove(B.CLASS_NAME_COLLAPSED),this.setAttribute("aria-expanded","true"))}onNewPageReady(){this.hide()}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r),t==="collapseSelector"&&this.setCollapseElement()}template(){return null}};let ai=jr;o(ai,"tagName","bs5-navbar");const Rb=`
+
`,Fr=class extends P{constructor(){super();o(this,"_debug",!1);o(this,"autobind",!0);o(this,"modalService");o(this,"scope",{onHidden:this.onHidden.bind(this),index:-1,dismiss:this.dismiss.bind(this)})}static get observedAttributes(){return["modal","index"]}requiredAttributes(){return["modal"]}connectedCallback(){super.connectedCallback(),this.init(Fr.observedAttributes)}async afterBind(){this.initModal(),await super.afterBind()}initModal(){const t=this.scope.modal,s=this.firstElementChild;t&&s&&(this.modalService=new M(s,{focus:t.focus!==void 0?t.focus:!0,keyboard:t.keyboard!==void 0?t.keyboard:!0,backdrop:t.backdrop!==void 0?t.backdrop:!0}),s.addEventListener(M.EVENT_HIDDEN,this.scope.onHidden,{once:!0}),this.modalService.show())}dismiss(){var t;(t=this.modalService)==null||t.hide()}onHidden(t,s){var r;s||(s=Ui(t));const n=((r=this.scope.$parent)==null?void 0:r.$parent)||null;typeof(n==null?void 0:n.onItemHide)=="function"&&this.scope.modal&&s&&n.onItemHide(t,s,this.scope.index,this.scope.modal)}async template(){return Pb}};let ri=Fr;o(ri,"tagName","bs5-modal-item");const Vr=class extends P{constructor(){super();o(this,"scope",{toggle:this.toggle,show:this.show,hide:this.hide,isCollapsed:!0,collapseSelector:".navbar-collapse"});o(this,"collapseTargets",new Map);o(this,"routerEvents");this.onStateChange=this.onStateChange.bind(this)}static get observedAttributes(){return["collapse-selector"]}async afterBind(){this.hide(),await super.afterBind()}toggle(t){for(const s of this.collapseTargets.values())s.toggle();t&&(t.preventDefault(),t.stopPropagation())}show(t){for(const s of this.collapseTargets.values())s.show();t&&(t.preventDefault(),t.stopPropagation())}hide(t){for(const s of this.collapseTargets.values())s.hide();t&&(t.preventDefault(),t.stopPropagation())}connectedCallback(){super.connectedCallback(),this.routerEvents=new D("main"),this.routerEvents.on("newPageReady",this.onNewPageReady,this),this.setCollapseElement(),this.onStateChange(),this.init(Vr.observedAttributes)}setCollapseElement(){const t=Array.from(this.querySelectorAll(this.scope.collapseSelector)||[]);for(const s of this.collapseTargets.keys())t.find(n=>n===s)||this.disposeCollapseTarget(s);for(const s of t)this.collapseTargets.has(s)||(this.collapseTargets.set(s,new B(s,{toggle:!1})),s.addEventListener(B.Events.shown,this.onStateChange),s.addEventListener(B.Events.hidden,this.onStateChange));this.hide()}disposeCollapseTargets(){for(const t of this.collapseTargets.keys())this.disposeCollapseTarget(t)}disposeCollapseTarget(t){const s=this.collapseTargets.get(t);s&&s.dispose(),this.collapseTargets.delete(t),t.removeEventListener(B.Events.shown,this.onStateChange),t.removeEventListener(B.Events.hidden,this.onStateChange)}disconnectedCallback(){super.disconnectedCallback(),this.disposeCollapseTargets(),this.routerEvents&&this.routerEvents.off("newPageReady",this.onNewPageReady,this)}onStateChange(){var t;this.scope.isCollapsed=(t=this.collapseTargets.values().next().value)==null?void 0:t.isCollapsed(),this.scope.isCollapsed?(this.classList.add(B.CLASS_NAME_COLLAPSED),this.setAttribute("aria-expanded","false")):(this.classList.remove(B.CLASS_NAME_COLLAPSED),this.setAttribute("aria-expanded","true"))}onNewPageReady(){this.hide()}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r),t==="collapseSelector"&&this.setCollapseElement()}template(){return null}};let oi=Vr;o(oi,"tagName","bs5-navbar");const Mb=`
@@ -40,7 +40,7 @@ index: ${l}
-
`,Wr=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"_debug",!1);o(this,"notificationDispatcher");o(this,"scope",{notifications:[],positionClass:"absolute-bottom absolute-center",channelName:"toast",onItemHide:this.onItemHide})}static get observedAttributes(){return["icon-url","position-class","channel-name"]}connectedCallback(){super.connectedCallback(),this.init(Wr.observedAttributes)}onItemHide(t,s,n,r){n>-1?this.notifications.splice(n,1):console.warn("Notification not found",r)}onShowNotification(t){this.debug("Received notification container on "+this.scope.channelName,this.scope,t),this.scope.notifications.push(t)}async afterBind(){this.notificationDispatcher=new D(this.scope.channelName),this.notificationDispatcher.on("show-notification",this.onShowNotification,this),await super.afterBind()}disconnectedCallback(){super.disconnectedCallback(),this.notificationDispatcher.off("show-notification",this.onShowNotification,this)}requiredAttributes(){return[]}async template(){return K(this)?null:Rb}};let li=Wr;o(li,"tagName","bs5-notification-container");const zr=class extends as{constructor(){super();o(this,"autobind",!0);o(this,"scope",{headersDepth:1,headersStart:2,findHeaderIdDepth:1,headerParentSelector:void 0,offset:0,offsetBottom:0,scrollOffset:0,anchors:[]})}static get observedAttributes(){return["headers-start","headers-depth","find-header-id-depth","header-parent-selector","offset","offset-bottom","scroll-offset"]}connectedCallback(){super.connectedCallback(),this.init(zr.observedAttributes)}requiredAttributes(){return["headersStart","headersDepth","headerParentSelector"]}async template(){if(K(this))return null;{const{default:t}=await Ls(()=>import("./bs5-scrollspy.component-1b82c9f2.chunk.js"),[]);return t}}};let ci=zr;o(ci,"tagName","bs5-scrollspy");const Bb=`
+
`,Ur=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"_debug",!1);o(this,"notificationDispatcher");o(this,"scope",{notifications:[],positionClass:"absolute-bottom absolute-center",channelName:"toast",onItemHide:this.onItemHide})}static get observedAttributes(){return["icon-url","position-class","channel-name"]}connectedCallback(){super.connectedCallback(),this.init(Ur.observedAttributes)}onItemHide(t,s,n,r){n>-1?this.notifications.splice(n,1):console.warn("Notification not found",r)}onShowNotification(t){this.debug("Received notification container on "+this.scope.channelName,this.scope,t),this.scope.notifications.push(t)}async afterBind(){this.notificationDispatcher=new D(this.scope.channelName),this.notificationDispatcher.on("show-notification",this.onShowNotification,this),await super.afterBind()}disconnectedCallback(){super.disconnectedCallback(),this.notificationDispatcher.off("show-notification",this.onShowNotification,this)}requiredAttributes(){return[]}async template(){return K(this)?null:Mb}};let ai=Ur;o(ai,"tagName","bs5-notification-container");const jr=class extends os{constructor(){super();o(this,"autobind",!0);o(this,"scope",{headersDepth:1,headersStart:2,findHeaderIdDepth:1,headerParentSelector:void 0,offset:0,offsetBottom:0,scrollOffset:0,anchors:[]})}static get observedAttributes(){return["headers-start","headers-depth","find-header-id-depth","header-parent-selector","offset","offset-bottom","scroll-offset"]}connectedCallback(){super.connectedCallback(),this.init(jr.observedAttributes)}requiredAttributes(){return["headersStart","headersDepth","headerParentSelector"]}async template(){if(K(this))return null;{const{default:t}=await Cs(()=>import("./bs5-scrollspy.component-1b82c9f2.chunk.js"),[]);return t}}};let li=jr;o(li,"tagName","bs5-scrollspy");const $b=`
-
`,Hb=` -`,us=class extends P{constructor(){super();o(this,"_debug",!1);o(this,"dropdown");o(this,"scope");this.scope=this.getScopeDefaults(),us.count++,this.onExternalOpenEvent=this.onExternalOpenEvent.bind(this),this.onExternalCloseEvent=this.onExternalCloseEvent.bind(this)}static get observedAttributes(){return["type","title","text","url","media-url","filename","label","dropdown-direction","dropdown-alignment","label-facebook","label-twitter","label-pinterest","label-whatsapp","label-telegram","label-email","label-download","label-clipboard"]}getFilename(t){return t.filename?t.filename:this.getMediaUrlForShare().split("/").pop()}getDefaultShareServices(){const t="%0A";return[{id:"facebook",label:this.scope.labelFacebook,urlTemplate:"https://www.facebook.com/sharer/sharer.php?u={{url}}",mediaUrlTemplate:"https://www.facebook.com/sharer/sharer.php?u={{media_url}}",type:"popup",url:"",availableFor:["page","image","video"]},{id:"twitter",label:this.scope.labelTwitter,urlTemplate:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}",mediaUrlTemplate:`https://twitter.com/intent/tweet?text={{text}}&url={{media_url}}${t}({{url}})`,url:"",availableFor:["page","image","video"]},{id:"pinterest",label:this.scope.labelPinterest,urlTemplate:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{media_url}}&description={{text}}",type:"popup",url:"",availableFor:["image","video"]},{id:"whatsapp",label:this.scope.labelWhatsapp,urlTemplate:`https://api.whatsapp.com/send?text={{text}}${t}${t}{{url}}`,mediaUrlTemplate:`https://api.whatsapp.com/send?text={{text}}${t}${t}{{media_url}}${t}({{url}})`,type:"popup",url:"",availableFor:["page","image","video"]},{id:"telegram",label:this.scope.labelTelegram,urlTemplate:"https://telegram.me/share/url?url={{url}}&text={{text}}",mediaUrlTemplate:`https://telegram.me/share/url?url={{media_url}}&text={{text}}${t}({{url}})`,type:"popup",url:"",availableFor:["page","image","video"]},{id:"email",label:this.scope.labelEmail,urlTemplate:`mailto:?subject={{title}}&body={{text}}${t}${t}{{url}}`,mediaUrlTemplate:`mailto:?subject={{title}}&body={{text}}${t}${t}{{media_url}}${t}({{url}})`,type:"href",url:"",availableFor:["page","image","video"]},{id:"download",label:this.scope.labelDownload,urlTemplate:"{{raw_media_url}}",type:"download",url:"",availableFor:["image","video"],filename:this.scope.filename},{id:"clipboard",label:this.scope.labelClipboard,urlTemplate:"{{url}}",mediaUrlTemplate:"{{media_url}}",type:"clipboard",url:"",availableFor:["page","image","video"]}]}isIos(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)!==null}isAndroid(){return navigator.userAgent.match(/Android/i)!==null}browserSupportsNativeShare(){return typeof navigator.share=="function"}getScopeDefaults(){const t={type:"page",title:document.title,text:"Look at this! 👀🤩",url:void 0,label:"Share",labelTemplate:Hb,isAndroid:this.isAndroid(),isIos:this.isIos(),isDesktop:!1,isNative:this.browserSupportsNativeShare(),dropdownId:"dropdownShare"+us.count,shareItems:[],dropdownDirection:"down",dropdownAlignment:"auto",labelFacebook:"Facebook",labelTwitter:"Twitter",labelPinterest:"Pinterest",labelWhatsapp:"Whatsapp",labelTelegram:"Telegram",labelEmail:"Email",labelDownload:"Download",labelClipboard:"Copy to clipboard",share:this.share,shareOnService:this.shareOnService,getFilename:this.getFilename};return t.isDesktop=!t.isIos&&!t.isAndroid,t}onExternalOpenEvent(){var t;(t=this.dropdown)==null||t.show()}onExternalCloseEvent(){var t;(t=this.dropdown)==null||t.hide()}connectedCallback(){super.connectedCallback(),this.init(us.observedAttributes),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener("open",this.onExternalOpenEvent),this.addEventListener("btn-close",this.onExternalCloseEvent)}removeEventListeners(){this.removeEventListener("open",this.onExternalOpenEvent),this.removeEventListener("btn-close",this.onExternalOpenEvent)}getURLForShare(){return this.scope.type==="page"&&this.scope.url?Ci(this.scope.url):window.location.href}getMediaUrlForShare(){return this.scope.type!=="page"&&this.scope.url?Ci(this.scope.url):""}getTextForShare(){return Ti(this.scope.text)}getTitleForShare(){return Ti(this.scope.title)}updateShareURLs(){for(const t of this.scope.shareItems){const s=this.getURLForShare(),n=this.getMediaUrlForShare(),r=this.getTextForShare(),a=this.getTitleForShare();let l=t.urlTemplate;this.scope.type!=="page"&&t.mediaUrlTemplate&&(l=t.mediaUrlTemplate);const c=t.type!=="clipboard",h=l.replace("{{url}}",c?encodeURIComponent(s):s).replace("{{media_url}}",c?encodeURIComponent(n):n).replace("{{raw_media_url}}",n).replace("{{text}}",c?encodeURIComponent(r):r).replace("{{title}}",c?encodeURIComponent(a):a);t.available=t.availableFor.includes(this.scope.type),t.url=h}}initDropdown(){const t=this.querySelector(".dropdown-toggle-share");if(!t){console.warn('Element with selector ".dropdown-toggle-share" not found!',this);return}this.dropdown=new T(t)}async shareOnService(t,s){var n;return(n=this.dropdown)==null||n.hide(),t.type==="clipboard"?(s.preventDefault(),s.stopPropagation(),await sd(t.url),!1):t.type==="download"?!0:(s.preventDefault(),s.stopPropagation(),window.open(t.url,"Share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),!1)}async share(t){var s;if(this.debug("share",this.scope),t.preventDefault(),t.stopPropagation(),this.scope.isNative&&!this.scope.isDesktop)try{await navigator.share({title:this.scope.title,text:`${this.scope.text}\r +
`,Rb=` +`,ds=class extends P{constructor(){super();o(this,"_debug",!1);o(this,"dropdown");o(this,"scope");this.scope=this.getScopeDefaults(),ds.count++,this.onExternalOpenEvent=this.onExternalOpenEvent.bind(this),this.onExternalCloseEvent=this.onExternalCloseEvent.bind(this)}static get observedAttributes(){return["type","title","text","url","media-url","filename","label","dropdown-direction","dropdown-alignment","label-facebook","label-twitter","label-pinterest","label-whatsapp","label-telegram","label-email","label-download","label-clipboard"]}getFilename(t){return t.filename?t.filename:this.getMediaUrlForShare().split("/").pop()}getDefaultShareServices(){const t="%0A";return[{id:"facebook",label:this.scope.labelFacebook,urlTemplate:"https://www.facebook.com/sharer/sharer.php?u={{url}}",mediaUrlTemplate:"https://www.facebook.com/sharer/sharer.php?u={{media_url}}",type:"popup",url:"",availableFor:["page","image","video"]},{id:"twitter",label:this.scope.labelTwitter,urlTemplate:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}",mediaUrlTemplate:`https://twitter.com/intent/tweet?text={{text}}&url={{media_url}}${t}({{url}})`,url:"",availableFor:["page","image","video"]},{id:"pinterest",label:this.scope.labelPinterest,urlTemplate:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{media_url}}&description={{text}}",type:"popup",url:"",availableFor:["image","video"]},{id:"whatsapp",label:this.scope.labelWhatsapp,urlTemplate:`https://api.whatsapp.com/send?text={{text}}${t}${t}{{url}}`,mediaUrlTemplate:`https://api.whatsapp.com/send?text={{text}}${t}${t}{{media_url}}${t}({{url}})`,type:"popup",url:"",availableFor:["page","image","video"]},{id:"telegram",label:this.scope.labelTelegram,urlTemplate:"https://telegram.me/share/url?url={{url}}&text={{text}}",mediaUrlTemplate:`https://telegram.me/share/url?url={{media_url}}&text={{text}}${t}({{url}})`,type:"popup",url:"",availableFor:["page","image","video"]},{id:"email",label:this.scope.labelEmail,urlTemplate:`mailto:?subject={{title}}&body={{text}}${t}${t}{{url}}`,mediaUrlTemplate:`mailto:?subject={{title}}&body={{text}}${t}${t}{{media_url}}${t}({{url}})`,type:"href",url:"",availableFor:["page","image","video"]},{id:"download",label:this.scope.labelDownload,urlTemplate:"{{raw_media_url}}",type:"download",url:"",availableFor:["image","video"],filename:this.scope.filename},{id:"clipboard",label:this.scope.labelClipboard,urlTemplate:"{{url}}",mediaUrlTemplate:"{{media_url}}",type:"clipboard",url:"",availableFor:["page","image","video"]}]}isIos(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)!==null}isAndroid(){return navigator.userAgent.match(/Android/i)!==null}browserSupportsNativeShare(){return typeof navigator.share=="function"}getScopeDefaults(){const t={type:"page",title:document.title,text:"Look at this! 👀🤩",url:void 0,label:"Share",labelTemplate:Rb,isAndroid:this.isAndroid(),isIos:this.isIos(),isDesktop:!1,isNative:this.browserSupportsNativeShare(),dropdownId:"dropdownShare"+ds.count,shareItems:[],dropdownDirection:"down",dropdownAlignment:"auto",labelFacebook:"Facebook",labelTwitter:"Twitter",labelPinterest:"Pinterest",labelWhatsapp:"Whatsapp",labelTelegram:"Telegram",labelEmail:"Email",labelDownload:"Download",labelClipboard:"Copy to clipboard",share:this.share,shareOnService:this.shareOnService,getFilename:this.getFilename};return t.isDesktop=!t.isIos&&!t.isAndroid,t}onExternalOpenEvent(){var t;(t=this.dropdown)==null||t.show()}onExternalCloseEvent(){var t;(t=this.dropdown)==null||t.hide()}connectedCallback(){super.connectedCallback(),this.init(ds.observedAttributes),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener("open",this.onExternalOpenEvent),this.addEventListener("btn-close",this.onExternalCloseEvent)}removeEventListeners(){this.removeEventListener("open",this.onExternalOpenEvent),this.removeEventListener("btn-close",this.onExternalOpenEvent)}getURLForShare(){return this.scope.type==="page"&&this.scope.url?Ti(this.scope.url):window.location.href}getMediaUrlForShare(){return this.scope.type!=="page"&&this.scope.url?Ti(this.scope.url):""}getTextForShare(){return Ai(this.scope.text)}getTitleForShare(){return Ai(this.scope.title)}updateShareURLs(){for(const t of this.scope.shareItems){const s=this.getURLForShare(),n=this.getMediaUrlForShare(),r=this.getTextForShare(),a=this.getTitleForShare();let l=t.urlTemplate;this.scope.type!=="page"&&t.mediaUrlTemplate&&(l=t.mediaUrlTemplate);const c=t.type!=="clipboard",h=l.replace("{{url}}",c?encodeURIComponent(s):s).replace("{{media_url}}",c?encodeURIComponent(n):n).replace("{{raw_media_url}}",n).replace("{{text}}",c?encodeURIComponent(r):r).replace("{{title}}",c?encodeURIComponent(a):a);t.available=t.availableFor.includes(this.scope.type),t.url=h}}initDropdown(){const t=this.querySelector(".dropdown-toggle-share");if(!t){console.warn('Element with selector ".dropdown-toggle-share" not found!',this);return}this.dropdown=new T(t)}async shareOnService(t,s){var n;return(n=this.dropdown)==null||n.hide(),t.type==="clipboard"?(s.preventDefault(),s.stopPropagation(),await td(t.url),!1):t.type==="download"?!0:(s.preventDefault(),s.stopPropagation(),window.open(t.url,"Share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),!1)}async share(t){var s;if(this.debug("share",this.scope),t.preventDefault(),t.stopPropagation(),this.scope.isNative&&!this.scope.isDesktop)try{await navigator.share({title:this.scope.title,text:`${this.scope.text}\r \r -`,url:this.scope.url||window.location.href})}catch(n){if(n.name==="AbortError")return;console.error(`Error ${n.name}: ${n.message}`,n)}else return this.updateShareURLs(),(s=this.dropdown)==null?void 0:s.toggle()}async beforeBind(){await super.beforeBind()}async afterBind(){this.initDropdown(),this.debug("afterBind",this.scope),this.scope.shareItems=this.getDefaultShareServices(),await super.afterBind()}requiredAttributes(){return[]}template(){return this&&K(this)&&(this.scope.labelTemplate=this.innerHTML),Bb}};let ts=us;o(ts,"tagName","bs5-share"),o(ts,"count",0);const Ct=i=>{const e=i,t=i;return e.document&&e.location?{x:e.pageXOffset,y:e.pageYOffset,maxX:document.documentElement.scrollWidth-document.documentElement.clientWidth,maxY:document.documentElement.scrollHeight-document.documentElement.clientHeight}:{x:t.scrollLeft,y:t.scrollTop,maxX:t.scrollWidth-t.clientWidth,maxY:t.scrollHeight-t.clientHeight}},Fb=i=>{const e=Ct(i);return e.maxX>0||e.maxY>0},qr=class{static getFps(){return this.fps}static startLoop(e={}){this.setOptions(e),this.loopStarted||(this.loopStarted=!0,window.requestAnimationFrame(this.loop.bind(this)))}static setOptions(e){this.maxFPS=typeof e.maxFPS=="number"?e.maxFPS:this.maxFPS}static loop(e){if(ethis.lastFpsUpdate+1e3&&(this.fps=.25*this.framesThisSecond+.75*this.fps,this.lastFpsUpdate=e,this.framesThisSecond=0),this.framesThisSecond++;let s=0;for(;this.delta>=this.timestep;)if(this.update(this.timestep),this.delta-=this.timestep,++s>=240){this.panic();break}this.render(this.delta/this.timestep),this.end(this.fps),this.frameID=window.requestAnimationFrame(this.loop.bind(this))}static begin(e,t){this.events.trigger("begin",e,t)}static render(e){this.events.trigger("render",e)}static update(e){this.events.trigger("update",e)}static end(e){this.events.trigger("end",e)}static panic(){this.delta=0}constructor(e={}){qr.setOptions(e)}};let W=qr;o(W,"events",new D("gameloop")),o(W,"maxFPS",60),o(W,"fps",60),o(W,"timestep",1e3/60),o(W,"loopStarted",!1),o(W,"lastFrameTimeMs",0),o(W,"delta",0),o(W,"framesThisSecond",0),o(W,"lastFpsUpdate",0),o(W,"frameID",0);class Vb{constructor(e,t={}){o(this,"touchCapable","ontouchstart"in window);o(this,"direction",1);o(this,"limit");o(this,"options");o(this,"el");o(this,"_pause",!1);o(this,"velocity",.008);o(this,"move",0);o(this,"lastMove",0);o(this,"angle","horizontal");o(this,"pauseOnHover",!0);o(this,"resumeTimer",null);o(this,"onResize",Oe(this._onResize.bind(this)));o(this,"onScroll",Oe(this._onScroll.bind(this)));this.el=e,this.options=t,this.direction=this.options.direction||this.direction,this.velocity=this.options.velocity||this.velocity,this.angle=this.options.angle||this.angle,this.pauseOnHover=typeof this.options.pauseOnHover=="boolean"?this.options.pauseOnHover:this.pauseOnHover,this.limit=this.getLimit(this.el),this.move=this.getPosition(),this.direction===-1?this.el.scrollLeft=this.limit:this.el.scrollLeft=0,this.addEventListeners(),W.startLoop({maxFPS:60})}update(){this.limit=this.getLimit(this.el),this.setPosition()}destroy(){this.removeEventListeners()}pause(){this.el.style.scrollBehavior="",this._pause=!0}resume(e=0){this._pause&&(this.stopResumeTimeout(),this.resumeTimer=window.setTimeout(()=>{this.setPosition(),this._pause=!1,this.el.style.scrollBehavior="auto"},e))}addEventListeners(){this.removeEventListeners(),this.onResize=this.onResize.bind(this),this.onMouseIn=this.onMouseIn.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onScroll=this.onScroll.bind(this),this.render=this.render.bind(this),this.updateMove=this.updateMove.bind(this),window.addEventListener("resize",this.onResize,{passive:!0}),this.el.addEventListener("mouseenter",this.onMouseIn,{passive:!0}),this.el.addEventListener("mouseover",this.onMouseIn,{passive:!0}),this.el.addEventListener("focusin",this.onMouseIn,{passive:!0}),this.el.addEventListener("touchstart",this.onMouseIn,{passive:!0}),this.el.addEventListener("mouseleave",this.onMouseOut,{passive:!0}),this.el.addEventListener("focusout",this.onMouseOut,{passive:!0}),this.el.addEventListener("mouseup",this.onMouseUp,{passive:!0}),this.el.addEventListener("touchend",this.onMouseUp,{passive:!0}),this.touchCapable?(this.el.addEventListener("scroll",this.onMouseUp,{passive:!0}),this.el.addEventListener("scrollend",this.onMouseUp,{passive:!0}),this.el.addEventListener("scrollended",this.onMouseUp,{passive:!0})):(this.el.addEventListener("scroll",this.onScroll,{passive:!0}),this.el.addEventListener("scrollend",this.onScroll,{passive:!0}),this.el.addEventListener("scrollended",this.onScroll,{passive:!0})),W.events.on("render",this.render),W.events.on("update",this.updateMove)}removeEventListeners(){window.removeEventListener("resize",this.onResize),this.el.removeEventListener("mouseenter",this.onMouseIn),this.el.removeEventListener("mouseover",this.onMouseIn),this.el.removeEventListener("focusin",this.onMouseIn),this.el.removeEventListener("touchstart",this.onMouseIn),this.el.removeEventListener("mouseleave",this.onMouseOut),this.el.removeEventListener("focusout",this.onMouseOut),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("touchend",this.onMouseUp),this.touchCapable?(this.el.removeEventListener("scroll",this.onMouseUp),this.el.removeEventListener("scrollend",this.onMouseUp),this.el.removeEventListener("scrollended",this.onMouseUp)):(this.el.removeEventListener("scroll",this.onScroll),this.el.removeEventListener("scrollend",this.onScroll),this.el.removeEventListener("scrollended",this.onScroll)),W.events.off("render",this.render),W.events.off("update",this.updateMove)}onMouseIn(){this.pauseOnHover&&this.pause()}onMouseOut(){this.resume(200)}onMouseUp(){this.resume(1e3)}_onResize(){this.limit=this.getLimit(this.el),this.resume(200)}_onScroll(){this.stopResumeTimeout()}stopResumeTimeout(){this.resumeTimer!==null&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}getPosition(){return(this.angle==="vertical"?this.el.scrollTop:this.el.scrollLeft)||0}setPosition(){this.move=this.getPosition()}getLimit(e){return this.angle==="vertical"?Ct(e).maxY:Ct(e).maxX}render(){this._pause||this.scroll(this.move)}updateMove(e){if(this._pause)return;this.lastMove=this.move;const t=this.velocity*this.direction*e;this.move+=t,this.move<=0&&this.direction!==1&&(this.direction=1),this.move>=this.limit&&this.direction!==-1&&(this.direction=-1)}scroll(e){this.angle==="vertical"?this.el.scrollTop=e:this.el.scrollLeft=e}}class rh{constructor(e,t={detectGlobalMove:!0}){o(this,"options");o(this,"lastClientX",0);o(this,"lastClientY",0);o(this,"el");o(this,"pushed",!1);o(this,"touchCapable","ontouchstart"in window);o(this,"checkDraggable",Oe(this._checkDraggable.bind(this)));if(this.el=e,this.options=t,this.touchCapable)return this;this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.checkDraggable=this.checkDraggable.bind(this),e.removeEventListener("mousedown",this.onMouseDown),e.addEventListener("mousedown",this.onMouseDown,{passive:!0}),window.addEventListener("resize",this.checkDraggable),this.options.detectGlobalMove?(window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp,{passive:!0}),window.addEventListener("mousemove",this.onMouseMove,{passive:!0})):(e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mousemove",this.onMouseMove),e.addEventListener("mouseup",this.onMouseUp,{passive:!0}),e.addEventListener("mousemove",this.onMouseMove,{passive:!0})),this.checkDraggable()}destroy(){this.removeEventListeners(),this.el.classList.remove("draggable")}_checkDraggable(){Fb(this.el)?this.el.classList.add("draggable"):this.el.classList.remove("draggable")}onMouseDown(e){this.pushed=!0,this.lastClientX=e.clientX,this.lastClientY=e.clientY}onMouseUp(){this.pushed=!1}onMouseMove(e){let t=0,s=0;this.pushed&&(this.el.scrollLeft-=t=-this.lastClientX+(this.lastClientX=e.clientX),this.el.scrollTop-=s=-this.lastClientY+(this.lastClientY=e.clientY),this.el===document.body&&(document.documentElement&&(this.el=document.documentElement),this.el.scrollLeft-=t,this.el.scrollTop-=s))}removeEventListeners(){window.removeEventListener("resize",this.checkDraggable),this.el.removeEventListener("mousedown",this.onMouseDown),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("mousemove",this.onMouseMove)}}class oh{constructor(e){o(this,"touchCapable","ontouchstart"in window);o(this,"el");this.el=e}get isTouchCapable(){return this.touchCapable}triggerCustomEvent(e,t,s){s.originalEvent=t,s.target=t.target;const n=new CustomEvent(e,{detail:s});this.el.dispatchEvent(n)}}class ah extends oh{constructor(t,s={}){super(t);o(this,"isScrolling",!1);o(this,"_scrollEvent");o(this,"delay",300);o(this,"startPosition",null);o(this,"endPosition",null);o(this,"scrollTimer",null);o(this,"onScrollEvent",this._onScrollEvent.bind(this));o(this,"scroll",this._scroll.bind(this));this.el=t,this.delay=s.delay||this.delay,this.startPosition=Ct(this.el),this._scrollEvent=this.touchCapable?["touchmove","scrollend","scroll"]:["scroll","scrollend"],this.removeEventListeners(),this.addEventListeners()}destroy(){this.removeEventListeners()}get scrollEvent(){return this._scrollEvent}getScrollDir(t,s){return!t||!s?"unknown":t.x>s.x?"right":t.xs.y?"down":t.y{this.scrollended(t)},this.delay),!0):!1}scrollended(t){this.isScrolling=!1,this.endPosition=Ct(this.el);const s=this.getScrollDir(this.startPosition,this.endPosition);this.triggerCustomEvent("scrollended",t,{startPosition:this.startPosition,endPosition:this.endPosition,direction:s})}scrollstart(t){this.isScrolling=!0,this.startPosition=Ct(this.el),this.triggerCustomEvent("scrollstart",t,{startPosition:this.startPosition})}_scroll(t){const s=Ct(this.el),n=this.getScrollDir(this.startPosition,s);this.triggerCustomEvent("scroll"+n,t,{startPosition:this.startPosition,currentPosition:s,direction:n}),this.triggerCustomEvent("scrolling",t,{startPosition:this.startPosition,currentPosition:s,direction:n})}}var Gn=(i=>(i[i.HAVE_NOTHING=0]="HAVE_NOTHING",i[i.HAVE_METADATA=1]="HAVE_METADATA",i[i.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",i[i.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",i[i.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA",i))(Gn||{}),L=(i=>(i[i.DEFAULT=0]="DEFAULT",i[i.TARGET=1]="TARGET",i[i.CHANGED=2]="CHANGED",i))(L||{});class Ub extends oh{constructor(t,s={tapPixelRange:5,swipeHThreshold:50,swipeVThreshold:50,tapholdThreshold:750,doubletapInterval:500,shakeThreshold:15,touchCapable:"ontouchstart"in window,startevent:["touchstart"],endevent:["touchend"],moveevent:["touchmove"],tapevent:["tap"]}){super(t);o(this,"startPosition",{x:0,y:0});o(this,"endPosition",{x:0,y:0});o(this,"originalCoord",{x:0,y:0});o(this,"finalCoord",{x:0,y:0});o(this,"startEvnt",null);o(this,"tapheld",!1);o(this,"firstTap",null);o(this,"cooling",!1);o(this,"doubletapped",!1);o(this,"lastTouch",0);o(this,"hasSwiped",!1);o(this,"tapStarted",!1);o(this,"swipeStarted",!1);o(this,"startTime",0);o(this,"holdTimer",-1);o(this,"tapTimer",-1);o(this,"actionTimer",-1);o(this,"settings");this.el=t,s.startevent=s.touchCapable?["touchstart"]:["mousedown"],s.endevent=s.touchCapable?["touchend"]:["mouseup"],s.moveevent=s.touchCapable?["touchmove"]:["mousemove"],s.tapevent=s.touchCapable?["tap"]:["click"],this.settings=s,this.onStartEvent=this.onStartEvent.bind(this),this.onMoveEvent=this.onMoveEvent.bind(this),this.onEndEvent=this.onEndEvent.bind(this),this.addEventListeners()}get isTouchCapable(){return this.settings.touchCapable}get startEvent(){return this.settings.startevent}get endEvent(){return this.settings.endevent}get moveEvent(){return this.settings.moveevent}get tapEvent(){return this.settings.tapevent}set swipeThresholdX(t){if(typeof t!="number")throw new Error("Threshold parameter must be a type of number");this.settings.swipeHThreshold=t}set swipeThresholdY(t){if(typeof t!="number")throw new Error("Threshold parameter must be a type of number");this.settings.swipeVThreshold=t}set doubleTapInt(t){if(typeof t!="number")throw new Error("Interval parameter must be a type of number");this.settings.doubletapInterval=t}set tapHoldThreshold(t){if(typeof t!="number")throw new Error("Threshold parameter must be a type of number");this.settings.tapholdThreshold=t}set tapRange(t){if(typeof t!="number")throw new Error("Ranger parameter must be a type of number");this.settings.tapPixelRange=t}destroy(){this.removeEventListeners()}removeEventListeners(){for(const t of this.settings.startevent)this.el.removeEventListener(t,this.onStartEvent);for(const t of this.settings.moveevent)this.el.removeEventListener(t,this.onMoveEvent);for(const t of this.settings.endevent)this.el.removeEventListener(t,this.onEndEvent)}getSwipeDir(t,s,n=this.settings.swipeHThreshold,r=this.settings.swipeVThreshold){let a="";return t.y>s.y&&t.y-s.y>r&&(a="swipeup"),t.xn&&(a="swiperight"),t.yr&&(a="swipedown"),t.x>s.x&&t.x-s.x>n&&(a="swipeleft"),a}getPosition(t,s=L.DEFAULT,n=0){let r;switch(s){case L.CHANGED:r=t.changedTouches;break;case L.TARGET:r=t.targetTouches;break;default:r=t.touches;break}return{x:this.settings.touchCapable?r[n].pageX:t.pageX,y:this.settings.touchCapable?r[n].pageY:t.pageY}}getOffset(t,s=L.DEFAULT,n=0){const r=this.el.getBoundingClientRect();let a;switch(s){case L.CHANGED:a=t.changedTouches;break;case L.TARGET:a=t.targetTouches;break;default:a=t.touches;break}return{x:this.settings.touchCapable?Math.round(a[n].pageX-(r?r.left:0)):Math.round(t.pageX-(r?r.left:0)),y:this.settings.touchCapable?Math.round(a[n].pageY-(r?r.top:0)):Math.round(t.pageY-(r?r.top:0))}}getTouchData(t,s=!1,n=L.DEFAULT,r=L.CHANGED){const a={position:this.getPosition(t,n),offset:this.getOffset(t,r),time:Date.now()};return s&&(a.index=So(t.target)),a}addEventListeners(){for(const t of this.settings.startevent)this.el.addEventListener(t,this.onStartEvent,{passive:!0});for(const t of this.settings.moveevent)this.el.addEventListener(t,this.onMoveEvent,{passive:!0});for(const t of this.settings.endevent)this.el.addEventListener(t,this.onEndEvent,{passive:!0})}onStartEvent(t){return t.which&&t.which!==1?!1:(this.startPosition=this.getPosition(t,L.TARGET),this.endPosition={x:this.startPosition.x,y:this.startPosition.y},this.startTime=Date.now(),this.doubletapped=!1,this.firstTap||(this.firstTap=this.getTouchData(t,!0,L.DEFAULT,L.CHANGED)),this.tapStarted=!0,this.swipeStarted=!0,this.originalCoord=this.getPosition(t,L.TARGET),this.finalCoord=this.getPosition(t,L.TARGET),this.startEvnt=this.getTouchData(t,!1,L.DEFAULT,L.CHANGED),this.tapstart(t),this.taphold(t),!0)}onEndEvent(t){return this.endPosition=this.getPosition(t,L.CHANGED),this.tapheld=!1,window.clearTimeout(this.holdTimer),this.tapend(t),this.swipeend(t),this.tap(t),this.doubletap(t),this.singletap(t),this.tapStarted=!1,this.swipeStarted=!1,this.hasSwiped=!1,!0}onMoveEvent(t){return this.endPosition=this.getPosition(t,L.TARGET),this.finalCoord=this.getPosition(t,L.TARGET),this.tapmove(t),this.swipe(t),!0}tapstart(t){return this.triggerCustomEvent("tapstart",t,this.getTouchData(t,!1,L.DEFAULT,L.CHANGED)),!0}tapmove(t){return this.triggerCustomEvent("tapmove",t,this.getTouchData(t,!1,L.DEFAULT,L.CHANGED)),!0}tapend(t){return this.triggerCustomEvent("tapend",t,this.getTouchData(t,!1,L.CHANGED,L.CHANGED)),!0}taphold(t){return this.holdTimer=window.setTimeout(()=>{const s={x:this.startPosition.x-this.endPosition.x,y:this.startPosition.y-this.endPosition.y};if(this.startPosition.x===this.endPosition.x&&this.startPosition.y===this.endPosition.y||s.x>=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange){this.tapheld=!0;const r=Date.now()-this.startTime,a=t.targetTouches?t.targetTouches.length:1,l=new Array;for(let d=0;d1?"taphold"+a:"taphold",h={touches:l,time:Date.now(),duration:r};this.triggerCustomEvent(c,t,h)}},this.settings.tapholdThreshold),!0}doubletap(t){const s=Date.now(),n=Number(this.lastTouch)||s+1,r=s-n;if(this.actionTimer!==-1&&window.clearTimeout(this.actionTimer),r100&&this.firstTap&&So(t.target)===this.firstTap.index){this.doubletapped=!0,window.clearTimeout(this.tapTimer);const a=this.getTouchData(t,!0,L.CHANGED,L.CHANGED),l={firstTap:this.firstTap,secondTap:a,interval:a.time-this.firstTap.time};this.cooling||(this.triggerCustomEvent("doubletap",t,l),this.firstTap=null),this.cooling=!0,window.setTimeout(()=>{this.cooling=!1},this.settings.doubletapInterval)}else this.actionTimer=window.setTimeout(()=>{this.firstTap=null,window.clearTimeout(this.actionTimer)},this.settings.doubletapInterval,[t]);this.lastTouch=s}singletap(t){this.tapTimer=window.setTimeout(()=>{const s={x:this.startPosition.x-this.endPosition.x,y:this.startPosition.y-this.endPosition.y};if(!this.doubletapped&&!this.tapheld&&(this.startPosition.x===this.endPosition.x&&this.startPosition.y===this.endPosition.y||s.x>=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange)){const n=this.getTouchData(t,!1,L.CHANGED,L.CHANGED);n.time-this.startTime=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange)){const n=t.targetTouches?t.targetTouches.length:1,r=new Array;for(let c=0;c1?"tap"+n:"tap";this.triggerCustomEvent(l,t,a)}}swipe(t){const s=this.getSwipeDir(this.originalCoord,this.finalCoord);if(s&&this.swipeStarted&&this.startEvnt){this.originalCoord.x=0,this.originalCoord.y=0,this.finalCoord.x=0,this.finalCoord.y=0,this.swipeStarted=!1;const n=this.getTouchData(t,!1,L.DEFAULT,L.CHANGED),r=Math.abs(this.startEvnt.position.x-n.position.x),a=Math.abs(this.startEvnt.position.y-n.position.y),l={startEvnt:this.startEvnt,endEvnt:n,direction:s.replace("swipe",""),xAmount:r,yAmount:a,duration:n.time-this.startEvnt.time};this.hasSwiped=!0,this.triggerCustomEvent("swipe",t,l),this.triggerCustomEvent(s,t,l)}}swipeend(t){const s=this.getTouchData(t,!1,L.CHANGED,L.CHANGED);if(this.hasSwiped&&this.startEvnt){const n=this.getSwipeDir(this.startEvnt.position,s.position),r=Math.abs(this.startEvnt.position.x-s.position.x),a=Math.abs(this.startEvnt.position.y-s.position.y),l={startEvnt:this.startEvnt,endEvnt:s,direction:n.replace("swipe",""),xAmount:r,yAmount:a,duration:s.time-this.startEvnt.time};this.triggerCustomEvent("swipeend",t,l)}}}var jb={exports:{}},Ln={exports:{}},ma;function Wb(){return ma||(ma=1,function(i){(function(e,t){i.exports?i.exports=t():e.EvEmitter=t()})(typeof window<"u"?window:_l,function(){function e(){}let t=e.prototype;return t.on=function(s,n){if(!s||!n)return this;let r=this._events=this._events||{},a=r[s]=r[s]||[];return a.includes(n)||a.push(n),this},t.once=function(s,n){if(!s||!n)return this;this.on(s,n);let r=this._onceEvents=this._onceEvents||{},a=r[s]=r[s]||{};return a[n]=!0,this},t.off=function(s,n){let r=this._events&&this._events[s];if(!r||!r.length)return this;let a=r.indexOf(n);return a!=-1&&r.splice(a,1),this},t.emitEvent=function(s,n){let r=this._events&&this._events[s];if(!r||!r.length)return this;r=r.slice(0),n=n||[];let a=this._onceEvents&&this._onceEvents[s];for(let l of r)a&&a[l]&&(this.off(s,l),delete a[l]),l.apply(this,n);return this},t.allOff=function(){return delete this._events,delete this._onceEvents,this},e})}(Ln)),Ln.exports}/*! +`,url:this.scope.url||window.location.href})}catch(n){if(n.name==="AbortError")return;console.error(`Error ${n.name}: ${n.message}`,n)}else return this.updateShareURLs(),(s=this.dropdown)==null?void 0:s.toggle()}async beforeBind(){await super.beforeBind()}async afterBind(){this.initDropdown(),this.debug("afterBind",this.scope),this.scope.shareItems=this.getDefaultShareServices(),await super.afterBind()}requiredAttributes(){return[]}template(){return this&&K(this)&&(this.scope.labelTemplate=this.innerHTML),$b}};let Ze=ds;o(Ze,"tagName","bs5-share"),o(Ze,"count",0);const Ct=i=>{const e=i,t=i;return e.document&&e.location?{x:e.pageXOffset,y:e.pageYOffset,maxX:document.documentElement.scrollWidth-document.documentElement.clientWidth,maxY:document.documentElement.scrollHeight-document.documentElement.clientHeight}:{x:t.scrollLeft,y:t.scrollTop,maxX:t.scrollWidth-t.clientWidth,maxY:t.scrollHeight-t.clientHeight}},Bb=i=>{const e=Ct(i);return e.maxX>0||e.maxY>0},Wr=class{static getFps(){return this.fps}static startLoop(e={}){this.setOptions(e),this.loopStarted||(this.loopStarted=!0,window.requestAnimationFrame(this.loop.bind(this)))}static setOptions(e){this.maxFPS=typeof e.maxFPS=="number"?e.maxFPS:this.maxFPS}static loop(e){if(ethis.lastFpsUpdate+1e3&&(this.fps=.25*this.framesThisSecond+.75*this.fps,this.lastFpsUpdate=e,this.framesThisSecond=0),this.framesThisSecond++;let s=0;for(;this.delta>=this.timestep;)if(this.update(this.timestep),this.delta-=this.timestep,++s>=240){this.panic();break}this.render(this.delta/this.timestep),this.end(this.fps),this.frameID=window.requestAnimationFrame(this.loop.bind(this))}static begin(e,t){this.events.trigger("begin",e,t)}static render(e){this.events.trigger("render",e)}static update(e){this.events.trigger("update",e)}static end(e){this.events.trigger("end",e)}static panic(){this.delta=0}constructor(e={}){Wr.setOptions(e)}};let W=Wr;o(W,"events",new D("gameloop")),o(W,"maxFPS",60),o(W,"fps",60),o(W,"timestep",1e3/60),o(W,"loopStarted",!1),o(W,"lastFrameTimeMs",0),o(W,"delta",0),o(W,"framesThisSecond",0),o(W,"lastFpsUpdate",0),o(W,"frameID",0);class Hb{constructor(e,t={}){o(this,"touchCapable","ontouchstart"in window);o(this,"direction",1);o(this,"limit");o(this,"options");o(this,"el");o(this,"_pause",!1);o(this,"velocity",.008);o(this,"move",0);o(this,"lastMove",0);o(this,"angle","horizontal");o(this,"pauseOnHover",!0);o(this,"resumeTimer",null);o(this,"onResize",Oe(this._onResize.bind(this)));o(this,"onScroll",Oe(this._onScroll.bind(this)));this.el=e,this.options=t,this.direction=this.options.direction||this.direction,this.velocity=this.options.velocity||this.velocity,this.angle=this.options.angle||this.angle,this.pauseOnHover=typeof this.options.pauseOnHover=="boolean"?this.options.pauseOnHover:this.pauseOnHover,this.limit=this.getLimit(this.el),this.move=this.getPosition(),this.direction===-1?this.el.scrollLeft=this.limit:this.el.scrollLeft=0,this.addEventListeners(),W.startLoop({maxFPS:60})}update(){this.limit=this.getLimit(this.el),this.setPosition()}destroy(){this.removeEventListeners()}pause(){this.el.style.scrollBehavior="",this._pause=!0}resume(e=0){this._pause&&(this.stopResumeTimeout(),this.resumeTimer=window.setTimeout(()=>{this.setPosition(),this._pause=!1,this.el.style.scrollBehavior="auto"},e))}addEventListeners(){this.removeEventListeners(),this.onResize=this.onResize.bind(this),this.onMouseIn=this.onMouseIn.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onScroll=this.onScroll.bind(this),this.render=this.render.bind(this),this.updateMove=this.updateMove.bind(this),window.addEventListener("resize",this.onResize,{passive:!0}),this.el.addEventListener("mouseenter",this.onMouseIn,{passive:!0}),this.el.addEventListener("mouseover",this.onMouseIn,{passive:!0}),this.el.addEventListener("focusin",this.onMouseIn,{passive:!0}),this.el.addEventListener("touchstart",this.onMouseIn,{passive:!0}),this.el.addEventListener("mouseleave",this.onMouseOut,{passive:!0}),this.el.addEventListener("focusout",this.onMouseOut,{passive:!0}),this.el.addEventListener("mouseup",this.onMouseUp,{passive:!0}),this.el.addEventListener("touchend",this.onMouseUp,{passive:!0}),this.touchCapable?(this.el.addEventListener("scroll",this.onMouseUp,{passive:!0}),this.el.addEventListener("scrollend",this.onMouseUp,{passive:!0}),this.el.addEventListener("scrollended",this.onMouseUp,{passive:!0})):(this.el.addEventListener("scroll",this.onScroll,{passive:!0}),this.el.addEventListener("scrollend",this.onScroll,{passive:!0}),this.el.addEventListener("scrollended",this.onScroll,{passive:!0})),W.events.on("render",this.render),W.events.on("update",this.updateMove)}removeEventListeners(){window.removeEventListener("resize",this.onResize),this.el.removeEventListener("mouseenter",this.onMouseIn),this.el.removeEventListener("mouseover",this.onMouseIn),this.el.removeEventListener("focusin",this.onMouseIn),this.el.removeEventListener("touchstart",this.onMouseIn),this.el.removeEventListener("mouseleave",this.onMouseOut),this.el.removeEventListener("focusout",this.onMouseOut),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("touchend",this.onMouseUp),this.touchCapable?(this.el.removeEventListener("scroll",this.onMouseUp),this.el.removeEventListener("scrollend",this.onMouseUp),this.el.removeEventListener("scrollended",this.onMouseUp)):(this.el.removeEventListener("scroll",this.onScroll),this.el.removeEventListener("scrollend",this.onScroll),this.el.removeEventListener("scrollended",this.onScroll)),W.events.off("render",this.render),W.events.off("update",this.updateMove)}onMouseIn(){this.pauseOnHover&&this.pause()}onMouseOut(){this.resume(200)}onMouseUp(){this.resume(1e3)}_onResize(){this.limit=this.getLimit(this.el),this.resume(200)}_onScroll(){this.stopResumeTimeout()}stopResumeTimeout(){this.resumeTimer!==null&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}getPosition(){return(this.angle==="vertical"?this.el.scrollTop:this.el.scrollLeft)||0}setPosition(){this.move=this.getPosition()}getLimit(e){return this.angle==="vertical"?Ct(e).maxY:Ct(e).maxX}render(){this._pause||this.scroll(this.move)}updateMove(e){if(this._pause)return;this.lastMove=this.move;const t=this.velocity*this.direction*e;this.move+=t,this.move<=0&&this.direction!==1&&(this.direction=1),this.move>=this.limit&&this.direction!==-1&&(this.direction=-1)}scroll(e){this.angle==="vertical"?this.el.scrollTop=e:this.el.scrollLeft=e}}class ih{constructor(e,t={detectGlobalMove:!0}){o(this,"options");o(this,"lastClientX",0);o(this,"lastClientY",0);o(this,"el");o(this,"pushed",!1);o(this,"touchCapable","ontouchstart"in window);o(this,"checkDraggable",Oe(this._checkDraggable.bind(this)));if(this.el=e,this.options=t,this.touchCapable)return this;this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.checkDraggable=this.checkDraggable.bind(this),e.removeEventListener("mousedown",this.onMouseDown),e.addEventListener("mousedown",this.onMouseDown,{passive:!0}),window.addEventListener("resize",this.checkDraggable),this.options.detectGlobalMove?(window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp,{passive:!0}),window.addEventListener("mousemove",this.onMouseMove,{passive:!0})):(e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mousemove",this.onMouseMove),e.addEventListener("mouseup",this.onMouseUp,{passive:!0}),e.addEventListener("mousemove",this.onMouseMove,{passive:!0})),this.checkDraggable()}destroy(){this.removeEventListeners(),this.el.classList.remove("draggable")}_checkDraggable(){Bb(this.el)?this.el.classList.add("draggable"):this.el.classList.remove("draggable")}onMouseDown(e){this.pushed=!0,this.lastClientX=e.clientX,this.lastClientY=e.clientY}onMouseUp(){this.pushed=!1}onMouseMove(e){let t=0,s=0;this.pushed&&(this.el.scrollLeft-=t=-this.lastClientX+(this.lastClientX=e.clientX),this.el.scrollTop-=s=-this.lastClientY+(this.lastClientY=e.clientY),this.el===document.body&&(document.documentElement&&(this.el=document.documentElement),this.el.scrollLeft-=t,this.el.scrollTop-=s))}removeEventListeners(){window.removeEventListener("resize",this.checkDraggable),this.el.removeEventListener("mousedown",this.onMouseDown),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("mousemove",this.onMouseMove)}}class nh{constructor(e){o(this,"touchCapable","ontouchstart"in window);o(this,"el");this.el=e}get isTouchCapable(){return this.touchCapable}triggerCustomEvent(e,t,s){s.originalEvent=t,s.target=t.target;const n=new CustomEvent(e,{detail:s});this.el.dispatchEvent(n)}}class rh extends nh{constructor(t,s={}){super(t);o(this,"isScrolling",!1);o(this,"_scrollEvent");o(this,"delay",300);o(this,"startPosition",null);o(this,"endPosition",null);o(this,"scrollTimer",null);o(this,"onScrollEvent",this._onScrollEvent.bind(this));o(this,"scroll",this._scroll.bind(this));this.el=t,this.delay=s.delay||this.delay,this.startPosition=Ct(this.el),this._scrollEvent=this.touchCapable?["touchmove","scrollend","scroll"]:["scroll","scrollend"],this.removeEventListeners(),this.addEventListeners()}destroy(){this.removeEventListeners()}get scrollEvent(){return this._scrollEvent}getScrollDir(t,s){return!t||!s?"unknown":t.x>s.x?"right":t.xs.y?"down":t.y{this.scrollended(t)},this.delay),!0):!1}scrollended(t){this.isScrolling=!1,this.endPosition=Ct(this.el);const s=this.getScrollDir(this.startPosition,this.endPosition);this.triggerCustomEvent("scrollended",t,{startPosition:this.startPosition,endPosition:this.endPosition,direction:s})}scrollstart(t){this.isScrolling=!0,this.startPosition=Ct(this.el),this.triggerCustomEvent("scrollstart",t,{startPosition:this.startPosition})}_scroll(t){const s=Ct(this.el),n=this.getScrollDir(this.startPosition,s);this.triggerCustomEvent("scroll"+n,t,{startPosition:this.startPosition,currentPosition:s,direction:n}),this.triggerCustomEvent("scrolling",t,{startPosition:this.startPosition,currentPosition:s,direction:n})}}var Gn=(i=>(i[i.HAVE_NOTHING=0]="HAVE_NOTHING",i[i.HAVE_METADATA=1]="HAVE_METADATA",i[i.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",i[i.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",i[i.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA",i))(Gn||{}),L=(i=>(i[i.DEFAULT=0]="DEFAULT",i[i.TARGET=1]="TARGET",i[i.CHANGED=2]="CHANGED",i))(L||{});class Fb extends nh{constructor(t,s={tapPixelRange:5,swipeHThreshold:50,swipeVThreshold:50,tapholdThreshold:750,doubletapInterval:500,shakeThreshold:15,touchCapable:"ontouchstart"in window,startevent:["touchstart"],endevent:["touchend"],moveevent:["touchmove"],tapevent:["tap"]}){super(t);o(this,"startPosition",{x:0,y:0});o(this,"endPosition",{x:0,y:0});o(this,"originalCoord",{x:0,y:0});o(this,"finalCoord",{x:0,y:0});o(this,"startEvnt",null);o(this,"tapheld",!1);o(this,"firstTap",null);o(this,"cooling",!1);o(this,"doubletapped",!1);o(this,"lastTouch",0);o(this,"hasSwiped",!1);o(this,"tapStarted",!1);o(this,"swipeStarted",!1);o(this,"startTime",0);o(this,"holdTimer",-1);o(this,"tapTimer",-1);o(this,"actionTimer",-1);o(this,"settings");this.el=t,s.startevent=s.touchCapable?["touchstart"]:["mousedown"],s.endevent=s.touchCapable?["touchend"]:["mouseup"],s.moveevent=s.touchCapable?["touchmove"]:["mousemove"],s.tapevent=s.touchCapable?["tap"]:["click"],this.settings=s,this.onStartEvent=this.onStartEvent.bind(this),this.onMoveEvent=this.onMoveEvent.bind(this),this.onEndEvent=this.onEndEvent.bind(this),this.addEventListeners()}get isTouchCapable(){return this.settings.touchCapable}get startEvent(){return this.settings.startevent}get endEvent(){return this.settings.endevent}get moveEvent(){return this.settings.moveevent}get tapEvent(){return this.settings.tapevent}set swipeThresholdX(t){if(typeof t!="number")throw new Error("Threshold parameter must be a type of number");this.settings.swipeHThreshold=t}set swipeThresholdY(t){if(typeof t!="number")throw new Error("Threshold parameter must be a type of number");this.settings.swipeVThreshold=t}set doubleTapInt(t){if(typeof t!="number")throw new Error("Interval parameter must be a type of number");this.settings.doubletapInterval=t}set tapHoldThreshold(t){if(typeof t!="number")throw new Error("Threshold parameter must be a type of number");this.settings.tapholdThreshold=t}set tapRange(t){if(typeof t!="number")throw new Error("Ranger parameter must be a type of number");this.settings.tapPixelRange=t}destroy(){this.removeEventListeners()}removeEventListeners(){for(const t of this.settings.startevent)this.el.removeEventListener(t,this.onStartEvent);for(const t of this.settings.moveevent)this.el.removeEventListener(t,this.onMoveEvent);for(const t of this.settings.endevent)this.el.removeEventListener(t,this.onEndEvent)}getSwipeDir(t,s,n=this.settings.swipeHThreshold,r=this.settings.swipeVThreshold){let a="";return t.y>s.y&&t.y-s.y>r&&(a="swipeup"),t.xn&&(a="swiperight"),t.yr&&(a="swipedown"),t.x>s.x&&t.x-s.x>n&&(a="swipeleft"),a}getPosition(t,s=L.DEFAULT,n=0){let r;switch(s){case L.CHANGED:r=t.changedTouches;break;case L.TARGET:r=t.targetTouches;break;default:r=t.touches;break}return{x:this.settings.touchCapable?r[n].pageX:t.pageX,y:this.settings.touchCapable?r[n].pageY:t.pageY}}getOffset(t,s=L.DEFAULT,n=0){const r=this.el.getBoundingClientRect();let a;switch(s){case L.CHANGED:a=t.changedTouches;break;case L.TARGET:a=t.targetTouches;break;default:a=t.touches;break}return{x:this.settings.touchCapable?Math.round(a[n].pageX-(r?r.left:0)):Math.round(t.pageX-(r?r.left:0)),y:this.settings.touchCapable?Math.round(a[n].pageY-(r?r.top:0)):Math.round(t.pageY-(r?r.top:0))}}getTouchData(t,s=!1,n=L.DEFAULT,r=L.CHANGED){const a={position:this.getPosition(t,n),offset:this.getOffset(t,r),time:Date.now()};return s&&(a.index=wo(t.target)),a}addEventListeners(){for(const t of this.settings.startevent)this.el.addEventListener(t,this.onStartEvent,{passive:!0});for(const t of this.settings.moveevent)this.el.addEventListener(t,this.onMoveEvent,{passive:!0});for(const t of this.settings.endevent)this.el.addEventListener(t,this.onEndEvent,{passive:!0})}onStartEvent(t){return t.which&&t.which!==1?!1:(this.startPosition=this.getPosition(t,L.TARGET),this.endPosition={x:this.startPosition.x,y:this.startPosition.y},this.startTime=Date.now(),this.doubletapped=!1,this.firstTap||(this.firstTap=this.getTouchData(t,!0,L.DEFAULT,L.CHANGED)),this.tapStarted=!0,this.swipeStarted=!0,this.originalCoord=this.getPosition(t,L.TARGET),this.finalCoord=this.getPosition(t,L.TARGET),this.startEvnt=this.getTouchData(t,!1,L.DEFAULT,L.CHANGED),this.tapstart(t),this.taphold(t),!0)}onEndEvent(t){return this.endPosition=this.getPosition(t,L.CHANGED),this.tapheld=!1,window.clearTimeout(this.holdTimer),this.tapend(t),this.swipeend(t),this.tap(t),this.doubletap(t),this.singletap(t),this.tapStarted=!1,this.swipeStarted=!1,this.hasSwiped=!1,!0}onMoveEvent(t){return this.endPosition=this.getPosition(t,L.TARGET),this.finalCoord=this.getPosition(t,L.TARGET),this.tapmove(t),this.swipe(t),!0}tapstart(t){return this.triggerCustomEvent("tapstart",t,this.getTouchData(t,!1,L.DEFAULT,L.CHANGED)),!0}tapmove(t){return this.triggerCustomEvent("tapmove",t,this.getTouchData(t,!1,L.DEFAULT,L.CHANGED)),!0}tapend(t){return this.triggerCustomEvent("tapend",t,this.getTouchData(t,!1,L.CHANGED,L.CHANGED)),!0}taphold(t){return this.holdTimer=window.setTimeout(()=>{const s={x:this.startPosition.x-this.endPosition.x,y:this.startPosition.y-this.endPosition.y};if(this.startPosition.x===this.endPosition.x&&this.startPosition.y===this.endPosition.y||s.x>=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange){this.tapheld=!0;const r=Date.now()-this.startTime,a=t.targetTouches?t.targetTouches.length:1,l=new Array;for(let d=0;d1?"taphold"+a:"taphold",h={touches:l,time:Date.now(),duration:r};this.triggerCustomEvent(c,t,h)}},this.settings.tapholdThreshold),!0}doubletap(t){const s=Date.now(),n=Number(this.lastTouch)||s+1,r=s-n;if(this.actionTimer!==-1&&window.clearTimeout(this.actionTimer),r100&&this.firstTap&&wo(t.target)===this.firstTap.index){this.doubletapped=!0,window.clearTimeout(this.tapTimer);const a=this.getTouchData(t,!0,L.CHANGED,L.CHANGED),l={firstTap:this.firstTap,secondTap:a,interval:a.time-this.firstTap.time};this.cooling||(this.triggerCustomEvent("doubletap",t,l),this.firstTap=null),this.cooling=!0,window.setTimeout(()=>{this.cooling=!1},this.settings.doubletapInterval)}else this.actionTimer=window.setTimeout(()=>{this.firstTap=null,window.clearTimeout(this.actionTimer)},this.settings.doubletapInterval,[t]);this.lastTouch=s}singletap(t){this.tapTimer=window.setTimeout(()=>{const s={x:this.startPosition.x-this.endPosition.x,y:this.startPosition.y-this.endPosition.y};if(!this.doubletapped&&!this.tapheld&&(this.startPosition.x===this.endPosition.x&&this.startPosition.y===this.endPosition.y||s.x>=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange)){const n=this.getTouchData(t,!1,L.CHANGED,L.CHANGED);n.time-this.startTime=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange)){const n=t.targetTouches?t.targetTouches.length:1,r=new Array;for(let c=0;c1?"tap"+n:"tap";this.triggerCustomEvent(l,t,a)}}swipe(t){const s=this.getSwipeDir(this.originalCoord,this.finalCoord);if(s&&this.swipeStarted&&this.startEvnt){this.originalCoord.x=0,this.originalCoord.y=0,this.finalCoord.x=0,this.finalCoord.y=0,this.swipeStarted=!1;const n=this.getTouchData(t,!1,L.DEFAULT,L.CHANGED),r=Math.abs(this.startEvnt.position.x-n.position.x),a=Math.abs(this.startEvnt.position.y-n.position.y),l={startEvnt:this.startEvnt,endEvnt:n,direction:s.replace("swipe",""),xAmount:r,yAmount:a,duration:n.time-this.startEvnt.time};this.hasSwiped=!0,this.triggerCustomEvent("swipe",t,l),this.triggerCustomEvent(s,t,l)}}swipeend(t){const s=this.getTouchData(t,!1,L.CHANGED,L.CHANGED);if(this.hasSwiped&&this.startEvnt){const n=this.getSwipeDir(this.startEvnt.position,s.position),r=Math.abs(this.startEvnt.position.x-s.position.x),a=Math.abs(this.startEvnt.position.y-s.position.y),l={startEvnt:this.startEvnt,endEvnt:s,direction:n.replace("swipe",""),xAmount:r,yAmount:a,duration:s.time-this.startEvnt.time};this.triggerCustomEvent("swipeend",t,l)}}}var Vb={exports:{}},Ln={exports:{}},pa;function Ub(){return pa||(pa=1,function(i){(function(e,t){i.exports?i.exports=t():e.EvEmitter=t()})(typeof window<"u"?window:yl,function(){function e(){}let t=e.prototype;return t.on=function(s,n){if(!s||!n)return this;let r=this._events=this._events||{},a=r[s]=r[s]||[];return a.includes(n)||a.push(n),this},t.once=function(s,n){if(!s||!n)return this;this.on(s,n);let r=this._onceEvents=this._onceEvents||{},a=r[s]=r[s]||{};return a[n]=!0,this},t.off=function(s,n){let r=this._events&&this._events[s];if(!r||!r.length)return this;let a=r.indexOf(n);return a!=-1&&r.splice(a,1),this},t.emitEvent=function(s,n){let r=this._events&&this._events[s];if(!r||!r.length)return this;r=r.slice(0),n=n||[];let a=this._onceEvents&&this._onceEvents[s];for(let l of r)a&&a[l]&&(this.off(s,l),delete a[l]),l.apply(this,n);return this},t.allOff=function(){return delete this._events,delete this._onceEvents,this},e})}(Ln)),Ln.exports}/*! * imagesLoaded v5.0.0 * JavaScript is all like "You images are done yet or what?" * MIT License - */(function(i){(function(e,t){i.exports?i.exports=t(e,Wb()):e.imagesLoaded=t(e,e.EvEmitter)})(typeof window<"u"?window:_l,function(t,s){let n=t.console;function r(p){return Array.isArray(p)?p:typeof p=="object"&&typeof p.length=="number"?[...p]:[p]}function a(p,u,f){if(!(this instanceof a))return new a(p,u,f);let m=p;if(typeof p=="string"&&(m=document.querySelectorAll(p)),!m){n.error(`Bad element for imagesLoaded ${m||p}`);return}this.elements=r(m),this.options={},typeof u=="function"?f=u:Object.assign(this.options,u),f&&this.on("always",f),this.getImages(),setTimeout(this.check.bind(this))}a.prototype=Object.create(s.prototype),a.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const l=[1,9,11];a.prototype.addElementImages=function(p){p.nodeName==="IMG"&&this.addImage(p),this.options.background===!0&&this.addElementBackgroundImages(p);let{nodeType:u}=p;if(!u||!l.includes(u))return;let f=p.querySelectorAll("img");for(let m of f)this.addImage(m);if(typeof this.options.background=="string"){let m=p.querySelectorAll(this.options.background);for(let v of m)this.addElementBackgroundImages(v)}};const c=/url\((['"])?(.*?)\1\)/gi;a.prototype.addElementBackgroundImages=function(p){let u=getComputedStyle(p);if(!u)return;let f=c.exec(u.backgroundImage);for(;f!==null;){let m=f&&f[2];m&&this.addBackground(m,p),f=c.exec(u.backgroundImage)}},a.prototype.addImage=function(p){let u=new h(p);this.images.push(u)},a.prototype.addBackground=function(p,u){let f=new d(p,u);this.images.push(f)},a.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}let p=(u,f,m)=>{setTimeout(()=>{this.progress(u,f,m)})};this.images.forEach(function(u){u.once("progress",p),u.check()})},a.prototype.progress=function(p,u,f){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!p.isLoaded,this.emitEvent("progress",[this,p,u]),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&n&&n.log(`progress: ${f}`,p,u)},a.prototype.complete=function(){let p=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(p,[this]),this.emitEvent("always",[this])};function h(p){this.img=p}h.prototype=Object.create(s.prototype),h.prototype.check=function(){if(this.getIsImageComplete()){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}const u=this.img.currentSrc||this.img.src;u&&(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=u)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(p,u){this.isLoaded=p;let{parentNode:f}=this.img,m=f.nodeName==="PICTURE"?f:this.img;this.emitEvent("progress",[this,m,u])},h.prototype.handleEvent=function(p){let u="on"+p.type;this[u]&&this[u](p)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)};function d(p,u){this.url=p,this.element=u,this.img=new Image}return d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(p,u){this.isLoaded=p,this.emitEvent("progress",[this,this.element,u])},a})})(jb);const Hi=class extends P{constructor(){super();o(this,"computedStyle");o(this,"autobind",!0);o(this,"_debug",!1);o(this,"bs5");o(this,"touch",new Ub(this));o(this,"events");o(this,"routerEvents",new D("main"));o(this,"defaults",{containerSelector:void 0,state:"hidden",oldState:"hidden",id:void 0,width:"250px",position:"left",mode:"overlap",autoShow:!1,autoHide:!1,watchNewPageReadyEvent:!0,forceHideOnLocationPathnames:[],forceShowOnLocationPathnames:[],closeOnSwipe:!0,preventScrollingOnOverlap:!0,hide:this.hide,show:this.show,toggle:this.toggle});o(this,"scope",{...this.defaults});o(this,"onSwipe",this._onSwipe.bind(this));o(this,"onEnvironmentChanges",Et(this._onEnvironmentChanges.bind(this)));this.bs5=vt.getSingleton(),this.onEnvironmentChanges=this.onEnvironmentChanges.bind(this)}static get observedAttributes(){return["id","container-selector","position","mode","width","auto-show","auto-hide","force-hide-on-location-pathnames","force-show-on-location-pathnames","watch-new-page-ready-event","close-on-swipe","prevent-scrolling-on-overlap"]}setState(t){this.scope.oldState=this.scope.state,this.scope.state=t,this.onStateChange()}getState(){return this.scope.state}getShowMode(){return`${this.scope.mode}-${this.scope.position}`}hide(){this.setState("hidden")}show(){const t=this.getShowMode();this.setState(t)}toggle(){this.debug("toggle state: "+this.scope.state),this.scope.state==="hidden"?this.show():this.hide(),this.debug("toggled state: "+this.scope.state)}preventScrolling(t=document.body){t.style.overflow="hidden"}allowScrolling(t=document.body){t.style.overflow==="hidden"&&(t.style.overflow="")}connectedCallback(){super.connectedCallback(),this.init(Hi.observedAttributes),this.computedStyle=window.getComputedStyle(this),this.addEventListeners(),this.onEnvironmentChanges()}onBreakpoint(){this.onEnvironmentChanges()}addEventListeners(){this.addEventListener("swipe",this.onSwipe),this.bs5.events.on("breakpoint:changed",this.onBreakpoint,this)}removeEventListeners(){var t,s;(t=this.events)==null||t.off(k.eventNames.init,this.triggerState,this),(s=this.events)==null||s.off(k.eventNames.toggle,this.toggle,this),this.routerEvents.off("newPageReady",this.onEnvironmentChanges,this),this.bs5.events.off("breakpoint:changed",this.onBreakpoint,this)}initToggleButtonEventDispatcher(){this.events&&(this.events.off(k.eventNames.toggle,this.toggle,this),this.events.off(k.eventNames.init,this.triggerState,this));const t=k.nsPrefix+this.scope.id;this.debug(`Init event dispatcher for namespace ${t}`),this.events=new D(t),this.events.on(k.eventNames.toggle,this.toggle,this),this.events.on(k.eventNames.init,this.triggerState,this)}initRouterEventDispatcher(){this.scope.watchNewPageReadyEvent&&this.routerEvents.on("newPageReady",this.onEnvironmentChanges,this)}_onSwipe(t){this.scope.closeOnSwipe&&(this.scope.state==="side-left"||this.scope.state==="side-right"||(this.scope.position==="left"&&t.detail.direction==="left"&&this.hide(),this.scope.position==="right"&&t.detail.direction==="right"&&this.hide()))}onHidden(){const t=this.scope.position==="left"?"-100%":"100%";this.style.transform=`translateX(${t})`,this.width=this.scope.width,this.setContainersStyle(this.scope.state),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onMove(t){this.style.transform="translateX(0)",this.style.width=this.scope.width,this.width=this.scope.width,this.setContainersStyle(t),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onSide(t){this.style.transform="translateX(0)",this.style.width=this.scope.width,this.width=this.scope.width,this.setContainersStyle(t),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onOverlap(t){this.style.transform="translateX(0)",this.width=this.scope.width,this.setContainersStyle(t),this.scope.preventScrollingOnOverlap&&this.preventScrolling()}triggerState(){var t;(t=this.events)==null||t.trigger("state",this.scope.state)}onStateChange(){switch(this.scope.state){case"side-left":case"side-right":this.onSide(this.scope.state);break;case"overlap-left":case"overlap-right":this.onOverlap(this.scope.state);break;case"move-left":case"move-right":this.onMove(this.scope.state);break;default:this.onHidden();break}this.classList.remove(...Hi.states),this.classList.add(this.scope.state),this.events&&this.events.trigger(k.eventNames.toggled,this.scope.state),this.dispatchEvent(new CustomEvent(k.eventNames.toggled,{detail:this.scope.state}))}get width(){return this.scope.width===this.defaults.width?this.offsetWidth+"px":this.scope.width}set width(t){this.scope.width=t,this.style.width=t}setStateByEnvironment(){if(this.scope.forceHideOnLocationPathnames.includes(window.location.pathname))return this.hide();if(this.scope.forceShowOnLocationPathnames.includes(window.location.pathname))return this.show();if(this.scope.autoHide)return this.hide();if(this.scope.autoShow)return this.show()}_onEnvironmentChanges(){this.setStateByEnvironment()}getContainers(){return this.scope.containerSelector?document.querySelectorAll(this.scope.containerSelector):void 0}initContainers(t){this.setContainersStyle(t)}setContainersStyle(t){const s=this.getContainers()||[];if(s)for(let n=0;n + */(function(i){(function(e,t){i.exports?i.exports=t(e,Ub()):e.imagesLoaded=t(e,e.EvEmitter)})(typeof window<"u"?window:yl,function(t,s){let n=t.console;function r(p){return Array.isArray(p)?p:typeof p=="object"&&typeof p.length=="number"?[...p]:[p]}function a(p,u,f){if(!(this instanceof a))return new a(p,u,f);let m=p;if(typeof p=="string"&&(m=document.querySelectorAll(p)),!m){n.error(`Bad element for imagesLoaded ${m||p}`);return}this.elements=r(m),this.options={},typeof u=="function"?f=u:Object.assign(this.options,u),f&&this.on("always",f),this.getImages(),setTimeout(this.check.bind(this))}a.prototype=Object.create(s.prototype),a.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const l=[1,9,11];a.prototype.addElementImages=function(p){p.nodeName==="IMG"&&this.addImage(p),this.options.background===!0&&this.addElementBackgroundImages(p);let{nodeType:u}=p;if(!u||!l.includes(u))return;let f=p.querySelectorAll("img");for(let m of f)this.addImage(m);if(typeof this.options.background=="string"){let m=p.querySelectorAll(this.options.background);for(let v of m)this.addElementBackgroundImages(v)}};const c=/url\((['"])?(.*?)\1\)/gi;a.prototype.addElementBackgroundImages=function(p){let u=getComputedStyle(p);if(!u)return;let f=c.exec(u.backgroundImage);for(;f!==null;){let m=f&&f[2];m&&this.addBackground(m,p),f=c.exec(u.backgroundImage)}},a.prototype.addImage=function(p){let u=new h(p);this.images.push(u)},a.prototype.addBackground=function(p,u){let f=new d(p,u);this.images.push(f)},a.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}let p=(u,f,m)=>{setTimeout(()=>{this.progress(u,f,m)})};this.images.forEach(function(u){u.once("progress",p),u.check()})},a.prototype.progress=function(p,u,f){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!p.isLoaded,this.emitEvent("progress",[this,p,u]),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&n&&n.log(`progress: ${f}`,p,u)},a.prototype.complete=function(){let p=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(p,[this]),this.emitEvent("always",[this])};function h(p){this.img=p}h.prototype=Object.create(s.prototype),h.prototype.check=function(){if(this.getIsImageComplete()){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}const u=this.img.currentSrc||this.img.src;u&&(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=u)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(p,u){this.isLoaded=p;let{parentNode:f}=this.img,m=f.nodeName==="PICTURE"?f:this.img;this.emitEvent("progress",[this,m,u])},h.prototype.handleEvent=function(p){let u="on"+p.type;this[u]&&this[u](p)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)};function d(p,u){this.url=p,this.element=u,this.img=new Image}return d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(p,u){this.isLoaded=p,this.emitEvent("progress",[this,this.element,u])},a})})(Vb);const Hi=class extends P{constructor(){super();o(this,"computedStyle");o(this,"autobind",!0);o(this,"_debug",!1);o(this,"bs5");o(this,"touch",new Fb(this));o(this,"events");o(this,"routerEvents",new D("main"));o(this,"defaults",{containerSelector:void 0,state:"hidden",oldState:"hidden",id:void 0,width:"250px",position:"left",mode:"overlap",autoShow:!1,autoHide:!1,watchNewPageReadyEvent:!0,forceHideOnLocationPathnames:[],forceShowOnLocationPathnames:[],closeOnSwipe:!0,preventScrollingOnOverlap:!0,hide:this.hide,show:this.show,toggle:this.toggle});o(this,"scope",{...this.defaults});o(this,"onSwipe",this._onSwipe.bind(this));o(this,"onEnvironmentChanges",Et(this._onEnvironmentChanges.bind(this)));this.bs5=vt.getSingleton(),this.onEnvironmentChanges=this.onEnvironmentChanges.bind(this)}static get observedAttributes(){return["id","container-selector","position","mode","width","auto-show","auto-hide","force-hide-on-location-pathnames","force-show-on-location-pathnames","watch-new-page-ready-event","close-on-swipe","prevent-scrolling-on-overlap"]}setState(t){this.scope.oldState=this.scope.state,this.scope.state=t,this.onStateChange()}getState(){return this.scope.state}getShowMode(){return`${this.scope.mode}-${this.scope.position}`}hide(){this.setState("hidden")}show(){const t=this.getShowMode();this.setState(t)}toggle(){this.debug("toggle state: "+this.scope.state),this.scope.state==="hidden"?this.show():this.hide(),this.debug("toggled state: "+this.scope.state)}preventScrolling(t=document.body){t.style.overflow="hidden"}allowScrolling(t=document.body){t.style.overflow==="hidden"&&(t.style.overflow="")}connectedCallback(){super.connectedCallback(),this.init(Hi.observedAttributes),this.computedStyle=window.getComputedStyle(this),this.addEventListeners(),this.onEnvironmentChanges()}onBreakpoint(){this.onEnvironmentChanges()}addEventListeners(){this.addEventListener("swipe",this.onSwipe),this.bs5.events.on("breakpoint:changed",this.onBreakpoint,this)}removeEventListeners(){var t,s;(t=this.events)==null||t.off(k.eventNames.init,this.triggerState,this),(s=this.events)==null||s.off(k.eventNames.toggle,this.toggle,this),this.routerEvents.off("newPageReady",this.onEnvironmentChanges,this),this.bs5.events.off("breakpoint:changed",this.onBreakpoint,this)}initToggleButtonEventDispatcher(){this.events&&(this.events.off(k.eventNames.toggle,this.toggle,this),this.events.off(k.eventNames.init,this.triggerState,this));const t=k.nsPrefix+this.scope.id;this.debug(`Init event dispatcher for namespace ${t}`),this.events=new D(t),this.events.on(k.eventNames.toggle,this.toggle,this),this.events.on(k.eventNames.init,this.triggerState,this)}initRouterEventDispatcher(){this.scope.watchNewPageReadyEvent&&this.routerEvents.on("newPageReady",this.onEnvironmentChanges,this)}_onSwipe(t){this.scope.closeOnSwipe&&(this.scope.state==="side-left"||this.scope.state==="side-right"||(this.scope.position==="left"&&t.detail.direction==="left"&&this.hide(),this.scope.position==="right"&&t.detail.direction==="right"&&this.hide()))}onHidden(){const t=this.scope.position==="left"?"-100%":"100%";this.style.transform=`translateX(${t})`,this.width=this.scope.width,this.setContainersStyle(this.scope.state),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onMove(t){this.style.transform="translateX(0)",this.style.width=this.scope.width,this.width=this.scope.width,this.setContainersStyle(t),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onSide(t){this.style.transform="translateX(0)",this.style.width=this.scope.width,this.width=this.scope.width,this.setContainersStyle(t),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onOverlap(t){this.style.transform="translateX(0)",this.width=this.scope.width,this.setContainersStyle(t),this.scope.preventScrollingOnOverlap&&this.preventScrolling()}triggerState(){var t;(t=this.events)==null||t.trigger("state",this.scope.state)}onStateChange(){switch(this.scope.state){case"side-left":case"side-right":this.onSide(this.scope.state);break;case"overlap-left":case"overlap-right":this.onOverlap(this.scope.state);break;case"move-left":case"move-right":this.onMove(this.scope.state);break;default:this.onHidden();break}this.classList.remove(...Hi.states),this.classList.add(this.scope.state),this.events&&this.events.trigger(k.eventNames.toggled,this.scope.state),this.dispatchEvent(new CustomEvent(k.eventNames.toggled,{detail:this.scope.state}))}get width(){return this.scope.width===this.defaults.width?this.offsetWidth+"px":this.scope.width}set width(t){this.scope.width=t,this.style.width=t}setStateByEnvironment(){if(this.scope.forceHideOnLocationPathnames.includes(window.location.pathname))return this.hide();if(this.scope.forceShowOnLocationPathnames.includes(window.location.pathname))return this.show();if(this.scope.autoHide)return this.hide();if(this.scope.autoShow)return this.show()}_onEnvironmentChanges(){this.setStateByEnvironment()}getContainers(){return this.scope.containerSelector?document.querySelectorAll(this.scope.containerSelector):void 0}initContainers(t){this.setContainersStyle(t)}setContainersStyle(t){const s=this.getContainers()||[];if(s)for(let n=0;n
-`,qb=` -`,Yb=`
    +`,zb=`
    -`,Kb='',lh=".slideshow-row",Gb=`${lh} .slide`,Yr=class extends ar{constructor(){super();o(this,"resizeObserver");o(this,"bs5");o(this,"defaultScope",{slidesToScroll:1,controls:!0,controlsPosition:"inside-middle",pauseOnHover:!0,sticky:!1,indicators:!0,indicatorsPosition:"inside-bottom",pause:!1,drag:!0,touchScroll:!0,autoplay:!1,autoplayInterval:0,autoplayVelocity:.8,controlPrevIconSrc:"",controlNextIconSrc:"",indicatorActiveIconSrc:"",indicatorInactiveIconSrc:"",angle:"horizontal",infinite:!0,next:this.next.bind(this),prev:this.prev.bind(this),goTo:this.goTo.bind(this),enableTouchScroll:this.enableTouchScroll.bind(this),disableTouchScroll:this.disableTouchScroll.bind(this),items:void 0,controlsPositionClass:"",indicatorsPositionClass:"",intervalCount:0,intervalProgress:0,nextIndex:-1,prevIndex:-1,activeIndex:0});o(this,"templateAttributes",[{name:"class",required:!1},{name:"handle",required:!1},{name:"type",required:!0},{name:"active",type:"boolean",required:!1},{name:"index",type:"number",required:!1},{name:"src",type:"string",required:!1}]);o(this,"autobind",!0);o(this,"dragscrollService");o(this,"continuousAutoplayService");o(this,"scrollEventsService");o(this,"templateControls",qb);o(this,"templateIndicators",Yb);o(this,"autoplayIntervalIndex",null);o(this,"continuousAutoplayIntervalIndex",null);o(this,"resumeTimer",null);o(this,"routerEvents",new D("main"));o(this,"scope",{...this.defaultScope});o(this,"onViewChanges",Et(this._onViewChanges.bind(this)));o(this,"onScroll",Et(this._onScroll.bind(this)));o(this,"onMouseUp",Oe(this._onMouseUp.bind(this)));o(this,"resume",Oe(this._resume.bind(this),500));this.bs5=vt.getSingleton(),this.onViewChanges=this.onViewChanges.bind(this),this.onVisibilityChanged=this.onVisibilityChanged.bind(this),this.onScroll=this.onScroll.bind(this),this.onScrollend=this.onScrollend.bind(this),this.onMouseIn=this.onMouseIn.bind(this),this.onMouseOut=this.onMouseOut.bind(this)}get slideshowInner(){return this.querySelector(lh)}get slideElements(){return this.querySelectorAll(Gb)}get controlsElements(){return this.querySelectorAll(".slideshow-control-prev, .slideshow-control-next")}get indicatorsElement(){return this.querySelector(".slideshow-indicators")}static get observedAttributes(){return["items","slides-to-scroll","controls","controls-position","drag","autoplay","autoplay-interval","autoplay-velocity","control-prev-icon-src","control-next-icon-src","indicator-inactive-icon-src","indicator-active-icon-src","angle","pause-on-hover","sticky","indicators","indicators-position","pause","infinite"]}next(){this.scrollToNextSlide()}prev(){this.scrollToPrevSlide()}goTo(t){var s;if(t<0||!((s=this.scope.items)!=null&&s[t])||!this.slideElements[t]||!this.slideshowInner){this.throw(new Error(`Can't go to slide of index ${t}`)),console.error("items",this.scope.items),console.error("this.slideElements",this.slideElements),console.error("this.slideshowInner",this.slideshowInner);return}this.setSlidePositions(),this.slideElements[t]?(je(this.slideElements[t],0,this.slideshowInner,this.scope.angle),this.setSlideActive(t)):this.throw(new Error(`Slide element with index "${t}" not found!`))}getNextIndex(t){let s=t+this.scope.slidesToScroll;if(s>=this.slideElements.length){if(!this.scope.infinite)return this.slideElements.length-1;s=s-this.slideElements.length}return s}getPrevIndex(t){let s=t-this.scope.slidesToScroll;if(s<0){if(!this.scope.infinite)return 0;s=this.slideElements.length-1+(s+1)}return s}scrollToNearestSlide(){this.setSlidePositions();const t=this.getMostCenteredSlideIndex();return this.goTo(t)}scrollToNextSlide(){this.setSlidePositions();const t=this.getMostCenteredSlideIndex(),s=this.getNextIndex(t);return this.goTo(s)}scrollToPrevSlide(){this.setSlidePositions();const t=this.getMostCenteredSlideIndex(),s=this.getPrevIndex(t);return this.goTo(s)}initOptions(){this.setOptions()}setOptions(){this.scope.autoplay?this.enableAutoplay():this.disableAutoplay(),this.scope.drag?this.enableDesktopDragscroll():this.disableDesktopDragscroll(),this.scope.touchScroll?this.enableTouchScroll():this.disableTouchScroll(),this.setControlsOptions(),this.setIndicatorsOptions()}setControlsOptions(){var s;const t=(s=this.scope.controlsPosition)==null?void 0:s.split("-");this.scope.controls&&t.length===2?this.scope.controlsPositionClass=`control-${t[0]} control-${t[1]}`:this.scope.controlsPositionClass=""}setIndicatorsOptions(){var s;const t=(s=this.scope.indicatorsPosition)==null?void 0:s.split("-");this.scope.indicators&&t.length===2?this.scope.indicatorsPositionClass=`indicators-${t[0]} indicators-${t[1]}`:this.scope.indicatorsPositionClass=""}_onViewChanges(){var t,s;if(this.debug("onViewChanges"),!(!((t=this.scope.items)!=null&&t.length)||!((s=this.slideElements)!=null&&s.length)))try{this.setSlidePositions();const n=this.setCenteredSlideActive();this.scope.sticky&&this.goTo(n)}catch(n){this.throw(n)}}onVisibilityChanged(t){var s,n;t.detail.visible&&((s=this.dragscrollService)==null||s.checkDraggable(),(n=this.continuousAutoplayService)==null||n.update())}_onScroll(){}onScrollend(){var t;if((t=this.scope.items)!=null&&t.length)try{this.setSlidePositions(),this.setCenteredSlideActive(),this.scope.sticky&&this.scrollToNearestSlide()}catch(s){this.throw(s)}}onMouseIn(){this.scope.pauseOnHover&&(this.scope.pause=!0)}onMouseOut(){this.resume()}_onMouseUp(){}_resume(){this.setSlidePositions(),this.scope.pause=!1}connectedCallback(){var t;!((t=this.scope.items)!=null&&t.length)&&this.slideElements&&this.addItemsByChilds(),super.connectedCallback(),this.init(Yr.observedAttributes),this.addEventListeners()}addEventListeners(){var t,s,n;this.routerEvents.on("newPageReady",this.onViewChanges),window.ResizeObserver&&(this.resizeObserver=new window.ResizeObserver(this.onViewChanges),(t=this.resizeObserver)==null||t.observe(this)),window.addEventListener("resize",this.onViewChanges,{passive:!0}),this.addEventListener("visibility-changed",this.onVisibilityChanged),(s=this.slideshowInner)==null||s.addEventListener("scroll",this.onScroll,{passive:!0}),(n=this.slideshowInner)==null||n.addEventListener("scrollended",this.onScrollend,{passive:!0}),this.addEventListener("mouseenter",this.onMouseIn,{passive:!0}),this.addEventListener("mouseover",this.onMouseIn,{passive:!0}),this.addEventListener("focusin",this.onMouseIn,{passive:!0}),this.addEventListener("touchstart",this.onMouseIn,{passive:!0}),this.addEventListener("mouseleave",this.onMouseOut,{passive:!0}),this.addEventListener("focusout",this.onMouseOut,{passive:!0}),this.addEventListener("mouseup",this.onMouseUp,{passive:!0}),this.addEventListener("touchend",this.onMouseUp,{passive:!0}),this.addEventListener("scroll",this.onMouseUp,{passive:!0}),this.addEventListener("scrollend",this.onMouseUp,{passive:!0}),this.addEventListener("scrollended",this.onMouseUp,{passive:!0})}removeEventListeners(){var t,s,n;this.routerEvents.off("newPageReady",this.onViewChanges,this),window.removeEventListener("resize",this.onViewChanges),(t=this.resizeObserver)==null||t.unobserve(this),this.bs5.events.off("breakpoint:changed",this.onViewChanges,this),this.removeEventListener("visibility-changed",this.onVisibilityChanged),(s=this.slideshowInner)==null||s.removeEventListener("scroll",this.onScroll),(n=this.slideshowInner)==null||n.removeEventListener("scrollended",this.onScrollend),this.removeEventListener("mouseenter",this.onMouseIn),this.removeEventListener("mouseover",this.onMouseIn),this.removeEventListener("focusin",this.onMouseIn),this.removeEventListener("touchstart",this.onMouseIn),this.removeEventListener("mouseleave",this.onMouseOut),this.removeEventListener("focusout",this.onMouseOut),this.removeEventListener("mouseup",this.onMouseUp),this.removeEventListener("touchend",this.onMouseUp),this.removeEventListener("scroll",this.onMouseUp),this.removeEventListener("scrollend",this.onMouseUp),this.removeEventListener("scrollended",this.onMouseUp)}initAll(){this.initSlideshowInner(),this.initOptions(),this.addEventListeners(),this.onViewChanges(),this.onScrollend()}async beforeBind(){await super.beforeBind(),this.validateItems()}async afterBind(){this.initAll(),await super.afterBind()}initSlideshowInner(){if(!this.slideshowInner){this.throw(new Error("Can't init slideshow inner!"));return}this.scrollEventsService=new ah(this.slideshowInner)}enableDesktopDragscroll(){if(!this.dragscrollService){if(!this.slideshowInner)return;const t={detectGlobalMove:!0};this.dragscrollService=new rh(this.slideshowInner,t)}}disableDesktopDragscroll(){this.dragscrollService&&(this.dragscrollService.destroy(),this.dragscrollService=void 0)}enableTouchScroll(){this.classList.remove("touchscroll-disabled")}disableTouchScroll(){this.classList.add("touchscroll-disabled")}enableContinuousAutoplay(){if(!this.continuousAutoplayService&&this.slideshowInner){const t={velocity:this.scope.autoplayVelocity,angle:this.scope.angle,pauseOnHover:this.scope.pauseOnHover};this.continuousAutoplayService=new Vb(this.slideshowInner,t)}if(this.continuousAutoplayIntervalIndex===null){const t=this.scope.autoplayVelocity*1e4;this.continuousAutoplayIntervalIndex=window.setInterval(this.onScrollend.bind(this),t)}}disableContinuousAutoplay(){this.continuousAutoplayService&&(this.continuousAutoplayService.pause(),this.continuousAutoplayService.destroy(),this.continuousAutoplayService=void 0),this.continuousAutoplayIntervalIndex!==null&&(window.clearInterval(this.continuousAutoplayIntervalIndex),this.continuousAutoplayIntervalIndex=null)}resetIntervalAutoplay(){this.scope.intervalCount=0,this.scope.intervalProgress=0}enableIntervalAutoplay(){this.autoplayIntervalIndex===null&&(this.autoplayIntervalIndex=window.setInterval(()=>{this.scope.pause||(this.scope.intervalCount+=100,this.scope.intervalProgress=this.scope.intervalCount/this.scope.autoplayInterval*100,this.scope.intervalProgress>=100&&this.next())},100))}disableIntervalAutoplay(){this.resetIntervalAutoplay(),console.debug("disableIntervalAutoplay",this.autoplayIntervalIndex),this.autoplayIntervalIndex!==null&&(window.clearInterval(this.autoplayIntervalIndex),this.autoplayIntervalIndex=null)}disableAutoplay(){this.disableIntervalAutoplay(),this.disableContinuousAutoplay()}enableAutoplay(){this.disableAutoplay(),this.scope.autoplayInterval<=0?this.enableContinuousAutoplay():this.enableIntervalAutoplay()}transformTemplateAttributes(t,s){return t=super.transformTemplateAttributes(t,s),t.handle=t.handle||s.toString(),t.index=s,t.class=t.class||"",t.class+=" slide",t}validateItems(){if(!this.scope.items){this.throw(new Error("No items to validate!"));return}for(let t=0;t{const n=t.getAttribute("handle")||t.getAttribute("id")||s.toString();t.setAttribute("index",s.toString());const r={handle:n,active:!1,content:t.innerHTML,index:s,position:{...t.getBoundingClientRect(),centerY:0,centerX:0}};this.scope.items||(this.scope.items=[]),this.scope.items.push(r)})}getScrollPosition(){return this.slideshowInner?Ct(this.slideshowInner):null}getCurrentClosestNumber(t,s,n){return Math.abs(s-t)=0}setSlidePositions(){var s,n,r,a;if(!this.bound)return;if(((s=this.scope.items)==null?void 0:s.length)!==((n=this.slideElements)==null?void 0:n.length)){console.warn(new Error(`The slide objects must be the same size as the slide elements! items (${(r=this.scope.items)==null?void 0:r.length}) !== slideElements (${(a=this.slideElements)==null?void 0:a.length})`),this.slideElements,this);return}if(!this.slideshowInner)return;const t=this.slideshowInner.getBoundingClientRect();for(let l=0;l1&&(t=t-this.scope.activeSlides.length+1,t<0&&(t=0));const n=this.scope.items[t];return!n||!this.sliderInner||!n.el?(console.warn(`Slide element with index "${t}" not found!`),-1):(je(n.el,0,this.sliderInner,this.scope.angle),t)}getNextIndex(t){let s=t+this.scope.slidesToScroll;if(s>this.scope.items.length-1)if(this.scope.infinite)s=s-this.scope.items.length;else return-1;return s}getPrevIndex(t){let s=t-this.scope.slidesToScroll;if(s<0)if(this.scope.infinite)s=this.scope.items.length-1+(s+1);else return-1;return s}scrollToNextSlide(){return this.scope.isScrolling&&(this.scope.nextIndex=this.getNextIndex(this.scope.nextIndex),this.updateControls()),this.goTo(this.scope.nextIndex,!0)}scrollToPrevSlide(){return this.scope.isScrolling&&(this.scope.prevIndex=this.getPrevIndex(this.scope.prevIndex),this.updateControls()),this.goTo(this.scope.prevIndex,!1)}initOptions(){this.setOptions()}setOptions(){this.scope.drag?this.enableDesktopDragscroll():this.disableDesktopDragscroll(),this.scope.touchScroll?this.enableTouchScroll():this.disableTouchScroll(),this.updateColumns(),this.setControlsOptions(),this.setIndicatorsOptions()}updateColumns(){var t;(t=this.scope).slideItemStyle||(t.slideItemStyle={}),this.scope.columns>0?this.scope.slideItemStyle.flex=`0 0 ${100/this.scope.columns}%`:this.scope.slideItemStyle.flex=""}setControlsOptions(){var s;const t=(s=this.scope.controlsPosition)==null?void 0:s.split("-");this.scope.controls&&t.length===2?this.scope.controlsPositionClass=`control-${t[0]} control-${t[1]}`:this.scope.controlsPositionClass=""}setIndicatorsOptions(){var s;const t=(s=this.scope.indicatorsPosition)==null?void 0:s.split("-");this.scope.indicators&&t.length===2?this.scope.indicatorsPositionClass=`indicators-${t[0]} indicators-${t[1]}`:this.scope.indicatorsPositionClass=""}_onViewChanges(){var t,s;if(this.debug("onViewChanges"),!(!((t=this.scope.items)!=null&&t.length)||!((s=this.slideElements)!=null&&s.length)))try{this.updateSlides()}catch(n){this.throw(n)}}onVisibilityChanged(t){var s,n;t.detail.visible&&((s=this.dragscrollService)==null||s.checkDraggable(),(n=this.continuousAutoplayService)==null||n.update())}onScroll(t){this.scope.isScrolling=!0,this.dispatchEvent(new CustomEvent(t.type,{detail:t.detail}))}onScrollEnd(t){var s;if(this.scope.isScrolling=!1,!!((s=this.scope.items)!=null&&s.length)&&t.detail.direction!=="none"){try{this.updateSlides()}catch(n){this.throw(n)}this.dispatchEvent(new CustomEvent(t.type,{detail:t.detail}))}}connectedCallback(){this.scope.items.length||this.scope.slideTemplate?this.updateItems():this.initItemsByChildren(),super.connectedCallback(),this.init(Ht.observedAttributes),this.addEventListeners()}addEventListeners(){var t,s,n;this.routerEvents.on("newPageReady",this.onViewChanges),window.ResizeObserver&&(this.resizeObserver=new window.ResizeObserver(this.onViewChanges),(t=this.resizeObserver)==null||t.observe(this)),window.addEventListener("resize",this.onViewChanges,{passive:!0}),this.addEventListener("visibility-changed",this.onVisibilityChanged),(s=this.sliderInner)==null||s.addEventListener(Ht.EVENTS.scrolling,this.onScroll,{passive:!0}),(n=this.sliderInner)==null||n.addEventListener(Ht.EVENTS.scrollended,this.onScrollEnd,{passive:!0})}removeEventListeners(){var t,s,n;this.routerEvents.off("newPageReady",this.onViewChanges,this),window.removeEventListener("resize",this.onViewChanges),(t=this.resizeObserver)==null||t.unobserve(this),this.bs5.events.off("breakpoint:changed",this.onViewChanges,this),this.removeEventListener("visibility-changed",this.onVisibilityChanged),(s=this.sliderInner)==null||s.removeEventListener(Ht.EVENTS.scrolling,this.onScroll),(n=this.sliderInner)==null||n.removeEventListener(Ht.EVENTS.scrollended,this.onScrollEnd)}initAll(){this.initSlideshowInner(),this.initOptions(),this.addEventListeners(),this.updateSlides()}async beforeBind(){await super.beforeBind(),this.validateItems()}async afterBind(){this.initAll(),this.updateItems(),this.classList.add(`${Ht.tagName}-ready`),await super.afterBind()}async afterAllBind(){this.updateItems(),await super.afterAllBind()}initSlideshowInner(){if(!this.sliderInner){this.throw(new Error("Can't init slider inner!"));return}this.scrollEventsService=new ah(this.sliderInner)}enableDesktopDragscroll(){if(!this.dragscrollService){if(!this.sliderInner)return;const t={detectGlobalMove:!0};this.dragscrollService=new rh(this.sliderInner,t)}}disableDesktopDragscroll(){this.dragscrollService&&(this.dragscrollService.destroy(),this.dragscrollService=void 0)}enableTouchScroll(){this.classList.remove("touchscroll-disabled")}disableTouchScroll(){this.classList.add("touchscroll-disabled")}validateItems(){if(!this.scope.items){this.throw(new Error("No items to validate!"));return}for(let t=0;t{this.scope.items.find(l=>l.el===n)||(this.addItemByElement(n,r),t=!0)});for(const n of this.scope.items)s.find(a=>a===n.el)||(this.removeItem(n.index,!1),t=!0);return t&&(this.updateItemIndexes(),this.updateSlides()),t}removeItem(t,s=!0){var r;const n=this.scope.items[t];n&&((r=n.el)==null||r.remove(),this.scope.items.splice(t,1),s&&this.updateItemIndexes())}updateItemIndexes(){for(let t=0;tthis.sliderInner.clientWidth:this.sliderInner.scrollHeight>this.sliderInner.clientHeight:!1}getSlideElementByIndex(t){return this.sliderInner?this.sliderInner.querySelector(`[index="${t}"]`):void 0}isSlideVisible(t,s){if(!this.sliderInner)return!1;const n=this.sliderInner.getBoundingClientRect();t.el||(t.el=this.getSlideElementByIndex(t.index));const r=t.el;if(!r)return console.warn("Slide element not found!"),!1;const a=r.getBoundingClientRect();return this.scope.angle==="horizontal"?a.left+s>=n.left&&a.right-s<=n.right:a.top+s>=n.top&&a.bottom-s<=n.bottom}getVisibleSlides(t){var n;const s=[];if(!((n=this.scope.items)!=null&&n.length))return s;for(const r of this.scope.items)this.isSlideVisible(r,t)&&s.push(r.index);return s.sort((r,a)=>r-a)}setVisibleSlidesActive(t){this.setAllSlidesInactive();const s=this.getVisibleSlides(t);return this.setSlidesActive(s),s}updateActiveSlides(t=8){const s=this.setVisibleSlidesActive(t),n=s[0]||0,r=s[s.length-1]||0,a=this.getPrevIndex(n),l=this.getNextIndex(r);return{firstIndex:n,lastIndex:r,activeSlides:s,prevIndex:a,nextIndex:l}}updateSlides(t=8,s=!1){var c,h,d,p;if(!this.scope.items.length)return[];const{activeSlides:n,firstIndex:r,prevIndex:a,nextIndex:l}=this.updateActiveSlides(t);if(!n.length&&!s){let u=t*2;if(this.scope.angle==="horizontal"){const f=((h=(c=this.scope.items[0])==null?void 0:c.el)==null?void 0:h.clientWidth)||0;f&&(u=Math.round(f/2-.5))}else{const f=((p=(d=this.scope.items[0])==null?void 0:d.el)==null?void 0:p.clientHeight)||0;f&&(u=Math.round(f/2-.5))}return this.updateSlides(u,!0)}return this.scope.activeSlides=n,this.scope.prevIndex=a,this.scope.nextIndex=l,this.updateControls(),this.updateIndicators(),this.scope.sticky&&this.goTo(r),n}updateControls(){const t=this.isScrollable();if(this.scope.showControls=this.scope.controls&&t&&this.scope.items.length>1,this.scope.infinite){this.scope.enableNextControl=!0,this.scope.enablePrevControl=!0;return}this.scope.enableNextControl=t&&this.scope.nextIndex!==-1&&this.scope.nextIndex<=this.scope.items.length-1,this.scope.enablePrevControl=t&&this.scope.prevIndex!==-1&&this.scope.prevIndex>=0}updateIndicators(){const t=this.isScrollable();this.scope.showIndicators=this.scope.indicators&&t&&this.scope.items.length>1}requiredAttributes(){return[]}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r),t==="items"&&this.validateItems(),t==="drag"&&(this.scope.drag?this.enableDesktopDragscroll():this.disableDesktopDragscroll()),t==="touchScroll"&&(this.scope.touchScroll?this.enableTouchScroll():this.disableTouchScroll()),(t==="controls"||t==="controlsPosition")&&this.setControlsOptions(),(t==="indicators"||t==="indicatorsPosition")&&this.setIndicatorsOptions(),t==="columns"&&this.updateColumns()}disconnectedCallback(){this.removeEventListeners()}async beforeTemplate(){var s;const t=Array.from(this.querySelectorAll("template"));for(const n of t){const r=n.getAttribute("type");switch(r){case"slide-item":this.scope.slideTemplate=((s=n.content.children.item(0))==null?void 0:s.outerHTML)||void 0,this.debug("Slide template found!",this.scope.slideTemplate);break;default:console.warn(`Unknown template type: ${r}`,n);break}}}template(){return null}};let Vt=Ht;o(Vt,"EVENTS",{scrolling:"scrolling",scrollended:"scrollended"}),o(Vt,"tagName","bs5-slider");const Kr=class extends P{constructor(){super();o(this,"autobind",!0);o(this,"alreadyStartedPlaying",!1);o(this,"wasPaused",!1);o(this,"_debug",!1);o(this,"video");o(this,"scope",{muted:this.muted,volume:this.volume,loop:this.loop,controls:this.controls,currentTime:this.currentTime,videoSrc:void 0,autoplayOnMinBuffer:0,autoplayMediaQuery:"",disablePictureInPicture:this.disablePictureInPicture,paused:this.paused,loading:!1,duration:0,readyState:Gn.HAVE_NOTHING,buffer:0,toggleMute:this.toggleMute,toggleControls:this.toggleControls,play:this.play,pause:this.pause,togglePlay:this.togglePlay,togglePause:this.togglePause,reset:this.reset});o(this,"onUpdate",this._onUpdate.bind(this));o(this,"forceAutoplay",this._forceAutoplay.bind(this));o(this,"onMediaQueryListEvent",this._onMediaQueryListEvent.bind(this));o(this,"onVideoProgress",this._onVideoProgress.bind(this));o(this,"onLoadStart",this._onLoadStart.bind(this));o(this,"onCanPlay",this._onCanPlay.bind(this));o(this,"onCanPlayThrough",this._onCanPlayThrough.bind(this));o(this,"onWaiting",this._onWaiting.bind(this));o(this,"onDurationChange",this._onDurationChange.bind(this));o(this,"onTimeUpdate",this._onTimeUpdate.bind(this));o(this,"onPlay",this._onPlay.bind(this));o(this,"onPause",this._onPause.bind(this));this.video=this.getVideoEl()}static get observedAttributes(){return["video-src","autoplay-on-min-buffer","autoplay-media-query"]}get muted(){return this.video&&this.video.muted}set muted(t){this.video.muted=t,this.scope.muted=this.video.muted,t?this.video.setAttribute("muted",""):this.video.removeAttribute("muted"),this.onUpdate()}get volume(){var t;return((t=this.video)==null?void 0:t.volume)||0}set volume(t){this.video.volume=t,this.onUpdate()}get loop(){var t;return(t=this.video)==null?void 0:t.loop}set loop(t){this.video.loop=t,t?this.video.setAttribute("loop",""):this.video.removeAttribute("loop"),this.onUpdate()}get controls(){var t;return(t=this.video)==null?void 0:t.controls}set controls(t){this.video.controls=t,this.scope.controls=this.video.controls,t?(this.video.setAttribute("controls",""),this.video.dispatchEvent(new Event("mouseover")),this.video.dispatchEvent(new Event("mouseenter")),this.video.dispatchEvent(new Event("mousemove"))):this.video.removeAttribute("controls"),this.onUpdate()}get currentTime(){var t;return((t=this.video)==null?void 0:t.currentTime)||0}set currentTime(t){this.video.currentTime=t,this.onUpdate()}get autoplay(){var t;return((t=this.video)==null?void 0:t.autoplay)||!1}set autoplay(t){this.video.autoplay=t,this.onUpdate()}get height(){var t;return((t=this.video)==null?void 0:t.height)||0}set height(t){this.video.height=t,this.onUpdate()}get width(){var t;return((t=this.video)==null?void 0:t.width)||0}set width(t){this.video.width=t,this.onUpdate()}get poster(){var t;return(t=this.video)==null?void 0:t.poster}set poster(t){this.video.poster=t,this.onUpdate()}get preload(){var t;return(t=this.video)==null?void 0:t.preload}set preload(t){this.video.preload=t,this.onUpdate()}get disablePictureInPicture(){var t,s;return((t=this.video)==null?void 0:t.disablePictureInPicture)||((s=this.video)==null?void 0:s.hasAttribute("disablePictureInPicture"))||!1}set disablePictureInPicture(t){var s;typeof((s=this.video)==null?void 0:s.disablePictureInPicture)<"u"&&(this.video.disablePictureInPicture=t),t?this.video.setAttribute("disablePictureInPicture",""):this.video.removeAttribute("disablePictureInPicture"),this.onUpdate()}get paused(){var t;return((t=this.video)==null?void 0:t.paused)??!0}getVideoEl(){const t=this.querySelector("video");if(!t)throw new Error("No video element found");return t}load(){this.video.load()}toggleMute(){this.debug("toggleMute"),this.muted=!this.muted,this.onUpdate()}toggleControls(){this.debug("toggleControls"),this.controls=!this.controls,this.onUpdate()}async play(){this.debug("play");try{this.video.play()}catch(t){this.error(t)}}pause(){this.debug("pause"),this.video.pause(),this.onUpdate()}async togglePlay(){return this.paused?this.play():this.pause()}togglePause(){return this.debug("togglePause"),this.togglePlay()}reset(){this.debug("reset"),this.video.currentTime=0,this.onUpdate()}connectedCallback(){super.connectedCallback(),this.init(Kr.observedAttributes),this.video=this.getVideoEl(),(this.preload==="auto"||this.preload==="metadata")&&this.load()}initVideoElement(){const t=this.querySelector("video");if(!t)throw new Error("The video child element is required!");this.video=t,this.addEventListeners(),this.onUpdate()}resetVideo(){this.video.innerHTML="";const t=this.video.cloneNode(!0),s=this.querySelector(".video-wrapper");this.removeEventListeners(),this.video.remove(),s?s.appendChild(t):this.appendChild(t),this.video=t,this.video.hasAttribute("muted")?this.muted=!0:this.muted=!1,this.video.hasAttribute("controls")?this.controls=!0:this.controls=!1,this.video.hasAttribute("autoplay")?this.autoplay=!0:this.autoplay=!1,this.video.hasAttribute("height")&&(this.height=ps(this.video.getAttribute("height")||0)),this.video.hasAttribute("width")&&(this.width=ps(this.video.getAttribute("width")||0)),this.video.hasAttribute("loop")?this.loop=!0:this.loop=!1,this.video.hasAttribute("muted")?this.muted=!0:this.muted=!1,this.video.hasAttribute("poster")&&(this.poster=this.video.getAttribute("poster")||""),this.video.hasAttribute("preload")&&(this.preload=this.video.getAttribute("preload")||""),this.video.hasAttribute("disablePictureInPicture")?this.disablePictureInPicture=!0:this.disablePictureInPicture=!1,this.scope.readyState=Gn.HAVE_NOTHING,this.alreadyStartedPlaying=!1,this.scope.loading=!1,this.initVideoElement(),this.reset()}setVideoSource(){if(this.scope.videoSrc){this.resetVideo();let t=this.video.querySelector("source");t||(t=document.createElement("source"),this.video.appendChild(t)),t.setAttribute("src",this.scope.videoSrc)}}parsedAttributeChangedCallback(t,s,n,r){super.parsedAttributeChangedCallback(t,s,n,r),this.debug("parsedAttributeChangedCallback",t),t==="videoSrc"&&this.setVideoSource()}addEventListeners(){if(this.scope.autoplayMediaQuery){const t=window.matchMedia(this.scope.autoplayMediaQuery);t.addEventListener("change",this.onMediaQueryListEvent),t.matches&&this.startAutoplay()}this.video.addEventListener("progress",this.onVideoProgress),this.video.addEventListener("loadstart",this.onLoadStart),this.video.addEventListener("canplay",this.onCanPlay),this.video.addEventListener("canplaythrough",this.onCanPlayThrough),this.video.addEventListener("waiting",this.onWaiting),this.video.addEventListener("durationchange",this.onDurationChange),this.video.addEventListener("timeupdate",this.onTimeUpdate),this.video.addEventListener("play",this.onPlay),this.video.addEventListener("pause",this.onPause)}removeEventListeners(){this.scope.autoplayMediaQuery&&window.matchMedia(this.scope.autoplayMediaQuery).removeEventListener("change",this.onMediaQueryListEvent),this.video.removeEventListener("progress",this.onVideoProgress),this.video.removeEventListener("loadstart",this.onLoadStart),this.video.removeEventListener("canplay",this.onCanPlay),this.video.removeEventListener("canplaythrough",this.onCanPlayThrough),this.video.removeEventListener("waiting",this.onWaiting),this.video.removeEventListener("durationchange",this.onDurationChange),this.video.removeEventListener("timeupdate",this.onTimeUpdate),this.video.removeEventListener("play",this.onPlay),this.video.removeEventListener("pause",this.onPause)}_onUpdate(){this.scope.muted!==this.video.muted&&(this.scope.muted=this.video.muted),this.scope.volume!==this.video.volume&&(this.scope.volume=this.video.volume),this.scope.loop!==this.video.loop&&(this.scope.loop=this.video.loop),this.scope.controls!==this.video.controls&&(this.scope.controls=this.video.controls),this.scope.currentTime!==this.video.currentTime&&(this.scope.currentTime=this.video.currentTime),this.scope.paused!==this.video.paused&&(this.scope.paused=this.video.paused),this.scope.duration!==this.video.duration&&(this.scope.duration=this.video.duration),this.scope.readyState!==this.video.readyState&&(this.scope.readyState=this.video.readyState)}async beforeBind(){this.initVideoElement()}async afterBind(){this.video.load()}startAutoplay(){this.scope.autoplayOnMinBuffer?this.forceLoad():this.forceAutoplay()}forceLoad(){this.video.setAttribute("preload","auto"),this.video.load()}_forceAutoplay(){this.alreadyStartedPlaying||(this.alreadyStartedPlaying=!0,this.video.muted=!0,this.forceLoad(),this.play())}_onMediaQueryListEvent(t){t.matches?this.alreadyStartedPlaying?this.wasPaused||this.play():this.startAutoplay():(this.wasPaused=this.video.paused,this.pause())}_onVideoProgress(){if(this.debug("_onVideoProgress"),this.alreadyStartedPlaying)return;if(isNaN(this.video.duration)){console.warn("Video duration is NaN");return}let t=0;for(let s=0;sthis.scope.autoplayOnMinBuffer&&this.forceAutoplay()}_onLoadStart(){this.debug("_onLoadStart"),this.scope.loading=!0,this.onUpdate()}_onCanPlay(){this.debug("_onCanPlay"),this.onUpdate()}_onCanPlayThrough(){this.scope.loading=!1,this.scope.autoplayOnMinBuffer&&this.forceAutoplay(),this.onUpdate()}_onWaiting(){this.debug("_onPlay"),this.scope.loading=!0,this.onUpdate()}_onDurationChange(){this.onUpdate()}_onTimeUpdate(){this.onUpdate()}_onPlay(){this.debug("_onPlay"),this.scope.loading=!1,this.alreadyStartedPlaying=!0,this.scope.paused=!1,this.onUpdate()}_onPause(){this.scope.paused=!0,this.onUpdate()}async init(t){return super.init(t).then(s=>s)}disconnectedCallback(){super.disconnectedCallback()}template(){return null}};let di=Kr;o(di,"tagName","rv-video");const Gr=class extends P{constructor(){super(...arguments);o(this,"scope",{autoplay:!1});o(this,"slider",null);o(this,"videoCo",null);o(this,"videoEl",null);o(this,"slideEl",null)}static get observedAttributes(){return["autoplay"]}connectedCallback(){super.connectedCallback(),this.init(Gr.observedAttributes),this.onSlideEnd=this.onSlideEnd.bind(this)}onSlideEnd(t){var s;this.debug("[Bs5SlideVideoComponent] onSlideEnd",t,(s=this.slideEl)==null?void 0:s.classList),this.scope.autoplay&&this.playIfActive()}playIfActive(){var t;(t=this.slideEl)!=null&&t.classList.contains("active")&&(this.videoCo?this.videoCo.play():this.videoEl&&this.videoEl.play())}addEventListeners(){var t;(t=this.slider)==null||t.addEventListener(Vt.EVENTS.scrollended,this.onSlideEnd)}removeEventListeners(){var t;(t=this.slider)==null||t.removeEventListener(Vt.EVENTS.scrollended,this.onSlideEnd)}async beforeBind(){await super.beforeBind(),this.addEventListeners()}async afterBind(){this.scope.autoplay&&this.playIfActive(),await super.beforeBind()}async beforeTemplate(){this.slider=this.closest(Vt.tagName),this.videoCo=this.querySelector(di.tagName),this.videoEl=this.querySelector("video"),this.slideEl=this.closest(".slide")}template(){return null}};let ui=Gr;o(ui,"tagName","bs5-slide-video");const Qb=`