PageSourceSearch

https://marleylilly.com/cdn/shop/t/190/assets/cart-drawer.js?v=122530165143497398781788968624

js marleylilly.com collected 2026-10-03 20:38:49 UTC 2,735 bytes, 2 lines download raw bytes

1import{DialogComponent,DialogOpenEvent}from"@theme/dialog";import{CartAddEvent,CartDrawerPromotionsLoadingEvent,ThemeEvents}from"@theme/events";class CartDrawerComponent extends DialogComponent{#summaryThreshold=.5;connectedCallback(){super.connectedCallback(),document.addEventListener(CartAddEvent.eventName,this.#handleCartAdd),document.addEventListener(ThemeEvents.cartDrawerPromotionsLoading,this.#handlePromotionsLoading),this.addEventListener(DialogOpenEvent.eventName,this.#updateStickyState),this.addEventListener("click",this.#handleInstallmentsClick,!0)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(CartAddEvent.eventName,this.#handleCartAdd),document.removeEventListener(ThemeEvents.cartDrawerPromotionsLoading,this.#handlePromotionsLoading),this.removeEventListener(DialogOpenEvent.eventName,this.#updateStickyState),this.removeEventListener("click",this.#handleInstallmentsClick,!0)}#handleCartAdd=()=>{document.querySelector('atc-confirmation[data-auto-open="true"]')||this.hasAttribute("auto-open")&&this.showDialog()};open(){this.showDialog()}#handleInstallmentsClick=event=>{const squarePlacement=event.composedPath().find(node=>node instanceof HTMLElement&&node.tagName==="SQUARE-PLACEMENT");squarePlacement instanceof HTMLElement&&this.contains(squarePlacement)&&squarePlacement.getAttribute("data-page-type")==="mini-cart"&&this.closeDialog()};close(){this.closeDialog()}setPromotionsLoading(isLoading){const overlay=this.refs.promotionsLoadingOverlay,{dialog}=this.refs;overlay instanceof HTMLElement&&(overlay.classList.toggle("hidden",!isLoading),overlay.setAttribute("aria-hidden",String(!isLoading)),dialog instanceof HTMLDialogElement&&(isLoading?dialog.setAttribute("aria-busy","true"):dialog.removeAttribute("aria-busy")))}#handlePromotionsLoading=event=>{if(!(event instanceof CartDrawerPromotionsLoadingEvent))return;const target=event.target;!(target instanceof Node)||!this.contains(target)||this.setPromotionsLoading(!!event.detail.loading)};updateSummaryStickyState(){this.#updateStickyState()}#updateStickyState(){const{dialog}=this.refs;if(!dialog)return;const content=dialog.querySelector(".cart-drawer__content"),summary=dialog.querySelector(".cart-drawer__summary");if(!content||!summary){dialog.setAttribute("cart-summary-sticky","false");return}const drawerHeight=dialog.getBoundingClientRect().height,ratio=summary.getBoundingClientRect().height/drawerHeight;dialog.setAttribute("cart-summary-sticky",ratio>this.#summaryThreshold?"false":"true")}}customElements.get("cart-drawer-component")||customElements.define("cart-drawer-component",CartDrawerComponent);
2//# sourceMappingURL=/cdn/shop/t/190/assets/cart-drawer.js.map?v=122530165143497398781788968624

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.