PageSourceSearch

https://grillwood.pro/static/resources/Catalog/basket.min.js?x_module=5b461de7863ae64b09647b20062a6be2

js grillwood.pro collected 2026-10-02 02:08:07 UTC 3,920 bytes, 1 lines download raw bytes

1define("Catalog/basket",["react/jsx-runtime","react","WNCCore/reactHooks","UI/Async","Controls/listsCommonLogic","Basket/cache","require","exports","css!Catalog/basket","css!Controls/buttonsSameStyle"],(function(e,t,s,n,r,o,i,a){var u,l,c,m;return Object.defineProperty(a,"__esModule",{value:!0}),u=function(e,t,s,n){"use strict";return Object.defineProperty(t,"__esModule",{value:!0}),t.tooBigPrice=t.useBasketCount=void 0,t.useBasketCount=function(e,t){const r=(0,n.useKeys)(t),o=(0,s.useMemo)((()=>r.filter((t=>e(t)))),[r,e]);return(0,n.useStore)({ids:o,context:t})},t.tooBigPrice=function(e,t,s,n){if(!e)return!1;else if(s)return String(e).length>(t?String(t).length+n:0);else return+e>t},t}(0,{},t,o),l=function(e,t,s,n,r,o){"use strict";function i(e){const{value:t,onValueChanged:o,adaptive:i=!1,maxVisiblePrice:c=u,pricePrecision:m=2,price:d,priceAsText:f=!1,showEmptyPrice:p,showEmptyDecimals:C=!0,item:b,className:y,...g}=e,k=i&&t&&(0,r.tooBigPrice)(d,c,f,m),P=k?null:d,x=k?!1:p,v=(0,n.useCallback)(((e,t,s)=>o(t,s)),[o]),M=(0,n.useMemo)((()=>{const e={...a};if(y)e.className=y;return e}),[y]),h=l;return(0,s.jsx)(h,{...g,itemData:b,attrs:M,count:t,price:P,priceAsText:f,pricePrecision:m,showEmptyPrice:x,showEmptyDecimals:C,onCountChanged:v})}Object.defineProperty(t,"__esModule",{value:!0});const a={className:"tw-w-full"},u=999,l=(0,o.lazy)((()=>(0,o.importer)("Basket/Editors/base:Counter")));return i.displayName="Catalog/_basket/Counter",t.default=(0,n.memo)(i),t}(0,{},e,t,u,n,"undefined"==typeof css_Controls_buttonsSameStyle||css_Controls_buttonsSameStyle),c=function(e,t,s,n,r,o,i,a,u){"use strict";function l(e){const{basketContext:t,ids:n,...r}=e;return(0,s.jsx)(a.default,{...r,value:(0,o.useStore)({ids:n,context:t})})}function c(e){const{compositeKeyDelimiter:t,basketContext:r,ids:o,...i}=e,l=(0,n.useCallback)((e=>{const[s,n]=e.split(t,1);return o.includes(s)}),[o,t]);return(0,s.jsx)(a.default,{...i,value:(0,u.useBasketCount)(l,r)})}function m(t){const r=(0,n.useRef)(null),{viewMode:a,currencies:u,currencyProperty:m,basketContext:d,basketProperty:f,basketOptions:p,basketOptionsCallback:C,basketCountChangedCallback:b,priceProperty:y}=t,{item:g,renderValues:k}=(0,i.useOptionalItemData)([y,f,m]),P=g.getKey(),x=(0,i.useModelVersion)(g),v=k[y],M=k[m],h=f?k[f]||null:null,_=(0,n.useMemo)((()=>(h||[P]).map(String)),[P,h]),S=(0,n.useMemo)((()=>({...p,...null==C?void 0:C(g,a)})),[g,x,a,p,C]),j=(0,n.useMemo)((()=>{const e=u&&u.find((e=>e.key===M));if(e&&"image"in e)return e;else return null}),[u,M]),w=(0,n.useMemo)((()=>(0,o.getStore)(d)),[d]),B=(0,n.useCallback)(((t,s)=>{if(b)return Promise.resolve(b(g,t,s)).then((async({count:t,message:s})=>{if(s&&r.current){const{showMessage:t}=await new Promise(((t,s)=>{e(["BasketCommon/utils"],t,s)}));t(s,r.current,null)}return t}));else return w.setCount(g.getKey(),t),Promise.resolve(t)}),[w,g,b]),[D,O]=(0,n.useMemo)((()=>{const{compositeKeyDelimiter:e,...t}=S;return[e,{className:"catalog-basket-price-render__"+a,adaptive:"tile"===a,forwardedRef:r,incrementWithPrice:"tile"===a,inlineHeight:"tile"===a?"2xl":"m",...t,price:v,priceAsText:"string"==typeof v||v instanceof String,onValueChanged:B,currencyImage:null==j?void 0:j.image,basketContext:d,ids:_}]}),[S,v,B,j,a,d,_]);return D?(0,s.jsx)(c,{...O,compositeKeyDelimiter:D}):(0,s.jsx)(l,{...O})}function d(e){const{defaultPriceRender:t="Catalog/render:Price",basketVisibilityCallback:o,basketVisibility:a,...u}=e,{viewMode:l,basketContext:c}=u,{item:d}=r.hooks.useItemData(),f=(0,i.useModelVersion)(d),p=(0,i.useLazyComponent)(t),C=(0,n.useMemo)((()=>!!c&&(o?o(d,l):"visible"===a)),[c,a,o,d,f,l])?m:p;return(0,s.jsx)(C,{...u})}return Object.defineProperty(t,"__esModule",{value:!0}),d.displayName="Catalog/basket:PriceRender",t.default=(0,n.memo)(d),t}(i,{},e,t,r,o,s,l,u),m=c,a.PriceRender=void 0,Object.defineProperty(a,"PriceRender",{enumerable:!0,get:function(){return m.default}}),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.