PageSourceSearch

https://larnerseeds.com/cdn/shop/t/12/assets/standard-actions-override.js?v=179748164002689766821785796714

js larnerseeds.com collected 2026-10-01 14:52:37 UTC 2,432 bytes, 2 lines download raw bytes

1const DAWN_CART_TAGS=["cart-drawer","cart-items","cart-drawer-items","cart-notification"],DAWN_PUBSUB_REFRESHED_SECTIONS=new Set(["cart-drawer:cart-drawer","cart-drawer-items:CartDrawer","cart-items:main-cart-items"]);function collectCartSections(){const sections=new Map;for(const el of document.querySelectorAll(DAWN_CART_TAGS.join(","))){let entries;try{entries=el.getSectionsToRender?.()}catch{continue}const tag=el.tagName.toLowerCase();for(const entry of entries??[]){if(DAWN_PUBSUB_REFRESHED_SECTIONS.has(`${tag}:${entry.id}`))continue;const sectionId=entry.section??entry.id;if(!sectionId||sections.has(sectionId))continue;const root=entry.section?document.getElementById(entry.id):document;if(!root)continue;const mount=entry.selector?root.querySelector(entry.selector)??(entry.section?root:null):document.getElementById(entry.id);mount&&sections.set(sectionId,{mount,extractSelector:entry.selector||".shopify-section"})}}return sections}async function refreshDawnCartUI(){const sections=collectCartSections(),sectionsQuery=sections.size?`?sections=${[...sections.keys()].join(",")}`:"",url=`${typeof routes<"u"&&routes?.cart_url||"/cart"}.js${sectionsQuery}`,cartData=await fetch(url,{headers:{Accept:"application/json"}}).then(r=>r.ok?r.json():null).catch(()=>null);if(cartData?.sections)for(const[id,{mount,extractSelector}]of sections){const html=cartData.sections[id];if(!html)continue;const source=new DOMParser().parseFromString(html,"text/html").querySelector(extractSelector);source&&mount.replaceChildren(...source.childNodes)}publish(PUB_SUB_EVENTS.cartUpdate,{source:"external-refresh",cartData:cartData??void 0})}function initStandardActions(){const actions=window.Shopify?.actions;actions&&(actions.openCart.configure({async handler(defaultHandler){const drawer=document.querySelector("cart-drawer");if(drawer&&typeof drawer.open=="function"){drawer.open();return}return defaultHandler()}}),actions.updateCart.configure({eventTarget:()=>document,async handler(defaultHandler){const result=await defaultHandler();try{await refreshDawnCartUI()}catch(error){console.error("[Dawn] Standard Actions cart refresh failed; reloading.",error),window.location.reload()}return result}}))}window.Shopify?.actions?initStandardActions():document.addEventListener("DOMContentLoaded",initStandardActions,{once:!0});
2//# sourceMappingURL=/cdn/shop/t/12/assets/standard-actions-override.js.map?v=179748164002689766821785796714

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.