PageSourceSearch

https://farberwarecookware.com/cdn/shop/t/533/assets/cart-drawer.js?v=105678579445747956791789498916

js farberwarecookware.com collected 2026-09-26 01:37:56 UTC 2,279 bytes, 2 lines download raw bytes

1import{DialogComponent,DialogOpenEvent}from"@theme/dialog";import{StandardEvents}from"@shopify/events";import{morphSection,sectionRenderer}from"@theme/section-renderer";class CartDrawerComponent extends DialogComponent{#summaryThreshold=.5;connectedCallback(){super.connectedCallback(),document.addEventListener(StandardEvents.cartLinesUpdate,this.#handleCartLinesUpdate),this.addEventListener(DialogOpenEvent.eventName,this.#updateStickyState)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(StandardEvents.cartLinesUpdate,this.#handleCartLinesUpdate),this.removeEventListener(DialogOpenEvent.eventName,this.#updateStickyState)}#handleCartLinesUpdate=async event=>{if(!this.hasAttribute("auto-open")||event.action!=="add"||this.refs.dialog.open)return;let resolved={};try{resolved=await event.promise??{}}catch(error){error?.name!=="AbortError"&&console.warn("[cart-drawer] Event promise rejected:",error);return}if(resolved.detail?.didError)return;const sectionId=this.querySelector("cart-items-component")?.dataset?.sectionId;if(sectionId)try{const sectionHtml=resolved.detail?.sections?.[sectionId];sectionHtml?morphSection(sectionId,sectionHtml):await sectionRenderer.renderSection(sectionId,{cache:!1})}catch(error){console.error("Failed to update cart drawer content:",error)}this.showDialog()};open(){this.showDialog(),customElements.whenDefined("shopify-payment-terms").then(()=>{document.querySelector("shopify-payment-terms")?.shadowRoot?.querySelector("#shopify-installments-cta")?.addEventListener("click",this.closeDialog,{once:!0})})}close(){this.closeDialog()}#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/533/assets/cart-drawer.js.map?v=105678579445747956791789498916

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.