PageSourceSearch

https://niallhoran.com/cdn/shop/t/56/assets/06c80660680d36a23840_cart-group-quantity-limits_build.js

js niallhoran.com collected 2026-09-24 21:09:01 UTC 1,504 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkgcom_rhythm=self.webpackChunkgcom_rhythm||[]).push([[356],{185(t,e,r){function a(t){const e=t.querySelector("quantity-spinner input, quantity-selector select"),r=Number(e?.value||t.getAttribute("qty")||0);return Number.isNaN(r)?0:r}function u(t=document){const e=Array.from(t.querySelectorAll(".cart__item[data-group-handle][data-group-limit]")).reduce((t,e)=>{const r=e.dataset.groupHandle;return t[r]=t[r]||[],t[r].push(e),t},{});Object.values(e).forEach(t=>{t.forEach(e=>{const r=Number(e.dataset.groupLimit),u=Number(e.dataset.groupBasePurchaseLimit),n=Number(e.dataset.groupBaseHardPurchaseLimit);if(Number.isNaN(r))return;const i=t.reduce((t,r)=>r===e?t:t+a(r),0),s=Math.max(r-i,0);let c=s,o=s;Number.isNaN(u)||(c=Math.min(c,u)),Number.isNaN(n)||(o=Math.min(o,n));const m=e.querySelector("quantity-spinner, quantity-selector"),l=m?.querySelector("input, select");if(!m||!l)return;l.max=String(c),l.dataset.hardPurchaseLimit=String(o),m.hardPurchaseLimit=o,function(t,e){if("SELECT"!==t.tagName)return;const r=Number(t.value),a=Number(t.querySelector("option")?.value||0),u=Math.max(e,r);t.innerHTML="";for(let e=a;e<=u;e++){const a=document.createElement("option");a.value=String(e),a.textContent=String(e),a.selected=e===r,t.append(a)}}(l,c);const d=m.querySelector(".js-quantity-spinner-increase");d&&(0===c?d.setAttribute("disabled","disabled"):d.removeAttribute("disabled"),d.classList.toggle("opacity-40",a(e)>=c))})})}r.d(e,{syncGroupQuantityLimits:()=>u})}}]);

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.