PageSourceSearch

https://trapstars.co/_next/static/immutable/chunks/054f_amy2x1ta.js

js trapstars.co collected 2026-10-08 21:19:54 UTC 161,344 bytes, 132 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,239932,283373,397247,e=>{"use strict";var t=e.i(843476),s=e.i(258288),l=e.i(137963),i=e.i(61150),a=e.i(525209),r=e.i(577854);e.s(["default",0,({searchInput:e,handleSearch:n,setSearchInput:d,isSidebar:c=!1,getDeliveryAddressList:o,onEmptyInput:x,searchZipInput:m="",handleSearchZip:p})=>{let{commonCMSData:u}=(0,s.useGlobalStore)(),h=u?.stateSelectionSettingsCMS?.enableZipCodeSearch??!1,g=u?.stateSelectionSettingsCMS?.enableSuggestedAddress??!1;return(0,t.jsxs)("div",{className:(0,l.cn)(!c&&h?"grid grid-cols-1 md:grid-cols-2 gap-2 md:pr-5 mb-3":c&&!h?"mb-6":c&&h?"grid grid-cols-1 gap-2 mb-4":"mb-3 md:pr-5"),children:[h&&g&&(0,t.jsx)(i.default,{onPlaceSelected:e=>o(e),inputContainerClassName:"flex justify-center item-center 2xl:mb-0 mb-0 ",isRightPosition:!0,placeholder:"Search by ZIP Code",className:"bg-gray-50",isResetButton:!0,onEmptyInput:x}),h&&!g&&(0,t.jsxs)("div",{className:"relative flex items-center",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:p,placeholder:"Search by ZIP Code",className:"py-2 pl-8 pr-8 outline-none rounded-full border border-gray-200 focus:border-gray-500 focus:border w-full bg-gray-50"}),(0,t.jsx)("div",{className:"absolute inset-y-0 flex items-center pr-3 pointer-events-none left-3 text-gray-500",children:(0,t.jsx)(a.MagnifyingGlass,{})}),m&&(0,t.jsx)("button",{className:"absolute inset-y-0 flex items-center pr-3 right-4",onClick:()=>{p?.({target:{value:""}}),x?.()},type:"button","aria-label":"Clear search",children:(0,t.jsx)(r.X,{})})]}),(0,t.jsxs)("div",{className:"sticky top-0 bg-white flex items-center",children:[(0,t.jsx)("input",{type:"text",value:e,onChange:n,placeholder:"Search by store name",className:"py-2 px-8 outline-none !rounded-full border border-gray-200 header-search-background-color header-search-font-color w-full"}),(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none header-search-font-color",children:(0,t.jsx)(a.MagnifyingGlass,{})}),e&&(0,t.jsx)("div",{className:"absolute inset-y-0 right-8 flex items-center pl-3 cursor-pointer w-fit z-50",onClick:()=>d(""),children:(0,t.jsx)(r.X,{})})]})]})}],239932);var n=e.i(271645),d=e.i(809991),c=e.i(389222),o=e.i(701973);let x=/^\d{5}(-\d{4})?$/;e.s(["default",0,({allRetailer:e,fulfillmentKey:t})=>{let l,{commonCMSData:i,retailerId:a,retailerLoader:r}
1=(0,s.useGlobalStore)(),m=(0,n.useRef)(null),[p,u]=(0,n.useState)(""),[h,g]=(0,n.useState)(""),[f,y]=(0,n.useState)(e||[]),[j,b]=(0,n.useState)(!1),[v,N]=(0,n.useState)(!1),{loading:C,retailerList:w,setSkeletonHoldSearch:S,setSearch:k,setInputValue:M,handleGetUserLocation:R,setUserLocation:T}=(0,c.useGoogleMapLocation)({deliveryMethod:t}),E=i?.stateSelectionSettingsCMS?.enableStateSelector,A=i?.stateSelectionSettingsCMS?.enableZipCodeSearch,D=i?.stateSelectionSettingsCMS?.enableSuggestedAddress??!1,{geocode:L}=(l=(0,n.useRef)(null),{geocode:(0,n.useCallback)(async e=>{let t=e.trim();if(!t)return null;try{await (window.google?.maps?.Geocoder?Promise.resolve():new Promise((e,t)=>{if(!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')){let e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDNZNcFMbPISZ--df8RNoX9V5kzSX7_dkI",e.async=!0,e.defer=!0,document.head.appendChild(e)}let s=0,l=window.setInterval(()=>{s+=1,window.google?.maps?.Geocoder?(window.clearInterval(l),e()):s>100&&(window.clearInterval(l),t(Error("Google Maps failed to load")))},100)}))}catch{return null}return l.current||(l.current=new window.google.maps.Geocoder),new Promise(e=>{l.current.geocode({address:t},(t,s)=>{let l=t?.[0]?.geometry?.location;"OK"===s&&l?e({lat:l.lat(),lng:l.lng()}):e(null)})})},[])}),[P,I]=(0,n.useState)(!1),$=(0,n.useRef)(0),F=(0,d.default)(p,600),O=(0,d.default)(h,600),H=e=>(0,o.getRetailerBuddyFulfillmentOptions)(e)?.[t],U=()=>{if(!e)return void y([]);let t=e.filter(e=>F?e.name?.toLowerCase()?.includes(F?.toLowerCase())&&H(e):H(e));""===F&&N(!(t?.length>0)),y(t)};return(0,n.useEffect)(()=>{U()},[F,e,t]),(0,n.useEffect)(()=>{w&&y(w.filter(H))},[w,t]),(0,n.useEffect)(()=>{if(D)return;let t=O.trim();if(!x.test(t)){$.current+=1,I(!1);return}let s=(e||[]).filter(e=>e?.addressObject?.postalCode===t&&H(e));if(s.length>0){$.current+=1,I(!1),b(!1),y(s);return}let l=++$.current;b(!0),I(!0),S(!0),T(null),L(t).then(e=>{l===$.current&&(I(!1),e?k({latitude:e.lat,longitude:e.lng}):y([]))})},[O,e,t,D]),{searchInput:p,setSearchInput:u,searchZipInput:h,setZipInput:g,closetLocationChecker:j,setClosetLocationChecker:b,searchResults:f,setSearchResults:y,debouncedSearchInput:F,debouncedSearchZipInput:O,handleSearch:e=>{u(e.target.value)},handleSearchZip:e=>{g(e.target.value)},handleGetUserLocation:R,loading:C||P,canStateSelect:E,isZipSelectIsEnabled:A,isSuggestedAddressEnabled:D,retailerLoader:r,retailerId:a,checkTotalRetailers:v,containerRef:m,getDeliveryAddressList:e=>{if(b(!0),!e.geometry||!e.geometry.location){k({latitude:0,longitude:0}),M("");return}(e?.geometry?.viewport||e?.geometry?.location)&&(S(!0),T(null),k({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),M(e.formatted_address)),m.current&&(m.current.scrollTop=0)},onEmptyInput:()=>{U(),b(!1)}}}],283373),e.s(["default",0,()=>(0,t.jsx)("div",{className:"flex justify-center items-center mt-6",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-primary-text",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]})})],397247)},332089,244156,743296,534162,e=>{"use strict";var t=e.i(843476),s=e.i(701973),l=e.i(657688),i=e.i(8014),a=e.i(618566),r=e.i(690939),n=e.i(502588),d=e.i(239932),c=e.i(283373),o=e.i(397247),x=e.i(83236);let m=e=>{let l=(0,a.usePathname)(),{searchInput:i,closetLocationChecker:m,setClosetLocationChecker:p,searchResults:u,handleSearch:h,handleGetUserLocation:g,loading:f,retailerLoader:y,setSearchInput:j,containerRef:b,getDeliveryAddressList:v,onEmptyInput:N,searchZipInput:C,handleSearchZip:w}=(0,c.default)({allRetailer:e?.allRetailer||[],fulfillmentKey:"pickup"});return(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(r.default,{}):(0,t.jsxs)("div",{className:"md:border website-cards-border-color roun
1ded-[20px] md:pl-5 py-1 md:py-3",children:[(0,t.jsx)(d.default,{searchInput:i,handleSearch:h,setSearchInput:j,isSidebar:e?.isSidebar||!1,getDeliveryAddressList:v,onEmptyInput:N,searchZipInput:C,handleSearchZip:w}),(0,t.jsxs)("div",{className:"text-sm primary-text flex gap-1 pt-2 pl-2 cursor-pointer mb-2 md:mb-0 w-fit",onClick:()=>{p(!0),g()},children:[(0,t.jsx)(x.PaperPlaneTilt,{weight:"fill",size:20})," Use My Current Location"]}),f||y?(0,t.jsx)(o.default,{}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===l?"":" md:h-full md:overflow-hidden"}`,children:!y&&(0,t.jsx)(t.Fragment,{children:u?.length>0?(0,t.jsx)("div",{ref:b,className:`overflow-y-auto md:pr-4 sb ${e.isSidebar?"2xl:h-[58vh] xl:h-[48vh] md:h-[48vh]":"2xl:h-[34vh] xl:h-[30vh] md:h-[28vh]"}`,children:(0,s.sortRetailersByAlphabetically)(u,m)?.map((e,s)=>(0,t.jsx)(n.default,{retailer:e},"pickup-shop-card"+s))}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:i?"We are sorry, currently no retailer is found.":"We are sorry, currently no retailer is found near your current location."})})})}),(0,t.jsx)("div",{className:"flex justify-center md:hidden my-[30px]",children:(0,t.jsx)("button",{className:"text-sm font-semibold text-body_text underline",onClick:()=>e?.scrollTopRef?.scrollIntoView({behavior:"smooth"}),children:"Back to Top"})})]})})};e.s(["default",0,m],244156);var p=e.i(587658),u=e.i(596924),h=e.i(791450),g=e.i(78023),f=e.i(258288),y=e.i(481964),j=e.i(703803),b=e.i(522016),v=e.i(271645);let N="CURBSIDE_PICKUP",C=({retailer:e})=>{let{handleSwitchRetailer:l,loadingButtonIndex:i,handleShowLocationAlert:a}=(0,g.useHandleSwitchRetailer)(e),[r,n]=(0,v.useState)(!1),{commonCMSData:d,retailerId:c,menuType:o}=(0,f.useGlobalStore)(),x={},m=(0,s.getRetailerHours)(e);if(m?.specialHours!=null&&m?.specialHours!="null"&&m?.specialHours!=void 0){let e=(0,y.todaySpecialsHours)(m?.specialHours,"curbsidePickup");e&&Object?.keys?.(e)?.length&&(x=e)}let p=(0,s.getTodayHours)(m?.curbsidePickup);return(0,v.useEffect)(()=>{e&&N&&n((0,s.getTodayRetailerActive)(N,e))},[e,N]),(0,t.jsx)("div",{className:"website-cards-bg-color md:border website-cards-border-color shadow-md rounded-[20px] px-3 py-5 mt-0 md:mt-5 mb-5 md:mb-5 flex items-start w-full",children:(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("p",{className:"font-semibold text-base pl-2 global-heading-color",children:e?.name}),e?.locationDetail&&(0,t.jsxs)("div",{className:"text-xs flex items-center gap-1 primary-text",children:[(0,t.jsx)(j.MapPin,{size:20}),parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","miles away"]})]}),(0,t.jsxs)("div",{className:"px-3 pt-3 text-xs md:text-sm font-medium text-gray-600 w-full",children:[e.address," ",(0,t.jsx)("br",{}),e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)(b.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base text-secondary_text mt-2",children:["Call : ",e?.contactNumber]}),(0,t.jsx)("p",{className:"global-heading-color font-semibold md:text-base text-sm md:mt-2 mt-1 md:mb-4 mb-3",children:x?.active?`${x?.start} - ${x?.end}`:Object.keys(x)?.length>0&&!x?.specialDateRangeCheckStatus?`Closed | Special Hours: ${x?.name}`:p}),(0,t.jsx)("div",{className:`flex gap-3 md:hidden ${e?.menuTypes?.length===2?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((s,r)=>"MEDICAL"===s&&d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?(0,t.jsx)("button",{className:`
2                  ${"Medical"===s.trim()?"fill-button":e?.id==c&&"MEDICAL"==o?"bg-[var(--secondary-color)]":"outlined-button-hover"}
3                  px-5 py-2 rounded-full
4                  flex items-center justify-center
5                `,onClick:()=>{e?.id==c&&"MEDICAL"==o?a(N):l(s,r,N,!0,e?.id)},disabled:null!==i,children:i===r?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})," "]}):e?.id==c&&"MEDICAL"===o?"Shopping Medical":"MEDICAL"===s.trim().toUpperCase()?"Shop Medical":s},"menu-type"+r):"RECREATIONAL"===s?(0,t.jsx)("button",{className:`
6                  ${"Recreational"===s.trim()?"fill-button":e?.id==c&&"RECREATIONAL"==o?"bg-[var(--secondary-color)]":"outlined-button-hover"}
7                  px-5 py-2 rounded-full
8                  flex items-center justify-center
9                `,onClick:()=>{e?.id==c&&"RECREATIONAL"==o?a(N):l(s,r,N,!0,e?.id)},disabled:null!==i,children:i===r?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})," "]}):e?.id==c&&"RECREATIONAL"===o?d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shopping Recreational":"Shopping This Location":"RECREATIONAL"===s.trim().toUpperCase()?d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shop Recreational":"Shop This Location":s},"menu-type"+r):void 0)}),(0,t.jsx)("div",{className:`hidden md:flex gap-3 ${e?.menuTypes?.length===2?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((s,r)=>"MEDICAL"===s&&d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?(0,t.jsx)("button",{className:`
10                  ${"Medical"===s.trim()?"fill-button":e?.id==c&&"MEDICAL"==o?"bg-[var(--secondary-color)]":"outlined-button-hover"}
11                  px-7 py-2 rounded-full
12                  flex items-center justify-center
13                `,onClick:()=>{e?.id==c&&"MEDICAL"==o?a(N):l(s,r,N,!0,e?.id)},disabled:null!==i,children:i===r?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})," "]}):e?.id==c&&"MEDICAL"===o?"Shopping Medical":"MEDICAL"===s.trim().toUpperCase()?"Shop Medical":s},"menu-type"+r):"RECREATIONAL"===s?(0,t.jsx)("button",{className:`
14                  ${"Recreational"===s.trim()?"fill-button":e?.id==c&&"RECREATIONAL"==o?"bg-[var(--secondary-color)]":"outlined-button-hover"}
15                  px-7 py-2 rounded-full
16                  flex items-center justify-center
17                `,onClick:()=>{e?.id==c&&"RECREATIONAL"==o?a(N):l(s,r,N,!0,e?.id)},disabled:null!==i,children:i===r?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})," "]}):e?.id==c&&"RECREATIONAL"===o?d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shopping Recreational":"Shopping This Location":"RECREATIONAL"===s.trim().toUpperCase()?d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shop Recreational":"Shop This Location":s},"menu-type"+r):void 0)}),d?.retailerClosePopupCMS?.isTurnOn&&!r&&(0,t.jsx)(h.default,{})]})]})})},w=e=>{let l=(0,a.usePathname)(),{searchInput:i,closetLocationChecker:n,setClosetLocationChecker:m,searchResults:p,handleSearch:u,handleGetUserLocation:h,loading:g,retailerLoader:f,checkTotalRetailers:y,setSearchInput:j,containerRef:b,getDeliveryAddressList:v,onEmptyInput:N,searchZipInput:w,handleSearchZip:S}=(0,c.default)({allRetailer:e?.allRetailer||[],fulfillmentKey:"curbsidePickup"});return(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(r.default,{}):(0,t.jsxs)("div",{className:"md:border website-cards-border-color roun
17ded-[20px] md:pl-5 py-1 md:py-3",children:[(0,t.jsx)(d.default,{searchInput:i,handleSearch:u,setSearchInput:j,isSidebar:e?.isSidebar||!1,getDeliveryAddressList:v,onEmptyInput:N,searchZipInput:w,handleSearchZip:S}),(0,t.jsxs)("div",{className:"text-sm primary-text flex gap-1 pt-2 pl-2 cursor-pointer mb-2 md:mb-0 w-fit",onClick:()=>{m(!0),h()},children:[(0,t.jsx)(x.PaperPlaneTilt,{weight:"fill",size:20})," Use My Current Location"]}),g||f?(0,t.jsx)(o.default,{}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===l?"":" md:h-full md:overflow-hidden"}`,children:!f&&(0,t.jsx)(t.Fragment,{children:p?.length>0?(0,t.jsx)("div",{ref:b,className:`overflow-y-auto md:pr-4 sb ${e.isSidebar?"2xl:h-[58vh] xl:h-[48vh] md:h-[48vh]":"2xl:h-[34vh] xl:h-[30vh] md:h-[28vh]"}`,children:(0,s.sortRetailersByAlphabetically)(p,n)?.map((e,s)=>(0,t.jsx)(C,{retailer:e},"curbside-shop-card"+s))}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:i||y?"We are sorry, currently no retailer is found.":"We are sorry, currently no retailer is found near your current location."})})})}),(0,t.jsx)("div",{className:"flex justify-center md:hidden my-[30px]",children:(0,t.jsx)("button",{className:"text-sm font-semibold text-body_text underline",onClick:()=>e.scrollTopRef?.scrollIntoView({behavior:"smooth"}),children:"Back to Top"})})]})})};e.s(["default",0,w],743296);var S=e.i(137963);let k=({title:e,active:l,setActive:i})=>(0,t.jsx)("div",{className:`flex justify-center items-center gap-2 border-2 rounded-full p-2 py-3 duration-500 group cursor-pointer ${l===e?"fill-button":"outlined-button"}`,onClick:()=>i(e),children:(0,t.jsx)("p",{className:"text-xs md:text-base font-semibold text-center",children:(0,s.makeTitleCase)(e)})});e.s(["Tab",0,k],534162);var M=e.i(881886),R=e.i(301575),T=e.i(815330),E=e.i(331991),A=e.i(577854);e.s(["default",0,({retailerId:e,commonCMSData:a,canSelectedRetailerId:r,setIsOpenPreferencePopup:n,scrollTopRef:d,canStateSelect:c,isCurbsidePickup:o,modalCmsData:x,selectedState:h,setSelectedState:g,open:y,showSkeleton:b,stateNameGroup:N,allRetailer:C,handleRetailerStateSet:D,togglePreferencePopup:L})=>{let{orderType:P}=(0,f.useGlobalStore)(),[I,$]=(0,v.useState)("PICKUP");return(0,v.useEffect)(()=>{P&&$("CURBSIDE_PICKUP"===P?"CURBSIDE":P)},[P]),(0,t.jsxs)("div",{className:"py-10 md:py-14 px-4 md:px-12",ref:d,children:[e?(0,t.jsx)(A.X,{onClick:()=>n(!1),className:"absolute top-3 right-5 text-3xl bg-white z-10 p-1 cursor-pointer"}):null,(0,t.jsx)("p",{className:(0,S.cn)("font-semibold text-gray-800 text-center mb-5 md:hidden",c&&!h&&"mb-0"),children:"How do you want to shop?"}),!c||h||e?(0,t.jsxs)(t.Fragment,{children:[b?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"hidden md:block mb-3",children:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-[100px] md:w-[150px] 2xl:w-[200px] h-[42px] md:h-[62px] 2xl:h-[100px] relative mb-3",children:(0,t.jsx)("div",{className:"bg-slate-200 h-[40px] w-[40px] md:h-[60px] md:w-[60px] rounded-full"})}),(0,t.jsx)("div",{className:"bg-slate-200 h-[20px] w-[350px] md:h-[20px] md:w-[350px] mb-3"}),(0,t.jsx)("div",{className:"bg-slate-200 h-[15px] w-[250px] md:h-[15px] md:w-[250px] mb-3"}),(0,t.jsx)("div",{className:"bg-slate-200 h-[15px] w-[150px] md:h-[15px] md:w-[150px] mb-3"})]})})}):(0,t.jsxs)("div",{className:"hidden md:block",children:[N?.length>1&&!r&&(0,t.jsxs)("div",{onClick:()=>{g(""),$("PICKUP")},className:"flex items-center gap-2 cursor-pointer font-medium",children:[(0,t.jsx)(R.ArrowLeft,{size:20}),(0,t.jsx)("span",{children:"Go Back"})]}),(0,t.jsx)("div",{children:(0,t.jsx)(l.default,{src:a?.locationPreference?.image||"",className:"w-[50px] md:w-[60px] 2xl:w-[60px] mx-auto relative object-contain",alt:a?.locationPreference?.imageAlt||"",title:a?.locationPreference?.imageTitle||"",width:85,height:85})}),(0,t.jsx)("p",{className:" text-xl  xl:text-3xl 2xl:text-4xl font-semibold mt-2 text-center website-cards-text-color",children:a?.locationPreference?.title}),(0,t.jsx)("p",{className:" text-center font-medium text-xs 2xl:text-base website-cards-text-color my-4 w-[55%
17] mx-auto",children:a?.locationPreference?.subTitle})]}),c&&e&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("label",{className:"font-medium mb-2 inline-block",children:"Select a State"}),(0,t.jsxs)("div",{className:"w-full rounded-md flex items-center justify-between px-4 py-2 border border-primary hover:bg-primary hover:text-white transition-all cursor-pointer",onClick:L,children:[p.default.find(e=>e.code===h)?.name,y?(0,t.jsx)(E.CaretUp,{size:16}):(0,t.jsx)(T.CaretDown,{size:16})]}),y&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-white p-4 border",children:N?.length>0&&(0,s.sortArrayStateAlphabeticallyAfterFilter)(N)?.map((e,s)=>{let l=p.default.filter(t=>t.code==e);return(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2 rounded-full border shadow px-4 py-3 transition-all cursor-pointer secondary-button-hover",onClick:()=>D(e),children:[(0,t.jsxs)("span",{className:"w-full flex items-center gap-8",children:[(0,t.jsx)("span",{children:(0,t.jsx)(j.MapPin,{size:20})}),(0,t.jsx)("span",{className:"me-4 font-medium text-lg",children:l?.[0]?.name})]}),(0,t.jsx)(M.ArrowCircleRight,{size:20})]},"landing-map-one-item"+s)})})]}),b?(0,t.jsx)("div",{className:"mb-5 flex md:hidden h-[81px] w-full md:w-[398px] bg-slate-200 rounded-md items-center py-7 px-4 gap-4"}):(0,t.jsxs)("div",{children:[N?.length>1&&!r&&(0,t.jsx)("div",{onClick:()=>g(""),className:"flex items-center gap-2 cursor-pointer font-medium absolute top-11 left-3 md:hidden",children:(0,t.jsx)(R.ArrowLeft,{size:20})}),(0,t.jsxs)("div",{className:"mb-5 flex md:hidden h-[84px] w-full md:w-[398px] bg-[#EBF6E6] rounded-md items-center py-7 px-4 gap-4",children:[(0,t.jsx)(j.MapPin,{size:24,className:"text-[#34A203]"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:" text-md md:text-base font-semibold primary-text",children:x?.title}),(0,t.jsx)("p",{className:" text-sm text-secondary_text text-gray-600",children:x?.subtitle})]})]})]}),(0,t.jsxs)("div",{className:(0,S.cn)("grid grid-cols-1 gap-5 mb-6",(o||!a?.deliverySettingsCMS?.hideDeliveryBtn)&&"grid-cols-2",o&&!a?.deliverySettingsCMS?.hideDeliveryBtn&&"grid-cols-3"),children:[(0,t.jsx)(k,{title:"PICKUP",active:I,setActive:$}),o&&(0,t.jsx)(k,{title:"CURBSIDE",active:I,setActive:$}),a?.deliverySettingsCMS?.hideDeliveryBtn?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)(k,{title:"DELIVERY",active:I,setActive:$})]}),"PICKUP"===I&&(0,t.jsx)(m,{pickuptext:x?.pickuptext,scrollTopRef:d.current,allRetailer:C}),"CURBSIDE"===I&&o&&(0,t.jsx)(w,{pickuptext:x?.pickuptext,scrollTopRef:d.current,allRetailer:C}),"DELIVERY"===I&&a&&a?.deliverySettingsCMS&&(a?.deliverySettingsCMS?.isActive?(0,t.jsx)(i.default,{deliverytext:x?.deliverytext,deliveryicon:x?.deliveryicon,deliverytitle:x?.deliverytitle,deliverysubtitle:x?.deliverysubtitle}):(0,t.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,t.jsx)("p",{className:"text-xl md:text-2xl font-semibold text-gray-800 text-center mt-5",children:"Sorry, delivery is currently unavailable."})}))]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4 justify-center",children:[(0,t.jsx)("div",{className:"w-full border-b py-4",children:(0,t.jsx)("p",{className:"text-2xl font-semibold text-center",children:"Select a State"})}),(0,t.jsx)("div",{className:"mx-1",children:N?.length>0?(0,s.sortArrayStateAlphabeticallyAfterFilter)(N)?.map((e,s)=>{let l=p.default.filter(t=>t.code==e);return(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2 rounded-full border shadow px-4 py-3 transition-all cursor-pointer secondary-button-hover",onClick:()=>D(e),children:[(0,t.jsxs)("span",{className:"w-full flex items-center gap-8",children:[(0,t.jsx)("span",{children:(0,t.jsx)(j.MapPin,{size:20})}),(0,t.jsx)("span",{className:"me-4 font-medium text-lg",children:l?.[0]?.name})]}),(0,t.jsx)(M.ArrowCircleRight,{size:20})]},"landing-map-one-item"+s)}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(u.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(u.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}})]})})]})]})}],332089)},8014,502588,e=>{"use strict";var t=e.i(843476),s=e.i(389222),l=e.i(657688),i=e.i(271645),a=e.i(456100),r=e.i(487354),n=e.i(690939),d=e.i(61150),c=e.i(701973),o=e.i(83236);e.s(["default",0,e=>{let{inputValue:x,search:m,loading:p,skeletonHoldSearch:u,retailerList:h,setSkeletonHoldSearch:g,setSearch:f,setInputValue:y,handleGetUserLocation:j,setUserLocation:b}=(0,s.useGoogleMapLocation)(),[v,N]=(0,i.useState)(!1),[C,w]=(0,i.useState)(!1),[S,k]=(0,i.useState)(!1);return(0,i.useEffect)(()=>
17{if(h&&h?.length){for(let e of h)if(e?.locationDetail?.validForDelivery){N(!0),w(!0);return}N(!0)}else N(!0),w(!1)},[h]),(0,t.jsx)("div",{children:e.location?(0,t.jsx)(n.default,{}):(0,t.jsxs)("div",{className:"md:border website-cards-border-color md:rounded-[20px] p-2 mb-5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsx)("div",{className:" w-[30px] md:w-[50px] h-[30px] md:h-[50px] relative",children:(0,t.jsx)(l.default,{src:e?.deliveryicon,fill:!0,alt:""})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:" text-sm md:text-base font-semibold global-heading-color",children:e?.deliverytitle}),(0,t.jsx)("p",{className:" text-xs text-secondary_text",children:e?.deliverysubtitle})]})]}),(0,t.jsx)(d.default,{onPlaceSelected:e=>(e=>{if(k(!0),!e.geometry||!e.geometry.location){f({latitude:0,longitude:0}),y("");return}(e?.geometry?.viewport||e?.geometry?.location)&&(g(!0),b(null),f({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),y(e.formatted_address))})(e)}),(0,t.jsxs)("div",{className:" text-sm primary-text flex gap-1 pl-2 cursor-pointer w-fit",onClick:()=>{k(!0),j()},children:[(0,t.jsx)(o.PaperPlaneTilt,{weight:"fill",size:20})," Use My Current Location"]}),p?(0,t.jsx)("div",{className:"flex justify-center items-center mt-6",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-primary-text",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]})}):(0,t.jsx)("div",{className:`${!e.isSidebar?"has-[img]:h-[28vh]":"2xl:h-[50vh] xl:h-[40vh] md:h-[35vh]"} overflow-y-auto mt-5 md:pr-4 sb`,children:m?.latitude!==0?(0,t.jsxs)(t.Fragment,{children:[h?.length>0?(0,c.sortRetailersByAlphabetically)(h,S)?.map((s,l)=>(0,t.jsx)("div",{children:(0,t.jsx)("div",{children:e.isSidebar?(0,t.jsx)(r.default,{}):(0,t.jsx)(t.Fragment,{children:s?.locationDetail?.validForDelivery?(0,t.jsx)(a.default,{locationData:s,deliveryAddress:x??"",orderType:"DELIVERY",skeletonHoldSearch:u}):(0,t.jsx)(t.Fragment,{})})})},"RetailerDataGlobal"+l)):(0,t.jsx)(t.Fragment,{}),v&&!C?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"2xl:mb-5 mb-3",children:[(0,t.jsx)("h2",{className:" md:text-base text-sm font-medium text-[#CA024F] md:text-center mb-4",children:"We don't deliver to this address."}),(0,t.jsx)("p",{className:" md:text-base text-sm text-gray-600 font-medium md:text-center",children:"You can still place an order online for in-store pickup or explore cannabis to find products at a store near you."})]})}):(0,t.jsx)(t.Fragment,{})]}):""})]})})}],8014);var x=e.i(791450),m=e.i(78023),p=e.i(258288),u=e.i(481964),h=e.i(522016),g=e.i(703803);let f="PICKUP";e.s(["default",0,({retailer:e})=>{let{handleSwitchRetailer:s,loadingButtonIndex:l,handleShowLocationAlert:a}=(0,m.useHandleSwitchRetailer)(e),[r,n]=(0,i.useState)(!1),{commonCMSData:d,retailerId:o,menuType:y}=(0,p.useGlobalStore)(),j={},b=(0,c.getRetailerHours)(e);if(b?.specialHours!=null&&b?.specialHours!="null"&&b?.specialHours!=void 0){let e=(0,u.todaySpecialsHours)(b?.specialHours,"pickup");e&&Object?.keys?.(e)?.length&&(j=e)}let v=(0,c.getTodayHours)(b?.pickup);return(0,i.useEffect)(()=>{e&&f&&n((0,c.getTodayRetailerActive)(f,e))},[e,f]),(0,t.jsx)("div",{className:"website-cards-bg-color md:border website-cards-border-color shadow-md rounded-[20px] px-3 py-5 mt-0 md:mt-5 mb-5 md:mb-5 flex items-start",children:(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("p",{className:"font-semibold text-base pl-2 website-cards-text-color",children:e?.name}),e?.locationDetail&&(0,t.jsxs)("div",{className:"text-xs flex items-center gap-1 website-cards-text-color",children:[(0,t.jsx)(g.MapPin,{size:20}),parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","miles away"]})]}),(0,t.jsxs)("div",{className:"px-3 pt-3 text-xs md:text-sm font-medium w-full",children:[(0,t.jsx)("span",{className:"website-cards-text-color",children:e.address})," ",(0,t.jsx)("br",{}),e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)(h.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base website-cards-text-color mt-2",children:["Call : ",e?.contactNumber]}),(0,t.jsx)("p",{className:"website-cards-text-color font-semibold md:text-base text-sm md:mt-2 mt-1 md:mb-4 mb-3",children:j?.active?`${j?.start} - ${j?.end}`:Object.keys(j)?.length>0&&!j?.specialDateRangeCheckStatus?`Closed | Special Hours: ${j?.name}`:v}),(0,t.jsx)("div",{className:`flex gap-3 md:hidden ${e?.menuTypes?.length===2?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((i,r)=>"MEDICAL"===i&&d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?(0,t.jsx)("button",{className:`
18                  ${"Medical"===i.trim()?"fill-button":e?.id==o&&"MEDICAL"==y?"bg-[var(--secondary-color)]":"outlined-button-hover"}
19                  px-5 py-2 rounded-full
20                  flex items-center justify-center
21                `,onClick:()=>{e?.id==o&&"MEDICAL"==y?a(f):s(i,r,f,!0,e?.id)},disabled:null!==l,children:l===r?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})," "]}):e?.id==o&&"MEDICAL"===y?"Shopping Medical":"MEDICAL"===i.trim().toUpperCase()?"Shop Medical":i},"menu-type"+r):"RECREATIONAL"===i?(0,t.jsx)("button",{className:`
22                  ${"Recreational"===i.trim()?"fill-button":e?.id==o&&"RECREATIONAL"==y?"bg-[var(--secondary-color)]":"outlined-button-hover"}
23                  px-5 py-2 rounded-full
24                  flex items-center justify-center
25                `,onClick:()=>{e?.id==o&&"RECREATIONAL"==y?a(f):s(i,r,f,!0,e?.id)},disabled:null!==l,children:l===r?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})," "]}):e?.id==o&&"RECREATIONAL"===y?d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shopping Recreational":"Shopping This Location":"RECREATIONAL"===i.trim().toUpperCase()?d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shop Recreational":"Shop This Location":i},"menu-type"+r):void 0)}),(0,t.jsx)("div",{className:`hidden md:flex gap-3 ${e?.menuTypes?.length===2?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((i,r)=>"MEDICAL"===i&&d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?(0,t.jsx)("button",{className:`
26                  ${"Medical"===i.trim()?"fill-button":e?.id==o&&"MEDICAL"==y?"bg-[var(--secondary-color)]":"outlined-button-hover"}
27                  px-7 py-2 rounded-full
28                  flex items-center justify-center
29                `,onClick:()=>{e?.id==o&&"MEDICAL"==y?a(f):s(i,r,f,!0,e?.id)},disabled:null!==l,children:l===r?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})," "]}):e?.id==o&&"MEDICAL"===y?"Shopping Medical":"MEDICAL"===i.trim().toUpperCase()?"Shop Medical":i},"menu-type"+r):"RECREATIONAL"===i?(0,t.jsx)("button",{className:`
30                  ${"Recreational"===i.trim()?"fill-button":e?.id==o&&"RECREATIONAL"==y?"bg-[var(--secondary-color)]":"outlined-button-hover"}
31                  px-7 py-2 rounded-full
32                  flex items-center justify-center
33                `,onClick:()=>{e?.id==o&&"RECREATIONAL"==y?a(f):s(i,r,f,!0,e?.id)},disabled:null!==l,children:l===r?(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})," "]}):e?.id==o&&"RECREATIONAL"===y?d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shopping Recreational":"Shopping This Location":"RECREATIONAL"===i.trim().toUpperCase()?d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shop Recreational":"Shop This Location":i},"menu-type"+r):void 0)}),d?.retailerClosePopupCMS?.isTurnOn&&!r&&(0,t.jsx)(x.default,{})]})]})})}],502588)},456100,e=>{"use strict";var t=e.i(843476),s=e.i(726027),l=e.i(250646),i=e.i(258288),a=e.i(481964),r=e.i(78023),n=e.i(701973),d=e.i(791450),c=e.i(271645),o=e.i(769464);let x=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243.94,92.67l-184-64A12,12,0,0,0,44,40V216a12,12,0,0,0,24,0V176.53l175.94-61.2a12,12,0,0,0,0-22.66ZM68,151.12V56.88L203.47,104Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M240,104,56,168V40Z",opacity:"0.2"}),c.createElement("path",{d:"M242.63,96.44l-184-64A8,8,0,0,0,48,40V216a8,8,0,0,0,16,0V173.69l178.63-62.13a8,8,0,0,0,0-15.12ZM64,156.75V51.25L215.65,104Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M248,104a8,8,0,0,1-5.37,7.56L64,173.69V216a8,8,0,0,1-16,0V40a8,8,0,0,1,10.63-7.56l184,64A8,8,0,0,1,248,104Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M242,98.33l-184-64A6,6,0,0,0,50,40V216a6,6,0,0,0,12,0V172.27l180-62.6a6,6,0,0,0,0-11.34ZM62,159.56V48.44L221.74,104Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M242.63,96.44l-184-64A8,8,0,0,0,48,40V216a8,8,0,0,0,16,0V173.69l178.63-62.13a8,8,0,0,0,0-15.12ZM64,156.75V51.25L215.65,104Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M241.31,100.22l-184-64A4,4,0,0,0,52,40V216a4,4,0,0,0,8,0V170.84l181.31-63.06a4,4,0,0,0,0-7.56ZM60,162.37V45.63L227.82,104Z"}))]]),m=c.forwardRef((e,t)=>
33c.createElement(o.default,{ref:t,...e,weights:x}));m.displayName="FlagPennantIcon";var p=e.i(754169);let u=()=>(0,t.jsxs)("div",{role:"status",className:"p-4 border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700 w-full mb-4 rounded-xl",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("svg",{className:"w-10 h-10 me-3 text-gray-200 dark:text-gray-700 global-heading-color","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"}),(0,t.jsx)("div",{className:"w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700"}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]});e.s(["default",0,({locationData:e,deliveryAddress:o,orderType:x,skeletonHoldSearch:h})=>{let{commonCMSData:g,menuType:f,retailerId:y}=(0,i.useGlobalStore)(),[j,b]=(0,c.useState)(!1),{handleSwitchRetailer:v,handleShowLocationAlert:N}=(0,r.useHandleSwitchRetailer)(e,o),C={},w=(0,n.getRetailerHours)(e);if(w?.specialHours!=null&&w?.specialHours!="null"&&w?.specialHours!=void 0){let e=(0,a.todaySpecialsHours)(w?.specialHours,"delivery");e&&Object?.keys?.(e)?.length&&(C=e)}let S=(0,n.getTodayHours)(w?.delivery);return(0,c.useEffect)(()=>{e&&x&&b((0,n.getTodayRetailerActive)(x,e))},[e,x]),(0,t.jsx)(t.Fragment,{children:h?(0,t.jsx)(u,{}):(0,t.jsx)("div",{className:"border hover:border-[#34A203] primary-border rounded-xl p-3 md:p-2 2xl:p-5 bg-light hover:bg-normal duration-300 mb-3",children:(0,t.jsx)("div",{className:"flex md:items-center md:justify-between md:flex-row flex-col gap-5",children:(0,t.jsx)("div",{className:"flex items-start gap-3",children:(0,t.jsxs)("div",{className:"px-2 pb-2",children:[(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)("h2",{className:" text-lg md:text-lg  xl:text-lg 2xl:text-lg 3xl:text-lg font-semibold text-black ",children:e?.name}),(0,t.jsx)("p",{className:"text-secondary_text  text-sm",children:e?.address})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2",children:[(0,t.jsx)("p",{className:"text-gray-700 global-heading-color font-semibold text-xs md:text-sm md:mt-2 mt-1 md:mb-4 mb-3",children:C?.active?`${C?.start} - ${C?.end}`:Object.keys(C)?.length>0&&!C?.specialDateRangeCheckStatus?`Closed | Special Hours: ${C?.name}`:S}),(0,t.jsxs)("p",{className:"text-xs md:text-sm font-semibold text-secondary_text flex md:justify-end items-center gap-1 pb-4 ",children:[(0,t.jsx)(m,{}),e?.locationDetail?.distance?.toFixed(2)," Miles"]})]}),(0,t.jsxs)("div",{className:"pt-4",children:[e?.id=="4cc2d3df-07ec-492b-9a57-ccc600577517"?(0,t.jsx)(s.default,{className:"cursor-default	 w-max whitespace-nowrap group-hover:!bg-white group-hover:border-[#34A203] group-hover:border  pointer-none !px-4",children:"Coming Soon"}):(0,t.jsx)(t.Fragment,{children:e?.id?(0,t.jsx)("div",{className:"flex gap-3 flex-row-reverse",style:{justifyContent:"start"},children:e?.menuTypes?.map((s,i)=>"RECREATIONAL"===s?(0,t.jsxs)(l.default,{onClick:()=>{e?.id==y&&"RECREATIONAL"==f?N(x):v(s,i,"DELIVERY",!0,e?.id)},theme:"gray",className:`${e?.id==y&&"RECREATIONAL"==f?"bg-gray-200":"outlined-button-hover"}
34                              !px-4 !text-xs`,children:[e?.id==y&&"RECREATIONAL"==f?(0,t.jsx)(t.Fragment,{children:g?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shopping Recreational":"Shopping This Location"}):(0,t.jsx)(t.Fragment,{children:g?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shop Recreational":"Shop This Location"}),(0,t.jsx)(p.ArrowRight,{className:"group-hover:translate-x-1 text-xl transition-all"})]},i):"MEDICAL"===s&&g?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?(0,t.jsxs)(l.default,{onClick:()=>{e?.id==y&&"MEDICAL"==f?N(x):v(s,i,"DELIVERY",!0,e?.id)},theme:"gray",className:`${e?.id==y&&"MEDICAL"==f?"bg-gray-200":"outlined-button-hover"}
35                              !px-4 !text-xs`,children:[e?.id==y&&"MEDICAL"==f?(0,t.jsx)(t.Fragment,{children:"Shopping Medical"}):(0,t.jsx)(t.Fragment,{children:"Shop Medical"}),(0,t.jsx)(p.ArrowRight,{className:"group-hover:translate-x-1 text-xl transition-all"})]},i):void 0)}):(0,t.jsx)(t.Fragment,{})}),g?.retailerClosePopupCMS?.isTurnOn&&!j&&(0,t.jsx)(d.default,{})]})]})})})})})}],456100)},690939,487354,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(726027),i=e.i(368799),a=e.i(754169),r=e.i(817389),n=e.i(6
3557688);let d=()=>{let{setIsOpenPreferenceDrawer:e,setIsOpenPreferencePopup:s}=(0,i.useModalStore)(),d=()=>{e(!1),s(!1)};return(0,t.jsxs)("div",{className:" border border-light rounded-xl p-2 md:p-2 2xl:p-5 mb-5",children:[(0,t.jsx)(n.default,{src:"/images/modal.png",width:53,height:44,alt:""}),(0,t.jsxs)("div",{className:" grid grid-cols-2 gap-3 items-center justify-center 2xl:my-3 my-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"_menu text-black mb-3",children:"Bloomery Store"}),(0,t.jsx)("p",{className:" text-secondary_text text-xs md:text-sm 2xl:text-base",children:"51525 Industrial Dr, New Baltimore, MI 48047"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:" text-center text-secondary_text text-xs md:text-sm 2xl:text-base",children:"Open Monday to Sunday"}),(0,t.jsx)("p",{className:" text-center text-normal my-2 text-xs md:text-sm 2xl:text-base",children:"9 :00 AM - 4:20 PM"}),(0,t.jsx)("p",{className:" text-center text-secondary_text text-xs md:text-sm 2xl:text-base",children:"Call : (586) 816-9333"})]})]}),(0,t.jsxs)("div",{className:" grid grid-cols-3 gap-1 2xl:gap-3",children:[(0,t.jsxs)(l.default,{onClick:d,className:"!whitespace-normal !bg-light !text-black 2xl:!px-2 !px-1 !text-xs 2xl:!text-base",children:["Select Shop ",(0,t.jsx)(a.ArrowRight,{className:" text-lg md:text-xl"})]}),(0,t.jsxs)(l.default,{onClick:d,className:"!whitespace-normal !bg-light !text-black 2xl:!px-2 !px-1  !text-xs 2xl:!text-base",children:["Store Details ",(0,t.jsx)(a.ArrowRight,{className:" text-lg md:text-xl"})]}),(0,t.jsxs)("div",{className:" flex items-center gap-1",children:[(0,t.jsx)(r.CheckCircle,{className:" text-lg md:text-xl text-normal"}),(0,t.jsx)("p",{className:" text-xs text-secondary_text whitespace-nowrap",children:"Currently Shopping"})]})]})]})};e.s(["default",0,d],487354);var c=e.i(525209);let o=()=>{let[e,l]=(0,s.useState)(!1);return(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:" relative",children:[(0,t.jsxs)("div",{className:"relative 2xl:mb-5 mb-3",onClick:()=>l(!e),children:[(0,t.jsx)("input",{type:"text",placeholder:"Search",className:"py-2 pl-8 pr-4 outline-none rounded-full border border-gray-200 focus:border-gray-500 focus:border w-full"}),(0,t.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",children:(0,t.jsx)(c.MagnifyingGlass,{size:20})})]}),e&&(0,t.jsx)("div",{className:" max-w-xl bg-white rounded-2xl p-3 border border-[#E5E5E5] mb-5",children:x?.map(e=>(0,t.jsx)("p",{className:" text-sm font-medium text-secondary_text mb-3",children:e.title},e.id))})]})})},x=[{id:1,title:"48001 Mercury Lane, Saint Clairsville, OH, USA"},{id:2,title:"48001 Daisy Drive, Macomb, MI, USA"},{id:3,title:"Detroit Metro Airport, Detroit, MI, USA"},{id:4,title:"Detroit Riverwalk, Detroit, MI, USA"},{id:5,title:"Detroit Avenue, Lakewood, OH, USA"},{id:6,title:"Detroit Avenue, Lakewood, OH, USA"},{id:7,title:"Detroit Avenue, Lakewood, OH, USA"}];e.s(["default",0,()=>(0,t.jsxs)("div",{className:" h-[70vh] overflow-y-auto sb",children:[(0,t.jsx)(o,{}),(0,t.jsx)("div",{className:" md:hidden",children:(0,t.jsx)("iframe",{title:"Google Maps",className:" rounded-lg",src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d52943468.08143988!2d-161.94000782076728!3d35.9123934915405!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x54eab584e432360b%3A0x1c3bb99243deb742!2sUnited%20States!5e0!3m2!1sen!2sbd!4v1707303912166!5m2!1sen!2sbd",width:"100%",height:"100%",loading:"lazy"})}),(0,t.jsx)("div",{className:" mt-5",children:[1,2,3,4,5].map(e=>(0,t.jsx)(s.default.Fragment,{children:(0,t.jsx)(d,{})},e))})]})],690939)},43161,25843,e=>{"use strict";var t=e.i(843476),s=e.i(655613),l=e.i(271645),i=e.i(258288),a=e.i(368799),r=e.i(259997),n=e.i(701973),d=e.i(332089),c=e.i(91607),o=e.i(533752),x=e.i(139154),m=e.i(657688),p=e.i(587658),u=e.i(596924),h=e.i(137963),g=e.i(728893),f=e.i(361716),y=e.i(205031),j=e.i(301575),b=e.i(754169),v=e.i(703803),N=e.i(577854);let C=({title:e,active:s,setActive:l})=>(0,t.jsx)("div",{className:`flex justify-center items-center gap-2 border rounded-full p-2 py-1.5 duration-500 group cursor-pointer ${s===e?"fill-button":"border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out"}`,onClick:()=>l(e),children:(0,t.jsx)("p",{className:"text-xs md:text-base font-semibold text-center",children:(0,n.makeTitleCase)(e)})}),w={isRetailerVersionOne:d.default,isRetailerVersionTwo:c.default,isRetailerVersionThree:o.default,isRetailerVersionFour:x.default,isRetailerVersionFive:({retailerId:e,commonCMSData:s,canSelectedRetailerId:l,setIsOpenPreferencePopup:i,active:a,setActive:r,scrollTopRef:d,canStateSelect:c,isCurbsidePickup:o,modalCmsData:x,selectedState:w,setSelectedState:S,stateNameGroup:k,allRetailer:M,handleRetailerStateSet:R})=>(0,t.jsxs)("div",{className:(0,h.cn)("px-4 md:px-8 py-8",c&&!w&&!e&&"py-10 md:py-14 md:px-12"),ref:d,children:[e?(0,t.jsx)(N.X,{onClick:()=>i(!1),className:"absolute top-3 right-5 text-3xl bg-white z-10 p-1 cursor-pointer"}):null,!c||w||e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-7",children:[k?.length>1&&!l&&(0,t.jsx)("div",{onClick:()=>{S(""),r("PICKUP")},className:"cursor-pointer font-medium text-gray-400 hover:text-gray-800 hover:bg-gray-200 hover:rounded-md transition-all duration-400 px-2 py-2 w-fit",children:(0,t.jsx)(j.ArrowLeft,{className:"text-lg "})}),(0,t.jsx)("div",{className:"",children:(0,t.jsx)(m.default,{src:s?.locationPreference?.image||"",className:"w-[50px] md:w-[60px] 2xl:w-[60px] mx-auto relative object-contain",alt:s?.locationPreference?.imageAlt||"",title:s?.locationPreference?.imageTitle||"",width:85,height:85})}
35),(0,t.jsxs)("div",{className:"max-w-[290px] mx-auto space-y-2",children:[(0,t.jsx)("p",{className:" text-2xl font-semibold mt-2 text-center",children:s?.locationPreference?.title}),(0,t.jsx)("p",{className:"text-center font-medium text-sm text-gray-600 px-4",children:s?.locationPreference?.subTitle})]})]}),(0,t.jsxs)("div",{className:(0,h.cn)("grid grid-cols-2 gap-5 mb-6",(o||!s?.deliverySettingsCMS?.hideDeliveryBtn)&&"grid-cols-2",o&&!s?.deliverySettingsCMS?.hideDeliveryBtn&&"grid-cols-3"),children:[(0,t.jsx)(C,{title:"PICKUP",active:a,setActive:r}),o&&(0,t.jsx)(C,{title:"CURBSIDE",active:a,setActive:r}),s?.deliverySettingsCMS?.hideDeliveryBtn?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)(C,{title:"DELIVERY",active:a,setActive:r})]}),"PICKUP"===a&&(0,t.jsx)(g.default,{pickuptext:x?.pickuptext,scrollTopRef:d.current,allRetailer:M,selectedState:w}),"CURBSIDE"===a&&o&&(0,t.jsx)(f.default,{pickuptext:x?.pickuptext,scrollTopRef:d.current,allRetailer:M,selectedState:w}),"DELIVERY"===a&&s&&s?.deliverySettingsCMS&&(s?.deliverySettingsCMS?.isActive?(0,t.jsx)(y.default,{deliverytext:x?.deliverytext,deliveryicon:x?.deliveryicon,deliverytitle:x?.deliverytitle,deliverysubtitle:x?.deliverysubtitle}):(0,t.jsx)("div",{className:"flex justify-center items-center h-full mb-4 mt-8",children:(0,t.jsx)("p",{className:"text-2xl font-semibold text-gray-800",children:"Sorry, delivery is currently unavailable."})}))]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4 justify-center",children:[(0,t.jsx)("div",{className:"w-full border-b py-4",children:(0,t.jsx)("p",{className:"text-2xl font-semibold text-center",children:"Select a State"})}),(0,t.jsx)("div",{className:"mx-1",children:k?.length>0?(0,n.sortArrayStateAlphabeticallyAfterFilter)(k)?.map((e,s)=>{let l=p.default.filter(t=>t.code==e);return(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2 rounded-full border shadow px-4 py-3 transition-all cursor-pointer secondary-button-hover",onClick:()=>R(e),children:[(0,t.jsxs)("span",{className:"w-full flex items-center gap-8",children:[(0,t.jsx)("span",{children:(0,t.jsx)(v.MapPin,{size:20})}),(0,t.jsx)("span",{className:"me-4 font-medium text-lg",children:l?.[0]?.name})]}),(0,t.jsx)(b.ArrowRight,{size:20})]},"landing-map-one-item"+s)}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(u.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(u.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}})]})})]})]})},S=()=>{let{retailerId:e,orderType:t,commonCMSData:s,retailerList:c,canSelectedRetailerId:o,setIsPreferencePage:x}=(0,i.useGlobalStore)(),{isOpenPreferencePopup:m,setIsOpenPreferencePopup:p}=(0,a.useModalStore)(),[u,h]=(0,l.useState)("PICKUP"),g=(0,l.useRef)(null),f=s?.stateSelectionSettingsCMS?.enableStateSelector,y=!s?.deliverySettingsCMS?.turnOffCurbsidePickup,[j,b]=(0,l.useState)({image:"",title:"",subtitle:"",deliverytext:"",pickuptext:"",deliveryicon:"",deliverytitle:"",deliverysubtitle:""}),[v,N]=(0,l.useState)([]),[C,S]=(0,l.useState)(!0),[k,M]=(0,l.useState)(""),[R,T]=(0,l.useState)(!1),E=(0,r.decryptFromCookies)("canUserSelectedState")||"",[A,D]=(0,l.useState)(!1);(0,l.useEffect)(()=>{E&&f?N(c?.filter(e=>e.addressObject?.state===E)):E?$(E):N(c),M(E)},[c,E]);let L=(0,n.sortArrayStateAlphabetically)(c)?.reduce((e,t)=>{let s=t?.addressObject?.state;return e[s]||(e[s]=[]),e[s].push(t),e},{}),P=L?Object.keys(L):[];function I(){let e=s?.preferenceModalCmsData||{};b({image:e?.image,title:e?.title,subtitle:e?.subtitle,deliverytext:e?.deliverytext,pickuptext:e?.pickuptext,deliveryicon:e?.deliveryicon,deliverytitle:e?.deliverytitle,deliverysubtitle:e?.deliverysubtitle}),S(!1)}(0,l.useEffect)(()=>{"preferenceModalCmsData"in s&&I()},[s]);let $=e=>{let t=c?.filter(t=>t.addressObject?.state===e);h("PICKUP"),M(e),N(t),T(!1)},{activeVersionCms:F}=s,O=(0,l.useMemo)(()=>F?Object.keys(w).find(e=>F?.[e]):void 0,[F]);return{retailerId:e,orderType:t,commonCMSData:s,retailerList:c,canSelectedRetailerId:o,setIsOpenPreferencePopup:p,active:u,setActive:h,scrollTopRef:g,canStateSelect:f,isCurbsidePickup:y,modalCmsData:j,setModalCmsData:b,allRetailer:v,setAllRetailer:N,showSkeleton:C,setShowSkeleton:S,selectedState:k,setSelectedState:M,open:R,setOpen:T,savedState:E,groupedAddresses:L,stateNameGroup:P,handleCmsData:I,handleRetailerStateSet:$,togglePreferencePopup:()=>{T(e=>!e)},isOpenPreferencePopup:m,setIsPreferencePage:x,CurrentRetailerSelector:O?w[O]:d.default,openPreferenceDrawer:A,setOpenPreferenceDrawer:D,togglePreferenceDrawer:()=>{D(e=>!e)}}};e.s(["default",0,S],25843),e.s(["default",0,({opeModal:e=!1})=>
35{let{retailerId:i,orderType:a,commonCMSData:r,retailerList:n,canSelectedRetailerId:d,setIsOpenPreferencePopup:c,active:o,setActive:x,scrollTopRef:m,canStateSelect:p,isCurbsidePickup:u,modalCmsData:h,setModalCmsData:g,allRetailer:f,setAllRetailer:y,showSkeleton:j,setShowSkeleton:b,selectedState:v,setSelectedState:N,open:C,setOpen:w,savedState:k,groupedAddresses:M,stateNameGroup:R,handleCmsData:T,handleRetailerStateSet:E,togglePreferencePopup:A,isOpenPreferencePopup:D,setIsPreferencePage:L,CurrentRetailerSelector:P}=S();return(0,l.useEffect)(()=>{e&&(c(!0),L(!0))},[e]),(0,t.jsx)(s.Modal,{open:D,handleClose:()=>{},className:" md:w-[700px] md:rounded-lg sb w-[100%] !max-h-[80%] rounded-lg",padding:"px-[17px]",children:(0,t.jsx)(P,{retailerId:i,orderType:a,commonCMSData:r,retailerList:n,canSelectedRetailerId:d??!1,setIsOpenPreferencePopup:c,active:o,setActive:x,scrollTopRef:m,canStateSelect:p,isCurbsidePickup:u,modalCmsData:h,setModalCmsData:g,allRetailer:f,setAllRetailer:y,showSkeleton:j,setShowSkeleton:b,selectedState:v,setSelectedState:N,open:C,setOpen:w,savedState:k,groupedAddresses:M,stateNameGroup:R,handleCmsData:T,handleRetailerStateSet:E,togglePreferencePopup:A})})}],43161)},288828,e=>{"use strict";var t=e.i(843476),s=e.i(763963),l=e.i(791450),i=e.i(78023),a=e.i(258288),r=e.i(701973),n=e.i(481964),d=e.i(137963),c=e.i(630233),o=e.i(522016),x=e.i(271645);let m="PICKUP",p=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]});e.s(["default",0,({retailer:e,isSidebar:u=!1,selected:h})=>{let{handleSwitchRetailer:g,loadingButtonIndex:f,handleShowLocationAlert:y}=(0,i.useHandleSwitchRetailer)(e),[j,b]=(0,x.useState)(!1),{commonCMSData:v,retailerId:N,menuType:C}=(0,a.useGlobalStore)(),w={},S=(0,r.getRetailerHours)(e);if(S?.specialHours!=null&&S?.specialHours!="null"&&S?.specialHours!=void 0){let e=(0,n.todaySpecialsHours)(S?.specialHours,"pickup");e&&Object?.keys?.(e)?.length&&(w=e)}let k=(0,r.getTodayHours)(S?.pickup);(0,x.useEffect)(()=>{e&&m&&b((0,r.getTodayRetailerActive)(m,e))},[e,m]);let M=({menuType:s,index:l,isDesktop:i=!1,isSidebar:a=!1})=>{let r="MEDICAL"===s.trim().toUpperCase(),n=e?.id==N&&C===s.toUpperCase(),c=v?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return r&&!c?null:(0,t.jsx)("button",{className:`
36          whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
37          ${i?"px-7":"px-5"} py-1.5 rounded-full
38          flex items-center justify-center
39          ${a?"text-xs font-medium !px-3":""}
40        `,onClick:()=>{n?y(m):g(s,l,m,!i,e?.id)},disabled:null!==f,children:f===l?(0,t.jsx)(p,{}):r&&n?"Shopping Medical":c&&n?"Shopping Recreational":n&&!c?"Shopping This Location":n||c?`Shop ${(0,d.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsx)("div",{className:`bg-white py-5 border-b ${u?"cursor-pointer":""}`,children:(0,t.jsxs)("div",{className:`${u&&"flex items-start gap-2"}`,children:[u&&(0,t.jsx)(s.default,{checked:h,cls:"mt-8"}),(0,t.jsxs)("div",{className:"w-full",children:[u&&e?.id==N&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 mb-1",children:[(0,t.jsx)("p",{className:`font-semibold text-xl max-sm:text-base text-gray-800 ${u?"!text-lg":""}`,children:e?.name}),e?.locationDetail&&(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md py-0.5 px-4 text-sm font-medium flex items-center gap-1 primary-text mr-2",children:[parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","mi"]})]}),(0,t.jsxs)("div",{className:`text-xs md:text-base font-medium text-gray-800 w-full ${u?"!text-sm font-normal":""}`,children:[e.address," ",(0,t.jsx)("br",{}),e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)(o.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base text-secondary_text mt-2",children:["Call : ",e?.contactNumber]}),(0,t.jsxs)("div",{className:"flex items-start gap-1 mt-2 md:mb-4 mb-3 text-gray-800",children:[(0,t.jsx)(c.Clock,{size:18,className:"mt-1"}),(0,t.jsx)("p",{className:` font-medium md:text-base text-sm ${u?"!text-sm":""}`,children:w?.active?`${w?.start} - ${w?.end}`:Object.keys(w)?.length>0&&!w?.specialDateRangeCheckStatus?`Closed | Special Hours: ${w?.name}`:k})]}),!u&&(0,t.jsx)("div",{className:`flex gap-3 md:hidden ${e?.menuTypes?.length===1?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(M,{menuType:e,index:s,isSidebar:u},s))}),!u&&(0,t.jsx)("div",{className:`hidden md:flex gap-3 ${e?.menuTypes?.length===1?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(M,{menuType:e,index:s,isDesktop:!0,isSidebar:u},s))}),v?.retailerClosePopupCMS?.isTurnOn&&!j&&(0,t.jsx)(l.default,{})]})]})]})})}])},598503,458520,80700,e=>{"use strict";var t=e.i(843476),s=e.i(618566),l=e.i(701973),i=e.i(288828),a=e.i(690939),r=e.i(239932),n=e.i(283373),d=e.i(397247),c=e.i(83236);e.s(["default",0,e=>{let o=(0,s.usePathname)(),{searchInput:x,closetLocationChecker:m,setClosetLocationChecker:p,searchResults:u,handleSearch:h,handleGetUserLocation:g,loading:f,retailerLoader:y,retailerId:j,setSearchInput:b,containerRef:v,canStateSelect:N,getDeliveryAddressList:C,onEmptyInput:w,searchZipInput:S,handleSearchZip:k}=(0,n.default)({allRetailer:e?.allRetailer||[],fulfillmentKey:"pickup"});return(0,t.jsx)("div",{className:"relative",children:e?.location?(0,t.jsx)(a.default,{}):(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)(r.default,{searchInput:x,handleSearch:h,setSearchInput:b,
40isSidebar:e?.isSidebar||!1,getDeliveryAddressList:C,onEmptyInput:w,searchZipInput:S,handleSearchZip:k}),(0,t.jsxs)("div",{className:"text-sm primary-text flex gap-1 cursor-pointer pb-4 border-b",onClick:()=>{p(!0),g()},children:[(0,t.jsx)(c.PaperPlaneTilt,{weight:"fill",size:20})," Use my current location"]}),f||y?(0,t.jsx)(d.default,{}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===o?"":" md:h-full md:overflow-hidden"}`,children:!y&&(0,t.jsx)(t.Fragment,{children:u?.length>0?(0,t.jsx)("div",{ref:v,className:`overflow-y-auto sb mt-2 ${e.isSidebar?e?.selectedRetailer?.id?!N?"h-[calc(100dvh-320px)]":"h-[calc(100dvh-390px)]":!N?"h-[calc(100dvh-250px)]":"h-[calc(100dvh-350px)]":"2xl:h-[34vh] xl:h-[30vh] md:h-[28vh]"}`,children:(0,l.sortRetailersByAlphabetically)(u,m)?.map((s,l)=>(0,t.jsx)("div",{children:e.isSidebar?(0,t.jsx)("div",{onClick:()=>{e?.setSelectedRetailer(s)},children:(0,t.jsx)(i.default,{retailer:s,isSidebar:e?.isSidebar||!1,selected:(e?.selectedRetailer?.id||j)===s?.id})}):(0,t.jsx)(i.default,{retailer:s,isSidebar:e?.isSidebar||!1,selected:(e?.selectedRetailer?.id||j)===s?.id})},"pickup-shop-card"+l))}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:x?"We are sorry, currently no retailer is found.":"We are sorry, currently no retailer is found near your current location."})})})})]})})}],598503);var o=e.i(763963),x=e.i(791450),m=e.i(78023),p=e.i(258288),u=e.i(481964),h=e.i(137963),g=e.i(522016),f=e.i(271645),y=e.i(630233);let j="CURBSIDE_PICKUP",b=({retailer:e,isSidebar:s=!1,selected:i})=>{let{handleSwitchRetailer:a,loadingButtonIndex:r,handleShowLocationAlert:n}=(0,m.useHandleSwitchRetailer)(e),[d,c]=(0,f.useState)(!1),{commonCMSData:b,retailerId:N,menuType:C}=(0,p.useGlobalStore)(),w={},S=(0,l.getRetailerHours)(e);if(S?.specialHours!=null&&S?.specialHours!="null"&&S?.specialHours!=void 0){let e=(0,u.todaySpecialsHours)(S?.specialHours,"curbsidePickup");e&&Object?.keys?.(e)?.length&&(w=e)}let k=(0,l.getTodayHours)(S?.curbsidePickup);(0,f.useEffect)(()=>{e&&j&&c((0,l.getTodayRetailerActive)(j,e))},[e,j]);let M=({menuType:s,index:l,isDesktop:i=!1,isSidebar:d=!1})=>{let c="MEDICAL"===s.trim().toUpperCase(),o=e?.id==N&&C===s.toUpperCase(),x=b?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return c&&!x?null:(0,t.jsx)("button",{className:`
41          whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
42          ${i?"px-7":"px-5"} py-1.5 rounded-full
43          flex items-center justify-center
44          ${d?"text-xs font-medium !px-3":""}
45        `,onClick:()=>{o?n(j):a(s,l,j,!i,e?.id)},disabled:null!==r,children:r===l?(0,t.jsx)(v,{}):c&&o?"Shopping Medical":x&&o?"Shopping Recreational":o&&!x?"Shopping This Location":o||x?`Shop ${(0,h.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsxs)("div",{className:"bg-white py-5  border-b cursor-pointer",children:[(0,t.jsxs)("div",{className:`${s&&"flex items-start gap-2"}`,children:[s&&(0,t.jsx)(o.default,{checked:i,cls:"mt-8"}),(0,t.jsxs)("div",{className:"w-full",children:[s&&e?.id==N&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 mb-1",children:[(0,t.jsx)("p",{className:`font-semibold text-xl max-sm:text-base ${s?"!text-lg":""}`,children:e?.name}),e?.locationDetail&&(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md py-0.5 px-4 text-sm font-medium flex items-center gap-1 primary-text mr-2",children:[parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","mi"]})]}),(0,t.jsxs)("div",{className:`text-xs md:text-base font-medium text-gray-800 w-full ${s?"!text-sm font-normal":""}`,children:[e.address," ",(0,t.jsx)("br",{}),e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)(g.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base text-secondary_text mt-2",children:["Call : ",e?.contactNumber]}),(0,t.jsxs)("div",{className:"flex items-start gap-1 mt-2 md:mb-4 mb-3 text-gray-800",children:[(0,t.jsx)(y.Clock,{size:18,className:"mt-1"}),(0,t.jsx)("p",{className:` font-medium md:text-base text-sm ${s?"!text-sm":""}`,children:w?.active?`${w?.start} - ${w?.end}`:Object.keys(w)?.length>0&&!w?.specialDateRangeCheckStatus?`Closed | Special Hours: ${w?.name}`:k})]}),!s&&(0,t.jsx)("div",{className:`flex gap-3 md:hidden ${e?.menuTypes?.length===1?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,l)=>(0,t.jsx)(M,{menuType:e,index:l,isSidebar:s},l))}),!s&&(0,t.jsx)("div",{className:`hidden md:flex gap-3 ${e?.menuTypes?.length===1?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,l)=>(0,t.jsx)(M,{menuType:e,index:l,isDesktop:!0,isSidebar:s},l))})]})]})]}),b?.retailerClosePopupCMS?.isTurnOn&&!d&&(0,t.jsx)(x.default,{})]})},v=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]});e.s(["default",0,e=>{let i=(0,s.usePathname)(),{searchInput:o,closetLocationChecker:x,setClosetLocationChecker:m,searchResults:p,handleSearch:u,handleGetUserLocation:h,loading:g,retailerLoader:f,checkTotalRetailers:y,setSearchInput:j,containerRef:v,getDeliveryAddressList:N,canStateSelect:C,retailerId:w,onEmptyInput:S,searchZipInput:k,handleSearchZip:M}=(0,n.default)({allRetailer:e?.allRetailer||[],fulfillmentKey:"curbsidePickup"});return(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(a.default,{}):(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)(r.default,{searchInput:o,handleSearch:u,setSearchInput:j,isSidebar:e?.isSidebar||!1,getDeliveryAddressList:N,onEmptyInput:S,searchZipInput:k,handleSearchZip:M}),(0,t.jsxs)("div",{className:"text-sm primary-text flex gap-1 cursor-pointer pb-4 border-b",onClick:()=>{m(!0),h()},children:[(0,t.jsx)(c.PaperPlaneTilt,{weight:"fill",size:20})," Use my current location"]}),g||f?(0,t.jsx)(d.default,{}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===i?"":" md:h-full md:overflow-hidden"}`,children:!f&&(0,t.jsx)(t.Fragment,{children:p?.length>0?(0,t.jsx)("div",{ref:v,className:`overflow-y-auto sb mt-2 ${e?.isSidebar?e?.selectedRetailer?.id?!C?"h-[calc(100dvh-320px)]":"h-[calc(100dvh-390px)]":!C?"h-[calc(100dvh-250px)]":"h-[calc(100dvh-350px)]":"2xl:h-[34vh] xl:h-[30vh] md:h-[28vh]"}`,children:(0,l.sortRetailersByAlphabetically)(p,x)?.map((s,l)=>(0,t.jsx)("div",{children:e?.isSidebar?(0,t.jsx)("div",{onClick:()=>e?.setSelectedRetailer(s),children:(0,t.jsx)(b,{retailer:s,isSidebar:e?.isSidebar||!1,selected:(e?.selectedRetailer?.id||w)===s?.id})}):(0,t.jsx)(b,{retailer:s,isSidebar:e?.isSidebar||!1,selected:(e?.selectedRetailer?.id||w)===s?.id})},"curbside-shop-card"+l))}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:o||y?"We are sorry, currently no retailer is found.":"We are sorry, currently no retailer is found near your current location."})})})})]})})}],458520);var N=e.i(389222),C=e.i(657688),w=e.i(61150);let S=({locationData:e,deliveryAddress:s,orderType:i,skeletonHoldSearch:a,isSidebar:r=!1,selected:n})=>{let{commonCMSData:d,retailerId:c,menuType:g}=(0,p.useGlobalStore)(),[y,j]=(0,f.useState)(!1),{handleSwitchRetailer:b,loadingButtonIndex:v,handleShowLocationAlert:N}=(0,m.useHandleSwitchRetailer)(e,s),C={},w=(0,l.getRetailerHours)(e);if(w?.specialHours!=null&&w?.specialHours!="null"&&w?.specialHours!=void 0){let e=(0,u.todaySpecialsHours)(w?.specialHours,"delivery");e&&Object?.keys?.(e)?.length&&(C=e)}let S=(0,l.getTodayHours)(w?.delivery);(0,f.useEffect)(()=>{e&&i&&j((0,l.getTodayRetailerActive)(i,e))},[e,i]);let R=({menuType:s,index:l,isDesktop:a=!1,isSidebar:r=!1})=>{let n="MEDICAL"===s.trim().toUpperCase(),o=e?.id==c&&g===s.toUpperCase(),x=d?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return n&&!x?null:(0,t.jsx)("button",{className:`
46          whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
47          ${a?"px-7":"px-5"} py-1.5 rounded-full
48          flex items-center justify-center  max-sm:text-xs
49          ${r?"text-xs font-medium !px-3":""}
50        `,onClick:()=>{o?N(i):b(s,l,i,!a,e?.id)},disabled:null!==v,children:v===l?(0,t.jsx)(M,{}):n&&o?"Shopping Medical":x&&o?"Shopping Recreational":o&&!x?"Shopping This Location":o||x?`Shop ${(0,h.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsx)(t.Fragment,{children:a?(0,t.jsx)(k,{}):(0,t.jsxs)("div",{className:"bg-white py-5  border-b cursor-pointer",children:[(0,t.jsxs)("div",{className:`${r&&"flex items-start gap-2"}`,children:[r&&(0,t.jsx)(o.default,{checked:n,cls:"mt-8"}),(0,t.jsxs)("div",{className:"w-full",children:[r&&e?.id==c&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"px-2 pb-2",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("h2",{className:`font-semibold text-xl max-sm:text-base ${r?"!text-lg":""}`,children:e?.name}),(0,t.jsxs)("p",{className:"border border-gray-200 rounded-md py-0.5 px-4 text-sm font-medium flex items-center gap-1 primary-text mr-2 flex-shrink-0",children:[e?.locationDetail?.distance?.toFixed(2)," mi"]})]}),(0,t.jsx)("p",{className:"text-secondary_text  text-sm",children:e?.address})]}),(0,t.jsx)("div",{className:"grid grid-cols-2",children:(0,t.jsx)("p",{className:` font-medium md:text-base text-sm ${r?"!text-sm":""}`,children:C?.active?`${C?.start} - ${C?.end}`:Object.keys(C)?.length>0&&!C?.specialDateRangeCheckStatus?`Closed | Special Hours: ${C?.name}`:S})}),!r&&(0,t.jsx)("div",{className:`flex mt-2 gap-3 md:hidden ${e?.menuTypes?.length===1?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(R,{menuType:e,index:s,isSidebar:r},s))}),!r&&(0,t.jsx)("div",{className:`hidden md:flex mt-2 gap-3 ${e?.menuTypes?.length===1?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(R,{menuType:e,index:s,isDesktop:!0,isSidebar:r},s))})]})]})]}),d?.retailerClosePopupCMS?.isTurnOn&&!y&&(0,t.jsx)(x.default,{})]})})},k=()=>(0,t.jsxs)("div",{role:"status",className:"p-4 border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700 w-full mb-4 rounded-xl",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("svg",{className:"w-10 h-10 me-3 text-gray-200 dark:text-gray-700 global-heading-color","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"
50currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"}),(0,t.jsx)("div",{className:"w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700"}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]}),M=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]});e.s(["default",0,e=>{let{inputValue:s,search:i,loading:r,skeletonHoldSearch:n,retailerList:d,setSkeletonHoldSearch:o,setSearch:x,setInputValue:m,handleGetUserLocation:u,setUserLocation:h}=(0,N.useGoogleMapLocation)(),{retailerId:g,commonCMSData:y}=(0,p.useGlobalStore)(),[j,b]=(0,f.useState)(!1),[v,k]=(0,f.useState)(!1),[M,R]=(0,f.useState)(!1),T=y?.stateSelectionSettingsCMS?.enableStateSelector;return(0,f.useEffect)(()=>{if(d&&d?.length){for(let e of d)if(e?.locationDetail?.validForDelivery){b(!0),k(!0);return}b(!0)}else b(!0),k(!1)},[d]),(0,t.jsx)("div",{children:e.location?(0,t.jsx)(a.default,{}):(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsx)("div",{className:" w-[30px] md:w-[50px] h-[30px] md:h-[50px] relative",children:(0,t.jsx)(C.default,{src:e?.deliveryicon,fill:!0,alt:""})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:" text-sm md:text-base font-medium",children:e?.deliverytitle}),(0,t.jsx)("p",{className:" text-xs text-secondary_text",children:e?.deliverysubtitle})]})]}),(0,t.jsx)(w.default,{onPlaceSelected:e=>(e=>{if(R(!0),!e.geometry||!e.geometry.location){x({latitude:0,longitude:0}),m("");return}(e?.geometry?.viewport||e?.geometry?.location)&&(o(!0),h(null),x({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),m(e.formatted_address))})(e)}),(0,t.jsxs)("div",{className:" text-sm primary-text flex gap-1 pl-2 cursor-pointer w-fit",onClick:()=>{R(!0),u()},children:[(0,t.jsx)(c.PaperPlaneTilt,{weight:"fill",size:20})," Use my current location"]}),r?(0,t.jsx)("div",{className:"flex justify-center items-center mt-6",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-primary-text",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.
501071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]})}):(0,t.jsx)("div",{className:`${!e.isSidebar?e?.selectedRetailer?.id?!T?"h-[calc(100dvh-320px)]":"h-[calc(100dvh-390px)]":!T?"h-[calc(100dvh-250px)]":"h-[calc(100dvh-350px)]":"2xl:h-[50vh] xl:h-[40vh] md:h-[35vh]"} overflow-y-auto mt-5 md:pr-4 sb`,children:i?.latitude!==0?(0,t.jsxs)(t.Fragment,{children:[d?.length>0?(0,l.sortRetailersByAlphabetically)(d,M)?.map((l,i)=>(0,t.jsx)("div",{children:l?.locationDetail?.validForDelivery?(0,t.jsx)("div",{onClick:()=>e?.setSelectedRetailer(l),children:(0,t.jsx)(S,{locationData:l,deliveryAddress:s??"",orderType:"DELIVERY",skeletonHoldSearch:n,isSidebar:e?.isSidebar||!1,selected:(e?.selectedRetailer?.id||g)===l.id})}):(0,t.jsx)(t.Fragment,{})},"RetailerDataGlobal"+i)):(0,t.jsx)(t.Fragment,{}),j&&!v?(0,t.jsxs)("div",{className:"2xl:mb-5 mb-3",children:[(0,t.jsx)("h2",{className:" md:text-base text-sm font-medium text-[#CA024F] md:text-center mb-4",children:"We don't deliver to this address."}),(0,t.jsx)("p",{className:" md:text-base text-sm text-gray-600 font-medium md:text-center",children:"You can still place an order online for in-store pickup or explore cannabis to find products at a store near you."})]}):(0,t.jsx)(t.Fragment,{})]}):""})]})})}],80700)},91607,e=>{"use strict";var t=e.i(843476),s=e.i(701973),l=e.i(657688),i=e.i(587658),a=e.i(596924),r=e.i(137963),n=e.i(598503),d=e.i(458520),c=e.i(80700),o=e.i(534162),x=e.i(577854),m=e.i(703803),p=e.i(881886),u=e.i(301575);e.s(["default",0,({retailerId:e,commonCMSData:h,canSelectedRetailerId:g,setIsOpenPreferencePopup:f,active:y,setActive:j,scrollTopRef:b,canStateSelect:v,isCurbsidePickup:N,modalCmsData:C,selectedState:w,setSelectedState:S,open:k,showSkeleton:M,stateNameGroup:R,allRetailer:T,handleRetailerStateSet:E,togglePreferencePopup:A})=>(0,t.jsxs)("div",{className:"py-10 md:py-14 px-4 md:px-12",ref:b,children:[e?(0,t.jsx)(x.X,{onClick:()=>f(!1),className:"absolute top-3 right-5 text-3xl bg-white z-10 p-1 cursor-pointer"}):null,!v||w||e?(0,t.jsxs)(t.Fragment,{children:[M?(0,t.jsx)("div",{className:"hidden md:block mb-3",children:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-[100px] md:w-[150px] 2xl:w-[200px] h-[42px] md:h-[62px] 2xl:h-[100px] relative mb-3",children:(0,t.jsx)("div",{className:"bg-slate-200 h-[40px] w-[40px] md:h-[60px] md:w-[60px] rounded-full"})}),(0,t.jsx)("div",{className:"bg-slate-200 h-[20px] w-[350px] md:h-[20px] md:w-[350px] mb-3"}),(0,t.jsx)("div",{className:"bg-slate-200 h-[15px] w-[250px] md:h-[15px] md:w-[250px] mb-3"}),(0,t.jsx)("div",{className:"bg-slate-200 h-[15px] w-[150px] md:h-[15px] md:w-[150px] mb-3"})]})}):(0,t.jsxs)("div",{className:"mb-7",children:[R?.length>1&&!g&&(0,t.jsx)("div",{onClick:()=>{S(""),j("PICKUP")},className:"cursor-pointer font-medium text-gray-400 hover:text-gray-800 hover:bg-gray-200 hover:rounded-md transition-all duration-400 px-2 py-2 w-fit",children:(0,t.jsx)(u.ArrowLeft,{className:"text-lg"})}),(0,t.jsx)("div",{children:(0,t.jsx)(l.default,{src:h?.locationPreference?.image||"",className:"w-[50px] md:w-[60px] 2xl:w-[60px] mx-auto relative object-contain",alt:h?.locationPreference?.imageAlt||"",title:h?.locationPreference?.imageTitle||"",width:85,height:85})}),(0,t.jsxs)("div",{className:"max-w-[290px] mx-auto space-y-2",children:[(0,t.jsx)("p",{className:" text-2xl font-semibold mt-2 text-center",children:h?.locationPreference?.title}),(0,t.jsx)("p",{className:"text-center font-medium text-sm text-gray-600 px-4",children:h?.locationPreference?.subTitle})]})]}),(0,t.jsxs)("div",{className:(0,r.cn)("grid grid-cols-2 gap-5 mb-4",(N||!h?.deliverySettingsCMS?.hideDeliveryBtn)&&"grid-cols-2",N&&!h?.deliverySettingsCMS?.hideDeliveryBtn&&"grid-cols-3"),children:[(0,t.jsx)(o.Tab,{title:"PICKUP",active:y,setActive:j}),N&&(0,t.jsx)(o.Tab,{title:"CURBSIDE",active:y,setActive:j}),h?.deliverySettingsCMS?.hideDeliveryBtn?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)(o.Tab,{title:"DELIVERY",active:y,setActive:j})]}),(0,t.jsxs)("div",{children:["PICKUP"===y&&(0,t.jsx)(n.default,{pickuptext:C?.pickuptext,scrollTopRef:b.current,allRetailer:T,setSelectedRetailer:()=>{}}),"CURBSIDE"===y&&N&&(0,t.jsx)(d.default,{pickuptext:C?.pickuptext,scrollTopRef:b.current,allRetailer:T,setSelectedRetailer:()=>{}}),"DELIVERY"===y&&h&&h?.deliverySettingsCMS&&(h?.deliverySettingsCMS?.isActive?(0,t.jsx)(c.default,{deliverytext:C?.deliverytext,deliveryicon:C?.deliveryicon,deliverytitle:C?.deliverytitle,deliverysubtitle:C?.deliverysubtitle,setSelectedRetailer:()=>{}}):(0,t.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,t.jsx)("p",{className:"text-xl md:text-2xl font-semibold text-gray-800 text-center mt-5",children:"Sorry, delivery is currently unavailable."})}))]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4 justify-center",children:[(0,t.jsx)("div",{className:"w-full border-b py-4",children:(0,t.jsx)("p",{className:"text-2xl font-semibold text-center",children:"Select a State"})}),(0,t.jsx)("div",{className:"mx-1",children:R?.length>0?(0,s.sortArrayStateAlphabeticallyAfterFilter)(R)?.map((e,s)=>{let l=i.default.filter(t=>t.code==e);return(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2 rounded-full border shadow px-4 py-3 transition-all cursor-pointer secondary-button-hover",onClick:()=>E(e),children:[(0,t.jsxs)("span",{className:"w-full flex items-center gap-8",children:[(0,t.jsx)("span",{children:(0,t.jsx)(m.MapPin,{size:20})}),(0,t.jsx)("span",{className:"me-4 font-medium text-lg",children:l?.[0]?.name})]}),(0,t.jsx)(p.ArrowCircleRight,{size:20})]},"landing-map-one-item"+s)}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(a.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(a.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}})]})})]})]})])},479119,829209,631468,e=>{"use strict";var t=e.i(843476),s=e.i(618566),l=e.i(701973),i=e.i(791450),a=e.i(78023),r=e.i(258288),n=e.i(481964),d=e.i(137963),c=e.i(641840),o=e.i(630233),x=e.i(703803),m=e.i(522016),p=e.i(271645);let u="PICKUP",h=({retailer:e,isSidebar:s=!1,handlePreferenceDrawer:h})=>{let{handleSwitchRetailer:f,loadingButtonIndex:y,handleShowLocationAlert:j}=(0,a.useHandleSwitchRetailer)(e),[b,v]=(0,p.useState)(!1),{commonCMSData:N,retailerId:C,menuType:w}=(0,r.useGlobalStore)(),S={},k=(0,l.getRetailerHours)(e);if(k?.specialHours!=null&&k?.specialHours!="null"&&k?.specialHours!=void 0){let e=(0,n.todaySpecialsHours)(k?.specialHours,"pickup");e&&Object?.keys?.(e)?.length&&(S=e)}let M=(0,l.getTodayHours)(k?.pickup);(0,p.useEffect)(()=>{e&&u&&v((0,l.getTodayRetailerActive)(u,e))},[e,u]);let R=({menuType:s,index:l,isDesktop:i=!1,isSidebar:a=!1})=>{let r="MEDICAL"===s.trim().toUpperCase(),n=e?.id==C&&w===s.toUpperCase(),c=N?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return r&&!c?null:(0,t.jsx)("button",{className:`
51          whitespace-nowrap border border-gray-200 transition-all duration-500 ease-in-out
52          text-xs md:text-sm
53          ${i?"px-7":"px-5"} py-1.5 rounded-lg
54          flex items-center justify-center
55          ${a?"text-xs font-medium !px-3":""}
56          disabled:!bg-gray-200 disabled:!text-black
57          ${n?"fill-button":"outlined-button-hover"}
58        `,onClick:()=>{n?(j(u),h?.()):(f(s,l,u,!i,e?.id),a&&h?.())},disabled:null!==y,children:y===l?(0,t.jsx)(g,{}):r&&n?"Shopping Medical":c&&n?"Shopping Recreational":n&&!c?"Shopping This Location":n||c?`Shop ${(0,d.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsxs)("div",{className:"bg-white py-5 border-b pr-3 ",children:[(0,t.jsxs)("div",{className:`flex items-center gap-2 ${s&&"justify-between"}`,children:[(0,t.jsxs)("div",{className:"w-full",children:[s&&e?.id==C&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsx)("div",{className:"flex items-center justify-between gap-4 mb-1",children:(0,t.jsx)("p",{className:`font-semibold text-xl max-sm:text-base text-gray-800 ${s?"!text-lg":""}`,children:e?.name})}),(0,t.jsxs)("div",{className:`text-xs md:text-base font-medium text-gray-800 w-full ${s?"!text-sm font-normal":""}`,children:[(0,t.jsx)("p",{className:"text-wrap max-w-[90%]",children:e.address}),e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)(m.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base  mt-2",children:["Call : ",e?.contactNumber]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("div",{className:"flex items-start gap-1 mt-2 md:mb-4 mb-3 text-gray-800",children:[(0,t.jsx)(o.Clock,{size:18,className:"mt-1"}),(0,t.jsx)("p",{className:` font-medium md:text-base text-sm ${s?"!text-sm":""}`,children:S?.active?`${S?.start} - ${S?.end}`:Object.keys(S)?.length>0&&!S?.specialDateRangeCheckStatus?`Closed | Special Hours: ${S?.name}`:M})]}),e?.locationDetail&&(0,t.jsxs)("div",{className:"text-sm font-medium flex items-center gap-1 primary-text pb-2",children:[(0,t.jsx)(x.MapPin,{size:20}),(0,t.jsxs)("p",{children:[parseFloat(e?.locationDetail?.distance).toFixed(2)||0,"mi"]})]})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex flex-col gap-3 md:hidden ",style:{justifyContent:"start"},children:e?.menuTypes?.map((e,l)=>(0,t.jsx)(R,{menuType:e,index:l,isSidebar:s},l))}),(0,t.jsxs)("div",{className:"hidden md:flex flex-col gap-3 ",style:{justifyContent:"start"},children:[e?.menuTypes?.map((e,l)=>(0,t.jsx)(R,{menuType:e,index:l,isDesktop:!0,isSidebar:s},l)),s&&(0,t.jsx)(m.default,{href:(0,c.buildRetailerLocationHref)(e)??"#",onClick:()=>h?.(),className:"text-sm text-center font-medium text-[#1A56DB] cursor-pointer",children:"View store info"})]})]})]}),N?.retailerClosePopupCMS?.isTurnOn&&!b&&(0,t.jsx)(i.default,{})]})},g=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]});var f=e.i(690939),y=e.i(283373),j=e.i(239932),b=e.i(397247),v=e.i(83236);e.s(["default",0,e=>{let i=(0,s.usePathname)(),{searchInput:a,closetLocationChecker:r,setClosetLocationChecker:n,searchResults:d,handleSearch:c,handleGetUserLocation:o,loading:x,canStateSelect:m,retailerLoader:p,setSearchInput:u,containerRef:g,getDeliveryAddressList:N,onEmptyInput:C,searchZipInput:w,handleSearchZip:S}=(0,y.default)({allRetailer:e?.allRetailer||[],fulfillmentKey:"pickup"});return(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(f.default,{}):(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)(j.default,{searchInput:a,handleSearch:c,setSearchInput:u,isSidebar:e?.isSidebar||!1,getDeliveryAddressList:N,onEmptyInput:C,searchZipInput:w,handleSearchZip:S}),(0,t.jsxs)("div",{className:"text-sm primary-text flex gap-1 cursor-pointer pb-4 border-b",onClick:()=>{n(!0),o()},children:[(0,t.jsx)(v.PaperPlaneTilt,{weight:"fill",size:20})," Use my current location"]}),x||p?(0,t.jsx)(b.default,{}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===i?"":" md:h-full md:overflow-hidden"}`,children:!p&&(0,t.jsx)(t.Fragment,{children:d?.length>0?(0,t.jsx)("div",{ref:g,className:`overflow-y-auto sb mt-2 ${e.
58isSidebar?!m?"h-[calc(100dvh-400px)] max-sm:h-[calc(100dvh-343px)]":"h-[calc(100dvh-490px)] max-sm:h-[calc(100dvh-440px)]":"2xl:h-[34vh] xl:h-[30vh] md:h-[28vh]"}`,children:(0,l.sortRetailersByAlphabetically)(d,r)?.map((s,l)=>(0,t.jsx)(h,{retailer:s,isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer},"pickup-shop-card"+l))}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:a?"We are sorry, currently no retailer is found.":"We are sorry, currently no retailer is found near your current location."})})})})]})})}],479119);let N="CURBSIDE_PICKUP",C=({retailer:e,isSidebar:s=!1,handlePreferenceDrawer:u})=>{let{handleSwitchRetailer:h,loadingButtonIndex:g,handleShowLocationAlert:f}=(0,a.useHandleSwitchRetailer)(e),[y,j]=(0,p.useState)(!1),{commonCMSData:b,retailerId:v,menuType:C}=(0,r.useGlobalStore)(),S={},k=(0,l.getRetailerHours)(e);if(k?.specialHours!=null&&k?.specialHours!="null"&&k?.specialHours!=void 0){let e=(0,n.todaySpecialsHours)(k?.specialHours,"curbsidePickup");e&&Object?.keys?.(e)?.length&&(S=e)}let M=(0,l.getTodayHours)(k?.curbsidePickup);(0,p.useEffect)(()=>{e&&j((0,l.getTodayRetailerActive)(N,e))},[e]);let R=({menuType:s,index:l,isDesktop:i=!1,isSidebar:a=!1})=>{let r="MEDICAL"===s.trim().toUpperCase(),n=e?.id==v&&C===s.toUpperCase(),c=b?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return r&&!c?null:(0,t.jsx)("button",{className:`
59          whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out text-xs
60          ${i?"px-7":"px-5"} py-1.5 rounded-lg
61          flex items-center justify-center
62          ${a?"text-xs font-medium !px-3":""}
63          ${n&&"!bg-gray-200 !text-black"}
64        `,onClick:()=>{n?(f(N),u?.()):(h(s,l,N,!i,e?.id),a&&u?.())},disabled:null!==g,children:g===l?(0,t.jsx)(w,{}):r&&n?"Shopping Medical":c&&n?"Shopping Recreational":n&&!c?"Shopping This Location":n||c?`Shop ${(0,d.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsxs)("div",{className:"bg-white py-5 border-b pr-3 w-full",children:[(0,t.jsxs)("div",{className:`w-full flex items-center justify-between gap-2 ${s&&"justify-between"}`,children:[(0,t.jsxs)("div",{className:"w-full",children:[s&&e?.id==v&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsx)("div",{className:"flex items-center justify-between gap-4 mb-1",children:(0,t.jsx)("p",{className:`font-semibold text-xl max-sm:text-base ${s?"!text-lg":""}`,children:e?.name})}),(0,t.jsxs)("div",{className:`text-xs md:text-base font-medium text-gray-800 w-full ${s?"!text-sm font-normal":""}`,children:[(0,t.jsx)("p",{className:"text-wrap max-w-[90%]",children:e.address}),e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)(m.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base text-secondary_text mt-2",children:["Call : ",e?.contactNumber]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("div",{className:"flex items-start gap-1 mt-2 md:mb-4 mb-3 text-gray-800",children:[(0,t.jsx)(o.Clock,{size:18,className:"mt-1"}),(0,t.jsx)("p",{className:` font-medium md:text-base text-sm ${s?"!text-sm":""}`,children:S?.active?`${S?.start} - ${S?.end}`:Object.keys(S)?.length>0&&!S?.specialDateRangeCheckStatus?`Closed | Special Hours: ${S?.name}`:M})]}),e?.locationDetail&&(0,t.jsxs)("div",{className:"text-sm font-medium flex items-center gap-1 primary-text pb-2",children:[(0,t.jsx)(x.MapPin,{size:20}),(0,t.jsxs)("p",{children:[parseFloat(e?.locationDetail?.distance).toFixed(2)||0,"mi"]})]})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex flex-col gap-3 md:hidden ",style:{justifyContent:"start"},children:e?.menuTypes?.map((e,l)=>(0,t.jsx)(R,{menuType:e,index:l,isSidebar:s},l))}),(0,t.jsxs)("div",{className:"hidden md:flex flex-col gap-3 ",style:{justifyContent:"start"},children:[e?.menuTypes?.map((e,l)=>(0,t.jsx)(R,{menuType:e,index:l,isDesktop:!0,isSidebar:s},l)),s&&(0,t.jsx)(m.default,{href:(0,c.buildRetailerLocationHref)(e)??"#",onClick:()=>u?.(),className:"text-sm font-medium text-center text-[#1A56DB] cursor-pointer",children:"View store info"})]})]})]}),b?.retailerClosePopupCMS?.isTurnOn&&!y&&(0,t.jsx)(i.default,{})]})},w=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]});e.s(["default",0,e=>{let i=(0,s.usePathname)(),{searchInput:a,closetLocationChecker:r,setClosetLocationChecker:n,searchResults:d,handleSearch:c,handleGetUserLocation:o,loading:x,retailerLoader:m,checkTotalRetailers:p,setSearchInput:u,containerRef:h,getDeliveryAddressList:g,canStateSelect:N,onEmptyInput:w,searchZipInput:S,handleSearchZip:k}=(0,y.default)({allRetailer:e?.allRetailer||[],fulfillmentKey:"curbsidePickup"});return(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(f.default,{}):(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)(j.default,{searchInput:a,handleSearch:c,setSearchInput:u,isSidebar:e?.isSidebar||!1,getDeliveryAddressList:g,onEmptyInput:w,searchZipInput:S,handleSearchZip:k}),(0,t.jsxs)("div",{className:"text-sm primary-text flex gap-1 cursor-pointer pb-4 border-b",onClick:()=>{n(!0),o()},children:[(0,t.jsx)(v.PaperPlaneTilt,{weight:"fill",size:20})," Use my current location"]}),x||m?(0,t.jsx)(b.default,{}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===i?"":" md:h-full md:overflow-hidden"}`,children:!m&&(0,t.jsx)(t.Fragment,{children:d?.length>0?(0,t.jsx)("div",{ref:h,className:`overflow-y-auto sb mt-2 ${e.
64isSidebar?!N?"h-[calc(100dvh-400px)] max-sm:h-[calc(100dvh-343px)]":"h-[calc(100dvh-490px)] max-sm:h-[calc(100dvh-440px)]":"2xl:h-[34vh] xl:h-[30vh] md:h-[28vh]"}`,children:(0,l.sortRetailersByAlphabetically)(d,r)?.map((s,l)=>(0,t.jsx)(C,{retailer:s,isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer},"curbside-shop-card"+l))}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:a||p?"We are sorry, currently no retailer is found.":"We are sorry, currently no retailer is found near your current location."})})})})]})})}],829209);var S=e.i(389222),k=e.i(657688),M=e.i(61150),R=e.i(726027);let T=({locationData:e,deliveryAddress:s,orderType:d,skeletonHoldSearch:c,isSidebar:u=!1,handlePreferenceDrawer:h})=>{let{commonCMSData:g,menuType:f,retailerId:y}=(0,r.useGlobalStore)(),[j,b]=(0,p.useState)(!1),{handleSwitchRetailer:v,handleShowLocationAlert:N}=(0,a.useHandleSwitchRetailer)(e,s),C={},w=(0,l.getRetailerHours)(e);if(w?.specialHours!=null&&w?.specialHours!="null"&&w?.specialHours!=void 0){let e=(0,n.todaySpecialsHours)(w?.specialHours,"delivery");e&&Object?.keys?.(e)?.length&&(C=e)}let S=(0,l.getTodayHours)(w?.delivery);return(0,p.useEffect)(()=>{e&&d&&b((0,l.getTodayRetailerActive)(d,e))},[e,d]),(0,t.jsx)(t.Fragment,{children:c?(0,t.jsx)(E,{}):(0,t.jsxs)("div",{className:"bg-white py-5  border-b",children:[(0,t.jsxs)("div",{className:`flex items-center gap-2 ${u&&"justify-between"}`,children:[(0,t.jsxs)("div",{className:"",children:[u&&e?.id==y&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)("h2",{className:`font-semibold text-xl max-sm:text-base ${u?"!text-lg":""}`,children:e?.name}),(0,t.jsx)("p",{className:"text-wrap max-w-[90%]",children:e?.address})]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("div",{className:"flex items-start gap-1 mt-2 md:mb-4 mb-3 text-gray-800",children:[(0,t.jsx)(o.Clock,{size:18,className:"mt-1"}),(0,t.jsx)("p",{className:` font-medium md:text-base text-sm ${u?"!text-sm":""}`,children:C?.active?`${C?.start} - ${C?.end}`:Object.keys(C)?.length>0&&!C?.specialDateRangeCheckStatus?`Closed | Special Hours: ${C?.name}`:S})]}),(0,t.jsxs)("div",{className:"text-sm font-medium flex items-center gap-1 primary-text pb-2",children:[(0,t.jsx)(x.MapPin,{size:20}),e?.locationDetail?.distance?.toFixed(2)," mi"]})]})]}),(0,t.jsx)("div",{className:"px-2 pb-2",children:(0,t.jsx)("div",{className:"pt-4",children:e?.id=="4cc2d3df-07ec-492b-9a57-ccc600577517"?(0,t.jsx)(R.default,{className:"cursor-default	 w-max whitespace-nowrap group-hover:!bg-white group-hover:border-[#34A203] group-hover:border  pointer-none !px-4",children:"Coming Soon"}):(0,t.jsxs)(t.Fragment,{children:[e?.id?(0,t.jsx)("div",{className:"flex flex-col gap-3 flex-row-reverse",style:{justifyContent:"start"},children:e?.menuTypes?.map((s,l)=>"RECREATIONAL"===s?(0,t.jsx)("button",{onClick:()=>{e?.id==y&&"RECREATIONAL"==f?(N("DELIVERY"),h?.()):(v(s,l,"DELIVERY",!0,e?.id),u&&h?.())},className:`
65                                    whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
66                                    md:px-7 px-5 py-1.5 rounded-lg
67                                    flex items-center justify-center 
68                                    ${u?"text-xs font-medium !px-3":""}
69                                    disabled:!bg-gray-200 disabled:!text-black
70                                    ${e?.id==y&&"RECREATIONAL"==f&&"bg-gray-200 text-black"}
71                                  `,children:e?.id==y&&"RECREATIONAL"==f?(0,t.jsx)(t.Fragment,{children:g?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shopping Recreational":"Shopping This Location"}):(0,t.jsx)(t.Fragment,{children:g?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shop Recreational":"Shop This Location"})},l):"MEDICAL"===s&&g?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?(0,t.jsx)("button",{onClick:()=>{e?.id==y&&"MEDICAL"==f?N("DELIVERY"):(v(s,l,"DELIVERY",!0,e?.id),u&&h?.())},className:`
72                                    whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
73                                    md:px-7 px-5 py-1.5 rounded-lg
74                                    flex items-center justify-center
75                                    ${u?"text-xs font-medium !px-3":""}
76                                    ${e?.id==y&&"MEDICAL"==f&&"bg-gray-200 text-black"}
77                                  `,children:e?.id==y&&"MEDICAL"==f?(0,t.jsx)(t.Fragment,{children:"Shopping Medical"}):(0,t.jsx)(t.Fragment,{children:"Shop Medical"})},l):void 0)}):(0,t.jsx)(t.Fragment,{}),u&&(0,t.jsx)(m.default,{href:`/${e?.urlSlug?e?.urlSlug:e?.id}`,onClick:()=>h?.(),className:"text-sm text-center font-medium text-[#1A56DB] cursor-pointer mt-3",children:"View store info"})]})})})]}),g?.retailerClosePopupCMS?.isTurnOn&&!j&&(0,t.jsx)(i.default,{})]})})},E=()=>(0,t.jsxs)("div",{role:"status",className:"p-4 border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700 w-full mb-4 rounded-xl",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("svg",{className:"w-10 h-10 me-3 text-gray-200 dark:text-gray-700 global-heading-color","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"
77currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"}),(0,t.jsx)("div",{className:"w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700"}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]});e.s(["default",0,e=>{let{inputValue:s,search:i,loading:a,skeletonHoldSearch:n,retailerList:d,setSkeletonHoldSearch:c,setSearch:o,setInputValue:x,handleGetUserLocation:m,setUserLocation:u}=(0,S.useGoogleMapLocation)(),{commonCMSData:h}=(0,r.useGlobalStore)(),[g,y]=(0,p.useState)(!1),[j,b]=(0,p.useState)(!1),[N,C]=(0,p.useState)(!1),w=h?.stateSelectionSettingsCMS?.enableStateSelector;return(0,p.useEffect)(()=>{if(d&&d?.length){for(let e of d)if(e?.locationDetail?.validForDelivery){y(!0),b(!0);return}y(!0)}else y(!0),b(!1)},[d]),(0,t.jsx)("div",{children:e.location?(0,t.jsx)(f.default,{}):(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsx)("div",{className:" w-[30px] md:w-[50px] h-[30px] md:h-[50px] relative",children:(0,t.jsx)(k.default,{src:e?.deliveryicon,fill:!0,alt:""})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:" text-sm md:text-base font-medium",children:e?.deliverytitle}),(0,t.jsx)("p",{className:" text-xs text-secondary_text",children:e?.deliverysubtitle})]})]}),(0,t.jsx)(M.default,{onPlaceSelected:e=>(e=>{if(C(!0),!e.geometry||!e.geometry.location){o({latitude:0,longitude:0}),x("");return}(e?.geometry?.viewport||e?.geometry?.location)&&(c(!0),u(null),o({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),x(e.formatted_address))})(e)}),(0,t.jsxs)("div",{className:" text-sm primary-text flex gap-1 pl-2 cursor-pointer border-b pb-3",onClick:()=>{C(!0),m()},children:[(0,t.jsx)(v.PaperPlaneTilt,{weight:"fill",size:20})," Use my current location"]}),a?(0,t.jsx)("div",{className:"flex justify-center items-center mt-6",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-primary-text",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]})}):(0,t.jsx)("div",{className:`${e.isSidebar?!w?"h-[calc(100dvh-400px)] max-sm:h-[calc(100dvh-343px)]":"h-[calc(100dvh-49
770px)] max-sm:h-[calc(100dvh-440px)]":"2xl:h-[50vh] xl:h-[40vh] md:h-[35vh]"} overflow-y-auto mt-5 md:pr-4 sb`,children:i?.latitude!==0?(0,t.jsxs)(t.Fragment,{children:[d?.length>0?(0,l.sortRetailersByAlphabetically)(d,N)?.map((l,i)=>(0,t.jsx)("div",{children:l?.locationDetail?.validForDelivery?(0,t.jsx)(T,{locationData:l,deliveryAddress:s??"",orderType:"DELIVERY",skeletonHoldSearch:n,isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer}):(0,t.jsx)(t.Fragment,{})},"RetailerDataGlobal"+i)):(0,t.jsx)(t.Fragment,{}),g&&!j?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"2xl:mb-5 mb-3",children:[(0,t.jsx)("h2",{className:" md:text-base text-sm font-medium text-[#CA024F] md:text-center mb-4",children:"We don't deliver to this address."}),(0,t.jsx)("p",{className:" md:text-base text-sm text-gray-600 font-medium md:text-center",children:"You can still place an order online for in-store pickup or explore cannabis to find products at a store near you."})]})}):(0,t.jsx)(t.Fragment,{})]}):""})]})})}],631468)},533752,139154,e=>{"use strict";var t=e.i(843476),s=e.i(701973),l=e.i(657688),i=e.i(587658),a=e.i(137963),r=e.i(479119),n=e.i(829209),d=e.i(631468),c=e.i(596924),o=e.i(577854),x=e.i(703803),m=e.i(881886),p=e.i(301575);let u=({title:e,active:l,setActive:i})=>(0,t.jsxs)("div",{className:"flex justify-center items-center gap-2 cursor-pointer relative",onClick:()=>i(e),children:[(0,t.jsx)("p",{className:`text-xs md:text-base font-semibold text-center  ${l===e?"text-primary":"text-gray-800"}`,children:(0,s.makeTitleCase)(e)}),l===e&&(0,t.jsx)("div",{className:"absolute -bottom-3 left-0 w-full h-[2px] bg-primary"})]});e.s(["default",0,({retailerId:e,commonCMSData:h,canSelectedRetailerId:g,setIsOpenPreferencePopup:f,active:y,setActive:j,scrollTopRef:b,canStateSelect:v,isCurbsidePickup:N,modalCmsData:C,selectedState:w,setSelectedState:S,showSkeleton:k,stateNameGroup:M,allRetailer:R,handleRetailerStateSet:T})=>(0,t.jsxs)("div",{className:"py-10 px-4 md:px-10",ref:b,children:[e?(0,t.jsx)(o.X,{onClick:()=>f(!1),className:"absolute top-3 right-5 text-3xl bg-white z-10 p-1 cursor-pointer"}):null,!v||w||e?(0,t.jsxs)(t.Fragment,{children:[k?(0,t.jsx)("div",{className:"hidden md:block mb-3",children:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-[100px] md:w-[150px] 2xl:w-[200px] h-[42px] md:h-[62px] 2xl:h-[100px] relative mb-3",children:(0,t.jsx)("div",{className:"bg-slate-200 h-[40px] w-[40px] md:h-[60px] md:w-[60px] rounded-full"})}),(0,t.jsx)("div",{className:"bg-slate-200 h-[20px] w-[350px] md:h-[20px] md:w-[350px] mb-3"}),(0,t.jsx)("div",{className:"bg-slate-200 h-[15px] w-[250px] md:h-[15px] md:w-[250px] mb-3"}),(0,t.jsx)("div",{className:"bg-slate-200 h-[15px] w-[150px] md:h-[15px] md:w-[150px] mb-3"})]})}):(0,t.jsxs)("div",{children:[M?.length>1&&!g&&(0,t.jsx)("div",{onClick:()=>{S(""),j("PICKUP")},className:"cursor-pointer font-medium  text-gray-400 hover:text-gray-800 hover:bg-gray-200 hover:rounded-md transition-all duration-400 px-2 py-2 w-fit",children:(0,t.jsx)(p.ArrowLeft,{className:"text-lg "})}),(0,t.jsxs)("div",{className:"mx-auto flex flex-col items-center justify-center mb-4 md:mb-6",children:[(0,t.jsx)("div",{className:"",children:(0,t.jsx)(l.default,{src:h?.locationPreference?.image||"",alt:h?.locationPreference?.imageAlt||"",title:h?.locationPreference?.imageTitle||"",width:85,height:85,className:"object-contain w-[85px] md:w-[85px] 2xl:w-[85px] h-[42px] md:h-[62px] 2xl:h-85px] mx-auto"})}),(0,t.jsx)("p",{className:"text-base md:text-2xl font-semibold text-gray-800",children:h?.locationPreference?.title}),(0,t.jsx)("p",{className:"text-xs md:text-base font-medium text-gray-800",children:h?.locationPreference?.subTitle})]})]}),(0,t.jsxs)("div",{className:(0,a.cn)("grid grid-cols-2 gap-5 mb-4 border-b pb-3",(N||!h?.deliverySettingsCMS?.hideDeliveryBtn)&&"grid-cols-2",N&&!h?.deliverySettingsCMS?.hideDeliveryBtn&&"grid-cols-3"),children:[(0,t.jsx)(u,{title:"PICKUP",active:y,setActive:j}),N&&(0,t.jsx)(u,{title:"CURBSIDE",active:y,setActive:j}),h?.deliverySettingsCMS?.hideDeliveryBtn?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)(u,{title:"DELIVERY",active:y,setActive:j})]}),(0,t.jsxs)("div",{children:["PICKUP"===y&&(0,t.jsx)(r.default,{pickuptext:C?.pickuptext,scrollTopRef:b.current,allRetailer:R}),"CURBSIDE"===y&&N&&(0,t.jsx)(n.default,{pickuptext:C?.pickuptext,scrollTopRef:b.current,allRetailer:R}),"DELIVERY"===y&&h&&h?.deliverySettingsCMS&&(h?.deliverySettingsCMS?.isActive?(0,t.jsx)(d.default,{deliverytext:C?.deliverytext,deliveryicon:C?.deliveryicon,deliverytitle:C?.deliverytitle,deliverysubtitle:C?.deliverysubtitle}):(0,t.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,t.jsx)("p",{className:"text-xl md:text-2xl font-semibold text-gray-800 text-center mt-5",children:"Sorry, delivery is currently unavailable."})}))]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4 justify-center",children:[(0,t.jsx)("div",{className:"w-full border-b py-4",children:(0,t.jsx)("p",{className:"text-2xl font-semibold text-center",children:"Select a State"})}),(0,t.jsx)("div",{className:"mx-1",children:M?.length>0?(0,s.sortArrayStateAlphabeticallyAfterFilter)(M)?.map((e,s)=>{let l=i.default.filter(t=>t.code==e);return(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2 rounded-full border shadow px-4 py-3 transition-all cursor-pointer secondary-button-hover",onClick:()=>T(e),children:[(0,t.jsxs)("span",{className:"w-full flex items-center gap-8",children:[(0,t.jsx)("span",{children:(0,t.jsx)(x.MapPin,{size:20})}),(0,t.jsx)("span",{className:"me-4 font-medium text-lg",children:l?.[0]?.name})]}),(0,t.jsx)(m.ArrowCircleRight,{size:20})]},"landing-map-one-item"+s)}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(c.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(c.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}})]})})]})]})],533752);var h=e.i(258288),g=e.i(618566),f=e.i(271645),y=e.i(402902),j=e.i(55144),b=e.i(296874);let v=(e=60,t)=>{let[s,l]=(0,f.useState)({latitude:0,longitude:0}),[i,a]=(0,f.useState)(!1),[r,n]=(0,f.useState)(null),d=async s=>{let l={userLatitude:s?.latitude,userLongitude:s?.longitude,maxDistance:e};a(!0);let i=await (0,j.postData)({url:`${y.default.dutchieRetailer.filterRetailer}?type=Closest Location&method=${t}`,body:l});if(i?.data){let e=JSON.parse((0,b.decompress)((0,b.decodeBase64)(i?.data)));e?.length>
770?n(e.sort((e,t)=>(e?.locationDetail?.distance??1/0)-(t?.locationDetail?.distance??1/0))):n([])}setTimeout(()=>{a(!1)},1e3)};return(0,f.useEffect)(()=>{s?.latitude&&s?.latitude!==0&&d(s)},[s]),{loading:i,retailerList:r,handleGetUserLocation:()=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>{l({latitude:e.coords.latitude,longitude:e.coords.longitude})},e=>{console.error("Error getting location:",e?.message)}):console.error("Geolocation is not supported by this browser.")}}};var N=e.i(763963),C=e.i(791450),w=e.i(78023),S=e.i(481964),k=e.i(630233),M=e.i(522016);let R="PICKUP",T=({retailer:e,isSidebar:l=!1})=>{let{handleSwitchRetailer:i,loadingButtonIndex:r,handleShowLocationAlert:n}=(0,w.useHandleSwitchRetailer)(e),[d,c]=(0,f.useState)(!1),{commonCMSData:o,retailerId:x,menuType:m}=(0,h.useGlobalStore)(),p={},u=(0,s.getRetailerHours)(e);if(u?.specialHours!=null&&u?.specialHours!="null"&&u?.specialHours!=void 0){let e=(0,S.todaySpecialsHours)(u?.specialHours,"pickup");e&&Object?.keys?.(e)?.length&&(p=e)}let g=(0,s.getTodayHours)(u?.pickup);(0,f.useEffect)(()=>{e&&c((0,s.getTodayRetailerActive)(R,e))},[e,R]);let y=({menuType:s,index:l,isDesktop:d=!1,isSidebar:c=!1})=>{let p="MEDICAL"===s.trim().toUpperCase(),u=e?.id==x&&m===s.toUpperCase(),h=o?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return p&&!h?null:(0,t.jsx)("button",{className:`
78          whitespace-nowrap border border-gray-200 hover:bg-primary hover:!text-white transition-all duration-500 ease-in-out
79          ${d?"px-7":"px-5"} py-1.5 rounded-full
80          flex items-center justify-center
81          ${c?"text-xs font-medium !px-3":""}
82          disabled:!bg-gray-200 disabled:!text-black
83          ${u&&"!bg-gray-200 !text-black"}
84        `,onClick:()=>{u?n(R):i(s,l,R,!d,e?.id)},disabled:null!==r,children:r===l?(0,t.jsx)(E,{}):p&&u?"Shopping Medical":h&&u?"Shopping Recreational":u&&!h?"Shopping This Location":u||h?`Shop ${(0,a.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsx)("div",{className:"bg-gray-50 py-6 flex items-start border border-gray-300 rounded-lg p-4",children:(0,t.jsxs)("div",{className:`${l&&"flex items-start gap-2"}`,children:[l&&(0,t.jsx)(N.default,{checked:e?.id==x,cls:"mt-8"}),(0,t.jsxs)("div",{className:"w-full",children:[l&&e?.id==x&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 mb-1",children:[(0,t.jsx)("p",{className:`font-semibold text-xl max-sm:text-base website-cards-text-color ${l?"!text-lg":""}`,children:e?.name}),e?.locationDetail&&(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md py-0.5 px-4 text-sm font-medium flex items-center gap-1 primary-text mr-2",children:[parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","mi"]})]}),(0,t.jsxs)("div",{className:`text-xs md:text-base font-medium text-gray-800 w-full ${l?"!text-sm font-normal":""}`,children:[e.address," ",(0,t.jsx)("br",{}),e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)(M.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base text-secondary_text mt-2",children:["Call : ",e?.contactNumber]}),(0,t.jsxs)("div",{className:"flex items-start gap-1 mt-2 md:mb-4 mb-3",children:[(0,t.jsx)(k.Clock,{weight:"fill",size:18,className:"mt-1"}),(0,t.jsx)("p",{className:` font-medium md:text-base text-sm ${l?"!text-sm":""}`,children:p?.active?`${p?.start} - ${p?.end}`:Object.keys(p)?.length>0&&!p?.specialDateRangeCheckStatus?`Closed | Special Hours: ${p?.name}`:g})]}),(0,t.jsx)("div",{className:`flex gap-3 md:hidden ${e?.menuTypes?.length===1?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(y,{menuType:e,index:s,isSidebar:l},s))}),(0,t.jsx)("div",{className:`hidden md:flex gap-3 ${e?.menuTypes?.length===1?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(y,{menuType:e,index:s,isDesktop:!0,isSidebar:l},s))}),o?.retailerClosePopupCMS?.isTurnOn&&!d&&(0,t.jsx)(C.default,{})]})]})]})})},E=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]});var A=e.i(690939);let D=e=>{let{retailerLoader:l,commonCMSData:i}=(0,h.useGlobalStore)(),[a,r]=(0,f.useState)(e?.allRetailer||[]),n=(0,g.usePathname)(),d=!i?.deliverySettingsCMS?.turnOffCurbsidePickup,{retailerList:c,loading:o}=v(60,"Pickup");return(0,f.useEffect)(()=>{e?.allRetailer?r(e.allRetailer.filter(e=>!d||(0,s.getRetailerBuddyFulfillmentOptions)(e)?.pickup)):r([])},[e?.allRetailer,d]),(0,f.useEffect)(()=>{c&&r(c?.filter(e=>(0,s.getRetailerBuddyFulfillmentOptions)(e)?.pickup)||[])},[c]),(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(A.default,{}):(0,t.jsx)("div",{className:"",children:o||l?(0,t.jsx)("div",{className:"flex justify-center items-center mt-6",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-primary-text",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.
841071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]})}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===n?"":" md:h-full md:overflow-hidden"}`,children:!l&&(0,t.jsx)(t.Fragment,{children:a?.length>0?(0,t.jsx)("div",{className:"overflow-y-auto sb mt-2",children:(0,s.sortRetailersByAlphabetically)(a,!1)?.slice(0,1).map((e,s)=>(0,t.jsx)(T,{retailer:e},"pickup-shop-card"+s))}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:"We are sorry, currently no retailer is found near your current location."})})})})})})},L="CURBSIDE_PICKUP",P=({retailer:e,isSidebar:l=!1})=>{let{handleSwitchRetailer:i,loadingButtonIndex:r,handleShowLocationAlert:n}=(0,w.useHandleSwitchRetailer)(e),[d,c]=(0,f.useState)(!1),{commonCMSData:o,retailerId:x,menuType:m}=(0,h.useGlobalStore)(),p={},u=(0,s.getRetailerHours)(e);if(u?.specialHours!=null&&u?.specialHours!="null"&&u?.specialHours!=void 0){let e=(0,S.todaySpecialsHours)(u?.specialHours,"pickup");e&&Object?.keys?.(e)?.length&&(p=e)}let g=(0,s.getTodayHours)(u?.pickup);(0,f.useEffect)(()=>{e&&c((0,s.getTodayRetailerActive)(L,e))},[e]);let y=({menuType:s,index:l,isDesktop:d=!1,isSidebar:c=!1})=>{let p="MEDICAL"===s.trim().toUpperCase(),u=e?.id==x&&m===s.toUpperCase(),h=o?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return p&&!h?null:(0,t.jsx)("button",{className:`
85          whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
86          ${d?"px-7":"px-5"} py-1.5 rounded-full
87          flex items-center justify-center
88          ${c?"text-xs font-medium !px-3":""}
89          disabled:!bg-gray-200 disabled:!text-black
90          ${u&&"!bg-gray-200 !text-black"}
91        `,onClick:()=>{u?n(L):i(s,l,L,!d,e?.id)},disabled:null!==r,children:r===l?(0,t.jsx)(I,{}):p&&u?"Shopping Medical":h&&u?"Shopping Recreational":u&&!h?"Shopping This Location":u||h?`Shop ${(0,a.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsx)("div",{className:"bg-gray-50 py-6 flex items-start border border-gray-300 rounded-lg p-4",children:(0,t.jsxs)("div",{className:`${l&&"flex items-start gap-2"}`,children:[l&&(0,t.jsx)(N.default,{checked:e?.id==x,cls:"mt-8"}),(0,t.jsxs)("div",{className:"w-full",children:[l&&e?.id==x&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 mb-1",children:[(0,t.jsx)("p",{className:`font-semibold text-xl max-sm:text-base ${l?"!text-lg":""}`,children:e?.name}),e?.locationDetail&&(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md py-0.5 px-4 text-sm font-medium flex items-center gap-1 primary-text mr-2",children:[parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","mi"]})]}),(0,t.jsxs)("div",{className:`text-xs md:text-base font-medium w-full ${l?"!text-sm font-normal":""}`,children:[e.address," ",(0,t.jsx)("br",{}),e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)(M.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base text-secondary_text mt-2",children:["Call : ",e?.contactNumber]}),(0,t.jsxs)("div",{className:"flex items-start gap-1 mt-2 md:mb-4 mb-3",children:[(0,t.jsx)(k.Clock,{size:18,className:"mt-1"}),(0,t.jsx)("p",{className:` font-medium md:text-base text-sm ${l?"!text-sm":""}`,children:p?.active?`${p?.start} - ${p?.end}`:Object.keys(p)?.length>0&&!p?.specialDateRangeCheckStatus?`Closed | Special Hours: ${p?.name}`:g})]}),(0,t.jsx)("div",{className:`flex gap-3 md:hidden ${e?.menuTypes?.length===1?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(y,{menuType:e,index:s,isSidebar:l},s))}),(0,t.jsx)("div",{className:`hidden md:flex gap-3 ${e?.menuTypes?.length===1?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(y,{menuType:e,index:s,isDesktop:!0,isSidebar:l},s))}),o?.retailerClosePopupCMS?.isTurnOn&&!d&&(0,t.jsx)(C.default,{})]})]})]})})},I=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]}),$=e=>{let{retailerLoader:l,commonCMSData:i}=(0,h.useGlobalStore)(),[a,r]=(0,f.useState)(e?.allRetailer||[]),n=(0,g.usePathname)(),d=!i?.deliverySettingsCMS?.turnOffCurbsidePickup,{retailerList:c,loading:o}=v(60,"Pickup");return(0,f.useEffect)(()=>{e?.allRetailer?r(e.allRetailer.filter(e=>!d||(0,s.getRetailerBuddyFulfillmentOptions)(e)?.curbsidePickup)):r([])},[e?.allRetailer,d]),(0,f.useEffect)(()=>{c&&r(c?.filter(e=>(0,s.getRetailerBuddyFulfillmentOptions)(e)?.curbsidePickup)||[])},[c]),(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(A.default,{}):(0,t.jsx)("div",{className:"",children:o||l?(0,t.jsx)("div",{className:"flex justify-center items-center mt-6",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-primary-text",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.
911071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]})}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===n?"":" md:h-full md:overflow-hidden"}`,children:!l&&(0,t.jsx)(t.Fragment,{children:a?.length>0?(0,t.jsx)("div",{className:"overflow-y-auto sb mt-2",children:(0,s.sortRetailersByAlphabetically)(a,!1)?.slice(0,1).map((e,s)=>(0,t.jsx)(P,{retailer:e,isSidebar:!1},"pickup-shop-card"+s))}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:"We are sorry, currently no retailer is found near your current location."})})})})})})};var F=e.i(389222),O=e.i(61150),H=e.i(726027);let U=({locationData:e,deliveryAddress:l,orderType:i,typeOfOrder:a,userLocation:r,skeletonHoldSearch:n,setShowDistance:d,showDistance:c,isSidebar:o=!1})=>{let{commonCMSData:x,menuType:m,retailerId:p}=(0,h.useGlobalStore)(),[u,g]=(0,f.useState)(!1),{handleSwitchRetailer:y,handleShowLocationAlert:j}=(0,w.useHandleSwitchRetailer)(e,l),b={},v=(0,s.getRetailerHours)(e);if(v?.specialHours!=null&&v?.specialHours!="null"&&v?.specialHours!=void 0){let e=(0,S.todaySpecialsHours)(v?.specialHours,"delivery");e&&Object?.keys?.(e)?.length&&(b=e)}let N=(0,s.getTodayHours)(v?.delivery);return(0,f.useEffect)(()=>{e&&i&&g((0,s.getTodayRetailerActive)(i,e))},[e,i]),(0,t.jsx)(t.Fragment,{children:n?(0,t.jsx)(B,{}):(0,t.jsxs)("div",{className:"bg-gray-50 py-8 border border-gray-300 rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("h2",{className:"font-semibold md:text-xl text-base",children:e?.name}),(0,t.jsxs)("p",{className:"border border-gray-200 rounded-md py-0.5 px-1 md:px-4 text-xs md:text-sm font-medium flex items-center gap-1 primary-text mr-2",children:[e?.locationDetail?.distance?.toFixed(2)," mi"]})]}),(0,t.jsx)("p",{className:"text-secondary_text  text-sm",children:e?.address})]}),(0,t.jsx)("div",{className:"grid grid-cols-2",children:(0,t.jsx)("p",{className:" font-medium md:text-base text-sm ",children:b?.active?`${b?.start} - ${b?.end}`:Object.keys(b)?.length>0&&!b?.specialDateRangeCheckStatus?`Closed | Special Hours: ${b?.name}`:N})}),(0,t.jsxs)("div",{className:"pt-4",children:[e?.id=="4cc2d3df-07ec-492b-9a57-ccc600577517"?(0,t.jsx)(H.default,{className:"cursor-default	w-max whitespace-nowrap group-hover:!bg-white group-hover:border-[#34A203] group-hover:border  pointer-none !px-4",children:"Coming Soon"}):(0,t.jsx)(t.Fragment,{children:e?.id?(0,t.jsx)("div",{className:"flex gap-3 flex-row-reverse",style:{justifyContent:"start"},children:e?.menuTypes?.map((s,l)=>"RECREATIONAL"===s?(0,t.jsx)("button",{onClick:()=>{e?.id==p&&"RECREATIONAL"==m?j(i):y(s,l,"DELIVERY",!0,e?.id)},className:`
92                                whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
93                                md:px-7 px-5 py-1.5 rounded-full
94                                flex items-center justify-center max-sm:text-xs
95                                ${o?"text-xs font-medium !px-3":""}
96                                disabled:!bg-gray-200 disabled:!text-black
97                                ${e?.id==p&&"RECREATIONAL"==m&&"bg-gray-200 text-black"}
98                              `,children:e?.id==p&&"RECREATIONAL"==m?(0,t.jsx)(t.Fragment,{children:x?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shopping Recreational":"Shopping This Location"}):(0,t.jsx)(t.Fragment,{children:x?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shop Recreational":"Shop This Location"})},l):"MEDICAL"===s&&x?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?(0,t.jsx)("button",{onClick:()=>{e?.id==p&&"MEDICAL"==m?j(i):y(s,l,"DELIVERY",!0,e?.id)},className:`
99                                whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
100                                md:px-7 px-5 py-1.5 rounded-full
101                                flex items-center justify-center max-sm:text-xs
102                                ${o?"text-xs font-medium !px-3":""}
103                                ${e?.id==p&&"MEDICAL"==m&&"bg-gray-200 text-black"}
104                              `,children:e?.id==p&&"MEDICAL"==m?(0,t.jsx)(t.Fragment,{children:"Shopping Medical"}):(0,t.jsx)(t.Fragment,{children:"Shop Medical"})},l):void 0)}):(0,t.jsx)(t.Fragment,{})}),x?.retailerClosePopupCMS?.isTurnOn&&!u&&(0,t.jsx)(C.default,{})]})]})})},B=()=>(0,t.jsxs)("div",{role:"status",className:"p-4 border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700 w-full mb-4 rounded-xl",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("svg",{className:"w-10 h-10 me-3 text-gray-200 dark:text-gray-700 global-heading-color","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"
104currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"}),(0,t.jsx)("div",{className:"w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700"}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]}),z=e=>{let{location:i,inputValue:a,search:r,loading:n,skeletonHoldSearch:d,showDistance:c,userLocation:o,retailerList:x,setSkeletonHoldSearch:m,setSearch:p,setShowDistance:u,setInputValue:h,setUserLocation:g}=(0,F.useGoogleMapLocation)(),[y,j]=(0,f.useState)(!1),[b,v]=(0,f.useState)(!1),[N,C]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{if(x&&x?.length){for(let e of x)if(e?.locationDetail?.validForDelivery){j(!0),v(!0);return}j(!0)}else j(!0),v(!1)},[x]),(0,t.jsx)("div",{children:e.location?(0,t.jsx)(A.default,{}):(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsx)("div",{className:" w-[30px] md:w-[50px] h-[30px] md:h-[50px] relative",children:(0,t.jsx)(l.default,{src:e?.deliveryicon,fill:!0,alt:""})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:" text-sm md:text-base font-medium",children:e?.deliverytitle}),(0,t.jsx)("p",{className:" text-xs text-secondary_text",children:e?.deliverysubtitle})]})]}),(0,t.jsx)(O.default,{onPlaceSelected:e=>(e=>{if(C(!0),!e.geometry||!e.geometry.location){p({latitude:0,longitude:0}),h("");return}(e?.geometry?.viewport||e?.geometry?.location)&&(m(!0),g(null),p({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),h(e.formatted_address))})(e)}),n?(0,t.jsx)("div",{className:"flex justify-center items-center mt-6",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-primary-text",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]})}):(0,t.jsx)("div",{className:`${!e.isSidebar?"has-[img]:h-[28vh]":"2xl:h-[50vh] xl:h-[40vh] md:h-[35vh]"} overflow-y-auto mt-5 md:pr-4 sb flex flex-col gap-4`,children:r?.latitude!==0?(0,t.jsxs)(t.Fragment,{children:[x?.length>0?(0,s.sortRetailersByAlphabetically)(x,N)?.map((s,l)=>(0,t.jsx)("div",{children:s?.locationDetail?.validForDelivery?(0,t.jsx)(U,{locationData:s,deliveryAddress:a??"",orderType:"DELIVERY",typeOfOrder:"Delivery",userLocation:o,skeletonHoldSearch:d,setShowDistance:u,showDistance:c,isSidebar:e?.isSidebar||!1}):(0,t.jsx)(t.Fragment,{})},"RetailerDataGlobal"+l)):(0,t.jsx)(t.Fragment,{}),y&&!b?(0,t.jsxs)("div",{className:"2xl:mb-5 mb-3",children:[(0,t.jsx)("h2",{className:" md:text-base text-sm font-medium text-[#CA024F] md:text-center mb-4",children:"We don't deliver to this address."}),(0,t.jsx)("p",{className:" md:text-base text-sm text-gray-600 font-medium md:text-center",children:"You can still place an order online for in-store pickup or explore cannabis to find products at a store near you."})]}):(0,t.jsx)(t.Fragment,{})]}):""})]})})};var V=e.i(534162),Z=e.i(368799);e.s(["default",0,({retailerId:e,commonCMSData:r,canSelectedRetailerId:n,active:d,setActive:u,scrollTopRef:g,canStateSelect:y,isCurbsidePickup:j,modalCmsData:b,selectedState:v,setSelectedState:N,stateNameGroup:C,allRetailer:w,handleRetailerStateSet:S})=>{let{setIsOpenPreferenceDrawerNew:k,setIsOpenPreferencePopup:M}=(0,Z.useModalStore)(),{orderType:R}=(0,h.useGlobalStore)();return(0,f.useEffect)(()=>{R&&u("CURBSIDE_PICKUP"===R?"CURBSIDE":R)},[R]),(0,t.jsxs)("div",{className:"pt-10 pb-5 md:py-14 px-4 md:px-12",ref:g,children:[e?(0,t.jsx)(o.X,{onClick:()=>{k(!1),M(!1)},className:"absolute top-3 right-5 text-3xl bg-white z-10 p-1 cursor-pointer website-cards-text-color"}):null,!y||v||e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-7",children:[C?.length>1&&!n&&(0,t.jsx)("div",{onClick:()=>{N(""),u("PICKUP")},className:"cursor-pointer font-medium text-gray-400 hover:text-gray-800 hover:bg-gray-200 hover:rounded-md transition-all duration-400 px-2 py-2 w-fit",children:(0,t.jsx)(p.ArrowLeft,{size:20})}),(0,t.jsx)("div",{children:(0,t.jsx)(l.default,{src:r?.locationPreference?.image||"",className:"w-[50px] md:w-[60px] 2xl:w-[60px] mx-auto relative object-contain",alt:r?.locationPreference?.imageAlt||"",title:r?.locationPreference?.imageTitle||"",width:85,height:85})}
104),(0,t.jsxs)("div",{className:"max-w-[290px] mx-auto space-y-2",children:[(0,t.jsx)("p",{className:" text-2xl font-semibold mt-2 text-center website-cards-text-color",children:r?.locationPreference?.title}),(0,t.jsx)("p",{className:"text-center font-medium text-sm website-cards-text-color px-4",children:r?.locationPreference?.subTitle})]})]}),(0,t.jsxs)("div",{className:(0,a.cn)("grid grid-cols-1 gap-5 mb-6",(j||!r?.deliverySettingsCMS?.hideDeliveryBtn)&&"grid-cols-2",j&&!r?.deliverySettingsCMS?.hideDeliveryBtn&&"grid-cols-3"),children:[(0,t.jsx)(V.Tab,{title:"PICKUP",active:d,setActive:u}),j&&(0,t.jsx)(V.Tab,{title:"CURBSIDE",active:d,setActive:u}),r?.deliverySettingsCMS?.hideDeliveryBtn?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)(V.Tab,{title:"DELIVERY",active:d,setActive:u})]}),"PICKUP"===d&&(0,t.jsx)(D,{pickuptext:b?.pickuptext,scrollTopRef:g.current,allRetailer:w}),"CURBSIDE"===d&&j&&(0,t.jsx)($,{pickuptext:b?.pickuptext,scrollTopRef:g.current,allRetailer:w}),"DELIVERY"===d&&r&&r?.deliverySettingsCMS&&(r?.deliverySettingsCMS?.isActive?(0,t.jsx)(z,{deliverytext:b?.deliverytext,deliveryicon:b?.deliveryicon,deliverytitle:b?.deliverytitle,deliverysubtitle:b?.deliverysubtitle}):(0,t.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,t.jsx)("p",{className:"text-xl md:text-2xl font-semibold text-gray-800 text-center mt-5",children:"Sorry, delivery is currently unavailable."})}))]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4 justify-center",children:[(0,t.jsx)("div",{className:"w-full border-b py-4",children:(0,t.jsx)("p",{className:"text-2xl font-semibold text-center",children:"Select a State"})}),(0,t.jsx)("div",{className:"mx-1",children:C?.length>0?(0,s.sortArrayStateAlphabeticallyAfterFilter)(C)?.map((e,s)=>{let l=i.default.filter(t=>t.code==e);return(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2 rounded-full border shadow px-4 py-3 transition-all cursor-pointer secondary-button-hover",onClick:()=>S(e),children:[(0,t.jsxs)("span",{className:"w-full flex items-center gap-8",children:[(0,t.jsx)("span",{children:(0,t.jsx)(x.MapPin,{size:20})}),(0,t.jsx)("span",{className:"me-4 font-medium text-lg",children:l?.[0]?.name})]}),(0,t.jsx)(m.ArrowCircleRight,{size:20})]},"landing-map-one-item"+s)}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(c.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}}),(0,t.jsx)(c.default,{style:{width:"100%",height:"50px",borderRadius:"50px"}})]})})]})]})}],139154)},728893,361716,205031,e=>{"use strict";var t=e.i(843476),s=e.i(618566),l=e.i(271645),i=e.i(690939),a=e.i(701973),r=e.i(791450),n=e.i(78023),d=e.i(258288),c=e.i(522016),o=e.i(399428),x=e.i(137963),m=e.i(641840),p=e.i(225188),u=e.i(703803),h=e.i(630233),g=e.i(815330),f=e.i(331991);let y="PICKUP",j=({retailer:e,isExpanded:s,onToggle:i,isSidebar:j,handlePreferenceDrawer:v})=>{let{handleSwitchRetailer:N,loadingButtonIndex:C,handleShowLocationAlert:w}=(0,n.useHandleSwitchRetailer)(e),[S,k]=(0,l.useState)(!1),{commonCMSData:M,retailerId:R,menuType:T}=(0,d.useGlobalStore)(),E=(0,a.getRetailerHours)(e);(0,l.useEffect)(()=>{e&&k((0,a.getTodayRetailerActive)(y,e))},[e]);let A=()=>{i()},[D,L]=(0,l.useState)(!1),P=({menuType:s,index:l,isDesktop:i=!1,isSidebar:a=!1})=>{let r="MEDICAL"===s.trim().toUpperCase(),n=e?.id==R&&T===s.toUpperCase(),d=M?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return r&&!d?null:(0,t.jsx)("button",{className:`
105          whitespace-nowrap border border-primary bg-primary-light text-primary hover:bg-primary hover:!text-white transition-all duration-500 ease-in-out
106          ${i?"px-7":"px-5"} py-2 rounded-full
107          flex items-center justify-center
108          ${a?"text-xs font-medium !px-3":""}
109          disabled:!bg-gray-200 disabled:!text-black
110          ${n&&"!bg-gray-200 !text-black"}
111        `,onClick:()=>{n?w(y):(N(s,l,y,!i,e?.id),a&&v())},disabled:null!==C,children:C===l?(0,t.jsx)(b,{}):r&&n?"Shopping Medical":d&&n?"Shopping Recreational":n&&!d?"Shopping This Location":n||d?`Shop ${(0,x.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsx)("div",{className:`py-7 flex items-start border-b border-gray-200 ${s?"opacity-100":"opacity-50 hover:opacity-100"} transition-opacity duration-200`,children:(0,t.jsxs)("div",{className:"w-full",children:[j&&e?.id===R&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"flex justify-between items-center cursor-pointer",onClick:A,role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&A(),children:[(0,t.jsx)("div",{className:"flex items-center gap-4",children:(0,t.jsx)("p",{className:"font-bold md:text-2xl text-base pl-2",children:e?.name})}),(0,t.jsx)(g.CaretDown,{className:`transform transition-transform duration-200 ${s?"rotate-180":""}`})]}),s&&(0,t.jsxs)("div",{className:"px-3 pt-3 text-xs md:text-sm font-medium text-gray-600 w-full",children:[(0,t.jsxs)("div",{className:"flex items-start gap-5 mb-3",children:[(0,t.jsx)(h.Clock,{weight:"fill",size:18,className:"mt-1"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-700 global-heading-color font-semibold md:text-base text-sm cursor-pointer",onClick:()=>L(e=>!e),children:[(0,t.jsx)("p",{children:D?"Opening hours ":"Open Monday to Sunday"}),D?(0,t.jsx)(f.CaretUp,{size:20}):(0,t.jsx)(g.CaretDown,{size:20})]}),D&&(0,t.jsx)("ul",{className:"space-y-2 mt-3 text-base",children:E?.pickup&&Object.entries(E?.pickup)?.map((e,s)=>(0,t.jsxs)("li",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"w-32 font-medium",children:e?.[0]}),(0,t.jsx)("span",{children:(0,o.handleDisplayHours)(e?.[1])})]},s))})]})]}),(0,t.jsx)("div",{children:e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)("div",{className:"flex items-center gap-5 mb-3",children:[(0,t.jsx)(p.Phone,{size:20}),(0,t.jsxs)(c.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base text-secondary_text mt-2",children:["Call : ",e?.contactNumber]})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-5 mb-3",children:[(0,t.jsx)(u.MapPin,{size:20}),(0,t.jsx)("p",{className:"text-sm 2xl:text-base text-secondary_text ",children:e.address})]}),e?.locationDetail&&(0,t.jsxs)("div",{className:" flex items-center gap-5  mb-3",children:[(0,t.jsx)(u.MapPin,{size:20}),(0,t.jsxs)("p",{className:"primary-text text-xs",children:[" ",parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","mi"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:`flex gap-3 md:hidden ${e?.menuTypes?.length===1?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(P,{menuType:e,index:s,isSidebar:j},s))}),(0,t.jsx)("div",{className:`hidden md:flex gap-3 ${e?.menuTypes?.length===1?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(P,{menuType:e,index:s,isDesktop:!0,isSidebar:j},s))}),j&&(0,t.jsx)(c.default,{href:(0,m.buildRetailerLocationHref)(e)??"#",onClick:v,className:"font-medium cursor-pointer text-xs",children:"Store details"})]}),M?.retailerClosePopupCMS?.isTurnOn&&!S&&(0,t.jsx)(r.default,{})]})]})})},b=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]});var v=e.i(638813),N=e.i(283373),C=e.i(239932),w=e.i(397247),S=e.i(83236);e.s(["default",0,e=>{let[r,n]=(0,l.useState)(0),d=e=>{n(t=>t===e?-1:e)},c=(0,s.usePathname)(),{searchInput:o,closetLocationChecker:x,setClosetLocationChecker:m,searchResults:p,handleSearch:u,handleGetUserLocation:h,loading:g,canStateSelect:f,retailerLoader:y,retailerId:b,setSearchInput:k,containerRef:M,getDeliveryAddressList:R,onEmptyInput:T,searchZipInput:E,handleSearchZip:A}=(0,N.default)({allRetailer:e?.allRetailer||[],fulfillmentKey:"pickup"}),D=(0,a.sortRetailersByAlphabetically)(p,x),L=D.find(e=>e.id===b),P=D.filter(e=>e.id!==b);return(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(i.default,{}):(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)(C.default,{searchInput:o,handleSearch:u,setSearchInput:k,isSidebar:e?.isSidebar||!1,getDeliveryAddressList:R,onEmptyInput:T,searchZipInput:E,handleSearchZip:A}),(0,t.jsxs)("div",{className:"text-sm primary-text flex gap-1 cursor-pointer mt-1 mb-2 md:mb-0 w-fit",onClick:()=>{m(!0),h()},children:[(0,t.jsx)(S.PaperPlaneTilt,{weight:"fill",size:20})," Use my current location"]}),g||y?(0,t.jsx)(w.default,{}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===c?"":" md:h-full md:overflow-hidden"}`,children:!y&&(0,t.jsx)(t.Fragment,{children:p?.length>0?(0,t.jsx)("div",{className:`overflow-y-auto md:pr-4 pr-1 sb ${e.isSidebar?!f?"h-[calc(100dvh-215px)]":"h-[calc(100dvh-285px)]":"2xl:h-[34vh] xl:h-[30vh] md:h-[28vh]"}`,ref:M,children:e.isSidebar?(0,t.jsxs)(t.Fragment,{children:[L&&(0,t.jsx)(j,{retailer:L,isExpanded:0===r,onToggle:()=>d(0),isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer},"pickup-shop-card-prioritized"),L&&P.length>1&&(0,t.jsxs)("p",{className:"font-semibold mt-12",children:["Other dispensaries in"," ",(0,v.getFullStateName)(e?.selectedState)]}),P?.map((s,l)=>(0,t.jsx)(j,{retailer:s,isExpanded:r===l+1,onToggle:()=>d(l+1),isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer},"pickup-shop-card"+l))]}):(0,t.jsx)(t.Fragment,{children:(0,a.sortRetailersByAlphabetically)(p,x)?.map((s,l)=>
111(0,t.jsx)(j,{retailer:s,isExpanded:l===r,onToggle:()=>d(l),isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer},"pickup-shop-card"+l))})}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:o?"We are sorry, currently no retailer is found.":"We are sorry, currently no retailer is found near your current location."})})})})]})})}],728893);let k="CURBSIDE_PICKUP",M=({retailer:e,isExpanded:s,onToggle:i,isSidebar:y,handlePreferenceDrawer:j})=>{let{handleSwitchRetailer:b,loadingButtonIndex:v,handleShowLocationAlert:N}=(0,n.useHandleSwitchRetailer)(e),[C,w]=(0,l.useState)(!1),{commonCMSData:S,retailerId:M,menuType:T}=(0,d.useGlobalStore)();(0,l.useEffect)(()=>{e&&k&&w((0,a.getTodayRetailerActive)(k,e))},[e]);let E=()=>{i()},[A,D]=(0,l.useState)(!1),L=({menuType:s,index:l,isDesktop:i=!1,isSidebar:a=!1})=>{let r="MEDICAL"===s.trim().toUpperCase(),n=e?.id==M&&T===s.toUpperCase(),d=S?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn;return r&&!d?null:(0,t.jsx)("button",{className:`
112          whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
113          ${i?"px-7":"px-5"} py-2 rounded-full
114          flex items-center justify-center
115          ${a?"text-xs font-medium !px-3":""}
116          disabled:!bg-gray-200 disabled:!text-black
117          ${n&&"!bg-gray-200 !text-black"}
118        `,onClick:()=>{n?N(k):(b(s,l,k,!i,e?.id),a&&j())},disabled:null!==v,children:v===l?(0,t.jsx)(R,{}):r&&n?"Shopping Medical":d&&n?"Shopping Recreational":n&&!d?"Shopping This Location":n||d?`Shop ${(0,x.capitalizeWords)(s.trim())}`:"Shop This Location"},`menu-type-${l}`)};return(0,t.jsx)("div",{className:`py-7 flex items-start border-b border-gray-200 ${s?"opacity-100":"opacity-50 hover:opacity-100"} transition-opacity duration-200`,children:(0,t.jsxs)("div",{className:"w-full",children:[y&&e?.id==M&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"flex justify-between items-center cursor-pointer",onClick:E,role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&E(),children:[(0,t.jsx)("div",{className:"flex items-center gap-4",children:(0,t.jsx)("p",{className:"font-bold md:text-2xl text-base pl-2",children:e?.name})}),(0,t.jsx)(g.CaretDown,{className:`transform transition-transform duration-200 ${s?"rotate-180":""}`})]}),s&&(0,t.jsxs)("div",{className:"px-3 pt-3 text-xs md:text-sm font-medium text-gray-600 w-full",children:[(0,t.jsxs)("div",{className:"flex items-start gap-5 mb-3",children:[(0,t.jsx)(h.Clock,{weight:"fill",size:18,className:"mt-1"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-700 global-heading-color font-semibold md:text-base text-sm cursor-pointer",onClick:()=>D(e=>!e),children:[(0,t.jsx)("p",{children:A?"Opening hours ":"Open Monday to Sunday"}),A?(0,t.jsx)(f.CaretUp,{size:20}):(0,t.jsx)(g.CaretDown,{size:20})]}),A&&(0,t.jsx)("ul",{className:"space-y-2 mt-3 text-base",children:(0,a.getRetailerHours)(e)?.curbsidePickup&&Object.entries((0,a.getRetailerHours)(e)?.curbsidePickup)?.map((e,s)=>(0,t.jsxs)("li",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"w-32 font-medium",children:e?.[0]}),(0,t.jsx)("span",{children:(0,o.handleDisplayHours)(e?.[1])})]},s))})]})]}),(0,t.jsx)("div",{children:e?.contactNumber&&e?.contactNumber!=="null"&&(0,t.jsxs)("div",{className:"flex items-center gap-5 mb-3",children:[(0,t.jsx)(p.Phone,{size:20}),(0,t.jsxs)(c.default,{href:`tel:${e.contactNumber}`,className:"text-sm 2xl:text-base text-secondary_text mt-2",children:["Call : ",e?.contactNumber]})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-5 mb-3",children:[(0,t.jsx)(u.MapPin,{size:20}),(0,t.jsx)("p",{className:"text-sm 2xl:text-base text-secondary_text ",children:e.address})]}),e?.locationDetail&&(0,t.jsxs)("div",{className:" flex items-center gap-5  mb-3",children:[(0,t.jsx)(u.MapPin,{size:20}),(0,t.jsxs)("p",{className:"primary-text text-xs",children:[" ",parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","mi"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:`flex gap-3 md:hidden ${e?.menuTypes?.length===1?"flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(L,{menuType:e,index:s,isSidebar:y},s))}),(0,t.jsx)("div",{className:`hidden md:flex gap-3 ${e?.menuTypes?.length===1?"md:flex-row-reverse":""}`,style:{justifyContent:"start"},children:e?.menuTypes?.map((e,s)=>(0,t.jsx)(L,{menuType:e,index:s,isDesktop:!0,isSidebar:y},s))}),y&&(0,t.jsx)(c.default,{href:(0,m.buildRetailerLocationHref)(e)??"#",onClick:j,className:"font-medium cursor-pointer text-xs",children:"Store details"})]}),S?.retailerClosePopupCMS?.isTurnOn&&!C&&(0,t.jsx)(r.default,{})]})]})})},R=()=>(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8h8a8 8 0 01-8 8V4z"})]}),(0,t.jsx)("span",{children:"Loading..."})]});e.s(["default",0,e=>{let r=(0,s.usePathname)(),[n,d]=(0,l.useState)(0),c=e=>{d(t=>t===e?-1:e)},{searchInput:o,closetLocationChecker:x,setClosetLocationChecker:m,searchResults:p,handleSearch:u,handleGetUserLocation:h,loading:g,retailerLoader:f,checkTotalRetailers:y,setSearchInput:j,containerRef:b,getDeliveryAddressList:k,canStateSelect:R,retailerId:T,onEmptyInput:E,searchZipInput:A,handleSearchZip:D}=(0,N.default)({allRetailer:e?.allRetailer||[],fulfillmentKey:"curbsidePickup"}),L=(0,a.sortRetailersByAlphabetically)(p,x),P=L.find(e=>e.id===T),I=L.filter(e=>e.id!==T);return(0,t.jsx)("div",{className:"relative",children:e.location?(0,t.jsx)(i.default,{}):(0,t.jsxs)("div",{children:[(0,t.jsx)(C.default,{searchInput:o,handleSearch:u,setSearchInput:j,isSidebar:e?.isSidebar||!1,getDeliveryAddressList:k,onEmptyInput:E,searchZipInput:A,handleSearchZip:D}),(0,t.jsxs)("div",{className:"text-sm primary-text flex gap-1 pt-2 pl-2 cursor-pointer mb-2 md:mb-0 w-fit",onClick:()=>{m(!0),h()},children:[(0,t.jsx)(S.PaperPlaneTilt,{weight:"fill",size:20})," Use My Current Location"]}),g||f?(0,t.jsx)(w.default,{}):(0,t.jsx)("div",{className:`${"/pickup-delivery"===r?"":" md:h-full md:overflow-hidden"}`,children:!f&&(0,t.jsx)(t.Fragment,{children:p?.length>0?(0,t.jsx)("div",{className:`overflow-y-auto md:pr-4 pr-1 sb ${e.isSidebar?!R?"h-[calc(100dvh-215px)]":"h-[calc(100dvh-285px)]":"2xl:h-[34vh] xl:h-[30vh] md:h-[28vh]"}`,ref:b,children:e.isSidebar?(0,t.jsxs)(t.Fragment,{children:[P&&(0,t.jsx)(M,{retailer:P,isExpanded:0===n,onToggle:()=>c(0),isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer}),P&&I.length>1&&(0,t.jsxs)("p",{className:"font-semibold",children:["Other dispensaries in"," ",(0,v.getFullStateName)(e?.selectedState)]}),I.map((s,l)=>(0,t.jsx)(M,{retailer:s,isExpanded:n===l+1,onToggle:()=>c(l+1),isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer},"curbside-shop-card"+l))]}):(0,t.jsx)(t.Fragment,{children:(0,a.sortRetailersByAlphabetically)(p,x)?.map((s,l)=>
118(0,t.jsx)(M,{retailer:s,isExpanded:l===n,onToggle:()=>c(l),isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer},"curbside-shop-card"+l))})}):(0,t.jsx)("div",{className:"2xl:mb-5 mb-3 rounded-lg bg-red-100 p-2 mt-4 mr-2",children:(0,t.jsx)("p",{className:"text-xs text-red-700 text-center",children:o||y?"We are sorry, currently no retailer is found.":"We are sorry, currently no retailer is found near your current location."})})})})]})})}],361716);var T=e.i(389222),E=e.i(657688),A=e.i(61150);let D=({locationData:e,deliveryAddress:s,orderType:i,typeOfOrder:c,userLocation:x,isExpanded:m,onToggle:p,skeletonHoldSearch:y,isSidebar:j=!1,handlePreferenceDrawer:b})=>{let{commonCMSData:v,menuType:N,retailerId:C}=(0,d.useGlobalStore)(),[w,S]=(0,l.useState)(!1),[k,M]=(0,l.useState)(!1),{handleSwitchRetailer:R,handleShowLocationAlert:T,loadingButtonIndex:E}=(0,n.useHandleSwitchRetailer)(e,s);(0,l.useEffect)(()=>{e&&i&&S((0,a.getTodayRetailerActive)(i,e))},[e,i]);let A=()=>{p()};return y?(0,t.jsx)(L,{}):(0,t.jsx)("div",{className:`px-3 py-7 flex items-start border-b border-gray-200 ${m?"opacity-100":"opacity-50 hover:opacity-100"} transition-opacity duration-200`,children:(0,t.jsxs)("div",{className:"w-full",children:[j&&e?.id==C&&(0,t.jsx)("div",{className:"bg-[#DEF7EC] text-[#03543F] rounded-md w-fit px-3 py-0.5 mb-2",children:(0,t.jsx)("p",{className:"font-semibold text-sm",children:"Currently Shopping"})}),(0,t.jsxs)("div",{className:"flex justify-between items-center cursor-pointer",onClick:A,role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&A(),children:[(0,t.jsx)("div",{className:"flex items-center gap-4",children:(0,t.jsx)("p",{className:"font-bold md:text-2xl text-base pl-2",children:e?.name})}),(0,t.jsx)(g.CaretDown,{className:`transform transition-transform duration-200 ${m?"rotate-180":""}`})]}),m&&(0,t.jsxs)("div",{className:"px-3 pt-3 text-xs md:text-sm font-medium text-gray-600 w-full",children:[(0,t.jsxs)("div",{className:"flex items-start gap-5 mb-3",children:[(0,t.jsx)(h.Clock,{size:18,className:"mt-1"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-700 global-heading-color font-semibold md:text-base text-sm cursor-pointer",onClick:()=>M(e=>!e),children:[(0,t.jsx)("p",{children:k?"Opening hours ":"Open Monday to Sunday"}),k?(0,t.jsx)(f.CaretUp,{size:20}):(0,t.jsx)(g.CaretDown,{size:20})]}),k&&(0,t.jsx)("ul",{className:"space-y-2 mt-3 text-base",children:(0,a.getRetailerHours)(e)?.delivery&&Object.entries((0,a.getRetailerHours)(e)?.delivery)?.map((e,s)=>(0,t.jsxs)("li",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"w-32 font-medium",children:e?.[0]}),(0,t.jsx)("span",{children:(0,o.handleDisplayHours)(e?.[1])})]},s))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-5 mb-3",children:[(0,t.jsx)(u.MapPin,{size:20}),(0,t.jsx)("p",{className:"text-secondary_text text-sm",children:e?.address})]}),(0,t.jsxs)("div",{className:" flex items-center gap-5 ",children:[(0,t.jsx)(u.MapPin,{size:20}),(0,t.jsxs)("p",{className:"text-xs primary-text",children:[" ",parseFloat(e?.locationDetail?.distance).toFixed(2)||0," ","mi"]})]}),(0,t.jsx)("div",{className:"flex gap-3 justify-start mt-2",children:e?.menuTypes?.map((s,l)=>"RECREATIONAL"===s?(0,t.jsx)("button",{onClick:()=>{e?.id==C&&"RECREATIONAL"==N?T(i):(R(s,l,"DELIVERY",!0,e?.id),j&&b())},disabled:null!=E,className:`
119                          whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
120                          md:px-7 px-5 py-1.5 rounded-full
121                          flex items-center justify-center
122                          ${j?"text-xs font-medium !px-3":""}
123                          disabled:!bg-gray-200 disabled:!text-black
124                          ${e?.id==C&&"RECREATIONAL"==N&&"bg-gray-200 text-black"}
125                        `,children:e?.id==C&&"RECREATIONAL"==N?v?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shopping Recreational":"Shopping This Location":v?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?"Shop Recreational":"Shop This Location"},l):"MEDICAL"===s&&v?.retailerMenuTypeSettingsCMS?.isMedicalTypeOn?(0,t.jsx)("button",{onClick:()=>{e?.id==C&&"MEDICAL"==N?T(i):(R(s,l,"DELIVERY",!0,e?.id),j&&b())},disabled:null!=E,className:`
126                          whitespace-nowrap border border-gray-200 hover:bg-primary hover:text-white transition-all duration-500 ease-in-out
127                          md:px-7 px-5 py-1.5 rounded-full
128                          flex items-center justify-center
129                          ${j?"text-xs font-medium !px-3":""}
130                          disabled:!bg-gray-200 disabled:!text-black
131                          ${e?.id==C&&"MEDICAL"==N&&"bg-gray-200 text-black"}
132                        `,children:e?.id==C&&"MEDICAL"==N?"Shopping Medical":"Shop Medical"},l):void 0)}),v?.retailerClosePopupCMS?.isTurnOn&&!w&&(0,t.jsx)(r.default,{})]})]})})},L=()=>(0,t.jsxs)("div",{role:"status",className:"p-4 border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700 w-full mb-4 rounded-xl",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("svg",{className:"w-10 h-10 me-3 text-gray-200 dark:text-gray-700 global-heading-color","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"
132currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"}),(0,t.jsx)("div",{className:"w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),(0,t.jsx)("div",{className:"h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),(0,t.jsx)("div",{className:"h-2 bg-gray-200 rounded-full dark:bg-gray-700"}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]});e.s(["default",0,e=>{let{inputValue:s,search:r,loading:n,skeletonHoldSearch:c,userLocation:o,retailerList:x,setSkeletonHoldSearch:m,setSearch:p,setInputValue:u,handleGetUserLocation:h,setUserLocation:g}=(0,T.useGoogleMapLocation)(),{commonCMSData:f}=(0,d.useGlobalStore)(),[y,j]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[N,C]=(0,l.useState)(!1),[w,k]=(0,l.useState)(null),M=f?.stateSelectionSettingsCMS?.enableStateSelector;return(0,l.useEffect)(()=>{if(x&&x?.length){for(let e of x)if(e?.locationDetail?.validForDelivery){j(!0),v(!0);return}j(!0)}else j(!0),v(!1)},[x]),(0,t.jsx)("div",{children:e.location?(0,t.jsx)(i.default,{}):(0,t.jsxs)("div",{className:"",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsx)("div",{className:" w-[30px] md:w-[50px] h-[30px] md:h-[50px] relative",children:(0,t.jsx)(E.default,{src:e?.deliveryicon,fill:!0,alt:""})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:" text-sm md:text-base font-semibold global-heading-color",children:e?.deliverytitle}),(0,t.jsx)("p",{className:" text-xs text-secondary_text",children:e?.deliverysubtitle})]})]}),(0,t.jsx)(A.default,{onPlaceSelected:e=>(e=>{if(C(!0),!e.geometry||!e.geometry.location){p({latitude:0,longitude:0}),u("");return}(e?.geometry?.viewport||e?.geometry?.location)&&(m(!0),g(null),p({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),u(e.formatted_address))})(e)}),(0,t.jsxs)("div",{className:" text-sm primary-text flex gap-1 pl-2 cursor-pointer w-fit",onClick:()=>{C(!0),h()},children:[(0,t.jsx)(S.PaperPlaneTilt,{weight:"fill",size:20})," Use My Current Location"]}),n?(0,t.jsx)("div",{className:"flex justify-center items-center mt-6",children:(0,t.jsxs)("div",{role:"status",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-primary-text",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,t.jsx)("span",{className:"sr-only",children:"Loading..."})]})}):(0,t.jsx)("div",{className:`${!e.isSidebar?!M?"h-[calc(100dvh-215px)]":"h-[calc(100dvh-285px)]":"2xl:h-[50vh] xl:h-[40vh] md:h-[35vh]"} overflow-y-auto mt-5 md:pr-4 sb`,children:r?.latitude!==0?(0,t.jsxs)(t.Fragment,{children:[x?.length>0?(0,a.sortRetailersByAlphabetically)(x,N)?.map((l,i)=>(0,t.jsx)("div",{children:(0,t.jsx)("div",{children:l?.locationDetail?.validForDelivery?(0,t.jsx)(D,{locationData:l,deliveryAddress:s??"",orderType:"DELIVERY",typeOfOrder:"Delivery",userLocation:o,isExpanded:w===l?.id,onToggle:()=>{var e;k(w===(e=l?.id)?null:e)},skeletonHoldSearch:c,isSidebar:e?.isSidebar||!1,handlePreferenceDrawer:e.handlePreferenceDrawer}):(0,t.jsx)(t.Fragment,{})})},"RetailerDataGlobal"+i)):(0,t.jsx)(t.Fragment,{}),y&&!b?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"2xl:mb-5 mb-3",children:[(0,t.jsx)("h2",{className:" md:text-base text-sm font-medium text-[#CA024F] md:text-center mb-4",children:"We don't deliver to this address."}),(0,t.jsx)("p",{className:" md:text-base text-sm text-gray-600 font-medium md:text-center",children:"You can still place an order online for in-store pickup or explore cannabis to find products at a store near you."})]})}):(0,t.jsx)(t.Fragment,{})]}):""})]})})}],205031)}]);

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.