PageSourceSearch

https://oxygennutrition.com.au/cdn/shop/t/130/assets/cart.js?v=56924399519280667951790724024

js oxygennutrition.com.au collected 2026-10-04 02:05:14 UTC 10,049 bytes, 2 lines download raw bytes

1class CartRemoveButton extends HTMLElement{constructor(){super(),this.addEventListener("click",event=>{event.preventDefault(),(this.closest("cart-items")||this.closest("cart-drawer-items")).updateQuantity(this.dataset.index,0)})}}customElements.define("cart-remove-button",CartRemoveButton);class CartItems extends HTMLElement{constructor(){super(),this.lineItemStatusElement=document.getElementById("shopping-cart-line-item-status")||document.getElementById("CartDrawer-LineItemStatus"),this.currentItemCount=Array.from(this.querySelectorAll('[name="updates[]"]')).reduce((total,quantityInput)=>total+parseInt(quantityInput.value),0),this.debouncedOnChange=debounce(event=>{this.onChange(event)},300),this.AVOBooster(),this.addEventListener("change",this.debouncedOnChange.bind(this))}onChange(event){this.updateQuantity(event.target.dataset.index,event.target.value,document.activeElement.getAttribute("name"),event.target.dataset.key)}AVOBooster(){var _this=this;fetch("/cart.js").then(res=>res.json()).then(cart=>{var Items=cart.items,UnlockedItem=[],ExfreeItem=[],Arrayupdate=[],NeedtoRemove=[],NeedtoAdd=[],Rp={updates:{}},Needtoupdate=!1,Product1=42639045656665,Product2=42639067873369,Product3=42639078260825,Product4=41700749115481,Deal_1=7500,Deal_2=12500,Deal_3=17500,$EmraldTotal=0;$EmraldTotal>=Deal_1&&UnlockedItem.push(Product1),$EmraldTotal>=Deal_2&&UnlockedItem.push(Product2),$EmraldTotal>=Deal_3&&UnlockedItem.push(Product3),cart.total_price>14999&&UnlockedItem.push(Product4);for(var i=0;i<Items.length;i++){var Item=Items[i];(Item.id==Product1||Item.id==Product2||Item.id==Product3||Item.id==Product4)&&(Item.properties&&Item.properties["_free-product"]?ExfreeItem.push(Item.id):(Needtoupdate=!0,NeedtoRemove.push(Item.key),Rp.updates[Item.key]=0),Item.quantity>1&&(NeedtoRemove.push(Item.id),Rp.updates[Item.id]=1))}for(var j=0;j<ExfreeItem.length;j++){var Ex=ExfreeItem[j];jQuery.inArray(Ex,UnlockedItem)==-1&&(Needtoupdate=!0,NeedtoRemove.push(Ex),Rp.updates[Ex]=0)}for(var k=0;k<UnlockedItem.length;k++){var Fr=UnlockedItem[k];jQuery.inArray(Fr,ExfreeItem)==-1&&(Needtoupdate=!0,NeedtoAdd.push(Fr))}NeedtoRemove.length?(Rp.sections_url=window.location.pathname,Rp.sections=_this.getSectionsToRender().map(section=>section.section),fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Rp)}).then(response=>response.text()).then(state=>{const parsedState=JSON.parse(state);NeedtoAdd.length?_this.ADDTOCART(NeedtoAdd):_this.CARTUPDATE(parsedState)})):NeedtoAdd.length&&_this.ADDTOCART(NeedtoAdd)})}ADDTOCART(Products){var _this=this;if(Products.length){let formData={items:[]};formData.sections_url=window.location.pathname,formData.sections=_this.getSectionsToRender().map(section=>section.section);for(var i=0;i<Products.length;i++)Products[i]&&formData.items.push({id:Products[i],quantity:1,properties:{"_free-product":"true"}});formData.items.length&&fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(formData)}).then(response=>response.text()).then(state=>{const parsedState=JSON.parse(state);_this.CARTUPDATE(parsedState)})}}CARTUPDATE(parsedState){const cartDrawerWrapper=document.querySelector("cart-drawer"),cartFooter=document.getElementById("main-cart-footer");cartFooter&&cartFooter.classList.toggle("is-empty",parsedState.item_count===0),cartDrawerWrapper&&cartDrawerWrapper.classList.toggle("is-empty",parsedState.item_count===0),this.get
1SectionsToRender().forEach((section=>{const elementToReplace=document.getElementById(section.id).querySelector(section.selector)||document.getElementById(section.id);elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector)})),OxygenProtection.Checkproduct(),OxygenProtection.CookieInit(),OxygenProtection.Init()}CreatinePromo(){var $lunartotal=0,$Emrald_array=[7789680394329,7789483491417,7789668630617,7494130073689,7790646820953,7288055791705,7790650818649,7127039770713,6567738572889,7474229313625,4747959992409,4775256883289,7495021854809,7295439896665,7169806237785,7232960200793,7185129341017,7188581318745,7233012400217,6683102937177,7169809907801,7495106986073,7451079770201,7169808400473,6849173127257,7185449779289,7165366567001,6849035337817,7453557555289,7185444110425,7291386495065,7271731363929,7185121050713,7473142464601,6849233715289,4775652229209,6556937650265,7754797809753,7505700618329,7505698127961,6974312939609,7185861443673,7474228953177,7232960692313,7232960823385,7455072518233,7193316819033,6849097465945,7787434213465,4745215082585,7188614512729,4774717358169,7233041301593,6974299111513,7703694606425,7474215354457,7473177591897,4747374035033,7165367746649,7185873961049,6848988545113,7105444675673,7790716649561,7188555399257,7226598064217,6849088159833,7410234196057,7790713536601,7505691508825,7478884663385,7790715273305,7754798792793,7790741979225,7408590159961,7790726053977,7790678835289,7790736408665,7790682636377,7233066696793],$Emrald_shaker=41895020200025,$Emrald_gummy=41895018659929,_this=this;fetch("/cart.js").then(res=>res.json()).then(cart=>{for(var $items=cart.items,$CartItemsId=[],$Emrald_status=!1,i=0;i<$items.length;i++){var $item=$items[i];$CartItemsId.push($items[i].id),$item.vendor=="Lunar Performance"&&($lunartotal+=$item.line_price)}})}freeProductGetSectionsToRender(){return[{id:"CartDrawer",section:"cart-drawer",selector:".drawer__inner"},{id:"cart-icon-bubble",section:"cart-icon-bubble",selector:".shopify-section"}]}getSectionsToRender(){return[{id:"main-cart-items",section:document.getElementById("main-cart-items").dataset.id,selector:".js-contents"},{id:"cart-icon-bubble",section:"cart-icon-bubble",selector:".shopify-section"},{id:"cart-live-region-text",section:"cart-live-region-text",selector:".shopify-section"},{id:"main-cart-footer",section:document.getElementById("main-cart-footer").dataset.id,selector:".js-contents"}]}updateQuantity(line,quantity,name,key){this.enableLoading(line);const body=JSON.stringify({line,quantity,sections:this.getSectionsToRender().map(section=>section.section),sections_url:window.location.pathname});fetch(`${routes.cart_change_url}`,{...fetchConfig(),body}).then(response=>response.text()).then(state=>{key&&quantity&&GA4.added_or_removed(key,quantity);const parsedState=JSON.parse(state);this.classList.toggle("is-empty",parsedState.item_count===0);const cartDrawerWrapper=document.querySelector("cart-drawer"),cartFooter=document.getElementById("main-cart-footer");cartFooter&&cartFooter.classList.toggle("is-empty",parsedState.item_count===0),cartDrawerWrapper&&cartDrawerWrapper.classList.toggle("is-empty",parsedState.item_count===0),this.get
1SectionsToRender().forEach((section=>{const elementToReplace=document.getElementById(section.id).querySelector(section.selector)||document.getElementById(section.id);elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector)})),this.updateLiveRegions(line,parsedState.item_count);const lineItem=document.getElementById(`CartItem-${line}`)||document.getElementById(`CartDrawer-Item-${line}`);lineItem&&lineItem.querySelector(`[name="${name}"]`)?cartDrawerWrapper?trapFocus(cartDrawerWrapper,lineItem.querySelector(`[name="${name}"]`)):lineItem.querySelector(`[name="${name}"]`).focus():parsedState.item_count===0&&cartDrawerWrapper?trapFocus(cartDrawerWrapper.querySelector(".drawer__inner-empty"),cartDrawerWrapper.querySelector("a")):document.querySelector(".cart-item")&&cartDrawerWrapper&&trapFocus(cartDrawerWrapper,document.querySelector(".cart-item__name")),this.disableLoading(),OxygenProtection.Checkproduct(),OxygenProtection.CookieInit(),OxygenProtection.Init(),GA4.cart_item(parsedState)}).catch(()=>{this.querySelectorAll(".loading-overlay").forEach(overlay=>overlay.classList.add("hidden"));const errors=document.getElementById("cart-errors")||document.getElementById("CartDrawer-CartErrors");errors.textContent=window.cartStrings.error,this.disableLoading()})}updateLiveRegions(line,itemCount){if(this.currentItemCount===itemCount){const lineItemError=document.getElementById(`Line-item-error-${line}`)||document.getElementById(`CartDrawer-LineItemError-${line}`),quantityElement=document.getElementById(`Quantity-${line}`)||document.getElementById(`Drawer-quantity-${line}`);lineItemError.querySelector(".cart-item__error-text").innerHTML=window.cartStrings.quantityError.replace("[quantity]",quantityElement.value)}this.currentItemCount=itemCount,this.lineItemStatusElement.setAttribute("aria-hidden",!0);const cartStatus=document.getElementById("cart-live-region-text")||document.getElementById("CartDrawer-LiveRegionText");cartStatus.setAttribute("aria-hidden",!1),setTimeout(()=>{cartStatus.setAttribute("aria-hidden",!0)},1e3)}getSectionInnerHTML(html,selector){return console.log("getSectionInnerHTML selector",selector),new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}enableLoading(line){(document.getElementById("main-cart-items")||document.getElementById("CartDrawer-CartItems")).classList.add("cart__items--disabled");const cartItemElements=this.querySelectorAll(`#CartItem-${line} .loading-overlay`),cartDrawerItemElements=this.querySelectorAll(`#CartDrawer-Item-${line} .loading-overlay`);
1[...cartItemElements,...cartDrawerItemElements].forEach(overlay=>overlay.classList.remove("hidden")),document.activeElement.blur(),this.lineItemStatusElement.setAttribute("aria-hidden",!1)}disableLoading(){(document.getElementById("main-cart-items")||document.getElementById("CartDrawer-CartItems")).classList.remove("cart__items--disabled")}}customElements.define("cart-items",CartItems),customElements.get("cart-note")||customElements.define("cart-note",class extends HTMLElement{constructor(){super(),this.addEventListener("change",debounce(event=>{const body=JSON.stringify({note:event.target.value});fetch(`${routes.cart_update_url}`,{...fetchConfig(),body})},300))}});
2//# sourceMappingURL=/cdn/shop/t/130/assets/cart.js.map?v=56924399519280667951790724024

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.