PageSourceSearch

https://auton.com/cdn/shop/t/35/assets/modal.js?v=72585754406319655051769633397

js auton.com collected 2026-09-26 15:02:48 UTC 3,855 bytes, 2 lines download raw bytes

1(async()=>{var setInnerHTML=function(elm,html){elm.appendChild(html),Array.from(elm.querySelectorAll("script")).forEach(oldScript=>{const newScript=document.createElement("script");Array.from(oldScript.attributes).forEach(attr=>newScript.setAttribute(attr.name,attr.value)),newScript.appendChild(document.createTextNode(oldScript.innerHTML)),oldScript.parentNode.replaceChild(newScript,oldScript)})};const baseComponent=await import(window.theme.modules.baseComponent),{hideElement,showElement,parseHTML}=await import(window.theme.modules.utils);customElements.define("modal-close",class extends baseComponent.default{render(){this.addEventListener("click",e=>{e.preventDefault(),this.trigger("closePopup")})}}),customElements.define("modal-trigger",class extends baseComponent.default{render(){this.addEventListener("click",e=>{e.preventDefault(),this.forwardEvent("openPopup",{target:this.getAttribute("target"),url:this.getAttribute("url"),layout:this.getAttribute("layout"),hiddenClose:this.hasAttribute("hidden-close")})})}}),customElements.define("modal-popup",class extends baseComponent.default{elements={content:"[data-content]",overlay:"[data-overlay]",close:"[data-close]",layout:"[data-layout]"};animationTimeout=300;html=document.querySelector("html");defaultLayoutClass="default";render(){this.hasAttribute("enable-cart")&&this._initCart(),[this.$overlay,this.$close].map(this._closeOnClick.bind(this)),this.setAttribute("style",`--transition: ${this.animationTimeout}ms;`),this.listenTo("openPopup",(e,data)=>{if(this.target=data.target,data.target==="CART"){if(!this.cartContent)return;this.layout="sidebar",this.$content.replaceChildren(this.cartContent),this._setLayout(),this._openModal();return}this.triggerSectionId=e.detail.sectionId,this.layout=data.layout||"default",this._setLayout(),data.hiddenClose&&hideElement(this.$close),this._openModal(),data.url?(this.setAttribute("loading",""),fetch(data.url).then(res=>res.text()).then(html=>{const target=new DOMParser().parseFromString(html,"text/html").querySelector(data.target);this.removeAttribute("loading"),setInnerHTML(this.$content,target)}).catch(err=>console.error(err))):(this.contentWrapper=document.querySelector(data.target),this.contentWrapper.content?this.$content.replaceChildren(...this.contentWrapper.content.cloneNode(!0).childNodes):this.$content.replaceChildren(...this.contentWrapper.childNodes))},!1),this.on("closePopup",this._closeModal.bind(this),!1),this.trigger("modalReady"),window.theme.modalReady=!0}_closeOnClick(el){el.addEventListener("click",this._closeModal.bind(this))}_closeModal(){this.removeAttribute("opened"),this.setAttribute("closing",""),setTimeout(()=>{this.contentWrapper&&!this.contentWrapper.content?this.contentWrapper.replaceChildren(...this.$content.childNodes):this.$content.replaceChildren(),this._resetLayout(),showElement(this.$close),this.removeAttribute("closing")},this.animationTimeout),this.html.classList.remove("overflow-hidden"),this.trigger("popupClosed",{sectionId:this.triggerSectionId})}_openModal(){this.setAttribute("opened",""),this.html.classList.add("overflow-hidden"),this.trigger("popupOpened",{sectionId:this.triggerSectionId})}_setLayout(){this.layout&&this.classList.add(`@layout:${this.layout}`)}_resetLayout(){this.layout&&this.classList.remove(`@layout:${this.layout}`)}_initCart(){const cartURL=this.getAttribute("cart-url"),cartTarget=this.getAttribute("cart-target");cartURL&&cartTarget&&((callback=>{fetch(cartURL).then(res=>res.text()).then(html=>{const content=parseHTML(html).querySelector(cartTarget);this.cartContent=content,document.body.appendChild(this.cartContent),document.body.removeChild(this.cartContent)})})(),this.on("updateCart",(e,{callback})=>{this.cartContent.update(callback)},!1))}})})();
2//# sourceMappingURL=/cdn/shop/t/35/assets/modal.js.map?v=72585754406319655051769633397

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.