diff --git a/views/assets/scripts.js b/views/assets/scripts.js index 050c2f2..457e891 100644 --- a/views/assets/scripts.js +++ b/views/assets/scripts.js @@ -1,11 +1,11 @@ -var We = Object.defineProperty; -var se = (r) => { +var Ve = Object.defineProperty; +var ee = (r) => { throw TypeError(r); }; -var Ge = (r, t, e) => t in r ? We(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e; -var I = (r, t, e) => Ge(r, typeof t != "symbol" ? t + "" : t, e), z = (r, t, e) => t.has(r) || se("Cannot " + e); -var K = (r, t, e) => (z(r, t, "read from private field"), e ? e.call(r) : t.get(r)), w = (r, t, e) => t.has(r) ? se("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), $ = (r, t, e, i) => (z(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e), N = (r, t, e) => (z(r, t, "access private method"), e); -class Je extends HTMLElement { +var Ue = (r, t, e) => t in r ? Ve(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e; +var C = (r, t, e) => Ue(r, typeof t != "symbol" ? t + "" : t, e), F = (r, t, e) => t.has(r) || ee("Cannot " + e); +var V = (r, t, e) => (F(r, t, "read from private field"), e ? e.call(r) : t.get(r)), I = (r, t, e) => t.has(r) ? ee("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), O = (r, t, e, i) => (F(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e), B = (r, t, e) => (F(r, t, "access private method"), e); +class ze extends HTMLElement { constructor() { super(), this._value = "", this.render(); } @@ -74,13 +74,13 @@ class Je extends HTMLElement { `; } } -const D = "filter-list-list", Qe = "filter-list-item", Ye = "filter-list-input", ne = "filter-list-searchable"; -var L, O, ie; -class Xe extends HTMLElement { +const M = "filter-list-list", Ke = "filter-list-item", We = "filter-list-input", te = "filter-list-searchable"; +var y, R, Z; +class je extends HTMLElement { constructor() { super(); - w(this, O); - w(this, L, !1); + I(this, R); + I(this, y, !1); this._items = [], this._url = "", this._filterstart = !1, this._placeholder = "Liste filtern...", this._queryparam = "", this._startparams = null, this.render(); } static get observedAttributes() { @@ -93,7 +93,7 @@ class Xe extends HTMLElement { return this._items; } connectedCallback() { - this._url = this.getAttribute("data-url") || "./", this._filterstart = this.getAttribute("data-filterstart") === "true", this._placeholder = this.getAttribute("data-placeholder") || "Liste filtern...", this._queryparam = this.getAttribute("data-queryparam") || "", this._queryparam, this._filterstart && $(this, L, !0), this.addEventListener("input", this.onInput.bind(this)), this.addEventListener("keydown", this.onEnter.bind(this)), this.addEventListener("focusin", this.onGainFocus.bind(this)), this.addEventListener("focusout", this.onLoseFocus.bind(this)); + this._url = this.getAttribute("data-url") || "./", this._filterstart = this.getAttribute("data-filterstart") === "true", this._placeholder = this.getAttribute("data-placeholder") || "Liste filtern...", this._queryparam = this.getAttribute("data-queryparam") || "", this._queryparam, this._filterstart && O(this, y, !0), this.addEventListener("input", this.onInput.bind(this)), this.addEventListener("keydown", this.onEnter.bind(this)), this.addEventListener("focusin", this.onGainFocus.bind(this)), this.addEventListener("focusout", this.onLoseFocus.bind(this)); } attributeChangedCallback(e, i, s) { e === "data-url" && i !== s && (this._url = s, this.render()), e === "data-filterstart" && i !== s && (this._filterstart = s === "true", this.render()), e === "data-placeholder" && i !== s && (this._placeholder = s, this.render()), e === "data-queryparam" && i !== s && (this._queryparam = s, this.render()); @@ -102,14 +102,14 @@ class Xe extends HTMLElement { e.target && e.target.tagName.toLowerCase() === "input" && (this._filter = e.target.value, this.renderList()); } onGainFocus(e) { - e.target && e.target.tagName.toLowerCase() === "input" && ($(this, L, !1), this.renderList()); + e.target && e.target.tagName.toLowerCase() === "input" && (O(this, y, !1), this.renderList()); } onLoseFocus(e) { let i = this.querySelector("input"); if (e.target && e.target === i) { if (relatedElement = e.relatedTarget, relatedElement && this.contains(relatedElement)) return; - i.value = "", this._filter = "", this._filterstart && $(this, L, !0), this.renderList(); + i.value = "", this._filter = "", this._filterstart && O(this, y, !0), this.renderList(); } } onEnter(e) { @@ -122,10 +122,10 @@ class Xe extends HTMLElement { mark() { if (typeof Mark != "function") return; - let e = this.querySelector("#" + D); + let e = this.querySelector("#" + M); if (!e) return; - let i = new Mark(e.querySelectorAll("." + ne)); + let i = new Mark(e.querySelectorAll("." + te)); this._filter && i.mark(this._filter, { separateWordSearch: !0 }); @@ -165,7 +165,7 @@ class Xe extends HTMLElement { } getLinkText(e) { let i = this.getSearchText(e); - return i === "" ? "" : `${i}`; + return i === "" ? "" : `${i}`; } getURL(e) { if (this._queryparam) { @@ -175,7 +175,7 @@ class Xe extends HTMLElement { return this._url + this.getHREFEncoded(e); } renderList() { - let e = this.querySelector("#" + D); + let e = this.querySelector("#" + M); e && (e.outerHTML = this.List()), this.mark(); } render() { @@ -187,7 +187,7 @@ class Xe extends HTMLElement { `, htmx && htmx.process(this); } ActiveDot(e) { - return N(this, O, ie).call(this, e), ""; + return B(this, R, Z).call(this, e), ""; } NoItems(e) { return e.length === 0 ? '
Keine Einträge gefunden
' : ""; @@ -200,7 +200,7 @@ class Xe extends HTMLElement { + class="${We} w-full placeholder:italic px-2 py-0.5" /> `; @@ -215,7 +215,7 @@ class Xe extends HTMLElement { e = this._items.filter((s) => i.every((n) => this.getSearchText(s).toLowerCase().includes(n.toLowerCase()))); } return ` -
+
${e.map( (i, s) => ` + class="${Ke} block px-2.5 py-0.5 hover:bg-slate-200 no-underline ${s % 2 === 0 ? "bg-stone-100" : "bg-stone-50"}" + ${B(this, R, Z).call(this, i) ? 'aria-current="page"' : ""}> ${this.ActiveDot(i)} ${this.getLinkText(i)} @@ -236,13 +236,13 @@ class Xe extends HTMLElement { `; } } -L = new WeakMap(), O = new WeakSet(), ie = function(e) { +y = new WeakMap(), R = new WeakSet(), Z = function(e) { if (!e) return !1; let i = this.getHREF(e); return i === "" ? !1 : this._queryparam && (new URLSearchParams(window.location.search).get(this._queryparam) || "") === i ? !0 : !!window.location.href.endsWith(i); }; -class Ze extends HTMLElement { +class Ge extends HTMLElement { constructor() { super(), this.handleScroll = this.handleScroll.bind(this), this.scrollToTop = this.scrollToTop.bind(this); } @@ -278,7 +278,7 @@ class Ze extends HTMLElement { window.scrollTo({ top: 0, behavior: "smooth" }); } } -class et extends HTMLElement { +class Je extends HTMLElement { static get observedAttributes() { return ["position", "timeout"]; } @@ -379,7 +379,7 @@ class et extends HTMLElement { } } } -class tt extends HTMLElement { +class Qe extends HTMLElement { constructor() { super(), this.overlay = null, this._others = null, this._thisindex = -1, this._preview = null, this._description = null, this._imageURL = "", this._hideDLButton = !1; } @@ -487,7 +487,7 @@ class tt extends HTMLElement { this.overlay.parentNode.removeChild(this.overlay), this.overlay = null; } } -class it extends HTMLElement { +class Ye extends HTMLElement { static get observedAttributes() { } constructor() { @@ -605,7 +605,7 @@ class it extends HTMLElement { return null; } } -class R extends HTMLElement { +class k extends HTMLElement { static get observedAttributes() { return ["data-text", "data-abbrevmap"]; } @@ -668,7 +668,7 @@ class R extends HTMLElement { }; } constructor() { - super(), this._abbrevMap = R.defaultAbbrevMap; + super(), this._abbrevMap = k.defaultAbbrevMap; } connectedCallback() { this.render(); @@ -678,13 +678,13 @@ class R extends HTMLElement { } _parseAndSetAbbrevMap(t) { if (!t) { - this._abbrevMap = R.defaultAbbrevMap; + this._abbrevMap = k.defaultAbbrevMap; return; } try { this._abbrevMap = JSON.parse(t); } catch { - this._abbrevMap = R.defaultAbbrevMap; + this._abbrevMap = k.defaultAbbrevMap; } } setAbbrevMap(t) { @@ -734,7 +734,7 @@ class R extends HTMLElement { return /\s|[.,;:!?]/.test(t); } } -class st extends HTMLElement { +class Xe extends HTMLElement { constructor() { super(); } @@ -752,11 +752,11 @@ class st extends HTMLElement { } } } -var F; -class nt extends HTMLElement { +var P; +class Ze extends HTMLElement { constructor() { super(); - w(this, F, 176); + I(this, P, 176); this._images = []; } connectedCallback() { @@ -772,17 +772,17 @@ class nt extends HTMLElement { calculateShownImages() { const e = this.getBoundingClientRect(); console.log(e); - const i = Math.floor(e.width / (K(this, F) + 10)); + const i = Math.floor(e.width / (V(this, P) + 10)); for (let s = 0; s < this._images.length; s++) s < i - 1 ? this._images[s].classList.remove("hidden") : this._images[s].classList.add("hidden"); } } -F = new WeakMap(); -const at = "msr-component-wrapper", ae = "msr-selected-items-container", re = "msr-placeholder-no-selection-text", rt = "msr-selected-item-pill", lt = "msr-selected-item-text", ot = "msr-item-name", dt = "msr-item-additional-data", ht = "msr-selected-item-role", le = "msr-selected-item-delete-btn", ct = "msr-controls-area", oe = "msr-pre-add-button", de = "msr-input-area-wrapper", q = "msr-input-area-default-border", j = "msr-input-area-staged", he = "msr-staging-area-container", ut = "msr-staged-item-pill", mt = "msr-staged-item-text", W = "msr-staged-role-select", ce = "msr-staged-cancel-btn", ue = "msr-text-input", me = "msr-add-button", _e = "msr-options-list", pe = "msr-option-item", _t = "msr-option-item-name", pt = "msr-option-item-detail", fe = "msr-option-item-highlighted", G = "msr-hidden-select", ft = "msr-state-no-selection", gt = "msr-state-has-selection", bt = "msr-state-list-open", Et = "msr-state-item-staged"; -class Ne extends HTMLElement { +P = new WeakMap(); +const et = "msr-component-wrapper", ie = "msr-selected-items-container", se = "msr-placeholder-no-selection-text", tt = "msr-selected-item-pill", it = "msr-selected-item-text", st = "msr-item-name", nt = "msr-item-additional-data", at = "msr-selected-item-role", ne = "msr-selected-item-delete-btn", rt = "msr-controls-area", ae = "msr-pre-add-button", re = "msr-input-area-wrapper", $ = "msr-input-area-default-border", U = "msr-input-area-staged", le = "msr-staging-area-container", lt = "msr-staged-item-pill", ot = "msr-staged-item-text", z = "msr-staged-role-select", oe = "msr-staged-cancel-btn", de = "msr-text-input", he = "msr-add-button", ce = "msr-options-list", ue = "msr-option-item", dt = "msr-option-item-name", ht = "msr-option-item-detail", me = "msr-option-item-highlighted", K = "msr-hidden-select", ct = "msr-state-no-selection", ut = "msr-state-has-selection", mt = "msr-state-list-open", _t = "msr-state-item-staged"; +class Be extends HTMLElement { constructor() { super(); - I(this, "_blurTimeout", null); + C(this, "_blurTimeout", null); this.internals_ = this.attachInternals(), this._value = [], this._stagedItem = null, this._showAddButton = !0, this._placeholderNoSelection = "Keine Elemente ausgewählt", this._placeholderSearch = "Elemente suchen...", this._placeholderRoleSelect = "Rolle auswählen...", this._options = [], this._roles = [ "Leitung", "Unterstützung", @@ -858,23 +858,23 @@ class Ne extends HTMLElement { } _setupTemplates() { this.optionTemplate = document.createElement("template"), this.optionTemplate.innerHTML = ` -
  • - - +
  • + +
  • `, this.selectedItemTemplate = document.createElement("template"), this.selectedItemTemplate.innerHTML = ` - - - + + + `, this.stagedPlacePillTemplate = document.createElement("template"), this.stagedPlacePillTemplate.innerHTML = ` - - + + `, this.stagedCancelBtnTemplate = document.createElement("template"), this.stagedCancelBtnTemplate.innerHTML = ` - + `, this.stagedRoleSelectTemplate = document.createElement("template"), this.stagedRoleSelectTemplate.innerHTML = ` - `; } @@ -936,7 +936,7 @@ class Ne extends HTMLElement { this.setAttribute("name", e), this.hiddenSelect && (this.hiddenSelect.name = e); } connectedCallback() { - if (this.placeholderNoSelection = this.getAttribute("placeholder-no-selection") || this._placeholderNoSelection, this.placeholderSearch = this.getAttribute("placeholder-search") || this._placeholderSearch, this.placeholderRoleSelect = this.getAttribute("placeholder-role-select") || this._placeholderRoleSelect, this._render(), this.inputAreaWrapper = this.querySelector(`.${de}`), this.inputElement = this.querySelector(`.${ue}`), this.stagedItemPillContainer = this.querySelector(`.${he}`), this.optionsListElement = this.querySelector(`.${_e}`), this.selectedItemsContainer = this.querySelector(`.${ae}`), this.addButtonElement = this.querySelector(`.${me}`), this.preAddButtonElement = this.querySelector(`.${oe}`), this.hiddenSelect = this.querySelector(`.${G}`), this.name && this.hiddenSelect && (this.hiddenSelect.name = this.name), this.hasAttribute("show-add-button") ? this.showAddButton = this.getAttribute("show-add-button") : this.setAttribute("show-add-button", String(this._showAddButton)), this.inputElement && (this.inputElement.placeholder = this.placeholderSearch), this.inputElement.addEventListener("input", this._handleInput), this.inputElement.addEventListener("keydown", this._handleInputKeyDown), this.inputElement.addEventListener("focus", this._handleFocus), this.inputElement.addEventListener("blur", this._handleBlur), this.optionsListElement.addEventListener("mousedown", this._handleOptionMouseDown), this.optionsListElement.addEventListener("click", this._handleOptionClick), this.addButtonElement.addEventListener("click", this._handleAddButtonClick), this.addEventListener("keydown", this._handleKeyDown), this._renderStagedPillOrInput(), this._updateAddButtonState(), this._updatePreAddButtonVisibility(), this._updateRootElementStateClasses(), this.hasAttribute("value")) { + if (this.placeholderNoSelection = this.getAttribute("placeholder-no-selection") || this._placeholderNoSelection, this.placeholderSearch = this.getAttribute("placeholder-search") || this._placeholderSearch, this.placeholderRoleSelect = this.getAttribute("placeholder-role-select") || this._placeholderRoleSelect, this._render(), this.inputAreaWrapper = this.querySelector(`.${re}`), this.inputElement = this.querySelector(`.${de}`), this.stagedItemPillContainer = this.querySelector(`.${le}`), this.optionsListElement = this.querySelector(`.${ce}`), this.selectedItemsContainer = this.querySelector(`.${ie}`), this.addButtonElement = this.querySelector(`.${he}`), this.preAddButtonElement = this.querySelector(`.${ae}`), this.hiddenSelect = this.querySelector(`.${K}`), this.name && this.hiddenSelect && (this.hiddenSelect.name = this.name), this.hasAttribute("show-add-button") ? this.showAddButton = this.getAttribute("show-add-button") : this.setAttribute("show-add-button", String(this._showAddButton)), this.inputElement && (this.inputElement.placeholder = this.placeholderSearch), this.inputElement.addEventListener("input", this._handleInput), this.inputElement.addEventListener("keydown", this._handleInputKeyDown), this.inputElement.addEventListener("focus", this._handleFocus), this.inputElement.addEventListener("blur", this._handleBlur), this.optionsListElement.addEventListener("mousedown", this._handleOptionMouseDown), this.optionsListElement.addEventListener("click", this._handleOptionClick), this.addButtonElement.addEventListener("click", this._handleAddButtonClick), this.addEventListener("keydown", this._handleKeyDown), this._renderStagedPillOrInput(), this._updateAddButtonState(), this._updatePreAddButtonVisibility(), this._updateRootElementStateClasses(), this.hasAttribute("value")) { const e = this.getAttribute("value"); try { const i = JSON.parse(e); @@ -964,10 +964,10 @@ class Ne extends HTMLElement { this.disabledCallback(e); } disabledCallback(e) { - this.inputElement && (this.inputElement.disabled = e), this.classList.toggle("pointer-events-none", e), this.querySelectorAll(`.${le}`).forEach( + this.inputElement && (this.inputElement.disabled = e), this.classList.toggle("pointer-events-none", e), this.querySelectorAll(`.${ne}`).forEach( (s) => s.disabled = e ); - const i = this.querySelector(`.${W}`); + const i = this.querySelector(`.${z}`); i && (i.disabled = e), this.hiddenSelect && (this.hiddenSelect.disabled = e), this._updateAddButtonState(), this._updatePreAddButtonVisibility(); } formResetCallback() { @@ -987,39 +987,39 @@ class Ne extends HTMLElement { this.internals_.setFormValue(null), this._synchronizeHiddenSelect(); } _updateRootElementStateClasses() { - this.classList.toggle(ft, this._value.length === 0), this.classList.toggle(gt, this._value.length > 0), this.classList.toggle(bt, this._isOptionsListVisible), this.classList.toggle(Et, !!this._stagedItem); + this.classList.toggle(ct, this._value.length === 0), this.classList.toggle(ut, this._value.length > 0), this.classList.toggle(mt, this._isOptionsListVisible), this.classList.toggle(_t, !!this._stagedItem); } _render() { const e = this.id || `msr-${crypto.randomUUID().slice(0, 8)}`; this.id || this.setAttribute("id", e), this.innerHTML = ` -
    -
    - ${this._value.length === 0 ? `${this.placeholderNoSelection}` : ""} +
    +
    + ${this._value.length === 0 ? `${this.placeholderNoSelection}` : ""}
    -
    -
    - +
    +
    +
    - +
    - - + +
    `; } @@ -1041,7 +1041,7 @@ class Ne extends HTMLElement { _renderStagedPillOrInput() { if (!(!this.stagedItemPillContainer || !this.inputElement || !this.inputAreaWrapper)) { if (this.stagedItemPillContainer.innerHTML = "", this._stagedItem && this._stagedItem.item) { - this.inputAreaWrapper.classList.remove(q), this.inputAreaWrapper.classList.add(j); + this.inputAreaWrapper.classList.remove($), this.inputAreaWrapper.classList.add(U); const e = this._createStagedItemPillElement(this._stagedItem.item); this.stagedItemPillContainer.appendChild(e); const i = this._getAvailableRolesForItem(this._stagedItem.item.id), s = this._createStagedRoleSelectElement( @@ -1052,7 +1052,7 @@ class Ne extends HTMLElement { const n = this._createStagedCancelButtonElement(this._stagedItem.item.name); this.stagedItemPillContainer.appendChild(n), this.inputElement.classList.add("hidden"), this.inputElement.value = "", this.inputElement.removeAttribute("aria-activedescendant"), this.inputElement.setAttribute("aria-expanded", "false"); } else - this.inputAreaWrapper.classList.add(q), this.inputAreaWrapper.classList.remove(j), this.inputElement.classList.remove("hidden"); + this.inputAreaWrapper.classList.add($), this.inputAreaWrapper.classList.remove(U), this.inputElement.classList.remove("hidden"); this._updateAddButtonState(), this._updatePreAddButtonVisibility(), this._updateRootElementStateClasses(); } } @@ -1071,7 +1071,7 @@ class Ne extends HTMLElement { const i = this._getItemById(e.itemId); if (!i) return null; const n = this.selectedItemTemplate.content.cloneNode(!0).firstElementChild, a = n.querySelector('[data-ref="textEl"]'); - let l = `${i.name}`, o = i.additional_data ? ` (${i.additional_data})` : "", d = ` ${e.role}`; + let l = `${i.name}`, o = i.additional_data ? ` (${i.additional_data})` : "", d = ` ${e.role}`; a.innerHTML = `${l}${o}${d}`; const c = n.querySelector('[data-ref="deleteBtn"]'); return c.setAttribute("aria-label", `Entferne ${i.name} als ${e.role}`), c.dataset.instanceId = e.instanceId, c.disabled = this.hasAttribute("disabled"), c.addEventListener("click", (h) => { @@ -1079,7 +1079,7 @@ class Ne extends HTMLElement { }), n; } _renderSelectedItems() { - this.selectedItemsContainer && (this.selectedItemsContainer.innerHTML = "", this._value.length === 0 ? this.selectedItemsContainer.innerHTML = `${this.placeholderNoSelection}` : this._value.forEach((e) => { + this.selectedItemsContainer && (this.selectedItemsContainer.innerHTML = "", this._value.length === 0 ? this.selectedItemsContainer.innerHTML = `${this.placeholderNoSelection}` : this._value.forEach((e) => { const i = this._createSelectedItemElement(e); i && this.selectedItemsContainer.appendChild(i); }), this._updateRootElementStateClasses()); @@ -1092,7 +1092,7 @@ class Ne extends HTMLElement { } _createOptionElement(e, i) { const n = this.optionTemplate.content.cloneNode(!0).firstElementChild; - return n.querySelector('[data-ref="nameEl"]').textContent = e.name, n.querySelector('[data-ref="detailEl"]').textContent = e.additional_data ? `(${e.additional_data})` : "", n.dataset.id = e.id, n.setAttribute("aria-selected", String(i === this._highlightedIndex)), n.id = `${this.id || "msr"}-option-${e.id}`, i === this._highlightedIndex && n.classList.add(fe), n; + return n.querySelector('[data-ref="nameEl"]').textContent = e.name, n.querySelector('[data-ref="detailEl"]').textContent = e.additional_data ? `(${e.additional_data})` : "", n.dataset.id = e.id, n.setAttribute("aria-selected", String(i === this._highlightedIndex)), n.id = `${this.id || "msr"}-option-${e.id}`, i === this._highlightedIndex && n.classList.add(me), n; } _renderOptionsList() { if (!(!this.optionsListElement || !this.inputElement)) { @@ -1104,7 +1104,7 @@ class Ne extends HTMLElement { this.optionsListElement.appendChild(n); }); const e = this.optionsListElement.querySelector( - `.${fe}` + `.${me}` ); e ? (e.scrollIntoView({ block: "nearest" }), this.inputElement.setAttribute("aria-activedescendant", e.id)) : this.inputElement.removeAttribute("aria-activedescendant"); } @@ -1116,7 +1116,7 @@ class Ne extends HTMLElement { return; this._stagedItem = { item: e, currentRole: "" }, this.inputElement && (this.inputElement.value = "", this.inputElement.setAttribute("aria-expanded", "false"), this.inputElement.removeAttribute("aria-activedescendant")), this._renderStagedPillOrInput(), this._hideOptionsList(); const s = this.stagedItemPillContainer.querySelector( - `.${W}` + `.${z}` ); s && !s.disabled ? s.focus() : this.addButtonElement && !this.addButtonElement.disabled && this.addButtonElement.focus(); } @@ -1153,7 +1153,7 @@ class Ne extends HTMLElement { if (!this.hasAttribute("disabled")) { if (e.key === "Enter" && this._stagedItem && this._stagedItem.item) { const s = document.activeElement, n = (i = this.stagedItemPillContainer) == null ? void 0 : i.querySelector( - `.${ce}` + `.${oe}` ); if (s === n) { e.preventDefault(), this._handleCancelStagedItem(e); @@ -1191,7 +1191,7 @@ class Ne extends HTMLElement { } _handleFocus() { if (!(this.hasAttribute("disabled") || this.inputElement && this.inputElement.disabled || this._stagedItem)) { - if (!this._stagedItem && this.inputAreaWrapper && (this.inputAreaWrapper.classList.add(q), this.inputAreaWrapper.classList.remove(j)), this.inputElement && this.inputElement.value.length > 0) { + if (!this._stagedItem && this.inputAreaWrapper && (this.inputAreaWrapper.classList.add($), this.inputAreaWrapper.classList.remove(U)), this.inputElement && this.inputElement.value.length > 0) { const e = this.inputElement.value.toLowerCase(); this._filteredOptions = this._options.filter((i) => this._getAvailableRolesForItem(i.id).length === 0 ? !1 : i.name.toLowerCase().includes(e) || i.additional_data && i.additional_data.toLowerCase().includes(e)), this._filteredOptions.length > 0 ? (this._isOptionsListVisible = !0, this._highlightedIndex = 0, this._renderOptionsList()) : this._hideOptionsList(); } else @@ -1210,7 +1210,7 @@ class Ne extends HTMLElement { } _handleOptionClick(e) { if (this.hasAttribute("disabled")) return; - const i = e.target.closest(`li[data-id].${pe}`); + const i = e.target.closest(`li[data-id].${ue}`); if (i) { const s = i.dataset.id, n = this._filteredOptions.find((a) => a.id === s); n && this._stageItem(n); @@ -1220,12 +1220,12 @@ class Ne extends HTMLElement { this.hasAttribute("disabled") || (this._value = this._value.filter((i) => i.instanceId !== e), this._updateFormValue(), this._renderSelectedItems(), this._stagedItem && this._stagedItem.item && this._renderStagedPillOrInput(), this.inputElement && this.inputElement.focus(), this._updatePreAddButtonVisibility()); } } -I(Ne, "formAssociated", !0); -const vt = "mss-component-wrapper", ge = "mss-selected-items-container", St = "mss-selected-item-pill", yt = "mss-selected-item-text", Lt = "mss-selected-item-pill-detail", be = "mss-selected-item-delete-btn", xt = "mss-selected-item-edit-link", Ee = "mss-input-controls-container", ve = "mss-input-wrapper", Se = "mss-input-wrapper-focused", ye = "mss-text-input", Le = "mss-create-new-button", xe = "mss-toggle-button", At = "mss-inline-row", Ae = "mss-options-list", Ct = "mss-option-item", It = "mss-option-item-name", wt = "mss-option-item-detail", Ce = "mss-option-item-highlighted", J = "mss-hidden-select", Q = "mss-no-items-text", Ie = "mss-loading", Y = 1, X = 10, Tt = 250, kt = "mss-state-no-selection", Rt = "mss-state-has-selection", Ot = "mss-state-list-open"; -class De extends HTMLElement { +C(Be, "formAssociated", !0); +const pt = "mss-component-wrapper", _e = "mss-selected-items-container", ft = "mss-selected-item-pill", gt = "mss-selected-item-text", bt = "mss-selected-item-pill-detail", pe = "mss-selected-item-delete-btn", Et = "mss-selected-item-edit-link", fe = "mss-input-controls-container", ge = "mss-input-wrapper", be = "mss-input-wrapper-focused", Ee = "mss-text-input", ve = "mss-create-new-button", Se = "mss-toggle-button", vt = "mss-inline-row", ye = "mss-options-list", St = "mss-option-item", yt = "mss-option-item-name", Lt = "mss-option-item-detail", Le = "mss-option-item-highlighted", W = "mss-hidden-select", j = "mss-no-items-text", xe = "mss-loading", G = 1, J = 10, xt = 250, At = "mss-state-no-selection", Ct = "mss-state-has-selection", It = "mss-state-list-open"; +class Me extends HTMLElement { constructor() { super(); - I(this, "_blurTimeout", null); + C(this, "_blurTimeout", null); this.internals_ = this.attachInternals(), this._value = [], this._initialValue = [], this._initialOrder = [], this._removedIds = /* @__PURE__ */ new Set(), this._initialCaptured = !1, this._allowInitialCapture = !0, this._options = [ { id: "abk", name: "Abchasisch" }, { id: "aar", name: "Afar" }, @@ -1410,22 +1410,22 @@ class De extends HTMLElement { { id: "yor", name: "Yoruba" }, { id: "zha", name: "Zhuang" }, { id: "zul", name: "Zulu" } - ], this._filteredOptions = [], this._highlightedIndex = -1, this._isOptionsListVisible = !1, this._remoteEndpoint = null, this._remoteResultKey = "items", this._remoteMinChars = Y, this._remoteLimit = X, this._remoteFetchController = null, this._remoteFetchTimeout = null, this._placeholder = this.getAttribute("placeholder") || "Search items...", this._showCreateButton = this.getAttribute("show-create-button") !== "false", this._toggleLabel = this.getAttribute("data-toggle-label") || "", this._toggleInput = this._toggleLabel !== "", this._inputCollapsed = this._toggleInput, this._editBase = this.getAttribute("data-edit-base") || "", this._editSuffix = this.getAttribute("data-edit-suffix") || "/edit", this._setupTemplates(), this._bindEventHandlers(); + ], this._filteredOptions = [], this._highlightedIndex = -1, this._isOptionsListVisible = !1, this._remoteEndpoint = null, this._remoteResultKey = "items", this._remoteMinChars = G, this._remoteLimit = J, this._remoteFetchController = null, this._remoteFetchTimeout = null, this._placeholder = this.getAttribute("placeholder") || "Search items...", this._showCreateButton = this.getAttribute("show-create-button") !== "false", this._toggleLabel = this.getAttribute("data-toggle-label") || "", this._toggleInput = this._toggleLabel !== "", this._inputCollapsed = this._toggleInput, this._editBase = this.getAttribute("data-edit-base") || "", this._editSuffix = this.getAttribute("data-edit-suffix") || "/edit", this._setupTemplates(), this._bindEventHandlers(); } _setupTemplates() { this.optionTemplate = document.createElement("template"), this.optionTemplate.innerHTML = ` -
  • - - +
  • + +
  • `, this.selectedItemTemplate = document.createElement("template"), this.selectedItemTemplate.innerHTML = ` - - - - - + `; } @@ -1481,7 +1481,7 @@ class De extends HTMLElement { this.setAttribute("name", e), this.hiddenSelect && (this.hiddenSelect.name = e); } connectedCallback() { - this._render(), this.inputControlsContainer = this.querySelector(`.${Ee}`), this.inputWrapper = this.querySelector(`.${ve}`), this.inputElement = this.querySelector(`.${ye}`), this.createNewButton = this.querySelector(`.${Le}`), this.toggleButton = this.querySelector(`.${xe}`), this.optionsListElement = this.querySelector(`.${Ae}`), this.selectedItemsContainer = this.querySelector(`.${ge}`), this.hiddenSelect = this.querySelector(`.${J}`), this.placeholder = this.getAttribute("placeholder") || "Search items...", this.showCreateButton = this.getAttribute("show-create-button") !== "false", this._toggleLabel = this.getAttribute("data-toggle-label") || "", this._toggleInput = this._toggleLabel !== "", this._inputCollapsed = this._toggleInput, this._remoteEndpoint = this.getAttribute("data-endpoint") || null, this._remoteResultKey = this.getAttribute("data-result-key") || "items", this._remoteMinChars = this._parsePositiveInt(this.getAttribute("data-minchars"), Y), this._remoteLimit = this._parsePositiveInt(this.getAttribute("data-limit"), X), this.name && this.hiddenSelect && (this.hiddenSelect.name = this.name), this.inputElement.addEventListener("input", this._handleInput), this.inputElement.addEventListener("keydown", this._handleKeyDown), this.inputElement.addEventListener("focus", this._handleFocus), this.inputElement.addEventListener("blur", this._handleBlur), this.optionsListElement.addEventListener("mousedown", this._handleOptionMouseDown), this.optionsListElement.addEventListener("click", this._handleOptionClick), this.createNewButton.addEventListener("click", this._handleCreateNewButtonClick), this.selectedItemsContainer.addEventListener("click", this._handleSelectedItemsContainerClick), this.toggleButton && this.toggleButton.addEventListener("click", this._handleToggleClick); + this._render(), this.inputControlsContainer = this.querySelector(`.${fe}`), this.inputWrapper = this.querySelector(`.${ge}`), this.inputElement = this.querySelector(`.${Ee}`), this.createNewButton = this.querySelector(`.${ve}`), this.toggleButton = this.querySelector(`.${Se}`), this.optionsListElement = this.querySelector(`.${ye}`), this.selectedItemsContainer = this.querySelector(`.${_e}`), this.hiddenSelect = this.querySelector(`.${W}`), this.placeholder = this.getAttribute("placeholder") || "Search items...", this.showCreateButton = this.getAttribute("show-create-button") !== "false", this._toggleLabel = this.getAttribute("data-toggle-label") || "", this._toggleInput = this._toggleLabel !== "", this._inputCollapsed = this._toggleInput, this._remoteEndpoint = this.getAttribute("data-endpoint") || null, this._remoteResultKey = this.getAttribute("data-result-key") || "items", this._remoteMinChars = this._parsePositiveInt(this.getAttribute("data-minchars"), G), this._remoteLimit = this._parsePositiveInt(this.getAttribute("data-limit"), J), this.name && this.hiddenSelect && (this.hiddenSelect.name = this.name), this.inputElement.addEventListener("input", this._handleInput), this.inputElement.addEventListener("keydown", this._handleKeyDown), this.inputElement.addEventListener("focus", this._handleFocus), this.inputElement.addEventListener("blur", this._handleBlur), this.optionsListElement.addEventListener("mousedown", this._handleOptionMouseDown), this.optionsListElement.addEventListener("click", this._handleOptionClick), this.createNewButton.addEventListener("click", this._handleCreateNewButtonClick), this.selectedItemsContainer.addEventListener("click", this._handleSelectedItemsContainerClick), this.toggleButton && this.toggleButton.addEventListener("click", this._handleToggleClick); const e = this.getAttribute("data-external-toggle-id"); if (e && (this.externalToggleButton = document.getElementById(e), this.externalToggleButton && this.externalToggleButton.addEventListener("click", this._handleToggleClick)), this._updateRootElementStateClasses(), this.hasAttribute("value")) { const i = this.getAttribute("value"); @@ -1521,7 +1521,7 @@ class De extends HTMLElement { } catch { this.value = s.split(",").map((a) => a.trim()).filter(Boolean); } - else e === "placeholder" ? this.placeholder = s : e === "show-create-button" ? this.showCreateButton = s : e === "data-endpoint" ? this._remoteEndpoint = s || null : e === "data-result-key" ? this._remoteResultKey = s || "items" : e === "data-minchars" ? this._remoteMinChars = this._parsePositiveInt(s, Y) : e === "data-limit" ? this._remoteLimit = this._parsePositiveInt(s, X) : e === "data-toggle-label" && (this._toggleLabel = s || "", this._toggleInput = this._toggleLabel !== ""); + else e === "placeholder" ? this.placeholder = s : e === "show-create-button" ? this.showCreateButton = s : e === "data-endpoint" ? this._remoteEndpoint = s || null : e === "data-result-key" ? this._remoteResultKey = s || "items" : e === "data-minchars" ? this._remoteMinChars = this._parsePositiveInt(s, G) : e === "data-limit" ? this._remoteLimit = this._parsePositiveInt(s, J) : e === "data-toggle-label" && (this._toggleLabel = s || "", this._toggleInput = this._toggleLabel !== ""); } formAssociatedCallback(e) { } @@ -1549,10 +1549,10 @@ class De extends HTMLElement { this.internals_.setFormValue(null), this._synchronizeHiddenSelect(); } disabledCallback(e) { - this.inputElement && (this.inputElement.disabled = e), this.createNewButton && (this.createNewButton.disabled = e), this.toggleAttribute("disabled", e), this.querySelectorAll(`.${be}`).forEach((i) => i.disabled = e), this.hiddenSelect && (this.hiddenSelect.disabled = e), e && this._hideOptionsList(); + this.inputElement && (this.inputElement.disabled = e), this.createNewButton && (this.createNewButton.disabled = e), this.toggleAttribute("disabled", e), this.querySelectorAll(`.${pe}`).forEach((i) => i.disabled = e), this.hiddenSelect && (this.hiddenSelect.disabled = e), e && this._hideOptionsList(); } _updateRootElementStateClasses() { - this.classList.toggle(kt, this._value.length === 0), this.classList.toggle(Rt, this._value.length > 0), this.classList.toggle(Ot, this._isOptionsListVisible); + this.classList.toggle(At, this._value.length === 0), this.classList.toggle(Ct, this._value.length > 0), this.classList.toggle(It, this._isOptionsListVisible); } _render() { const e = this.id || `mss-${crypto.randomUUID().slice(0, 8)}`; @@ -1560,27 +1560,27 @@ class De extends HTMLElement { const i = this.getAttribute("data-toggle-label") || "", s = i !== "", n = s ? "hidden" : ""; this.innerHTML = ` -
    -
    -
    - ${s ? `` : ""} -
    -
    +
    +
    +
    + ${s ? `` : ""} +
    +
    - +
    - - + +
    `; } @@ -1606,7 +1606,7 @@ class De extends HTMLElement { const e = this._initialOrder.filter((s) => this._removedIds.has(s) && !this._value.includes(s)), i = [...this._value, ...e]; if (i.length === 0) { const s = this.getAttribute("data-empty-text") || "Keine Auswahl...", n = this._inputCollapsed ? "" : "hidden"; - this.selectedItemsContainer.innerHTML = `${s}`; + this.selectedItemsContainer.innerHTML = `${s}`; } else i.forEach((s) => { const n = this._createSelectedItemElement(s); @@ -1620,7 +1620,7 @@ class De extends HTMLElement { const o = this._normalizeText(e.additional_data); l.textContent = o ? `(${o})` : "", n.dataset.id = e.id, n.setAttribute("aria-selected", String(i === this._highlightedIndex)); const d = `option-${this.id || "mss"}-${e.id}`; - return n.id = d, i === this._highlightedIndex && (n.classList.add(Ce), this.inputElement && this.inputElement.setAttribute("aria-activedescendant", d)), n; + return n.id = d, i === this._highlightedIndex && (n.classList.add(Le), this.inputElement && this.inputElement.setAttribute("aria-activedescendant", d)), n; } _renderOptionsList() { if (!(!this.optionsListElement || !this.inputElement)) { @@ -1631,7 +1631,7 @@ class De extends HTMLElement { const n = this._createOptionElement(i, s); this.optionsListElement.appendChild(n); }); - const e = this.optionsListElement.querySelector(`.${Ce}`); + const e = this.optionsListElement.querySelector(`.${Le}`); e && (e.scrollIntoView({ block: "nearest" }), this.inputElement.setAttribute("aria-activedescendant", e.id)); } this._updateRootElementStateClasses(); @@ -1698,10 +1698,10 @@ class De extends HTMLElement { this._isOptionsListVisible = !1, this._highlightedIndex = -1, this.optionsListElement && this._renderOptionsList(); } _handleFocus() { - this.inputElement.disabled || (this.inputWrapper && this.inputWrapper.classList.add(Se), this.inputElement.value.length > 0 && this._handleInput({ target: this.inputElement }), this._updateRootElementStateClasses()); + this.inputElement.disabled || (this.inputWrapper && this.inputWrapper.classList.add(be), this.inputElement.value.length > 0 && this._handleInput({ target: this.inputElement }), this._updateRootElementStateClasses()); } _handleBlur() { - this.inputWrapper && this.inputWrapper.classList.remove(Se), this._blurTimeout = setTimeout(() => { + this.inputWrapper && this.inputWrapper.classList.remove(be), this._blurTimeout = setTimeout(() => { this.contains(document.activeElement) || (this._hideOptionsList(), this._toggleInput && (!this.inputElement || this.inputElement.value.trim() === "") && this._hideInputControls()); }, 150); } @@ -1732,7 +1732,7 @@ class De extends HTMLElement { _showInputControls() { if (this.inputControlsContainer) { if (this.inputControlsContainer.classList.remove("hidden"), this.toggleButton && this.toggleButton.classList.add("hidden"), this._value.length === 0 && this.selectedItemsContainer) { - const e = this.selectedItemsContainer.querySelector(`.${Q}`); + const e = this.selectedItemsContainer.querySelector(`.${j}`); e && e.classList.add("hidden"); } this.inputElement && !this.hasAttribute("disabled") && this.inputElement.focus(), this._inputCollapsed = !1; @@ -1741,7 +1741,7 @@ class De extends HTMLElement { _hideInputControls() { if (this.inputControlsContainer) { if (this.inputControlsContainer.classList.add("hidden"), this.toggleButton && this.toggleButton.classList.remove("hidden"), this._value.length === 0 && this.selectedItemsContainer) { - const e = this.selectedItemsContainer.querySelector(`.${Q}`); + const e = this.selectedItemsContainer.querySelector(`.${j}`); e && e.classList.remove("hidden"); } this._hideOptionsList(), this._inputCollapsed = !0; @@ -1759,14 +1759,14 @@ class De extends HTMLElement { } this._remoteFetchTimeout = setTimeout(() => { this._fetchRemoteOptions(e); - }, Tt); + }, xt); } _cancelRemoteFetch() { this._remoteFetchController && (this._remoteFetchController.abort(), this._remoteFetchController = null); } async _fetchRemoteOptions(e) { if (!this._remoteEndpoint) return; - this._cancelRemoteFetch(), this.classList.add(Ie); + this._cancelRemoteFetch(), this.classList.add(xe); const i = new AbortController(); this._remoteFetchController = i; try { @@ -1789,7 +1789,7 @@ class De extends HTMLElement { return; console.error("MultiSelectSimple remote fetch error:", s), this._filteredOptions = [], this._isOptionsListVisible = !1, this._renderOptionsList(); } finally { - this._remoteFetchController === i && (this._remoteFetchController = null), this.classList.remove(Ie); + this._remoteFetchController === i && (this._remoteFetchController = null), this.classList.remove(xe); } } _extractRemoteOptions(e) { @@ -1823,9 +1823,9 @@ class De extends HTMLElement { return (s === '"' && n === '"' || s === "'" && n === "'") && (i = i.slice(1, -1).trim(), !i) ? "" : i; } } -I(De, "formAssociated", !0); -const Bt = "rbi-button", Mt = "rbi-icon"; -class $t extends HTMLElement { +C(Me, "formAssociated", !0); +const wt = "rbi-button", Tt = "rbi-icon"; +class kt extends HTMLElement { constructor() { super(), this.initialStates = /* @__PURE__ */ new Map(), this._controlledElements = [], this.button = null, this.lastOverallModifiedState = null, this.handleInputChange = this.handleInputChange.bind(this), this.handleReset = this.handleReset.bind(this); } @@ -1834,10 +1834,10 @@ class $t extends HTMLElement { } connectedCallback() { const t = ` - `; @@ -1981,32 +1981,32 @@ class $t extends HTMLElement { this.button.setAttribute("aria-label", t); } } -const g = "hidden", we = "dm-stay", P = "dm-title", Te = "dm-menu-button", Nt = "dm-target", Dt = "data-dm-target", ke = "dm-menu", Re = "dm-menu-item", qt = "dm-close-button"; -var V, qe; -class Pt extends HTMLElement { +const g = "hidden", Ae = "dm-stay", N = "dm-title", Ce = "dm-menu-button", Rt = "dm-target", Ot = "data-dm-target", Ie = "dm-menu", we = "dm-menu-item", Bt = "dm-close-button"; +var q, $e; +class Mt extends HTMLElement { constructor() { super(); - w(this, V); - N(this, V, qe).call(this), this.boundHandleClickOutside = this.handleClickOutside.bind(this); + I(this, q); + B(this, q, $e).call(this), this.boundHandleClickOutside = this.handleClickOutside.bind(this); } connectedCallback() { - if (this._target = document.getElementById(this.getAttribute(Nt)), this._target || (this._target = this), this._cildren = Array.from(this.children).filter((e) => e.nodeType === Node.ELEMENT_NODE && !e.classList.contains(Te)).map((e) => ({ + if (this._target = document.getElementById(this.getAttribute(Rt)), this._target || (this._target = this), this._cildren = Array.from(this.children).filter((e) => e.nodeType === Node.ELEMENT_NODE && !e.classList.contains(Ce)).map((e) => ({ node: e, target: () => { - const i = e.getAttribute(Dt); + const i = e.getAttribute(Ot); return i ? document.getElementById(i) || this._target : this._target; }, - stay: () => e.hasAttribute(we) && e.getAttribute(we) == "true", + stay: () => e.hasAttribute(Ae) && e.getAttribute(Ae) == "true", hidden: () => e.classList.contains(g), name: () => { const i = e.querySelector("label"); - return i ? i.innerHTML : e.hasAttribute(P) ? e.getAttribute(P) : ""; + return i ? i.innerHTML : e.hasAttribute(N) ? e.getAttribute(N) : ""; }, nameText: () => { const i = e.querySelector("label"); - return i ? i.textContent.trim() : e.hasAttribute(P) ? e.getAttribute(P) : ""; + return i ? i.textContent.trim() : e.hasAttribute(N) ? e.getAttribute(N) : ""; } - })), this._button = this.querySelector(`.${Te}`), !this._button) { + })), this._button = this.querySelector(`.${Ce}`), !this._button) { console.error("DivManagerMenu needs a button element."); return; } @@ -2015,7 +2015,7 @@ class Pt extends HTMLElement { this.removeChild(e.node); this._button.addEventListener("click", this._toggleMenu.bind(this)), this._button.classList.add("relative"); for (const e of this._cildren) - e.node.querySelectorAll(`.${qt}`).forEach((s) => { + e.node.querySelectorAll(`.${Bt}`).forEach((s) => { s.addEventListener("click", (n) => { this.hideDiv(n, e.node); }); @@ -2105,10 +2105,10 @@ ${e[0].nameText()} hinzufügen`, this._menu = null, this.hideMenu(); this.hideMenu(); return; } - (!this._menu || !this._button.contains(this._menu)) && (this._button.insertAdjacentHTML("beforeend", ``), this._menu = this._button.querySelector(`.${ke}`)), this._menu.innerHTML = `${e.map((s, n) => ` - `).join("")}`, this._menu.querySelectorAll(`.${Re}`).forEach((s) => { + `).join("")}`, this._menu.querySelectorAll(`.${we}`).forEach((s) => { s.addEventListener("click", (n) => { this.showDiv(n, parseInt(s.getAttribute("dm-itemno"))), this.hideMenu(), this.renderButton(); }); @@ -2134,16 +2134,16 @@ ${e[0].nameText()} hinzufügen`, this._menu = null, this.hideMenu(); }); } } -V = new WeakSet(), qe = function() { +q = new WeakSet(), $e = function() { this._cildren = [], this._rendered = [], this._target = null, this._button = null, this._menu = null, this._originalButtonText = null; }; -const b = "items-row", Ht = "items-list", Ft = "items-template", Vt = "items-add-button", Ut = "items-cancel-button", H = "items-remove-button", zt = "items-edit-button", Kt = "items-close-button", jt = "items-summary", Wt = "items-edit-panel", Z = "items_removed[]", T = "data-items-removed"; -class Gt extends HTMLElement { +const b = "items-row", $t = "items-list", Nt = "items-template", Dt = "items-add-button", Pt = "items-cancel-button", D = "items-remove-button", qt = "items-edit-button", Ht = "items-close-button", Ft = "items-summary", Vt = "items-edit-panel", Q = "items_removed[]", w = "data-items-removed"; +class Ut extends HTMLElement { constructor() { super(), this._list = null, this._template = null, this._addButton = null, this._idPrefix = `items-editor-${crypto.randomUUID().slice(0, 8)}`, this._handleAdd = this._onAddClick.bind(this); } connectedCallback() { - if (this._list = this.querySelector(`.${Ht}`), this._template = this.querySelector(`template.${Ft}`), this._addButton = this.querySelector(`.${Vt}`), !this._list || !this._template || !this._addButton) { + if (this._list = this.querySelector(`.${$t}`), this._template = this.querySelector(`template.${Nt}`), this._addButton = this.querySelector(`.${Dt}`), !this._list || !this._template || !this._addButton) { console.error("ItemsEditor: Missing list, template, or add button."); return; } @@ -2167,16 +2167,16 @@ class Gt extends HTMLElement { const e = t.closest(`.${b}`); if (!e) return; - const i = e.getAttribute(T) === "true"; + const i = e.getAttribute(w) === "true"; this._setRowRemoved(e, !i); } _wireRemoveButtons(t = this) { - t.querySelectorAll(`.${H}`).forEach((e) => { + t.querySelectorAll(`.${D}`).forEach((e) => { e.dataset.itemsBound !== "true" && (e.dataset.itemsBound = "true", e.addEventListener("click", (i) => { i.preventDefault(), this.removeItem(e); }), e.addEventListener("mouseenter", () => { const i = e.closest(`.${b}`); - if (!i || i.getAttribute(T) !== "true") + if (!i || i.getAttribute(w) !== "true") return; const s = e.querySelector("[data-delete-label]"); s && (s.textContent = s.getAttribute("data-delete-hover") || "Rückgängig"); @@ -2186,14 +2186,14 @@ class Gt extends HTMLElement { const i = e.closest(`.${b}`), s = e.querySelector("[data-delete-label]"); if (!s) return; - i && i.getAttribute(T) === "true" ? s.textContent = s.getAttribute("data-delete-active") || "Wird entfernt" : s.textContent = s.getAttribute("data-delete-default") || "Entfernen"; + i && i.getAttribute(w) === "true" ? s.textContent = s.getAttribute("data-delete-active") || "Wird entfernt" : s.textContent = s.getAttribute("data-delete-default") || "Entfernen"; const n = e.querySelector("i"); - n && (i && i.getAttribute(T) === "true" ? (n.classList.add("hidden"), n.classList.remove("ri-delete-bin-line", "ri-arrow-go-back-line")) : (n.classList.remove("hidden"), n.classList.add("ri-delete-bin-line"), n.classList.remove("ri-arrow-go-back-line"))); + n && (i && i.getAttribute(w) === "true" ? (n.classList.add("hidden"), n.classList.remove("ri-delete-bin-line", "ri-arrow-go-back-line")) : (n.classList.remove("hidden"), n.classList.add("ri-delete-bin-line"), n.classList.remove("ri-arrow-go-back-line"))); })); }); } _wireCancelButtons(t = this) { - t.querySelectorAll(`.${Ut}`).forEach((e) => { + t.querySelectorAll(`.${Pt}`).forEach((e) => { e.dataset.itemsBound !== "true" && (e.dataset.itemsBound = "true", e.addEventListener("click", (i) => { i.preventDefault(); const s = e.closest(`.${b}`); @@ -2202,13 +2202,13 @@ class Gt extends HTMLElement { }); } _wireEditButtons(t = this) { - t.querySelectorAll(`.${zt}`).forEach((e) => { + t.querySelectorAll(`.${qt}`).forEach((e) => { e.dataset.itemsBound !== "true" && (e.dataset.itemsBound = "true", e.addEventListener("click", (i) => { i.preventDefault(); const s = e.closest(`.${b}`); s && this._setRowMode(s, "edit"); })); - }), t.querySelectorAll(`.${Kt}`).forEach((e) => { + }), t.querySelectorAll(`.${Ht}`).forEach((e) => { e.dataset.itemsBound !== "true" && (e.dataset.itemsBound = "true", e.addEventListener("click", (i) => { i.preventDefault(); const s = e.closest(`.${b}`); @@ -2225,14 +2225,14 @@ class Gt extends HTMLElement { this._resetToOriginal(t), this._setRowMode(t, "summary"); } _setRowRemoved(t, e) { - t.setAttribute(T, e ? "true" : "false"), t.classList.toggle("bg-red-50", e); + t.setAttribute(w, e ? "true" : "false"), t.classList.toggle("bg-red-50", e); const i = t.querySelector(".items-edit-button"); i && (e ? i.classList.add("hidden") : i.classList.remove("hidden")), t.querySelectorAll("[data-delete-label]").forEach((a) => { - const l = a.closest(`.${H}`), o = l && l.matches(":hover"); + const l = a.closest(`.${D}`), o = l && l.matches(":hover"); let d; e && o ? d = a.getAttribute("data-delete-hover") || "Rückgängig" : e ? d = a.getAttribute("data-delete-active") || "Wird entfernt" : d = a.getAttribute("data-delete-default") || "Entfernen", a.textContent = d; - }), t.querySelectorAll(`.${H} i`).forEach((a) => { - const l = a.closest(`.${H}`), o = l && l.matches(":hover"); + }), t.querySelectorAll(`.${D} i`).forEach((a) => { + const l = a.closest(`.${D}`), o = l && l.matches(":hover"); e ? o ? (a.classList.remove("hidden"), a.classList.add("ri-arrow-go-back-line"), a.classList.remove("ri-delete-bin-line")) : (a.classList.add("hidden"), a.classList.remove("ri-delete-bin-line", "ri-arrow-go-back-line")) : (a.classList.remove("hidden"), a.classList.add("ri-delete-bin-line"), a.classList.remove("ri-arrow-go-back-line")); }); const s = t.querySelector('input[name="items_id[]"]'), n = s ? s.value.trim() : ""; @@ -2241,7 +2241,7 @@ class Gt extends HTMLElement { }); } _setRowMode(t, e) { - const i = t.querySelector(`.${jt}`), s = t.querySelector(`.${Wt}`); + const i = t.querySelector(`.${Ft}`), s = t.querySelector(`.${Vt}`); !i || !s || (e === "edit" ? (i.classList.add("hidden"), s.classList.remove("hidden")) : (i.classList.remove("hidden"), s.classList.add("hidden"), this._syncSummary(t))); } _captureAllOriginals() { @@ -2321,35 +2321,35 @@ class Gt extends HTMLElement { return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement ? t.value.trim() : ""; } _ensureRemovalInput(t) { - if (Array.from(this.querySelectorAll(`input[name="${Z}"]`)).some( + if (Array.from(this.querySelectorAll(`input[name="${Q}"]`)).some( (s) => s.value === t )) return; const i = document.createElement("input"); - i.type = "hidden", i.name = Z, i.value = t, this.appendChild(i); + i.type = "hidden", i.name = Q, i.value = t, this.appendChild(i); } _removeRemovalInput(t) { - const e = Array.from(this.querySelectorAll(`input[name="${Z}"]`)); + const e = Array.from(this.querySelectorAll(`input[name="${Q}"]`)); for (const i of e) i.value === t && i.remove(); } } -const Jt = "ssr-wrapper", Oe = "ssr-input", Be = "ssr-list", Qt = "ssr-option", Yt = "ssr-option-name", Xt = "ssr-option-detail", Zt = "ssr-option-bio", Me = "ssr-hidden-input", $e = "ssr-clear-button", ee = 1, te = 10, ei = 250; -class ti extends HTMLElement { +const zt = "ssr-wrapper", Te = "ssr-input", ke = "ssr-list", Kt = "ssr-option", Wt = "ssr-option-name", jt = "ssr-option-detail", Gt = "ssr-option-bio", Re = "ssr-hidden-input", Oe = "ssr-clear-button", Y = 1, X = 10, Jt = 250; +class Qt extends HTMLElement { constructor() { - super(), this._endpoint = "", this._resultKey = "items", this._minChars = ee, this._limit = te, this._placeholder = "Search...", this._options = [], this._selected = null, this._highlightedIndex = -1, this._fetchTimeout = null, this._fetchController = null, this._listVisible = !1, this._boundHandleInput = this._handleInput.bind(this), this._boundHandleFocus = this._handleFocus.bind(this), this._boundHandleKeyDown = this._handleKeyDown.bind(this), this._boundHandleClear = this._handleClear.bind(this), this._boundHandleClickOutside = this._handleClickOutside.bind(this); + super(), this._endpoint = "", this._resultKey = "items", this._minChars = Y, this._limit = X, this._placeholder = "Search...", this._options = [], this._selected = null, this._highlightedIndex = -1, this._fetchTimeout = null, this._fetchController = null, this._listVisible = !1, this._boundHandleInput = this._handleInput.bind(this), this._boundHandleFocus = this._handleFocus.bind(this), this._boundHandleKeyDown = this._handleKeyDown.bind(this), this._boundHandleClear = this._handleClear.bind(this), this._boundHandleClickOutside = this._handleClickOutside.bind(this); } static get observedAttributes() { return ["data-endpoint", "data-result-key", "data-minchars", "data-limit", "placeholder", "name"]; } connectedCallback() { - this._render(), this._input = this.querySelector(`.${Oe}`), this._list = this.querySelector(`.${Be}`), this._hiddenInput = this.querySelector(`.${Me}`), this._clearButton = this.querySelector(`.${$e}`), this._endpoint = this.getAttribute("data-endpoint") || "", this._resultKey = this.getAttribute("data-result-key") || "items", this._minChars = this._parsePositiveInt(this.getAttribute("data-minchars"), ee), this._limit = this._parsePositiveInt(this.getAttribute("data-limit"), te), this._placeholder = this.getAttribute("placeholder") || "Search...", this._input && (this._input.placeholder = this._placeholder, this._input.addEventListener("input", this._boundHandleInput), this._input.addEventListener("focus", this._boundHandleFocus), this._input.addEventListener("keydown", this._boundHandleKeyDown)), this._clearButton && this._clearButton.addEventListener("click", this._boundHandleClear), document.addEventListener("click", this._boundHandleClickOutside); + this._render(), this._input = this.querySelector(`.${Te}`), this._list = this.querySelector(`.${ke}`), this._hiddenInput = this.querySelector(`.${Re}`), this._clearButton = this.querySelector(`.${Oe}`), this._endpoint = this.getAttribute("data-endpoint") || "", this._resultKey = this.getAttribute("data-result-key") || "items", this._minChars = this._parsePositiveInt(this.getAttribute("data-minchars"), Y), this._limit = this._parsePositiveInt(this.getAttribute("data-limit"), X), this._placeholder = this.getAttribute("placeholder") || "Search...", this._input && (this._input.placeholder = this._placeholder, this._input.addEventListener("input", this._boundHandleInput), this._input.addEventListener("focus", this._boundHandleFocus), this._input.addEventListener("keydown", this._boundHandleKeyDown)), this._clearButton && this._clearButton.addEventListener("click", this._boundHandleClear), document.addEventListener("click", this._boundHandleClickOutside); } disconnectedCallback() { document.removeEventListener("click", this._boundHandleClickOutside), this._input && (this._input.removeEventListener("input", this._boundHandleInput), this._input.removeEventListener("focus", this._boundHandleFocus), this._input.removeEventListener("keydown", this._boundHandleKeyDown)), this._clearButton && this._clearButton.removeEventListener("click", this._boundHandleClear); } attributeChangedCallback(t, e, i) { - e !== i && (t === "data-endpoint" && (this._endpoint = i || ""), t === "data-result-key" && (this._resultKey = i || "items"), t === "data-minchars" && (this._minChars = this._parsePositiveInt(i, ee)), t === "data-limit" && (this._limit = this._parsePositiveInt(i, te)), t === "placeholder" && (this._placeholder = i || "Search...", this._input && (this._input.placeholder = this._placeholder)), t === "name" && this._hiddenInput && (this._hiddenInput.name = i || "")); + e !== i && (t === "data-endpoint" && (this._endpoint = i || ""), t === "data-result-key" && (this._resultKey = i || "items"), t === "data-minchars" && (this._minChars = this._parsePositiveInt(i, Y)), t === "data-limit" && (this._limit = this._parsePositiveInt(i, X)), t === "placeholder" && (this._placeholder = i || "Search...", this._input && (this._input.placeholder = this._placeholder)), t === "name" && this._hiddenInput && (this._hiddenInput.name = i || "")); } _handleInput(t) { const e = t.target.value.trim(); @@ -2400,7 +2400,7 @@ class ti extends HTMLElement { _debouncedFetch(t) { this._fetchTimeout && clearTimeout(this._fetchTimeout), this._fetchTimeout = setTimeout(() => { this._fetchOptions(t); - }, ei); + }, Jt); } async _fetchOptions(t) { if (!this._endpoint) @@ -2428,19 +2428,19 @@ class ti extends HTMLElement { this._list && (this._list.innerHTML = "", this._options.forEach((t) => { const e = document.createElement("button"); e.type = "button", e.setAttribute("data-index", String(this._options.indexOf(t))), e.className = [ - Qt, + Kt, "w-full text-left px-3 py-2 hover:bg-slate-100 transition-colors" ].join(" "); const s = this._options.indexOf(t) === this._highlightedIndex; e.classList.toggle("bg-slate-100", s), e.classList.toggle("text-gray-900", s), e.setAttribute("aria-selected", s ? "true" : "false"); const n = document.createElement("div"); - if (n.className = [Yt, "text-sm font-semibold text-gray-800"].join(" "), n.textContent = t.name, e.appendChild(n), t.detail) { + if (n.className = [Wt, "text-sm font-semibold text-gray-800"].join(" "), n.textContent = t.name, e.appendChild(n), t.detail) { const a = document.createElement("div"); - a.className = [Xt, "text-xs text-gray-600"].join(" "), a.textContent = t.detail, e.appendChild(a); + a.className = [jt, "text-xs text-gray-600"].join(" "), a.textContent = t.detail, e.appendChild(a); } if (t.bio) { const a = document.createElement("div"); - a.className = [Zt, "text-xs text-gray-500"].join(" "), a.textContent = t.bio, e.appendChild(a); + a.className = [Gt, "text-xs text-gray-500"].join(" "), a.textContent = t.bio, e.appendChild(a); } e.addEventListener("click", () => { this._selectOption(t); @@ -2489,29 +2489,29 @@ class ti extends HTMLElement { _render() { const t = this.getAttribute("name") || ""; this.innerHTML = ` -
    +
    -
    - - + +
    `; } } -const ii = "Bevorzugter Reihentitel"; -class si extends HTMLElement { +const Yt = "Bevorzugter Reihentitel"; +class Xt extends HTMLElement { constructor() { super(), this._pendingAgent = null, this._form = null, this._saveButton = null, this._resetButton = null, this._deleteButton = null, this._deleteDialog = null, this._deleteConfirmButton = null, this._deleteCancelButton = null, this._statusEl = null, this._saveEndpoint = "", this._deleteEndpoint = "", this._isSaving = !1, this._handleSaveClick = this._handleSaveClick.bind(this), this._handleResetClick = this._handleResetClick.bind(this), this._handleDeleteClick = this._handleDeleteClick.bind(this), this._handleDeleteConfirmClick = this._handleDeleteConfirmClick.bind(this), this._handleDeleteCancelClick = this._handleDeleteCancelClick.bind(this); } @@ -2696,7 +2696,7 @@ class si extends HTMLElement { prefix: "entries_series", targetField: "series" }), h = this._collectNewRelations("entries_series"), m = [...d, ...h].filter( - (p) => p.type === ii + (p) => p.type === Yt ).length; if (m === 0) throw new Error("Mindestens ein bevorzugter Reihentitel muss verknüpft sein."); @@ -2709,7 +2709,7 @@ class si extends HTMLElement { prefix: "entries_agents", targetField: "agent" }), E = this._collectNewRelations("entries_agents"), v = [...d, ...h].map((p) => p.target_id); - if (v.filter((p, B) => v.indexOf(p) !== B).length > 0) + if (v.filter((p, H) => v.indexOf(p) !== H).length > 0) throw new Error("Doppelte Reihenverknüpfungen sind nicht erlaubt."); return { csrf_token: this._readValue(t, "csrf_token"), @@ -2735,15 +2735,15 @@ class si extends HTMLElement { const m = e[h] || ""; if (m && d.has(m)) continue; - const u = (i[h] || "").trim(), _ = (s[h] || "").trim(), E = (n[h] || "").trim(), y = (l[h] || "").trim(), v = (o[h] || "").trim(), S = (a[h] || "").trim(); - (m || u || _ || E || y || v || S) && c.push({ + const u = (i[h] || "").trim(), _ = (s[h] || "").trim(), E = (n[h] || "").trim(), S = (l[h] || "").trim(), v = (o[h] || "").trim(), f = (a[h] || "").trim(); + (m || u || _ || E || S || v || f) && c.push({ id: m, owner: u, identifier: _, location: E, - annotation: y, + annotation: S, uri: v, - media: S ? [S] : [] + media: f ? [f] : [] }); } return { @@ -2832,8 +2832,8 @@ class si extends HTMLElement { }, 100); } } -const ni = "[data-role='relation-add-toggle']", ai = "[data-role='relation-add-panel']", ri = "[data-role='relation-add-close']", li = "[data-role='relation-add-apply']", oi = "[data-role='relation-add-error']", di = "[data-role='relation-add-row']", hi = "[data-role='relation-add-select']", ci = "[data-role='relation-type-select']", ui = "[data-role='relation-uncertain']", mi = "template[data-role='relation-new-template']", _i = "[data-role='relation-new-delete']", k = "[data-rel-row]"; -class pi extends HTMLElement { +const Zt = "[data-role='relation-add-toggle']", ei = "[data-role='relation-add-panel']", ti = "[data-role='relation-add-close']", ii = "[data-role='relation-add-apply']", si = "[data-role='relation-add-error']", ni = "[data-role='relation-add-row']", ai = "[data-role='relation-add-select']", ri = "[data-role='relation-type-select']", li = "[data-role='relation-uncertain']", oi = "template[data-role='relation-new-template']", di = "[data-role='relation-new-delete']", T = "[data-rel-row]"; +class hi extends HTMLElement { constructor() { super(), this._pendingItem = null, this._pendingApply = !1; } @@ -2857,11 +2857,11 @@ class pi extends HTMLElement { this._addPanel && !this._addPanel.classList.contains("hidden") || e || i ? this._emptyText.classList.add("hidden") : this._emptyText.classList.remove("hidden"); } _setupAddPanel() { - if (this._addToggle = this.querySelector(ni), this._addToggleId) { + if (this._addToggle = this.querySelector(Zt), this._addToggleId) { const t = document.getElementById(this._addToggleId); t && (this._addToggle = t); } - this._addPanel = this.querySelector(ai), this._addClose = this.querySelector(ri), this._addApply = this.querySelector(li), this._addError = this.querySelector(oi), this._addRow = this.querySelector(di), this._addSelect = this.querySelector(hi), this._typeSelect = this.querySelector(ci), this._uncertain = this.querySelector(ui), this._template = this.querySelector(mi), this._addInput = this._addSelect ? this._addSelect.querySelector(".ssr-input") : null, !(!this._addPanel || !this._addRow || !this._addSelect || !this._typeSelect || !this._uncertain || !this._template) && (this._addSelect && this._prefix === "entries_series" && this._addSelect.addEventListener("ssrbeforefetch", () => { + this._addPanel = this.querySelector(ei), this._addClose = this.querySelector(ti), this._addApply = this.querySelector(ii), this._addError = this.querySelector(si), this._addRow = this.querySelector(ni), this._addSelect = this.querySelector(ai), this._typeSelect = this.querySelector(ri), this._uncertain = this.querySelector(li), this._template = this.querySelector(oi), this._addInput = this._addSelect ? this._addSelect.querySelector(".ssr-input") : null, !(!this._addPanel || !this._addRow || !this._addSelect || !this._typeSelect || !this._uncertain || !this._template) && (this._addSelect && this._prefix === "entries_series" && this._addSelect.addEventListener("ssrbeforefetch", () => { this._addSelect._excludeIds = Array.from(this._getExistingIds()); }), this._addToggle && this._addToggle.addEventListener("click", () => { const t = this._addPanel.classList.contains("hidden"); @@ -2899,7 +2899,7 @@ class pi extends HTMLElement { this._typeSelect && (this._typeSelect.selectedIndex = 0), this._uncertain && (this._uncertain.checked = !1), this._addError && this._addError.classList.add("hidden"); } _insertNewRow() { - const t = this._template.content.cloneNode(!0), e = t.querySelector(k) || t.firstElementChild; + const t = this._template.content.cloneNode(!0), e = t.querySelector(T) || t.firstElementChild; if (!e) return; const i = t.querySelector("[data-rel-link]"); @@ -2922,7 +2922,7 @@ class pi extends HTMLElement { } const h = t.querySelector("[data-rel-input='id']"); h && (h.name = `${this._prefix}_new_id`, h.value = this._pendingItem.id); - const m = t.querySelector(_i); + const m = t.querySelector(di); m && m.addEventListener("click", () => { e.remove(), this._pendingItem = null, this._clearAddPanel(), this._addPanel && this._addPanel.classList.add("hidden"), this._updateEmptyTextVisibility(); }), this._addRow.appendChild(t), this._pendingItem = null, this._clearAddPanel(), this._addPanel && this._addPanel.classList.add("hidden"), this._updateEmptyTextVisibility(), this._updatePreferredOptions(); @@ -2934,7 +2934,7 @@ class pi extends HTMLElement { if (!i) return; i.checked = !i.checked; - const s = t.closest(k); + const s = t.closest(T); s && (s.classList.toggle("bg-red-50", i.checked), s.querySelectorAll("select, input[type='checkbox']").forEach((o) => { o !== i && (o.disabled = i.checked); })); @@ -2973,10 +2973,10 @@ class pi extends HTMLElement { return; const t = this._preferredLabel.trim(), e = []; this.querySelectorAll(`select[name^="${this._prefix}_type["]`).forEach((s) => { - e.push({ select: s, row: s.closest(k), isAddPanel: !1 }); + e.push({ select: s, row: s.closest(T), isAddPanel: !1 }); }), this._addRow && this._addRow.querySelectorAll(`select[name='${this._prefix}_new_type']`).forEach((s) => { - e.push({ select: s, row: s.closest(k), isAddPanel: !1 }); - }), this._typeSelect && e.push({ select: this._typeSelect, row: this._typeSelect.closest(k), isAddPanel: !0 }); + e.push({ select: s, row: s.closest(T), isAddPanel: !1 }); + }), this._typeSelect && e.push({ select: this._typeSelect, row: this._typeSelect.closest(T), isAddPanel: !0 }); const i = e.some(({ select: s, row: n, isAddPanel: a }) => { if (a) return !1; @@ -3004,7 +3004,7 @@ class pi extends HTMLElement { }); } } -class fi extends HTMLElement { +class ci extends HTMLElement { connectedCallback() { setTimeout(() => { const t = this.querySelector("form"); @@ -3047,41 +3047,31 @@ class fi extends HTMLElement { }); } } -class gi extends HTMLElement { +class ui extends HTMLElement { constructor() { - super(), this.state = null, this.handleClick = this.handleClick.bind(this), this.handleClickAway = this.handleClickAway.bind(this), this.handleDeleteClick = this.handleDeleteClick.bind(this); + super(), this.state = null, this.handleClick = this.handleClick.bind(this), this.handleClickAway = this.handleClickAway.bind(this); } connectedCallback() { const t = this.getAttribute("data-user-name") || "Benutzer", e = this.getAttribute("data-user-email") || "", i = this.getAttribute("data-user-id") || "", s = this.getAttribute("data-is-admin-or-editor") === "true", n = this.getAttribute("data-is-admin") === "true", a = this.getAttribute("data-redirect-path") || "", l = window.location.pathname; - let o = !1, d = "", c = "", h = !1, m = "", u = !1, _ = "", E = ""; - const y = l.match(/^\/reihe\/([^\/]+)\/?$/); - if (y && y[1] !== "new") { - o = !0, d = y[1]; - const f = document.querySelector('meta[name="entity-updated"]'); - f && (c = f.content); + let o = !1, d = "", c = !1, h = "", m = !1, u = ""; + const _ = l.match(/^\/reihe\/([^\/]+)\/?$/); + if (_ && _[1] !== "new") { + o = !0, d = _[1]; + const A = document.querySelector('meta[name="entity-updated"]'); + A && A.content; } - const v = l.match(/^\/person\/([^\/]+)\/?$/); - v && v[1] !== "new" && (h = !0, m = v[1]); + const E = l.match(/^\/person\/([^\/]+)\/?$/); + E && E[1] !== "new" && (c = !0, h = E[1]); const S = l.match(/^\/almanach\/([^\/]+)\/?$/); if (S && S[1] !== "new") { - u = !0, _ = S[1]; - const f = document.querySelector('meta[name="entity-updated"]'); - f && (E = f.content); + m = !0, u = S[1]; + const A = document.querySelector('meta[name="entity-updated"]'); + A && A.content; } - let p = ""; - const B = document.querySelector('input[name="csrf_token"]'); - B && (p = B.value); - const M = p !== ""; - this.hasContext = o || h || u; - let A = ""; - if (o) { - const f = M ? ` - - ` : ""; - A = ` + const v = document.querySelector('input[name="csrf_token"]'); + v && v.value, this.hasContext = o || c || m; + let f = ""; + o ? f = `
    Reihe
    @@ -3089,37 +3079,24 @@ class gi extends HTMLElement { Bearbeiten - ${f} - `; - } else if (h) - A = ` + ` : c ? f = `
    Person
    - + Bearbeiten - `; - else if (u) { - const f = M ? ` - - ` : ""; - A = ` + ` : m && (f = `
    Almanach
    - + Bearbeiten - ${f} - `; - } - const Ve = s ? ` + `); + const p = s ? `
    Erstellen
    @@ -3160,7 +3137,7 @@ class gi extends HTMLElement {
    - ` : "", Ue = s ? ` + ` : "", H = s ? `
    Listen
    @@ -3192,7 +3169,7 @@ class gi extends HTMLElement {
    - ` : "", ze = n ? ` + ` : "", qe = n ? `
    Administration
    @@ -3215,61 +3192,20 @@ class gi extends HTMLElement {
    - ` : ""; - let U = ""; - o && M && (U += ` - - `), u && M && (U += ` - - `); - const Ke = A || "", je = A ? '
    ' : ""; + ` : "", He = f || "", Fe = f ? '
    ' : ""; this.innerHTML = `
    -