PageSourceSearch

https://mangwale.com/_next/static/chunks/pages/store-registration-94fe96f732caf5e8.js

js mangwale.com collected 2026-10-02 01:37:56 UTC 71,136 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7343],{5969:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/store-registration",function(){return l(29507)}])},29507:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSP:()=>ty,default:()=>tA});var n=l(37876),r=l(14232),i=l(33187),a=l(91665),o=l(62080),s=l(87285),d=l(28343),u=l(6995),p=l(19055),c=l(35003),x=l(97914),m=l(95955),h=l(38595),g=l(66703),f=l(62148),v=l(74441),j=l(3218),b=l(35268),y=l(38388),A=l(82);let _=(0,b.Ay)(m.A)(e=>{let{theme:t}=e;return{"&.MuiStepConnector-root":{border:"none",display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiStepConnector-line":{border:"none",borderTop:"none",width:"100%",height:"3px"}}}),S=(0,b.Ay)(h.A)(e=>{let{theme:t,active:l,complete:n,isSmallSize:r}=e;return{"& .MuiStepLabel-root":{color:n?"green":l?"white":t.palette.grey[600],padding:r?"10px":"15px 37px",alignItems:"center",justifyContent:"center",display:"flex"},"& .MuiStepLabel-root .MuiStepLabel-label":{fontWeight:400,color:n?"green":l?t.palette.text.primary:t.palette.grey[500],fontSize:r?"8px":"16px",lineHeight:r?"8px":"16px"}}}),w=["General Information","Business Plan","Complete Registration"],z=e=>{let t,{activeStep:l,flag:r}=e,i=(0,g.A)(),{t:a}=(0,A.Bd)(),o=(0,u.A)(i.breakpoints.down("md"));return t=JSON.parse(localStorage.getItem("settings")),(0,n.jsx)(f.A,{sx:{boxShadow:"0px 4.48276px 11.2069px ".concat((0,v.X4)(i.palette.neutral[1e3],.1)),paddingRight:"0px",paddingLeft:"0px"},activeStep:l,connector:(0,n.jsx)(_,{}),children:w.map((e,r)=>{let s=r<l;return(0,n.jsxs)(S,{isSmallSize:o,sx:{paddingLeft:"0px",paddingRight:"0px",position:"relative",".MuiStepLabel-iconContainer":{paddingRight:"4px !important"},".MuiStepLabel-iconContainer .MuiSvgIcon-root ":{width:o?"12px":"1em",height:o?"12px":"1em"}},active:r===l,complete:s,children:[r!==w.length-1&&(0,n.jsx)(y.A,{sx:{position:"absolute",right:o?"0px":"18px",top:"50%",width:o?"16px":"38px",height:o?"16px":"38px",content:'""',borderLeft:"".concat(o?"1px":"2px"," solid ").concat(s?"green":l===r?i.palette.primary.main:i.palette.neutral[400]),borderTop:"".concat(o?"1px":"2px"," solid ").concat(s?"green":l===r?i.palette.primary.main:i.palette.neutral[400]),transform:(null==t?void 0:t.direction)==="rtl"?"translateY(-50%) rotate(230deg)":"translateY(-50%) rotate(135deg)"}}),(0,n.jsx)(j.A,{children:a(e)})]},e)})})};function k(e){let{activeStep:t,flag:l}=e;return(0,n.jsx)(d.jB,{sx:{marginTop:{xs:"16px",md:"40px"}},justifyContent:"center",alignItems:"center",children:(0,n.jsx)(z,{flag:l,activeStep:t})})}var C=l(60795),I=l(41316);l(45485);var F=l(39467),R=l(11632),B=l(71190),P=l(11928),T=l(24431),M=l(43053),E=l(98952),D=l(89037),X=l(82179);(0,b.Ay)(c.A)(e=>{let{theme:t,active:l}=e;return{fontSize:"20px",cursor:"pointer",fontWeight:"true"===l?"700":"400"}});let q=(0,b.Ay)(D.A)(e=>{let{theme:t,active:l}=e;return{backgroundColor:"true"===l?t.palette.primary.main:"inherit",borderRadius:"7px",width:"100%",height:"3px"}}),L=e=>{let{tabs:t,currentTab:l,setCurrentTab:r}=e;return(0,n.jsx)(X.A,{direction:"row",alignItems:"center",spacing:2,sx:{overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap",height:"-webkit-fill-available"},children:(null==t?void 0:t.length)>0&&t.map((e,t)=>(0,n.jsxs)(X.A,{alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsx)(c.A,{active:l===t?"true":"false",onClick:()=>r(t,e),children:(0,x.t)(null==e?void 0:e.value)}),(0,n.jsx)(q,{active:l===t?"true":"false"})]},t))})};L.propTypes={};var W=l(74695),H=l(63356),O=l(42224),N=l(1912),V=l(37376),Y=l(32197);let Z=e=>{let{touched:t,errors:l,options:i,height:a,handleChange:o=()=>{},value:s,icon:d,placeholder:u="Select options",label:p="Select options",zoneOption:c}=e,[m,h]=(0,r.useState)([]);return(0,r.useEffect)(()=>{o(m)},[m]),(0,n.jsx)(O.A,{multiple:!0,id:"tags-outlined",options:c,getOptionLabel:e=>e.label,value:m,getOptionDisabled:e=>m.some(t=>t.value===e.value),isOptionEqualToValue:(e,t)=>e.value===t.value,sx:{paddingY:"0px"},onChange:(e,t)=>
1h(t),renderOption:(e,t)=>{let l=m.some(e=>e.value===t.value);return(0,n.jsxs)("li",{...e,style:{...e.style,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)("span",{children:t.label}),(0,n.jsx)(Y.A,{sx:{color:e=>e.palette.primary.main,fontSize:"20px",ml:1,visibility:l?"visible":"hidden"}})]})},renderTags:(e,t)=>null==e?void 0:e.slice(0,3).map((e,l)=>(0,n.jsx)(H.A,{sx:{height:"24px",pr:"3px",fontWeight:"400",backgroundColor:e=>e.palette.primary.main,color:e=>e.palette.neutral[500],"& .MuiChip-deleteIcon":{color:e=>e.palette.neutral[100]}},label:e.label,deleteIcon:(0,n.jsx)(V.A,{sx:{width:"14px",height:"14px",fontWeight:"600"}}),...t({index:l})},e.label)),renderInput:e=>(0,n.jsx)(N.A,{...e,label:(0,x.t)(p),placeholder:(0,x.t)(u),error:!!(t&&l),helperText:t&&(0,x.t)(l),InputProps:{...e.InputProps,endAdornment:(0,n.jsxs)(n.Fragment,{children:[m.length>3&&(0,n.jsx)(H.A,{label:"".concat(m.length-3," +"),color:"primary",size:"small",sx:{position:"absolute",right:{xs:"30px",md:"35px"},top:"50%",transform:"translateY(-50%)",borderRadius:"16px",backgroundColor:e=>e.palette.primary.main,color:e=>e.palette.neutral[100],height:"24px",padding:"0 3px",fontSize:"13px",zIndex:10}}),e.InputProps.endAdornment]})},sx:{"& .MuiOutlinedInput-root":{minHeight:a||"45px",display:"flex",alignItems:"center"},"& .MuiAutocomplete-inputRoot":{paddingTop:{xs:"10px",md:"0px"},paddingBottom:{xs:"10px",md:"0px"}},"& .MuiInputBase-input":{padding:"10px 6px"},"& .MuiFormHelperText-root":{marginLeft:"0px",marginTop:"5px",color:e=>e.palette.error.main},"& .MuiInputBase-input::placeholder":{fontSize:"13px"}}})})};var G=l(4421);let J=(e,t)=>{let l=null==t?void 0:t.find(t=>t.value===e);return(null==l?void 0:l.type)==="rental"},U=e=>{var t,l,i,a,o,s,u,p;let{RestaurantJoinFormik:c,restaurantNameHandler:x,restaurantAddressHandler:m,restaurantvatHandler:h,zoneOption:f,zoneHandler:j,moduleHandler:b,moduleOption:y,handleTimeTypeChangeHandler:_,currentTab:S,handleCurrentTab:w,tabs:z,selectedLanguage:k,minDeliveryTimeHandler:D,maxDeliveryTimeHandler:X,pickupZoneHandler:q}=e,{t:H}=(0,A.Bd)(),O=(0,g.A)(),[N,V]=r.useState("");(0,r.useEffect)(()=>{var e;V(null==(e=c.values.restaurant_address)?void 0:e[k])},[c.values.restaurant_address,k]);let{selectedModule:Y}=(0,W.d4)(e=>e.utilsData),[U,$]=(0,r.useState)("");return(0,r.useEffect)(()=>{$(null==Y?void 0:Y.module_type)},[Y]),(0,n.jsx)(d.jB,{alignItems:"center",children:(0,n.jsx)(I.Ay,{container:!0,spacing:{xs:"0",md:"3"},children:(0,n.jsxs)(d.jB,{spacing:4,children:[(0,n.jsxs)(d.jB,{sx:{padding:{xs:"10px",md:"20px"},paddingBottom:"0px !important",borderRadius:"10px",gap:"0px",backgroundColor:e=>e.palette.background.default},children:[(0,n.jsx)(L,{tabs:z,currentTab:S,setCurrentTab:w,fontSize:""}),(0,n.jsx)(C.A,{mt:4,children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(O.palette.neutral[1e3],.8),backgroundColor:!0,required:"true",type:"text",label:"".concat(H("Business Name")," (").concat(H(null==(t=z[S])?void 0:t.value),")"),placeholder:H("Business name"),value:c.values.restaurant_name[k],touched:c.touched.restaurant_name,errors:c.errors.restaurant_name,onChangeHandler:x,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(B.A,{sx:{color:c.touched.restaurant_name&&!c.errors.restaurant_name?O.palette.primary.main:O.palette.neutral[400],fontSize:"18px"}})})})}),(0,n.jsx)(C.A,{children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(O.palette.neutral[1e3],.8),backgroundColor:!0,placeholder:H("Business address"),required:"true",type:"text",label:"".concat(H("Business Address")," (").concat(H(null==(l=z[S])?void 0:l.value),")"),touched:c.touched.restaurant_address,errors:c.errors.restaurant_address,value:(null==(i=c.values.restaurant_address)?void 0:i[k])||"",onChangeHandler:m,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(P.A,{sx:{color:c.touched.restaurant_address&&!c.errors.restaurant_address?O.palette.primary.main:(0,v.X4)(O.palette.neutral[400],.7),fontSize:"18px"}})})})})]}),(0,n.jsxs)(d.jB,{gap:{xs:"30px",md:"30px"},children:[(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:12,md:12,children:(0,n.jsx)(M.A,{labelColor:(0,v.X4)(O.palette.neutral[1e3],.8),selectFieldData:f,inputLabel:H("Business Zone"),passSelectedValue:j,touched:c.touched.zoneId,errors:c.errors.zoneId,fieldProps:c.getFieldProps("zoneId"),placeholder:H("Select Business Zone"),required:!0,startIcon:(0,n.jsx)(T.A,{sx:{color:(0,v.X4)(O.palette.neutral[400],.7),fontSize:"18px"}})})}),c.values.zoneId&&(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:12,md:12,children:(0,n.jsx)(M.A,{labelColor:(0,v.X4)(O.palette.neutral[1e3],.8),selectFieldData:y,inputLabel:H("Business Module"),placeholder:H("Select Business Module"),passSelectedValue:b,touched:c.touched.module_id,errors:c.errors.module_id,fieldProps:c.getFieldProps("module_id"),required:!0,startIcon:(0,n.jsx)(B.A,{sx:{color:(0,v.X4)(O.palette.neutral[400],.7),fontSize:"18px"}})})}),J(null==c||null==(a=c.values)?void 0:a.module_id,y)&&(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:12,md:12,children:(0,n.jsx)(Z,{required:!0,zoneOption:f,label:"Pickup Area",placeholder:c.values.pickup_zone_id.length<1?"Select Pickup Area":"",handleChange:q,icon:(0,n.jsx)(G.A,{sx:{color:c.touched.restaurant_name&&!c.errors.restaurant_name?O.palette.primary.main:(0,v.X4)(O.palette.neutral[400],.7),fontSize:"16px"}})})}),(0,n.jsxs)(I.Ay,{item:!0,container:!0,xs:12,sm:12,md:12,spacing:{xs:0,md:2},children:[(0,n.jsx)(I.Ay,{item:!0,md:4,xs:12,children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(O.palette.neutral[1e3],.8),placeholder:H(J(null==c||null==(o=c.values)?void 0:o.module_id,y)?"Min Pickup Time":"Min Delivery Time"),required:"true",type:"number",name:"min_delivery_time",label:H(J(null==c||null==(s=c.values)?void 0:s.module_id,y)?"Minimum Pickup Time":"Minimum Delivery Time"),touched:c.touched.min_delivery_time,errors:c.errors.min_delivery_time,fieldProps:c.getFieldProps("min_delivery_time"),onChangeHandler:D,value:c.values.min_delivery_time,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(E.A,{sx:{color:c.touched.min_delivery_time&&!c.errors.min_delivery_time?O.palette.primary.main:(0,v.X4)(O.palette.neutral[400],.7),fontSize:"18px"}})})})}),(0,n.jsx)(I.Ay,{item:!0,md:4,xs:12,children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(O.palette.neutral[1e3],.8),placeholder:H(J(null==c||null==(u=c.values)?void 0:u.module_id,y)?"Max Pickup Time":"Max Delivery Time"),required:"true",type:"number",name:"max_delivery_time",label:H(J(null==c||null==(p=c.values)?void 0:p.module_id,y)?"Maximum Pickup Time":"Maximum Delivery Time"),touched:c.touched.max_delivery_time,errors:c.errors.max_delivery_time,fieldProps:c.getFieldProps("max_delivery_time"),onChangeHandler:X,value:c.values.max_delivery_time,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(E.A,{sx:{color:c.touched.max_delivery_time&&!c.errors.max_delivery_time?O.palette.primary.main:(0,v.X4)(O.palette.neutral[400],.7),fontSize:"18px"}})})})}),(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:12,md:4,children:(0,n.jsx)(M.A,{required:!0,labelColor:(0,v.X4)(O.palette.neutral[1e3],.8),selectFieldData:[{label:"Minute",value:"minute"},{label:"Hour",value:"hour"},{label:"Day",value:"day"}],inputLabel:H("Duration type"),passSelectedValue:_,touched:c.touched.delivery_time_type,errors:c.errors.delivery_time_type,placeholder:H("Select Duration"),fieldProps:c.getFieldProps("delivery_time_type")})})]})]})]})})},N||k)};var $=l(39091);
1let Q=["image/jpg","image/jpeg","image/gif","image/png","image/webp"];var K=l(50223),ee=l(85503),et=l(13880),el=l(54427),en=l(18538),er=l(66807),ei=l(73862),ea=l(11131),eo=l(1992),es=l(64907),ed=l(77165),eu=l(60398);let ep=async(e,t)=>{if((null==e?void 0:e.lat)&&t){let{data:l}=await eu.A.get("".concat(es.a$,"?lat=").concat(null==e?void 0:e.lat,"&lng=").concat(null==e?void 0:e.lng,"&zone_id=").concat(t));return l}};var ec=l(97685),ex=l(76209),em=l(16226),eh=l(91867);let eg=e=>{var t,l;let{handleLocation:i,zoneId:a,polygonPaths:o,inZoom:s,restaurantAddressHandler:u,setInZone:p,searchHeight:x,zoneHandler:m,fromVendor:h,showZoneWarning:f,setShowZoneWarning:v,inZone:j}=e,b=(0,g.A)(),{configData:_}=(0,W.d4)(e=>e.configData),[S,w]=(0,r.useState)(!1),[z,k]=(0,r.useState)(_&&(null==_?void 0:_.default_location)),[I,F]=(0,r.useState)(""),[R,B]=(0,r.useState)(!1),[P,T]=(0,r.useState)(!0),[M,E]=(0,r.useState)(void 0),[D,X]=(0,r.useState)([]),[q,L]=(0,r.useState)(""),[H,O]=(0,r.useState)(!1),{t:N}=(0,A.Bd)();(0,r.useEffect)(()=>{var e,t;k({lat:null==_||null==(e=_.default_location)?void 0:e.lat,lng:null==_||null==(t=_.default_location)?void 0:t.lng})},[null==_?void 0:_.default_location]);let{coords:V,isGeolocationAvailable:Y,isGeolocationEnabled:Z,getPosition:G}=(0,er.L)({positionOptions:{enableHighAccuracy:!1},userDecisionTimeout:5e3,isGeolocationEnabled:!0}),{data:J,isLoading:U}=(0,ei.A)(I,R);(0,r.useEffect)(()=>{if(J){var e;X(null==J||null==(e=J.suggestions)?void 0:e.map(e=>{var t,l,n,r,i,a,o;return{place_id:null==e||null==(t=e.placePrediction)?void 0:t.placeId,description:"".concat(null==e||null==(r=e.placePrediction)||null==(n=r.structuredFormat)||null==(l=n.mainText)?void 0:l.text,", ").concat(null==e||null==(o=e.placePrediction)||null==(a=o.structuredFormat)||null==(i=a.secondaryText)?void 0:i.text)}}))}},[J]);let{data:$}=(0,ea.A)(z,S);(0,r.useEffect)(()=>{if($){var e,t,l,n;localStorage.setItem("zoneid",null==$?void 0:$.zone_id),(null==$?void 0:$.zone_id)&&(null==$||null==(t=$.zone_data)||null==(e=t[0])?void 0:e.id)&&(null==m||m(null==$||null==(n=$.zone_data)||null==(l=n[0])?void 0:l.id))}},[$]);let{isLoading:Q,data:K}=(0,en.A)(q,P);(0,r.useEffect)(()=>{if(K){var e,t;k({lat:null==K||null==(e=K.location)?void 0:e.latitude,lng:null==K||null==(t=K.location)?void 0:t.longitude}),w(!0)}},[K]);let{data:es}=function(e,t,l){return(0,eo.useQuery)(["zoneId",t,null==e?void 0:e.lat,null==e?void 0:e.lng],()=>ep(e,t),{onSuccess:l,onError:ed.Jm})}(z,a,e=>{p(e),e||void 0===e?v(!1):(v(!0),null==m||m(null))}),{data:eu,isFetching:ec}=(0,el.A)(z);return(0,r.useEffect)(()=>{if(f)null==u||u(null);else if((null==o?void 0:o.length)>0){var e;u(null==eu||null==(e=eu.results[0])?void 0:e.formatted_address)}i(z)},[eu,f,o]),(0,n.jsx)(d.jB,{children:(0,n.jsxs)(y.A,{sx:{backgroundColor:b.palette.background.default,padding:{xs:".75rem",sm:"1rem"},borderRadius:{xs:".25rem",sm:"10px"}},children:[(0,n.jsxs)(C.A,{mb:2,children:[(0,n.jsx)(c.A,{variant:"body1",fontWeight:500,mb:".125rem",children:N("Set Your Business Location on Map")}),(0,n.jsx)(c.A,{variant:"body2",fontSize:"0.625rem !important",children:N("Please mark the exact location of your business so customers can easily find you.")})]}),(0,n.jsxs)(d.jB,{sx:{position:"relative"},children:[(0,n.jsx)(d.jB,{sx:{right:"10px",position:"absolute",zIndex:999,maxWidth:"250px",top:"10px"},children:(0,n.jsx)(ex.A,{newMap:!0,handleCloseLocation:()=>{X([])},frommap:"false",setSearchKey:F,setEnabled:B,predictions:D,setPlaceId:L,setPlaceDetailsEnabled:T,setPlaceDescription:E,HandleChangeForSearch:e=>{e.target.value&&(F(e.target.value),B(!0),T(!0))},handleChange:(e,t)=>
1{t&&L(null==t?void 0:t.place_id),T(!0)},searchHeight:x})}),(0,n.jsx)(et.A,{setLocation:k,location:z,setPlaceDetailsEnabled:T,placeDetailsEnabled:P,locationEnabled:S,setPlaceDescription:E,setLocationEnabled:w,height:"250px",polygonPaths:o,inZoom:s,isModalExpand:H,setIsModalExpand:O,fromVendor:h}),(0,n.jsx)(d.jB,{sx:{position:"absolute",bottom:"44%",left:{xs:"6%",sm:"3%"},right:"0px",zIndex:999,maxWidth:"35px"},children:(0,n.jsx)(eh.A,{isModalExpand:H,setIsModalExpand:O,t:N})}),f||!j?(0,n.jsxs)(y.A,{sx:{position:"absolute",bottom:"4%",left:"50%",transform:"translateX(-50%)",zIndex:999,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:b.palette.neutral[800],padding:"8px 12px",borderRadius:".5rem",gap:"5px",width:"max-content",maxWidth:"95%"},children:[(0,n.jsx)(ee.A,{sx:{color:b.palette.warning.main,fontSize:"20px"}}),(0,n.jsx)(c.A,{variant:"body2",sx:{color:b.palette.neutral[100],fontSize:"12px",fontWeight:500},children:N("Please place the marker inside the available zones.")})]}):(0,n.jsx)(d.jB,{sx:{position:"absolute",bottom:"4%",left:"0",right:"0",zIndex:999,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,n.jsxs)(C.A,{direction:"row",spacing:{xs:1,sm:2},backgroundColor:b.palette.neutral[100],paddingX:"5px",borderRadius:"3px",children:[(0,n.jsxs)(em.JZ,{sx:{fontSize:{xs:"10px",sm:"12px"}},children:["Latitude: ",null==(t=Number(null==z?void 0:z.lat))?void 0:t.toFixed(7)]}),(0,n.jsxs)(em.JZ,{sx:{fontSize:{xs:"10px",sm:"12px"}},children:["Longitude: ",null==(l=Number(null==z?void 0:z.lng))?void 0:l.toFixed(7)]})]})})]})]})})};var ef=l(20243),ev=l(60613);let ej=e=>{var t;let{RestaurantJoinFormik:l,singleFileUploadHandlerForImage:r,imageOnchangeHandlerForImage:i,singleFileUploadHandlerForCoverPhoto:a,imageOnchangeHandlerForCoverPhoto:o}=e,{t:s}=(0,A.Bd)(),u=(0,g.A)();return(0,n.jsxs)(d.jB,{gap:"20px",sx:{flexDirection:{xs:"column",sm:"column",md:"row"}},children:[(0,n.jsx)(y.A,{sx:{backgroundColor:u.palette.background.default,borderRadius:".5rem",padding:"1rem",textAlign:"center",flexGrow:1},children:(0,n.jsxs)(C.A,{spacing:1.5,mb:".8rem",sx:{flexGrow:1},children:[(0,n.jsxs)(C.A,{children:[(0,n.jsxs)(ef.A,{sx:{fontWeight:"500",color:u.palette.neutral[1e3]},children:[s("Business Cover"),(0,n.jsx)("span",{style:{color:"red"},children:"*"})]}),(0,n.jsx)(c.A,{fontSize:"10px",mt:.25,children:s("JPG, JPEG, PNG,WEBP  Less Than 1MB (Ratio 2:1)")})]}),(0,n.jsx)(ev.A,{type:"file",labelText:s("Add Image"),hintText:"Image format - jpg, png, jpeg,Webp,gif Image Size - maximum size 2 MB Image Ratio - 1:1",file:l.values.cover_photo,onChange:a,imageOnChange:o,width:"250px",height:"100%",error:l.touched.cover_photo&&l.errors.cover_photo}),l.touched.cover_photo&&l.errors.cover_photo&&(0,n.jsx)(c.A,{sx:{fontSize:"12px",ml:"10px",fontWeight:"inherit",color:u.palette.error.main},children:l.errors.cover_photo.replaceAll("_"," ")})]})}),(0,n.jsx)(y.A,{sx:{backgroundColor:u.palette.background.default,borderRadius:".5rem",padding:"1rem",textAlign:"center",flexGrow:1},children:(0,n.jsxs)(C.A,{spacing:1.5,mb:".8rem",sx:{flexGrow:0},children:[(0,n.jsxs)(C.A,{children:[(0,n.jsxs)(ef.A,{sx:{fontWeight:"500",color:e=>e.palette.neutral[1e3]},children:[s("Business Logo"),(0,n.jsx)("span",{style:{color:"red"},children:"*"})]}),(0,n.jsx)(c.A,{fontSize:"10px",mt:.25,children:s("JPG, JPEG, PNG,WEBP Less Than 1MB (Ratio 1:1)")})]}),(0,n.jsx)(ev.A,{type:"file",labelText:s("Add Image"),hintText:"Image format - jpg, png, jpeg, Webp, gif Image Size - maximum size 2 MB Image Ratio - 1:1",file:null==l||null==(t=l.values)?void 0:t.logo,onChange:r,imageOnChange:i,width:"150px",height:"100%",error:l.touched.logo&&l.errors.logo}),l.touched.logo&&l.errors.logo&&(0,n.jsx)(c.A,{sx:{fontSize:"12px",ml:"10px",fontWeight:"inherit",color:e=>e.palette.error.main},children:l.errors.logo})]})})]})};var eb=l(16392),ey=l(48843),eA=l(29974);let e_=e=>{let{RestaurantJoinFormik:t,fNameHandler:l,lNameHandler:r,phoneHandler:i}=e,a=(0,g.A)(),{t:o}=(0,A.Bd)(),{configData:s}=(0,W.d4)(e=>e.configData),u=(0,ey.Z)()?(0,ey.Z)():"ltr";return(0,n.jsxs)(d.jB,{children:[(0,n.jsx)(c.A,{fontSize:{xs:"16px",sm:"18px"},fontWeight:"500",textAlign:"left",p:{xs:1.2,sm:2},sx:{borderBottom:"1px solid ".concat((0,v.X4)(a.palette.neutral[400],.2))},children:o("Owner Information")}),(0,n.jsx)(C.A,{p:2,pb:{xs:2,md:0},mt:2,children:(0,n.jsxs)(I.Ay,{container:!0,columnSpacing:3,children:[(0,n.jsx)(I.Ay,{item:!0,xs:12,md:12,align:"left"}),(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(a.palette.neutral[1e3],.8),placeholder:o("First name"),required:"true",type:"text",label:o("First Name"),touched:t.touched.f_name,errors:t.errors.f_name,fieldProps:t.getFieldProps("f_name"),onChangeHandler:l,value:t.values.f_name,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(eA.A,{sx:{color:t.touched.restaurant_name&&!t.errors.restaurant_name?a.palette.primary.main:(0,v.X4)(a.palette.neutral[400],.7),fontSize:"18px"}})})})}),(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(a.palette.neutral[1e3],.8),required:"true",type:"text",placeholder:o("Last name"),label:o("Last Name"),touched:t.touched.l_name,errors:t.errors.l_name,fieldProps:t.getFieldProps("l_name"),onChangeHandler:r,value:t.values.l_name,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(eA.A,{sx:{color:t.touched.restaurant_name&&!t.errors.restaurant_name?a.palette.primary.main:(0,v.X4)(a.palette.neutral[400],.7),fontSize:"18px"}})})})}),(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(eb.A,{init
1Country:null==s?void 0:s.country,value:t.values.phone,onHandleChange:i,touched:t.touched.phone,errors:t.errors.phone,lanDirection:u,height:"45px",borderRadius:"10px",required:"true"})})]})})]})};var eS=l(39536),ew=l(53045);let ez=e=>{let{RestaurantJoinFormik:t,fNameHandler:l,lNameHandler:r,phoneHandler:i}=e,a=(0,g.A)(),{t:o}=(0,A.Bd)();return(0,n.jsxs)(d.jB,{children:[(0,n.jsx)(c.A,{fontSize:{xs:"16px",sm:"18px"},fontWeight:"500",textAlign:"left",p:{xs:1.2,sm:2},sx:{borderBottom:"1px solid ".concat((0,v.X4)(a.palette.neutral[400],.2))},children:o("Account Info")}),(0,n.jsx)(C.A,{p:2,pb:0,mt:2,children:(0,n.jsxs)(I.Ay,{container:!0,columnSpacing:3,children:[(0,n.jsx)(I.Ay,{item:!0,xs:12,md:12,align:"left"}),(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(a.palette.neutral[1e3],.8),placeholder:o("Type your email"),required:"true",type:"text",label:o("Email"),touched:t.touched.email,errors:t.errors.email,fieldProps:t.getFieldProps("email"),onChangeHandler:l,value:t.values.email,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(ew.A,{sx:{color:t.touched.email&&!t.errors.email?a.palette.primary.main:(0,v.X4)(a.palette.neutral[400],.7),fontSize:"18px"}})})})}),(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(a.palette.neutral[1e3],.8),placeholder:o("Password"),required:"true",type:"password",label:o("Password"),touched:t.touched.password,errors:t.errors.password,fieldProps:t.getFieldProps("password"),onChangeHandler:r,value:t.values.password,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(eS.A,{sx:{color:t.touched.password&&!t.errors.password?a.palette.primary.main:(0,v.X4)(a.palette.neutral[400],.7),fontSize:"18px"}})})})}),(0,n.jsx)(I.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(R.A,{labelColor:(0,v.X4)(a.palette.neutral[1e3],.8),placeholder:o("Confirm Password"),required:"true",type:"password",label:o("Confirm Password"),touched:t.touched.confirm_password,errors:t.errors.confirm_password,fieldProps:t.getFieldProps("confirm_password"),onChangeHandler:r,value:t.values.confirm_password,fontSize:"12px",startIcon:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(eS.A,{sx:{color:t.touched.confirm_password&&!t.errors.confirm_password?a.palette.primary.main:(0,v.X4)(a.palette.neutral[400],.7),fontSize:"18px"}})})})})]})})]})};var ek=l(29978),eC=l(81145),eI=l(22643),eF=l(89099),eR=l(71136),eB=l(68628),eP=l(76036),eT=l(32873),eM=l(84812),eE=l(54587),eD=l.n(eE),eX=l(21398),eq=l(2121),eL=l(56557),eW=l.n(eL),eH=l(45075),eO=l(68421),eN=l(64397);l(97732);var eV=l(51499),eY=l(80065),eZ=l(51343),eG=l(1463);let eJ=e=>{let{RestaurantJoinFormik:t,selectedDates:l,setSelectedDates:i,imageOnchangeHandlerForTinImage:a,singleFileUploadHandlerForTinFile:o,tinNumberHandler:s,file:u,setFile:p,preview:m,setPreview:h}=e,g=(0,eX.u)(),[f,j]=(0,r.useState)(!1);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(d.iv,{children:[(0,n.jsx)(c.A,{fontSize:{xs:"16px",sm:"18px"},fontWeight:"500",textAlign:"left",p:{xs:1.2,sm:2},sx:{borderBottom:"1px solid ".concat((0,v.X4)(g.palette.neutral[400],.2))},children:(0,x.t)("Business TIN")}),(0,n.jsx)(C.A,{px:2,py:3,children:(0,n.jsxs)(I.Ay,{container:!0,spacing:3,children:[(0,n.jsx)(I.Ay,{item:!0,xs:12,lg:6,children:(0,n.jsxs)(I.Ay,{container:!0,spacing:4,children:[(0,n.jsx)(I.Ay,{item:!0,xs:12,children:(0,n.jsx)(N.A,{fontSize:"12px",label:(0,x.t)("Taxpayer Identification Number (TIN)"),placeholder:(0,x.t)("Type your tin number"),type:"text",fullWidth:!0,name:"tin",value:t.values.tin,onChange:t.handleChange,onBlur:t.handleBlur,InputProps:{startAdornment:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(eA.A,{sx:{color:(0,v.X4)(g.palette.neutral[400],.7),fontSize:"18px"}})})},error:t.touched.tin&&!!t.errors.tin,helperText:t.touched.tin&&t.errors.tin,sx:{"& .MuiInputBase-root":{height:"45px"},"& .MuiInputBase-input":{fontSize:"12px",padding:"0 14px"}}})}),(0,n.jsxs)(I.Ay,{item:!0,xs:12,children:[(0,n.jsx)(N.A,{size:"medium",label:"Expire Date",fullWidth:!0,value:l?l[0]:"",onClick:()=>{j(!f)},readOnly:!0,error:t.touched.tin_expire_date&&!!t.errors.tin_expire_date,helperText:t.touched.tin_expire_date&&t.errors.tin_expire_date,InputLabelProps:{shrink:!0},sx:{cursor:"pointer","& .MuiInputBase-root":{height:"45px"},"& .MuiInputBase-input":{fontSize:"12px",padding:"0 14px"},"& .MuiInputLabel-root":{}},InputProps:{startAdornment:(0,n.jsx)(F.A,{position:"start",children:(0,n.jsx)(eq.A,{sx:{color:(0,v.X4)(g.palette.neutral[400],.7),fontSize:"18px"}})}),endAdornment:(0,n.jsx)(F.A,{position:"end",children:(0,n.jsx)(eq.A,{sx:{color:g.palette.primary.main,fontSize:"18px"}})})}}),f&&(0,n.jsx)(eV.A,{openModal:f,handleClose:()=>
1j(!1),children:(0,n.jsx)(eO.$,{dateAdapter:eN.R,children:(0,n.jsxs)(D.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative"},children:[(0,n.jsx)(eH.x,{value:l?eW()(l):null,onChange:e=>{i([e.format("YYYY-MM-DD")])},minDate:eW()()}),(0,n.jsx)(eM.A,{variant:"contained",color:"primary",onClick:()=>j(!1),disabled:!l,sx:{width:"fit-content",alignSelf:"flex-end",marginRight:"10px",marginBottom:"10px",zIndex:177},children:(0,x.t)("OK")})]})})})]})]})}),(0,n.jsx)(I.Ay,{item:!0,xs:12,lg:6,children:(0,n.jsxs)(C.A,{spacing:2,children:[(0,n.jsxs)(C.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,n.jsx)(ef.A,{sx:{fontWeight:600,fontSize:{xs:"12px",sm:"14px"},color:e=>e.palette.text.primary},children:(0,x.t)("TIN Certificate")}),(0,n.jsxs)(c.A,{fontSize:"12px",sx:{color:e=>e.palette.neutral[400]},children:["(",(0,x.t)("pdf, doc, jpg. File size : max 2 MB"),")"]})]}),(0,n.jsxs)(D.A,{sx:{width:"100%",maxWidth:"300px",maxHeight:"130px",position:"relative"},children:[u?(0,n.jsxs)(D.A,{sx:{width:"100%",border:"1px dashed ".concat((0,v.X4)(g.palette.neutral[400],.5)),borderRadius:"8px",backgroundColor:g.palette.background.paper,position:"relative"},children:[(0,n.jsx)(D.A,{component:"label",htmlFor:"file-input",onClick:e=>e.stopPropagation(),sx:{position:"absolute",top:"1rem",right:"1rem",backgroundColor:g.palette.info.main,color:"white",width:"26px",height:"26px",borderRadius:"0.25rem",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease-in-out",zIndex:2,"&:hover":{backgroundColor:g.palette.info.dark,transform:"scale(1.05)"}},children:(0,n.jsx)(eZ.A,{sx:{fontSize:"1rem"}})}),m?(0,n.jsx)(D.A,{onClick:()=>window.open(m,"_blank"),sx:{cursor:"pointer",borderRadius:"8px",overflow:"hidden","&:hover":{opacity:.9}},children:(0,n.jsx)(eD(),{src:m,alt:"Uploaded preview",width:0,height:0,sizes:"100vw",style:{width:"100%",height:"auto",maxHeight:"130px",objectFit:"cover",display:"block"}})}):(0,n.jsxs)(D.A,{children:[(0,n.jsxs)(D.A,{onClick:()=>{if(u){let e=URL.createObjectURL(u);window.open(e,"_blank")}},sx:{position:"relative",height:"60px",backgroundColor:(0,v.X4)(g.palette.neutral[400],.1),borderRadius:"8px 8px 0 0",cursor:"pointer",overflow:"hidden"},children:[(0,n.jsx)("object",{data:u?URL.createObjectURL(u):"",type:"application/pdf",style:{width:"100%",height:"100%",pointerEvents:"none"},children:(0,n.jsx)(D.A,{sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(eG.A,{sx:{fontSize:"3rem",color:(0,v.X4)(g.palette.neutral[400],.3)}})})}),(0,n.jsx)(D.A,{className:"overlay",sx:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",opacity:.5,pointerEvents:"none"}})]}),(0,n.jsx)(D.A,{onClick:()=>{if(u){let e=URL.createObjectURL(u);window.open(e,"_blank")}},sx:{padding:"0.75rem",backgroundColor:g.palette.background.paper,borderRadius:"0 0 8px 8px",cursor:"pointer",transition:"background-color 0.2s ease-in-out","&:hover":{backgroundColor:(0,v.X4)(g.palette.neutral[100],.5)}},children:(0,n.jsxs)(C.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,n.jsx)(eG.A,{sx:{fontSize:"2.5rem",color:(0,v.X4)(g.palette.neutral[600],.3)}}),(0,n.jsxs)(C.A,{spacing:.25,sx:{flex:1},children:[(0,n.jsx)(c.A,{fontSize:"14px",fontWeight:"500",sx:{color:g.palette.neutral[1e3],wordBreak:"break-word"},children:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25;if(e.length<=t)return e;let l=e.lastIndexOf(".");if(-1===l)return e.substring(0,t-3)+"...";let n=e.substring(l),r=e.substring(0,l),i=t-n.length-3;return i<=0?"..."+n:r.substring(0,i)+"..."+n}(u.name)}),(0,n.jsx)(c.A,{fontSize:"12px",sx:{color:(0,v.X4)(g.palette.neutral[600],.8)},children:(0,x.t)("Click to view The file")})]})]})})]})]}):(0,n.jsx)(D.A,{component:"label",htmlFor:"file-input",sx:{width:"100%",border:"1px dashed ".concat((0,v.X4)(g.palette.neutral[400],.5)),padding:"1.5rem",borderRadius:"8px",backgroundColor:g.palette.background.paper,cursor:"pointer",transition:"all 0.2s ease-in-out",display:"block","&:hover":{borderColor:g.palette.primary.main,backgroundColor:(0,v.X4)(g.palette.primary.main,.02)}},children:(0,n.jsxs)(C.A,{direction:"row",spacing:2,alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(eY.A,{sx:{fontSize:"2.5rem",color:(0,v.X4)(g.palette.neutral[600],.6)}}),(0,n.jsxs)(C.A,{direction:"row",spacing:.5,children:[(0,n.jsx)(c.A,{fontSize:"12px",sx:{color:g.palette.neutral[600],fontWeight:400},children:(0,x.t)("Select a file ")}),(0,n.jsx)(c.A,{fontSize:"12px",sx:{color:g.palette.neutral[600],fontWeight:400},children:(0,x.t)("here")})]})]})}),(0,n.jsx)("input",{id:"file-input",type:"file",hidden:!0,accept:".pdf, .doc, .docx, .jpeg, .jpg, .png",onCh
1ange:e=>{let t=e.target.files[0];if(t){if(["js","php"].includes(t.name.split(".").pop().toLowerCase())){ec.oR.error((0,x.t)("File type not supported")),e.target.value="";return}t.size<1048576&&(p(t),a(t),o(t),t.type.startsWith("image/")?h(URL.createObjectURL(t)):h(null))}}})]})]})})]})})]})})};var eU=l(27477);let e$=e=>{var t,l,i,a,o,s,p;let x,{setActiveStep:m,setFormValues:h}=e;(0,eF.useRouter)();let f=(0,g.A)(),j=(0,W.wA)(),{t:b}=(0,A.Bd)(),{modules:y,configData:_}=(0,W.d4)(e=>e.configData),[S,w]=(0,r.useState)([]),[z,k]=(0,r.useState)(!1),[F,R]=(0,r.useState)(0),[B,P]=(0,r.useState)(null),[T,M]=r.useState("en"),[E,D]=r.useState(null),{allData:X,activeStep:q,inZone:L}=(0,W.d4)(e=>e.storeRegData),{data:H,refetch:O}=(0,eR.A)(),N=((e,t)=>{let l={restaurant_name:{},restaurant_address:{},min_delivery_time:(null==t?void 0:t.min_delivery_time)||"",max_delivery_time:(null==t?void 0:t.max_delivery_time)||"",logo:(null==t?void 0:t.logo)?null==t?void 0:t.logo:"",cover_photo:(null==t?void 0:t.cover_photo)?null==t?void 0:t.cover_photo:"",f_name:(null==t?void 0:t.f_name)||"",l_name:(null==t?void 0:t.l_name)||"",phone:(null==t?void 0:t.phone)||"",email:(null==t?void 0:t.email)||"",password:(null==t?void 0:t.password)||"",confirm_password:(null==t?void 0:t.confirm_password)||"",lat:(null==t?void 0:t.lat)||"",lng:(null==t?void 0:t.lng)||"",zoneId:(null==t?void 0:t.zoneId)||"",module_id:(null==t?void 0:t.module_id)||"",delivery_time_type:(null==t?void 0:t.delivery_time_type)||"",pickup_zone_id:(null==t?void 0:t.pickup_zone_id)||"",tin:(null==t?void 0:t.tin)||"",tin_expire_date:(null==t?void 0:t.tin_expire_date)||"",tin_certificate_image:(null==t?void 0:t.tin_certificate_image)||""};return null==e||e.forEach(e=>{var n,r;l.restaurant_name[e.key]=(null==t||null==(n=t.restaurant_name)?void 0:n[e.key])||"",l.restaurant_address[e.key]=(null==t||null==(r=t.restaurant_address)?void 0:r[e.key])||""}),l})(null==_?void 0:_.language,X),[V,Y]=(0,r.useState)(null),[Z,G]=(0,r.useState)(null),ee=(0,u.A)("(max-width: 1180px)"),et=(0,K.Wx)({initialValues:N,validationSchema:(()=>{let{t:e}=(0,A.Bd)();return $.Ik({restaurant_name:$.Ik().test("required",e("Restaurant name required"),e=>e&&Object.values(e).some(e=>e&&e.trim().length>0)),restaurant_address:$.gl().nullable().test("required",e("Restaurant address required"),e=>e&&Object.values(e).some(e=>e&&e.trim().length>0)),module_id:$.Yj().required(e("Module is required")),f_name:$.Yj().required(e("Name is required")),l_name:$.Yj().required(e("Last name required")),phone:$.Yj().required(e("Phone number required")),min_delivery_time:$.Yj().required(e("Minimum Delivery Time")),max_delivery_time:$.Yj().required(e("Maximum Delivery Time")),delivery_time_type:$.Yj().required(e("Delivery Time is required")),lat:$.Yj().required(e("Latitude is required")),lng:$.Yj().required(e("Longitude is required")),logo:$.gl().required().test("fileSize","file too large",e=>null===e||e&&e.size<=1048576).test("fileFormat",e("Unsupported Format"),e=>e&&Q.includes(e.type)),cover_photo:$.gl().required().test("fileSize","file too large",e=>null===e||e&&e.size<=1048576).test("fileFormat",e("Unsupported Format"),e=>e&&Q.includes(e.type)),email:$.Yj().email("Must be a valid email").max(255).required(e("Email is required")),password:$.Yj().required("No password provided.").test("password-requirements","Password requirements not met",function(e){if(!e)return!0;let t=[];return e.length<8&&t.push("Password is too short - should be 8 characters minimum."),/[0-9]/.test(e)||t.push("one number."),/[A-Z]/.test(e)||t.push("one uppercase letter."),/[a-z]/.test(e)||t.push("one lowercase letter."),/[!@#$%^&*(),.?":{}|<>+_=]/.test(e)||t.push("one special character."),!(t.length>0)||this.createError({message:t.join(" ")})}),confirm_password:$.Yj().required(e("Confirm Password required")).oneOf([$.KR("password"),null],e("Passwords must match"))})})(),validationOptions:{abortEarly:!1},onSubmit:async(e,t)=>{try{if(J(null==e?void 0:e.module_id,ep)){var l;(null==e||null==(l=e.pickup_zone_id)?void 0:l.length)===0?ec.oR.error(b("Please select a pick up zone")):ei(e)}else ei(e)}catch(e){}}});x=JSON.parse(window.localStorage.getItem("currentLatLng"));let{data:el,isLoading:en,refetch:er}=(0,eP.A)();(0,r.useEffect)(()=>{er()},[]),(0,r.useEffect)(()=>{var e;if(null==et||null==(e=et.values)?void 0:e.zoneId){let e=null==el?void 0:el.find(e=>{var t;return(null==e?void 0:e.id)===(null==et||null==(t=et.values)?void 0:t.zoneId)});w(function(e){let t=null==e?void 0:e.coordinates[0];return null==t?void 0:t.map(e=>({lat:e[1],lng:e[0]}))}(null==e?void 0:e.coordinates))}},[null==et||null==(t=et.values)?void 0:t.zoneId,q]);let ei=e=>{h(e),j(m(1)),window.scrollTo({top:0,left:0,behavior:"smooth"}),j((0,eC.m5)(e))},ea=e=>{et.setFieldValue("restaurant_address",{...et.values.restaurant_address||{},[T]:e})};(0,r.useEffect)(()=>
1{if(B&&B[0]){let e=new Date(B[0]);et.setFieldValue("tin_expire_date",e)}},[B]);let es=e=>{et.setFieldValue("zoneId",e),et.setFieldValue("module_id","")},{data:ed}=(0,eo.useQuery)(["zoneId"],async()=>ek.k.getZoneId(null!=x?x:null==_?void 0:_.default_location),{retry:1});(0,r.useEffect)(()=>{var e,t;if((null==et||null==(e=et.values)?void 0:e.min_delivery_time)&&(null==et||null==(t=et.values)?void 0:t.max_delivery_time)){let e=setTimeout(()=>{et.values.min_delivery_time>et.values.max_delivery_time&&ec.oR.error("Minimum delivery time should be less than maximum delivery time")},500);return()=>clearTimeout(e)}},[null==et||null==(l=et.values)?void 0:l.max_delivery_time,null==et||null==(i=et.values)?void 0:i.min_delivery_time]);let eu=[];null==el||el.forEach(e=>{let t={value:e.id,label:e.name};eu.push(t)});let ep=[],ex=((e,t)=>null==e?void 0:e.filter(e=>{var l;let n=null==e||null==(l=e.zones)?void 0:l.map(e=>e.id);return null==n?void 0:n.includes(t)}))(H,null==et||null==(a=et.values)?void 0:a.zoneId);(null==ex?void 0:ex.length)>0?(ex.forEach(e=>{"parcel"!==e.module_type&&ep.push({label:e.module_name,value:e.id,type:e.module_type})}),0===ep.length&&ep.push({label:"No result found"})):ep.push({label:"No result found"});let em=[];return null==_||null==(o=_.language)||o.forEach(e=>{let t={name:null==e?void 0:e.key,value:null==e?void 0:e.value};null==em||em.push(t)}),(0,r.useEffect)(()=>{var e;(null==ed||null==(e=ed.data)?void 0:e.zone_data)&&x&&O()},[null==ed||null==(s=ed.data)?void 0:s.zone_data]),(0,r.useEffect)(()=>{if(!x&&(null==ed?void 0:ed.data)){var e;localStorage.setItem("currentLatLng",JSON.stringify(null==_?void 0:_.default_location)),localStorage.setItem("zoneid",null==ed||null==(e=ed.data)?void 0:e.zone_id)}},[null==_?void 0:_.default_location,null==ed?void 0:ed.data]),(0,r.useEffect)(()=>{(z||!L)&&et.setFieldValue("restaurant_address",null)},[z]),(0,n.jsx)(d.jB,{sx:{marginTop:"2rem"},children:(0,n.jsxs)("form",{noValidate:!0,onSubmit:et.handleSubmit,children:[(0,n.jsxs)(C.A,{sx:{backgroundColor:f.palette.neutral[100],borderRadius:"8px",boxShadow:eU.A[1]},children:[(0,n.jsx)(c.A,{fontSize:{xs:"16px",sm:"18px"},fontWeight:"500",textAlign:"left",p:{xs:1.2,sm:2},sx:{borderBottom:"1px solid ".concat((0,v.X4)(f.palette.neutral[400],.2))},children:b("Vendor Info")}),(0,n.jsx)(d.jB,{padding:"1rem",mt:".5rem",children:(0,n.jsxs)(I.Ay,{container:!0,spacing:3,children:[(0,n.jsx)(I.Ay,{item:!0,xs:12,md:6,children:(0,n.jsx)(U,{RestaurantJoinFormik:et,restaurantNameHandler:e=>{et.setFieldValue("restaurant_name",{...et.values.restaurant_name,[T]:e})},restaurantAddressHandler:ea,restaurantvatHandler:e=>{et.setFieldValue("vat",e)},minDeliveryTimeHandler:e=>{et.setFieldValue("min_delivery_time",e)},maxDeliveryTimeHandler:e=>{var t;(null==et||null==(t=et.values)?void 0:t.min_delivery_time)<e?et.setFieldValue("max_delivery_time",e):ec.oR.error("Please enter max delivery time greater than min delivery time")},zoneOption:eu,zoneHandler:es,moduleHandler:e=>{et.setFieldValue("module_id",e)},moduleOption:ep,handleTimeTypeChangeHandler:e=>{et.setFieldValue("delivery_time_type",e)},currentTab:F,handleCurrentTab:(e,t)=>{M(null==t?void 0:t.name),R(e)},tabs:em,selectedLanguage:T,pickupZoneHandler:e=>{let t=null==e?void 0:e.map(e=>e.value);et.setFieldValue("pickup_zone_id",t)},inZone:L})}),(0,n.jsx)(I.Ay,{item:!0,xs:12,md:6,children:(0,n.jsxs)(d.jB,{spacing:3,children:[(0,n.jsx)(eg,{RestaurantJoinFormik:et,searchHeight:"100%",zoneData:ed,polygonPaths:S,inZoom:"9",handleLocation:e=>{et.setFieldValue("lng",null==e?void 0:e.lat),et.setFieldValue("lat",null==e?void 0:e.lng)},restaurantAddressHandler:ea,zoneId:null==et||null==(p=et.values)?void 0:p.zoneId,setInZone:e=>j((0,eC.i$)(e)),zoneHandler:es,fromVendor:!0,showZoneWarning:z,setShowZoneWarning:k,inZone:L}),(0,n.jsx)(ej,{singleFileUploadHandlerForImage:e=>{if(e.currentTarget.files[0].size>1048576)return void ec.oR.error(b("Image size must be less than 1MB"));et.setFieldValue("logo",e.currentTarget.files[0])},imageOnchangeHandlerForImage:e=>{if(e.size>1048576)return void ec.oR.error(b("Image size must be less than 1MB"));et.setFieldValue("logo",e)},singleFileUploadHandlerForCoverPhoto:e=>{if(e.currentTarget.files[0].size>1048576)return void ec.oR.error(b("Image size must be less than 1MB"));et.setFieldValue("cover_photo",e.currentTarget.files[0])},imageOnchangeHandlerForCoverPhoto:e=>{if(e.size>1048576)return void ec.oR.error(b("Image size must be less than 1MB"));et.setFieldValue("cover_photo",e)},RestaurantJoinFormik:et})]})})]})})]}),(0,n.jsx)(d.jB,{mt:"20px",sx:{backgroundColor:f.palette.neutral[100],borderRadius:"8px",boxShadow:eU.A[1]},children:(0,n.jsx)(e_,{RestaurantJoinFormik:et,fNameHandler:e=>{et.setFieldValue("f_name",e)},lNameHandler:e=>{et.setFieldValue("l_name",e)},phoneHandler:e=>{et.setFieldValue("phone",(0,eB.n4)(e))}})}),(0,n.jsx)(d.jB,{mt:"20px",sx:{backgroundColor:f.palette.neutral[100],borderRadius:"8px",boxShadow:eU.A[1]},children:(0,n.jsx)(ez,{RestaurantJoinFormik:et,emailHandler:e=>{et.setFieldValue("email",e)},passwordHandler:e=>{et.setFieldValue("password",e)}})}),(0,n.jsx)(d.jB,{mt:"20px",sx:{backgroundColor:f.palette.neutral[100],borderRadius:"8px",boxShadow:eU.A[1]},children:(0,n.jsx)(eJ,{RestaurantJoinFormik:et,tinNumberHandler:e=>{et.setFieldValue("tin",e)},selectedDates:B,setSelectedDates:P,imageOnchangeHandlerForTinImage:e=>{et.setFieldValue("tin_certificate_image",e)},singleFileUploadHandlerForTinFile:e=>{et.setFieldValue("tin_certificate_image",e),et.setFieldTouched("tin_certificate_image",!0)},preview:Z,setFile:Y,file:V,setPreview:G})}),(0,n.jsx)(I.Ay,{item:!0,md:12,xs:12,mt:"1rem",align:"end",sx:{position:"sticky",bottom:ee?"66px":"0",zIndex:999},children:(0,n.jsxs)(eT.YA,{sx:{display:"inline-flex !important"},children:[(0,n.jsx)(d.Sv,{onClick:()=>{Y(null),G(null),et.resetForm(),P(null),j((0,eC.i$)(null))},sx:{bgcolor:e=>(0,v.X4)(e.palette.neutral[200],.4),color:e=>e.palette.primary.dark,px:"30px",borderRadius:"5px"},children:b("Reset")}),(0,n.jsx)(d.Sv,{type:"submit",sx:{background:e=>e.palette.primary.main,color:e=>e.palette.whiteContainer.main,px:"30px",borderRadius:"5px",fontWeight:"500",fontSize:"14px","&:hover":{background:e=>e.palette.primary.dark}},children:b("Next")})]})})]})})};var eQ=l(77917),eK=l(60999),e0=l(80963),e1=l(31450);let e2=(0,b.Ay)(D.A)(e=>{let{theme:t,isActive:l,activeItem:n}=e;return{"--border-clr":l?t.palette.neutral[400]:t.palette.neutral[300],"--success":l?"#ffffff"
1:"#039d55","--primary-clr":l?"#f99c4d":"#00868f",backgroundColor:l?t.palette.primary.main:t.palette.neutral[100],border:"0.72px solid #f4f4f4",boxShadow:n&&"0px 20px 40px 0px #0000001A",borderRadius:"8px",transition:"all 0.3s ease",overflow:"hidden","&:hover":{backgroundColor:(0,v.X4)(t.palette.primary.light,.9),"--border-clr":t.palette.neutral[300],"--success":"#ffffff"},height:"423px"}}),e4=(0,b.Ay)(D.A)(e=>{let{theme:t,isActive:l}=e;return{padding:"39px 16px 30px",borderRadius:"inherit",position:"relative",color:l?t.palette.neutral[100]:"#00868f","&::before":{content:'""',position:"absolute",top:"-100px",right:"-100px",background:"rgba(0, 0, 0, 0.05)",transition:"all 0.3s ease",width:l?"260px":"214px",height:l?"260px":"214px",borderRadius:"50%"}}}),e5=(0,b.Ay)(c.A)(e=>{let{theme:t}=e;return{fontSize:"16px",fontWeight:600,marginBottom:"00px",color:"#000"}}),e3=(0,b.Ay)(c.A)(e=>{let{theme:t}=e;return{fontSize:"40px",fontWeight:600,marginBottom:"5px",color:"#000"}}),e6=(0,b.Ay)(D.A)(e=>{let{theme:t}=e;return{display:"inline-block",paddingInline:"24px",borderBottom:"1px solid var(--border-clr)",fontSize:"14px",paddingBottom:"6px",color:"#000"}}),e8=(0,b.Ay)(eK.A)(e=>{let{theme:t}=e;return{padding:0,marginTop:"16px",height:"160px",overflowY:"auto",marginBottom:"30px","&::-webkit-scrollbar":{width:"0",display:"none"}}}),e7=(0,b.Ay)(e0.Ay)(e=>{let{theme:t}=e;return{padding:"6px 10px",display:"flex",alignItems:"center",gap:"10px",borderBottom:"1px solid var(--border-clr)","&:last-child":{borderBottom:"none"},color:"#000",fontSize:"12px","& span":{color:"#000"}}}),e9=e=>{let{setSelectedPackage:t,selectedPackage:l,item:r}=e,i=(0,g.A)();return(0,n.jsxs)(e2,{sx:{position:"relative",cursor:"pointer"},onClick:()=>t(r.id),className:"plan-item",activeItem:l===r.id,children:[l===(null==r?void 0:r.id)&&
1(0,n.jsx)(eQ.A,{sx:{color:i.palette.primary.main,fontSize:"34px",position:"absolute",top:"6px",right:"8px"}}),(0,n.jsxs)(e4,{children:[(0,n.jsxs)(D.A,{textAlign:"center",children:[(0,n.jsx)(e5,{children:null==r?void 0:r.package_name}),(0,n.jsx)(e3,{children:(0,e1.Yi)(null==r?void 0:r.price)}),(0,n.jsxs)(e6,{children:[null==r?void 0:r.validity," Days"]})]}),(0,n.jsxs)(e8,{children:[(0,n.jsxs)(e7,{children:[(0,n.jsx)(eQ.A,{sx:{color:"#000",fontSize:"20px"}}),(0,n.jsxs)("span",{children:[(0,x.t)("Max order")," (",null==r?void 0:r.max_order,")"]})]}),(0,n.jsxs)(e7,{children:[(0,n.jsx)(eQ.A,{sx:{color:"#000",fontSize:"20px"}}),(0,n.jsxs)("span",{children:[" ",(0,x.t)("Max product")," (",null==r?void 0:r.max_product,")"]})]}),(null==r?void 0:r.pos)===1&&(0,n.jsxs)(e7,{children:[(0,n.jsx)(eQ.A,{sx:{color:"#000",fontSize:"20px"}}),(0,n.jsx)("span",{children:(0,x.t)("Pos")})]}),(null==r?void 0:r.mobile_app)===1&&(0,n.jsxs)(e7,{children:[(0,n.jsx)(eQ.A,{sx:{color:"#000",fontSize:"20px"}}),(0,n.jsx)("span",{children:(0,x.t)("Mobile app")})]}),(null==r?void 0:r.chat)===1&&(0,n.jsxs)(e7,{children:[(0,n.jsx)(eQ.A,{sx:{color:"#000",fontSize:"20px"}}),(0,n.jsx)("span",{children:(0,x.t)("Chat")})]}),(null==r?void 0:r.review)===1&&(0,n.jsxs)(e7,{children:[(0,n.jsx)(eQ.A,{sx:{color:"#000",fontSize:"20px"}}),(0,n.jsx)("span",{children:(0,x.t)("Review")})]}),(null==r?void 0:r.self_delivery)===1&&(0,n.jsxs)(e7,{children:[(0,n.jsx)(eQ.A,{sx:{color:"#000",fontSize:"20px"}}),(0,n.jsx)("span",{children:(0,x.t)("Self delivery")})]})]})]})]})};l(22695);var te=l(85784);let tt=async e=>{if("subscription"===e){let{data:e}=await eu.A.get("".concat(es.dF,"?module_id=").concat((0,te.E)()));return e}};l(6104);var tl=l(19357),tn=l(58413),tr=l(84735);let ti=e=>{var t,l;let{formSubmit:i,isLoading:a}=e,o=(0,g.A)(),{t:s}=(0,A.Bd)(),u=(0,W.wA)(),{configData:p}=(0,W.d4)(e=>e.configData),{allData:x}=(0,W.d4)(e=>e.storeRegData),[m,h]=(0,r.useState)("commission"),{data:f}=function(e){return(0,eo.useQuery)(["store-details",e],()=>tt(e),{onError:ed.P1})}(m),[j,b]=(0,r.useState)(null),[_,S]=(0,r.useState)(!1),w={infinite:!1,speed:500,slidesToShow:3,slidesToScroll:1,prevArrow:_&&(0,n.jsx)(tr.q,{displayNoneOnMobile:!0}),nextArrow:_&&(0,n.jsx)(tr.I,{displayNoneOnMobile:!0}),responsive:[{breakpoint:2024,settings:{slidesToShow:3}},{breakpoint:1624,settings:{slidesToShow:3}},{breakpoint:1424,settings:{slidesToShow:3}},{breakpoint:1024,settings:{slidesToShow:2}},{breakpoint:600,settings:{slidesToShow:1}}]};return(0,n.jsx)(d.jB,{sx:{border:"1px solid ".concat((0,v.X4)(o.palette.neutral[400],.2)),marginTop:"2rem",borderRadius:"8px",padding:{xs:"1rem",md:"30px"}},children:(0,n.jsxs)(X.A,{sx:{padding:".6rem",borderRadius:"8px",justifyContent:"center",alignItems:"center"},children:[(0,n.jsx)(c.A,{fontSize:"18px",fontWeight:"500",textAlign:"center",children:s("Choose Your Business Plan")}),(0,n.jsxs)(d.jB,{direction:{xs:"column",md:"row"},spacing:2,mt:"1rem",children:[(null==p?void 0:p.commission_business_model)!==0&&(0,n.jsxs)(X.A,{flexGrow:1,padding:"20px",sx:{cursor:"pointer",borderRadius:"10px",border:"1px solid",backgroundColor:"commission"===m?e=>(0,v.X4)(e.palette.primary.main,.1):o.palette.neutral[100],borderColor:"commission"===m?e=>e.palette.primary.main:(0,v.X4)(o.palette.neutral[400],.5)},spacing:1,onClick:()=>h("commission"),children:[(0,n.jsxs)(X.A,{direction:"row",justifyContent:"space-between",children:[(0,n.jsx)(c.A,{fontSize:"16px",fontWeight:"700",color:"commission"===m?o.palette.primary.main:"inherit",children:s("Commission Base")}),"commission"===m&&(0,n.jsx)(eQ.A,{sx:{fontSize:"24px",color:e=>e.palette.primary.main}})]}),(0,n.jsx)(c.A,{fontSize:"13px",color:o.palette.neutral[400],children:s("store_registration_commission_description",{commission:null==p?void 0:p.admin_commission,businessName:null==p?void 0:p.business_name})})]}),(null==p?void 0:p.subscription_business_model)!==0&&(0,n.jsxs)(X.A,{onClick:()=>h("subscription"),flexGrow:1,padding:"20px",sx:{cursor:"pointer",borderRadius:"10px",border:"1px solid",backgroundColor:"subscription"===m?e=>(0,v.X4)(e.palette.primary.main,.1):o.palette.neutral[100],borderColor:"subscription"===m?e=>e.palette.primary.main:(0,v.X4)(o.palette.neutral[400],.5)},spacing:1,children:[(0,n.jsxs)(X.A,{direction:"row",justifyContent:"space-between",children:[(0,n.jsx)(c.A,{fontSize:"16px",fontWeight:"700",color:"subscription"===m?o.palette.primary.main:"inherit",children:s("Subscription Base")}),"subscription"===m&&(0,n.jsx)(eQ.A,{sx:{fontSize:"24px",color:e=>e.palette.primary.main}})]}),(0,n.jsx)(c.A,{fontSize:"13px",color:o.palette.neutral[400],children:s("Run store b
1y purchasing subsciption  packages. You will have access the features of in store panel , app and interaction with user according to the subscription packages.")})]})]}),(null==f||null==(t=f.packages)?void 0:t.length)>0&&(0,n.jsxs)(X.A,{width:"100%",maxWidth:"850px",justifyContent:"center",mt:"40px",spacing:1,children:[(0,n.jsx)(c.A,{textAlign:"center",fontWeight:"bold",fontSize:"18px",children:s("Choose Subscription Package")}),(0,n.jsx)(y.A,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{".slick-slide":{"&:nth-of-type(3n+1) .plan-item":{background:"#E2F4EB"},"&:nth-of-type(3n+2) .plan-item":{background:"#E3F5FF"},"&:nth-of-type(3n+3) .plan-item":{background:"#FFE2D3"},"&:nth-of-type(3n+4) .plan-item":{background:"#E4EDFF"}}},children:(0,n.jsx)(d.Z7,{padding:"15px",children:(0,n.jsx)(tl.A,{...w,children:null==f||null==(l=f.packages)?void 0:l.map(e=>(0,n.jsx)(e9,{item:e,setSelectedPackage:b,selectedPackage:j},e.id))})})})]}),(0,n.jsxs)(d.jB,{justifyContent:"flex-end",direction:"row",spacing:2,mt:"2rem",children:[(0,n.jsx)(tn.U9,{onClick:()=>u((0,eC.Fz)(0)),variant:"outlined",children:s("Back")}),(0,n.jsx)(eI.yY,{sx:{minWidth:"110px"},onClick:()=>{i({business_plan:m,package_id:j})},variant:"contained",loading:a,children:s("Next")})]})]})})},ta=async e=>{var t,l,n;let r=[];for(let[t,l]of Object.entries(e.restaurant_name))r.push({id:null,locale:t,key:"name",value:l});for(let[t,l]of Object.entries(e.restaurant_address))r.push({id:null,locale:t,key:"address",value:l});let i={translations:JSON.stringify(r),minimum_delivery_time:null==e?void 0:e.min_delivery_time,maximum_delivery_time:null==e?void 0:e.max_delivery_time,latitude:null==e?void 0:e.lng,longitude:null==e?void 0:e.lat,f_name:null==e?void 0:e.f_name,l_name:null==e?void 0:e.l_name,phone:null==e?void 0:e.phone,email:null==e?void 0:e.email,password:null==e?void 0:e.password,zone_id:null==e?void 0:e.zoneId,module_id:null==e?void 0:e.module_id,delivery_time_type:"minute",business_plan:null==e||null==(t=e.value)?void 0:t.business_plan,package_id:null==e||null==(l=e.value)?void 0:l.package_id,logo:null==e?void 0:e.logo,cover_photo:null==e?void 0:e.cover_photo,pickup_zone_id:(null==e?void 0:e.pickup_zone_id)?JSON.stringify(null==e||null==(n=e.pickup_zone_id)?void 0:n.map(String)):[]};((null==e?void 0:e.tin)||(null==e?void 0:e.tin_expire_date)||(null==e?void 0:e.tin_certificate_image))&&(i={...i,...(null==e?void 0:e.tin)&&{tin:e.tin},...(null==e?void 0:e.tin_expire_date)&&{tin_expire_date:eW()(e.tin_expire_date).format("YYYY-MM-DD")},...(null==e?void 0:e.tin_certificate_image)&&{tin_certificate_image:e.tin_certificate_image}});let a=new FormData,o=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";Object.keys(t).forEach(n=>{let r=t[n],i=l?"".concat(l,"[").concat(n,"]"):n;!r||"object"!=typeof r||r instanceof File?e.append(i,r):o(e,r,i)})};o(a,i);let{data:s}=await eu.A.post("".concat(es.GV),a);return s};var to=l(14210),ts=l(52904);let td=e=>{let{method:t,selectedMethod:l,setSelectedMethod:r}=e;return(0,n.jsx)(d.jB,{maxWidth:"340px",width:"100%",sx:{padding:"10px",border:"1px solid",borderColor:e=>(0,v.X4)(e.palette.neutral[400],.4),borderRadius:"8px",cursor:"pointer"},justifyContent:"center",onClick:()=>{r(e=>e===(null==t?void 0:t.gateway)?null:null==t?void 0:t.gateway)},children:(0,n.jsxs)(X.A,{direction:"row",spacing:2,justifyContent:"space-between",alignItems:"center",children:[(0,n.jsxs)(X.A,{direction:"row",spacing:1,children:[l===(null==t?void 0:t.gateway)?(0,n.jsx)(eQ.A,{sx:{color:e=>e.palette.primary.main}}):(0,n.jsx)(to.A,{sx:{color:e=>(0,v.X4)(e.palette.neutral[400],.4)}}),(0,n.jsx)(c.A,{children:null==t?void 0:t.gateway_title})]}),(0,n.jsx)(ts.A,{src:null==t?void 0:t.gateway_image_full_url,width:"100px",alignItems:"center",objectfit:"cover"})]})})},tu=e=>{var t;let l,i,a,{submitBusiness:o,resData:s,isLoading:u}=e,{plan:p,package:m}=(0,eF.useRouter)().query,[h,f]=(0,r.useState)("pay_now"),[j,b]=(0,r.useState)(null),{configData:y}=(0,W.d4)(e=>e.configData),{allData:A,activeStep:_}=(0,W.d4)(e=>e.storeRegData),S=(0,g.A)();return l=localStorage.getItem("business_plan"),i=localStorage.getItem("store_id"),a=localStorage.getItem("package_id"),(0,n.jsxs)(d.jB,{sx:{border:"1px solid ".concat((0,v.X4)(S.palette.neutral[400],.4)),marginTop:"2rem",borderRadius:"8px",padding:{xs:"1rem",md:"30px"}},children:[(0,n.jsx)(X.A,{sx:{padding:".6rem",borderRadius:"8px",justifyContent:"center",alignItems:"center"},children:(0,n.jsx)(c.A,{fontSize:"18px",fontWeight:"500",textAlign:"center",children:(0,x.t)("Choose Your Payment Option")})}),(0,n.jsxs)(d.jB,{direction:{xs:"column",md:"row"},spacing:2,mt:"1rem",children:[(0,n.jsxs)(X.A,{width:"100%",padding:"20px",sx:{cursor:"pointer",borderRadius:"10px",border:"1px solid",backgroundColor:"pay_now"===h?e=>(0,v.X4)(e.palette.primary.main,.1):S.palette.neutral[100],borderColor:"pay_now"===h?e=>e.palette.primary.main:e=>(0,v.X4)(e.palette.neutral[400],.4)},spacing:1,onClick:()=>f("pay_now"),children:[(0,n.jsxs)(X.A,{direction:"row",justifyContent:"space-between",children:[(0,n.jsx)(c.A,{fontSize:"16px",fontWeight:"700",color:"pay_now"===h?S.palette.primary.main:"inherit",children:(0,x.t)("Pay Now")}
1),"pay_now"===h&&(0,n.jsx)(eQ.A,{sx:{fontSize:"24px",color:e=>e.palette.primary.main}})]}),(0,n.jsx)(c.A,{fontSize:"13px",color:S.palette.neutral[400],children:(0,x.t)("Manage your payment manually")})]}),(0,n.jsxs)(X.A,{width:"100%",padding:"20px",sx:{cursor:"pointer",borderRadius:"10px",border:"1px solid",backgroundColor:"free_trial"===h?e=>(0,v.X4)(e.palette.primary.main,.1):S.palette.neutral[100],borderColor:"free_trial"===h?e=>e.palette.primary.main:e=>(0,v.X4)(e.palette.neutral[400],.4)},spacing:1,onClick:()=>{f("free_trial"),b(null)},children:[(0,n.jsxs)(X.A,{direction:"row",justifyContent:"space-between",children:[(0,n.jsx)(c.A,{fontSize:"16px",fontWeight:"700",color:"free_trial"===h?S.palette.primary.main:"inherit",children:(0,x.t)("".concat(null==y?void 0:y.subscription_free_trial_days," Days free trial"))}),"free_trial"===h&&(0,n.jsx)(eQ.A,{sx:{fontSize:"24px",color:e=>e.palette.primary.main}})]}),(0,n.jsx)(c.A,{fontSize:"13px",color:S.palette.neutral[400],children:(0,x.t)("Enjoy ".concat(null==y?void 0:y.subscription_free_trial_days," Days free trial and pay your subscription fee within these trial period."))})]})]}),"pay_now"===h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c.A,{component:"span",mt:"30px",mb:"1rem",fontSize:"16px",fontWeight:"700",children:[(0,x.t)("Pay Via Online"),(0,n.jsx)(c.A,{component:"span",ml:"5px",children:(0,x.t)("(Faster & secure way to pay bill)")})]}),(0,n.jsx)(X.A,{direction:"row",gap:"1rem",flexWrap:"wrap",children:null==y||null==(t=y.active_payment_method_list)?void 0:t.map(e=>(0,n.jsx)(td,{setSelectedMethod:b,selectedMethod:j,method:e},e))})]}),(0,n.jsx)(d.jB,{justifyContent:"flex-end",direction:"row",spacing:2,mt:"2rem",children:(0,n.jsx)(eI.yY,{onClick:()=>{var e,t,n,r,d,u,p,c,x;let m=null!=(d=null!=(r=null==s?void 0:s.type)?r:null==A||null==(e=A.values)?void 0:e.business_plan)?d:l,g=null!=(p=null!=(u=null==s?void 0:s.store_id)?u:null==A||null==(t=A.values)?void 0:t.store_id)?p:i,f=null!=(x=null!=(c=null==s?void 0:s.package_id)?c:null==A||null==(n=A.values)?void 0:n.package_id)?x:a;localStorage.setItem("business_plan",m),localStorage.setItem("store_id",g),localStorage.setItem("package_id",f),o({business_plan:m,store_id:g,package_id:f,payment:null!=j?j:h,payment_gateway:null!=j?j:h,callback:"free_trial"===h?null:"".concat(window.location.origin,"/store-registration"),payment_platform:"web",type:"new_join"})},variant:"contained",loading:u,disabled:!j&&"pay_now"===h,children:(0,x.t)("Confirm")})})]})},tp=async e=>{let{data:t}=await eu.A.post("".concat(es.v3),e);return t},tc={src:"/_next/static/media/GIF 1.576b3b9d.gif"},tx={src:"/_next/static/media/GIF 2.ce051015.gif"},tm=e=>{let{flag:t}=e,l=(0,g.A)(),r=(0,eF.useRouter)(),i=(0,W.wA)();return(0,n.jsx)(d.jB,{sx:{border:"1px solid ".concat((0,v.X4)(l.palette.neutral[400],.6)),marginTop:"2rem",borderRadius:"8px",padding:"30px",justifyContent:"center",alignItems:"center"},spacing:2,children:"success"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ts.A,{src:tc.src,alt:"my gif",height:150,width:150,objectFit:"contain"}),(0,n.jsx)(c.A,{fontSize:"22px",fontWeight:"600",children:(0,x.t)("Congratulations!")}),(0,n.jsxs)(C.A,{justifyContent:"center",alignItems:"center",width:"100%",children:[(0,n.jsx)(c.A,{fontSize:"16px",textAlign:"center",children:(0,x.t)("Your Registration Has been Completed Successfully.")}),(0,n.jsx)(c.A,{fontSize:"13px",textAlign:"center",children:(0,x.t)("Admin will confirm your registration after review")}),(0,n.jsx)(eM.A,{variant:"contained",sx:{mt:"1rem"},onClick:()=>{let e=localStorage.getItem("zoneid"),t=localStorage.getItem("location");e||t?r.push("/home"):r.push("/")},children:(0,x.t)("Got it")})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ts.A,{src:tx.src,alt:"my gif",height:200,width:200,objectFit:"contain"}),(0,n.jsx)(c.A,{fontSize:"22px",fontWeight:"600",children:(0,x.t)("Payment Error !")}),(0,n.jsxs)(C.A,{justifyContent:"center",alignItems:"center",children:[(0,n.jsx)(c.A,{fontSize:"16px",textAlign:"center",children:(0,x.t)("Your Registration Could Not Completed .")}),(0,n.jsxs)(c.A,{fontSize:"13px",component:"span",children:[(0,x.t)("Due to payment transaction error your registration could not complete."),(0,n.jsx)(c.A,{textAlign:"center",onClick:()=>{r.replace({pathname:r.pathname},void 0,{shallow:!0}),i((0,eC.Fz)(2))},component:"span",fontSize:"13px",color:l.palette.primary.main,sx:{cursor:"pointer",textDecoration:"underline"},children:(0,x.t)("Please Try Again")})]})]})]})})};var th=l(79455),tg=l(93706);let tf=()=>{(0,th.A)();let e=(0,tg.A)(),t=(0,W.wA)(),l=(0,eF.useRouter)(),[i,a]=(0,r.useState)({}),o=(0,u.A)(e.breakpoints.down("md")),{flag:m,active:h,plan:g,package:f}=l.query,{allData:v,activeStep:j}=(0,W.d4)(e=>e.storeRegData),[b,y]=(0,r.useState)({}),{mutate:A,isLoading:_}=(0,eo.useMutation)("store-reg",ta),{mutate:S,isLoading:w}=(0,eo.useMutation)("store-business",tp),z=e=>{A({...b,value:e},{onSuccess:e=>{if(t((0,eC.m5)({...v,res:e})),a(e),(null==e?void 0:e.type)==="commission"){let e={...l.query,flag:"success",active:""};l.replace({pathname:l.pathname,query:e},void 0,{shallow:!0}),t((0,eC.m5)(null)),t((0,eC.i$)(null))}else t((0,eC.Fz)(2))},onError:ed.Jm})},C=e=>{t((0,eC.m5)({...v,values:e})),S(e,{onSuccess:e=>{if(e)if((null==e?void 0:e.redirect_link)&&(null==e?void 0:e.payment)!=="free_trial"){let n="".concat(null==e?void 0:e.redirect_link);t((0,eC.Fz)(3)),t((0,eC.m5)(null)),t((0,eC.i$)(null)),l.push(n)}else{let e={...l.query,flag:"success",active:""};l.replace({pathname:l.pathname,query:e},void 0,{shallow:!0}),t((0,eC.Fz)(3)),t((0,eC.m5)(null)),t((0,eC.i$)(null))}},onError:ed.Jm})};return(0,r.useEffect)(()=>{"success"===m&&t((0,eC.Fz)(3))},[m]),(0,r.useEffect)(()=>{"active"===h&&t((0,eC.Fz)(0))},[h]),(0,n.jsx)(p.A,{children:(0,n.jsx)(s.A,{children:(0,n.jsxs)(d.jB,{justify:"center",mt:{xs:"1rem",md:"1rem"},children:[(0,n.jsx)(c.A,{fontSize:o?"18px":"36px",fontWeight:"700",textAlign:"center",children:(0,x.t)("Vendor Application")}),(0,n.jsx)(k,{flag:m,activeStep:j}),0===j?(0,n.jsx)(e$,{setActiveStep:eC.Fz,setFormValues:y}):1===j?(0,n.jsx)(ti,{setActiveStep:eC.Fz,formSubmit:z,isLoading:_}):3===j&&"success"===m||3===j&&"fail"===m?(0,n.jsx)(tm,{flag:m}):2===j?(0,n.jsx)(tu,{isLoading:w,resData:i,submitBusiness:C}):void 0]})})})};var tv=l(98361),tj=l(25545),tb=l(23418),ty=!0;let tA=e=>{let{metaData:t}=e,l=(0,W.wA)(),{landingPageData:s,configData:d}=(0,W.d4)(e=>e.configData),{data:u,refetch:c}=(0,tv.G)();(0,r.useEffect)(()=>{d||c()},[d]),(0,r.useEffect)(()=>{u&&l((0,tj.ff)(u))},[u]);
1let x=(0,tb.f)(t,{title:(null==t?void 0:t.title)||"Store Registration - ".concat(null==d?void 0:d.business_name),description:(null==t?void 0:t.description)||"",image:"".concat((null==t?void 0:t.image)||(null==d?void 0:d.logo_full_url)),robotsMeta:(null==t?void 0:t.robotsMeta)||""});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Ay,{}),(0,n.jsx)(o.A,{title:x.title,description:x.description,image:x.image,robotsMeta:x.robotsMeta,configData:d}),(0,n.jsx)(a.A,{configData:d,landingPageData:s,children:(0,n.jsx)(p.A,{children:(0,n.jsx)(tf,{})})})]})}},29978:(e,t,l)=>{"use strict";l.d(t,{k:()=>r});var n=l(60398);let r={placeApiAutocomplete:e=>{if(e&&""!==e)return n.A.get("/api/v1/config/place-api-autocomplete?search_text=".concat(e))},placeApiDetails:e=>n.A.get("/api/v1/config/place-api-details?placeid=".concat(e)),getZoneId:e=>n.A.get("/api/v1/config/get-zone-id?lat=".concat(e.lat,"&lng=").concat(e.lng)),distanceApi:(e,t)=>{if(!e||!t)throw Error("Origin and destination must be provided");return n.A.get("/api/v1/config/distance-api?origin_lat=".concat(e.latitude,"&origin_lng=").concat(e.longitude,"&destination_lat=").concat(t.lat?t.lat:null==t?void 0:t.latitude,"&destination_lng=").concat(t.lng?t.lng:null==t?void 0:t.longitude,"&mode=WALK"))},geoCodeApi:e=>n.A.get("/api/v1/config/geocode-api?lat=".concat(e.lat,"&lng=").concat(e.lng))}},32873:(e,t,l)=>{"use strict";l.d(t,{F1:()=>o,YA:()=>i,y9:()=>a});var n=l(76252),r=l(89037);(0,n.A)(r.A)(e=>{let{theme:t}=e;return{border:"1px solid ".concat(t.palette.neutral[200]),borderRadius:"20px",padding:"30px",marginTop:"40px",[t.breakpoints.down("md")]:{padding:"16px",marginTop:"30px"}}});let i=(0,n.A)(r.A)(e=>{let{theme:t}=e;return{display:"flex",flexWrap:"wrap",justifyContent:"end",alignItems:"center",gap:"15px",backgroundColor:t.palette.background.default,padding:".75rem",borderRadius:"10px 0 0 10px"}}),a=(0,n.A)(r.A)(e=>{let{theme:t}=e;return{}}),o=(0,n.A)(r.A)(e=>{let{theme:t}=e;return{}})},43053:(e,t,l)=>{"use strict";l.d(t,{A:()=>f});var n=l(37876),r=l(14232),i=l(95062),a=l.n(i);l(28343);var o=l(18952),s=l(20243),d=l(52782),u=l(39467),p=l(60230),c=l(4728),x=l(82),m=l(66703),h=l(32197);let g=e=>{let{inputLabel:t,selectFieldData:l,passSelectedValue:i,touched:a,errors:g,fieldProps:f,required:v,value:j,startIcon:b,placeholder:y}=e,[A,_]=r.useState(j),S=(0,m.A)(),{t:w}=(0,x.Bd)();return(0,n.jsxs)(o.A,{fullWidth:!0,variant:"outlined",children:[(0,n.jsx)(s.A,{required:v,id:"demo-simple-select-label",sx:{color:S.palette.neutral[500],display:"flex",alignItems:"start !important",fontSize:"13px",fontWeight:"500","& .MuiFormLabel-asterisk":{color:"red"}},shrink:!0,children:t}),(0,n.jsxs)(d.A,{variant:"outlined",labelId:"demo-simple-select-label",id:"demo-simple-select",value:j||"",label:t,onChange:e=>{i(e.target.value),_(e.target.value)},error:!!(a&&g),helperText:a&&g,displayEmpty:!0,startAdornment:b?(0,n.jsx)(u.A,{position:"start",children:b}):null,renderValue:e=>{if(!e||""===e)return(0,n.jsx)("span",{style:{color:S.palette.text.secondary,opacity:.6},children:y});let t=null==l?void 0:l.find(t=>t.value===e);return t?w(t.label):e},...f,sx:{height:"45px","& .MuiSelect-select":{height:"45px",display:"flex",alignItems:"center"}},children:[y&&(0,n.jsx)(p.A,{value:"",disabled:!0,sx:{color:S.palette.text.secondary},children:y}),(null==l?void 0:l.length)>0&&l.map((e,t)=>(0,n.jsxs)(p.A,{value:e.value,sx:{display:"flex",justifyContent:"space-between",alignItems:"center","&:not(.Mui-selected):hover":{backgroundColor:"primary.main",color:"#fff"},"&:not(.Mui-selected) > svg":{display:"none"}},children:[w(e.label),(0,n.jsx)(h.A,{sx:{color:S.palette.primary.main,fontSize:"20px",ml:1}})]},t))]}),a&&g&&(0,n.jsx)(c.A,{sx:{color:S.palette.error.main},children:w(g)})]})};g.propTypes={inputLabel:a().string.isRequired,selectFieldData:a().array.isRequired,passSelectedValue:a().func.isRequired,startIcon:a().node,placeholder:a().string,value:a().any,touched:a().bool,errors:a().string,fieldProps:a().object,required:a().bool};let f=g},76036:(e,t,l)=>{"use strict";l.d(t,{A:()=>s});var n=l(1992),r=l(60398),i=l(64907),a=l(77165);let o=async()=>{let{data:e}=await r.A.get("".concat(i.f1));return e};function s(){return(0,n.useQuery)(["zone-list-data"],()=>o(),{enabled:!1,onError:a.P1})}},76209:(e,t,l)=>{"use strict";l.d(t,{A:()=>y});var n=l(37876);l(14232);var r=l(16226),i=l(66703),a=l(6995),o=l(42224),s=l(58582),d=l(38388),u=l(84812),p=l(35003),c=l(71733),x=l(25773),m=l(41681),h=l(97914),g=l(4055),f=l(82179),v=l(14379);let j=()=>{let e=(0,i.A)(),t=(0,a.A)(e.breakpoints.down("sm")),l=(0,v.A)("div")({position:"relative",textAlign:"center",width:"35px",height:"100%",marginLeft:"auto",marginRight:"auto"}),r=(0,v.A)("span")(e=>{let{theme:l}=e;return{display:"inline-block",width:t?"4px":"5px",height:t?"4px":"5px",borderRadius:"50%",marginRight:"3px",background:l.palette.primary.main,animation:"wave 1.3s linear infinite","&:nth-child(2)":{animationDelay:"-1.1s"},"&:nth-child(3)":{animationDelay:"-0.9s"},"@keyframes wave":{"0%, 60%, 100%":{transform:"initial"},"30%":{transform:"translateY(-15px)"}}}});return(0,n.jsxs)(l,{isXsmall:t,children:[(0,n.jsx)(r,{}),(0,n.jsx)(r,{}),(0,n.jsx)(r,{})]})};var b=l(35743);let y=e=>{let{showCurrentLocation:t,predictions:l,handleChange:v,HandleChangeForSearch:y,handleAgreeLocation:A,currentLocation:_,handleCloseLocation:S,frommap:w,placesIsLoading:z,currentLocationValue:k,fromparcel:C,isLoading:I,noleftborder:F,testLocation:R,borderRadius:B,toReceiver:P,sender:T,isLanding:M=!1,isRefetching:E,searchHeight:D,handleOpen:X,setOpen:q,notShow:L}=e,W=(0,i.A)(),H=(0,a.A)(W.breakpoints.down("sm"));return(0,n.jsx)(n.Fragment,{children:t?(0,n.jsx)(r.ZP,{margin_top:"true",size:"small",variant:"outlined",id:"outlined-basic",placeholder:(0,h.t)("Search location here..."),value:R||_,onChange:e=>y(e),required:!0,isLanding:!0,isXSmall:!0,frommap:w,fromparcel:C,showCurrentLocation:t,InputProps:{endAdornment:t?(0,n.jsx)(f.A,{mr:M?"8px":"0",children:I||E?(0,n.jsx)(c.A,{sx:{padding:"7px"},children:(0,n.jsx)(j,{})}):(0,n.jsx)(c.A,{sx:{padding:"9px"},children:(0,n.jsx)(m.A,{sx:{cursor:"pointer",fontSize:H?"16px":"24px"},onClick:()=>S()})})}):(0,n.jsx)(c.A,{onClick:()=>A(),children:(0,n.jsx)(x.A,{color:"primary"})})}}):(0,n.jsx)(o.A,{fullWidth:!0,options:l||[],getOptionLabel:e=>(null==e?void 0:e.description)||"",onChange:(e,t)=>
1v(e,t),value:k,clearOnBlur:!1,loading:"true"===w?z:null,loadingText:"true"===w?(0,h.t)("Search suggestions are loading..."):"",sx:{"& .MuiOutlinedInput-root":{padding:D?"0px":"9px"}},PaperComponent:e=>(0,n.jsxs)(s.A,{sx:{borderRadius:"0 0 5px px"},...e,children:[e.children,(0,n.jsx)(d.A,{textAlign:"center",p:1,children:L?null:(0,n.jsxs)(u.A,{variant:"text",size:"small",onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),null==X||X()},sx:{width:"100%",backgroundColor:W.palette.neutral[300],display:"flex",gap:1},children:[(0,n.jsx)(b.A,{}),(0,n.jsx)(p.A,{variant:"body1",onClick:()=>q(!0),color:W.palette.text.main,children:(0,h.t)("Set from map")})]})})]}),renderInput:e=>(0,n.jsx)(r.ZP,{toReceiver:P,searchHeight:D,noleftborder:F,frommap:w,fromparcel:C,id:"outlined-basic",...e,placeholder:(0,h.t)("Search location here..."),isLanding:!0,isXSmall:!0,onChange:e=>null==y?void 0:y(e),backgroundColor:!0,InputProps:{...e.InputProps,endAdornment:"true"===w?(0,n.jsx)(c.A,{sx:{mr:"-31px",borderRadius:B||"0px",padding:"7px 10px"},children:(0,n.jsx)(g.A,{})}):(null==k?void 0:k.description)?(0,n.jsx)(c.A,{sx:{mr:"-61px",padding:"5px"},children:(0,n.jsx)(m.A,{style:{cursor:"pointer",height:"20px"},onClick:()=>null==S?void 0:S()})}):(0,n.jsx)(n.Fragment,{children:"true"===P||"true"===T?null:(0,n.jsx)(c.A,{sx:{mr:"true"===C?"-61px":"-31px",padding:"5px",display:"true"!==C&&"none",marginTop:{xs:"3px",sm:"0px"}},onClick:()=>null==A?void 0:A(),children:(0,n.jsx)(x.A,{color:"primary"})})})},required:!0})})})}},84735:(e,t,l)=>{"use strict";l.d(t,{I:()=>m,q:()=>h});var n=l(37876),r=l(55871),i=l(9648),a=l(35268),o=l(66703),s=l(6995),d=l(89037);l(14232);var u=l(48843);l(79568);let p=(0,a.Ay)(d.A)(e=>{let{theme:t,right:l,isdisabled:n,noBackground:r,isRtl:i,rightSpace:a}=e;return{top:0,height:"100%",width:"42px",transition:"background-image 0.3s ease-in-out, transform 0.3s ease-in-out",transform:"translateX(0)",background:"true"===r?null:"true"===l?"linear-gradient(270deg, ".concat("rtl"===i?"rgba(255, 255, 255, 0)":t.palette.neutral[100]," 0%, ").concat("rtl"===i?t.palette.neutral[100]:"rgba(75, 86, 107, 0.05) -28.57%, rgba(255, 255, 255, 0) 122.62%"," 100%)"):"linear-gradient(".concat("rtl"===i?"to left":"to right",",  ").concat("rtl"===i?"rgba(255, 255, 255, 0)":"rgba(75, 86, 107, 0.05) -28.57%, rgba(255, 255, 255, 0) 122.62%"," 0%, ").concat("rtl"===i?t.palette.neutral[100]:"rgba(255, 255, 255, 0)","  100%)"),zIndex:1,right:"true"===l&&"-8px",left:"true"!==l&&0,position:"absolute",alignItems:"center",justifyContent:"center",display:n?"none":"flex",borderTopRightRadius:"12px",borderBottomRightRadius:"12px",[t.breakpoints.down("sm")]:{display:"none"}}}),c=(0,a.Ay)(d.A)(e=>{let{theme:t,isdisabled:l}=e;return{zIndex:1,top:"50%",left:0,display:l?"none":"flex",alignItems:"center",justifyContent:"center",backgroundColor:t.palette.primary.main,boxShadow:"rgba(149, 157, 165, 0.2) 0px 8px 24px",height:"35px",width:"35px",borderRadius:"50%","&:hover":{backgroundColor:t.palette.primary.dark}}}),x=(0,a.Ay)(d.A)(e=>{let{theme:t,isdisabled:l}=e;return{top:"50%",zIndex:1,right:8,display:l?"none":"flex",backgroundColor:t.palette.primary.main,borderRadius:"50%",boxShadow:"rgba(149, 157, 165, 0.2) 0px 8px 24px",alignItems:"center",justifyContent:"center",height:"35px",width:"35px","&:hover":{backgroundColor:t.palette.primary.deep}}}),m=e=>{let{onClick:t,className:l,displayNoneOnMobile:a,noBackground:d,rightSpace:c}=e,m=(0,o.A)(),h=(0,s.A)(m.breakpoints.down("sm"));return(0,n.jsx)(p,{isdisabled:!!h&&!!a||(null==l?void 0:l.includes("slick-disabled")),right:"true",noBackground:d?"true":"false",isRtl:(0,u.Z)(),rightSpace:c,children:(0,n.jsx)(x,{className:"client-nav client-next ".concat(l),onClick:t,isdisabled:null==l?void 0:l.includes("slick-disabled"),children:"rtl"===(0,u.Z)()?(0,n.jsx)(r.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600],"&:hover":{color:m.palette.neutral[100]}}}):(0,n.jsx)(i.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600],"&:hover":{color:m.palette.neutral[100]}}})})})},h=e=>
1{let{onClick:t,className:l,displayNoneOnMobile:a,noBackground:d,lanDirection:x}=e,m=(0,o.A)(),h=(0,s.A)(m.breakpoints.down("sm")),g=(0,u.Z)();return(0,n.jsx)(p,{isdisabled:!!h&&!!a||(null==l?void 0:l.includes("slick-disabled")),noBackground:d?"true":"false",isRtl:g,children:(0,n.jsx)(c,{className:"client-nav client-prev ".concat(l),onClick:t,isdisabled:null==l?void 0:l.includes("slick-disabled"),children:"rtl"===(0,u.Z)()?(0,n.jsx)(i.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600],"&:hover":{color:m.palette.neutral[100]}}}):(0,n.jsx)(r.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600],"&:hover":{color:m.palette.neutral[100]}}})})})}},98361:(e,t,l)=>{"use strict";l.d(t,{G:()=>s});var n=l(1992),r=l(60398),i=l(77165),a=l(64907);let o=async()=>{let{data:e}=await r.A.get(a.Ck);return e},s=e=>(0,n.useQuery)("getConfig",()=>o(),{enabled:!1,onError:i.P1,retry:1,cacheTime:400})}},e=>{e.O(0,[3347,9759,3716,5373,9692,6545,6971,1874,7734,8343,8779,6727,636,6593,8792],()=>e(e.s=5969)),_N_E=e.O()}]);

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.