PageSourceSearch

https://kiarasky.com/cdn/shop/t/281/assets/package-protection.js?v=156357166009754819801790274721

js kiarasky.com collected 2026-09-24 18:55:30 UTC 2,361 bytes, 1 lines download raw bytes

1async function buyXgetY(){const b=await fetch(window.theme.localeRootUrl+"/cart.js").then(b=>b.json());let c=0,e=0;for(const d of b.items)"C-Curve"!==d.product_type||Object.keys(d.properties).length||(c+=d.quantity),39986663719048!==d.id||Object.keys(d.properties).length||(e+=d.quantity);const g=c-e;if(!(0>=g)){const b=await fetch(window.theme.localeRootUrl+"/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:39986663719048,quantity:g}]})});if(!b.ok)throw new Error("Failed to add free glue")}}const INSURANCE_VARIANTS=[{id:39553534853256,maxCents:14998},{id:39553534886024,maxCents:24998},{id:39553534918792,maxCents:34998},{id:39553534951560,maxCents:44998},{id:39553534984328,maxCents:60100},{id:39553535017096,maxCents:1/0}];function getCorrectInsuranceVariant(c){return 1>c?null:INSURANCE_VARIANTS.find(a=>c<=a.maxCents).id}let _insuranceCheckerPromise=null;async function insuranceChecker(){_insuranceCheckerPromise&&(await _insuranceCheckerPromise),_insuranceCheckerPromise=_executeInsuranceCheck();try{await _insuranceCheckerPromise}finally{_insuranceCheckerPromise=null}}async function _executeInsuranceCheck(){if(sessionStorage.getItem("removed_insurance"))return;const d=await fetch(window.theme.localeRootUrl+"/cart.js").then(b=>b.json()),e=[];let f=d.total_price;for(const a of d.items)"kiara-sky-package-protection"===a.handle&&(e.push({key:a.key,id:a.id,quantity:a.quantity}),f-=a.price*a.quantity);const h=getCorrectInsuranceVariant(f),i=e.findIndex(b=>b.id===h&&1===b.quantity),a={};let b=!1;if(e.forEach((c,d)=>{d===i||(a[c.key]=0,b=!0)}),h&&-1===i){b&&(await fetch(window.theme.localeRootUrl+"/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:a})}));const e=await fetch(window.theme.localeRootUrl+"/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:h,quantity:1}]})});if(e.ok){const a=await e.json(),b=a.items?.[0]||a;window.Shopify?.analytics?.publish&&Shopify.analytics.publish("diarmuids_custom_package_protection",{value:b.price/100,currency:"USD",items:[{item_id:h+"",item_name:b.title,price:b.price/100}]})}return}b&&(await fetch(window.theme.localeRootUrl+"/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:a})}))}

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.