PageSourceSearch

https://kosas.com/cdn/shop/t/340/assets/hello-bar.BIj2cec1.min.js

js kosas.com collected 2026-09-24 18:30:29 UTC 1,951 bytes, 1 lines download raw bytes

1class s extends HTMLElement{constructor(){super(),this.items=this.querySelectorAll(".hello-bar__item"),window.theme&&window.theme.shippingTest===!0&&this.runABTest(),!(this.items.length<=1)&&(this.speed=this.dataset.transitionSpeed*1e3,this.currentItem=0,this.items[this.currentItem].classList.add("hello-bar__item--active"),this.motionQuery=window.matchMedia("(prefers-reduced-motion: reduce)"),this.motionQuery.matches||(this.interval=setInterval(()=>{this.changeItem()},this.speed)),this.motionQuery.addEventListener("change",t=>{t.matches?clearInterval(this.interval):this.interval=setInterval(()=>{this.changeItem()},this.speed)}),this.bindEditorEvents())}changeItem(){const t=this.items[this.currentItem];this.currentItem=this.currentItem+1,this.currentItem>=this.items.length&&(this.currentItem=0);const e=this.items[this.currentItem];e.classList.add("hello-bar__item--active"),t.classList.remove("hello-bar__item--active"),e.style.bottom="0px",setTimeout(()=>{e.style.position="relative",t.style.bottom="-100%",t.style.position="absolute"},500)}bindEditorEvents(){this.addEventListener("shopify:block:select",t=>{const e=t.detail.blockId,i=document.querySelector(`[data-block-id="${e}"]`);i&&i.classList.add("hello-bar__item--active-editor")}),this.addEventListener("shopify:block:deselect",t=>{const e=t.detail.blockId,i=document.querySelector(`[data-block-id="${e}"]`);i&&i.classList.remove("hello-bar__item--active-editor")})}async runABTest(){const t=this.querySelector(".hello-bar__content");t&&(await this.getABTestVariant()==="B"&&(t.textContent="Free Shipping on US Orders $50+ & Free Returns"),this.fadeInElement(t))}async getABTestVariant(){let t=localStorage.getItem("pdq_ab_variant");for(;!t;)await new Promise(i=>setTimeout(i,100)),t=localStorage.getItem("pdq_ab_variant");const{value:e}=JSON.parse(t);return e}fadeInElement(t){t.classList.remove("opacity-0"),t.classList.add("opacity-100")}}customElements.define("hello-bar",s);

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.