PageSourceSearch

https://getmaude.com/cdn/shop/t/334/assets/ia-qty-picker.js?v=173889275015116999781758904692

js getmaude.com collected 2026-09-24 18:04:20 UTC 1,861 bytes, 2 lines download raw bytes

1import{EVENTS,publish}from"ia-util-pubsub";class IaQtyPicker extends HTMLElement{connectedCallback(){this.input=this.querySelector(".js-qty-picker"),this.plusButton=this.querySelector(".js-plus"),this.minusButton=this.querySelector(".js-minus"),this.setupEventListeners()}get min(){return parseInt(this.getAttribute("min"))??1}get max(){return parseInt(this.getAttribute("max"))||1/0}setupEventListeners(){this.plusButton?.addEventListener("click",()=>{const currentValue=parseInt(this.value),newValue=Math.min(isNaN(currentValue)?0:currentValue+1,this.max);newValue!==parseInt(this.value)&&(this.value=newValue,this.input.value=newValue,this.publishQtyChange())}),this.minusButton?.addEventListener("click",()=>{const currentValue=parseInt(this.value),newValue=Math.max(isNaN(currentValue)?0:currentValue-1,this.min);newValue!==parseInt(this.value)&&(this.value=newValue,this.input.value=newValue,this.publishQtyChange())}),this.input?.addEventListener("change",event=>{const newValue=parseInt(event.target.value);if(isNaN(newValue))this.value=this.min,this.input.value=this.min;else{const boundedValue=Math.min(Math.max(newValue,this.min),this.max);this.value=boundedValue,this.input.value=boundedValue}this.publishQtyChange()}),this.input?.addEventListener("keydown",event=>{(event.key==="Enter"||event.keyCode===13)&&(event.preventDefault(),event.target.blur())})}publishQtyChange(){publish(EVENTS.qtyChange,{detail:{value:this.value,name:this.name,id:this.dataset.id}})}get value(){const attrValue=this.getAttribute("value");return attrValue!==null?attrValue:this.input?.value!==void 0?this.input.value:String(this.min)}set value(val){this.setAttribute("value",val)}get name(){return this.input?.name||""}}customElements.define("ia-qty-picker",IaQtyPicker);
2//# sourceMappingURL=/cdn/shop/t/334/assets/ia-qty-picker.js.map?v=173889275015116999781758904692

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.