1(()=>{var t={273:t=>{self,t.exports=(()=>{"use strict";var t={};return((t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=void 0,e.debounce=(t,e,s)=>{let i;return function(){let r=this,a=arguments;const o=()=>{i=null,s||t.apply(r,a)};s&&!i&&t.apply(r,a),clearTimeout(i),i=setTimeout(o,e)}},e.default=e.debounce})(0,t),t})()},845:t=>{self,t.exports=(()=>{"use strict";var t={};return((t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isArmadaLoaded=void 0,e.isArmadaLoaded=t=>{var e,s;const i=!0===(null===(s=null===(e=window.eight)||void 0===e?void 0:e.armada)||void 0===s?void 0:s.loaded);if(!t)return i;i?t():document.addEventListener("ARMADA:LOADED",t)},e.default=e.isArmadaLoaded})(0,t),t})()}},e={};function s(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,s),a.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=s(845),e=s(273);class i extends HTMLElement{constructor(){super(),this.variance=40,this.previousHighest=0,this.sectionSelectHandler=this.sectionSelectHandler.bind(this),this.fetchRecs=this.fetchRecs.bind(this),this.fetchCallback=this.fetchCallback.bind(this),this.fixedHandler=this.fixedHandler.bind(this),this.resizeHandler=this.resizeHandler.bind(this),this.dynamicButtonsUpdated=this.dynamicButtonsUpdated.bind(this),this.sectionFetchHandler=this.sectionFetchHandler.bind(this)}connectedCallback(){this.renderEl=this.querySelector('[data-armada-selector="cart-cross-sell-recommendations"]'),this.footer=document.querySelector("footer"),(0,t.isArmadaLoaded)((()=>this.init(!0)))}init(t=!1){this.cartWrap.setAttribute("data-cross-sells",!0);const e=this.cartWrap.querySelector("cart-cross-sells");e&&this.matchingColorSchemes&&e.classList.add("xl:border-l","xl:border-l-border-opacity-10","border-t","border-t-border-opacity-10","xl:border-t-0"),this.isDesktop?(this.classList.add("overflow-hidden"),this.classList.remove("w-full"),this.parentNode.classList.add("overflow-hidden"),window.addEventListener("scroll",this.fixedHandler,{passive:!0})):window.removeEventListener("scroll",this.fixedHandler,{passive:!0}),this.classList.add("flex"),this.classList.remove("hidden"),this.topSummary&&this.classList.add("xl:pt-[114px]"),window.eight.armada.elementRegistry.register({key:"cart-cross-sells",assetPath:"/assets/engine-cart-cross-sells.min.js"}),t&&this.setListeners()}initSlider(){const t=this.querySelector("slider-engine");t&&"false"===t.getAttribute("load")&&t.setAttribute("load","true")}reInit(t=!1){this.init(),t&&this.fetchRecs(),this.setDimensions(),this.fixedHandler()}setListeners(){document.addEventListener("ARMADA:LOAD:CART",(()=>this.fetchRecs())),document.addEventListener("ARMADA:SECTION:FETCH",(t=>this.sectionFetchHandler(t.detail)));const t=(0,e.debounce)(this.resizeHandler,250);window.addEventListener("resize",t);const s=document.querySelector("#dynamic-checkout-cart");if(s){const t=(0,e.debounce)(this.dynamicButtonsUpdated,500);new MutationObserver((e=>{e.forEach((e=>{t()}))})).observe(s,{childList:!0,attributes:!0,subtree:!0})}window.Shopify.designMode&&(document.addEventListener("shopify:section:select",this.sectionSelectHandler),document.addEventListener("shopify:section:reorder",this.sectionSelectHandler)),window.addEventListener("load",(()=>{document.addEventListener("ARMADA:CART:COUNT:CHANGE",(()=>this.reInit(!0)))}))}dynamicButtonsUpdated(){this.reInit()}fetchRecs(){if(0===Object.keys(window.eight.cartEngine.globalCart.highest).length)return this.showTitle(),this.showFallback(),void(this.previousHighest=0);if(this.previousHighest!==window.eight.cartEngine.globalCart.highest.product_id){this.previousHighest=window.eight.cartEngine.globalCart.highest.product_id;const t='[data-armada-selector="cart-cross-sell-recommendations"]';window.eight.sectionsEngine.sectionRenderingEngine.fetchSection(this.url,[this.sectionId],[this.renderEl],[t],this.fetchCallback)}}setDimensions(){this.isDesktop&&(this.style.width=`${this.parentNode.offsetWidth}px`,this.pinSummaryToBottom())}pinSummaryToBottom(){this.summary?.classList.remove("absolute","bottom-0"),this.cartHeight<this.offsetHeight-this.variance&&this.cartHeight<window.innerHeight&&window.eight.cartEngine?.globalCart?.cart.item_count>1&&this.summary?.classList.add("absolute","bottom-0")}showFallback(){this.querySelectorAll(".cart-cross-sell-fallback-slide").forEach((t=>{t.classList.remove("js-invisible")})),this.initSlider()}showTitle(){this.querySelector('[data-armada-selector="cart-cross-sells-heading"]').classList.remove("invisible")}fetchCallback(){this.showTitle(),this.initSlider()}async sectionFetchHandler({selectors:t}){if(!t.includes('[data-armada-selector="cart-main-section"]'))return;const e=document.querySelectorAll('[data-armada-selector="cart-main-section"] img'),s=Array.from(e).map((t=>new Promise(((e,s)=>{const i=new Image;i.addEventListener("load",(()=>e(i))),i.addEventListener("error",(t=>s(t))),i.src=t.src}))));await Promise.all(s),this.setDimensions()}resizeHandler(){this.style.width="",this.reInit()}fixedHandler(){if(!this.isDesktop)return void this.unsetFixed();if(this.cartHeight<this.offsetHeight-this.variance||0===window.eight.cartEngine?.globalCart?.cart.item_count)return;const t=this.cartMain.getBoundingClientRect();t.bottom<=window.innerHeight?this.atBottom():t.top>0?this.unsetFixed():this.setFixed()}atBottom(){this.classList.remove("fixed"),this.classList.add("absolute","bottom-0")}unsetFixed(){this.classList.remove("absolute","fixed","bottom-0")}setFixed(){this.classList.remove("absolute"),this.classList.add("fixed","bottom-0")}sectionSelectHandler(){this.fetchRecs(),this.fixedHandler()}get cartSection(){return document.querySelector('[data-armada-selector="cart-empty-section"]')}get cartHeight(){return this.summary?this.cartSection.offsetHeight+this.summary.offsetHeight:this.cartSection.offsetHeight}get headerHeight(){const t=document.querySelector("#shopify-section-section-announcement-bar"),e=document.querySelector("#shopify-section-header");return(t?t.offsetHeight:0)+(e?e.offsetHeight:0)}get matchingColorSchemes(){const t=this.dataset.colorScheme,e=document.querySelector('[data-armada-selector="cart-main-section"]');if(!e)return!1;return e.dataset.colorScheme==t}get summary(){return document.querySelector("[data-cart-summary-wrapper]")}get topSummary(){const t=document.querySelector("[data-cart-summary-container]");if(!t)return;return"true"==t.dataset.stickySummary}get isDesktop(){return"xl"===window.eight.getCurrentBreakpoint()||"2xl"===window.eight.getCurrentBreakpoint()}get cartWrap(){return document.querySelector('[data-template-type="cart"]')}get cartMain(){return document.querySelector(".shopify-section.cart-main")}get numProducts(){return this.dataset.numProducts?this.dataset.numProducts:4}get sectionId(){return!!this.dataset.sectionId&&this.dataset.sectionId}get url(){return`/recommendations/products?product_id=${window.eight.cartEngine.globalCart.highest.product_id}&limit=${this.numProducts}`}}customElements.define("cart-cross-sells",i)})()})();
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.