PageSourceSearch

https://sigmacomics.com/wp-content/plugins/shopwp-pro/dist/CartLineItemQuantity-public.04188138944811ee2faa.js

js sigmacomics.com collected 2026-09-26 16:50:42 UTC 6,265 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["CartLineItemQuantity-public","Quantity-public"],{
vendor: 574 bytes, line 1
1"./node_modules/lodash-es/flatMap.js":(t,e,n)=>{n.d(e,{A:()=>p});var a=n("./node_modules/lodash-es/_baseFlatten.js"),s=n("./node_modules/lodash-es/_arrayMap.js"),o=n("./node_modules/lodash-es/_baseIteratee.js"),i=n("./node_modules/lodash-es/_baseEach.js"),r=n("./node_modules/lodash-es/isArrayLike.js");const u=function(t,e){var n=-1,a=(0,r.A)(t)?Array(t.length):[];return(0,i.A)(t,(function(t,s,o){a[++n]=e(t,s,o)})),a};var c=n("./node_modules/lodash-es/isArray.js");const l=function(t,e){return((0,c.A)(t)?s.A:u)(t,(0,o.A)(e,3))},p=function(t,e){return(0,a.A)(l(t,e),1)}},
1"./npm-packages/@shopwp/common/src/variants/index.js":(t,e,n)=>{n.d(e,{MG:()=>u,rJ:()=>l,ub:()=>p,yB:()=>c});var a=n("./node_modules/lodash-es/groupBy.js"),s=n("./node_modules/lodash-es/uniqBy.js"),o=n("./node_modules/lodash-es/flatMap.js"),i=n("./node_modules/lodash-es/compact.js"),r=n("./npm-packages/@shopwp/common/src/utils/index.jsx");function u(t){return t.filter((function(t){return t.node.availableForSale}))}function c(t,e){if(!t.edges.length)return!1;if(e)var n=t.edges;else n=u(t.edges);var i,c,l=function(t){return(0,a.A)((0,o.A)(t,(function(t){return t.node.selectedOptions.id=t.node.id,t.node.selectedOptions.map((function(t){return{name:t.name,value:t.value}}))})),"name")}(n);return(i=l,c=[],Object.keys(i).forEach((function(t,e){var n;c.push({name:t,values:(n=i[t],(0,s.A)(n,"value").filter((function(t){return t.value})))})})),c).map((function(t){return"Size"===t.name?{name:t.name,values:(0,r.jQ)(t.values)}:t}))}function l(t){var e=t.map((function(t){return!!t.node.compareAtPrice&&(0,r.Dz)(t.node.price.amount,t.node.compareAtPrice.amount)}));return(0,i.A)(e).sort().reverse()[0]}function p(t,e,n){return t?n?(n.currentlyNotInStock,e):e||!1:e}},
1"./npm-packages/@shopwp/components/src/cart/lineitem/quantity/index.jsx":(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var a=n("./npm-packages/@shopwp/components/src/cart/api.jsx"),s=n("./npm-packages/@shopwp/components/src/cart/_state/hooks.js"),o=n("./npm-packages/@shopwp/components/src/shop/_state/hooks.js"),i=n("./npm-packages/@shopwp/common/src/variants/index.js"),r=n("./npm-packages/@shopwp/components/src/quantity/index.jsx");const u=function(t){var e=t.lineItem,n=t.setNotice,u=(0,s.J)(),c=(0,o.T)(),l=(0,o.W)(),p=(0,s.K)(),m=(0,i.ub)(u.settings.showInventoryLevels,u.settings.lineitemsMaxQuantity,e.merchandise),d=u.settings.lineitemsMinQuantity,y=u.settings.lineitemsQuantityStep;return React.createElement(r.default,{dispatch:p,quantityStep:y,maxQuantity:m,minQuantity:d,initialQuantity:e.quantity,lineItem:e,onChange:function(t){e.quantity!==t&&(0===t?(0,a.aY)(e.id,c,p,l):(0,a.P2)(c,p,l,e,t))},isUpdating:c.isCartUpdating,setNotice:n,globalMaxQuantity:u.settings.maxQuantity,inventoryErrors:u.inventoryErrors})}},
1"./npm-packages/@shopwp/components/src/quantity/index.jsx":(t,e,n)=>{n.r(e),n.d(e,{default:()=>p});var a=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");function s(t,e,n){var a=t.cartData.totalQuantity;return n>e.quantity?a+=n-e.quantity:a-=e.quantity-n,a}var o=n("./npm-packages/@shopwp/common/src/state/index.js");const i=function(){return React.createElement("span",{className:"swp-dec-icon wps-quantity-icon wps-quantity-decrement-icon"})},r=function(){return React.createElement("span",{className:"swp-inc-icon wps-quantity-icon wps-quantity-increment-icon"})};var u=n("./npm-packages/@shopwp/hooks/src/index.js"),c=n("./npm-packages/@shopwp/components/src/shop/_state/hooks.js");const l=function(t){var e=t.onClick,n=t.type,a=t.children;return React.createElement("button",{className:"swp-btn-quantity swp-btn-quantity-"+n+" wps-quantity-"+n,type:"button",role:"button",tabIndex:"0","aria-label":"Quantity "+n+" button",onClick:e},a)},p=function(t){var e=t.initialQuantity,n=t.maxQuantity,p=t.minQuantity,m=t.quantityStep,d=t.dispatch,y=t.onChange,f=t.element,v=t.small,h=void 0===v||v,g=t.isUpdating,w=void 0!==g&&g,x=t.lineItem,k=void 0!==x&&x,b=t.setNotice,j=void 0!==b&&b,q=t.globalMaxQuantity,E=void 0!==q&&q,_=t.fontSize,Q=void 0!==_&&_,A=t.selectedVariant,I=void 0!==A&&A,C=t.inventoryErrors,S=void 0!==C&&C,N=wp.element,R=N.useState,T=N.useEffect,M=(0,c.T)(),P=R(e),z=(0,a.A)(P,2),B=z[0],F=z[1],O=(0,u.d7)(parseInt(B),20),D=(0,u.gg)(),L=1===(n=wp.hooks.applyFilters("cart.maxQuantity",n,k,I,M.cartData))?"You may only buy one of this item.":"You may only buy "+n+" or less of this item.";function U(t){if(!w&&(t.target.value||0===t.target.value)){if(p&&t.target.value<=p)var e=p;else n&&n>0&&t.target.value>=n?(j(L),e=n):(j(!1),e=t.target.value);if(e=parseInt(e),k&&M&&E)if(Y(0,s(M,k,e)))return void j({type:"error",message:M.t.w.maxCartTotal});F(e)}}function Y(t,e){return!!(E&&e>E)}return T((function(){F(e),j(!1)}),[e,S]),T((function(){I&&(I.currentlyNotInStock||j&&n&&B>n&&(j(L),F(n)))}),[n,I,B]),T((function(){D||y(O,e)}),[O]),T((function(){if(Q)var t=parseInt(Q.split("px")[0]),e=2.4*t,n=(2*t).toString()+"px",a=e.toString()+"px",s=Q;else n=h?"40px":"45px",a=h?"40px":"45px",s="18px";var i=(0,o.IR)(f);i.style.setProperty("--custom-quantityInputWidth",n),i.style.setProperty("--custom-quantityButtonSize",a),i.style.setProperty("--custom-quantityFontSize",s)}),[Q]),React.createElement("div",{className:"swp-l-rel100 swp-quantity-container wps-quantity-container"},React.createElement("div",{className:"swp-l-row-no-wrap"},React.createElement(l,{type:"decrement",onClick:function(){if(!w)if(d({type:"SET_NOTICE",payload:!1}),k&&B-1<=0)F(0);else{if(p&&B<=p)var t=p;else{if(m)t=B-m;else t=B-1;!k&&t<1&&(t=1)}j&&n&&t<n&&j(!1),F(t)}},small:h},React.createElement(i,null)),React.createElement("input",{className:"swp-quantity-input wps-quantity-input",type:"number",min:p>1?p:1,onFocus:function(t){return t.currentTarget.select()},"aria-label":"Product Quantity Input",value:B,onChange:U,onBlur:U,disabled:m,pattern:"\\\\d*"}),React.createElement(l,{type:"increment",onClick:function(){if(!w){if(d({type:"SET_NOTICE",payload:!1}),m)t=B+m,e=n&&n>0&&t>=n?n:t;else{var t=B+1;if(n&&n>0&&t>=n)var e=n;else e=t}if(k&&M&&E){if(Y(0,s(M,k,e)))return void j(M.t.w.maxCartTotal);j(!1)}j(!!(j&&n&&t>n)&&L),F(e)}},small:h},React.createElement(r,null))))}}
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.