PageSourceSearch

https://shophcc.com/_next/static/immutable/chunks/386ojlc834r0l.js

js shophcc.com collected 2026-09-24 12:43:34 UTC 56,459 bytes, 2 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,971151,e=>{"use strict";e.s(["default",0,function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}])},931067,e=>{"use strict";function t(){return(t=Object.assign.bind()).apply(null,arguments)}e.s(["default",()=>t])},954402,e=>{"use strict";var t=e.i(885963);e.s(["default",0,function(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,(0,t.default)(e,a)}])},915874,e=>{"use strict";e.s(["default",0,function(e,t){if(null==e)return{};var a={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;a[s]=e[s]}return a}])},885963,e=>{"use strict";function t(e,a){return(t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,a)}e.s(["default",()=>t])},955135,e=>{"use strict";var t=e.i(271645),a=e.i(769464);let s=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M84,64A12,12,0,0,1,96,52H216a12,12,0,0,1,0,24H96A12,12,0,0,1,84,64Zm132,52H96a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Zm0,64H96a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM56,52H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Zm0,64H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Zm0,64H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216,64V192H96V64Z",opacity:"0.2"}),t.createElement("path",{d:"M88,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Zm128,56H96a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16Zm0,64H96a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16ZM56,56H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Zm0,64H40a8,8,0,1,0,0,16H56a8,8,0,0,0,0-16Zm0,64H40a8,8,0,1,0,0,16H56a8,8,0,0,0,0-16Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,184H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm120,96H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M90,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H96A6,6,0,0,1,90,64Zm126,58H96a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Zm0,64H96a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12ZM56,58H40a6,6,0,0,0,0,12H56a6,6,0,0,0,0-12Zm0,64H40a6,6,0,0,0,0,12H56a6,6,0,0,0,0-12Zm0,64H40a6,6,0,0,0,0,12H56a6,6,0,0,0,0-12Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M88,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Zm128,56H96a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm0,64H96a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM56,56H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Zm0,64H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Zm0,64H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M92,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H96A4,4,0,0,1,92,64Zm124,60H96a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Zm0,64H96a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8ZM56,60H40a4,4,0,0,0,0,8H56a4,4,0,0,0,0-8Zm0,64H40a4,4,0,0,0,0,8H56a4,4,0,0,0,0-8Zm0,64H40a4,4,0,0,0,0,8H56a4,4,0,0,0,0-8Z"}))]]),l=t.forwardRef((e,l)=>t.createElement(a.default,{ref:l,...e,weights:s}));l.displayName="ListDashesIcon",e.s(["ListDashes",0,l],955135)},829045,646935,e=>{"use strict";var t=e.i(271645),a=e.i(769464);let s=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M100,36H56A20,20,0,0,0,36,56v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,100,36ZM96,96H60V60H96ZM200,36H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,60H160V60h36Zm-96,40H56a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,100,136Zm-4,60H60V160H96Zm104-60H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,200,136Zm-4,60H160V160h36Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M112,56v48a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8h48A8,8,0,0,1,112,56Zm88-8H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V56A8,8,0,0,0,200,48Zm-96,96H56a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,104,144Zm96,0H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,200,144Z",opacity:"0.2"}),t.createElement("path",{d:"M200,136H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48ZM104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M120,56v48a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40h48A16,16,0,0,1,120,56Zm80-16H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm-96,96H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm96,0H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M104,42H56A14,14,0,0,0,42,56v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,104,42Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm-98,34H56a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,104,138Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,200,138Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M104,44H
156A12,12,0,0,0,44,56v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,104,44Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4ZM104,140H56a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,104,140Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,200,140Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Z"}))]]);e.s(["default",0,s],646935);let l=t.forwardRef((e,l)=>t.createElement(a.default,{ref:l,...e,weights:s}));l.displayName="SquaresFourIcon",e.s(["SquaresFour",0,l],829045)},811942,e=>{"use strict";var t=e.i(271645),a=e.i(575108),s=e.i(646935);let l=t.forwardRef((e,l)=>t.createElement(a.default,{ref:l,...e,weights:s.default}));l.displayName="SquaresFourIcon",e.s(["SquaresFourIcon",0,l])},731322,e=>{"use strict";var t=e.i(843476),a=e.i(815330),s=e.i(331991);e.s(["default",0,e=>(0,t.jsxs)("div",{className:`overflow-hidden ${e.className?"mb-0":"mb-1"}`,children:[(0,t.jsxs)("div",{className:`flex justify-between items-center cursor-pointer px-5 py-4 ${e.expended?"bg-gray-200":`${e.className||"bg-gray-100"}`} `,onClick:t=>e.onChange(t,!e.expended),children:[(0,t.jsx)("div",{className:` text-base
2     font-medium ${e.expended?"website-cards-description-color":"website-cards-text-color"}`,children:e.title}),(0,t.jsx)("div",{className:"",children:e.expended?(0,t.jsx)(s.CaretUp,{}):(0,t.jsx)(a.CaretDown,{})})]}),(0,t.jsx)("div",{className:"overflow-y-auto faq-scroll-2 transition-all duration-500 border-b border-b-gray-200 "+(e.expended?"max-h-96 delay-200 faq-scroll-2":"max-h-0"),children:(0,t.jsx)("div",{className:"px-5 py-3 var(--global-body-color) font-normal text-base bg-gray-50",children:e.children})})]})])},585965,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(815330),l=e.i(331991),r=e.i(137963);e.s(["default",0,e=>{let[i,n]=a.default.useState(e.default||!1),c="drawer"===e.variant;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{onClick:()=>n(!i),className:(0,r.cn)("my-1 flex justify-between items-center cursor-pointer",e.titleClass),children:[(0,t.jsxs)("p",{className:(0,r.cn)("flex items-center gap-2 global-heading-color",c?"text-sm font-semibold uppercase tracking-wide":"text-sm font-semibold"),children:[e.titleIcon&&(0,t.jsx)("span",{className:"text-xl global-heading-color",children:e.titleIcon&&e.titleIcon}),e.title,(e.selectionCount??0)>0&&(0,t.jsxs)("span",{className:"text-inherit",children:[" (",e.selectionCount,")"]})]}),(0,t.jsx)("div",{className:"flex justify-end items-center gap-1",children:(0,t.jsxs)("div",{className:"flex gap-x-3 mr-1",children:[e?.funcText&&(0,t.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),e?.func?.()},className:"border-none bg-transparent text-sm font-medium underline underline-offset-2 global-body-color",children:e?.funcText}),(0,t.jsx)("button",{type:"button",className:"border-none bg-transparent text-gray-600",children:e.icons?i?e.icons.close:e.icons.open:i?(0,t.jsx)(l.CaretUp,{className:"text-base global-body-color"}):(0,t.jsx)(s.CaretDown,{className:"text-base global-body-color"})})]})})]}),(0,t.jsx)("div",{className:(0,r.cn)("overflow-y-auto sb max-h-0 duration-300 mr-2.5",{"max-h-[15rem]":i&&!e.expandFull,"max-h-none":i&&e.expandFull},e.contentClass),children:e.children})]})}])},779586,e=>{"use strict";e.i(247167);var t=e.i(843476),a=e.i(258288),s=e.i(701973),l=e.i(843066),r=e.i(743905),i=e.i(618566),n=e.i(271645),c=e.i(402902),o=e.i(199854),d=e.i(718159),u=e.i(596924),h=e.i(465078),m=e.i(731322),g=e.i(872434),p=e.i(908049),x=e.i(526586),f=e.i(150814),y=e.i(918269),b=e.i(553951),j=e.i(375677),v=e.i(299106),w=e.i(266027),C=e.i(55144),S=e.i(704751),N=e.i(681873),A=e.i(137963),k=e.i(808340),H=e.i(310160);let L=[{direction:"DESC",key:"POPULAR",label:"Popular"},{direction:"ASC",key:"BRAND",label:"Brand"},{direction:"DESC",key:"RECENTLY_ADDED",label:"Recently Added"},{direction:"ASC",key:"POTENCY",label:"THC Low-High"},{direction:"DESC",key:"POTENCY",label:"THC High-Low"},{direction:"ASC",key:"PRICE",label:"Price Low-High"},{direction:"DESC",key:"PRICE",label:"Price High-Low"},{direction:"ASC",key:"NAME",label:"Name A-Z"},{direction:"DESC",key:"NAME",label:"Name Z-A"}];e.s(["default",0,function({showProductSkeleton:e,filterResult:E,queryValues:T,setQueryValues:P,subCategoryList:F,weightList:Z,cmsData:D,provider:V,brandList:I,todaysSpecialsValue:O,isCategoryPage:R=!1,selectedCategory:M={},isCategoryPageBuilder:B=!1}){let G=D?.data?.shopDealsSectionCmsData,W=D?.data?.shopPageFilterSettings,[$,_]=(0,n.use
2State)(!1),[U,Y]=(0,n.useState)(0),{isMobile:q}=(0,o.default)(),[z,Q]=(0,n.useState)(!1),[K,X]=(0,n.useState)(!0),J=(0,i.usePathname)(),{token:ee,user:et}=(0,v.useUserData)(),{processMultipleUrl:ea,processUrl:es,processClearMultipleUrl:el,addMultipleElementToQueryParam:er,handleRouteChange:ei,handleSort:en,handleSubmitFilter:ec}=(0,j.default)(),eo=()=>{_(!$)},ed=(0,i.useSearchParams)(),{customProductCategoryData:eu,todaySpecialsValue:eh,customFilterListData:em,retailerId:eg,setFilterHistory:ep,isShopSettingsLoaded:ex,setIsShopSettingsLoaded:ef,active:ey,setActive:eb,isEnableSpecialDeals:ej,setIsEnableSpecialDeals:ev,setIsEnabledReward:ew,isEnabledReward:eC,isEnableCtaBanner:eS,setIsEnableCtaBanner:eN,setIsEnableSearchMenuRow:eA,specialOfferLoader:ek,isOnlyDealsProduct:eH,setIsOnlyDealsProduct:eL,retailerDetails:eE}=(0,a.useGlobalStore)(),eT=(0,k.isEcommerceOrPortfolioProvider)(V??""),eP=(0,k.isEcommerceProvider)(V??""),eF=(0,k.isPortfolioProvider)(V??"");function eZ(){P(e=>({...e,...(0,H.getDefaultShopFilterState)()})),ep([]),eT?ei(`/shop/${eP?"e-commerce":"showcase"}`):ei("/shop")}async function eD(e){let t=e.selected+1;Y(e.selected),ei(er(ea([]),[["pageNo",t]])),(0,s.scrollToTop)()}(0,n.useEffect)(()=>{let e=ed?.get("pageNo");Y(e?parseInt(e)-1:0)},[E]);let eV=L.map(e=>({value:e?.value,label:e?.label,direction:e?.direction,key:e?.key})),[eI,eO]=(0,n.useState)("0"),eR=async e=>{eL(e?.target.checked),e?.target.checked===!0?ei("/specials"):ei("/shop")},eM=async()=>{try{let e=await fetch(`https://herbology.buddyapi.neutrixsystems.com/api/v1/${c.default.cms.shopPageSettingsCMS}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(ef(!0),!e?.ok)throw Error("Network response was not ok.");let t=await e.json();if(t.data&&t.data.length>0){let e=t.data[0];ev(e.isEnableSpecialDeals),eN(e.isEnableCtaBanner),ew(e?.isRewardPoints),eb(!1===e.isGridLayout?2:1),eA(e.isEnableSearchMenuRow)}}catch(e){console.error(e)}},{data:eB,isLoading:eG,isFetching:eW}=(0,w.useQuery)({queryKey:[eg,et?.phone],queryFn:()=>(0,C.authFetch)({url:`${c.default.alpineIQ.walletInfo}?retailerId=${eg}&phoneNumber=${(0,s.removeUSCountryCode)(et?.phone)}`,token:ee,throwError:!0}),refetchOnMount:!0,refetchOnWindowFocus:!1,retry:2,enabled:!!eg&&!!et?.phone&&!!eE?.isAIQEnabled&&eC});(0,n.useEffect)(()=>{J?.includes("specials")||eL(!1)},[J]),(0,n.useEffect)(()=>{ex||eM()},[]),(0,n.useEffect)(()=>{if((J?.startsWith("/category")||J?.startsWith("/brand")||J?.startsWith("/specials"))&&!q){let e=document.getElementById("category-products");e&&e.scrollIntoView({behavior:"smooth"})}},[T.categories,J]);let e$=(0,n.useMemo)(()=>{if(!J)return[];let e=J.indexOf("/category/");if(-1===e)return[];let t=J.slice(e+10);return t?decodeURIComponent(t).split("+").map(e=>e.replace(/-/g,"").trim()).filter(Boolean):[]},[J]),e_=(0,n.useMemo)(()=>(0,A.transformCategoryArray)(e$),[e$]),eU=W?.isProductFilterEnabled??!0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"_container md:py-6 ",children:[!eF&&(0,t.jsx)(t.Fragment,{children:ej&&!B&&(0,t.jsx)(t.Fragment,{children:ek?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-start gap-4 mb-6 md:mb-0 mb-4",children:[(0,t.jsx)(u.default,{height:40,width:70}),(0,t.jsx)(u.default,{height:40,width:70}),(0,t.jsx)(u.default,{height:40,width:70}),(0,t.jsx)(u.default,{height:40,width:70})]}),(0,t.jsx)("p",{className:"bg-gray-200 h-32 md:h-60 animate-pulse mt-4"})]}):(0,t.jsx)(r.default,{todaySpecialsValue:eh,customProductCategoryData:eu,sectionTitle:G?.title,buttonText:G?.buttontext,buttonLink:G?.buttonlink,tagName:R?N.HeadingType.h2:N.HeadingType.h1})})}),eS&&!B&&(0,t.jsx)(d.default,{title:"Shop"}),!eF&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.default,{isShow:D?.data?.shopDealsSectionCmsData?.isShowRetailerBannerOnShopPage,title:D?.data?.shopDealsSectionCmsData?.retailerBannerShopTitle,page:"shopPage",titleClass:"global-heading-color"}),eE?.isAIQEnabled&&eC&&!B&&(0,t.jsx)(t.Fragment,{children:eG||eW?(0,t.jsx)("div",{className:"w-full h-[180px] bg-gray-300 animate-pulse rounded-sm"}):(0,t.jsx)(t.Fragment,{children:et?._id&&ee&&(0,t.jsx)(S.default,{loyaltyData:eB,isCartOrShopPage:!0})})})]}),eU?(0,t.jsx)(t.Fragment,{children:W?.isShopPageFilterTwo?(0,t.jsx)(x.default,{active:ey,setActive:eb,customFilterListData:em,filterData:T,handleClearAll:eZ,subCategoryList:F,weightList:Z,brandList:I,provider:V,todaySpecialsValue:O,adCategories:e_,filterResult:E,currentSelectedPage:U,showProductSkeleton:e,children:(0,t.jsx)(g.default,{showProductSkeleton:e,filterResult:E,active:ey,handlePageClick:eD,currentSelectedPage:U,selectedFirstWeight:T?.weights?.[0],selectedCategory:M||{}})}):W?.isShopPageFilterThree?(0,t.jsx)(f.default,{active:ey,setActive:eb,isSortByOpen:z,setIsSortByOpen:Q,options:eV,handleSort:en,toggleDrawer:eo,customFilterListData:em,setQueryValues:P,handleClearAll:eZ,subCategoryList:F,weightList:Z,filterData:T,provider:V,brandList:I,todaysSpecialsValue:O,adCategories:e_,children:(0,t.jsx)(g.default,{showProductSkeleton:e,filterResult:E,active:ey,handlePageClick:eD,currentSelectedPage:U,selectedFirstWeight:T?.weights?.[0],selectedCategory:M||{}})}):W?.isShopPageFilterFour?(0,t.jsx)(y.default,{customFilterListData:em,filterData:T,adCategories:e_,children:(0,t.jsx)(g.default,{showProductSkeleton:e,filterResult:E,active:ey,handlePageClick:eD,currentSelectedPage:U,selectedFirstWeight:T?.weights?.[0],selectedCategory:M||{}})}):W?.isShopPageFilterFive?(0,t.jsx)(b.default,{customFilterListData:em,filterData:T,children:(0,t.jsx)(g.default,{showProductSkeleton:e,filterResult:E,active:ey,handlePageClick:eD,currentSelectedPage:U,selectedFirstWeight:T?.weights?.[0],selectedCategory:M||{}})}):(0,t.jsx)(p.default,{active:ey,setActive:eb,handleOptionChange:eR,isOnlyDealsProduct:eH,isSortByOpen:z,setIsSortByOpen:Q,options:eV,handleSort:en,toggleDrawer:eo,customFilterListData:em,queryValues:T,setQueryValues:P,handleClearAll:eZ,subCategoryList:F,weightList:Z,brandList:I,provider:V,todaysSpecialsValue:O,adCategories:e_,isFilterVisible:K,setIsFilterVisible:X,filterResult:E,currentSelectedPage:U,showProductSkeleton:e,children:(0,t.jsx)(g.default,{showProductSkeleton:e,filterResult:E,active:ey,handlePageClick:eD,currentSelectedPage:U,selectedFirstWeight:T?.weights?.[0],selectedCategory:M||{},desktopGridCols:K?4:5})})}):(0,t.jsx)("div",{children:(0,t.jsx)(g.default,{showProductSkeleton:e,filterResult:E,active:ey,handlePageClick:eD,currentSelectedPage:U,selectedFirstWeight:T?.weights?.[0],selectedCategory:M||{}})}),D?.data?.shopDealsSectionCmsData?.faq?.length>0&&D?.data?.shopDealsSectionCmsData?.isFaqEnabled&&(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)("div",{className:"md:py-10 py-5",children:(0,t.jsxs)(t.Fragment,{children:[D?.data?.shopDealsSectionCmsData?.faqTitle&&(0,t.jsx)("h2",{className:"text-xl lg:text-2xl font-semibold global-heading-color text-center mb-5",children:D?.data?.shopDealsSectionCmsData?.faqTitle}),(0,t.jsx)("div",{className:"md:w-[70%] w-full mx-auto",children:(0,t.jsx)("div",{className:"border-t border-x border-gray-200",children:D?.data?.shopDealsSectionCmsData?.faq?.map((e,a)=>{let s;return e.isPublish&&(0,t.jsx)(m.default,{title:e?.question,expended:eI===a.toString(),onChange:(s=a.toString(),(e,t)=>{eO(!!t&&s)}),index:a,className:"!bg-white",children:(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:e?.answer}}
2)},a)})})})]})})})]}),$&&(0,t.jsx)(l.default,{isOpen:$,onClose:eo,customFilterListData:em,filterData:T,setQueryValues:P,handleSubmitFilter:ec,handleClearAll:eZ,processMultipleUrl:ea,processClearMultipleUrl:el,addMultipleElementToQueryParam:er,processUrl:es,subCategoryList:F,weightList:Z,brandList:I,provider:V,todaysSpecialsValue:O,options:eV})]})}])},811134,e=>{"use strict";var t=e.i(843476),a=e.i(603670),s=e.i(258288);e.s(["default",0,function({category:e=[]}){let{commonCMSData:l}=(0,s.useGlobalStore)();return l?.shopFilterSurfsideBannerCMS?.isEnabled===!1?null:(0,t.jsx)("div",{className:"my-2",children:(0,t.jsx)(a.default,{zoneId:"k7UbY",category:e,pageSize:1,className:"",mode:["tablet","desktop"]})})}])},872434,e=>{"use strict";var t=e.i(843476),a=e.i(49006),s=e.i(234234),l=e.i(301697),r=e.i(430494),i=e.i(657688),n=e.i(618566);let c=()=>{let e=(0,n.useSearchParams)();return(0,t.jsx)("div",{children:e?.get("search")?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"w-[300px] mx-auto md:hidden",children:(0,t.jsx)("p",{className:"text-center font-medium my-5 text-base",children:"Looks like we couldn't find anything. Try refining your search."})}),(0,t.jsxs)("div",{className:"hidden md:flex flex-col justify-center items-center mt-10",children:[(0,t.jsx)(i.default,{src:"/images/no-order-found.svg",width:150,height:150,className:"mx-auto",alt:"no-product-image"}),(0,t.jsx)("p",{className:"font-semibold text-lg mt-6 global-body-color",children:"Looks like no product found."})]})]})}):(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center mt-10",children:[(0,t.jsx)(i.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-6 global-body-color",children:"Looks like no product found."})]})})};var o=e.i(137963);e.s(["default",0,function({showProductSkeleton:e,filterResult:i,active:n,handlePageClick:d,currentSelectedPage:u,selectedFirstWeight:h,selectedCategory:m={},selectedSpecial:g={},desktopGridCols:p=3,isFilterVisible:x=!0}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(t.Fragment,{children:e?(0,t.jsx)(l.ShopPageSkeleton,{active:n,desktopGridCols:p}):(0,t.jsx)("div",{children:i?.productList?.length>0?(0,t.jsx)(t.Fragment,{children:1===n?(0,t.jsx)("div",{className:(0,o.cn)("grid grid-cols-2 gap-3 md:gap-4 mb-5 mt-5 md:mt-0 items-stretch",5===p?"md:grid-cols-5":x?"md:grid-cols-3 2xl:grid-cols-4":"md:grid-cols-4 2xl:grid-cols-5"),children:i?.productList.map((e,s)=>(0,t.jsx)(a.default,{productData:e,isListView:1!==n,selectedFirstWeight:h,selectedCategory:m||{},selectedSpecial:g||{},index:s},"product-list-view"+s))}):(0,t.jsx)("div",{className:"mb-5 mt-5 md:mt-0 grid grid-cols-1 gap-3 md:gap-4 items-stretch",children:i?.productList.map((e,s)=>(0,t.jsx)(a.default,{productData:e,isListView:1!==n,selectedFirstWeight:h,selectedCategory:m||{},selectedSpecial:g||{}},"product-grid-view"+s))})}):(0,t.jsx)(c,{})})}),i?.productList?.length>0&&(0,t.jsx)(s.default,{currentPage:u,pageCount:Number.isInteger(i?.pageCount)&&i.pageCount>0?i.pageCount:1,productCount:i?.productCount??0,pageSize:i?.pageSize??r.SHOP_PRODUCTS_PAGE_SIZE_MOBILE,onPageChange:d})]})}],872434)},918269,553951,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(451163),l=e.i(836133),r=e.i(375677),i=e.i(811134),n=e.i(618566),c=e.i(310160);e.s(["default",0,function({children:e,customFilterListData:o,filterData:d,adCategories:u}){let{secondaryFilterList:h,setSecondaryFilterList:m,handleSubmitFilter:g}
2=(0,r.default)(),p=(0,n.useSearchParams)(),x=p?.get("strainTypes")??"";return(0,a.useEffect)(()=>{let e=(0,c.parseStrainTypesFromUrl)(x),t=e.length>0?(0,c.normalizeSelectedFilterOptions)(e,o?.strainType):(0,c.normalizeSelectedFilterOptions)(d?.strainTypes,o?.strainType);m(e=>({...e,...d,strainTypes:t}))},[d,x,o?.strainType]),(0,t.jsx)("div",{className:"md:grid gap-3",id:"category-products",children:(0,t.jsxs)("div",{className:"col-span-3",children:[(0,t.jsx)("div",{className:"_container md:block hidden",children:(0,t.jsx)("div",{className:"flex items-center gap-6 py-6 justify-end",children:(0,t.jsx)(s.default,{filterName:"Strain type",filterOpt:o?.strainType,alignment:"right-0",secondaryFilterList:h,setSecondaryFilterList:m,handleSubmitFilter:g,filterData:d})})}),(0,t.jsx)("div",{className:"_container md:hidden block",children:(0,t.jsx)("div",{className:"flex items-center justify-end gap-3 py-3 flex-wrap",children:(0,t.jsx)(l.default,{filterName:"Strain type",filterOpt:o?.strainType,alignment:"",secondaryFilterList:h,setSecondaryFilterList:m,handleSubmitFilter:g,filterData:d})})}),(0,t.jsx)(i.default,{category:u}),e]})})}],918269);var o=e.i(258288),d=e.i(375609);e.s(["default",0,function({children:e,filterData:s}){let{secondaryFilterList:l,setSecondaryFilterList:n,handleSubmitFilter:c,displayCategoryName:u}=(0,r.default)(),{customProductCategoryData:h}=(0,o.useGlobalStore)();(0,a.useEffect)(()=>{s&&"object"==typeof s&&n(e=>({...e,...s}))},[s]);let m=(0,a.useMemo)(()=>(h||[]).filter(e=>"ALL CATEGORY"!==(e?.categoryName||e)),[h]),g=l.categories.find(e=>"ALL CATEGORY"!==e)??null,p=e=>!!g&&(g===e||g.replace(/-/g,"_").toUpperCase()===e.replace(/-/g,"_").toUpperCase());return(0,t.jsx)("div",{className:"md:grid gap-3",id:"category-products",children:(0,t.jsxs)("div",{className:"col-span-3",children:[(0,t.jsx)("div",{className:"py-6 bg-transparent px-4 md:px-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-x-4 min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium shrink-0 text-[var(--fill-header-font-color)]",children:"Show:"}),(0,t.jsx)(d.default,{color:"transparent",className:"sb",style:{width:"100%",height:"30px"},children:(0,t.jsx)("div",{className:"flex-1 min-w-0 max-w-full",children:(0,t.jsx)("ul",{className:"flex items-center gap-x-6 flex-nowrap w-max pr-4",children:m.map(e=>{let a=e?.categoryName||e,s=p(a);return(0,t.jsx)("li",{className:"shrink-0",children:(0,t.jsx)("button",{type:"button",onClick:()=>(e=>{if(p(e))return;let t={...l,categories:[e],subcategories:[],weights:[]};n(t),c(t)})(a),className:`text-sm font-medium transition-colors cursor-pointer bg-transparent border-0 p-0 whitespace-nowrap ${s?"text-[var(--fill-button-background-color)]":"text-[var(--fill-header-font-color)] hover:text-[var(--fill-button-background-color)]"}`,children:u(e)})},a)})})})})]})}),(0,t.jsx)(i.default,{category:h}),e]})})}],553951)},759604,663362,e=>{"use strict";var t=e.i(843476),a=e.i(64722),s=e.i(763963),l=e.i(411087),r=e.i(618566),i=e.i(271645),n=e.i(815330),c=e.i(331991);e.s(["default",0,({filterName:e,filterOpt:o,alignment:d,selectedSort:u,setSelectedSort:h})=>{let m=(0,r.useRouter)(),[g,p]=(0,i.useState)(!1),[x,f]=(0,i.useState)("Popular"),y=(0,i.useRef)(null),{handleSort:b}=(0,l.default)(),j=async e=>{let t=e.target.value;f(t),h(t);let a=b(t);m.push(a),p(!1)};return(0,i.useEffect)(()=>{let e=e=>{y.current&&!y.current.contains(e.target)&&p(!1)};return g?document.addEventListener("mousedown",e):document.removeEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[g]),(0,i.useEffect)(()=>{u&&f(u)},[u]),(0,t.jsxs)("div",{className:"relative",ref:y,children:[(0,t.jsxs)("button",{onClick:()=>{p(!g)},className:`px-4 py-2 text-sm font-medium outlined-button-hover rounded-full flex items-center gap-1 text-nowrap ${g?"border border-teal-800 text-teal-800":"border border-gray-200"}`,children:[(0,t.jsxs)("span",{children:[e," ",x]}),g?(0,t.jsx)(c.CaretUp,{fontWeight:"300"}):(0,t.jsx)(n.CaretDown,{fontWeight:"300"})]}),(0,t.jsx)(a.default,{onClickOutside:()=>p(!1),children:g&&(0,t.jsx)("div",{className:`absolute z-20 w-[220px] mt-2 bg-white border shadow-sm rounded-lg ${d}`,children:(0,t.jsx)("div",{className:"flex flex-col justify-between h-full",children:(0,t.jsx)("div",{className:"",children:(0,t.jsx)("div",{className:"max-h-[320px] overflow-y-auto p-4",children:(0,t.jsx)("div",{className:"flex items-start flex-col gap-2",children:o.map(e=>(0,t.jsx)("div",{className:"flex items-start gap-2 py-1",children:(0,t.jsx)(s.default,{name:"filterOption",value:e,onCh
2ange:e=>j(e),checked:x===e,label:e,labelClassName:"text-sm font-normal line-clamp-1 website-cards-text-color"})},e))})})})})})})]})}],759604),e.s(["default",0,({filterName:e,filterOpt:s,alignment:o,selectedSort:d,setSelectedSort:u})=>{let h=(0,r.useRouter)(),[m,g]=(0,i.useState)(!1),[p,x]=(0,i.useState)("Popular"),f=(0,i.useRef)(null),{handleSort:y}=(0,l.default)(),b=async e=>{let t=e.target.value;x(t),u(t);let a=y(t);h.push(a),g(!1)};return(0,i.useEffect)(()=>{d&&x(d)},[d]),(0,t.jsxs)("div",{className:"relative",ref:f,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{g(!m)},className:"flex items-center gap-1.5 cursor-pointer text-nowrap",children:[(0,t.jsxs)("span",{className:"text-xs font-normal uppercase text-gray-400 tracking-wide",children:[e,":"]}),(0,t.jsx)("span",{className:"text-sm font-medium global-body-color",children:p}),m?(0,t.jsx)(c.CaretUp,{size:14,className:"global-body-color"}):(0,t.jsx)(n.CaretDown,{size:14,className:"global-body-color"})]}),(0,t.jsx)(a.default,{onClickOutside:()=>g(!1),children:m&&(0,t.jsx)("div",{className:`absolute z-20 max-h-[210px] w-[220px] mt-2 bg-white border shadow-sm rounded-lg ${o}`,children:(0,t.jsx)("div",{className:"flex flex-col justify-between h-full",children:(0,t.jsx)("div",{className:"",children:(0,t.jsx)("div",{className:"max-h-[200px] overflow-y-auto p-4",children:(0,t.jsx)("div",{className:"flex items-start flex-col gap-2",children:s.map(e=>(0,t.jsx)("div",{className:"flex items-start gap-2 py-1",children:(0,t.jsxs)("label",{className:"w-max relative flex gap-2 items-center cursor-pointer",children:[(0,t.jsx)("input",{type:"radio",name:"filterOption",value:e,onChange:e=>b(e),id:"sortBy",checked:p===e,className:"peer relative h-5 w-5 appearance-none rounded-full transition-all bg-gray-100 border checked:border-4 checked:border-[#34A203] checked:bg-[#fff] cursor-pointer"}),(0,t.jsx)("span",{className:"text-sm text-gray-600 font-normal line-clamp-1",children:e})]})},e))})})})})})})]})}],663362)},451163,411087,899346,836133,e=>{"use strict";var t=e.i(843476),a=e.i(701973),s=e.i(375677),l=e.i(310160),r=e.i(258288),i=e.i(430494),n=e.i(137963);let c=()=>{let{addMultipleElementToQueryParam:e,processMultipleUrl:t}=(0,s.default)(),{retailerId:c,brandList:o,todaySpecialsValue:d}=(0,r.useGlobalStore)();async function u({brandIdsSlugs:e,categories:t,setTempTodaySpecialsValue:a}){let s=Array.isArray(t)&&t.length>0&&!t.includes("ALL CATEGORY"),r=Array.isArray(e)&&e.length>0,i=(0,n.getBrandMatchingIdsBySlugs)({parentArray:o,slugArray:e}),h=[];!s&&!r||!r&&t.includes("ALL CATEGORY")?a(d):(s&&!r?h=await (0,l.getSpecialsWithBrandsAndCategories)({retailerId:c,brandIds:[],categoryIds:t}):s&&i.length?h=await (0,l.getSpecialsWithBrandsAndCategories)({retailerId:c,brandIds:i,categoryIds:t}):!s&&i.length&&(h=await (0,l.getSpecialsWithBrandsAndCategories)({retailerId:c,brandIds:i,categoryIds:[]})),a((0,n.filterByMatchingSpecialId)({parentItems:d,childItems:h})))}return{handleTodaySpecialChange:function(e,t,a){let s=e?.target?.value||e;if("all"==s)return void a(t?.dailyDealsValue.includes("all")?e=>({...e,dailyDealsValue:[]}):e=>({...e,dailyDealsValue:["all"]}));if(t?.dailyDealsValue.includes("all")){let e=(d||[]).map(e=>e?.urlSlug).filter(e=>e!==s);a(t=>({...t,dailyDealsValue:e}))}else{let e=[...t?.dailyDealsValue.filter(e=>"all"!=e)];e.includes(s)?e.splice(e.indexOf(s),1):e.push(s),a(t=>({...t,dailyDealsValue:e}))}},handleClearSpecial:function(e,t,a,s){e(e=>{let l={...e,dailyDealsValue:[]};return s&&t?.dailyDealsValue&&a(l),l})},handleCategoryChange:async function e(e,t,a,s,r,i,h,m,g){try{let p=e?.target?.value||e;if("ALL CATEGORY"!=p){let e;t?.categories.includes("ALL CATEGORY")?e=(g||[]).map(e=>e?.categoryName||e).filter(e=>e?.toUpperCase()!=="ALL CATEGORY"&&e?.toLowerCase()!==p?.toLowerCase()):(e=[...t?.categories.filter(e=>"ALL CATEGORY"!=e)]).includes(p)?e.splice(e.indexOf(p),1):e.push(p),a(t=>({...t,categories:e})),s(!0);let u=(0,n.getBrandMatchingIdsBySlugs)({parentArray:o,slugArray:t?.brandIds}),x=await (0,l.getSubCategoryAndWeightList)(c,e,u);s(!1),r(x?.subCategoryList||[]),i(x?.weightList||[]),h(x?.brandList||[]);let f=(0,n.filterByMatchingSpecialId)({parentItems:d,childItems:x?.todaysSpecials});m(f)}else{let e=t?.categories.includes("ALL CATEGORY"),p=(g||[]).filter(e=>(e?.categoryName||e)?.toUpperCase()!=="ALL CATEGORY"),x=p.length>0&&p.every(e=>t?.categories.includes(e?.categoryName||e));if(e||x)a(e=>({...e,categories:[],subcategories:[],weights:[]})),r([]),i([]),h(o),await u({brandIdsSlugs:t?.brandIds,categories:[],setTempTodaySpecialsValue:m});else{let e=(g||[]).map(e=>e?.categoryName||e);a(t=>({...t,categories:["ALL CATEGORY",...e],subcategories:[],weights:[]})),s(!0);let u=(0,n.getBrandMatchingIdsBySlugs)({parentArray:o,slugArray:t?.brandIds}),p=await (0,l.getSubCategoryAndWeightList)(c,e,u);s(!1),r(p?.subCategoryList||[]),i(p?.weightList||[]),h(p?.brandList||[]);let x=(0,n.filterByMatchingSpecialId)({parentItems:d,childItems:p?.todaysSpecials});m(x)}}}catch(e){console.log(e)}},handleClearCategory:async function e(e,t,a,s,l,r,i,n){t(t=>{let a={...t,categories:[],subcategories:[],weights:[]};return r&&e?.categories?.length>0&&l(a),a}),a([]),s([]),i(o),await u({brandIdsSlugs:e?.brandIds||[],categories:[],setTempTodaySpecialsValue:n})},handleSubCategoryChange:async function e(e,t,a,s){try{let l=e?.target?.value||e;if("ALL SUBCATEGORY"!=l){let e=[...t?.subcategories.filter(e=>"ALL SUBCATEGORY"!=e)];e.includes(l)?e.splice(e.indexOf(l),1):e.push(l),a(t=>({...t,subcategories:e}))}else{let e=t?.subcategories.includes("ALL SUBCATEGORY")&&t?.subcategories.length>1,l=(s||[]).filter(e=>e?.toUpperCase()!=="ALL SUBCATEGORY"),r=l.length>0&&l.every(e=>t?.subcategories.includes(e));a(e||r?e=>({...e,subcategories:[]}):e=>({...e,subcategories:["ALL SUBCATEGORY",...l]}))}}catch(e){console.log(e);return}},handleClearSubCategory:function(e,t,a,s){e(e=>{let l={...e,subcategories:[]};return s&&t?.subcategories?.length>0&&a(l),l})},handleWeightChange:async function e(e,t,a,s){try{let l=e?.target?.value||e;if("ALL WEIGHT"!=l){let e=[...t?.weights.filter(e=>"ALL WEIGHT"!=e)];e.includes(l)?e.splice(e.indexOf(l),1):e.push(l),a(t=>({...t,weights:e}))}else{let e=t?.weights.includes("ALL WEIGHT")&&t?.weights.length>1,l=(s||[]).filter(e=>e?.toUpperCase()!=="ALL WEIGHT"),r=l.length>0&&l.every(e=>t?.weights.includes(e));a(e||r?e=>({...e,weights:[]}):e=>({...e,weights:["ALL WEIGHT",...l]}))}}catch(e){console.log(e);return}},handleClearWeights:function(e,t,a,s){e(e=>{let l={...e,weights:[]};return s&&t?.weights?.length>0&&a(l),l})},handleBrandChange:async function e(e,t,a,s){try{let l,r=e.target.value,i=t?.brandIds?.includes("all")?[r]:((l=[...t?.brandIds.filter(e=>"all"!==e)]).includes(r)?l.splice(l.indexOf(r),1):l.push(r),l);a(e=>({...e,brandIds:i})),await u({brandIdsSlugs:i,categories:t?.categories||[],setTempTodaySpecialsValue:s})}catch(e){console.log(e);return}},handleBrandAllChange:async function e(e,t,a,s,l){a(t?.brandIds?.includes("all")?e=>({...e,brandIds:[]}):e=>({...e,brandIds:["all"]})),await u({brandIdsSlugs:[],categories:t?.categories||[],setTempTodaySpecialsValue:l})},handleClearBrand:async function e(e,t,a,s,l){e(e=>{let l={...e,brandIds:[]};return s&&t?.brandIds?.length>0&&a(l),l}),await u({brandIdsSlugs:[],categories:t?.categories||[],setTempTodaySpecialsValue:l})},handleEffcetChange:async function e(e,t,a){let s=e?.target?.value||e,l=[...t?.effects];l.includes(s)?l.splice(l.indexOf(s),1):l.push(s),a(e=>({...e,effects:l}))}
2,handleTagChange:async function e(e,t,a){let s=e?.target?.value||e,l=[...t?.productTag];l.includes(s)?l.splice(l.indexOf(s),1):l.push(s),a(e=>({...e,productTag:l}))},handleClearEffects:function(e,t,a,s){e(e=>{let l={...e,effects:[]};return s&&t?.effects?.length>0&&a(l),l})},handleClearProductTag:function(e,t,a,s){e(e=>{let l={...e,productTag:[]};return s&&t?.productTag?.length>0&&a(l),l})},handleStrainChange:async function e(e,t,a){let s=e?.target?.value||e,l=[...t?.strainTypes||[]],r=l.findIndex(e=>e?.toLowerCase()===s?.toLowerCase());r>=0?l.splice(r,1):l.push(s),a(e=>({...e,strainTypes:l}))},handleStrainAllChange:function(e,t,a,s){a(t?.strainTypes?.includes("all")?e=>({...e,strainTypes:[]}):e=>({...e,strainTypes:["all",...s]}))},handleClearStrainType:function(e,t,a,s){e(e=>{let l={...e,strainTypes:[]};return s&&t?.strainTypes?.length>0&&a(l),l})},handlePotencyThcChange:async function e(e,t){t([...e])},handlePotencyThcDrag:async function e(e,t){let a=[...e];a.length>0&&t(e=>({...e,potencyThcValue:[a[0],a[1]]}))},handlePotencyCbdChange:function(e,t){t([...e])},handlePotencyCbdDrag:async function e(e,t){let a=[...e];a.length>0&&t(e=>({...e,potencyCbdValue:[a[0],a[1]]}))},handleClearPotency:function(e){e(e=>({...e,potencyThcValue:[0,100],potencyCbdValue:[0,100]}))},handleSort:function(s){return e(t(),[["sortBy",(0,a.urlSlug)(s)]])},handlePriceChange:async function e(e,t){t([...e])},handlePriceDrag:async function e(e,t){let a=[...e];a.length>0&&t(e=>({...e,price:[a[0],a[1]]}))},handleClearPrice:function(e,t,a,s){e(e=>{let t={...e,price:[0,i.PRICEMAX]};return s&&a(t),t})},handleStateChange:async function e(e,t,a){let s=e?.target?.value||e,l=[...t?.states||[]];l.includes(s)?l.splice(l.indexOf(s),1):l.push(s),a(e=>({...e,states:l}))},handleClearStates:function(e,t,a,s){e(e=>{let l={...e,states:[]};return s&&t?.states?.length>0&&a(l),l})}}};e.s(["default",0,c],411087);var o=e.i(271645),d=e.i(815330),u=e.i(331991),h=e.i(201796),m=e.i(525209),g=e.i(259997),p=e.i(808340);function x(){let[e,t]=(0,o.useState)(!1),[a,s]=(0,o.useState)(!1),[l,r]=(0,o.useState)(!1),i=(0,o.useCallback)(()=>{r(!1),s(!0),t(!0)},[]),n=(0,o.useCallback)(()=>{t(!1)},[]);return(0,o.useLayoutEffect)(()=>{if(!e||!a)return;let t=requestAnimationFrame(()=>{r(!0)});return()=>cancelAnimationFrame(t)},[e,a]),(0,o.useEffect)(()=>{if(!e){r(!1);let e=setTimeout(()=>s(!1),500);return()=>clearTimeout(e)}},[e]),{isOpen:e,mounted:a,slideIn:l,openDrawer:i,closeDrawer:n,setIsOpen:t}}e.s(["default",0,({filterName:e,filterOpt:s,alignment:l,secondaryFilterList:r,setSecondaryFilterList:i,handleSubmitFilter:n,filterData:x})=>{let[f,y]=(0,o.useState)(!1),[b,j]=(0,o.useState)(""),v=(0,o.useRef)(null),{handleStrainChange:w,handleStrainAllChange:C,handleClearStrainType:S}=c(),N=(0,g.decryptFromCookies)("provider");return(0,o.useEffect)(()=>{let e=e=>{v.current&&!v.current.contains(e.target)&&y(!1)};return f?document.addEventListener("mousedown",e):document.removeEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[f]),(0,t.jsxs)("div",{className:"relative",ref:v,children:[(0,t.jsxs)("button",{onClick:()=>{y(!f)},className:`px-4 py-2 text-sm font-medium ${(0,p.isProviderShowcase)(N)?"bg-[var(--product-card-strain-badge-bg-color)] border-2 border-white text-[var(--product-card-strain-badge-color)]":"outlined-button-hover"} rounded-full flex items-center gap-1 ${f||r?.strainTypes?.length>0?"border border-teal-800 ":"border border-gray-200"}`,children:[(0,t.jsx)("span",{children:e}),r?.strainTypes?.length>0?(0,t.jsx)("p",{className:"fill-button py-1 px-1.5 rounded-full min-w-5 h-5 flex items-center justify-center text-xs font-light",children:r?.strainTypes?.filter(e=>"all"!==e)?.length||0}):f?(0,t.jsx)(u.CaretUp,{fontWeight:"300"}):(0,t.jsx)(d.CaretDown,{fontWeight:"300"})]}),f&&(0,t.jsx)("div",{className:`absolute pt-4 z-20  w-[305px] mt-2 website-cards-bg-color border shadow-sm rounded-lg ${l}`,children:(0,t.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)("div",{className:"px-4 flex items-center justify-between mb-4",children:(0,t.jsx)("h3",{className:"text-base font-medium website-cards-text-color",children:e})}),(0,t.jsxs)("div",{className:"relative w-full px-4",children:[(0,t.jsx)("input",{type:"text",value:b,onChange:e=>{j(e.target.value)},placeholder:"Search Strain",className:"w-full px-5 py-2 pr-8 text-sm text-gray-500 font-normal border border-gray-300 rounded-full focus:outline-none focus:ring-1 focus:ring-teal-800"}),(0,t.jsx)(m.MagnifyingGlass,{className:"absolute top-1/2 right-6 -translate-y-1/2"})]}),(0,t.jsxs)("div",{className:"max-h-[320px] overflow-y-auto mt-4 px-4",children:[(0,t.jsx)("div",{className:"flex gap-2 items-center pb-4",children:(0,t.jsxs)("label",{className:"w-max relative flex items-center cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:r?.strainTypes?.includes("all"),value:"all",onChange:e=>C(e,r,i,s),className:"peer relative h-5 w-5 appearance-none rounded transition-all border-2 website-cards-border-color checked:border-[var(--primary-background-color)] checked:bg-[var(--primary-background-color)] cursor-pointer"}),(0,t.jsx)("span",{className:"absolute left-1 text-white transition-opacity opacity-0 peer-checked:opacity-100",children:(0,t.jsx)(h.Check,{fontSize:"12px"})}),(0,t.jsx)("span",{className:"text-xs font-medium ml-2 website-cards-text-color",children:"All Strains"})]})}),s.filter(e=>e?.toLowerCase().includes(b?.toLowerCase())).map((e,s)=>(0,t.jsx)("div",{className:"flex gap-2 items-center pb-4",children:(0,t.jsxs)("label",{className:"w-max relative flex items-center cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",value:e,checked:r?.strainTypes?.some(t=>t?.toLowerCase()===e?.toLowerCase()),onChange:e=>
2{w(e,r,i)},className:"peer relative h-5 w-5 appearance-none rounded transition-all border-2 website-cards-border-color checked:border-[var(--primary-background-color)] checked:bg-[var(--primary-background-color)] cursor-pointer"}),(0,t.jsx)("span",{className:"absolute left-1 text-white transition-opacity opacity-0 peer-checked:opacity-100",children:(0,t.jsx)(h.Check,{fontSize:"12px"})}),(0,t.jsx)("span",{className:"text-xs font-medium ml-2 website-cards-text-color",children:(0,a.makeTitleCase)(e)})]})},"strain-filter"+s))]})]}),(0,t.jsxs)("div",{className:"p-4 flex items-center justify-between border-t border-t-gray-200",children:[(0,t.jsx)("button",{disabled:!(r?.strainTypes?.length>0),onClick:()=>{S(i,x,n,!0)},className:"text-sm font-medium primary-text disabled:opacity-50 disabled:cursor-not-allowed",children:"Clear Filter"}),(0,t.jsx)("button",{onClick:()=>{n(),y(!1)},className:"text-sm font-semibold fill-button py-[6px] px-4 rounded-full",children:"Show Products"})]})]})})]})}],451163),e.s(["useMobileFilterDrawerTransition",0,x],899346);var f=e.i(577854);e.s(["default",0,({filterName:e,filterOpt:s,secondaryFilterList:l,setSecondaryFilterList:r,handleSubmitFilter:i,filterData:n})=>{let{isOpen:g,mounted:p,slideIn:y,openDrawer:b,closeDrawer:j}=x(),[v,w]=(0,o.useState)(""),{handleStrainChange:C,handleStrainAllChange:S,handleClearStrainType:N}=c();return(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("button",{onClick:b,className:"px-3 py-2 text-sm font-medium outlined-button-hover rounded-full flex items-center gap-1 border-2 border-white",children:[e,l?.strainTypes?.length>0?(0,t.jsx)("p",{className:"min-w-5 h-5 py-1 px-1.5 fill-button rounded-full flex items-center justify-center text-xs font-light",children:l?.strainTypes?.filter(e=>"all"!==e)?.length||0}):g?(0,t.jsx)(u.CaretUp,{fontWeight:"300"}):(0,t.jsx)(d.CaretDown,{fontWeight:"300"})]}),p&&(0,t.jsx)("div",{className:`fixed inset-0 flex items-end justify-center z-[60] transition-opacity duration-500 ${y?"bg-black bg-opacity-50":"bg-black bg-opacity-0"}`,children:(0,t.jsxs)("div",{className:`w-full max-h-[466px] bg-white pt-4 rounded-t-xl flex flex-col items-start justify-between shadow-lg transition-transform duration-500 ease-in-out transform ${y?"translate-y-0":"translate-y-full"}`,children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-6 w-full border-b pb-4",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-center flex-1 website-cards-text-color",children:e}),(0,t.jsx)("button",{onClick:j,className:"website-cards-text-color",children:(0,t.jsx)(f.X,{size:24})})]}),(0,t.jsxs)("div",{className:"relative w-full px-6 my-3",children:[(0,t.jsx)("input",{type:"text",value:v,onChange:e=>{w(e.target.value)},placeholder:"Search Strain",className:"w-full px-5 py-2 pr-8 text-sm text-gray-500 font-normal border border-gray-300 rounded-full focus:outline-none focus:ring-1 focus:ring-teal-800"}),(0,t.jsx)(m.MagnifyingGlass,{className:"absolute top-1/2 right-8 -translate-y-1/2"})]}),(0,t.jsxs)("div",{className:"overflow-y-auto px-6 w-full pb-2",children:[(0,t.jsxs)("label",{className:"w-max relative flex mb-2 gap-2 items-center cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:l?.strainTypes?.includes("all"),value:"all",onChange:e=>S(e,l,r,s),className:"peer relative h-5 w-5 appearance-none rounded transition-all border-2 checked:border-[#34A203] checked:bg-[#34A203] cursor-pointer"}),(0,t.jsx)("span",{className:"absolute left-1 text-white transition-opacity opacity-0 peer-checked:opacity-100",children:(0,t.jsx)(h.Check,{fontSize:"12px"})}),(0,t.jsx)("span",{className:"text-sm text-gray-800 font-normal",children:"All Strains"})]}),s.filter(e=>e?.toLowerCase().includes(v?.toLowerCase())).map((e,s)=>(0,t.jsxs)("label",{className:"w-max relative flex mb-2 gap-2 items-center cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",value:e,checked:l?.strainTypes?.some(t=>t?.toLowerCase()===e?.toLowerCase()),onChange:e=>{C(e,l,r)},className:"peer relative h-5 w-5 appearance-none rounded transition-all border-2 checked:border-[#34A203] checked:bg-[#34A203] cursor-pointer"}),(0,t.jsx)("span",{className:"absolute left-1 text-white transition-opacity opacity-0 peer-checked:opacity-100",children:(0,t.jsx)(h.Check,{fontSize:"12px"})}),(0,t.jsx)("span",{className:"text-sm text-gray-800 font-normal",children:(0,a.makeTitleCase)(e)})]},"strain-filter"+s))]}),(0,t.jsxs)("div",{className:"flex justify-between px-6 py-4 w-full",children:[(0,t.jsx)("button",{disabled:!(l?.strainTypes?.length>0),onClick:()=>{N(r,n,i,!0)},className:"text-sm primary-text hover:underline disabled:opacity-50 disabled:cursor-not-allowed",children:"Clear Filter"}),(0,t.jsx)("button",{onClick:()=>{i(),j()},className:"text-xs font-medium fill-button py-[6px] px-3 rounded-full",children:"Show Products"})]})]})})]})}],836133)},301697,e=>{"use strict";var t=e.i(843476),a=e.i(536547),s=e.i(688442);let l=()=>(0,t.jsxs)(s.Skeleton,{className:"w-full px-3 md:px-5 py-3 border border-gray-200 relative overflow-hidden mb-3 grid grid-cols-12 items-center gap-5",children:[(0,t.jsx)(s.Skeleton,{className:"w-full h-[140px] md:h-[200px] bg-gray-300 rounded-lg col-span-5"}),(0,t.jsxs)("div",{className:"space-y-3 w-full col-span-7 md:col-span-5",children:[(0,t.jsx)(s.Skeleton,{className:"h-3 mb-1 mt-0 w-full bg-gray-300 rounded-lg"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Skeleton,{className:"h-2 mb-1 w-[80%] bg-gray-300 rounded-lg"}),(0,t.jsx)(s.Skeleton,{className:"h-2  mb-1 w-[75%] bg-gray-300 rounded-lg"}),(0,t.jsx)(s.Skeleton,{className:"h-2 mb-1 w-[73%] bg-gray-300 rounded-lg"}),(0,t.jsx)(s.Skeleton,{className:"h-2 mb-1 w-[60%] bg-gray-300 rounded-lg"})]}),(0,t.jsx)(s.Skeleton,{className:"h-6 w-[100px] bg-gray-300 rounded-full p-2 flex justify-center items-center md:hidden"})]}),(0,t.jsx)(s.Skeleton,{className:"h-8 w-full rounded-full bg-gray-300 col-span-2 hidden md:block"})]});e.s(["ShopPageSkeleton",0,({active:e,desktopGridCols:s=3})=>(0,t.jsx)(t.Fragment,{children:1===e?(0,t.jsx)("div",{className:`grid grid-cols-2 gap-1 md:gap-3 mb-5 mt-5 md:mt-0 ${5===s?"md:grid-cols-5":"md:grid-cols-4"}`,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,t.jsx)(a.LoadingSkeleton,{},"product-skeleton"+e))}):(0,t.jsx)(t.Fragment,{children:[1,2,3,4,5,6].map(e=>(0,t.jsx)(l,{},"product-skeleton-list"+e))})})],301697)},564784,e=>{"use strict";var t=e.i(271645);e.s(["useFilterPanelWheelChain",0,function(e=!0){let a=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let t=a.current;if(!e||!t)return;let s=(e,t)=>t>0?e.scrollTop+e.clientHeight<e.scrollHeight-1:e.scrollTop>0,l=e=>{if(e.ctrlKey||0===e.deltaY)return;let a=e.deltaMode===WheelEvent.DOM_DELTA_LINE?16*e.deltaY:e.deltaY,l=null,r=e.target instanceof HTMLElement?e.target:null;for(;r;){let{overflowY:e}=window.getComputedStyle(r);if(("auto"===e||"scroll"===e)&&s(r,a)){l=r;break}if(r===t)break;r=r.parentElement}e.preventDefault(),l?l.scrollTop+=a:window.scrollBy({top:a})};return t.addEventListener("wheel",l,{passive:!1}),()=>t.removeEventListener("wheel",l)},[e]),a}])},482239,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(755621),s=s,l=e.i(510512),r=e.i(55144),i=e.i(402902),n=e.i(258288),c=e.i(681873),o=e.i(199854),d=e.i(311738),u=e.i(980401),h=e.i(49
2006),m=e.i(54513),g=e.i(618566);function p(e,t){if(!t||0===t.length)return e;let a=t.find(t=>t?.urlSlug===e);return a?.brandName||e}e.s(["SearchRecommendedSort",0,function(){let{client:e,isReady:x,error:f,isEnable:y}=(0,l.useJaneDM)(),{retailerId:b,menuType:j,janeStoreId:v,isEnableSearchMenuRow:w,orderType:C,brandList:S}=(0,n.useGlobalStore)(),[N,A]=(0,a.useState)([]),[k,H]=(0,a.useState)([]),[L,E]=(0,a.useState)(!1),T=(0,o.default)().isMobile,P=(0,g.usePathname)(),F=(0,g.useSearchParams)(),Z=F?.get("search")??"",D=F?.get("sortBy"),V=(0,a.useRef)("");return((0,a.useEffect)(()=>{if(!x||!e||!v||!b||!w)return;A([]),H([]);let t=!1;return async function(){try{if(E(!0),!e)return void console.log("client not initialized");let a=[],l=P?function(e,t){let a=e?.match(/^\/category\/(.+)$/);if(a)return a[1].split("+").map(e=>`kind:${e}`).join(" OR ");let s=e?.match(/^\/shop\/[^/]+\/brand\/(.+)$/);if(s)return s[1].split("+").map(e=>`brand:"${p(e,t)}"`).join(" OR ")}(P,S):"";l&&a.push(l);let n=F?.get("specialSlug");"all"===n&&a.push("applicable_special_types:product");let c=P?.match(/^\/category\/(.+)$/);if(c&&null!=v){let t=c[1].split("+"),a=t.slice().sort().join(",");a&&a!==V.current&&(V.current=a,e?.sendSessionEvent({events:t.map(e=>({type:"filteredCategory",category:e,storeId:v}))}))}let o=F?.getAll("brandId");if(o&&o.length>0){let e=o.flatMap(e=>e.split("+")),t=e.map(e=>`brand:"${p(e,S)}"`).join(" OR ");a.push(e.length>1?`${t}`:t)}let d="price-low-high"===D?s.j.PriceGramAsc:"price-high-low"===D?s.j.PriceGramDesc:"potency-low-high"===D?s.j.ThcPotencyAsc:"potency-high-low"===D?s.j.ThcPotencyDesc:s.j.Recommendation,u=await e.fetchRecommendedSort({storeId:v,searchAttributes:["product_id","name","image_url","price","pos_product_lookup"],searchQuery:Z,searchFilter:a.length>0?a.join(" AND "):void 0,searchSort:d,maxProducts:16,disableAds:!1});t||A(u?.products??[]);let h=u?.products?.flatMap(e=>{let t=function(e){if(!e||"object"!=typeof e||Array.isArray(e))return[];let t=[];for(let a of Object.values(e))"string"==typeof a&&a.length>0&&t.push(a);return t}(e?.attributes?.pos_product_lookup),a=e?.attributes?.product_id;return t.length>0?t.map(e=>({posId:e,id:a})):[{posId:void 0,id:a}]})??[];if(h.length>0){let e=await (0,r.postData)({url:i.default.productService.janeDMProductMatch,body:{retailerId:b,menuType:j,productInfo:h,pagination:{offset:0,limit:h.length}}});e?.menu?.products?t||H(e?.menu?.products??[]):console.log(e?.message||"Failed to fetch search recommended matching products")}}catch(e){console.error(e),t||console.log("Could not fetch search recommended sort")}finally{t||E(!1)}}(),()=>{t=!0}},[e,x,v,b,j,Z,D,P,w,C]),y&&v&&w&&!f)?L?(0,t.jsx)(function(){return(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 _container",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===k.length?null:(0,t.jsxs)("div",{className:"pb-2 rounded-xl my-4 _container ",children:[(0,t.jsx)(c.default,{type:c.HeadingType.h2,className:"text-base mb-5 font-bold md:text-2xl text-black",children:Z?`Recommended For "${Z}"`:"Recommended For You"}),(0,t.jsx)(d.default,{slidesPerView:T?2:4,children:k?.map((a,s)=>{let l=a?.product?.id,r=N.find(e=>e.attributes?.product_id===a?.janeProductId);return(0,t.jsx)(u.SwiperSlide,{children:(0,t.jsx)("div",{className:"pb-4 mb-2","data-product-id":l,children:(0,t.jsx)(m.InView,{onChange:e=>{e&&r?.impress?.()},children:(0,t.jsx)(h.default,{productData:a?.product,onClick:()=>{r&&r?.click?.()},onAddToCart:()=>{r&&(r?.click?.({isAddToCart:!0}),e?.sendSessionEvent({events:[{type:"clickedAddToCart",productId:Number(r?.attributes?.product_id),storeId:v}]}))},isSurfside:!0,isSponsored:r?.isSponsored})})},s)},"jane-dm-recommended-sort-slider"+s)})})]}):null}],482239)},852617,e=>{"use strict";var t=e.i(843476);e.s(["default",0,()=>(0,t.jsx)("div",{className:"flex justify-start items-center gap-2 overflow-hidden p-2 my-1",children:(0,t.jsxs)("div",{className:"max-w-sm py-2 shadow animate-pulse",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"w-[24px] h-[24px] me-3 bg-gray-200"}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"h-[20px] bg-gray-200 rounded-lg dark:bg-gray-700 w-[180px]"})})]}),(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"w-[24px] h-[24px] me-3 bg-gray-200"}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"h-[20px] bg-gray-200 rounded-lg dark:bg-gray-700 w-[180px]"})})]}),(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"w-[24px] h-[24px] me-3 bg-gray-200"}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"h-[20px] bg-gray-200 rounded-lg dark:bg-gray-700 w-[180px]"})})]}),(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"w-[24px] h-[24px] me-3 bg-gray-200"}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"h-[20px] bg-gray-200 rounded-lg dark:bg-gray-700 w-[180px]"})})]}),(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"w-[24px] h-[24px] me-3 bg-gray-200"}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"h-[20px] bg-gray-200 rounded-lg dark:bg-gray-700 w-[180px]"})})]})]})})])},743905,e=>{"use strict";var t=e.i(843476),a=e.i(311738),s=e.i(199854),l=e.i(258288),r=e.i(618566),i=e.i(271645),n=e.i(980401),c=e.i(610111),o=e.i(817503),d=e.i(55144),u=e.i(402902),h=e.i(266027),m=e.i(375677),g=e.i(851579),p=e.i(284438),x=e.i(259997),f=e.i(489219);e.s(["default",0,({sectionTitle:e,buttonText:y,buttonLink:b,tagName:j})=>{let v=(0,s.default)().isMobile,w=(0,r.usePathname)(),{retailerId:C}=(0,l.useGlobalStore)(),{getCategoryNameFromCategoryList:S}=(0,m.default)(),[N,A]=(0,i.useState)(""),k=["FLOWER","EDIBLES","CONCENTRATES","PRE_ROLLS","VAPORIZERS","TINCTURES","TOPICALS","CBD","CLONES","ACCESSORIES","APPAREL"],H=(0,x.decryptFromCo
2okies)("provider");async function L(){try{let e=await (0,d.getData)({url:u.default.specialWiseUniqueCategory+`?retailerId=${C}&provider=${H}`}),t=e&&e?.data&&e?.data?.length?e?.data:[];return t.sort((e,t)=>k.indexOf(e)-k.indexOf(t)),A(t[0]),t}catch(e){return console.error("Error fetching page schema:",e),{getResponse:[]}}}let{data:E,isFetching:T,isLoading:P}=(0,h.useQuery)({queryFn:async()=>C&&await L()||[],queryKey:[`specials-wise-unique-category-${H}`],enabled:!!C,refetchOnMount:"always"}),{data:F,isLoading:Z,isFetched:D,isRefetching:V}=(0,h.useQuery)({queryKey:["category-wise-specials",C,N,H],queryFn:async()=>{if(!C||!N)return[];let e=await (0,d.getData)({url:u.default.categoryWiseSpecials+`?retailerId=${C}&category=${N}&provider=${H}`});return e?.specials||[]},enabled:!!C&&!!N,refetchOnMount:"always"});return(0,t.jsxs)("div",{className:`max-lg:mb-4 ${w?.match(/^\/category\/.*/)?"mt-5 md:mt-0":""}`,children:[(0,t.jsx)(c.default,{title:e||"Today’s Deals",button:y,link:b,tagName:j,headingClass:"global-heading-color",buttonClass:"global-body-color"}),T||P?(0,t.jsx)(a.default,{slidesPerView:v?2:6,children:[...Array(9)].map((e,a)=>(0,t.jsx)(n.SwiperSlide,{children:(0,t.jsx)("div",{className:"pb-6 mt-5",children:(0,t.jsx)(o.TagLoadingSkeleton,{})})},"category-deals"+a))}):(0,t.jsx)(t.Fragment,{children:E&&E?.length>0?(0,t.jsx)("div",{className:"py-3",children:(0,t.jsx)(a.default,{slidesPerView:v?2:6,children:E?.map((e,a)=>(0,t.jsx)(n.SwiperSlide,{children:(0,t.jsx)("div",{className:"pb-6",onClick:()=>{A(e)},children:(0,t.jsx)(o.Tag,{text:S(e)+" Deals",image:"",categoryName:N,category:e})})},"category-deals"+a))})}):(0,t.jsx)("p",{className:"text-center text-sm global-body-color",children:"No deals found."})}),(0,t.jsx)(t.Fragment,{children:Z||V?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"hidden xl:grid xl:grid-cols-4 gap-2 pb-6 mt-3",children:[1,2,3,4].map(e=>(0,t.jsx)(p.DealsCardLoadingSkeleton,{},e))}),(0,t.jsx)("div",{className:"hidden md:grid grid-cols-3 xl:hidden gap-2 pb-6 mt-3",children:[1,2,3].map(e=>(0,t.jsx)(p.DealsCardLoadingSkeleton,{},e))}),(0,t.jsx)("div",{className:"block md:hidden",children:(0,t.jsx)(p.DealsCardLoadingSkeleton,{})})]}):(0,t.jsx)(t.Fragment,{children:D&&(0,t.jsx)(t.Fragment,{children:F&&F?.length>0?(0,t.jsx)("div",{className:"max-lg:mt-5",children:(0,t.jsx)(a.default,{slidesPerView:v?1.2:4,children:F?.map((e,a)=>(0,t.jsx)(n.SwiperSlide,{children:(0,t.jsx)("div",{className:"pb-6",children:(0,t.jsx)(g.default,{special:{...e,categoryName:(0,f.urlSlug)(N||"")},categoryName:N,enableHeading:!1})})},"today-deals"+a))})}):(0,t.jsx)("p",{className:"text-center text-sm",children:"No deals found."})})})})]})}])}]);

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.