PageSourceSearch

https://astrofarms.space/_next/static/chunks/a4794896da7b4a50.js

js astrofarms.space collected 2026-10-06 12:26:12 UTC 52,306 bytes, 3 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],531278)},488143,(e,t,r)=>{"use strict";function s({widthInt:e,heightInt:t,blurWidth:r,blurHeight:s,blurDataURL:a,objectFit:i}){let l=r?40*r:e,n=s?40*s:t,o=l&&n?`viewBox='0 0 ${l} ${n}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${o}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${o?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return s}})},987690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return l}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},908927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return c}}),e.r(233525);let s=e.r(543369),a=e.r(488143),i=e.r(987690),l=["-moz-initial","fill","none","scale-down",void 0];function n(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:d=!1,loading:u,className:m,quality:p,width:x,height:f,fill:h=!1,style:g,overrideSrc:b,onLoad:y,onLoadingComplete:v,placeholder:j="empty",blurDataURL:w,fetchPriority:N,decoding:k="async",layout:P,objectFit:C,objectPosition:_,lazyBoundary:z,lazyRoot:S,...E},O){var A;let R,T,D,{imgConf:I,showAltText:$,blurComplete:L,defaultLoader:M}=O,F=I||i.imageConfigDefault;if("allSizes"in F)R=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);R={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===M)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let U=E.loader||M;delete E.loader,delete E.srcSet;let B="__next_img_default"in U;if(B){if("custom"===R.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=U;U=t=>{let{config:r,...s}=t;return e(s)}}if(P){"fill"===P&&(h=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[P];e&&(g={...g,...e});let r={responsive:"100vw",fill:"100vw"}[P];r&&!t&&(t=r)}let K="",V=o(x),G=o(f);if((A=e)&&"object"==typeof A&&(n(A)||void 0!==A.src)){let t=n(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}
2`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(T=t.blurWidth,D=t.blurHeight,w=w||t.blurDataURL,K=t.src,!h)if(V||G){if(V&&!G){let e=V/t.width;G=Math.round(t.height*e)}else if(!V&&G){let e=G/t.height;V=Math.round(t.width*e)}}else V=t.width,G=t.height}let q=!c&&!d&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:K)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,q=!1),R.unoptimized&&(r=!0),B&&!R.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let W=o(p),X=Object.assign(h?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:_}:{},$?{}:{color:"transparent"},g),Z=L||"empty"===j?null:"blur"===j?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:V,heightInt:G,blurWidth:T,blurHeight:D,blurDataURL:w||"",objectFit:X.objectFit})}")`:`url("${j}")`,H=l.includes(X.objectFit)?"fill"===X.objectFit?"100% 100%":"cover":X.objectFit,J=Z?{backgroundSize:H,backgroundPosition:X.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Z}:{},Y=function({config:e,src:t,unoptimized:r,width:a,quality:i,sizes:l,loader:n}){if(r){let e=(0,s.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let r=t.includes("?")?"&":"?";t=`${t}${r}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:c}=function({deviceSizes:e,allSizes:t},r,s){if(s){let r=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=r.exec(s);)a.push(parseInt(e[2]));if(a.length){let r=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,a,l),d=o.length-1;return{sizes:l||"w"!==c?l:"100vw",srcSet:o.map((r,s)=>`${n({config:e,src:t,quality:i,width:r})} ${"w"===c?r:s+1}${c}`).join(", "),src:n({config:e,src:t,quality:i,width:o[d]})}}({config:R,src:e,unoptimized:r,width:V,quality:W,sizes:t,loader:U}),Q=q?"lazy":u;return{props:{...E,loading:Q,fetchPriority:N,width:V,height:G,decoding:k,className:m,style:{...X,...J},sizes:Y.sizes,srcSet:Y.srcSet,src:b||Y.src},meta:{unoptimized:r,preload:d||c,placeholder:j,fill:h}}}},898879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let s=e.r(271645),a="u"<typeof window,i=a?()=>{}:s.useLayoutEffect,l=a?()=>{}:s.useEffect;function n(e){let{headManager:t,reduceComponentsToState:r}=e;function n(){if(t&&t.mountedInstances){let e=s.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return a&&(t?.mountedInstances?.add(e.children),n()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},325633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return f},defaultHead:function(){return u}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(555682),l=e.r(190809),n=e.r(843476),o=l._(e.r(271645)),c=i._(e.r(898879)),d=e.r(742732);function u(){return[(0,n.jsx)("meta",{charSet:"utf-8"},"charset"),(0,n.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(233525);let p=["name","httpEquiv","charSet","itemProp"];function x(e){let t,r,s,a;return e.reduce(m,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,s=new Set,a={},e=>{let i=!0,l=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){l=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=p.length;t<r;t++){let r=p[t];if(e.props.hasOwnProperty(r))if("charSet"===r)s.has(r)?i=!1:s.add(r);else{let t=e.props[r],s=a[r]||new Set;("name"!==r||!l)&&s.has(t)?i=!1:(s.add(t),a[r]=s)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let f=function({children:e}){let t=(0,o.useContext)(d.HeadManagerContext);
2return(0,n.jsx)(c.default,{reduceComponentsToState:x,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},918556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let s=e.r(555682)._(e.r(271645)),a=e.r(987690),i=s.default.createContext(a.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return s}});let s=e.r(555682)._(e.r(271645)).default.createContext(null)},670965,(e,t,r)=>{"use strict";function s(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return s}})},1948,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let s=e.r(670965),a=e.r(543369);function i({config:e,src:t,width:r,quality:i}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,s.findClosestQuality)(i,e),n=(0,a.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${l}${t.startsWith("/")&&n?`&dpl=${n}`:""}`}i.__next_img_default=!0;let l=i},605500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let s=e.r(555682),a=e.r(190809),i=e.r(843476),l=a._(e.r(271645)),n=s._(e.r(174080)),o=s._(e.r(325633)),c=e.r(908927),d=e.r(987690),u=e.r(918556);e.r(233525);let m=e.r(65856),p=s._(e.r(1948)),x=e.r(818581),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function h(e,t,r,s,a,i,l){let n=e?.src;e&&e["data-loaded-src"]!==n&&(e["data-loaded-src"]=n,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let s=!1,a=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>s,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{s=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}s?.current&&s.current(e)}}))}function g(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,l.forwardRef)(({src:e,srcSet:t,sizes:r,height:s,width:a,decoding:n,className:o,style:c,fetchPriority:d,placeholder:u,loading:m,unoptimized:p,fill:f,onLoadRef:b,onLoadingCompleteRef:y,setBlurComplete:v,setShowAltText:j,sizesInput:w,onLoad:N,onError:k,...P},C)=>{let _=(0,l.useCallback)(e=>{e&&(k&&(e.src=e.src),e.complete&&h(e,u,b,y,v,p,w))},[e,u,b,y,v,k,p,w]),z=(0,x.useMergedRef)(C,_);return(0,i.jsx)("img",{...P,...g(d),loading:m,width:a,height:s,decoding:n,"data-nimg":f?"fill":"1",className:o,style:c,sizes:r,srcSet:t,src:e,ref:z,onLoad:e=>{h(e.currentTarget,u,b,y,v,p,w)},onError:e=>{j(!0),"empty"!==u&&v(!0),k&&k(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&n.default.preload?(n.default.preload(t.src,r),null):(0,i.jsx)(o.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,l.forwardRef)((e,t)=>{let r=(0,l.useContext)(m.RouterContext),s=(0,l.useContext)(u.ImageConfigContext),a=(0,l.useMemo)(()=>{let e=f||s||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>
3e-t),r=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:a,localPatterns:"u"<typeof window?s?.localPatterns:e.localPatterns}},[s]),{onLoad:n,onLoadingComplete:o}=e,x=(0,l.useRef)(n);(0,l.useEffect)(()=>{x.current=n},[n]);let h=(0,l.useRef)(o);(0,l.useEffect)(()=>{h.current=o},[o]);let[g,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(!1),{props:N,meta:k}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:a,blurComplete:g,showAltText:j});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{...N,unoptimized:k.unoptimized,placeholder:k.placeholder,fill:k.fill,onLoadRef:x,onLoadingCompleteRef:h,setBlurComplete:v,setShowAltText:w,sizesInput:e.sizes,ref:t}),k.preload?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:N}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},794909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return d},getImageProps:function(){return c}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(555682),l=e.r(908927),n=e.r(605500),o=i._(e.r(1948));function c(e){let{props:t}=(0,l.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=n.Image},657688,(e,t,r)=>{t.exports=e.r(794909)},373375,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],373375)},747133,e=>{"use strict";var t=e.i(247167),r=e.i(347015);t.default.env.NEXT_PUBLIC_DOMAIN;let s={INPOST:{code:"inpost",name:"InPost Paczkomat",displayName:"InPost",apaczkaName:"InPost Paczkomaty 24/7"},ORLEN:{code:"orlen",name:"Orlen Paczka",displayName:"Orlen",apaczkaName:"Orlen Paczka"},PERSONAL_PICKUP:{code:"personal_pickup",name:"Odbiór osobisty",displayName:"Odbiór osobisty"}},a={[s.INPOST.code]:s.INPOST.name,[s.ORLEN.code]:s.ORLEN.name,[s.PERSONAL_PICKUP.code]:s.PERSONAL_PICKUP.name};function i(e){return a[e]||e}s.INPOST.code,s.INPOST.apaczkaName,s.ORLEN.code,s.ORLEN.apaczkaName,s.INPOST.apaczkaName,s.INPOST.code,s.ORLEN.apaczkaName,s.ORLEN.code,r.env.NEXT_PUBLIC_SUPABASE_URL,r.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,r.env.SUPABASE_SERVICE_ROLE_KEY,r.env.NODE_ENV,r.env.NODE_ENV,r.env.NODE_ENV,e.s(["CARRIERS",0,s,"PAGINATION",0,{DEFAULT_PAGE_SIZE:12,PAGE_SIZE_OPTIONS:[9,12,24,48,99],MAX_PAGE_SIZE:100},"getCarrierName",()=>i])},212426,e=>{"use strict";let t=(0,e.i(475254).default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);e.s(["DollarSign",()=>t],212426)},87316,e=>{"use strict";let t=(0,e.i(475254).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",()=>t],87316)},991918,820783,e=>{"use strict";var t=e.i(271645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(...e){return t=>{let s=!1,a=e.map(e=>{let a=r(e,t);return s||"function"!=typeof a||(s=!0),a});if(s)return()=>{for(let t=0;t<a.length;t++){let s=a[t];"function"==typeof s?s():r(e[t],null)}}}}function a(...e){return t.useCallback(s(...e),e)}e.s(["composeRefs",()=>s,"useComposedRefs",()=>a],820783);var i=e.i(843476);function l(e){var r;let a,l=(r=e,(a=t.forwardRef((e,r)=>{let{children:a,...i}=e;if(t.isValidElement(a)){var l;let e,n,o=(l=a,(n=(e=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.ref:(n=(e=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.props.ref:l.props.ref||l.ref),c=function(e,t){let r={...t};for(let s in t){let a=e[s],i=t[s];/^on[A-Z]/.test(s)?a&&i?r[s]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[s]=a):"style"===s?r[s]={...a,...i}
3:"className"===s&&(r[s]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(i,a.props);return a.type!==t.Fragment&&(c.ref=r?s(r,o):o),t.cloneElement(a,c)}return t.Children.count(a)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,a),n=t.forwardRef((e,r)=>{let{children:s,...a}=e,n=t.Children.toArray(s),o=n.find(c);if(o){let e=o.props.children,s=n.map(r=>r!==o?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(l,{...a,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,s):null})}return(0,i.jsx)(l,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var n=l("Slot"),o=Symbol("radix.slottable");function c(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o}e.s(["Slot",()=>n,"createSlot",()=>l],991918)},595468,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",()=>t],595468)},60112,e=>{"use strict";function t(e,t,r){let s=e[`${t}_translations`];return s?.[r]?s[r]:"en"!==r&&s?.en?s.en:"pl"!==r&&s?.pl?s.pl:e[t]||""}function r(e,r){return t(e,"title",r)}function s(e,r){return t(e,"short_description",r)}function a(e,t){if(!e)return"";let r=e.name_translations;return r?.[t]?r[t]:"en"!==t&&r?.en?r.en:"pl"!==t&&r?.pl?r.pl:e.name||e.slug||""}e.s(["getTranslatedCategoryLabel",()=>a,"getTranslatedShortDescription",()=>s,"getTranslatedTitle",()=>r])},751975,e=>{"use strict";let t=(0,e.i(475254).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",()=>t],751975)},569271,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(657688),a=e.i(201928),i=e.i(503116),l=e.i(751975),n=e.i(531278),o=e.i(595468),c=e.i(488844),d=e.i(744705),u=e.i(948148),m=e.i(861745),p=e.i(231510),x=e.i(60112),f=e.i(703885);function h(e){let{id:h,guid:g,title:b,priceCents:y,unitLabel:v,packagePriceCents:j,packageSize:w,shortDescription:N,category:k,tags:P=[],type:C,imageUrl:_,stockQuantity:z,returnParams:S}=e,E=(0,u.useTranslations)("common"),O=(0,u.useTranslations)("offers"),A=(0,m.useLocale)(),{addToCart:R}=(0,f.useCart)(),[T,D]=(0,r.useState)(!1),[I,$]=(0,r.useState)(!1),[L,M]=(0,r.useState)("pcs"),F=!!(j&&j>0&&w&&w>=1),U="package"===L&&F?j:y,B="pcs"===v?E("unitPcs"):"carton"===v?E("unitCarton"):v||E("unitPcs"),K="package"===L&&F?O("unitPackage"):B,V="buy_now"===C,G=O(V?"buyNow":"preorder"),q=V?l.Tag:i.Clock,W=V&&null!=z&&0===z,X=V&&null!=z&&z>0&&z<10;return(0,t.jsxs)("div",{"data-testid":"offer-card","data-offer-guid":g,className:"group relative flex flex-col rounded-2xl overflow-hidden transition-all duration-300 hover:scale-[1.02]",style:{background:"rgba(168, 216, 90,0.06)",border:"1px solid rgba(168, 216, 90,0.18)"},onMouseEnter:e=>e.currentTarget.style.borderColor="rgba(168, 216, 90,0.5)",onMouseLeave:e=>e.currentTarget.style.borderColor="rgba(168, 216, 90,0.18)",children:[(0,t.jsx)(d.Link,{href:`/offers/${g}${S?`?${S}`:""}`,className:"absolute inset-0 z-10","aria-label":b}),(0,t.jsxs)("div",{className:"relative aspect-[4/3] overflow-hidden",style:{background:"linear-gradient(135deg, rgba(35,15,25,0.9) 0%, rgba(26,11,19,0.95) 100%)"},children:[(0,t.jsx)(s.default,{src:_||"/images/matchbox-911.svg",alt:b,width:400,height:300,sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw",loading:"lazy",quality:80,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"}),(0,t.jsx)("div",{className:"absolute inset-x-0 top-0 bottom-[15%] bg-gradient-to-t from-black/60 via-trans
3parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),(0,t.jsxs)("div",{className:"absolute top-2 sm:top-3 left-2 sm:left-3 right-2 sm:right-3 flex justify-between items-start pointer-events-none",children:[(0,t.jsx)("div",{className:"flex flex-col gap-2 items-start",children:(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1 sm:py-1.5 rounded-full text-[10px] sm:text-xs font-semibold shadow-lg backdrop-blur-sm ${V?"bg-primary text-primary-foreground":"bg-orange-500/90 text-white"}`,children:[(0,t.jsx)(q,{className:"h-3 w-3 sm:h-3.5 sm:w-3.5"}),G]})}),P.length>0&&(0,t.jsx)("div",{className:"flex flex-col gap-1.5 items-end",children:P.map(e=>{let r=(0,x.getTranslatedCategoryLabel)(e,A),s={backgroundColor:e.color||"#A8D85A"};return r?(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 sm:px-2 py-0.5 sm:py-1 rounded-md text-[9px] sm:text-[10px] font-medium text-white shadow-md backdrop-blur-sm text-center",style:s,children:r},e.id):null})})]}),(0,t.jsxs)("div",{className:"absolute inset-x-0 bottom-[-1px] z-10 overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent",style:{background:k?.color?`linear-gradient(to top, ${k.color}E6, ${k.color}99, ${k.color}33)`:"linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), rgba(0,0,0,0))"}}),(0,t.jsxs)("div",{className:"relative backdrop-blur-md border-t border-white/10 py-2 sm:py-3 px-3 sm:px-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-white/5 to-transparent pointer-events-none"}),(0,t.jsx)("div",{className:"relative flex items-center justify-center gap-2",children:(0,t.jsx)("span",{className:"text-[10px] sm:text-xs font-bold text-white uppercase tracking-wider drop-shadow-lg text-center leading-tight line-clamp-1",style:{textShadow:"0 2px 8px rgba(0,0,0,0.5), 0 0 1px rgba(0,0,0,0.8)"},children:b})})]})]})]}),(0,t.jsxs)("div",{className:"p-3 sm:p-5 space-y-2 sm:space-y-3 flex-1 flex flex-col",children:[(0,t.jsx)("div",{className:"space-y-1 sm:space-y-2 flex-1",children:N&&(0,t.jsx)("p",{className:"text-xs sm:text-sm line-clamp-2 leading-relaxed",style:{color:"rgba(255,255,255,0.55)"},children:N})}),V&&null!=z&&(0,t.jsx)("div",{className:"flex items-center gap-1.5 text-[10px] sm:text-xs",children:W?(0,t.jsx)("span",{className:"text-red-600 dark:text-red-400 font-medium",children:E("outOfStock")}):X?(0,t.jsx)("span",{className:"text-orange-600 dark:text-orange-400 font-medium",children:E("lowStock",{count:z})}):(0,t.jsx)("span",{className:"text-primary font-medium",children:E("inStock",{count:z})})}),(0,t.jsxs)("div",{className:"flex flex-row items-center justify-between pt-2 sm:pt-4 border-t mt-auto gap-3",style:{borderColor:"rgba(168, 216, 90,0.2)"},children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 min-w-0",children:[F&&(0,t.jsxs)("div",{className:"flex gap-1 relative z-20",children:[(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),M("pcs")},className:`px-2 py-0.5 text-[9px] sm:text-[10px] font-semibold rounded-full border transition-all ${"pcs"===L?"text-white":"border-white/20 bg-white/5 text-slate-400 hover:bg-white/10"}`,style:"pcs"===L?{borderColor:"#A8D85A",background:"rgba(168, 216, 90,0.2)"}:{},children:E("unitPcs")}),(0,t.jsxs)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),M("package")},className:`flex items-center gap-0.5 px-2 py-0.5 text-[9px] sm:text-[10px] font-semibold rounded-full border transition-all ${"package"===L?"text-white":"border-white/20 bg-white/5 text-slate-400 hover:bg-white/10"}`,style:"package"===L?{borderColor:"#A8D85A",background:"rgba(168, 216, 90,0.2)"}:{},children:[(0,t.jsx)(c.Package,{className:"h-2.5 w-2.5"}),O("buyPackage")," ",(0,t.jsxs)("span",{className:"opacity-70",children:["(",w,")"]})]})]}),(0,t.jsx)("span",{className:"text-lg sm:text-2xl font-bold text-white leading-none",children:(0,p.formatCurrency)(U,A)}),(0,t.jsx)("span",{className:"text-[10px] sm:text-xs",style:{color:"rgba(255,255,255,0.4)"},children:E("pricePer",{unit:K})})]}),V&&!W&&(0,t.jsx)("button",{onClick:async e=>{e.preventDefault(),e.stopPropagation(),$(!1),D(!0);let t=await R(h,1,U,b,_||void 0,L);D(!1),t.ok&&($(!0),setTimeout(()=>$(!1),2e3))},disabled:T,className:"relative z-20 flex-shrink-0 flex items-center justify-center h-10 w-10 sm:h-12 sm:w-12 rounded-xl transition-all duration-300 shadow-md active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",style:I?{background:"#A8D85A",color:"#111111",boxShadow:"0 0 12px rgba(168, 216, 90,0.5)"}:{background:"#A8D85A",color:"#111111",boxShadow:"0 0 12px rgba(168, 216, 90,0.4)"},title:E("addToCart"),children:T?(0,t.jsx)(n.Loader2,{className:"h-5 w-5 animate-spin"}):I?(0,t.jsx)(o.CheckCircle2,{className:"h-5 w-5"}):(0,t.jsx)(a.ShoppingCart,{className:"h-5 w-5"})})]})]})]})}e.s(["OfferCard",()=>h])},32811,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(618566),a=e.i(569271),i=e.i(555436),l=e.i(503116),n=e.i(649582),o=e.i(751975),c=e.i(948148),d=e.i(97755),u=e.i(353333),m=e.i(436842),p=e.i(664659),x=e.i(975157),f=e.i(87316),h=e.i(212426),g=e.i(488844);let b=()=>[{titleKey:"sortByPrice",icon:(0,t.jsx)(h.DollarSign,{className:"h-5 w-5"}),options:[{value:"price_desc",translationKey:"priceDesc",icon:(0,t.jsx)(p.ChevronDown,{className:"h-4 w-4"})},{value:"price_asc",translationKey:"priceAsc",icon:(0,t.jsx)(p.ChevronDown,{className:"h-4 w-4 rotate-180"})}]},{titleKey:"sortByDate",icon:(0,t.jsx)(f.Calendar,{className:"h-5 w-5"}),options:[{value:"newest",translationKey:"newest",icon:(0,t.jsx)(p.ChevronDown,{className:"h-4 w-4"})},{value:"oldest",translationKey:"oldest",icon:(0,t.jsx)(p.ChevronDown,{className:"h-4 w-4 rotate-180"})}]},{titleKey:"sortByStock",icon:(0,t.jsx)(g.Package,{className:"h-5 w-5"}),options:[{value:"stock_desc",translationKey:"stockDesc",icon:(0,t.jsx)(p.ChevronDown,{className:"h-4 w-4"})},{value:"stock_asc",translationKey:"stockAsc",icon:(0,t.jsx)(p.ChevronDown,{className:"h-4 w-4 rotate-180"})}]}],y=e=>{let t=b().find(t=>t.options.some(t=>t.value===e));return t?.titleKey};function v({label:e,selectedSorts:s,onApply:a,className:i}){let l=(0,c.useTranslations)("offers");(0,c.useTranslations)("common");let[n,o]=(0,r.useState)(!1),[d,u]=(0,r.useState)(s),m=(0,r.useRef)(null),f=b();(0,r.useEffect)(()=>{n&&u(s)},[n,s]),(0,r.useEffect)(()=>{function e(e){m.current&&!m.current.contains(e.target)&&o(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let h=s.length,g=h>0;return(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)("div",{className:"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm sm:hidden animate-in fade-in duration-200",onClick:()=>o(!1)}),(0,t.jsxs)("div",{className:(0,x.cn)("relative",i),ref:m,children:[(0,t.jsxs)("button",{onClick:()=>o(!n),className:(0,x.cn)("w-full flex items-center justify-between gap-2 px-3 py-2 sm:py-1.5 rounded-lg text-sm font-medium transition-all border",n||g?"border-primary/30 bg-primary/10 text-primary dark:text-primary":"border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-900 text-zinc-700 dark:text-zinc-300 hover:border-zinc-400 dark:hover:border-zinc-600 hover:bg-zinc-50 dark:hover:bg-zinc-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,t.jsx)("span",{className:"truncate",children:e}),h>0&&(0,t.jsx)("span",{className:"flex items-center justify-center min-w-[18px] h-[18px] text-[10px] bg-primary text-primary-foreground rounded-full px-1 shrink-0",children:h})]}),(0,t.jsx)(p.ChevronDown,{className:(0,x.cn)("w-4 h-4 transition-transform shrink-0",n&&"rotate-180")}
3)]}),n&&(0,t.jsxs)("div",{className:(0,x.cn)("fixed inset-x-0 bottom-0 z-50 w-full p-4 pb-8 bg-white dark:bg-zinc-900 border-t border-zinc-200 dark:border-zinc-800 rounded-t-2xl shadow-[0_-8px_30px_rgba(0,0,0,0.3)] dark:shadow-[0_-8px_30px_rgba(0,0,0,0.5)]","animate-in slide-in-from-bottom duration-300","sm:absolute sm:inset-auto sm:top-full sm:right-0 sm:mt-2 sm:w-80 sm:p-3 sm:bg-white dark:sm:bg-zinc-900 sm:border sm:border-zinc-200 dark:sm:border-zinc-800 sm:rounded-xl sm:shadow-2xl sm:animate-in sm:fade-in sm:zoom-in-95 sm:slide-in-from-top-2 sm:duration-200"),children:[(0,t.jsx)("div",{className:"mx-auto w-12 h-1.5 bg-zinc-300 dark:bg-zinc-800 rounded-full mb-4 sm:hidden"}),(0,t.jsx)("div",{className:"max-h-[50vh] sm:max-h-96 overflow-y-auto space-y-4 scrollbar-thin scrollbar-thumb-zinc-400 dark:scrollbar-thumb-zinc-700 scrollbar-track-transparent",children:f.map((e,r)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold text-zinc-600 dark:text-zinc-400 uppercase tracking-wide",children:[(0,t.jsx)("div",{className:"opacity-70",children:e.icon}),(0,t.jsx)("span",{children:l(e.titleKey)})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:e.options.map(e=>{let r=d.includes(e.value),s=d.indexOf(e.value);return(0,t.jsxs)("button",{onClick:()=>{var t;return t=e.value,void u(e=>{if(e.includes(t))return e.filter(e=>e!==t);{let r=y(t);return[...e.filter(e=>y(e)!==r),t]}})},className:`flex items-center justify-between gap-2 p-2.5 rounded-lg border-2 transition-all ${r?"border-primary/30 bg-primary/10 dark:bg-card":"border-zinc-200 dark:border-zinc-800 hover:border-zinc-300 dark:hover:border-zinc-700 hover:bg-zinc-50 dark:hover:bg-zinc-800/50"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[(0,t.jsx)("div",{className:`flex-shrink-0 ${r?"text-primary dark:text-primary":"text-zinc-400"}`,children:(0,t.jsx)("div",{className:"h-3.5 w-3.5",children:e.icon})}),(0,t.jsx)("span",{className:`text-xs font-medium leading-tight truncate ${r?"text-primary dark:text-primary":"text-zinc-700 dark:text-zinc-300"}`,children:l(e.translationKey)})]}),r&&d.length>1&&(0,t.jsx)("div",{className:"flex-shrink-0 h-5 w-5 rounded-full bg-primary dark:bg-primary flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-[10px] font-bold text-white",children:s+1})})]},e.value)})})]},r))}),(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[d.length>0&&(0,t.jsx)("button",{onClick:()=>{u([])},className:"w-full py-2 text-sm font-medium text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:l("clearSort")}),(0,t.jsxs)("button",{onClick:()=>{a(d),o(!1)},className:"w-full h-11 sm:h-9 bg-primary hover:bg-primary/90 text-primary-foreground rounded-lg text-base sm:text-sm font-medium transition-colors",children:[l("apply")," ",d.length>0&&`(${d.length})`]})]})]})]})]})}var j=e.i(37727);function w({isOpen:e,onClose:s,selectedSorts:a,onApply:i}){let l=(0,c.useTranslations)("offers"),n=(0,c.useTranslations)("common"),[o,d]=(0,r.useState)(a);(0,r.useEffect)(()=>{e&&d(a)},[e,a]);let u=b();return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 z-[55] animate-in fade-in duration-200",onClick:s}),(0,t.jsxs)("div",{className:"fixed inset-x-0 bottom-0 z-[60] bg-white dark:bg-zinc-900 rounded-t-2xl shadow-2xl animate-in slide-in-from-bottom duration-300 max-h-[80vh] overflow-hidden flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-zinc-200 dark:border-zinc-800",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:l("sortBy")}),(0,t.jsx)("button",{onClick:s,className:"p-2 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors","aria-label":n("close"),children:(0,t.jsx)(j.X,{className:"h-5 w-5 text-zinc-500"})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto p-4 space-y-5",children:u.map((e,r)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold text-zinc-600 dark:text-zinc-400 uppercase tracking-wide",children:[(0,t.jsx)("div",{className:"opacity-70",children:e.icon}),(0,t.jsx)("span",{children:l(e.titleKey)})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:e.options.map(e=>{let r=o.includes(e.value),s=o.indexOf(e.value);return(0,t.jsxs)("button",{onClick:()=>{var t;return t=e.value,void d(e=>{if(e.includes(t))return e.filter(e=>e!==t);{let r=y(t);return[...e.filter(e=>y(e)!==r),t]}})},className:`flex items-center justify-between gap-2 p-2.5 rounded-lg border-2 transition-all ${r?"border-primary/30 bg-primary/10 dark:bg-card":"border-zinc-200 dark:border-zinc-800 hover:border-zinc-300 dark:hover:border-zinc-700 hover:bg-zinc-50 dark:hover:bg-zinc-800/50"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[(0,t.jsx)("div",{className:`flex-shrink-0 ${r?"text-primary dark:text-primary":"text-zinc-400"}`,children:(0,t.jsx)("div",{className:"h-3.5 w-3.5",children:e.icon})}),(0,t.jsx)("span",{className:`text-xs font-medium leading-tight truncate ${r?"text-primary dark:text-primary":"text-zinc-700 dark:text-zinc-300"}`,children:l(e.translationKey)})]}),r&&o.length>1&&(0,t.jsx)("div",{className:"flex-shrink-0 h-5 w-5 rounded-full bg-primary dark:bg-primary flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-[10px] font-bold text-white",children:s+1})})]},e.value)})})]},r))}),(0,t.jsxs)("div",{className:"p-4 border-t border-zinc-200 dark:border-zinc-800 space-y-2 bg-zinc-50 dark:bg-zinc-900",children:[o.length>0&&(0,t.jsx)("button",{onClick:()=>{d([])},className:"w-full py-2.5 text-sm font-medium text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",children:l("clearSort")}),(0,t.jsxs)("button",{onClick:()=>{i(o),s()},className:"w-full py-3 bg-primary hover:bg-primary text-primary-foreground font-semibold rounded-lg transition-colors shadow-lg shadow-primary/10",children:[l("apply")," ",o.length>0&&`(${o.length})`]})]})]})]}):null}var N=e.i(225225);let k=["1:64","1:43","1:24","1:18","1:12"];function P({categories:e,tags:s,value:a,onChange:p,priceLimits:x}){let f=(0,c.useTranslations)("offers"),h=(0,c.useTranslations)("common"),[g,y]=(0,r.useState)(!1),[j,P]=(0,r.useState)(!1),[C,_]=(0,r.useState)(a.search||""),z=function(e,t=300){let[s,a]=(0,r.useState)(e);return(0,r.useEffect)(()=>{let r=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(r)}},[e,t]),s}(C,300);(0,r.useEffect)(()=>{let e=z||void 0;e!==(a.search||void 0)&&p({...a,search:e})},[z]),(0,r.useEffect)(()=>{_(a.search||"")},[a.search]);let S=(0,r.useMemo)(()=>e.filter(e=>1===e.level).map(e=>({id:e.id,label:e.name_translations.pl||e.slug,value:e.slug,count:e.offer_count})),[e]),E=(0,r.useMemo)(()=>e.filter(e=>2===e.level).map(e=>({id:e.id,label:e.name_translations.pl||e.slug,value:e.slug,count:e.offer_count})),[e]),O=(0,r.useMemo)(()=>[...S,...E],[S,E]),A=(0,r.useMemo)(()=>s.map(e=>({id:e.id,label:e.name_translations.pl||e.slug,value:e.slug})),[s]);(0,r.useMemo)(()=>k.map(e=>({id:e,label:e,value:e})),[]);let R=a.manufacturer?a.manufacturer.split(","):[],T=a.series?a.series.split(","):[],D=[...R,...T],I=a.tag?a.tag.split(","):[],$=a.scale?a.scale.split(","):[],L="buy_now"===a.type,M="preorder"===a.type,F=e=>{let t=e.filter(e=>S.some(t=>t.value===e)),r=e.filter(e=>E.some(t=>t.value===e));p({...a,manufacturer:t.length>0?t.join(","):void 0,series:r.length>0?r.join(","):void 0})},U=e=>{p({...a,tag:e.length>0?e.join(","):void 0})},B=e=>
3{a.type===e?p({...a,type:void 0}):p({...a,type:e})};return(0,t.jsxs)("div",{className:"space-y-3 sm:space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:hidden",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsx)(i.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-zinc-500"}),(0,t.jsx)("input",{type:"search","data-testid":"filter-search",placeholder:h("search")+"...",className:"w-full h-10 rounded-lg text-sm text-white placeholder:text-white/40 focus:outline-none transition-all pl-9 pr-3 border",style:{background:"rgba(168, 216, 90,0.08)",borderColor:"rgba(168, 216, 90,0.25)"},onFocus:e=>{e.target.style.borderColor="#A8D85A"},onBlur:e=>{e.target.style.borderColor="rgba(168, 216, 90,0.25)"},value:C,onChange:e=>_(e.target.value)})]}),(0,t.jsxs)("button",{onClick:()=>y(!g),className:"h-10 px-4 rounded-lg text-sm text-white transition-all flex items-center gap-2 whitespace-nowrap border",style:{background:"rgba(168, 216, 90,0.1)",borderColor:"rgba(168, 216, 90,0.3)"},children:[(0,t.jsx)(n.SlidersHorizontal,{className:"h-4 w-4"}),h("filter")]})]}),g&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 animate-in slide-in-from-top-2 duration-200",children:[(0,t.jsx)(d.FilterDropdown,{label:f("categories"),options:O,selectedValues:D,onApply:F,searchPlaceholder:h("search")+"...",applyLabel:f("apply")||"Zastosuj",className:"w-full"}),(0,t.jsx)(d.FilterDropdown,{label:f("tags"),options:A,selectedValues:I,onApply:U,searchPlaceholder:h("search")+"...",applyLabel:f("apply")||"Zastosuj",className:"w-full"}),(0,t.jsx)(m.FilterToggle,{label:f("buyNow"),color:"emerald",isActive:L,onClick:()=>B("buy_now"),icon:o.Tag,className:"w-full justify-center"}),(0,t.jsx)(m.FilterToggle,{label:f("preorder"),color:"amber",isActive:M,onClick:()=>B("preorder"),icon:l.Clock,className:"w-full justify-center"}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsx)(N.PriceRangeFilter,{minPrice:a.minPrice,maxPrice:a.maxPrice,onChange:(e,t)=>
3p({...a,minPrice:e,maxPrice:t}),label:h("price"),className:"w-full",minLimit:x.min,maxLimit:x.max})}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsxs)("button",{onClick:()=>P(!0),className:"w-full py-2.5 px-4 rounded-lg text-sm font-medium text-white transition-all flex items-center justify-between border",style:{background:"rgba(168, 216, 90,0.08)",borderColor:"rgba(168, 216, 90,0.25)"},children:[(0,t.jsx)("span",{children:f("sortBy")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[a.sort&&a.sort.length>0&&(0,t.jsx)("span",{className:"text-xs font-semibold px-2 py-0.5 rounded-full text-[#111111]",style:{background:"#A8D85A"},children:a.sort.length}),(0,t.jsx)(n.SlidersHorizontal,{className:"h-4 w-4"})]})]})})]})]}),(0,t.jsxs)("div",{className:"hidden sm:flex flex-wrap gap-2 items-center",children:[(0,t.jsxs)("div",{className:"relative flex-1 min-w-[160px] max-w-[240px]",children:[(0,t.jsx)(i.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4",style:{color:"rgba(255,255,255,0.4)"}}),(0,t.jsx)("input",{type:"search","data-testid":"filter-search",placeholder:h("search")+"...",className:"w-full h-9 pl-9 pr-3 rounded-lg text-sm text-white placeholder:text-white/40 focus:outline-none transition-all border",style:{background:"rgba(168, 216, 90,0.08)",borderColor:"rgba(168, 216, 90,0.25)"},onFocus:e=>{e.target.style.borderColor="#A8D85A"},onBlur:e=>{e.target.style.borderColor="rgba(168, 216, 90,0.25)"},value:C,onChange:e=>_(e.target.value)})]}),(0,t.jsx)(d.FilterDropdown,{label:f("categories"),options:O,selectedValues:D,onApply:F,searchPlaceholder:h("search")+"...",applyLabel:f("apply")||"Zastosuj"}),(0,t.jsx)(d.FilterDropdown,{label:f("tags"),options:A,selectedValues:I,onApply:U,searchPlaceholder:h("search")+"...",applyLabel:f("apply")||"Zastosuj"}),(0,t.jsx)(N.PriceRangeFilter,{minPrice:a.minPrice,maxPrice:a.maxPrice,onChange:(e,t)=>
3p({...a,minPrice:e,maxPrice:t}),label:h("price"),minLimit:x.min,maxLimit:x.max}),(0,t.jsx)(m.FilterToggle,{label:f("buyNow"),color:"green",isActive:L,onClick:()=>B("buy_now"),icon:o.Tag}),(0,t.jsx)(m.FilterToggle,{label:f("preorder"),color:"amber",isActive:M,onClick:()=>B("preorder"),icon:l.Clock}),(0,t.jsx)(v,{label:f("sort"),selectedSorts:a.sort||[],onApply:e=>p({...a,sort:e.length>0?e:void 0})})]}),(R.length>0||T.length>0||I.length>0||$.length>0||a.minPrice||a.maxPrice||a.sort&&a.sort.length>0)&&(0,t.jsxs)("div",{className:"flex flex-col gap-3 px-1 animate-in slide-in-from-top-2 duration-200",children:[a.sort&&a.sort.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[(0,t.jsxs)("span",{className:"text-xs font-semibold text-zinc-500 uppercase tracking-wide mr-1",children:[f("sort"),":"]}),a.sort.map(e=>{let r=b().find(t=>t.options.some(t=>t.value===e)),s=r?.options.find(t=>t.value===e);return(0,t.jsx)(u.FilterChip,{label:s?f(s.translationKey):e,onRemove:()=>{let t=a.sort?.filter(t=>t!==e);p({...a,sort:t&&t.length>0?t:void 0})}},`sort-${e}`)}),(0,t.jsx)("button",{onClick:()=>p({...a,sort:void 0}),className:"text-xs text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-300 ml-auto sm:ml-2 transition-colors whitespace-nowrap",children:f("clearSort")})]}),(R.length>0||T.length>0||I.length>0||$.length>0||a.minPrice||a.maxPrice)&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[a.sort&&a.sort.length>0&&(0,t.jsxs)("span",{className:"text-xs font-semibold text-zinc-500 uppercase tracking-wide mr-1",children:[h("filter"),":"]}),R.map(e=>(0,t.jsx)(u.FilterChip,{label:S.find(t=>t.value===e)?.label||e,onRemove:()=>{var t;t=R.filter(t=>t!==e),p({...a,manufacturer:t.length>0?t.join(","):void 0})}},`mfg-${e}`)),T.map(e=>(0,t.jsx)(u.FilterChip,{label:E.find(t=>t.value===e)?.label||e,onRemove:()=>{var t;t=T.filter(t=>t!==e),p({...a,series:t.length>0?t.join(","):void 0})}},`series-${e}`)),I.map(e=>(0,t.jsx)(u.FilterChip,{label:A.find(t=>t.value===e)?.label||e,onRemove:()=>{U(I.filter(t=>t!==e))}},`tag-${e}`)),$.map(e=>(0,t.jsx)(u.FilterChip,{label:e,onRemove:()=>{var t;t=$.filter(t=>t!==e),p({...a,scale:t.length>0?t.join(","):void 0})}},`scale-${e}`)),(a.minPrice||a.maxPrice)&&(0,t.jsx)(u.FilterChip,{label:`${a.minPrice||"0"} - ${a.maxPrice||"∞"} zł`,onRemove:()=>p({...a,minPrice:void 0,maxPrice:void 0})}),(0,t.jsx)("button",{onClick:()=>p({...a,manufacturer:void 0,series:void 0,tag:void 0,scale:void 0,minPrice:void 0,maxPrice:void 0}),className:`text-xs text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-300 ${a.sort&&a.sort.length>0?"ml-auto sm:ml-2":"ml-2"} transition-colors whitespace-nowrap`,children:f("clearFilters")})]}),a.sort&&a.sort.length>0&&(R.length>0||T.length>0||I.length>0||$.length>0||a.minPrice||a.maxPrice)&&(0,t.jsx)("div",{className:"flex justify-end pt-1 border-t border-zinc-100 dark:border-zinc-800/50 mt-1",children:(0,t.jsxs)("button",{onClick:()=>{p({sort:void 0,search:a.search,minPrice:void 0,maxPrice:void 0})},className:"text-xs font-medium text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 transition-colors flex items-center gap-1",children:[(0,t.jsx)("span",{className:"w-1 h-1 rounded-full bg-current"}),f("clearAll")||"Wyczyść wszystko"]})})]}),(0,t.jsx)(w,{isOpen:j,onClose:()=>P(!1),selectedSorts:a.sort||[],onApply:e=>p({...a,sort:e.length>0?e:void 0})})]})}var C=e.i(373375),_=e.i(463059),z=e.i(531278),S=e.i(747133),E=e.i(861745);function O({initialData:e,initialFilters:i,initialPage:l,initialPageSize:n,priceLimits:o,isArchive:d=!1}){let u=(0,s.useRouter)(),m=(0,s.usePathname)(),p=(0,s.useSearchParams)(),[x,f]=(0,r.useTransition)(),h=(0,c.useTranslations)("offers"),b=(0,c.useTranslations)("common");(0,E.useLocale)();let[y,v]=(0,r.useState)(e),[j,w]=(0,r.useState)(i),[N,k]=(0,r.useState)(l),[O,A]=(0,r.useState)(n),[R,T]=(0,r.useState)(!1);(0,r.useEffect)(()=>{v(e),w(i),k(l),A(n)},[e,i,l,n]),(0,r.useEffect)(()=>{let e=()=>T(window.innerWidth<640);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let D=y.categories,I=y.tags,$=(e,t,r)=>{let s=new URLSearchParams;t>1&&s.set("page",t.toString()),r!==S.PAGINATION.DEFAULT_PAGE_SIZE&&s.set("pageSize",r.toString()),e.manufacturer&&s.set("manufacturer",e.manufacturer),e.series&&s.set("series",e.series),e.tag&&s.set("tag",e.tag),e.type&&s.set("type",e.type),e.search&&s.set("search",e.search),e.sort&&e.sort.length>0&&s.set("sort",e.sort.join(",")),e.scale&&s.set("scale",e.scale),e.minPrice&&s.set("minPrice",e.minPrice),e.maxPrice&&s.set("maxPrice",e.maxPrice);let a=s.toString(),i=a?`${m}?${a}`:m;f(()=>{u.push(i,{scroll:!1})})},L=e=>{k(e),window.scrollTo({top:0,behavior:"instant"}),$(j,e,O)},M=(0,r.useMemo)(()=>{let e=[],t=R?3:5,r=y.totalPages;if(r<=t)for(let t=1;t<=r;t++)e.push(t);else if(R)if(N<=2){for(let t=1;t<=2;t++)e.push(t);e.push("..."),e.push(r)}else if(N>=r-1){e.push(1),e.push("...");for(let t=r-1;t<=r;t++)e.push(t)}else e.push(1),e.push("..."),e.push(N),e.push("..."),e.push(r);else if(N<=3){for(let t=1;t<=4;t++)e.push(t);e.push("..."),e.push(r)}else if(N>=r-2){e.push(1),e.push("...");for(let t=r-3;t<=r;t++)e.push(t)}else{e.push(1),e.push("...");for(let t=N-1;t<=N+1;t++)e.push(t);e.push("..."),e.push(r)}return e},[N,y.totalPages,R]),F=(y.page-1)*y.pageSize,U=Math.min(F+y.pageSize,y.count);return(0,t.jsxs)("div",{"data-testid":"offers-page",className:"min-h-screen",style:{background:"#111111"},children:[(0,t.jsx)("section",{className:"border-b",style:{borderColor:"rgba(168, 216, 90,0.2)",background:"#111111"},children:(0,t.jsxs)("div",{className:"mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-4",children:[(0,t.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold text-white mb-1",children:d?b("archive"):h("ourOffers")}),(0,t.jsx)("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.55)"},children:d?b("archiveDescription"):h("productsInCollection",{count:y.count})})]})}),(0,t.jsx)("section",{className:"mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-8",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"rounded-xl p-4 border",style:{background:"rgba(168, 216, 90,0.05)",borderColor:"rgba(168, 216, 90,0.15)"},children:(0,t.jsx)(P,{categories:D,tags:I,value:j,onChange:e=>{JSON.stringify(e)!==JSON.stringify(j)&&(w(e),k(1),$(e,1,O))},priceLimits:o})}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.55)"},children:0===y.count?b("noResults"):`${y.count} ${1===y.count?b("product"):b("products")}`}),x&&(0,t.jsxs)("div",{"data-testid":"offers-loading",className:"flex items-center gap-2 text-sm",style:{color:"#A8D85A"},children:[(0,t.jsx)(z.Loader2,{className:"h-4 w-4 animate-spin"}),b("loading")]})]}),0===y.count&&!x&&(0,t.jsxs)("div",{"data-testid":"offers-empty",className:"text-center py-16 rounded-xl border",style:{background:"rgba(168, 216, 90,0.05)",borderColor:"rgba(168, 216, 90,0.15)"},children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center h-16 w-16 rounded-full mb-4",style:{background:"rgba(168, 216, 90,0.15)"},children:(0,t.jsx)(g.Package,{className:"h-8 w-8",style:{color:"#A8D85A"}})}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-white mb-2",children:b("noResults")}),(0,t.jsx)("p",{className:"text-sm",style:{color:"rgba(255,255,255,0.55)"},children:b("tryDifferentFilters")})]}
3),y.count>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{"data-testid":"offers-grid",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:y.data.map(e=>(0,t.jsx)(a.OfferCard,{id:e.id,guid:e.guid,title:e.title,priceCents:e.price_cents,unitLabel:(e=>{switch(e){case"pcs":return b("unitPcs");case"carton":return b("unitCarton");default:return e}})(e.unit_label),packagePriceCents:e.package_price_cents??null,packageSize:e.package_size??null,shortDescription:e.short_description??void 0,category:e.category||e.primaryCategory||void 0,tags:e.tags,type:e.sale_type,imageUrl:e.image_url??void 0,stockQuantity:e.stock_quantity??null,returnParams:p.toString()},e.id))}),y.count>0&&(0,t.jsx)("div",{className:"rounded-xl shadow-sm p-3 sm:p-4 mt-6 border",style:{background:"rgba(168, 216, 90,0.06)",borderColor:"rgba(168, 216, 90,0.18)"},children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-2 sm:gap-3",children:[(0,t.jsxs)("div",{className:"text-xs sm:text-sm font-medium text-center sm:text-left",style:{color:"rgba(255,255,255,0.55)"},children:[(0,t.jsxs)("span",{className:"hidden sm:inline",children:[h("displaying")," "]}),(0,t.jsxs)("span",{className:"text-white font-semibold",children:[F+1,"-",Math.min(U,y.count)]})," ",h("of")," ",(0,t.jsx)("span",{className:"text-white font-semibold",children:y.count})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs sm:text-sm",style:{color:"rgba(255,255,255,0.55)"},children:h("perPage")}),(0,t.jsx)("select",{value:O,onChange:e=>{var t;A(t=Number(e.target.value)),k(1),$(j,1,t)},disabled:x,className:"px-2.5 sm:px-3 py-1.5 sm:py-2 rounded-lg text-xs sm:text-sm font-medium text-white border-2 focus:outline-none transition-colors disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"rgba(168, 216, 90,0.1)",borderColor:"rgba(168, 216, 90,0.3)",colorScheme:"dark"},children:S.PAGINATION.PAGE_SIZE_OPTIONS.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]}),y.totalPages>1&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1.5 sm:gap-2 flex-wrap",children:[(0,t.jsx)("button",{onClick:()=>L(N-1),disabled:1===N||x,className:"group min-w-[44px] min-h-[44px] sm:min-w-[40px] sm:min-h-[40px] px-3 sm:px-4 py-2.5 sm:py-2 rounded-lg border-2 disabled:opacity-40 disabled:cursor-not-allowed transition-all duration-200 shadow-sm hover:shadow-md flex items-center justify-center",style:{background:"rgba(168, 216, 90,0.08)",borderColor:"rgba(168, 216, 90,0.25)"},"aria-label":"Previous page",children:(0,t.jsx)(C.ChevronLeft,{className:"h-5 w-5 sm:h-4 sm:w-4 text-white transition-colors"})}),M.map((e,r)=>"..."===e?(0,t.jsx)("span",{className:"px-1 sm:px-2 text-sm",style:{color:"rgba(255,255,255,0.4)"},children:"..."},`ellipsis-${r}`):(0,t.jsx)("button",{onClick:()=>L(e),disabled:x,className:"min-w-[44px] min-h-[44px] sm:min-w-[44px] sm:min-h-auto px-3 sm:px-4 py-2.5 sm:py-2 rounded-lg font-semibold text-sm transition-all duration-200 shadow-sm hover:shadow-md disabled:cursor-not-allowed flex items-center justify-center border-2",style:N===e?{background:"#A8D85A",borderColor:"#A8D85A",color:"#111111"}:{background:"rgba(168, 216, 90,0.08)",borderColor:"rgba(168, 216, 90,0.25)",color:"rgba(255,255,255,0.8)"},"aria-label":`Page ${e}`,"aria-current":N===e?"page":void 0,children:e},e)),(0,t.jsx)("button",{onClick:()=>L(N+1),disabled:N===y.totalPages||x,className:"group min-w-[44px] min-h-[44px] sm:min-w-[40px] sm:min-h-[40px] px-3 sm:px-4 py-2.5 sm:py-2 rounded-lg border-2 disabled:opacity-40 disabled:cursor-not-allowed transition-all duration-200 shadow-sm hover:shadow-md flex items-center justify-center",style:{background:"rgba(168, 216, 90,0.08)",borderColor:"rgba(168, 216, 90,0.25)"},"aria-label":"Next page",children:(0,t.jsx)(_.ChevronRight,{className:"h-5 w-5 sm:h-4 sm:w-4 text-white transition-colors"})})]})]})})]})]})})]})}e.s(["OffersClientView",()=>O],32811)}]);

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.