1import s from"./custom-html-element-Cddc4xm8.js";import"./logger-pamvzmAu.js";import"./exports-NHIMKJG4.js";import"./event-zU-Y6ZHH.js";const a=class extends s{connectedCallback(){this.rootDelegate.on("cart-notification:show",this._onShow.bind(this),!this.hasAttribute("global")),this.delegate.on("click",'[data-action="close"]',t=>{t.stopPropagation(),this.hidden=!0}),this.addEventListener("mouseenter",this.stopTimer.bind(this)),this.addEventListener("mouseleave",this.startTimer.bind(this)),window.addEventListener("pagehide",()=>this.hidden=!0)}set hidden(t){t?this.stopTimer():this.startTimer(),this.toggleAttribute("hidden",t)}get isInsideDrawer(){return this.classList.contains("cart-notification--drawer")||this.closest("modal-element")}stopTimer(){clearTimeout(this._timeout)}startTimer(){this._timeout=setTimeout(()=>this.hidden=!0,3e3)}_onShow(t){const e=this.closest(".drawer")||this.closest("modal-element");if(this.isInsideDrawer&&e&&!e.open||this.hasAttribute("global")&&t.detail.status==="success"&&window.themeVariables.settings.cartType==="drawer")return;t.stopPropagation();let i="";this.isInsideDrawer||(i=` 2 <button class="cart-notification__close tap-area hidden-phone" data-action="close"> 3 <span class="visually-hidden">${window.themeVariables.strings.accessibilityClose}</span> 4 <svg focusable="false" width="14" height="14" class="icon icon--close icon--inline" viewBox="0 0 14 14"> 5 <path d="M13 13L1 1M13 1L1 13" stroke="currentColor" stroke-width="2" fill="none"></path> 6 </svg> 7 </button> 8 `),t.detail.status==="success"?(this.classList.remove("cart-notification--error"),this.innerHTML=` 9 <div class="cart-notification__overflow"> 10 <div class="container"> 11 <div class="cart-notification__wrapper"> 12 <svg focusable="false" width="20" height="20" class="icon icon--cart-notification" viewBox="0 0 20 20"> 13 <rect width="20" height="20" rx="10" fill="currentColor"></rect> 14 <path d="M6 10L9 13L14 7" fill="none" stroke="rgb(var(--success-color))" stroke-width="2"></path> 15 </svg> 16 17 <div class="cart-notification__text-wrapper"> 18 <span class="cart-notification__heading heading hidden-phone">${window.themeVariables.strings.cartItemAdded}</span> 19 <span class="cart-notification__heading heading hidden-tablet-and-up">${window.themeVariables.strings.cartItemAddedShort}</span> 20 <a href="${window.themeVariables.routes.cartUrl}" class="cart-notification__view-cart link">${window.themeVariables.strings.cartViewCart}</a> 21 </div> 22 23 ${i} 24 </div> 25 </div> 26 </div> 27 `):(this.classList.add("cart-notification--error"),this.innerHTML=` 28 <div class="cart-notification__overflow"> 29 <div class="container"> 30 <div class="cart-notification__wrapper"> 31 <svg focusable="false" width="20" height="20" class="icon icon--cart-notification" viewBox="0 0 20 20"> 32 <rect width="20" height="20" rx="10" fill="currentColor"></rect> 33 <path d="M9.6748 13.2798C9.90332 13.0555 10.1763 12.9434 10.4937 12.9434C10.811 12.9434 11.0819 13.0555 11.3062 13.2798C11.5347 13.5041 11.6489 13.7749 11.6489 14.0923C11.6489 14.4097 11.5347 14.6847 11.3062 14.9175C11.0819 15.146 10.811 15.2603 10.4937 15.2603C10.1763 15.2603 9.90332 15.146 9.6748 14.9175C9.45052 14.6847 9.33838 14.4097 9.33838 14.0923C9.33838 13.7749 9.45052 13.5041 9.6748 13.2798ZM9.56689 12.1816V5.19922H11.4141V12.1816H9.56689Z" fill="rgb(var(--error-color))"></path> 34 </svg> 35 36 <div class="cart-notification__text-wrapper"> 37 <span class="cart-notification__heading heading">${t.detail.error}</span> 38 </div> 39 40 ${i} 41 </div> 42 </div> 43 </div> 44 `),this.clientHeight,this.hidden=!1}};window.customElements.get("cart-notification")||window.customElements.define("cart-notification",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.