https://buddy-thecliniccannabisco-frontend.vercel.app/_next/static/immutable/chunks/1318yq1rh-ect.js
1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,640616,e=>{"use strict";var t=e.i(271645),a=e.i(769464);let l=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M234.36,170A12,12,0,0,1,230,186.37l-96,56a12,12,0,0,1-12.1,0l-96-56a12,12,0,0,1,12.09-20.74l90,52.48L218,165.63A12,12,0,0,1,234.36,170ZM218,117.63,128,170.11,38.05,117.63A12,12,0,0,0,26,138.37l96,56a12,12,0,0,0,12.1,0l96-56A12,12,0,0,0,218,117.63ZM20,80a12,12,0,0,1,6-10.37l96-56a12.06,12.06,0,0,1,12.1,0l96,56a12,12,0,0,1,0,20.74l-96,56a12,12,0,0,1-12.1,0l-96-56A12,12,0,0,1,20,80Zm35.82,0L128,122.11,200.18,80,128,37.89Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,80l-96,56L32,80l96-56Z",opacity:"0.2"}),t.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M220,169.09l-92,53.65L36,169.09A8,8,0,0,0,28,182.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,169.09Z"}),t.createElement("path",{d:"M220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09Z"}),t.createElement("path",{d:"M28,86.91l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,0,0,0-13.82l-96-56a8,8,0,0,0-8.06,0l-96,56a8,8,0,0,0,0,13.82Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M229.18,173a6,6,0,0,1-2.16,8.2l-96,56a6,6,0,0,1-6,0l-96-56a6,6,0,0,1,6-10.36l93,54.23,93-54.23A6,6,0,0,1,229.18,173ZM221,122.82l-93,54.23L35,122.82a6,6,0,0,0-6,10.36l96,56a6,6,0,0,0,6,0l96-56a6,6,0,0,0-6-10.36ZM26,80a6,6,0,0,1,3-5.18l96-56a6,6,0,0,1,6,0l96,56a6,6,0,0,1,0,10.36l-96,56a6,6,0,0,1-6,0l-96-56A6,6,0,0,1,26,80Zm17.91,0L128,129.05,212.09,80,128,31Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M227.45,174a4,4,0,0,1-1.44,5.48l-96,56a4,4,0,0,1-4,0l-96-56a4,4,0,0,1,4-6.92l94,54.83,94-54.83A4,4,0,0,1,227.45,174ZM222,124.54l-94,54.83L34,124.54a4,4,0,0,0-4,6.92l96,56a4,4,0,0,0,4,0l96-56a4,4,0,0,0-4-6.92ZM28,80a4,4,0,0,1,2-3.46l96-56a4,4,0,0,1,4,0l96,56a4,4,0,0,1,0,6.92l-96,56a4,4,0,0,1-4,0l-96-56A4,4,0,0,1,28,80Zm11.94,0L128,131.37,216.06,80,128,28.63Z"}))]]),r=t.forwardRef((e,r)=>t.createElement(a.default,{ref:r,...e,weights:l}));r.displayName="StackIcon",e.s(["Stack",0,r],640616)},516134,e=>{"use strict";var t=e.i(271645),a=e.i(769464);let l=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M244,56v64a12,12,0,0,1-24,0V85l-75.51,75.52a12,12,0,0,1-17,0L96,129,32.49,192.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0L136,135l67-67H168a12,12,0,0,1,0-24h64A12,12,0,0,1,244,56Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M232,56v64L168,56Z",opacity:"0.2"}),t.createElement("path",{d:"M232,48H168a8,8,0,0,0-5.66,13.66L188.69,88,136,140.69l-34.34-34.35a8,8,0,0,0-11.32,0l-72,72a8,8,0,0,0,11.32,11.32L96,123.31l34.34,34.35a8,8,0,0,0,11.32,0L200,99.31l26.34,26.35A8,8,0,0,0,240,120V56A8,8,0,0,0,232,48Zm-8,52.69L187.31,64H224Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M240,56v64a8,8,0,0,1-13.66,5.66L200,99.31l-58.34,58.35a8,8,0,0,1-11.32,0L96,123.31,29.66,189.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0L136,140.69,188.69,88,162.34,61.66A8,8,0,0,1,168,48h64A8,8,0,0,1,240,56Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M238,56v64a6,6,0,0,1-12,0V70.48l-85.76,85.76a6,6,0,0,1-8.48,0L96,120.49,28.24,188.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0L136,143.51,217.52,62H168a6,6,0,0,1,0-12h64A6,6,0,0,1,238,56Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M240,56v64a8,8,0,0,1-16,0V75.31l-82.34,82.35a8,8,0,0,1-11.32,0L96,123.31,29.66,189.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0L136,140.69,212.69,64H168a8,8,0,0,1,0-16h64A8,8,0,0,1,240,56Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M236,56v64a4,4,0,0,1-8,0V65.66l-89.17,89.17a4,4,0,0,1-5.66,0L96,117.66,26.83,186.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0L136,146.34,222.34,60H168a4,4,0,0,1,0-8h64A4,4,0,0,1,236,56Z"}))]]),r=t.forwardRef((e,r)=>t.createElement(a.default,{ref:r,...e,weights:l}));r.displayName="TrendUpIcon",e.s(["TrendUp",0,r],516134)},471184,e=>{"use strict";var t=e.i(271645),a=e.i(769464);let l=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H4
10a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0ZM96.49,80.49,116,61v83a12,12,0,0,0,24,0V61l19.51,19.52a12,12,0,1,0,17-17l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,1,0,17,17Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),t.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM88,80h32v64a8,8,0,0,0,16,0V80h32a8,8,0,0,0,5.66-13.66l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,88,80Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0ZM92.24,76.24,122,46.49V144a6,6,0,0,0,12,0V46.49l29.76,29.75a6,6,0,0,0,8.48-8.48l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0ZM90.83,74.83,124,41.66V144a4,4,0,0,0,8,0V41.66l33.17,33.17a4,4,0,1,0,5.66-5.66l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66Z"}))]]),r=t.forwardRef((e,r)=>t.createElement(a.default,{ref:r,...e,weights:l}));r.displayName="UploadSimpleIcon",e.s(["UploadSimple",0,r],471184)},846951,e=>{"use strict";var t=e.i(271645),a=e.i(575108),l=e.i(497199);let r=t.forwardRef((e,r)=>t.createElement(a.default,{ref:r,...e,weights:l.default}));r.displayName="ArrowRightIcon",e.s(["ArrowRight",0,r])},640397,e=>{"use strict";var t=e.i(271645),a=e.i(575108),l=e.i(516928);let r=t.forwardRef((e,r)=>t.createElement(a.default,{ref:r,...e,weights:l.default}));r.displayName="CaretRightIcon",e.s(["CaretRight",0,r])},88653,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(231178),r=e.i(947414),s=e.i(674008),n=e.i(821476),i=e.i(772846),o=a,c=e.i(737806);function d(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class u extends o.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,i.isHTMLElement)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,a=(0,i.isHTMLElement)(e)&&e.offsetWidth||0,l=(0,i.isHTMLElement)(e)&&e.offsetHeight||0,r=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(r.height),s.width=parseFloat(r.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=a-s.width-s.left,s.bottom=l-s.height-s.top,s.direction=r.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function m({children:e,isPresent:l,anchorX:r,anchorY:s,root:n,pop:i}){let h=(0,o.useId)(),x=(0,o.useRef)(null),p=(0,o.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:f}=(0,o.useContext)(c.MotionConfigContext),g=function(...e){return a.useCallback(function(...e){return t=>{let a=!1,l=e.map(e=>{let l=d(e,t);return a||"function"!=typeof l||(a=!0),l});if(a)return()=>{for(let t=0;t<l.length;t++){let a=l[t];"function"==typeof a?a():d(e[t],null)}}}}(...e),e)}(x,!1!==i?e.props?.ref??e?.ref:void 0);return(0,o.useInsertionEffect)(()=>{let{width:e,height:t,top:a,left:o,right:c,bottom:d,direction:u}=p.current;if(l||!1===i||!x.current||!e||!t)return;let m="rtl"===u,g="left"===r?m?`right: ${c}`:`left: ${o}`:m?`left: ${o}`:`right: ${c}`,b="bottom"===s?`bottom: ${d}`:`top: ${a}`;x.current.dataset.motionPopId=h;let y=document.createElement("style");f&&(y.nonce=f);let v=n??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(` 2 [data-motion-pop-id="${h}"] { 3 position: absolute !important; 4 width: ${e}px !important; 5 height: ${t}px !important; 6 ${g}px !important; 7 ${b}px !important; 8 } 9 `),()=>{x.current?.removeAttribute("data-motion-pop-id"),v.contains(y)&&v.removeChild(y)}},[l]),(0,t.jsx)(u,{isPresent:l,childRef:x,sizeRef:p,pop:i,children:!1===i?e:o.cloneElement(e,{ref:g})})}let h=({children:e,initial:l,isPresent:i,onExitComplete:o,custom:c,presenceAffectsLayout:d,mode:u,anchorX:h,anchorY:p,root:f})=>{let g=(0,r.useConstant)(x),b=(0,a.useId)(),y=(0,a.useRef)(i),v=(0,a.useRef)(o);(0,s.useIsomorphicLayoutEffect)(()=>{y.current=i,v.current=o});let j=!0,w=(0,a.useMemo)(()=>(j=!1,{id:b,initial:l,isPresent:i,custom:c,onExitComplete:e=>
9{for(let t of(g.set(e,!0),g.values()))if(!t)return;o&&o()},register:e=>(g.set(e,!1),()=>{g.delete(e),y.current||g.size||v.current?.()})}),[i,g,o]);return d&&j&&(w={...w}),(0,a.useMemo)(()=>{g.forEach((e,t)=>g.set(t,!1))},[i]),a.useEffect(()=>{i||g.size||!o||o()},[i]),e=(0,t.jsx)(m,{pop:"popLayout"===u,isPresent:i,anchorX:h,anchorY:p,root:f,children:e}),(0,t.jsx)(n.PresenceContext.Provider,{value:w,children:e})};function x(){return new Map}var p=e.i(464978);let f=e=>e.key||"";function g(e){let t=[];return a.Children.forEach(e,e=>{(0,a.isValidElement)(e)&&t.push(e)}),t}e.s(["AnimatePresence",0,({children:e,custom:n,initial:i=!0,onExitComplete:o,presenceAffectsLayout:c=!0,mode:d="sync",propagate:u=!1,anchorX:m="left",anchorY:x="top",root:b})=>{let[y,v]=(0,p.usePresence)(u),j=(0,a.useMemo)(()=>g(e),[e]),w=u&&!y?[]:j.map(f),S=(0,a.useRef)(!0),N=(0,a.useRef)(j),k=(0,r.useConstant)(()=>new Map),C=(0,a.useRef)(new Set),[E,L]=(0,a.useState)(j),[P,F]=(0,a.useState)(j);(0,s.useIsomorphicLayoutEffect)(()=>{S.current=!1,N.current=j;for(let e=0;e<P.length;e++){let t=f(P[e]);w.includes(t)?(k.delete(t),C.current.delete(t)):!0!==k.get(t)&&k.set(t,!1)}},[P,w.length,w.join("-")]);let M=[];if(j!==E){let e=[...j];for(let t=0;t<P.length;t++){let a=P[t],l=f(a);w.includes(l)||(e.splice(t,0,a),M.push(a))}return"wait"===d&&M.length&&(e=M),F(g(e)),L(j),null}let{forceRender:A}=(0,a.useContext)(l.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:P.map(e=>{let a=f(e),l=(!u||!!y)&&(j===P||w.includes(a));return(0,t.jsx)(h,{isPresent:l,initial:(!S.current||!!i)&&void 0,custom:n,presenceAffectsLayout:c,mode:d,root:b,onExitComplete:l?void 0:()=>{if(C.current.has(a)||!k.has(a))return;C.current.add(a),k.set(a,!0);let e=!0;k.forEach(t=>{t||(e=!1)}),e&&(A?.(),F(N.current),u&&v?.(),o&&o())},anchorX:m,anchorY:x,children:e},a)})})}],88653)},306203,e=>{"use strict";var t=e.i(843476),a=e.i(258288),l=e.i(701973),r=e.i(35185);e.s(["default",0,({cls:e})=>{let{orderType:s,selectedDeliveryAddress:n,selectedPickupAddressObject:i,selectedCurbsideAddressObject:o,retailerName:c,providerSettingsCms:d,retailerDetails:u}=(0,a.useGlobalStore)(),{line1:m,postalCode:h,city:x,state:p}=(0,l.isTruthyObject)(i)?i:(0,l.isTruthyObject)(o)?o:{};return(0,t.jsx)("div",{className:`bg-gray-50 ${e}`,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"bg-gray-200 rounded-full flex items-center justify-center p-2",children:(0,t.jsx)(r.Storefront,{weight:"fill",className:"transform scaleX(-1) text-xl md:text-3xl"})}),(0,t.jsxs)("div",{className:"space-y-[6px]",children:[(0,t.jsxs)("p",{className:"text-xs md:text-base font-bold leading-tight text-gray-900",children:["DELIVERY"===s?"Delivery at":"CURBSIDE_PICKUP"===s?"Curbside Pickup at":"Pickup at"," ",": ",c]}),"DELIVERY"===s&&(0,t.jsx)("p",{className:"text-xs md:text-sm text-gray-900",children:n}),("PICKUP"===s||"CURBSIDE_PICKUP"===s)&&(0,t.jsx)("p",{className:"text-xs md:text-sm text-gray-900",children:d?.treez?u?.address:`${m}, ${x}, ${p} ${h}`})]})]})})}])},153846,e=>{"use strict";var t=e.i(843476),a=e.i(267750),l=e.i(271645),r=e.i(174080),s=e.i(577854);let n=(0,l.memo)(e=>{let{open:n,children:i,handleClose:o,classes:c,anchor:d,isVh:u}=e,[m,h]=(0,l.useState)(!1);(0,l.useLayoutEffect)(()=>{h(!0)},[]),(0,a.useBodyScrollLock)(n),(0,l.useEffect)(()=>{let e;return n&&(e=e=>{let t=e.target;t instanceof Element&&t.classList.contains("modal")&&o()},document.addEventListener("click",e)),()=>{e&&document.removeEventListener("click",e)}},[n,o]);let x=(0,t.jsxs)("div",{className:`${n?`w-screen ${u?"h-screen":"h-dvh"}`:"w-0"} modal fixed inset-0 !overflow-hidden bg-[rgba(0,0,0,0.5)] ${e?.overrideZIndexClass?e?.overrideZIndexClass:"z-[70]"}`,children:[n&&e.isMobileMenu&&(0,t.jsx)("div",{className:"fixed bg-gray-500 right-0 cursor-pointer text-white p-3 "+("bottom"===d?"rounded-t-2xl ":"rounded"),children:(0,t.jsx)(s.X,{onClick:o,size:28})}),(0,t.jsx)("div",{style:{...e.style},className:`${e.isNotBgWhite?"":"bg-white"} fixed overflow-hidden flex flex-col w-full md:w-96 ${"bottom"===d?"bottom-0":"left"
9===d?"left-0":"right-0"} ${n?"bottom"===d?e.translateY||"translate-y-0":"left"===d?"translate-x-0":"-translate-x-0":"bottom"===d?"translate-y-[100vh]":"left"===d?"-translate-x-full":"translate-x-full"} top-0 bottom-0 transition-all duration-300 ${u?"h-screen":"h-dvh"} ${e.tw} ${c}`,children:i})]});return m?(0,r.createPortal)(x,document.body):null});e.s(["default",0,n])},284831,e=>{"use strict";var t=e.i(843476),a=e.i(471184),l=e.i(701976),r=e.i(577854),s=e.i(525209),n=e.i(271645);e.s(["default",0,({label:e,description:i,accept:o=".pdf,application/pdf",onFilesSelected:c,selectedFiles:d,maxFileSize:u=0xa00000,maxFiles:m,required:h=!1,hideInputOnPreview:x=!1,onRejected:p})=>{let[f,g]=(0,n.useState)(!1),b=(0,n.useRef)(null),y=e=>{let t=void 0!==m?Math.max(0,m-d.length):1/0,a=[];return e.forEach(e=>{e.size>u?p?.(e,"size"):(e=>{let t=o.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean);if(0===t.length)return!0;let a=(e.type||"").toLowerCase(),l=e.name.toLowerCase(),r=l.includes(".")?`.${l.split(".").pop()}`:"";return t.some(e=>e.endsWith("/*")?a.startsWith(e.slice(0,-1)):e.startsWith(".")?r===e:a===e)})(e)?a.length>=t?p?.(e,"count"):a.push(e):p?.(e,"type")}),a};return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[e&&(0,t.jsxs)("label",{className:"text-sm font-semibold text-gray-900 dark:text-[#ECEFF3]",children:[e," ",h&&(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),d.length>0&&(0,t.jsx)("div",{className:"space-y-2 mb-2",children:d.map((e,a)=>{var s;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-[#161A21] rounded-lg border border-gray-200 dark:border-[#22262E]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(l.File,{className:"w-8 h-8 text-red-500"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-gray-900 dark:text-[#ECEFF3] truncate max-w-[200px]",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 dark:text-[#A9B0B9]",children:(s=e.size)<1024?s+" B":s<1048576?(s/1024).toFixed(1)+" KB":(s/1048576).toFixed(1)+" MB"})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{c(d.filter((e,t)=>t!==a)),b.current&&(b.current.value="")},className:"p-1 hover:bg-gray-200 dark:hover:bg-[#22262E] rounded-full transition-colors","aria-label":"Remove file",children:(0,t.jsx)(r.X,{className:"w-5 h-5 text-gray-500 dark:text-[#A9B0B9] hover:text-red-500"})})]},a)})}),(0===d.length||!x)&&(0,t.jsxs)("div",{onClick:()=>b.current?.click(),onDragOver:e=>{e.preventDefault(),e.stopPropagation(),g(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),g(!1)},onDrop:e=>{e.preventDefault(),e.stopPropagation(),g(!1);let t=e.dataTransfer.files;t&&c([...d,...y(Array.from(t))])},className:`relative border-2 border-dashed rounded-lg bg-white dark:bg-[#0B0E12] p-8 cursor-pointer transition-colors ${f?"border-[#036672] bg-teal-50 dark:bg-teal-950/30":"border-gray-300 dark:border-[#22262E] hover:border-[#036672]"}`,children:[(0,t.jsx)("input",{type:"file",ref:b,onChange:e=>{let t=e.target.files;t&&c([...d,...y(Array.from(t))])},accept:o,className:"hidden"}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-center",children:(0,t.jsx)(a.UploadSimple,{className:"w-8 h-8 text-gray-400 dark:text-[#7E8791]"})}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-gray-700 dark:text-[#ECEFF3]",children:"Click to upload or drag and drop"}),i&&(0,t.jsx)("p",{className:"text-xs text-gray-500 dark:text-[#A9B0B9] text-center",children:i})]}),(0,t.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),b.current?.click()},className:"flex items-center gap-2 px-4 py-2 rounded-lg text-white font-medium text-sm hover:opacity-90 transition-opacity",style:{backgroundColor:"#036672"},children:[(0,t.jsx)(s.MagnifyingGlass,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Browse file"})]})]})]})]})}])},475537,e=>{"use strict";var t=e.i(843476),a=e.i(892725),l=e.i(337223),r=e.i(137963),s=e.i(271645),n=e.i(769464);let i=new Map([["bold",s.createElement(s.Fragment,null,s.createElement("path",{d:"M243.14,131.54l-32-80h0a12,12,0,0,0-13.73-7.25L140,57V40a12,12,0,0,0-24,0V62.37L53.4,76.29a12,12,0,0,0-8.54,7.25h0l0,0v0l-32,79.92A12,12,0,0,0,12,168c0,12.13,6.2,22.43,17.45,29A55,55,0,0,0,56,204a55,55,0,0,0,26.55-7C93.8,190.43,100,180.13,100,168a12,12,0,0,0-.86-4.46L72.38,96.65,116,87V204H104a12,12,0,0,0,0,24h48a12,12,0,0,0,0-24H140V81.63l40.42-9-23.56,58.9A12,12,0,0,0,156,136c0,12.13,6.2,22.43,17.45,29a53.78,53.78,0,0,0,53.1,0C237.8,158.43,244,148.13,244,136A12,12,0,0,0,243.14,131.54ZM56,180c-3.71,0-18-1.87-19.81-10.18L56,120.31l19.81,49.51C74,178.13,59.71,180,56,180Zm144-32c-3.71,0-18-1.87-19.81-10.18L200,88.31l19.81,49.51C218,146.13,203.71,148,200,148Z"}))],["duotone",s.createElement(s.Fragment,null,s.createElement("path",{d:"M56,88l32,80c0,17.67-20,24-32,24s-32-6.33-32-24ZM200,56l-32,80c0,17.67,20,24,32,24s32-6.33,32-24Z",opacity:"0.2"}),s.createElement("path",{d:"M239.43,133l-32-80h0a8,8,0,0,0-9.16-4.84L136,62V40a8,8,0,0,0-16,0V65.58L54.26,80.19A8,8,0,0,0,48.57,85h0v.06L16.57,165
9a7.92,7.92,0,0,0-.57,3c0,23.31,24.54,32,40,32s40-8.69,40-32a7.92,7.92,0,0,0-.57-3L66.92,93.77,120,82V208H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16H136V78.42L187,67.1,160.57,133a7.92,7.92,0,0,0-.57,3c0,23.31,24.54,32,40,32s40-8.69,40-32A7.92,7.92,0,0,0,239.43,133ZM56,184c-7.53,0-22.76-3.61-23.93-14.64L56,109.54l23.93,59.82C78.76,180.39,63.53,184,56,184Zm144-32c-7.53,0-22.76-3.61-23.93-14.64L200,77.54l23.93,59.82C222.76,148.39,207.53,152,200,152Z"}))],["fill",s.createElement(s.Fragment,null,s.createElement("path",{d:"M239.43,133l-32-80A8,8,0,0,0,200,48a8.27,8.27,0,0,0-1.73.21L136,62V40a8,8,0,0,0-16,0V65.58L54.27,80.21A8,8,0,0,0,48.57,85l-32,80a7.92,7.92,0,0,0-.57,3c0,23.31,24.54,32,40,32s40-8.69,40-32a7.92,7.92,0,0,0-.57-3L66.92,93.77,120,82V208H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16H136V78.42L187,67.1,160.57,133a7.92,7.92,0,0,0-.57,3c0,23.31,24.54,32,40,32s40-8.69,40-32A7.92,7.92,0,0,0,239.43,133Zm-160,35H32.62L56,109.54Zm97.24-32L200,77.54,223.38,136Z"}))],["light",s.createElement(s.Fragment,null,s.createElement("path",{d:"M237.57,133.77l-32-80h0a6,6,0,0,0-6.86-3.63L134,64.52V40a6,6,0,0,0-12,0V67.19l-67.3,15a6,6,0,0,0-4.27,3.63h0v0l-32,80A6.1,6.1,0,0,0,18,168c0,21.86,23.31,30,38,30s38-8.14,38-30a6.1,6.1,0,0,0-.43-2.23L64.19,92.33,122,79.48V210H104a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12H134V76.81l56.21-12.49-27.78,69.45A6.1,6.1,0,0,0,162,136c0,21.86,23.31,30,38,30s38-8.14,38-30A6.1,6.1,0,0,0,237.57,133.77ZM56,186a36.89,36.89,0,0,1-17.48-4.56c-5.37-3.13-8.15-7.18-8.49-12.37l26-64.91,26,64.91C81.06,182.85,62.58,186,56,186Zm144-32a36.89,36.89,0,0,1-17.48-4.56c-5.37-3.13-8.15-7.18-8.49-12.37l26-64.91,26,64.91C225.06,150.85,206.58,154,200,154Z"}))],["regular",s.createElement(s.Fragment,null,s.createElement("path",{d:"M239.43,133l-32-80h0a8,8,0,0,0-9.16-4.84L136,62V40a8,8,0,0,0-16,0V65.58L54.26,80.19A8,8,0,0,0,48.57,85h0v.06L16.57,165a7.92,7.92,0,0,0-.57,3c0,23.31,24.54,32,40,32s40-8.69,40-32a7.92,7.92,0,0,0-.57-3L66.92,93.77,120,82V208H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16H136V78.42L187,67.1,160.57,133a7.92,7.92,0,0,0-.57,3c0,23.31,24.54,32,40,32s40-8.69,40-32A7.92,7.92,0,0,0,239.43,133ZM56,184c-7.53,0-22.76-3.61-23.93-14.64L56,109.54l23.93,59.82C78.76,180.39,63.53,184,56,184Zm144-32c-7.53,0-22.76-3.61-23.93-14.64L200,77.54l23.93,59.82C222.76,148.39,207.53,152,200,152Z"}))],["thin",s.createElement(s.Fragment,null,s.createElement("path",{d:"M235.71,134.51l-32-80h0a4,4,0,0,0-4.57-2.41L132,67V40a4,4,0,0,0-8,0V68.79L55.13,84.1a4,4,0,0,0-2.84,2.41h0v0h0l-32,80A4,4,0,0,0,20,168c0,20.4,22.08,28,36,28s36-7.6,36-28a4,4,0,0,0-.29-1.49L61.46,90.88,124,77V212H104a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8H132V75.21l61.47-13.66-29.18,73A4,4,0,0,0,164,136c0,20.4,22.08,28,36,28s36-7.6,36-28A4,4,0,0,0,235.71,134.51ZM56,188c-7.15,0-27.37-3.56-28-19.27l28-70,28,70C83.37,184.44,63.15,188,56,188Zm144-32c-7.15,0-27.37-3.56-28-19.27l28-70,28,70C227.37,152.44,207.15,156,200,156Z"}))]]),o=s.forwardRef((e,t)=>s.createElement(n.default,{ref:t,...e,weights:i}));o.displayName="ScalesIcon";let c=({percent:e,tone:a,size:l="md"})=>{let s="sm"===l?32:40,n="sm"===l?12:15,i="sm"===l?2.5:3,o=s/2,c=2*Math.PI*n;return(0,t.jsxs)("div",{className:"relative shrink-0",style:{width:s,height:s},"aria-hidden":!0,children:[(0,t.jsxs)("svg",{width:s,height:s,className:"-rotate-90",viewBox:`0 0 ${s} ${s}`,children:[(0,t.jsx)("circle",{cx:o,cy:o,r:n,fill:"none",strokeWidth:i,className:a.gaugeBg,stroke:"currentColor"}),(0,t.jsx)("circle",{cx:o,cy:o,r:n,fill:"none",strokeWidth:i,strokeLinecap:"round",className:a.gauge,stroke:"currentColor",strokeDasharray:c,strokeDashoffset:c-e/100*c})]}),(0,t.jsxs)("span",{className:(0,r.cn)("absolute inset-0 flex items-center justify-center font-bold text-gray-800 dark:text-slate-200","sm"===l?"text-[9px]":"text-[10px]"),children:[e,"%"]})]})};e.s(["default",0,({className:e,variant:s="inline"})=>{let n=(0,a.useCartStore)(e=>e.flowhubPurchaseLimitPercentage),i=(0,l.getFlowhubPurchaseLimitUiState)(n);if(!i)return null;let d="banner"===s,u=(0,l.getFlowhubPurchaseLimitTone)(i),m=(0,l.getFlowhubPurchaseLimitStatusLabel)(i),h=(0,l.getFlowhubPurchaseLimitRemainingLabel)(i),x=i.isOverLimit||i.isAtLimit||i.isWarning||d;return(0,t.jsxs)("div",{className:(0,r.cn)("rounded-xl border shadow-sm",d?"px-4 py-3":"px-3 py-2.5",u.shell,e),role:"status","aria-live":"polite","aria-label":`Purchase limit ${i.percentLabel} percent, ${m}`,children:[(0,t.jsxs)("div",{className:(0,r.cn)("flex gap-3",d?"items-center":"items-start"),children:[d?(0,t.jsx)(c,{percent:i.percentLabel,tone:u,size:"md"}):(0,t.jsx)("div",{className:(0,r.cn)("mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-lg",u.iconWrap),children:(0,t.jsx)(o,{size:14,weight:"duotone","aria-hidden":!0})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:(0,r.cn)("font-semibold website-cards-text-color",d?"text-sm":"text-[11px] leading-tight"),children:"Purchase limit"}),d&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-gray-500 dark:text-slate-400",children:h})]}),(0,t.jsx)("span",{className:(0,r.cn)("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold leading-none",u.statusPill),children:m})]}
9),!d&&(0,t.jsx)("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:(0,t.jsxs)("span",{className:(0,r.cn)("rounded-md px-1.5 py-0.5 text-[10px] font-bold tabular-nums",u.badge),children:[i.percentLabel,"%"]})}),(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-hidden rounded-full",u.barTrack,d?"mt-3 h-2":"mt-2 h-1.5"),"aria-hidden":!0,children:(0,t.jsx)("div",{className:(0,r.cn)("h-full rounded-full transition-all duration-500 ease-out",u.bar),style:{width:`${(0,l.getFlowhubPurchaseLimitBarWidth)(i)}%`}})})]})]}),x&&(0,t.jsx)("p",{className:(0,r.cn)("leading-snug",d?"mt-2.5 pl-[52px] text-xs":"mt-2 text-[10px]",u.text),children:(0,l.getFlowhubPurchaseLimitMessage)(i,!d)})]})}],475537)},88572,318590,587446,979872,e=>{"use strict";var t=e.i(843476),a=e.i(522016),l=e.i(271645),r=e.i(258288),s=e.i(689236);let n={isVisible:!0,prefixText:"Powered by",linkText:"Buddy",linkUrl:"https://hellobuddy.app/",isLinkEnabled:!0,openInNewTab:!0,fontFamily:"",fontSize:"",fontWeight:"",fontStyle:"normal"};function i({color:e}){let{commonCMSData:o}=(0,r.useGlobalStore)(),c=o?.poweredByBuddyCms??{},d={...n,...c};if((0,l.useEffect)(()=>{d?.fontFamily&&function(e,t){let a=(0,s.getPrimaryFontFamilyName)(e);if(!a||!(0,s.shouldLoadGoogleFont)(a,t))return;let l=`powered-by-buddy-font-${a.replace(/\s+/g,"-")}`;if(document.getElementById(l))return;if((0,s.shouldEnhanceDynamicFontLoading)())return(0,s.loadGoogleFontViaFontFace)(a);let r=document.createElement("link");r.id=l,r.rel="stylesheet",r.href=`https://fonts.googleapis.com/css2?family=${encodeURIComponent(a.replace(/ /g,"+"))}&display=swap`,document.head.appendChild(r)}(d.fontFamily,(0,s.getCustomFontFacesFromTheme)(o?.generalSettingsComponentUiData))},[d?.fontFamily,o?.generalSettingsComponentUiData]),d?.isVisible===!1)return null;let u={...e?{color:e}:{},fontFamily:d?.fontFamily?`"${d?.fontFamily}", sans-serif`:void 0,fontSize:function(e){if(null!=e&&""!==e){if("number"==typeof e&&!Number.isNaN(e))return`${e}px`;if("string"==typeof e){let t=e.trim();return t?/^\d+(\.\d+)?$/.test(t)?`${t}px`:t:void 0}}}(d?.fontSize),fontWeight:d?.fontWeight||void 0,fontStyle:d?.fontStyle||void 0},m=d?.isLinkEnabled?(0,t.jsx)(a.default,{href:d?.linkUrl||n?.linkUrl,target:d?.openInNewTab?"_blank":void 0,rel:d?.openInNewTab?"noopener noreferrer":void 0,className:"hover:underline",style:u,children:d?.linkText}):(0,t.jsx)("span",{style:u,children:d?.linkText});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:u,children:d?.prefixText})," ",m]})}e.s(["default",0,i],318590);var o=e.i(259503);function c(e,t,a){if(!e)return;let l=e.textColor,r=e.darkTextColor,s={desktop:{light:e.desktopFooterTextColor??l,dark:e.darkDesktopFooterTextColor??r},hamburger:{light:e.hamburgerTextColor,dark:e.darkHamburgerTextColor},mobile:{light:e.mobileFooterTextColor??l,dark:e.darkMobileFooterTextColor??r}},{light:n,dark:i}=s[a],o=s.desktop;return t?i||n||o.dark||o.light||void 0:n||i||o.light||o.dark||void 0}function d(e){let{commonCMSData:t}=(0,r.useGlobalStore)(),a=(0,o.useIsDarkTheme)();return c(t?.poweredByBuddyCms,a,e)}e.s(["resolvePoweredByBuddyTextColor",0,c],587446),e.s(["usePoweredByBuddyTextColor",0,d],979872);var u=e.i(259997),m=e.i(808340);e.s(["default",0,function({placement:e,useBrandingColor:a=!1}){let l=d(e),r=(0,m.isProviderShowcase)((0,u.decryptFromCookies)("provider")),s=a||"hamburger"===e&&(r||!l);return(0,t.jsx)("span",{className:s?"buddy-sidebar-menu-footer-link":void 0,children:(0,t.jsx)(i,{color:s?void 0:l})})}],88572)},110157,e=>{"use strict";let t=(0,e.i(806344).create)(e=>({notificationCount:0,recommendedProductData:[],isLoadingRecommendedProductData:!1,isNotificationCartSidebarOpen:!1,showAbandonedCartModel:!1,setNotificationCount:t=>e(()=>({notificationCount:t})),incrementNotificationCount:()=>e(e=>({notificationCount:e.notificationCount+1})),setIsLoadingRecommendedProductData:t=>e(()=>({isLoadingRecommendedProductData:t})),addNewRecommendedProducts:t=>e(()=>({recommendedProductData:[...t]})),setIsNotificationCartSidebarOpen:t=>e({isNotificationCartSidebarOpen:t}),setShowAbandonedCartModel:t=>e(()=>({showAbandonedCartModel:t}))}));e.s(["useNotificationStore",0,t])},13060,e=>{"use strict";let t=(0,e.i(806344).create)(e=>({resourceTitle:"",setResourceTitle:t=>e({resourceTitle:t}),resourceCategoryName:"",setResourceCategoryName:t=>e({resourceCategoryName:t})}));e.s(["useResourceBreadcrumbStore",0,t])},16820,105267,e=>{"use strict";var t=e.i(843476),a=e.i(710793),l=e.i(109073),r=e.i(681987),s=e.i(32193),n=e.i(892725);let i=e=>(null==e||Number.isNaN(Number(e))?0:Number(e)/100).toFixed(2),o=e=>(e??0).toFixed(2),c=e=>{let t=e?.flowhubProduct;return t||e?.product},d=e=>{let t=c(e);return t?.name||e?.product?.name||"Product"},u=e=>{let t=c(e),a=t?.brand||e?.product?.brand?.name||e?.product?.brandName||"";return a?String(a):null},m=e=>{let t=c(e),a=t?.category||e?.product?.category||"";return a?String(a):null},h=e=>{let t=c(e),a=t?.weight_volume;if(null==a||""===a){let t=e?.option?.trim();return t&&"1unit"!==t?t:null}let l=t?.weight_volume_uom?.trim();return l?`${a} ${(0,r.normalizeFlowhubWeightUomToShort)(l)}`:String(a)},x=e=>{let t=c(e),a=t?.species||e?.product?.strainType||"";return a?String(a):null},p=e=>null!=e.itemPriceCents&&e.quantity>0?i(Math.round(e.itemPriceCents/e.quantity)):null!=e.basePrice?i(e.basePrice):"0.00",f=e=>null!=e.lineTotalCents?i(e.lineTotalCents):o(Number(p(e))*(e.quantity||1)),g=e=>e.lineDiscountCents?i(e.lineDiscountCents):null,b=e=>
9e.lineTaxCents?i(e.lineTaxCents):null;e.s(["FlowhubCartSummaryRows",0,({subtotal:e,taxAmount:t,discountAmount:a,feesAmount:l,totalAmount:r,cartCounter:s})=>[{label:`Subtotal (${s})`,value:o(e),emphasized:!1},...a>0?[{label:"Discounts",value:`-${o(a)}`,emphasized:!1}]:[],{label:"Taxes",value:o(t),emphasized:!1},...l>0?[{label:"Fees",value:o(l),emphasized:!1}]:[],{label:"Total",value:o(r),emphasized:!0}],"getFlowhubLineBrand",0,u,"getFlowhubLineCategory",0,m,"getFlowhubLineDiscount",0,g,"getFlowhubLineProductName",0,d,"getFlowhubLineSpecies",0,x,"getFlowhubLineTax",0,b,"getFlowhubLineTotalPrice",0,f,"getFlowhubLineUnitPrice",0,p,"getFlowhubLineWeightLabel",0,h],105267);var y=e.i(161652);e.s(["default",0,({item:e,index:i,onProductClick:o,onQuantityChange:c,onRemove:v,quantityClassName:j="w-[168px]",showActions:w=!1,embedded:S=!1})=>{let N=u(e),k=m(e),C=h(e),E=x(e),L=g(e),P=b(e),F=e?.product?.slug||e?.productId,M=!!e?.isFlowhubWeightLine||!!C;return(0,t.jsxs)("div",{className:S?"flex items-start justify-between gap-3 px-4 py-4 sm:px-5":"flex items-start justify-between px-4 gap-3 pb-5 border-b border-gray-200 pt-4",children:[(0,t.jsxs)("div",{className:"flex justify-start gap-3 items-start w-[85%]",children:[(0,t.jsx)(a.default,{onClick:o,src:e?.product?.image||"",showPlaceholder:!0,width:75,height:75,sizes:"75px",className:F?"cursor-pointer object-contain":"object-contain",alt:d(e)}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{onClick:o,className:`text-[16px] text-gray-800 font-medium mb-1 custom-heading-font ${F?"cursor-pointer":""}`,children:d(e)}),N&&(0,t.jsx)("p",{className:"text-xs text-gray-600 font-medium mb-1",children:N}),k&&(0,t.jsx)("p",{className:"text-xs text-gray-600 mb-1",children:k}),E&&(0,t.jsx)("p",{className:"text-xs text-gray-500 capitalize mb-1",children:E}),e.isFlowhubWeightLine?(0,t.jsxs)("p",{className:"text-xs text-gray-700 font-medium mb-1",children:["Total weight: ",(0,r.formatFlowhubWeightQuantity)(e)]}):C?(0,t.jsxs)("p",{className:"text-xs text-gray-700 font-medium mb-1",children:["Size: ",C]}):null,(0,t.jsxs)("p",{className:"text-xs text-gray-700 font-medium",children:["Unit price: $",p(e)]}),L&&(0,t.jsxs)("p",{className:"text-xs text-[#C81E1E] font-medium mt-1",children:["Discount: -$",L]}),P&&(0,t.jsxs)("p",{className:"text-xs text-gray-600 mt-0.5",children:["Tax: $",P]}),(0,t.jsxs)("p",{className:"text-sm font-semibold text-gray-900 mt-2",children:["Line total: $",f(e)]}),(0,t.jsx)("div",{className:"flex items-center gap-3 mt-4",children:e.isFlowhubWeightLine?(0,t.jsx)(l.default,{item:e,className:j,onWeightChange:e=>c(i,e),weightUnitShowing:M}):(0,t.jsx)(s.default,{className:j,quantity:(0,r.getFlowhubCartUnitCount)(e),maxQuantity:(0,n.getProductVariantMaxQuantity)(e?.option,e?.product),onQuantityChange:e=>c(i,e)})}),w&&(0,t.jsx)("div",{className:"mt-4"})]})]}),(0,t.jsx)(y.Trash,{className:"text-[#C81E1E] text-xl cursor-pointer self-center shrink-0",onClick:()=>v(e)})]})}],16820)},154287,e=>{"use strict";var t=e.i(843476),a=e.i(258288),l=e.i(64722),r=e.i(402902),s=e.i(809991),n=e.i(55144),i=e.i(701973),o=e.i(310160),c=e.i(602215),d=e.i(266027),u=e.i(618566),m=e.i(271645),h=e.i(494712),x=e.i(109816),p=e.i(161236);let f={products:[],deals:[],brands:[],categories:[],total:0},g=({cls:e="",variant:g="boxed",panelAlign:b="end"})=>{let y=(0,u.useRouter)(),v=(0,u.usePathname)(),j=(0,u.useSearchParams)(),{retailerId:w,selectedPickupAddressObject:S,setRouteLoader:N,isDefaultHomePage:k,setIsDefaultHomePage:C}=(0,a.useGlobalStore)(),[E,L]=(0,m.useState)(j?.get("search")??""),[P,F]=(0,m.useState)(!1),[M,A]=(0,m.useState)(!1),[$,R]=(0,m.useState)(!1),[V,T]=(0,m.useState)(f),[Z,D]=(0,m.useState)("forYou"),H=(0,m.useRef)(null),B=(0,s.default)(E,600),{recentSearches:z,trendingSearches:I,handleRememberSearch:O,handleRemoveRecent:U,handleMarkTrending:W,handleFetchTrending:q}=(0,c.useElasticSearchHistory)(w),{data:G}=(0,d.useQuery)({queryKey:["searchCMSTwo"],queryFn:async()=>{let e=await (0,n.getData)({url:r.default.cms.searchPageCMSTwo,throwError:!0});return e?.data?.length?e.data[0]:null}}),K=e=>{O(e)},Q=e=>{var t;(0,i.handleDefaultHomePage)(w,k,C),(t=e.startsWith("?")||""===e?(0,o.withStore)(e):e)===v?F(!1):(N(!0),y.push(t)),F(!1)},_=()=>{let e=E.trim();e&&(K(e),Q(`?search=${e}`),L(""))},X=e=>{O(e),L(e),F(!0),H.current?.focus()},Y=e=>{O(e),L(e),F(!0),H.current?.focus()},J=e=>{D(e)},ee=async e=>{if(!e.trim()){T(f),R(!1),A(!1);return}A(!0);try{let t=await (0,n.postData)({url:r.default.product.productServiceElasticSearchV2,body:{search:e,retailerId:w,state:S?.state,limit:10}});if(t?.statusCode===200||t?.statusCode===201){let a=t?.data??f;T(a),(0,c.hasProductHits)(a)&&(O(e),W(e))}else T(f)}catch(e){console.error("Character Search 3.0 failed:",e),T(f)}finally{R(!0),A(!1)}};(0,m.useEffect)(()=>{P&&ee(B)},[B,P]),(0,m.useEffect)(()=>{!P||E.trim()||q()},[P,E,q]);let et=(0,c.hasProductHits)(V),ea="pill"===g,el=E.trim();return(0,t.jsxs)(l.default,{onClickOutside:()=>{F(!1)},className:"relative w-full",children:[(0,t.jsxs)("div",{className:`relative w-full ${e}`,children:[(0,t.jsx)("input",{ref:H,type:"text",value:E,placeholder:"Type here to search products","aria-label":"Search products",onFocus:()=>F(!0),onChange:e=>{L(e.target.value),F(!0),e.target.value.trim()||(R(!1),T(f))},onKeyDown:e=>{"Enter"===e.key&&_()},className:ea?`w-full bg-transparent text-[16px] leading-6 header-font-color outline-none placeholder:text-[16
9px] placeholder:leading-6 placeholder:opacity-50 ${e}`:`w-full rounded-lg border border-gray-300 py-3 pl-3 pr-[80px] text-[16px] leading-6 outline-none header-search-background-color header-search-font-color placeholder:text-[16px] placeholder:leading-6 placeholder:text-gray-500 dark:placeholder:text-[var(--fill-header-search-font-color)] dark:placeholder:opacity-60 ${e}`}),!ea&&(0,t.jsx)("div",{className:"absolute right-1.5 top-1/2 -translate-y-1/2",children:(0,t.jsx)("button",{type:"button",className:"fill-button h-[34px] w-[64px] text-[12px] font-medium leading-[18px] !rounded-lg !mb-0 custom-search-button",onClick:()=>{if(!E.trim()){F(!0),H.current?.focus();return}_()},"aria-label":"Search",children:"Search"})})]}),P&&(0,t.jsx)("div",{className:`header-search-background-color absolute top-full z-[60] mt-1 w-[min(1000px,calc(100vw-2rem))] overflow-hidden rounded-[10px] shadow-lg ${"start"===b?"left-0":"right-0 left-auto"}`,role:"listbox","aria-label":"Search suggestions",children:M?(0,t.jsx)("div",{className:"space-y-3 p-4",children:[void 0,void 0,void 0,void 0].map((e,a)=>(0,t.jsx)("div",{className:"h-5 animate-pulse rounded-md bg-gray-200 dark:bg-gray-700"},`character-v3-skeleton-${a}`))}):el?$&&!et?(0,t.jsx)(x.default,{query:el,onSeeAll:_}):et?(0,t.jsx)(p.default,{data:V,query:el,onSelectProduct:e=>{K(el),Q(`/product/${e}`)},onSeeAll:_}):(0,t.jsx)(h.default,{activeTab:Z,onSelectTab:J,recentSearches:z,trendingSearches:I,onSelectRecent:X,onRemoveRecent:U,onSelectTrending:Y,onBrowse:Q,searchOverlayCms:G}):(0,t.jsx)(h.default,{activeTab:Z,onSelectTab:J,recentSearches:z,trendingSearches:I,onSelectRecent:X,onRemoveRecent:U,onSelectTrending:Y,onBrowse:Q,searchOverlayCms:G})})]})};var b=e.i(358824),y=e.i(999694),v=e.i(922467);let j={products:[],deals:[],brands:[],categories:[],total:0},w=({cls:e="",variant:h="boxed",panelAlign:x="start",panelWidth:p="full"})=>{let f=(0,u.useRouter)(),g=(0,u.usePathname)(),w=(0,u.useSearchParams)(),{retailerId:S,selectedPickupAddressObject:N,setRouteLoader:k,isDefaultHomePage:C,setIsDefaultHomePage:E}=(0,a.useGlobalStore)(),[L,P]=(0,m.useState)(w?.get("search")??""),[F,M]=(0,m.useState)(!1),[A,$]=(0,m.useState)(!1),[R,V]=(0,m.useState)(!1),[T,Z]=(0,m.useState)(j),D=(0,m.useRef)(null),H=(0,s.default)(L,600),{recentSearches:B,trendingSearches:z,handleRememberSearch:I,handleRemoveRecent:O,handleMarkTrending:U,handleFetchTrending:W}=(0,c.useElasticSearchHistory)(S),{data:q}=(0,d.useQuery)({queryKey:["searchPageCms"],queryFn:async()=>{let e=await (0,n.getData)({url:r.default.cms.searchPageCms,throwError:!0});return e?.data?.length?e.data[0]:null}}),G=e=>{I(e)},K=e=>{(0,i.handleDefaultHomePage)(S,C,E),e===g?M(!1):(k(!0),f.push(e)),M(!1)},Q=()=>{let e=L.trim();e&&(G(e),K((0,o.withStore)(`?search=${e}`)),P(""))},_=e=>{I(e),P(e),M(!0),D.current?.focus()},X=e=>{I(e),P(e),M(!0),D.current?.focus()},Y=async e=>{if(!e.trim()){Z(j),V(!1),$(!1);return}$(!0);try{let t=await (0,n.postData)({url:r.default.product.productServiceElasticSearchV2,body:{search:e,retailerId:S,state:N?.state,limit:5}});if(t?.statusCode===200||t?.statusCode===201){let a=t?.data??j;Z(a),(0,c.hasProductHits)(a)&&U(e)}else Z(j)}catch(e){console.error("Elastic Search V2 failed:",e),Z(j)}finally{V(!0),$(!1)}};(0,m.useEffect)(()=>{F&&Y(H)},[H,F]),(0,m.useEffect)(()=>{!F||L.trim()||W()},[F,L,W]);let J=T.products.length>0||T.deals.length>0||T.brands.length>0||T.categories.length>0,ee="pill"===h,et=L.trim(),ea="end"===x,el=`${ea?"right-0 left-auto":"left-0"} ${"sm"===p||ea?"w-full md:w-[400px]":"w-full"}`;return(0,t.jsxs)(l.default,{onClickOutside:()=>{M(!1)},className:"relative w-full",children:[(0,t.jsxs)("div",{className:`relative w-full ${e}`,children:[(0,t.jsx)("input",{ref:D,type:"text",value:L,placeholder:"Type here to search products","aria-label":"Search products",onFocus:()=>M(!0),onChange:e=>{P(e.target.value),M(!0),e.target.value.trim()||(V(!1),Z(j))},onKeyDown:e=>{"Enter"===e.key&&Q()},className:ee?`w-full bg-transparent text-[16px] leading-6 header-font-color outline-none placeholder:text-[16px] placeholder:leading-6 placeholder:opacity-50 ${e}`:`w-full rounded-lg border border-gray-300 py-3 pl-3 pr-[80px] text-[16px] leading-6 outline-none header-search-background-color header-search-font-color placeholder:text-[16
9px] placeholder:leading-6 placeholder:text-gray-500 dark:placeholder:text-[var(--fill-header-search-font-color)] dark:placeholder:opacity-60 ${e}`}),!ee&&(0,t.jsx)("div",{className:"absolute right-1.5 top-1/2 -translate-y-1/2",children:(0,t.jsx)("button",{type:"button",className:"fill-button h-[34px] w-[64px] text-[12px] font-medium leading-[18px] !rounded-lg !mb-0 custom-search-button",onClick:()=>{if(!L.trim()){M(!0),D.current?.focus();return}Q()},"aria-label":"Search",children:"Search"})})]}),F&&(0,t.jsx)("div",{className:`header-search-background-color absolute top-full z-50 mt-1 overflow-hidden rounded-[10px] shadow-lg ${el}`,role:"listbox","aria-label":"Search suggestions",children:A?(0,t.jsx)("div",{className:"space-y-3 p-4",children:[void 0,void 0,void 0,void 0].map((e,a)=>(0,t.jsx)("div",{className:"h-5 animate-pulse rounded-md bg-gray-200 dark:bg-gray-700"},`elastic-v2-skeleton-${a}`))}):et?R&&!J?(0,t.jsx)(y.default,{query:et,total:T.total}):J?(0,t.jsx)(v.default,{data:T,query:et,onSelectProduct:e=>{G(et),K(`/product/${e}`)},onSelectBrand:e=>{G(et),K(`/brands/${e||(0,i.urlSlug)(e)}`)},onSelectCategory:e=>{G(et),K(`/category/${e||(0,i.urlSlug)(e)}`)},onSelectDeal:e=>{G(et),K((0,o.withStore)(`?specialSlug=${e}`))},onSeeAll:Q}):(0,t.jsx)(b.default,{recentSearches:B,trendingSearches:z,onSelectRecent:_,onRemoveRecent:O,onSelectTrending:X,onBrowse:K,searchOverlayCms:q}):(0,t.jsx)(b.default,{recentSearches:B,trendingSearches:z,onSelectRecent:_,onRemoveRecent:O,onSelectTrending:X,onBrowse:K,searchOverlayCms:q})})]})};var S=e.i(317716);e.s(["default",0,({fallback:e=null,cls:l,variant:r,panelAlign:s,panelWidth:n})=>{let i=(0,a.useGlobalStore)(e=>e.searchMenuType);return(0,S.isElasticSearchMenu)(i)?(0,t.jsx)(w,{cls:l,variant:r,panelAlign:s,panelWidth:n}):(0,S.isCharacterSearchV3Menu)(i)?(0,t.jsx)(g,{cls:l,variant:r,panelAlign:s}):(0,t.jsx)(t.Fragment,{children:e})}],154287)},939336,e=>{"use strict";var t=e.i(843476),a=e.i(153846),l=e.i(402902),r=e.i(809991),s=e.i(258288),n=e.i(55144),i=e.i(701973),o=e.i(310160),c=e.i(358824),d=e.i(999694),u=e.i(922467),m=e.i(602215),h=e.i(590961),x=e.i(525209),p=e.i(577854),f=e.i(266027),g=e.i(618566),b=e.i(271645);let y={products:[],deals:[],brands:[],categories:[],total:0},v=({setOpenSearch:e,openSearch:v})=>{let j=(0,g.useRouter)(),w=(0,g.usePathname)(),S=(0,g.useSearchParams)(),{retailerId:N,selectedPickupAddressObject:k,setRouteLoader:C,isDefaultHomePage:E,setIsDefaultHomePage:L}=(0,s.useGlobalStore)(),[P,F]=(0,b.useState)(""),[M,A]=(0,b.useState)(!1),[$,R]=(0,b.useState)(!1),[V,T]=(0,b.useState)(y),Z=(0,b.useRef)(null),D=(0,r.default)(P,600),{recentSearches:H,trendingSearches:B,handleRememberSearch:z,handleRemoveRecent:I,handleMarkTrending:O,handleFetchTrending:U}=(0,m.useElasticSearchHistory)(N),W=P.trim(),{data:q}=(0,f.useQuery)({queryKey:["searchPageCms"],queryFn:async()=>{let e=await (0,n.getData)({url:l.default.cms.searchPageCms,throwError:!0});return e?.data?.length?e.data[0]:null}}),G=()=>{e(!1),F(""),T(y),R(!1)},K=e=>{z(e)},Q=e=>{e===w?G():((0,i.handleDefaultHomePage)(N,E,L),C(!0),G(),j.push(e))},_=()=>{W&&(K(W),Q((0,o.withStore)(`?search=${W}`)))},X=e=>{z(e),F(e),Z.current?.focus()},Y=e=>{z(e),F(e),Z.current?.focus()},J=async e=>{if(!e.trim()){T(y),R(!1),A(!1);return}A(!0);try{let t=await (0,n.postData)({url:l.default.product.productServiceElasticSearchV2,body:{search:e,retailerId:N,state:k?.state,limit:5}});if(t?.statusCode===200||t?.statusCode===201){let a=t?.data??y;T(a),(0,m.hasProductHits)(a)&&O(e)}else T(y)}catch(e){console.error("Elastic Search mobile failed:",e),T(y)}finally{R(!0),A(!1)}};(0,b.useEffect)(()=>{v&&J(D)},[D,v]),(0,b.useEffect)(()=>{!v||P.trim()||U()},[v,P,U]),(0,b.useEffect)(()=>{v&&G()},[w,S]);let ee=V.products.length>0||V.deals.length>0||V.brands.length>0||V.categories.length>0;return(0,t.jsx)(a.default,{open:v,handleClose:G,anchor:"right",classes:"px-0",children:(0,t.jsxs)("div",{className:"flex h-full flex-col header-search-background-color-no-round",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",children:[(0,t.jsx)("button",{type:"button",className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-[10px] header-search-background-color header-search-font-color",onClick:G,"aria-label":"Close search",children:(0,t.jsx)(h.CaretLeft,{size:16})}),(0,t.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(x.MagnifyingGlass,{size:14,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 header-search-font-color opacity-50"}),(0,t.jsx)("input",{ref:Z,type:"text",value:P,placeholder:"Search products...","aria-label":"Search products",onChange:e=>{F(e.target.value),e.target.value.trim()||(R(!1),T(y))},onKeyDown:e=>{"Enter"===e.key&&_()},className:"h-9 w-full rounded-[10px] py-2 pl-9 pr-9 text-[17px] leading-6 outline-none header-search-background-color header-search-font-color placeholder:text-[16
9px] placeholder:leading-6 placeholder:text-[var(--fill-header-search-font-color)] placeholder:opacity-60"}),P?(0,t.jsx)("button",{type:"button",className:"absolute right-2.5 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center header-search-font-color",onClick:()=>{F(""),T(y),R(!1),Z.current?.focus()},"aria-label":"Clear search",children:(0,t.jsx)(p.X,{size:14,className:"opacity-70"})}):null]})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto",children:M?(0,t.jsx)("div",{className:"space-y-3 px-4 py-4",children:[void 0,void 0,void 0,void 0,void 0].map((e,a)=>(0,t.jsx)("div",{className:"h-14 animate-pulse rounded-md bg-gray-200 dark:bg-gray-700"},`elastic-mobile-skeleton-${a}`))}):W?$&&!ee?(0,t.jsx)(d.default,{query:W,total:V.total}):ee?(0,t.jsx)(u.default,{data:V,query:W,layout:"mobile",onSelectProduct:e=>{K(W),Q(`/product/${e}`)},onSelectBrand:e=>{K(W),Q(`/brands/${e||(0,i.urlSlug)(e)}`)},onSelectCategory:e=>{K(W),Q(`/category/${e||(0,i.urlSlug)(e)}`)},onSelectDeal:e=>{K(W),Q((0,o.withStore)(`?specialSlug=${e}`))},onSeeAll:_}):(0,t.jsx)(c.default,{recentSearches:H,trendingSearches:B,onSelectRecent:X,onRemoveRecent:I,onSelectTrending:Y,onBrowse:Q,searchOverlayCms:q}):(0,t.jsx)(c.default,{recentSearches:H,trendingSearches:B,onSelectRecent:X,onRemoveRecent:I,onSelectTrending:Y,onBrowse:Q,searchOverlayCms:q})})]})})};var j=e.i(452689),w=e.i(612980),S=e.i(657688),N=e.i(522016),k=e.i(301575),C=e.i(510997),E=e.i(240415),L=e.i(574724),P=e.i(259997),F=e.i(808340);let M=({setOpenSearch:e,openSearch:l})=>{let r=(0,g.useSearchParams)(),n=(0,g.usePathname)(),{setRouteLoader:c,setIsDefaultHomePage:d,isDefaultHomePage:u,retailerId:m}=(0,s.useGlobalStore)(),h=(0,g.useRouter)(),[x,p]=(0,b.useState)(!1),[f,y]=(0,b.useState)(!1),[v,M]=(0,b.useState)(""),[A,$]=(0,b.useState)([]),[R,V]=(0,b.useState)([]),[T,Z]=(0,b.useState)(0),D=(0,b.useRef)(null),[H,B]=(0,b.useState)(!1),z=(0,P.decryptFromCookies)("provider"),I=(0,F.isProviderShowcase)(z),O=e=>{if(e==n)return!1;c(!0),h.push(e)},U=t=>t!=n||(e(!1),p(!1),M(""),!1),W=t=>{let a=new URLSearchParams(window.location.search).get("search"),l=(0,o.withStore)(`?search=${t}`),r=l===(0,o.withStore)(`?search=${a}`);U(l)&&O(l),r&&(e(!1),p(!1)),M("")};return(0,j.default)(()=>{setTimeout(()=>{l?D.current&&D.current.focus():D.current&&D.current.blur()},2e3)},[l]),(0,b.useEffect)(()=>{l&&(e(!1),p(!1),M(""))},[n,r]),(0,b.useEffect)(()=>{x||p(!0)},[f]),(0,b.useEffect)(()=>{if(v?.length>0){let e=setTimeout(()=>{B(!0)},700);return()=>clearTimeout(e)}B(!1)},[v]),(0,t.jsx)(a.default,{open:l,handleClose:()=>e(!1),anchor:"right",classes:"px-3",children:(0,t.jsxs)("div",{className:" py-5 bg-white h-screen",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 ",children:[(0,t.jsx)(k.ArrowLeft,{className:"text-2xl text-secondary_text cursor-pointer",onClick:()=>{e(!1),p(!1),M("")}}),(0,t.jsx)("div",{className:" w-full",children:(0,t.jsx)(w.default,{setisSearchLoading:y,search:v,setSearch:M,openSugess:p,setSuggestions:$,setOpenSearch:e,setBrands:V,setTotalProducts:Z,setOpen:p,searchInputRef:D,handleRedirectToPath:O,activeLoader:U,suggestions:A,brands:R,totalProducts:T})})]}),x?(0,t.jsx)("div",{className:"p-3 fixed top-20 left-0 right-0 bottom-0 bg-white overflow-y-auto h-full w-full pb-16",children:f?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"w-[100%] bg-white overflow-y-auto overflow-hidden",children:(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)("div",{className:"text-xs cursor-pointer mb-2 text-black hover:text-[#258F67]",children:(0,t.jsx)("div",{className:"w-full",children:[void 0,void 0,void 0,void 0,void 0].map((e,a)=>(0,t.jsx)(E.default,{},a))})})})})}):A?.length>0?(0,t.jsxs)(t.Fragment,{children:[A?.map((e,a)=>(0,t.jsx)("div",{className:"flex items-center pb-2 justify-between mb-3",children:(0,t.jsx)("div",{onClick:()=>{W(e?.brandNameAndProductNameAndCategoryName??"")},className:"text-sm text-[#4B5563] hover:text-primary",dangerouslySetInnerHTML:{__html:e.highlight??""}})},"suggestionsPn-main"+a)),!I&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{}),(0,t.jsx)("div",{className:"mt-0 md:mt-4 p-2",children:R?.length>0?(0,t.jsx)(t.Fragment,{children:R?.map((e,a)=>(0,t.jsx)("p",{className:"text-xs md:text-sm cursor-pointer mb-4 font-semibold text-black hover:text-[#258F67]",onClick:()=>{W(e)},children:e},"sugBrandsPn-main-two"+a))}):(0,t.jsx)(t.Fragment,{})})]}),(0,t.jsx)("hr",{}),(0,t.jsx)("div",{className:"mt-0 md:mt-4 p-2",children:A?.length>0?(0,t.jsx)(t.Fragment,{children:A?.map((a,l)=>(0,t.jsxs)(N.default,{prefetch:!1,href:a?.productSlug?`/product/${a?.productSlug}`:"",className:"flex items-start gap-2 mt-2",onClick:()=>{var t;(0,i.handleDefaultHomePage)(m,u,d),U((t=a?.productSlug)?`/product/${t}`:"")?O(t?`/product/${t}`:""):(e(!1),M(""))},children:[a?.image?(0,t.jsx)(S.default,{src:a?.image||"",alt:"product",width:100,height:100,className:"w-[15%] md:w-[70px] h-[50px] md:h-[70px] border object-contain"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsxs)("div",{className:"w-[85%] md:w-full mb-2",children:[(0,t.jsx)("p",{className:"text-xs md:text-sm cursor-pointer text-black hover:text-[#258F67]",children:a?.productName}),(0,t.jsxs)("p",{className:"text-[10px] md:text-xs text-[#258F67] font-semibold mt-[-2px]",children:["Variants: ",a?.variantsSize]})]})]},"sugProductPn-main-three"+l))}):(0,t.jsx)(t.Fragment,{})}),(0,t.jsx)("div",{className:"flex justify-center bg-green-200 py-2 sticky bottom-0 ",children:(0,t.jsxs)("button",{className:"text-center text-xs font-semibold text-[#258F67] no-u
9nderline hover:underline",onClick:()=>{U((0,o.withStore)("?search="+v))&&O((0,o.withStore)("?search="+v)),e(!1),p(!1),(0,i.handleDefaultHomePage)(m,u,d)},children:["See All ",T," Products"]})}),(0,t.jsx)("br",{}),(0,t.jsx)("br",{}),(0,t.jsx)("br",{}),(0,t.jsx)("br",{}),(0,t.jsx)("br",{})]}):(0,t.jsx)(t.Fragment,{children:v?.length>0?(0,t.jsx)(t.Fragment,{children:H&&(0,t.jsx)(L.default,{})}):(0,t.jsx)(C.default,{})})}):(0,t.jsx)(C.default,{})]})})};var A=e.i(754559),$=e.i(317716);e.s(["default",0,({setOpenSearch:e,openSearch:a,searchPageCms:l})=>{let r=(0,s.useGlobalStore)(e=>e.searchMenuType),n=(0,P.decryptFromCookies)("provider");return(0,F.isProviderShowcase)(n)?(0,t.jsx)(M,{setOpenSearch:e,openSearch:a,searchPageCms:l}):(0,$.isElasticSearchMenu)(r)?(0,t.jsx)(v,{setOpenSearch:e,openSearch:a,searchPageCms:l}):(0,$.isCharacterSearchV3Menu)(r)?(0,t.jsx)(A.default,{setOpenSearch:e,openSearch:a,searchPageCms:l}):null}],939336)},264459,652987,21074,e=>{"use strict";var t=e.i(843476),a=e.i(258288),l=e.i(726027),r=e.i(118613),s=e.i(311738),n=e.i(980401),i=e.i(49006),o=e.i(657688),c=e.i(271645),d=e.i(259997),u=e.i(55144),m=e.i(402902),h=e.i(266027),x=e.i(701973),p=e.i(947513);let f=({sectionData:e,slidesPerView:l})=>{let{retailerId:r,menuType:f,showcaseSelectedStateName:g}=(0,a.useGlobalStore)(),b=e?.checkoutPopupData?.retailerCheckoutPopupData?.find(e=>e?.retailerId===r);async function y(){let t=(0,d.decryptFromCookies)("provider"),a=await (0,u.postData)({url:m.default.productService.filtered,body:{retailerId:r,filter:{slugs:(0,x.pickRetailerHeaderFieldArray)(b?.productSlugs,e?.checkoutPopupData?.productSlugs)||[],isActive:!0,...g&&{states:(0,p.sanitizeArray)([g])||[]}},provider:t,menuType:f,pagination:{offset:0,limit:15}}});return a?.error?[]:a?.menu?.products}let{data:v,isLoading:j,isRefetching:w}=(0,h.useQuery)({queryKey:["get-checkout-offer-carousel-products",r,f,(0,x.pickRetailerHeaderFieldArray)(b?.productSlugs,e?.checkoutPopupData?.productSlugs)],queryFn:()=>y(),refetchOnMount:!0,refetchOnWindowFocus:!1,enabled:!!r&&!!f&&!!(0,x.pickRetailerHeaderFieldArray)(b?.productSlugs,e?.checkoutPopupData?.productSlugs)&&!!(0,x.pickRetailerHeaderFieldArray)(b?.productSlugs,e?.checkoutPopupData?.productSlugs)?.length}),S=c.default.useMemo(()=>(0,x.pickRetailerHeaderFieldArray)(b?.productSlugs,e?.checkoutPopupData?.productSlugs)?.map(e=>v?.find(t=>t.slug===e)).filter(Boolean),[(0,x.pickRetailerHeaderFieldArray)(b?.productSlugs,e?.checkoutPopupData?.productSlugs),v]);return(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"mb-8 md:mb-10 mt-8 md:mt-10",children:(0,t.jsx)("div",{className:"",children:j||w?(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,t.jsx)("div",{className:"h-[360px] md:h-[600px] w-full bg-gray-200 rounded-md"}),(0,t.jsx)("div",{className:"h-[360px] md:h-[600px] w-full bg-gray-200 rounded-md"}),(0,t.jsx)("div",{className:"h-[600px] w-full bg-gray-200 hidden md:block rounded-md"}),(0,t.jsx)("div",{className:"h-[600px] w-full bg-gray-200 hidden md:block rounded-md"})]}):(0,t.jsx)(t.Fragment,{children:v&&v?.length>0?(0,t.jsx)(s.default,{slidesPerView:l,className:"equal-height-slider",children:S?.map((e,a)=>(0,t.jsx)(n.SwiperSlide,{children:(0,t.jsx)("div",{className:"pb-6 w-full",children:(0,t.jsx)(i.default,{productData:e})},a)},"shop-your-fav"+a))}):(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center mt-10",children:[(0,t.jsx)(o.default,{src:"/images/no-order-found.svg",width:150,height:150,className:"mx-auto",alt:"no-product-image"}),(0,t.jsx)("h4",{className:"font-semibold text-lg mt-4",children:"Looks like no product found."})]})})})})})};var g=e.i(505539);let b=({slidesPerView:e})=>{let{retailerId:l,menuType:r,showcaseSelectedStateName:x}=(0,a.useGlobalStore)(),{cartList:f}=(0,g.default)(),b=f?.map(e=>e?.product?.category),y=[...new Set(b?.filter(Boolean))];async function v(){let e=(0,d.decryptFromCookies)("provider"),t=await (0,u.postData)({url:m.default.productService.filtered,body:{retailerId:l,filter:{categories:y,...x&&{states:(0,p.sanitizeArray)([x])||[]}},provider:e,menuType:r,pagination:{offset:0,limit:20}}});return t?.error?[]:t?.menu?.products}let{data:j,isLoading:w,isRefetching:S}=(0,h.useQuery)({queryKey:["get-cart-based-checkout-offer-carousel-products",l,r,y],queryFn:()=>v(),refetchOnMount:!0,refetchOnWindowFocus:!1,enabled:!!l&&!!r&&!!y?.length}),N=c.default.useMemo(()=>
9j?.filter(e=>!f?.some(t=>e?.slug===t?.product?.slug)),[f,j]);return(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"mb-8 md:mb-10 mt-8 md:mt-10",children:(0,t.jsx)("div",{className:"",children:w||S?(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,t.jsx)("div",{className:"h-[360px] md:h-[600px] w-full bg-gray-200 rounded-md"}),(0,t.jsx)("div",{className:"h-[360px] md:h-[600px] w-full bg-gray-200 rounded-md"}),(0,t.jsx)("div",{className:"h-[600px] w-full bg-gray-200 hidden md:block rounded-md"}),(0,t.jsx)("div",{className:"h-[600px] w-full bg-gray-200 hidden md:block rounded-md"})]}):(0,t.jsx)(t.Fragment,{children:j&&j?.length>0?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(s.default,{slidesPerView:e,children:N?.map((e,a)=>(0,t.jsx)(n.SwiperSlide,{children:(0,t.jsx)("div",{className:"pb-6 ",children:(0,t.jsx)(i.default,{productData:e})},a)},"shop-your-fav"+a))})}):(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center mt-10",children:[(0,t.jsx)(o.default,{src:"/images/no-order-found.svg",width:150,height:150,className:"mx-auto",alt:"no-product-image"}),(0,t.jsx)("h4",{className:"font-semibold text-lg mt-4",children:"Looks like no product found."})]})})})})})};e.s(["default",0,({isOpen:e,handleClose:s,handleCheckout:n,setRouteLoader:i,setIsCartSidebarOpen:o})=>{let{commonCMSData:d,storeOpenStatus:u}=(0,a.useGlobalStore)(),m=!!d?.retailerClosePopupCMS?.isTurnOn&&!u,h=d?.checkoutPopupSettingsCMS,[x,p]=(0,c.useState)(4),[g,y]=(0,c.useState)(!1),v=(0,c.useCallback)(e=>{let t;e<=0||(t=e<640?2:4,p(e=>e!==t?t:e))},[]);return(0,c.useEffect)(()=>{y(!0)},[]),(0,c.useEffect)(()=>{if(!g)return;v(window.innerWidth);let e=()=>{v(window.innerWidth)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[g,v]),(0,c.useEffect)(()=>{let t=()=>{e&&s()},a=e=>{e.target.closest("a")&&t()};return window.addEventListener("click",a),window.addEventListener("popstate",t),()=>{window.removeEventListener("click",a),window.removeEventListener("popstate",t)}},[e,s]),(0,t.jsx)(r.default,{open:e,handleClose:s,className:"max-w-[98vw] md:max-w-[70vw] rounded-[12px] p-4 md:p-6 lg:p-8",persistent:!0,backdropClassName:"z-[100]",children:(0,t.jsxs)("div",{className:"flex min-h-0 flex-col",children:[(0,t.jsx)("div",{className:"mb-4 flex shrink-0 items-center justify-between pr-8",children:(0,t.jsx)("h2",{className:"text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900",children:h?.title||"Checkout Offer"})}),(0,t.jsxs)("div",{className:"max-h-[calc(88vh-13rem)] overflow-y-auto md:max-h-[calc(77vh-13rem)]",children:[(0,t.jsx)("p",{className:"text-sm md:text-base text-gray-600",children:h?.description||"Complete your purchase to take advantage of this special offer!"}),h?.enableCartBasedSuggestions?(0,t.jsx)(b,{slidesPerView:x}):(0,t.jsx)(f,{sectionData:{checkoutPopupData:h},slidesPerView:x})]}),(0,t.jsxs)("div",{className:"mt-4 flex shrink-0 items-center justify-center gap-3 border-t border-gray-200 bg-white pt-4 md:justify-end",children:[(0,t.jsx)(l.default,{className:"!px-6 md:!px-8 whitespace-nowrap bg-transparent border border-gray-200 rounded-full outlined-button-hover duration-300",path:"/cart",theme:"gray",onClick:()=>{i(!0),o(!1),s()},children:"View Cart"}),(0,t.jsx)(l.default,{className:"!px-8 whitespace-nowrap",onClick:n,disabled:m,children:"Checkout"})]})]})})}],264459),e.s(["default",0,({enableShowSimilarProductBtn:e,provider:t})=>{let{retailerId:l,menuType:r,showcaseSelectedStateName:s}=(0,a.useGlobalStore)(),[n,i]=(0,c.useState)(!1),[o,d]=(0,c.useState)([]),[h,x]=(0,c.useState)(!1),f=async e=>{let a=e?.category;x(!0);try{let n=await (0,u.postData)({url:m.default.productService.filtered,body:{retailerId:l,filter:{categories:[a],...s&&{states:(0,p.sanitizeArray)([s])||[]}},provider:t,menuType:r,pagination:{offset:0,limit:10}}});if(n?.error)return[];return n?.menu?.products?.filter(t=>t?.id!==e?.id)??[]}catch(e){return console.error("Error fetching similar products:",e),[]}finally{x(!1)}};return{handleShowSimilarProducts:async t=>{e&&(i(!0),d(await f(t)))},similarProducts:o,showSimilarProductsModalOpen:n,setShowSimilarProductsModalOpen:i,isLoading:h}}],652987);
9var y=e.i(655613),v=e.i(688442);let j=()=>(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,t.jsx)(v.Skeleton,{className:"h-[360px] md:h-[600px] w-full"}),(0,t.jsx)(v.Skeleton,{className:"h-[360px] md:h-[600px] w-full"}),(0,t.jsx)(v.Skeleton,{className:"h-[600px] w-full hidden md:block"}),(0,t.jsx)(v.Skeleton,{className:"h-[600px] w-full hidden md:block"})]}),w=({products:e,isLoading:a,slidesPerView:l,isModal:r=!1})=>(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"mb-8 md:mb-10 mt-8 md:mt-10",children:(0,t.jsx)("div",{className:"",children:a?(0,t.jsx)(j,{}):(0,t.jsx)(t.Fragment,{children:e?.length>0?(0,t.jsx)(s.default,{slidesPerView:l,children:e?.map((e,a)=>(0,t.jsx)(n.SwiperSlide,{children:(0,t.jsx)("div",{className:"pb-6 ",children:(0,t.jsx)(i.default,{productData:e,isModal:r})},a)},"shop-your-fav"+a))}):(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center mt-10",children:[(0,t.jsx)(o.default,{src:"/images/no-order-found.svg",width:150,height:150,className:"mx-auto",alt:"no-product-image"}),(0,t.jsx)("h4",{className:"font-semibold text-lg mt-4",children:"Looks like no product found."})]})})})})});var S=e.i(577854),N=e.i(209501);e.s(["default",0,({open:e,handleClose:l,products:r,isLoading:s,slidesPerView:n=4})=>{let{commonCMSData:i}=(0,a.useGlobalStore)(),o=i?.cartProductSectionCmsData,c=o?.similarProductModalTitle??"Similar Products",d=o?.similarProductModalSubtitle??"Explore products similar to what you're looking for",u=(0,N.isMobileViewport)();return(0,t.jsx)(y.Modal,{open:e,handleClose:l,className:"max-w-[98vw] md:max-w-[90vw] !max-h-[85vh] flex flex-col overflow-hidden",children:(0,t.jsxs)("div",{className:"relative p-3 md:p-8 flex flex-col h-full max-h-[85vh] overflow-hidden",children:[(0,t.jsx)("button",{onClick:l,type:"button",className:"absolute top-4 right-4 md:top-6 md:right-6 z-50 inline-flex h-8 w-8 md:h-10 md:w-10 items-center justify-center rounded-full bg-black/70 text-white hover:bg-black transition-colors duration-200","aria-label":"Close modal",children:(0,t.jsx)(S.X,{className:"w-4 h-4 md:w-5 md:h-5",weight:"bold"})}),(0,t.jsxs)("div",{className:"mb-4 md:mb-6 pr-10 md:pr-12 flex-shrink-0",children:[(0,t.jsx)("h2",{className:"text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900",children:c}),(0,t.jsx)("p",{className:"text-sm md:text-base text-gray-600 mt-2",children:d})]}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto -mx-2 px-2",children:(0,t.jsx)(w,{products:r,isLoading:s,slidesPerView:u?2:n,isModal:!0})})]})})}],21074)},446691,e=>{"use strict";var t=e.i(843476),a=e.i(258288);e.s(["default",0,({onClick:e})=>{let{commonCMSData:l}=(0,a.useGlobalStore)(),r=l?.cartProductSectionCmsData?.enableShowSimilarProductBtn,s=l?.cartProductSectionCmsData?.similarProductBtnText??"Find Similar";return r?(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),t.preventDefault(),e?.()},className:" text-xs md:text-sm font-bold text-gray-800 hover:text-gray-900 hover:underline transition-colors duration-200","aria-label":"Show similar products",children:s}):null}])},796323,e=>{"use strict";var t=e.i(843476),a=e.i(688442);e.s(["ProductCardSkeleton",0,()=>(0,t.jsxs)("div",{className:"animate-pulse space-y-4 bg-gray-100",children:[(0,t.jsx)(a.Skeleton,{className:"h-64 rounded bg-gray-300"}),(0,t.jsxs)("div",{className:"space-y-1 flex flex-col items-center",children:[(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-3/4 bg-gray-300"}),(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/2 bg-gray-300"})]}),(0,t.jsxs)("div",{className:"space-y-1 flex flex-col items-center",children:[(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/2 bg-gray-300"}),(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/4 bg-gray-300"})]}),(0,t.jsxs)("div",{className:"space-y-1 flex flex-col items-center",children:[(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/2 bg-gray-300"}),(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/4 bg-gray-300"})]}),(0,t.jsx)(a.Skeleton,{className:"h-10 rounded w-1/4 mx-auto bg-gray-300"}),(0,t.jsxs)("div",{className:"flex gap-x-4 mt-4 justify-center h-max w-full",children:[(0,t.jsx)(a.Skeleton,{className:"size-10 rounded-full bg-gray-300"}),(0,t.jsx)(a.Skeleton,{className:"size-10 rounded-full bg-gray-300"}),(0,t.jsx)(a.Skeleton,{className:"size-10 rounded-full bg-gray-300"})]}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(a.Skeleton,{className:"h-10 rounded w-1/2 bg-gray-300"})})]}
9),"ReviewFormLoading",0,()=>(0,t.jsxs)("div",{className:"grid md:grid-cols-2 2xl:gap-10 gap-5 md:gap-8 animate-pulse",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Skeleton,{className:"h-6 rounded w-3/4"}),(0,t.jsxs)("div",{className:"space-y-4 mt-5",children:[(0,t.jsx)(a.Skeleton,{className:"h-12 rounded w-full"}),(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/2"}),(0,t.jsx)(a.Skeleton,{className:"h-3 rounded w-3/4"})]}),(0,t.jsxs)("div",{className:"space-y-8 mt-5",children:[(0,t.jsx)(a.Skeleton,{className:"h-12 rounded w-full"}),(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/2"}),(0,t.jsx)(a.Skeleton,{className:"h-3 rounded w-3/4"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Skeleton,{className:"h-6 rounded w-3/4"}),(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/2 my-2"}),(0,t.jsxs)("div",{className:"space-y-8 mt-6",children:[(0,t.jsx)(a.Skeleton,{className:"h-12 rounded w-full"}),(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/2"})]}),(0,t.jsxs)("div",{className:"space-y-8 mt-4",children:[(0,t.jsx)(a.Skeleton,{className:"h-12 rounded w-full"}),(0,t.jsx)(a.Skeleton,{className:"h-4 rounded w-1/2"})]}),(0,t.jsx)(a.Skeleton,{className:"h-12 rounded w-full mt-3"}),(0,t.jsx)(a.Skeleton,{className:"h-12 rounded w-full mt-3"}),(0,t.jsx)(a.Skeleton,{className:"h-12 rounded w-full mt-3"}),(0,t.jsx)(a.Skeleton,{className:"h-10 rounded w-1/2 mt-3"})]})]})])}]);
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.