PageSourceSearch

https://anthemsnacks.com/cdn/shop/t/13/assets/favorite-collection.js?v=151140084358624451361782249495

js anthemsnacks.com collected 2026-10-05 19:27:38 UTC 3,773 bytes, 2 lines download raw bytes

1(function(){const ACTIVE_CLASSES=["tw-bg-navy","tw-text-white","tw-rounded-[5rem]"],INACTIVE_CLASSES=["tw-text-navy"],cloneStorage=new WeakMap,loadEmbla=()=>new Promise(resolve=>{if(window.EmblaCarousel){resolve();return}const script=document.createElement("script");script.src="https://unpkg.com/[email protected]/embla-carousel.umd.js",script.onload=resolve,document.head.appendChild(script)}),isXl=()=>window.innerWidth>=1280,getEmblaOptions=()=>({loop:isXl(),align:isXl()?"center":"start",containScroll:!1}),detachClones=container=>{const clones=Array.from(container.querySelectorAll("[data-fc-clone]"));clones.length&&(cloneStorage.set(container,clones),clones.forEach(el=>el.remove()))},attachClones=container=>{const clones=cloneStorage.get(container);clones&&clones.forEach(el=>container.appendChild(el))},syncClones=container=>{isXl()?attachClones(container):detachClones(container)},initSection=sectionEl=>{const emblaInstances={},panelContainers={},initEmblaForPanel=panel=>{const idx=panel.dataset.fcPanel,viewport=panel.querySelector(".tw-overflow-hidden");if(!viewport)return;const container=viewport.querySelector(".tw-flex");if(panelContainers[idx]=container,syncClones(container),emblaInstances[idx]){emblaInstances[idx].reInit(getEmblaOptions());return}const embla=EmblaCarousel(viewport,getEmblaOptions());emblaInstances[idx]=embla,panel.querySelector(".fc-prev").addEventListener("click",()=>embla.scrollPrev()),panel.querySelector(".fc-next").addEventListener("click",()=>embla.scrollNext())};window.addEventListener("resize",()=>{Object.entries(emblaInstances).forEach(([idx,embla])=>{const container=panelContainers[idx];container&&syncClones(container),embla.reInit(getEmblaOptions())})});const showPanel=async index=>{await loadEmbla(),sectionEl.querySelectorAll("[data-fc-panel]").forEach(p=>p.classList.add("tw-hidden")),sectionEl.querySelectorAll(".fc-tab").forEach(tab2=>{tab2.classList.remove(...ACTIVE_CLASSES),tab2.classList.add(...INACTIVE_CLASSES)});const panel=sectionEl.querySelector(`[data-fc-panel="${index}"]`),tab=sectionEl.querySelector(`[data-fc-tab="${index}"]`);panel&&(panel.classList.remove("tw-hidden"),initEmblaForPanel(panel)),tab&&(tab.classList.remove(...INACTIVE_CLASSES),tab.classList.add(...ACTIVE_CLASSES))},handleAddToCart=atcDiv=>{const btn=atcDiv.querySelector("button");if(!btn||btn.classList.contains("tw-pointer-events-none"))return;const variantId=atcDiv.dataset.variantId,textEl=btn.querySelector("[data-fc-btn-text]"),spinnerEl=btn.querySelector("[data-fc-btn-spinner]");btn.classList.add("tw-pointer-events-none"),textEl.classList.add("tw-hidden"),spinnerEl.classList.remove("tw-hidden"),fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:variantId,quantity:1,sections:["cart-drawer","cart-icon-bubble"],sections_url:window.location.pathname})}).then(res=>res.json()).then(data=>{const cartDrawer=document.querySelector("cart-drawer");cartDrawer&&data.sections&&cartDrawer.renderContents(data)}).finally(()=>{btn.classList.remove("tw-pointer-events-none"),textEl.classList.remove("tw-hidden"),spinnerEl.classList.add("tw-hidden")})};sectionEl.addEventListener("click",e=>{const atcDiv=e.target.closest("[data-fc-atc]");atcDiv&&handleAddToCart(atcDiv)}),sectionEl.querySelectorAll(".fc-tab").forEach(tab=>{tab.addEventListener("click",()=>showPanel(tab.dataset.fcTab))});const firstTab=sectionEl.querySelector(".fc-tab");firstTab&&showPanel(firstTab.dataset.fcTab)},init=()=>{document.querySelectorAll("[data-favorite-collections]").forEach(initSection)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})();
2//# sourceMappingURL=/cdn/shop/t/13/assets/favorite-collection.js.map?v=151140084358624451361782249495

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.