PageSourceSearch

https://store.blockstream.com/cdn/shop/t/13/assets/bundle-addon.js?v=181180306401530912421788191547

js blockstream.com collected 2026-10-01 08:40:39 UTC 2,809 bytes, 2 lines download raw bytes

1customElements.get("bundle-addon")||customElements.define("bundle-addon",class extends HTMLElement{cartUpdateUnsubscriber=void 0;connectedCallback(){this.checkbox=this.querySelector(".buy-box-bundle-addon__check"),this.priceTarget=this.querySelector("[data-addon-price]"),this.totalTarget=this.querySelector("[data-addon-total]");const variantData=this.querySelector("[data-addon-variants]");if(!(!this.checkbox||!variantData)){try{this.entries=JSON.parse(variantData.textContent)}catch{return}this.form=document.getElementById(`product-form-${this.dataset.sectionId}`),this.variantInput=this.form?this.form.querySelector('input[name="id"]'):null,this.variantInput&&(this.baseVariantId=this.variantInput.value,this.quantityInput=document.getElementById(`Quantity-${this.dataset.sectionId}`),this.quantityInput&&this.quantityInput.addEventListener("change",this.apply.bind(this)),this.checkbox.addEventListener("change",this.apply.bind(this)),this.variantInput.addEventListener("change",this.onVariantInputChange.bind(this)),this.cartUpdateUnsubscriber=subscribe(PUB_SUB_EVENTS.cartUpdate,this.onCartUpdate.bind(this)),this.apply())}}disconnectedCallback(){this.cartUpdateUnsubscriber&&this.cartUpdateUnsubscriber()}get entry(){return this.entries[this.baseVariantId]}onVariantInputChange(){const value=this.variantInput.value;Object.prototype.hasOwnProperty.call(this.entries,value)&&(this.baseVariantId=value,this.render(),this.apply())}onCartUpdate(event){!event||!event.data||event.data.source!=="product-form"||this.checkbox.checked&&(this.checkbox.checked=!1,this.apply())}render(){const entry=this.entry,usable=!!(entry&&entry.id&&entry.available);if(this.checkbox.disabled=!usable,usable||(this.checkbox.checked=!1),!this.priceTarget)return;if(!usable){this.priceTarget.innerHTML='<span class="buy-box-bundle-addon__unavailable">Unavailable with this option</span>';return}const saving=entry.saving?` <span class="buy-box-bundle-addon__save">save ${entry.saving}</span>`:"";this.priceTarget.innerHTML=`+${entry.delta}${saving}`}apply(){const entry=this.entry,active=!!(entry&&entry.id&&entry.available)&&this.checkbox.checked;if(this.variantInput.value=active?entry.id:this.baseVariantId,this.toggleAttribute("data-addon-active",active),!this.totalTarget)return;if(!active){this.totalTarget.hidden=!0,this.totalTarget.innerHTML="";return}const quantity=this.quantityInput&&parseInt(this.quantityInput.value,10)||1,label=quantity>1?"Bundle price":"Bundle total",each=quantity>1?" each":"",bundleTitle=this.dataset.bundleTitle,applied=bundleTitle?` \xB7 ${bundleTitle} pricing applied`:"";this.totalTarget.innerHTML=`${label}: <strong>${entry.total}</strong>${each}${applied}`,this.totalTarget.hidden=!1}});
2//# sourceMappingURL=/cdn/shop/t/13/assets/bundle-addon.js.map?v=181180306401530912421788191547

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.