PageSourceSearch

https://imkergut.de/theme/492eb10d5af0cb658e03d738fcac02b8/js/luno…/lunova-tier-deals.js?1790851461

js imkergut.de collected 2026-10-02 17:44:32 UTC 1,893 bytes, 1 lines download raw bytes

1(()=>{"use strict";let t=window.PluginBaseClass;window.PluginManager.register("LunovaTierDeals",class extends t{init(){this.quantityField=this.findQuantityField(),this.options=Array.from(this.el.querySelectorAll("[data-tier-option]")),this.selectedQuantity=this.el.querySelector("[data-selected-quantity]"),this.selectedSavings=this.el.querySelector("[data-selected-savings]"),this.quantityField&&0!==this.options.length&&(this.registerEvents(),this.applyInitialQuantity()||this.syncFromQuantity())}registerEvents(){this.options.forEach(t=>{t.addEventListener("click",()=>this.selectOption(t))}),this.quantityField.addEventListener("change",()=>this.syncFromQuantity())}applyInitialQuantity(){let t=Number.parseInt(this.el.dataset.initialQuantity||"",10);return!!Number.isInteger(t)&&!(t<1)&&(this.quantityField.value=String(t),Number.parseInt(this.quantityField.value,10)===t&&(this.quantityField.dispatchEvent(new Event("change",{bubbles:!0})),!0))}syncFromQuantity(){let t=Number.parseInt(this.quantityField.value,10),e=this.options.filter(e=>Number.parseInt(e.dataset.quantity||"0",10)<=t).pop();this.setActiveOption(e,t)}selectOption(t){this.quantityField.value=t.dataset.quantity||"1",this.setActiveOption(t),this.quantityField.dispatchEvent(new Event("change",{bubbles:!0}))}setActiveOption(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.options.forEach(e=>{let i=e===t;e.classList.toggle("is-active",i),e.setAttribute("aria-pressed",i?"true":"false")});let i=t?.dataset.quantityLabel||t?.dataset.quantity||String(e??""),s=t?.dataset.savingsLabel||"";this.updateText(this.selectedQuantity,i,!1),this.updateText(this.selectedSavings,s,!s)}updateText(t,e,i){t&&(t.textContent=e,t.hidden=i)}findQuantityField(){let t=this.el.closest("form");return t?t.querySelector('input[name$="[quantity]"], select[name$="[quantity]"]'):null}},"[data-lunova-tier-deals]")})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.