PageSourceSearch

https://sportsacademy.us/cdn/shop/t/24/assets/smi-product-card.min.js?v=97260080280164424101768470805

js sportsacademy.us collected 2026-10-01 13:51:36 UTC 12,922 bytes, 1 lines download raw bytes

1window.SMI_ProductCard||(window.SMI_ProductCard=function(){"use strict";return class{activeClass="smi-variants__item--active";cardClass="smi-product-card";constructor(){this.handleClicks()}handleClicks(){const t=this;document.body.addEventListener("click",(function(e){if(e.target.matches(`.smi-variants__item:not(.${t.activeClass})`))t._handleVariant(e.target);else{const s=e.target.closest(`.smi-variants__item:not(.${t.activeClass})`);s&&t._handleVariant(s)}}))}_handleVariant(t){const e=t.parentNode.querySelector(`.${this.activeClass}`);e&&e!==t&&e.classList.remove(this.activeClass),t.classList.add(this.activeClass);const s=t.closest(`.${this.cardClass}`),r=t.dataset.mediaUrl;if(r){const t=s.querySelector("img:first-child");t&&(t.src=r,t.removeAttribute("srcset"))}const i=t.dataset.id;if(i){const t=s.querySelector(".smi-button-cart a");if(t){const[e]=t.href.split("?");t.href=`${e}?variant=${i}`}}}}}(),Shopify.designMode?new window.SMI_ProductCard:window.addEventListener("DOMContentLoaded",(()=>{new window.SMI_ProductCard}))),customElements.get("smi-product-form")||customElements.define("smi-product-form",class extends HTMLElement{static get observedAttributes(){return["data-soldout"]}constructor(){super(),this._enableButtonSoldOut=this.getAttribute("data-enable-soldout")||"false",this._isSoldOut=this.getAttribute("data-soldout")||"false";const t=this.getAttribute("data-error-selector")||"";""!==t&&(this.errorElement=document.querySelector(t)),this.form=this.querySelector("form"),this.form.addEventListener("submit",this.onSubmitHandler.bind(this)),this.submitButton=this.querySelector('[type="submit"]'),this.sectionsPayload=[],this.redirectToCartPage=!0,this.loading=!1,this.config={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/javascript"}},this.error=!1}get isSoldOut(){return this._isSoldOut}set isSoldOut(t){this._isSoldOut!==t&&(this._isSoldOut=t,this.setAttribute("data-soldout",t))}attributeChangedCallback(t,e,s){"data-soldout"===t&&e!==s&&e&&(this._isSoldOut=s,this.updateForm())}updateForm(){this.submitButton=this.querySelector('[type="submit"]'),this.submitButton&&("true"===this._isSoldOut?(this.submitButton.setAttribute("aria-disabled",!0),this.submitButton.classList.add("_soldout"),this.loading=!0):(this.submitButton.setAttribute("aria-disabled",!1),this.submitButton.classList.remove("_soldout"),this.loading=!1))}connectedCallback(){this.updateForm()}onSubmitHandler(t){if(t.preventDefault(),this.submitButton=this.querySelector('[type="submit"]'),this.loading||!this.submitButton)return;this.loading=!0,this.errorElement&&(this.errorElement.innerHTML=""),this.submitButton.classList.add("_loading");const e={...this.config},s=new FormData(this.form);this.compatibleFreeThemesSectionPayload(),s.append("sections",this.sectionsPayload),document.dispatchEvent(new CustomEvent("smind:product-form:before-submit",{detail:{formData:s}}));if("true"===(s.get("isPayload")||"false")){const t={};s.forEach(((e,s)=>{t[s]="items"===s?JSON.parse(e):e})),e.body=JSON.stringify(t)}else e.headers["X-Requested-With"]="XMLHttpRequest",delete e.headers["Content-Type"],e.body=s;fetch(`${smiObject.routes.cart_add_url}`,e).then((t=>t.json())).then((t=>{if(t?.status)return"true"===this._enableButtonSoldOut&&(this.isSoldOut="true"),this.errorElement&&(this.errorElement.innerHTML=this.getErrorHtml(t.message)),void(this.error=!0);this.loading=!1,this.renderBubbleAndDrawer(t),this.compatibleFreeThemesRenderDrawer(t),this.openDrawerOrGotoCart()})).catch((t=>{console.error(t)})).finally((()=>{this.error||document.dispatchEvent(new CustomEvent("smind:product-form:submit-complete")),"false"===this._enableButtonSoldOut&&(this.loading=!1),this.submitButton.classList.remove("_loading"),this.error=!1}))}getErrorHtml(t){return`<div class="smi-cart-error-message smi-d-flex smi-column-gap-xs smi-align-items-center"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">\n                                <circle cx="12" cy="12" r="10.5" fill="#EB001B" stroke="white"></circle>\n                                <rect x="10.5" y="5.73938" width="3" height="8" rx="1.5" fill="white"></rect>\n                                <circle cx="12" cy="16.7607" r="1.5" fill="white"></circle>\n                            </svg> <span class="smi-text-sm smi-color-text-75">${t}</span></div>`}openDrawerOrGotoCart(){"function"==typeof SMI_CartDrawer&&(this.redirectToCartPage=!1,document.dispatchEvent(new CustomEvent("smiCartDrawerRender")));try{fetch("/cart.js",this.config).then((t=>t.json())).then((t=>{const e=t?.item_count??0;document.querySelectorAll(".smi-cart-button .smi-cart-badges").forEach((t=>{t.innerHTML=e})),document.dispatchEvent(new CustomEvent("smiCartCounter",{data:e}))}))}catch(t){}let t=this.redirectToCartPage;const e=new CustomEvent("smind:product-form:before-redirect",{detail:{_redirectToCartPage:t},cancelable:!0});if(document.dispatchEvent(e)||(t=e.detail._redirectToCartPage),document.dispatchEvent(new CustomEvent("smind:product-form:submit-complete")),t){const t=window.smiObject?.routes?.cart_url;t?window.location.href=t:console.warn("Cart URL is not defined in smiObject.routes.")}}
1renderBubbleAndDrawer(t){this.getSectionsToRender().forEach((e=>{const s=document.getElementById(e.id);if(s){const r=s.querySelector(e.selector)||s;if(r)try{r.innerHTML=this.getSectionInnerHTML(t?.sections?.[e.section],e.selector)}catch(t){}}}))}getSectionsToRender(){const t=document.getElementById("smi-drawer-items"),e=[];return t&&e.push({id:"shopify-section-"+t.dataset.id,section:t.dataset.id,selector:".smi-drawer-items_w"}),e}getSectionInnerHTML(t,e){return(new DOMParser).parseFromString(t,"text/html").querySelector(e)?.innerHTML||""}compatibleFreeThemesSectionPayload(){if(this.sectionsPayload=this.getSectionsToRender().map((t=>t.section)),this.freeThemeDrawer=document.querySelector("cart-notification")||document.querySelector("cart-drawer"),this.freeThemeDrawer&&"function"==typeof this.freeThemeDrawer.getSectionsToRender)try{const t=this.freeThemeDrawer.getSectionsToRender().map((t=>t.id)).filter(Boolean);this.sectionsPayload=this.sectionsPayload.concat(t)}catch(t){console.error("Error fetching sections from cartDrawer:",t)}}compatibleFreeThemesRenderDrawer(t){this.freeThemeDrawer&&"function"==typeof this.freeThemeDrawer.renderContents&&(this.freeThemeDrawer.renderContents(t),this.freeThemeDrawer.classList.remove("is-empty"),this.redirectToCartPage=!1)}}),window.SMI_ProductCard||(window.SMI_ProductCard=function(){"use strict";return class{activeClass="smi-variants__item--active";cardClass="smi-product-card";constructor(){this.handleClicks()}handleClicks(){const t=this;document.body.addEventListener("click",(function(e){if(e.target.matches(`.smi-variants__item:not(.${t.activeClass})`))t._handleVariant(e.target);else{const s=e.target.closest(`.smi-variants__item:not(.${t.activeClass})`);s&&t._handleVariant(s)}}))}_handleVariant(t){const e=t.parentNode.querySelector(`.${this.activeClass}`);e&&e!==t&&e.classList.remove(this.activeClass),t.classList.add(this.activeClass);const s=t.closest(`.${this.cardClass}`),r=t.dataset.mediaUrl;if(r){const t=s.querySelector("img:first-child");t&&(t.src=r,t.removeAttribute("srcset"))}const i=t.dataset.id;if(i){const t=s.querySelector(".smi-button-cart a");if(t){const[e]=t.href.split("?");t.href=`${e}?variant=${i}`}}}}}(),Shopify.designMode?new window.SMI_ProductCard:window.addEventListener("DOMContentLoaded",(()=>{new window.SMI_ProductCard}))),customElements.get("smi-product-form")||customElements.define("smi-product-form",class extends HTMLElement{static get observedAttributes(){return["data-soldout"]}constructor(){super(),this._enableButtonSoldOut=this.getAttribute("data-enable-soldout")||"false",this._isSoldOut=this.getAttribute("data-soldout")||"false";const t=this.getAttribute("data-error-selector")||"";""!==t&&(this.errorElement=document.querySelector(t)),this.form=this.querySelector("form"),this.form.addEventListener("submit",this.onSubmitHandler.bind(this)),this.submitButton=this.querySelector('[type="submit"]'),this.sectionsPayload=[],this.redirectToCartPage=!0,this.loading=!1,this.config={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/javascript"}},this.error=!1}get isSoldOut(){return this._isSoldOut}set isSoldOut(t){this._isSoldOut!==t&&(this._isSoldOut=t,this.setAttribute("data-soldout",t))}attributeChangedCallback(t,e,s){"data-soldout"===t&&e!==s&&e&&(this._isSoldOut=s,this.updateForm())}updateForm(){this.submitButton=this.querySelector('[type="submit"]'),this.submitButton&&("true"===this._isSoldOut?(this.submitButton.setAttribute("aria-disabled",!0),this.submitButton.classList.add("_soldout"),this.loading=!0):(this.submitButton.setAttribute("aria-disabled",!1),this.submitButton.classList.remove("_soldout"),this.loading=!1))}connectedCallback(){this.updateForm()}onSubmitHandler(t){if(t.preventDefault(),this.submitButton=this.querySelector('[type="submit"]'),this.loading||!this.submitButton)return;this.loading=!0,this.errorElement&&(this.errorElement.innerHTML=""),this.submitButton.classList.add("_loading");const e={...this.config},s=new FormData(this.form);this.compatibleFreeThemesSectionPayload(),s.append("sections",this.sectionsPayload),document.dispatchEvent(new CustomEvent("smind:product-form:before-submit",{detail:{formData:s}}));if("true"===(s.get("isPayload")||"false")){const t={};
1s.forEach(((e,s)=>{t[s]="items"===s?JSON.parse(e):e})),e.body=JSON.stringify(t)}else e.headers["X-Requested-With"]="XMLHttpRequest",delete e.headers["Content-Type"],e.body=s;fetch(`${smiObject.routes.cart_add_url}`,e).then((t=>t.json())).then((t=>{if(t?.status)return"true"===this._enableButtonSoldOut&&(this.isSoldOut="true"),this.errorElement&&(this.errorElement.innerHTML=this.getErrorHtml(t.message)),void(this.error=!0);this.loading=!1,this.renderBubbleAndDrawer(t),this.compatibleFreeThemesRenderDrawer(t),this.openDrawerOrGotoCart()})).catch((t=>{console.error(t)})).finally((()=>{this.error||document.dispatchEvent(new CustomEvent("smind:product-form:submit-complete")),"false"===this._enableButtonSoldOut&&(this.loading=!1),this.submitButton.classList.remove("_loading"),this.error=!1}))}getErrorHtml(t){return`<div class="smi-cart-error-message smi-d-flex smi-column-gap-xs smi-align-items-center"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">\n                                <circle cx="12" cy="12" r="10.5" fill="#EB001B" stroke="white"></circle>\n                                <rect x="10.5" y="5.73938" width="3" height="8" rx="1.5" fill="white"></rect>\n                                <circle cx="12" cy="16.7607" r="1.5" fill="white"></circle>\n                            </svg> <span class="smi-text-sm smi-color-text-75">${t}</span></div>`}openDrawerOrGotoCart(){"function"==typeof SMI_CartDrawer&&(this.redirectToCartPage=!1,document.dispatchEvent(new CustomEvent("smiCartDrawerRender")));try{fetch("/cart.js",this.config).then((t=>t.json())).then((t=>{const e=t?.item_count??0;document.querySelectorAll(".smi-cart-button .smi-cart-badges").forEach((t=>{t.innerHTML=e})),document.dispatchEvent(new CustomEvent("smiCartCounter",{data:e}))}))}catch(t){}let t=this.redirectToCartPage;const e=new CustomEvent("smind:product-form:before-redirect",{detail:{_redirectToCartPage:t},cancelable:!0});if(document.dispatchEvent(e)||(t=e.detail._redirectToCartPage),document.dispatchEvent(new CustomEvent("smind:product-form:submit-complete")),t){const t=window.smiObject?.routes?.cart_url;t?window.location.href=t:console.warn("Cart URL is not defined in smiObject.routes.")}}renderBubbleAndDrawer(t){this.getSectionsToRender().forEach((e=>{const s=document.getElementById(e.id);if(s){const r=s.querySelector(e.selector)||s;if(r)try{r.innerHTML=this.getSectionInnerHTML(t?.sections?.[e.section],e.selector)}catch(t){}}}))}getSectionsToRender(){const t=document.getElementById("smi-drawer-items"),e=[];return t&&e.push({id:"shopify-section-"+t.dataset.id,section:t.dataset.id,selector:".smi-drawer-items_w"}),e}getSectionInnerHTML(t,e){return(new DOMParser).parseFromString(t,"text/html").querySelector(e)?.innerHTML||""}compatibleFreeThemesSectionPayload(){if(this.sectionsPayload=this.getSectionsToRender().map((t=>t.section)),this.freeThemeDrawer=document.querySelector("cart-notification")||document.querySelector("cart-drawer"),this.freeThemeDrawer&&"function"==typeof this.freeThemeDrawer.getSectionsToRender)try{const t=this.freeThemeDrawer.getSectionsToRender().map((t=>t.id)).filter(Boolean);this.sectionsPayload=this.sectionsPayload.concat(t)}catch(t){console.error("Error fetching sections from cartDrawer:",t)}}compatibleFreeThemesRenderDrawer(t){this.freeThemeDrawer&&"function"==typeof this.freeThemeDrawer.renderContents&&(this.freeThemeDrawer.renderContents(t),this.freeThemeDrawer.classList.remove("is-empty"),this.redirectToCartPage=!1)}});;

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.