PageSourceSearch

https://grocerylistjamaica.com/_next/static/chunks/1044-2dc69d4664b91a41.js

js grocerylistjamaica.com collected 2026-10-01 15:07:23 UTC 15,847 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="eef194a3-1c41-4420-a7e4-7641fe6f9038",e._sentryDebugIdIdentifier="sentry-dbid-eef194a3-1c41-4420-a7e4-7641fe6f9038")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1044],{2880:function(e,t){t.Z={src:"/_next/static/media/office.46988958.png",height:24,width:24,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA6ElEQVR42mOAgf/TGLi/tNoEf22zDvo/g4ELLhFYMEGPIWee9pqywryNlUWFmyoKi0Fshpz5WgEgOfv8yecd8yddMcmffEEtf8opEDYGskFi9vmTzjE4FEw+61A45ZRL4eTTRlmTzxgDMYgNEgPJMZgl1G+2zey6oJ854XRhe/+Zgrb+M/oZE07bZnZeBMqtYzCJqlxuHVN2gcG54uSaxSWnVi4sOcXgXH4CKHbRJLpyIYNZXO1GIL5jGlt7xSym+hoIm8YB2XG1d83i6tYwmMbW+ANxoVlsTY5RbG0uCJsC2SAx09gaHwAROm8xOZrhfgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},82229:function(e,t){t.Z={src:"/_next/static/media/plus.bf3b9eaf.png",height:96,width:96,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAASFBMVEVMr1BMr09Lr1BLr09Mrk9LrlBLrk9Lr1BMrk9LrlBLrk9Mr1BMr09Lr1BLr09Mrk9Mr1BMr1BMrlBMr1BMr09Lr1BMrlBMr1BpCe6MAAAAGHRSTlMAAAAAAAAAAgICBJWVlZWVm5ycoaGhocIdP/lBAAAAQUlEQVR42i3KsQGAIAwEwFc/EBAQiJL9N9XC+g5QnpUKpMzHmBNEQu9BAso93IcVtDXd57p+2gUx074ccShbpW4vYXECto+7bjIAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},36239:function(e,t){t.Z={src:"/_next/static/media/image 1256.59e6835a.png",height:120,width:120,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABA0lEQVR42mP4XBjJzAAFnzKjjgLxps9lkbafC6KOArExA1wyKXr9l/aw/186wv5/So68/jHR48HHlEAJiGRy9LrPTWH//54J//3nZNhfEPtjfMhdiGRa1MHPzWH//5wK//3/Usz//1fi//89HfXnS2vE/0/pUQcZvnSGrf13MhwoEfPv/8Xo/79Oev//dcbt389D/v+/tEcuYfj/Idz92tbE/1l5WX/v7Yj6P3vz1v/la4/9O7Wr+///9wwmDP/vR4RvnJnyn0Ep/+/eBdH/2/Ze+W+789W/fTvn/v9/gcGV4f/DiJDt84AKjHP/nlmT+P/+vrz/ZzeX/Ht5KOX//+tBTgDPoZqdMmWfRwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},94148:function(e,t,o){o.d(t,{Z:function(){return i}});var a=o(31929),s=o(66967),n=o(88767),d=o(79173),r=o(80200);const l=async()=>{if((0,r.L)()){const{data:e}=await a.default.get(s.o$);return e}};function i(e){return(0,n.useQuery)("address-list",l,{onSuccess:e,enabled:!1,onError:d.RJ})}},39491:function(e,t,o){o.d(t,{Z:function(){return r}});var a=o(31929),s=o(66967),n=o(88767);const d=async e=>{const{data:t}=await a.default.post(s.x$,e);return t};function r(){return(0,n.useMutation)("add-address",d)}},75180:function(e,t,o){o.d(t,{Bm:function(){return s},c$:function(){return n}});var a=o(77331);const s=(e,t)=>{e?(t({type:a.aO.setLocation,payload:{lat:null===e||void 0===e?void 0:e.latitude,lng:null===e||void 0===e?void 0:e.longitude}}),t({type:a.aO.setOpenLocation,payload:!1}),t({type:a.aO.setShowCurrentLocation,payload:!0}),t({type:a.aO.setGeoLocationEnable,payload:!0})):t({type:a.aO.setOpenLocation,payload:!0})},n=e=>{e({type:a.aO.setOpenLocation,payload:!1}),e({type:a.aO.setShowCurrentLocation,payload:!1}),e({type:a.aO.setGeoLocationEnable,payload:!1}),e({type:a.aO.setCurrentLocation,payload:""})}},59551:function(e,t,o){o.d(t,{Z:function(){return w}});var a=o(85893),s=o(67294),n=o(26447),d=o(48263),r=o(69397),l=o(82175),i=o(84078),c=o(8753),u=o(74231),p=o(22120);var v=()=>{const{t:e}=(0,p.$G)();return u.Ry({address:u.Z_().required(e("Address is required")),contact_person_name:u.Z_().required(e("Name is required")),contact_person_number:u.Z_().required(e("Phone Number is required"))})},h=o(39491),f=o(86501),g=o(79173),m=o(20243),y=(o(86859),o(31929)),A=o(66967),b=o(88767);const x=async e=>{const{data:t}=await y.default.put("".concat(A.jT,"/").concat(null===e||void 0===e?void 0:e.id),e);return t};var _=o(9473),E=o(84204),L=o(16105),Z=o(51126);var w=e=>{let{configData:t,deliveryAddress:o,personName:u,phone:p,lat:y,lng:A,popoverClose:w,refetch:P,isRefetcing:j,atModal:C,addressType:I,editAddress:M,setAddAddress:O,email:D}=e;(0,Z.t)("Home"),(0,Z.t)("Office"),(0,Z.t)("Others");const S=localStorage.getItem("token"),B=(0,_.I0)(),{guestUserInfo:R}=(0,_.v9)((e=>e.guestUserInfo)),{mutate:H,isLoading:N}=(0,h.Z)(),{mutate:G,isLoading:T}
1=(0,b.useMutation)("update-address",x),V=(0,l.TA)({initialValues:{contact_person_email:S?D||"":R?R.contact_person_email:"",address:"",address_type:S?I||"":R?R.address_type:"",address_label:S?"":R?R.address_label:"",contact_person_name:S?u||"":R?R.contact_person_name:"",contact_person_number:S?M?null===M||void 0===M?void 0:M.contact_person_number:p||"":R?R.contact_person_number:"",additional_information:S?M?null===M||void 0===M?void 0:M.additional_information:"":R?R.additional_information:"",latitude:y,longitude:A,road:S?M?null===M||void 0===M?void 0:M.road:"":R?R.road:"",house:S?M?null===M||void 0===M?void 0:M.house:"":R?R.house:"",floor:S?M?null===M||void 0===M?void 0:M.floor:"":R?R.floor:""},validationSchema:v(),onSubmit:async(e,t)=>{try{let t={...e,address_type:""!==e.address_label?e.address_label:e.address_type};F(t)}catch(o){}}}),F=e=>{if(S)if(M&&(null===M||void 0===M?void 0:M.address_type)){const t={...e,id:null===M||void 0===M?void 0:M.id};G(t,{onSuccess:e=>{"true"===C?(f.ZP.success(null===e||void 0===e?void 0:e.message),w(),null===P||void 0===P||P()):(f.ZP.success(null===e||void 0===e?void 0:e.message),null===P||void 0===P||P(),O(!1))},onError:g.RJ})}else H(e,{onSuccess:e=>{e&&("true"===C?(f.ZP.success(null===e||void 0===e?void 0:e.message),null===w||void 0===w||w(),null===P||void 0===P||P()):(f.ZP.success(null===e||void 0===e?void 0:e.message),null===P||void 0===P||P(),O(!1)))},onError:g.RJ});else B((0,E.Jw)(e)),B((0,L.g1)(!1))};(0,s.useEffect)((()=>{V.setFieldValue("address",o),V.setFieldValue("address_type",I),V.setFieldValue("latitude",y),V.setFieldValue("longitude",A)}),[o,I,y,A]);const z=(0,m.G)()?(0,m.G)():"ltr";return(0,a.jsx)(n.Z,{children:(0,a.jsx)("form",{noValidate:!0,onSubmit:V.handleSubmit,children:(0,a.jsxs)(d.ZP,{container:!0,spacing:2.8,children:["other"===I&&(0,a.jsxs)(d.ZP,{item:!0,xs:12,md:12,children:[" ",(0,a.jsx)(i.Z,{type:"text",label:(0,Z.t)("Label Name(Optional)"),touched:V.touched.address_label,errors:V.errors.address_label,fieldProps:V.getFieldProps("address_label"),onChangeHandler:e=>{V.setFieldValue("address_label",e)},value:V.values.address_label})]}),(0,a.jsx)(d.ZP,{item:!0,xs:12,md:12,children:(0,a.jsx)(i.Z,{type:"text",label:(0,Z.t)("Delivery Address"),touched:!1,errors:"",fieldProps:"",onChangeHandler:()=>{},value:""})}),(0,a.jsx)(d.ZP,{item:!0,xs:12,md:6,children:(0,a.jsx)(i.Z,{required:"true",type:"text",label:(0,Z.t)("Contact Person Name"),touched:V.touched.contact_person_name,errors:V.errors.contact_person_name,fieldProps:V.getFieldProps("contact_person_name"),onChangeHandler:e=>{V.setFieldValue("contact_person_name",e)},value:V.values.contact_person_name})}),(0,a.jsx)(d.ZP,{item:!0,xs:12,md:6,children:(0,a.jsx)(c.Z,{value:V.values.contact_person_number,onHandleChange:e=>{V.setFieldValue("contact_person_number",e)},initCountry:null===t||void 0===t?void 0:t.country,touched:V.touched.contact_person_number,errors:V.errors.contact_person_number,rtlChange:"true",lanDirection:z,height:"45px"})}),(0,a.jsx)(d.ZP,{item:!0,xs:12,md:12,children:(0,a.jsx)(i.Z,{type:"text",label:(0,Z.t)("Home Address (Optional)"),touched:V.touched.road,errors:V.errors.road,fieldProps:V.getFieldProps("road"),onChangeHandler:e=>{V.setFieldValue("road",e)},value:V.values.road})}),(0,a.jsx)(d.ZP,{item:!0,xs:12,md:6,children:(0,a.jsx)(i.Z,{type:"text",label:(0,Z.t)("Additional info (Optional)"),touched:V.touched.house,errors:V.errors.house,fieldProps:V.getFieldProps("house"),onChangeHandler:e=>{V.setFieldValue("house",e)},value:V.values.house})}),(0,a.jsx)(d.ZP,{item:!0,xs:12,md:6,children:(0,a.jsx)(i.Z,{type:"text",label:(0,Z.t)("Business name (Optional)"),touched:V.touched.floor,errors:V.errors.floor,fieldProps:V.getFieldProps("floor"),onChangeHandler:e=>{V.setFieldValue("floor",e)},value:V.values.floor})}),(0,a.jsx)(d.ZP,{item:!0,xs:12,md:6,sx:{display:{xs:"none",md:"block"}}}),(0,a.jsx)(d.ZP,{item:!0,xs:12,md:6,align:"end",children:(0,a.jsx)(r.Z,{variant:"contained",sx:{width:{xs:"100%",md:"fit-content"}},children:(0,Z.t)("Save Location")})})]})})})}},41044:function(e,t,o){var a=o(85893),s=o(67294),n=o(89609),d=o(88085),r=o(2734),l=o(61730),i=o(21987),c=o(54799),u=o(23972),p=o(95076),v=o(50594),h=o(96427),f=(o(40077),o(32498),o(77331)),g=(o(75180),o(14681)),m=o(70179),y=o(80731),A=o(47475),b=o(46075),x=o(13841),_=o(59551),E=(o(94148),o(2908),o(36239),o(2880),o(82229),o(20706),o(9473)),L=o(16105),Z=(o(84204),o(18318)),w=o(52091),P=o(61121);const j=e=>{var t,o,j;const{configData:C,refetch:I,t:M,openAddressModal:O,editAddress:D,setEditAddress:S}=e,B=(0,r.Z)(),[R,H]=((0,l.Z)(B.breakpoints.down("sm")),(0,s.useReducer)(f.I6,f.E3)),{profileInfo:N}=(0,E.v9)((e=>e.profileInfo)),{guestUserInfo:G}=(0,E.v9)((e=>
1e.guestUserInfo)),[T,V]=(0,s.useState)((null===G||void 0===G?void 0:G.address_type)?null===G||void 0===G?void 0:G.address_type:"home"),[F,z]=(0,s.useState)({lat:null===D||void 0===D?void 0:D.latitude,lng:null===D||void 0===D?void 0:D.longitude}),U=(localStorage.getItem("token"),(0,E.I0)()),k="".concat(null===N||void 0===N?void 0:N.f_name," ").concat(null===N||void 0===N?void 0:N.l_name),{coords:J,isGeolocationAvailable:K,isGeolocationEnabled:W,getPosition:X}=(0,g.E)({positionOptions:{enableHighAccuracy:!1},userDecisionTimeout:5e3,isGeolocationEnabled:!0});(0,s.useEffect)((()=>{z(null===R||void 0===R?void 0:R.location)}),[null===R||void 0===R?void 0:R.location]),(0,s.useEffect)((()=>{H({type:f.aO.setLocation,payload:null===C||void 0===C?void 0:C.default_location})}),[]);const{data:Y,isLoading:q}=(0,m.Z)(R.searchKey,R.enabled);(0,s.useEffect)((()=>{Y&&H({type:f.aO.setPredictions,payload:null===Y||void 0===Y?void 0:Y.predictions})}),[Y]);const{data:Q,isFetching:$}=(0,y.Z)(R.location,R.geoLocationEnable);(0,s.useEffect)((()=>{var e;(null===Q||void 0===Q?void 0:Q.results)&&H({type:f.aO.setCurrentLocation,payload:null===(e=null===Q||void 0===Q?void 0:Q.results[0])||void 0===e?void 0:e.formatted_address})}),[Q,R.location]);const{data:ee}=(0,A.Z)(R.location,R.zoneIdEnabled);(0,s.useEffect)((()=>{ee&&localStorage.setItem("zoneid",null===ee||void 0===ee?void 0:ee.zone_id)}),[ee]);const{isLoading:te,data:oe}=(0,b.Z)(R.placeId,R.placeDetailsEnabled);(0,s.useEffect)((()=>{var e,t;oe&&H({type:f.aO.setLocation,payload:null===oe||void 0===oe||null===(e=oe.result)||void 0===e||null===(t=e.geometry)||void 0===t?void 0:t.location})}),[oe]),(0,s.useEffect)((()=>{R.placeDescription&&H({type:f.aO.setCurrentLocation,payload:R.placeDescription})}),[R.placeDescription]),(0,s.useEffect)((()=>{ae("home")}),[]);const ae=e=>{V(e),D&&S({...D,address_type:e})};return(0,a.jsx)(n.Z,{children:O&&(0,a.jsx)(p.Z,{openModal:O,handleClose:()=>U((0,L.g1)(!1)),children:(0,a.jsxs)(i.Z,{sx:{position:"relative",width:{xs:"300px",sm:"450px",md:"550px",lg:"730px"},p:"1.4rem"},children:[(0,a.jsx)(c.Z,{onClick:()=>U((0,L.g1)(!1)),sx:{position:"absolute",top:{xs:18,md:0},right:{xs:12,md:0},p:.5},children:(0,a.jsx)(v.Z,{sx:{fontSize:"16px"}})}),(0,a.jsx)(d.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",mb:1,children:(0,a.jsx)(u.Z,{variant:"subtitle1",children:M("Add New Address")})}),(0,a.jsx)(x.Z,{setLocation:e=>{console.log("setLocation >>",e)},location:R.location,setPlaceDetailsEnabled:e=>{console.log("setPlaceDetailsEnabled >>",e)},height:"350px"}),(0,a.jsx)(u.Z,{sx:{fontSize:"10px",textAlign:"center",mt:"8px",color:"grey"},children:M("Add the location correctly")}),(0,a.jsxs)(h.Xw,{pt:"20px",children:[(0,a.jsx)(u.Z,{children:M("Label As")}),(0,a.jsxs)(d.Z,{direction:"row",spacing:2,pt:"10px",children:[(0,a.jsx)(h.Bh,{value:"home",addressType:G?T:(null===D||void 0===D?void 0:D.address_type)?null===D||void 0===D?void 0:D.address_type:T,sx:{px:2,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.2)",borderRadius:1},onClick:()=>ae("home"),children:(0,a.jsx)(Z.wB6,{height:24,width:24,style:{height:24,width:24}})}),(0,a.jsx)(h.Bh,{value:"office",addressType:(null===D||void 0===D?void 0:D.address_type)?null===D||void 0===D?void 0:D.address_type:T,sx:{px:2,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.2)",borderRadius:1},onClick:()=>ae("office"),children:(0,a.jsx)(w.I8D,{height:24,width:24,style:{height:24,width:24}})}),(0,a.jsx)(h.Bh,{value:"other",addressType:(null===D||void 0===D?void 0:D.address_type)?null===D||void 0===D?void 0:D.address_type:T,onClick:()=>ae("other"),sx:{px:2,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.2)",borderRadius:1},children:(0,a.jsx)(P.Hy1,{height:24,width:24,style:{height:24,width:24}})})]})]}),(0,a.jsx)(h.Xw,{mt:"1.5rem",children:(0,a.jsx)(_.Z,{atModal:"true",setAddressType:V,addressType:(null===D||void 0===D?void 0:D.address_type)?null===D||void 0===D?void 0:D.address_type:T,configData:C,deliveryAddress:null===(t=null===Q||void 0===Q?void 0:Q.results[0])||void 0===t?void 0:t.formatted_address,personName:D?null===D||void 0===D?void 0:D.contact_person_name:k,phone:D?null===D||void 0===D?void 0:D.contact_person_number:null===N||void 0===N?void 0:N.phone,email:null===N||void 0===N?void 0:N.email,lat:D?null===D||void 0===D?void 0:D.lat:null===(o=R.location)||void 0===o?void 0:o.lat,lng:D?null===D||void 0===D?void 0:D.lng:null===(j=R.location)||void 0===j?void 0:j.lng,popoverClose:()=>{U((0,L.g1)(!1))},refetch:I,isRefetcing:$,editAddress:D})})]})})})};j.propTypes={},t.Z=j},77331:function(e,t,o){o.d(t,{E3:function(){return a},I6:function(){return s},aO:function(){return n}});const a={openModal:!1,showCurrentLocation:!0,predictions:[],placeId:"",placeDescription:null,zoneIdEnabled:!0,geoLocationEnable:!1,placeDetailsEnabled:!1,searchKey:"",enabled:!1,currentLocation:"",location:null,openLocation:!1,rerenderMap:!1,streetNumber:"",houseNumber:"",floor:"",note:"",addressType:"",additional_informations:"",business_name:"",home_address:"",contact_person_name:"",contact_person_address:""},s=(e,t)=>{switch(t.type){case"setOpenModal":return{...e,openModal:t.payload};case"setShowCurrentLocation":return{...e,showCurrentLocation:t.payload};case"setPredictions":return{...e,predictions:t.payload};case"setPlaceId":return{...e,placeId:t.payload};case"setPlaceDescription":return{...e,placeDescription:t.payload};case"setZoneIdEnabled":return{...e,zoneIdEnabled:t.payload};case"setGeoLocationEnable":return{...e,geoLocationEnable:t.payload};case"setPlaceDetailsEnabled":return{...e,placeDetailsEnabled:t.payload};case"setSearchKey":return{...e,searchKey:t.payload};case"setEnabled":return{...e,enabled:t.payload};case"setCurrentLocation":return{...e,currentLocation:t.payload};case"setLocation":return{...e,location:t.payload};case"setOpenLocation":return{...e,openLocation:t.payload};case"setRerenderMap":return{...e,rerenderMap:!e.rerenderMap};case"setStreetNumber":return{...e,streetNumber:t.payload};case"setHouseNumber":return{...e,houseNumber:t.payload};case"setFloor":return{...e,floor:t.payload};case"setHome_address":case"setHome_address":return{...e,home_address:t.payload};case"setBusiness_name":return{...e,business_name:t.payload};case"setAddressType":return{...e,addressType:t.payload};default:return e}},n={setOpenModal:"setOpenModal",setShowCurrentLocation:"setShowCurrentLocation",setPredictions:"setPredictions",setPlaceId:"setPlaceId",setPlaceDescription:"setPlaceDescription",setZoneIdEnabled:"setZoneIdEnabled",setGeoLocationEnable:"setGeoLocationEnable",setPlaceDetailsEnabled:"setPlaceDetailsEnabled",setSearchKey:"setSearchKey",setEnabled:"setEnabled",setCurrentLocation:"setCurrentLocation",setLocation:"set
1Location",setOpenLocation:"setOpenLocation",setRerenderMap:"setRerenderMap",setStreetNumber:"setStreetNumber",setHouseNumber:"setHouseNumber",setFloor:"setFloor",setAddressType:"setAddressType",setContactName:"setContactName",setContactAddress:"setContactAddress"}}}]);

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.