1/* 2Generated time: November 20, 2025 14:11 3This file was created by the app developer. Feel free to contact the original developer with any questions. It was minified (compressed) by AVADA. AVADA do NOT own this script. 4*/ 5if(!customElements.get("product-inventory")){class a extends HTMLElement{constructor(){super(),window.initLazyScript(this,this.initLazySection.bind(this))}initLazySection(){this.inventoryNotice=this.querySelector(".js-inventory-notice"),this.urgencyMessage=this.querySelector(".js-inventory-urgency"),this.indicatorBar=this.querySelector(".js-inventory-indicator"),this.variantInventory=this.getVariantInventory();var t=this.closest(".product-info").querySelector("variant-picker");t&&t.addEventListener("on:variant:change",this.handleVariantChange.bind(this)),this.updateInventory(parseInt(this.dataset.inventoryQuantity,10),"true"===this.dataset.variantAvailable,this.dataset.inventoryPolicy)}getVariantInventory(){var t=this.querySelector('[type="application/json"]');return this.variantInventory||JSON.parse(t.textContent)}handleVariantChange(e){var t;e.detail.variant?(t=this.variantInventory.filter(t=>t.id===e.detail.variant.id)[0],this.updateInventory(t.inventory_quantity,t.available,t.inventory_policy)):(this.updateInventory(0,!1),this.hidden=!0)}updateInventory(e,t,i){let n;if(n=e<=0?"continue"===i?"backordered":t?"in_stock":"none":e<=parseInt(this.dataset.thresholdVeryLow,10)?"very_low":e<=parseInt(this.dataset.thresholdLow,10)?"low":"normal",!("always"===this.dataset.showNotice||"low"===this.dataset.showNotice&&n.includes("low"))||"backordered"===n&&"false"===this.dataset.showNoStockBackordered)this.hidden=!0;else if(this.hidden=!1,this.setAttribute("data-inventory-level",n),"backordered"===n?this.inventoryNotice.innerText="":"in_stock"!==n&&("always"===this.dataset.showCount||"low"===this.dataset.showCount&&n.includes("low"))?this.inventoryNotice.innerText=theme.strings.onlyXLeft.replace("[quantity]",e):"very_low"===n?this.inventoryNotice.innerText=theme.strings.veryLowStock:"low"===n?this.inventoryNotice.innerText=theme.strings.lowStock:"normal"===n||"in_stock"===n?this.inventoryNotice.innerText=theme.strings.inStock:"none"===n&&(this.inventoryNotice.innerText=theme.strings.noStock),this.urgencyMessage&&("very_low"===n?this.urgencyMessage.innerHTML=this.dataset.textVeryLow:"low"===n?this.urgencyMessage.innerHTML=this.dataset.textLow:"backordered"===n?this.urgencyMessage.innerHTML=this.dataset.textNoStockBackordered:"normal"===n||"in_stock"===n?this.urgencyMessage.innerHTML=this.dataset.textNormal:"none"===n&&(this.urgencyMessage.innerHTML=this.dataset.textNoStock)),this.indicatorBar){this.indicatorBar.hidden=!1;let t;t=(e>=this.dataset.scale||"in_stock"===n)&&"backordered"!==n?100:(100/parseInt(this.dataset.scale,10)*e).toFixed(1),this.indicatorBar.querySelector("span").style.width=t+"%"}}}customElements.define("product-inventory",a)}
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.