PageSourceSearch

https://ripplemind.com/_next/static/chunks/pages/customers/shipping-address-15e5b0ceb37a0968.js

js ripplemind.com collected 2026-10-06 13:15:52 UTC 28,608 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9710],{97272:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customers/shipping-address",function(){return s(1125)}])},1125:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return C}});var a=s(85893),l=s(28646),n=s(44080),r=s(91479),i=s(67294),o=s(99603),d=s(59417),c=s(88446),u=s(34288),m=s(41664),x=s.n(m),h=s(83868),p=s.n(h),f=s(34994),g=s(977),y=s(54464),v=s(86501),b=s(61839),_=s(48583),j=s(94543),w=s(9008),N=s.n(w),F=s(11163),S=()=>{var e;let t=(0,_.Dv)(j.ZP),[s,l]=(0,i.useState)(!1),[m,h]=(0,i.useState)(!1),w=(0,i.useRef)(null),[S,C]=(0,i.useState)([]),[E,D]=(0,i.useState)({loading:!1,success:"",error:""}),[Z,A]=(0,i.useState)({loading:!1,success:"",error:""}),[z,k]=(0,i.useState)(!1),[T,G]=(0,i.useState)({id:-1,name:"",email:"",mobile:"",address:"",country:-1,country_name:"",state:-1,state_name:"",city:-1,city_name:"",zipcode:-1,gst_number:"",status:1}),[M,q]=(0,i.useState)({name:"",email:"",mobile:"",address:"",country:"",country_name:"",state:"",state_name:"",city:"",city_name:"",zipcode:"",gst_number:"",status:""}),[L,$]=(0,i.useState)({name:"",email:"",mobile:"",address:"",country:"",state:"",city:"",zipcode:"",gst_number:"",status:""}),R=(0,F.useRouter)(),I=async()=>{try{var e,s;let l=await c.Z.post("/shipping_address/getshipping_address_user",{sortDetails:{sortKey:"id",sortType:1},searchDetails:[{basicSearchKey:"userid",basicSearchValue:null==t?void 0:null===(e=t.userDetails)||void 0===e?void 0:e.user_id,basicSearchType:"number"}]}),n=null==l?void 0:null===(s=l.data)||void 0===s?void 0:s.data,r=n.filter(e=>2===e.status);r.length<=0&&(v.ZP.success("You need to have billing address",{duration:3e3,icon:(0,a.jsx)(o.G,{icon:d.hVn})}),R.push("/customers/buyer-address")),C(n.filter(e=>(null==e?void 0:e.status)!==2)),D({loading:!1,success:"success",error:""})}catch(e){console.error(e),D({loading:!1,success:"error",error:""})}};(0,i.useEffect)(()=>{I()},[null==t?void 0:null===(e=t.userDetails)||void 0===e?void 0:e.user_id,z]);let O=async()=>{try{let e=!1,t={name:"",email:"",mobile:"",address:"",country:"",state:"",city:"",gst_number:"",zipcode:""};if(t.name="",0===T.name.length?(t.name="required",e=!0):T.name.length>=50&&(t.name="Only 50 characture are allowed",e=!0),t.email="",0===T.email.length?(t.email="required",e=!0):T.email.length>=50?(t.email="Only allow 50 digits.",e=!0):p()(T.email)||(t.email="Enter a valid Email Id",e=!0),t.mobile="",0===T.mobile.length?(t.mobile="required",e=!0):10!==T.mobile.length&&(t.mobile="Enter a Valid Mobile",e=!0),t.address="",0===T.address.length?t.address="required":T.address.length>=100&&(t.address="Only 100 characture are allowed"),t.country="",-1===T.country&&(t.country="required",e=!0),t.state="",-1===T.state&&(t.state="required",e=!0),t.city="",-1===T.city&&(t.city="required",e=!0),t.zipcode="",1===T.zipcode.toString().length?(t.zipcode="required",e=!0):T.zipcode.toString().length>9&&(t.zipcode="Enter a valid Zip Code",e=!0),t.gst_number="",T.gst_number.length>15?(t.gst_number="Not a Valid GST Number",e=!0):!1===/^([0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1})$/.test(T.gst_number)&&""!==T.gst_number&&(t.gst_number="Enter a valid GST Number",e=!0),q({...M,...t}),e)return!0;return!1}catch(e){console.error(e)}},P=async()=>{try{var e;let s=await O(),a=!1;if(s){A({loading:!1,success:"",error:"Enter all the required fields"});return}for(let e of Object.values(L))if("yes"===e){a=!0;break}if(!1===a){A({loading:!1,success:"",error:"Update the field before clicking update button"});return}A({loading:!0,success:"",error:""});let n={userid:null==t?void 0:null===(e=t.userDetails)||void 0===e?void 0:e.user_id,name:T.name,email:T.email,mobile:T.mobile,address:T.address,country:T.country,country_name:T.country_name,state:T.state,state_name:T.state_name,city:T.city,city_name:T.city_name,status:T.status,zipcode:T.zipcode,gst_number:T.gst_number,datetime:""};if(n.datetime=(0,b.Z)(Date.now(),""),3===n.status)for(let e=0;e<S.length;e++)3===S[e].status&&await c.Z.post("/shipping_address/editshipping_address",{id:S[e].id,status:1});let r=await c.Z.post("/shipping_address/insertshipping_address",{...n});200===r.status&&(v.ZP.success("Address Updated successfully"),l(!1),k(e=>!e),G({id:-1,name:"",email:"",mobile:"",address:"",country:-1,country_name:"",state:-1,state_name:"",city:-1,city_name:"",zipcode:-1,gst_number:"",status:1})),A({loading:!1,success:"Address updated successfully",error:""})}catch(e){console.error(e),v.ZP.error("something went wrong"),A({loading:!1,success:"",error:"Unexpected error occured"})}},U=async e=>{try{A({loading:!0,success:"",error:""});for(let e=0;e<S.length;e++)3===S[e].status&&await c.Z.post("/shipping_address/editshipping_address",{id:S[e].id,status:1});let t=await c.Z.post("/shipping_address/editshipping_address",{id:e,status:3});(null==t?void 0:t.status)===200?(A({loading:!1,success:"successfully updated",error:""}),k(e=>!e)):A({loading:!1,success:"",error:"Something went wrong"})}catch(e){console.error(e),A({loading:!1,success:"",error:"Something went wrong"})}},K=async e=>{try{await c.Z.post("/shipping_address/deleteshipping_address",{id:e}),k(e=>!e)}catch(e){console.error(e)}},V=async e=>{try{var t;let s=await c.Z.post("/shipping_address/getshipping_address_user",{sortDetails:{sort
1Key:"id",sortType:1},searchDetails:[{basicSearchKey:"id",basicSearchValue:e,basicSearchType:"number"}]});G(null==s?void 0:null===(t=s.data)||void 0===t?void 0:t.data[0]),h(!0)}catch(e){console.error(e)}},Y=async()=>{try{var e;let s=await O(),a=!1;if(s){A({loading:!1,success:"",error:"Enter all the required fields"});return}for(let e of Object.values(L))if("yes"===e){a=!0;break}if(!1===a){A({loading:!1,success:"",error:"Update the field before clicking update button"});return}A({loading:!0,success:"",error:""});let l={id:T.id,userid:null==t?void 0:null===(e=t.userDetails)||void 0===e?void 0:e.user_id,name:T.name,email:T.email,mobile:T.mobile,address:T.address,country:T.country,country_name:T.country_name,state:T.state,state_name:T.state_name,city:T.city,city_name:T.city_name,status:T.status,zipcode:T.zipcode,gst_number:T.gst_number,datetime:""};if(l.datetime=(0,b.Z)(Date.now(),""),3===l.status)for(let e=0;e<S.length;e++)3===S[e].status&&await c.Z.post("/shipping_address/editshipping_address",{id:S[e].id,status:1});let n=await c.Z.post("/shipping_address/editshipping_address",{...l});200===n.status&&(v.ZP.success("Address Edited successfully"),h(!1),k(e=>!e),G({id:-1,name:"",email:"",mobile:"",address:"",country:-1,country_name:"",state:-1,state_name:"",city:-1,city_name:"",zipcode:-1,gst_number:"",status:1})),A({loading:!1,success:"Address Edited successfully",error:""})}catch(e){console.error(e)}};return(0,a.jsxs)("div",{className:"md:mx-28 flex",children:[(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(N(),{children:(0,a.jsx)("title",{children:"Shipping Address"})})}),(0,a.jsxs)("div",{className:"container mx-auto",children:[(0,a.jsxs)("div",{className:"container mx-auto bg-gray-200 h-10 lg:my-3 rounded-md p-2 text-gray-500",children:[(0,a.jsx)(x(),{className:"hover:text-red-700",href:"/",children:"Home"}),"\xa0/\xa0",(0,a.jsx)(x(),{className:"hover:text-red-700",href:"/customers",children:"Dashboard"}),"\xa0/\xa0",(0,a.jsx)(x(),{className:"hover:text-red-700",href:"/customers/shipping-address",children:"Shipping Address"})]}),(null==E?void 0:E.loading)||Z.loading&&(0,a.jsx)("h1",{className:"text-center text-xl text-green-500",children:"Loading..."}),(0,a.jsxs)("div",{className:"grid lg:grid-cols-3 ",children:[0===S.length?null:S.map((e,t)=>(0,a.jsxs)("div",{className:"  max-h-[200px] m-3 flex flex-col justify-center rounded-md",children:[(0,a.jsx)("div",{className:"border p-2",children:(0,a.jsx)("h1",{})}),(0,a.jsxs)("div",{className:"h-full p-2 border-l border-r space-y-3",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(o.G,{icon:d.wJh}),(0,a.jsxs)("h1",{children:[e.name," ",(0,a.jsx)("br",{}),e.address," "]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(o.G,{icon:d.j1w}),(0,a.jsx)("h1",{children:e.mobile})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(o.G,{icon:u.FU$}),(0,a.jsx)("h1",{children:e.email})]})]}),(0,a.jsxs)("div",{className:"border p-2 space-x-4",children:[1===e.status&&(0,a.jsxs)("button",{onClick:t=>{U(e.id)},className:"rounded-md bg-green-100 p-1",children:["Make this default",(null==Z?void 0:Z.loading)&&(0,a.jsx)(o.G,{icon:d.LM3,spin:!0})]}),(0,a.jsx)("button",{onClick:t=>{V(e.id)},className:"rounded-md bg-blue-100 p-1",children:"Edit Address"}),(null==e?void 0:e.status)!==3?(0,a.jsx)("button",{onClick:()=>K(null==e?void 0:e.id),className:"rounded-md bg-red-100 p-1",children:"Delete"}):null]})]})),(0,a.jsx)("div",{onClick:()=>{l(!0)},className:" h-[200px] border m-3 flex items-center justify-center",children:(0,a.jsx)(o.G,{className:"text-9xl hover:text-blue-700",icon:d.r8p})})]}),s||m?(0,a.jsx)(n.u.Root,{show:s||m,children:(0,a.jsxs)(r.V,{as:"div",className:"relative z-10",initialFocus:w,onClose:l||h,children:[(0,a.jsx)(n.u.Child,{enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),(0,a.jsx)("div",{className:"fixed inset-0 z-10 w-full overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:(0,a.jsx)(n.u.Child,{enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,a.jsxs)(r.V.Panel,{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full ",children:[(0,a.jsxs)("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:[(0,a.jsxs)("div",{className:"mx-auto flex  p-3  justify-between  border rounded-md rounded-b-none ",children:[(0,a.jsx)("h1",{children:"Add new Address"}),s?(0,a.jsx)("button",{onClick:()=>{l(!1)},children:(0,a.jsx)(o.G,{icon:d.YIN})}):(0,a.jsx)("button",{onClick:()=>{h(!1),G({})},children:(0,a.jsx)(o.G,{icon:d.YIN})})]}),(0,a.jsx)("div",{className:"sm:flex ",children:(0,a.jsxs)("div",{className:" text-center border rounded-md rounded-t-none ",children:[(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-5 p-5",children:[(0,a.jsxs)("div",{className:"flex flex-col md:w-1/3  ",children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-sm",children:[(0,a.jsxs)("label",{htmlFor:"primaryMobile",children:["Your Name ",(0,a.jsx)("strong",{className:"text-red-500",children:"*"})]}),(null==M?void 0:M.name.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.name})]})]}),(0,a.jsx)("input",{className:"bg-gray-300 p-1.5 border outline-none rounded-md focus:border-blue-500 focus:outline-none focus:ring-1",type:"text",name:"name",value:T.name,placeholder:"Your name",onChange:e=>{let t=e.target.value;G({...T,name:t}),$({...L,name:"yes"})}})]}),(0,a.jsxs)("div",{className:"flex flex-col md:w-1/3",children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-sm",children:[(0,a.jsxs)("label",{htmlFor:"email",children:["Email",(0,a.jsx)("strong",{className:"text-red-500",children:"*"})]}),(null==M?void 0:M.email.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500 ",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.email})]})]}),(0,a.jsx)("input",{className:"bg-gray-300 p-1.5 outline-none border rounded-md focus:border-blue-500 focus:outline-none focus:ring-1",type:"text",name:"email",value:T.email,onChange:e=>{let t=e.target.value;G({...T,email:t}),$({...L,email:"yes"})},maxLength:50,placeholder:"your email"})]}),(0,a.jsxs)("div",{className:"flex flex-col md:w-1/3",children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-sm",children:[(0,a.jsxs)("label",{htmlFor:"primaryMobile",children:["Mobile",(0,a.jsx)("strong",{className:"text-red-500",children:"*"})]}),(null==M?void 0:M.mobile.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500 ",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.mobile})]})]}),(0,a.jsx)("input",{className:"bg-gray-300 p-1.5 outline-none border rounded-md focus:border-blue-500 focus:outline-none focus:ring-1 ",type:"tel",name:"mobile",value:-1===parseInt(T.mobile)?"":T.mobile,placeholder:"Your Mobile",onChange:e=>{let t=e.target.value;G({...T,mobile:t.length>0?t:""}),$({...L,mobile:"yes"})}})]})]}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row",children:[(0,a.jsxs)("div",{className:"flex flex-col lg:w-2/3",children:[(0,a.jsxs)("div",{className:"p-5 ",children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-sm",children:[(0,a.jsxs)("label",{htmlFor:"full_address",children:["Full Address",(0,a.jsx)("strong",{className:"text-red-500",children:"*"})]}),(null==M?void 0:M.address.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.address})]})]}),(0,a.jsx)("textarea",{className:"p-2 w-full border outline-none focus:border-blue-500 focus:outline-none focus:ring-1",name:"full_address",id:"",rows:3,value:T.address,onChange:e=>{let t=e.target.value;G({...T,address:t}),$({...L,address:"yes"})}})]}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-5 p-5",children:[(0,a.jsxs)("div",{className:"flex flex-col md:w-1/2  ",children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-xs",children:[(0,a.jsxs)("label",{htmlFor:"zipCode",children:["Zip Code",(0,a.jsx)("strong",{className:"text-red-500",children:"*"})]}),(null==M?void 0:M.zipcode.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.zipcode})]})]}),(0,a.jsx)("input",{className:"bg-gray-300 p-1.5 border rounded-md focus:border-blue-500 focus:outline-none focus:ring-1",type:"tel",name:"zipCode",value:(null==T?void 0:T.zipcode)===-1?0:T.zipcode,onChange:e=>{let t=e.target.value;G({...T,zipcode:t.length>0?parseInt(t):0}),$({...L,zipcode:"yes"})},placeholder:"Enter zip code"})]}),(0,a.jsxs)("div",{className:"flex flex-col md:w-1/2 ",children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-xs",children:[(0,a.jsx)("label",{htmlFor:"gstin ",children:"GST Number"}),(null==M?void 0:M.gst_number.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.gst_number})]})]}),(0,a.jsx)("input",{className:"bg-gray-300 p-1.5 border rounded-md focus:border-blue-500 focus:outline-none focus:ring-1",type:"text",name:"gstin",value:null==T?void 0:T.gst_number,onChange:e=>{let t=e.target.value;G({...T,gst_number:t.toUpperCase()}),$({...L,gst_number:"yes"})},placeholder:"Enter your GSTIN"})]})]})]}),(0,a.jsxs)("div",{className:"lg:w-1/3 px-4 py-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-sm",children:[(0,a.jsxs)("label",{htmlFor:"country",children:["Country",(0,a.jsx)("strong",{className:"text-red-500",children:"*"})]}),(null==M?void 0:M.country.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.country})]})]}),(0,a.jsx)(f.Z,{name:T.country_name,onChange:e=>{let t=e.target.value,s=e.target.options[e.target.selectedIndex].getAttribute("data-name"),a=parseInt(t);s&&(G({...T,country:a,country_name:s,state:-1,state_name:"",city:-1,city_name:""}),$({...L,country:"yes"}))},value:null==T?void 0:T.country})]}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-sm",children:[(0,a.jsxs)("label",{htmlFor:"state",children:["State",(0,a.jsx)("strong",{className:"text-red-500",children:"*"})]}),(null==M?void 0:M.state.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.state})]})]}),(0,a.jsx)(g.Z,{country_id:null==T?void 0:T.country,name:"state_id",onChange:e=>{let t=e.target.value,s=e.target.options[e.target.selectedIndex].getAttribute("data-name"),a=parseInt(t);s&&(G({...T,state:a,state_name:s,city:-1,city_name:""}),$({...L,state:"yes"}))},value:null==T?void 0:T.state})]}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("div",{className:"flex justify-center space-x-5 text-sm",children:[(0,a.jsxs)("label",{htmlFor:"city",children:["City",(0,a.jsx)("strong",{className:"text-red-500",children:"*"})]}),(null==M?void 0:M.city.length)!==0&&(0,a.jsxs)("div",{className:"text-red-500",children:[(0,a.jsx)(o.G,{icon:d.RLE}),(0,a.jsx)("span",{className:"px-1",children:null==M?void 0:M.city})]})]}),(0,a.jsx)(y.Z,{country_id:null==T?void 0:T.country,state_id:null==T?void 0:T.state,name:"city",onChange:e=>{let t=e.target.value,s=e.target.options[e.target.selectedIndex].getAttribute("data-name"),a=parseInt(t);s&&(G({...T,city:a,city_name:s}),$({...L,city:"yes"}))},value:null==T?void 0:T.city})]})]})]})]})})]}),(0,a.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row sm:justify-between sm:px-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("input",{onChange:e=>{let t=e.target.checked;t?(G({...T,status:3}),$({...L,status:"yes"})):G({...T,status:1})},type:"checkbox",id:"saveAsDefault"}),"\xa0",(0,a.jsx)("label",{htmlFor:"saveAsDefault",children:"Save As Default"})]}),s?(0,a.jsx)("button",{type:"button",className:"inline-flex w-full justify-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-700 sm:ml-3 sm:w-auto",onClick:()=>{P()},children:"Save Address"}):(0,a.jsx)("button",{type:"button",className:"inline-flex w-full justify-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-700 sm:ml-3 sm:w-auto",onClick:()=>{Y()},children:"Save Edited Address"})]})]})})})})]})}):null]})]})},C=()=>{let e=(0,_.Dv)(j.ZP);return e.loading?(0,a.jsx)("p",{className:"md:mx-28 text-center p-5",children:"Loading..."}):e.isLoggedIn?(0,a.jsx)(S,{}):(0,a.jsx)(l.Z,{})}},28646:function(e,t,s){"use strict";var a=s(85893),l=s(41664),n=s.n(l),r=s(11163);s(67294),t.Z=()=>{let e=(0,r.useRouter)(),t=e.asPath;return(0,a.jsxs)("div",{className:"md:mx-28 text-center text-red-500 p-10 bg-gray-100 text-xl",children:["Your are not Logged in to use this functionality .......! ",(0,a.jsx)("br",{}),(0,a.jsx)(n(),{className:"text-blue-500",href:"/login?re_url=".concat(t),children:"Click here to Login"})]})}},54464:function(e,t,s){"use strict";var a=s(85893),l=s(88446),n=s(67294);let r=(e,t)=>
1{let[s,a]=(0,n.useState)([]),[r,i]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{i(!0);let t=async()=>{try{e&&await l.Z.post("/world_city/getworld_city",{page_enabled:"n",page:1,limit:100,sortDetails:{sortKey:"id",sortType:1},searchDetails:[{basicSearchKey:"state_id",basicSearchValue:e,basicSearchType:"number"}],searchDetailsAnd:[],searchQuery:""}).then(e=>{var t;a(null===(t=e.data)||void 0===t?void 0:t.data)}).catch(()=>{a([])}).finally(()=>{i(!1)})}catch(e){console.error(e)}};t()},[t,e,a,i]),{data:s,loading:r}};t.Z=e=>{let{country_id:t,state_id:s,value:l,...n}=e,{data:i,loading:o}=r(s,t);return(0,a.jsxs)("select",{value:l,...n,className:"shadow appearance-none text-sm border-gray-200 rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",disabled:o,children:[(0,a.jsxs)("option",{value:-1,children:[" ",o?"loading...":"Select city"]}),i.map(e=>(0,a.jsx)("option",{value:e.id,"data-name":e.name,children:[e.name]},e.id))]})}},34994:function(e,t,s){"use strict";var a=s(85893),l=s(88446),n=s(67294);t.Z=e=>{let[t,s]=(0,n.useState)([]);return(0,n.useEffect)(()=>{let e=async()=>{try{var e;let t=await l.Z.post("/world_country/getworld_country",{page_enabled:"n",page:1,limit:10,sortDetails:{sortKey:"name",sortType:1},searchDetails:[]});s(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.data)}catch(e){console.error("Error",e)}};e()},[]),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("select",{...e,className:"shadow appearance-none text-sm border-gray-200 rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ",children:[(0,a.jsx)("option",{value:"-1",children:"Select Country"}),t.map((e,t)=>(0,a.jsx)("option",{value:e.id,"data-name":e.name,children:[e.name]},e.id))]})})}},977:function(e,t,s){"use strict";var a=s(85893),l=s(88446),n=s(67294);let r=e=>{let[t,s]=(0,n.useState)([]),[a,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{r(!0),e&&l.Z.post("world_state/getworld_state",{page_enabled:"n",page:1,limit:25,sortDetails:{sortKey:"123",sortType:-1},searchDetails:[{basicSearchKey:"country_id",basicSearchValue:e,basicSearchType:"number"}]}).then(e=>{let{data:t}=e;s(null==t?void 0:t.data)}).catch(()=>{s([])}).finally(()=>{r(!1)})},[e,s,r]),{data:t,loading:a}};t.Z=e=>{let{country_id:t,value:s,...l}=e,{data:n,loading:i}=r(t);return(0,a.jsxs)("select",{value:s,...l,disabled:i,className:"shadow appearance-none text-sm border-gray-200 rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",children:[(0,a.jsx)("option",{value:-1,children:i?"loading...":"Select State"}),n.map(e=>(0,a.jsx)("option",{value:e.id,"data-name":e.name,children:[e.name]},e.id))]})}},61839:function(e,t,s){"use strict";var a=s(30120);t.Z=(e,t)=>{try{if(!e)return"Date does not exist";let s=new Date(e),l=s.valueOf();if("number"!=typeof l||isNaN(l))return"Invalid Date";let n={year:s.getUTCFullYear(),month:s.getUTCMonth(),date:s.getUTCDate(),hours:s.getUTCHours(),minutes:s.getUTCMinutes(),seconds:s.getUTCSeconds()},r=a.ou.fromObject({year:n.year,month:n.month+1,day:n.date,hour:n.hours,minute:n.minutes,second:n.seconds});if(t.length>0)return r.setZone("Asia/Kolkata").toFormat(t).toString();return r.setZone("Asia/Kolkata").toString()}catch(e){return console.error(e),"Invalid Date"}}},9008:function(e,t,s){e.exports=s(42636)},93235:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,l.default)(e),"object"===n(t)?(s=t.min||0,a=t.max):(s=arguments[1],a=arguments[2]);var s,a,r=encodeURI(e).split(/%..|./).length-1;return r>=s&&(void 0===a||r<=a)};var a,l=(a=s(65571))&&a.__esModule?a:{default:a};function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=t.default,e.exports.default=t.default},83868:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,a.default)(e),(t=(0,i.default)(t,d)).require_display_name||t.allow_display_name){var s=e.match(c);if(s){var o,f,g=s[1];if(e=e.replace(g,"").replace(/(^<|>$)/g,""),g.endsWith(" ")&&(g=g.slice(0,-1)),!(f=(o=g).replace(/^"(.+)"$/,"$1")).trim()||/[\.";<>]/.test(f)&&(f===o||f.split('"').length!==f.split('\\"').length))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>254)return!1;var y=e.split("@"),v=y.pop(),b=v.toLowerCase();if(t.host_blacklist.includes(b)||t.host_whitelist.length>0&&!t.host_whitelist.includes(b))return!1;var _=y.join("@");if(t.domain_specific_validation&&("gmail.com"===b||"googlemail.com"===b)){var j=(_=_.toLowerCase()).split("+")[0];if(!(0,l.default)(j.replace(/\./g,""),{min:6,max:30}))return!1;for(var w=j.split("."),N=0;N<w.length;N++)if(!m.test(w[N]))return!1}if(!1===t.ignore_max_length&&(!(0,l.default)(_,{max:64})||!(0,l.default)(v,{max:254})))return!1;if(!(0,n.default)(v,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,r.default)(v)){if(!v.startsWith("[")||!v.endsWith("]"))return!1;var F=v.slice(1,-1);if(0===F.length||!(0,r.default)(F))return!1}}if('"'===_[0])return _=_.slice(1,_.length-1),t.allow_utf8_local_part?p.test(_):x.test(_);for(var S=t.allow_utf8_local_part?h:u,C=_.split("."),E=0;E<C.length;E++)if(!S.test(C[E]))return!1;return!t.blacklisted_chars||-1===_.search(RegExp("[".concat(t.blacklisted_chars,"]+"),"g"))};var a=o(s(65571)),l=o(s(93235)),n=o(s(10221)),r=o(s(61028)),i=o(s(84808));
1function o(e){return e&&e.__esModule?e:{default:e}}var d={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},c=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,u=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,m=/^[a-z\d]+$/,x=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default,e.exports.default=t.default},10221:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,a.default)(e),(t=(0,l.default)(t,r)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1)),!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var s=e.split("."),n=s[s.length-1];return!(t.require_tld&&(s.length<2||!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(n)||/\s/.test(n))||!t.allow_numeric_tld&&/^\d+$/.test(n))&&s.every(function(e){return!(e.length>63&&!t.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)||/[\uff01-\uff5e]/.test(e)||/^-|-$/.test(e)||!t.allow_underscores&&/_/.test(e))})};var a=n(s(65571)),l=n(s(84808));function n(e){return e&&e.__esModule?e:{default:e}}var r={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},61028:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return((0,l.default)(t),s=String(s))?"4"===s?i.test(t):"6"===s&&d.test(t):e(t,4)||e(t,6)};var a,l=(a=s(65571))&&a.__esModule?a:{default:a},n="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",r="(".concat(n,"[.]){3}").concat(n),i=new RegExp("^".concat(r,"$")),o="(?:[0-9a-fA-F]{1,4})",d=RegExp("^("+"(?:".concat(o,":){7}(?:").concat(o,"|:)|")+"(?:".concat(o,":){6}(?:").concat(r,"|:").concat(o,"|:)|")+"(?:".concat(o,":){5}(?::").concat(r,"|(:").concat(o,"){1,2}|:)|")+"(?:".concat(o,":){4}(?:(:").concat(o,"){0,1}:").concat(r,"|(:").concat(o,"){1,3}|:)|")+"(?:".concat(o,":){3}(?:(:").concat(o,"){0,2}:").concat(r,"|(:").concat(o,"){1,4}|:)|")+"(?:".concat(o,":){2}(?:(:").concat(o,"){0,3}:").concat(r,"|(:").concat(o,"){1,5}|:)|")+"(?:".concat(o,":){1}(?:(:").concat(o,"){0,4}:").concat(r,"|(:").concat(o,"){1,6}|:)|")+"(?::((?::".concat(o,"){0,5}:").concat(r,"|(?::").concat(o,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default},65571:function(e,t){"use strict";function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t=s(e);throw null===e?t="null":"object"===t&&(t=e.constructor.name),TypeError("Expected a string but received a ".concat(t))}},e.exports=t.default,e.exports.default=t.default},84808:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var s in t)void 0===e[s]&&(e[s]=t[s]);return e},e.exports=t.default,e.exports.default=t.default}},function(e){e.O(0,[120,1303,4288,9774,2888,179],function(){return e(e.s=97272)}),_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.