PageSourceSearch

https://www.yarrah.com/theme/c3fc5a39beba276b1cdeb33bac9505ba/js/m…ces6.mabp-quantity-restore.plugin.72c518.js

js yarrah.com collected 2026-10-02 07:09:11 UTC 1,596 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[58818],{818(t,e,i){i.r(e),i.d(e,{default:()=>a});let n=window.PluginBaseClass,s=window.PluginManager;class a extends n{static #t=this.options={quantitySelector:".product-detail-quantity-select, .product-detail-quantity-input",buyBoxSelector:".product-detail-buy, .cms-element-buy-box"};init(){this.storage=window.sessionStorage,this.variantSwitch=s.getPluginInstanceFromElement(this.el,"VariantSwitch"),null!==this.variantSwitch&&(this.options=Object.assign(this.options,this.variantSwitch.options.mabpQuantityRestore),this.options&&this.options.active)&&(this.buyBox=this.el.closest(this.options.buyBoxSelector),this.buyBox)&&(this.quantityInput=this.buyBox.querySelector(this.options.quantitySelector),this.quantityInput&&(this._registerEvents(),this.updateQuantity()))}_registerEvents(){this.variantSwitch.$emitter.subscribe("onChange",this.onVariantChange.bind(this))}onVariantChange(){this.storage.setItem("mabpRestoreQuantity",this.quantityInput.value)}getRestoreQuantity(){let t=this.storage.getItem("mabpRestoreQuantity");return!!t&&parseInt(t,10)}updateQuantity(){let t=this.getRestoreQuantity();if(t){if(this.numberInput=this.quantityInput.closest(".mabp-number-input-wrapper"),null!==this.numberInput){let e=window.PluginManager.getPluginInstanceFromElement(this.numberInput,"MabpNumberInput");e&&e.setValue(t)}else{this.quantityInput.value=t;let e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!0),e.eventName="change",this.quantityInput.dispatchEvent(e)}this.storage.removeItem("mabpRestoreQuantity")}}}}}]);

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.