1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="51e46fba-0f1b-4e6d-bed2-dd483984cc64",e._sentryDebugIdIdentifier="sentry-dbid-51e46fba-0f1b-4e6d-bed2-dd483984cc64")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1745],{73060:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/job-details",function(){return o(51902)}])},14904:function(e,t){"use strict";t.Z={src:"/_next/static/media/Frame (1).79e19faa.png",height:126,width:126,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAG1BMVEVcPPdNM+NOM+ZMMd9MMuBLMt9OM+ZTNeJMNOJ65DGIAAAACXRSTlMBKKBNjkiMETqXbVq6AAAACXBIWXMAACE4AAAhOAFFljFgAAAAMUlEQVR4nC2KwQ0AMQyDsJ003X/iKrrjhQQACcNi4wvoHAnaJZWbrl/mbgImO38kwAMUTwCOaViOJQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},26134:function(e,t){"use strict";t.Z={src:"/_next/static/media/Search (2).70d58e66.png",height:160,width:160,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAG1BMVEVLMt9MM99MaXFMMuFPNONNM+FNMuBNM+FGOOL9uqyBAAAACXRSTlMnOgCCIE9VXxJ02jVKAAAACXBIWXMAACE4AAAhOAFFljFgAAAAMUlEQVR4nEXLSQrAQBDDQFnuWf7/4kAg5CpKGJRIOjoNzO0R0LKj6Nldvi0r8ONvfwAUpgCNiXgTSgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},65716:function(e,t,o){"use strict";var l=o(85893),a=o(40245),r=o(48687),s=o(34288),i=o(99603),n=o(89755),d=o.n(n),c=o(67294),u=o(9473),m=o(91444);t.Z=e=>{let{fileC:t,setFileC:o,companyImage:n,edit:p,isSourcedJob:g}=e,[y,h]=(0,c.useState)(!1),f=(0,u.I0)(),v=(0,c.useRef)(null),x=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?h(!0):"dragleave"===e.type&&h(!1)},b=e=>parseFloat((e.size/1048576).toFixed(3))>2?(m.Am.info("File size should be less than 2 Mb.",{autoClose:2e3,hideProgressBar:!0}),!1):/(\.jpg|\.jpeg|\.png)$/i.exec(e.name)?(o(e),!0):(m.Am.info("File should be image only.",{autoClose:2e3,hideProgressBar:!0}),!1),j=e=>{e.target.files&&e.target.files[0]&&b(e.target.files[0])};if(p)return null;let w=!t&&!n;return(0,l.jsxs)("div",{className:"flex flex-col justify-start w-full ",children:[(0,l.jsx)("p",{className:"text-xs w-full text-justify text-gray-500 font-medium mb-1",children:"Company's Logo"}),w?(0,l.jsxs)("div",{className:"border-2 border-dashed rounded-lg p-6 cursor-pointer transition-colors\n ".concat(y?"border-primary bg-gray-50":"border-gray-300","\n hover:border-primary"),onDragEnter:x,onDragLeave:x,onDragOver:x,onDrop:e=>{e.preventDefault(),e.stopPropagation(),h(!1);let{files:t}=e.dataTransfer;t&&t[0]&&b(t[0])},onClick:()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.click()},children:[(0,l.jsx)("input",{type:"file",ref:v,onChange:j,accept:".jpg,.jpeg,.png",className:"hidden",name:"logoFile"}),(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("p",{className:"text-sm text-gray-600",children:"Drag and drop your logo here, or click to select"}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Upload company's logo (Maximum 2 MB) in jpg or png format."})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center px-4 border rounded-lg ",children:[(0,l.jsx)(d(),{src:t?URL.createObjectURL(t):n?n.value:"https://dummyimage.com/300.png",alt:"Company Image",width:80,height:80,className:"object-contain"}),(0,l.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,l.jsx)("button",{className:"text-primary text-sm hover:text-primary/80",onClick:()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.click()},children:"Change"}),(0,l.jsx)(i.G,{icon:s.Vui,className:"cursor-pointer text-red-500 hover:text-red-600",onClick:()=>{t?o(void 0):g?f((0,r.HL)({sourcedCompanyLogo:null})):f((0,a.j2)({companyImage:null}))}})]}),(0,l.jsx)("input",{type:"file",ref:v,onChange:j,accept:".jpg,.jpeg,.png",className:"hidden",name:"logoFile"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Upload company's logo (Maximum 2 MB) in jpg or png format."})]})]})}},51902:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return ee}});
1var l=o(85893),a=o(27786),r=o(11163),s=o(67294),i=o(9473),n=o(91444),d=o(9010),c=o(48687),u=o(61415),m=o(18966),p=o(79194),g=o(13261),y=o(64388),h=o(4623),f=o(63682),v=o(47677),x=o(9041),b=o(89265),j=o.n(b),w=o(65716),C=o(9669),A=o.n(C),N=o(22078);let E=o(17247).default;var P=o(40245),k=o(14904),S=o(26134),_=o(56768),B=o(59417),I=o(99603),L=o(37054),D=o(30381),O=o.n(D),M=o(59936),T=o(5031),F=o(86603),Z=o(27978),H=o(41076),U=o(89308),J=o(97550),R=o(81340),V=o(86570),W=o(33306),Q=o(45781),z=o(23585),q=o(66864);o(80135);let K=o(17247).default;var G=e=>{let{edit:t=!1,otpkey:o,otp:a,onClose:c,onProfileComplete:p}=e;(0,r.useRouter)();let[y,h]=(0,s.useState)(!1),[b,C]=(0,s.useState)(),[E]=(0,u.csg)(),[k]=(0,u.eV2)(),S=(0,i.I0)(),_=(0,i.v9)(e=>{var t;return null===(t=e.dashboard.dashboardUser)||void 0===t?void 0:t.email}),B=(0,i.v9)(e=>{var t,o;return null===(o=e.dashboard)||void 0===o?void 0:null===(t=o.dashboardUser)||void 0===t?void 0:t._id});(0,i.v9)(e=>{var t;return null===(t=e.dashboard.dashboardUser)||void 0===t?void 0:t.number});let I=(0,i.v9)(e=>e.employer.employer.companyName),L=(0,i.v9)(e=>e.employer.employer.companyDesc),D=(0,i.v9)(e=>e.employer.employer.companyImage),O=(0,i.v9)(e=>e.employer.employer.companyLetterHead);(0,i.v9)(e=>e.employer.employer.noOfEmployees);let M=(0,i.v9)(e=>e.employer.employer.linkedIn),T=(0,i.v9)(e=>e.employer.employer.companyWebsite);(0,i.v9)(e=>e.employer.employer.gstNo),(0,i.v9)(e=>e.employer.employer.panNo);
1let[F,Z]=(0,s.useState)(),[H,U]=(0,s.useState)(),[J,R]=(0,s.useState)(0),[V,W]=(0,s.useState)(!0);(0,s.useEffect)(()=>{(async()=>{var e,t,o,l,a;S((0,d.o4)());let{data:r,error:s}=await E({fetchPolicy:"network-only"});if(void 0!==s)return n.Am.error(s.message,{autoClose:2e3,hideProgressBar:!0});if(void 0===r)return n.Am.error("Something went wrong!",{autoClose:2e3,hideProgressBar:!0});let i={_id:r.getEmployer._id,companyName:null!==(o=r.getEmployer.companyName)&&void 0!==o?o:localStorage.getItem("companyName"),companyDesc:r.getEmployer.companyDesc,companyWebsite:r.getEmployer.companyWebsite,companyImage:r.getEmployer.image,companyLetterHead:r.getEmployer.companyLetterHead,employerVerifyStatus:r.getEmployer.employerVerifyStatus,employerVerified:r.getEmployer.employerVerified,linkedIn:r.getEmployer.linkedIn,gstNo:r.getEmployer.gstNo,panNo:r.getEmployer.panNo,registeredAddress:r.getEmployer.registeredAddress,currentAddress:r.getEmployer.currentAddress,noOfLocations:r.getEmployer.noOfLocations,landline:r.getEmployer.landline,noOfEmployees:r.getEmployer.noOfEmployees,lastTurnover:r.getEmployer.lastTurnover,noOfHiring:r.getEmployer.noOfHiring,attritionRate:r.getEmployer.attritionRate,benefits:null===(e=r.getEmployer.benefits)||void 0===e?void 0:e.map(e=>({_id:e._id,value:e.value})),companyType:r.getEmployer.companyType};el(null!==(l=i.linkedIn)&&void 0!==l?l:""),et(null!==(a=null===(t=i.companyWebsite)||void 0===t?void 0:t.value)&&void 0!==a?a:""),C(i.companyType),S((0,P.EM)(i)),S((0,d.o4)())})()},[E,S]),(0,s.useEffect)(()=>{_&&(0,N.GV)(_)&&W(!1)},[_]);let[G,X]=(0,s.useState)(),[$,Y]=(0,s.useState)(x.EditorState.createEmpty()),[ee,et]=(0,s.useState)(""),[eo,el]=(0,s.useState)(""),[ea,er]=(0,s.useState)(""),[es,ei]=(0,s.useState)(""),en=e=>{let t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""};(0,s.useEffect)(()=>{if((null==L?void 0:L.value)!==""){var e,t;let o=K(null!==(e=null==L?void 0:L.value)&&void 0!==e?e:""),l=x.ContentState.createFromBlockArray(o.contentBlocks);Y(x.EditorState.createWithContent(l)),X(L),R(en(null!==(t=null==L?void 0:L.value)&&void 0!==t?t:"").trim().length)}},[L]);let ed=e=>e||b!==u.Q1F.Consultant||eo?e&&!e.match(/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/)?"Please enter a valid website URL":"":"Either website or LinkedIn is required",ec=e=>e||b!==u.Q1F.Consultant||ee?"":"Either website or LinkedIn is required",eu=async()=>{var e,o,l,a,r,s,i,d;if(!G||""===G.value.trim()||"<p></p>"===G.value.trim()){n.Am.info("Please provide your company description!",{autoClose:2e3,hideProgressBar:!0});return}if(J<50){n.Am.info("Company description must be at least ".concat(50," characters long!"),{autoClose:2e3,hideProgressBar:!0});return}if(J>2500){n.Am.info("Company description cannot exceed ".concat(2500," characters!"),{autoClose:2e3,hideProgressBar:!0});return}if(!D&&!H){n.Am.info("Please upload your company's logo!",{autoClose:2e3,hideProgressBar:!0});return}let m=ed(ee),g=ec(eo);if(m){er(m),n.Am.info(m,{autoClose:2e3,hideProgressBar:!0});return}if(g){ei(g),n.Am.info(g,{autoClose:2e3,hideProgressBar:!0});return}if(!ee&&!eo){n.Am.info("Either website or LinkedIn is required",{autoClose:2e3,hideProgressBar:!0});return}if(h(!0),F){let t="letterhead_".concat(I,"_").concat(B,"_").concat(Math.round(Date.now()/1e3)),o=await A().post(N.hW,{fileKey:t});if(200!==o.status||!(null===(l=o.data)||void 0===l?void 0:l.fileUploadUrl)){n.Am.error("Something went wrong during letterhead upload, please try again after sometime.",{hideProgressBar:!0,autoClose:2e3});return}let{contentType:a}=(0,N.hU)(F),{fileUploadUrl:r}=o.data;await A().put(r,F,{headers:{"Content-Type":a}}),e={secure_url:"https://assets.inradius.in/".concat(t)}}if(H){let{contentType:e,ext:t}=(0,N.hU)(H),l=N.WC?"company-logos-dev":"company-logos",r="".concat(l,"/logo_").concat(I,"_").concat(B,"_").concat(Math.round(Date.now()/1e3),".").concat(t),s=await A().post(N.hW,{fileKey:r});if(200!==s.status||!(null===(a=s.data)||void 0===a?void 0:a.fileUploadUrl)){n.Am.error("Something went wrong during logo upload, please try again after sometime.",{hideProgressBar:!0,autoClose:2e3});return}let{fileUploadUrl:i}=s.data;await A().put(i,H,{headers:{"Content-Type":e}}),o={secure_url:"https://assets.inradius.in/".concat(r)}}try{let{data:l,errors:a}=await k({variables:{input:{companyName:I,companyDesc:t?{_id:null!==(r=null==L?void 0:L._id)&&void 0!==r?r:"",value:null==G?void 0:G.value}:{value:G.value},image:H?{value:o.secure_url}:{value:null==D?void 0:D.value},linkedIn:eo.length>0?eo:M,companyWebsite:ee.length>0?{value:ee}:{value:T.value},companyType:M&&T?u.Q1F.Company:eo.length>0&&ee.length>0?u.Q1F.Company:u.Q1F.Consultant}}});if(h(!1),void 0!==a)return n.Am.error(a[0].message,{autoClose:2e3,hideProgressBar:!0}),null;if(void 0===l)return n.Am.error("Something went wrong!",{autoClose:2e3,hideProgressBar:!0}),null;S((0,P.j2)({companyDesc:t?{_id:null!==(s=null==L?void 0:L._id)&&void 0!==s?s:"",value:null==G?void 0:G.value}:{_id:"",value:G.value},employerVerifyStatus:u.dyW.DocumentsUploaded,companyLetterHead:F?e.secure_url:O,companyImage:H?t?{_id:null!==(i=null==D?void 0:D._id)&&void 0!==i?i:"",value:o.secure_url}:{_id:"",value:o.secure_url}:{_id:null!==(d=null==D?void 0:D._id)&&void 0!==d?d:"",value:null==D?void 0:D.value}})),c&&c(),p&&p(),n.Am.success("Your details are updated!",{autoClose:1500,hideProgressBar:!0});return}catch(e){if(void 0!==e)return h(!1),n.Am.error(e.toString(),{autoClose:2e3,hideProgressBar:!0}),null}};return(0,l.jsxs)("div",{className:"".concat(t?"flex flex-col max-w-lg w-11/12 xl:w-full pb-4":"h-auto max-h-[65vh] md:max-h-[70vh] flex flex-col"),children:[(0,l.jsx)(m.default,{loading:y}),(0,l.jsxs)("div",{className:"".concat(t?"flex flex-col max-w-lg w-full pb-4":"flex flex-col overflow-y-auto px-2 pb-4"),children:[!t&&(0,l.jsx)(Q.Z,{className:"absolute top-7 right-4 cursor-pointer w-5 h-5 z-10",onClick:()=>{c()}}),(0,l.jsxs)("div",{className:"flex flex-col",children:[!L&&(0,l.jsxs)("div",{className:"flex flex-col w-full mb-4",children:[(0,l.jsx)("p",{className:"text-xs w-full text-ju
1stify text-gray-500 font-medium mt-1 mb-2",children:"Company Description"}),(0,l.jsx)("div",{className:"bg-lightpinkBg rounded-lg p-3 w-full mb-3",children:(0,l.jsxs)("div",{className:"flex items-start gap-2",children:[(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"blue",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-0.5",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("path",{d:"M12 16v-4"}),(0,l.jsx)("path",{d:"M12 8h.01"})]}),(0,l.jsx)("p",{className:"text-xs font-normal italic text-black leading-relaxed",children:"Company description should at least contain 50 characters."})]})}),(0,l.jsx)(v.default,{editorState:$,onEditorStateChange:e=>{let t=j()((0,x.convertToRaw)(e.getCurrentContent()));Y(e),X({_id:"",value:t}),R(en(t).trim().length)}}),(0,l.jsx)("div",{className:"text-xs w-full text-right text-gray-500 font-normal mt-2",children:(0,l.jsxs)("span",{className:J>2500||J<50?"text-red-500":"text-gray-500",children:[J,"/",2500," Character(s)"]})})]}),!(null==D?void 0:D.value)&&(0,l.jsx)(w.Z,{fileC:H,setFileC:U,companyImage:D,edit:t}),!M&&!T&&(0,l.jsxs)("div",{className:"flex flex-col space-y-2 mt-4",children:[(0,l.jsx)("p",{className:"text-sm text-secondaryText font-medium",children:"Select your company type"}),(0,l.jsxs)("div",{className:"flex md:flex-row flex-col gap-4 w-full",children:[(0,l.jsx)("div",{className:"flex border w-full border-gray-300 rounded-lg",children:(0,l.jsxs)("button",{type:"button",className:"flex-1 py-2 px-4 flex items-center justify-center gap-2 rounded-lg transition-colors ".concat(b===u.Q1F.Company?"bg-primary text-white":"bg-white text-gray-700 hover:bg-gray-50"),onClick:()=>{C(u.Q1F.Company)},children:[(0,l.jsx)(z.Z,{className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm",children:"I am a Company"})]})}),(0,l.jsx)("div",{className:"flex border w-full border-gray-300 rounded-lg",children:(0,l.jsxs)("button",{type:"button",className:"flex-1 py-2 px-4 flex items-center justify-center gap-2 rounded-lg transition-colors ".concat(b===u.Q1F.Consultant?"bg-primary text-white":"bg-white text-gray-700 hover:bg-gray-50"),onClick:()=>{C(u.Q1F.Consultant)},children:[(0,l.jsx)(q.Z,{className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm",children:"I am a Consultant"})]})})]}),(0,l.jsxs)("div",{className:"flex md:flex-row flex-col gap-4 mt-3",children:[(0,l.jsxs)("div",{className:"flex flex-col justify-start w-full",children:[(0,l.jsxs)("label",{htmlFor:"companyWebsite",className:"text-sm text-secondaryText font-medium mb-1",children:["Company Website",b===u.Q1F.Company&&(0,l.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,l.jsx)(f.Z,{id:"companyWebsite",placeholder:"https://yourcompany.com",value:ee,onChange:e=>{let t=e.target.value;et(t),er(ed(t)),t&&b===u.Q1F.Consultant&&ei("")},backgroud:"bg-transparent border border-gray-300"}),ea&&(0,l.jsx)("p",{className:"text-xs text-red-500 px-1 font-medium py-1",children:ea})]}),(0,l.jsxs)("div",{className:"flex flex-col justify-start w-full",children:[(0,l.jsxs)("label",{htmlFor:"companyLinkedIn",className:"text-sm text-secondaryText font-medium mb-1",children:[b===u.Q1F.Consultant?"LinkedIn":"Company LinkedIn",b===u.Q1F.Company&&(0,l.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,l.jsx)(f.Z,{id:"companyLinkedIn",placeholder:b===u.Q1F.Consultant?"https://www.linkedin.com/in/yourprofile":"https://www.linkedin.com/company/yourcompany",value:eo,onChange:e=>{let t=e.target.value;el(t),ei(ec(t)),t&&b===u.Q1F.Consultant&&er("")},backgroud:"bg-transparent border border-gray-300"}),es&&(0,l.jsx)("p",{className:"text-xs text-red-500 px-1 font-medium py-1",children:es})]})]})]})]})]}),(0,l.jsx)("hr",{className:"".concat(t?"hidden":"my-4")}),(0,l.jsx)("div",{className:"".concat(t?"py-4 px-4 xl:px-12 lg:w-1/2 w-full border-t bg-white fixed bottom-0 right-0":"w-full px-2"),children:(0,l.jsx)(g.Z,{bg:"bg-primary w-full !rounded-md",title:t?"Save & Continue":"Update",text:"text-white",type:"submit",size:"small",onClick:()=>{eu()}})})]})};let X=e=>{switch(e){case"Bangalore":return(0,l.jsx)(Z.Z,{});case"Delhi NCR":return(0,l.jsx)(U.Z,{});case"Hyderabad":return(0,l.jsx)(J.Z,{});case"Mumbai":return(0,l.jsx)(V.Z,{});case"Pune":return(0,l.jsx)(W.Z,{});case"Ahmedabad":return(0,l.jsx)(F.Z,{});case"Chennai":return(0,l.jsx)(H.Z,{});case"Kolkata":return(0,l.jsx)(R.Z,{});default:return null}},$={Mumbai:[19.076,72.8777],Pune:[18.582806,73.742694],Bangalore:[12.956889,77.701111],Hyderabad:[17.4435,78.3772],"Delhi NCR":[28.6304,77.2177],Ahmedabad:[23.0376,72.5615],Chennai:[13.0067,80.2206],Kolkata:[22.578209,88.3638285]},Y=[{key:c.Ju["job-details"],color:"bg-purple1",component:_.ZP,title:"Basic Job Details",desc:"Start with the essentials-describe the role and its type to set clear expectations."},{key:c.Ju["define-radius"],color:"bg-purple2",component:e=>{var t,o,f;let{edit:v,otpkey:x,isSourcedJob:b}=e,j=(0,r.useRouter)(),[w]=(0,u._Cv)(),[C]=(0,u.MyG)(),[A]=(0,u.csg)(),[N]=(0,u._iH)(),[E,k]=(0,s.use
1State)(!1),[S,_]=(0,s.useState)(!1),[D,F]=(0,s.useState)(!1),[Z,H]=(0,s.useState)(),[U,J]=(0,s.useState)(!1),[R,V]=(0,s.useState)(""),[W,Q]=(0,s.useState)(0),[z,q]=(0,s.useState)(!1),[K]=(0,u.eV2)(),Y=(0,i.I0)(),ee=(0,i.v9)(e=>e.common.allLocations),{data:et}=(0,u.xp7)();(0,s.useEffect)(()=>{(!eo||0===eo.length)&&ee.length>0&&eA(ee[0])},[ee]),(0,s.useEffect)(()=>{(null==et?void 0:et.allLocations)&&Y((0,d.PL)(et.allLocations))},[et,Y]);let eo=(0,i.v9)(e=>e.job.job.locations),el=(0,i.v9)(e=>e.job.job.jobTitle),ea=(0,i.v9)(e=>e.job.job.jobStatus),er=(0,i.v9)(e=>e.job.job.listingComplete),es=(0,i.v9)(e=>e.job.job.relocate),ei=(0,i.v9)(e=>e.job.job.radius),en=(0,i.v9)(e=>e.job.job.latitude),ed=(0,i.v9)(e=>e.job.job.longitude),ec=(0,i.v9)(e=>e.employer.employer.companyDesc),eu=(0,i.v9)(e=>e.employer.employer.companyImage),em=(0,i.v9)(e=>e.employer.employer.linkedIn),ep=(0,i.v9)(e=>e.employer.employer.companyWebsite),eg=(0,i.v9)(e=>e.job.job.locations&&e.job.job.locations.length>0?e.job.job.locations[0]:null),ey=(0,i.v9)(e=>e.job.isProfileIncomplete),eh=(0,i.v9)(e=>e.job.job._id),ef=async()=>{try{Y((0,d.o4)());let{data:e,error:t}=await C({variables:{job:!0,edit:!1},fetchPolicy:"network-only"});if(Y((0,d.o4)()),t){n.Am.error(t.message,{autoClose:2e3,hideProgressBar:!0});return}if(void 0===e){n.Am.error("Something went wrong",{autoClose:2e3,hideProgressBar:!0});return}H(e.generateOtp),J(!0),n.Am.info("OTP sent to your registered email",{autoClose:2e3,hideProgressBar:!0})}catch(e){Y((0,d.o4)()),n.Am.error("Something went wrong",{autoClose:2e3,hideProgressBar:!0});return}},ev=async e=>{try{var t,o,l;if(!Z){n.Am.info("Something went wrong, please try again later.",{autoClose:2e3,hideProgressBar:!0});return}Y((0,d.o4)());let r=await w({variables:{input:{_id:eh,radius:{value:null==ei?void 0:ei.value},locations:eo.map(e=>{var t,o,l,a,r;return{city:{_id:null===(t=e.city)||void 0===t?void 0:t._id,value:null!==(a=null===(o=e.city)||void 0===o?void 0:o.value)&&void 0!==a?a:""},address:e.address,location:{type:"Point",coordinates:null!==(r=null===(l=e.location)||void 0===l?void 0:l.coordinates)&&void 0!==r?r:[]},shortName:e.shortName,locality:e.locality}}),relocate:null==es||es,jobStatus:u.$T5.Open,liveDate:O()()},isFinalStep:!0},fetchPolicy:"network-only"}),{data:s}=await N({variables:{input:{jobId:eh,key:Z,otp:e}},fetchPolicy:"network-only"});if(void 0===s){Y((0,d.o4)()),n.Am.error("Something went wrong",{autoClose:2e3,hideProgressBar:!0});return}if(!s.verifyAndActivateJob){Y((0,d.o4)()),n.Am.info("Invalid OTP entered",{autoClose:2e3,hideProgressBar:!0});return}await K({variables:{input:{companyType:em&&ep?u.Q1F.Company:u.Q1F.Consultant}}}),Y((0,d.o4)()),(null===(o=r.data)||void 0===o?void 0:null===(t=o.updateEmployerJob)||void 0===t?void 0:t.success)?(n.Am.success("OTP verified and job posted successfully",{autoClose:2e3,hideProgressBar:!0}),J(!1),V(e),_(!0),Y((0,a.D4)(a.O$.jobs)),j.push("/dashboard/?page=".concat(a.O$.jobs,"&jobAddedId=").concat(eh,"&jobAddedTitle=").concat(encodeURIComponent(null!==(l=null==el?void 0:el.value)&&void 0!==l?l:"")))):n.Am.error("Failed to post job",{autoClose:2e3,hideProgressBar:!0}),r.errors&&n.Am.error(r.errors[0].message,{autoClose:2e3,hideProgressBar:!0})}catch(e){Y((0,d.o4)()),n.Am.error(e.message,{autoClose:2e3,hideProgressBar:!0});return}},ex=async()=>{var e,t;Y((0,d.o4)());let{data:o,error:l}=await A({fetchPolicy:"network-only"});if(void 0!==l)return n.Am.error(l.message,{autoClose:2e3,hideProgressBar:!0}),null;if(void 0===o)return n.Am.error("Something went wrong!",{autoClose:2e3,hideProgressBar:!0}),null;let a={_id:o.getEmployer._id,companyName:null!==(t=o.getEmployer.companyName)&&void 0!==t?t:localStorage.getItem("companyName"),companyDesc:o.getEmployer.companyDesc,companyWebsite:o.getEmployer.companyWebsite,companyImage:o.getEmployer.image,companyLetterHead:o.getEmployer.companyLetterHead,employerVerifyStatus:o.getEmployer.employerVerifyStatus,employerVerified:o.getEmployer.employerVerified,linkedIn:o.getEmployer.linkedIn,gstNo:o.getEmployer.gstNo,panNo:o.getEmployer.panNo,registeredAddress:o.getEmployer.registeredAddress,currentAddress:o.getEmployer.currentAddress,noOfLocations:o.getEmployer.noOfLocations,landline:o.getEmployer.landline,noOfEmployees:o.getEmployer.noOfEmployees,lastTurnover:o.getEmployer.lastTurnover,noOfHiring:o.getEmployer.noOfHiring,attritionRate:o.getEmployer.attritionRate,benefits:null===(e=o.getEmployer.benefits)||void 0===e?void 0:e.map(e=>({_id:e._id,value:e.value}))};Y((0,P.EM)(a)),Y((0,d.o4)()),ef()}
1,[eb,ej]=(0,s.useState)(null);(0,s.useEffect)(()=>{v&&eo&&ei&&(null==eb?void 0:eb.jobTitle)!==el&&ej({locations:eo,radius:ei,relocate:es,jobTitle:el})},[v,eo,ei,es,el]);let ew=(e,t)=>{let o=["__typename","_id","months"];if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return e===t;if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!ew(e[o],t[o]))return!1;return!0}let l=Object.keys(e).filter(e=>!o.includes(e)),a=Object.keys(t).filter(e=>!o.includes(e));if(l.length!==a.length)return!1;for(let o of l)if(!a.includes(o)||!ew(e[o],t[o]))return!1;return!0},eC=async()=>{var e,t;if(!eo||eo.length<=0){n.Am.info("Select a location to continue",{autoClose:2e3,hideProgressBar:!0});return}for(let e=0;e<eo.length;e++){let t=eo[e];if(!t.location||!t.address||!t.location||!t.shortName){n.Am.error("Something went wrong!",{autoClose:2e3,hideProgressBar:!0});return}}if(!ei){n.Am.info("Select job location to continue",{autoClose:2e3,hideProgressBar:!0});return}if(!ec&&!(null==eu?void 0:eu.value)||!ep&&!em){n.Am.info("Please complete your profile before posting your first job!",{autoClose:2e3,hideProgressBar:!0}),Y((0,c.bb)(!0));return}if(b){F(!0);let t={_id:eh};if(eb){let o={locations:eo,radius:ei,relocate:null==es||es};ew(eb.locations,o.locations)||(t.locations=o.locations.map(e=>{var t,o,l,a,r;return{city:{_id:null===(t=e.city)||void 0===t?void 0:t._id,value:null!==(a=null===(o=e.city)||void 0===o?void 0:o.value)&&void 0!==a?a:""},address:e.address,location:{type:"Point",coordinates:null!==(r=null===(l=e.location)||void 0===l?void 0:l.coordinates)&&void 0!==r?r:[]},shortName:e.shortName,locality:e.locality}})),ew(eb.radius,o.radius)||(t.radius={value:null===(e=o.radius)||void 0===e?void 0:e.value}),eb.relocate!==o.relocate&&(t.relocate=o.relocate)}else t={...t,radius:{value:null==ei?void 0:ei.value},locations:eo.map(e=>{var t,o,l,a,r;return{city:{_id:null===(t=e.city)||void 0===t?void 0:t._id,value:null!==(a=null===(o=e.city)||void 0===o?void 0:o.value)&&void 0!==a?a:""},address:e.address,location:{type:"Point",coordinates:null!==(r=null===(l=e.location)||void 0===l?void 0:l.coordinates)&&void 0!==r?r:[]},shortName:e.shortName,locality:e.locality}}),relocate:null==es||es};let{data:o,errors:l}=await w({variables:{input:t},fetchPolicy:"network-only"});return(F(!1),void 0!==l)?(n.Am.error(l[0].message,{autoClose:2e3,hideProgressBar:!0}),null):void 0===o?(n.Am.error("Something went wrong!",{autoClose:2e3,hideProgressBar:!0}),null):(ej({locations:eo,radius:ei,relocate:es}),void j.replace("/job-details?page="+c.Ju["requirements-synopsis"]+"&jobId="+eh+"&isSourcedJob=yes"+(v?"&edit=yes":"")))}if(v&&ea===u.$T5.Open&&er){F(!0);let e={_id:eh};if(eb){let o={locations:eo,radius:ei,relocate:null==es||es};ew(eb.locations,o.locations)||(e.locations=o.locations.map(e=>{var t,o,l,a,r;return{city:{_id:null===(t=e.city)||void 0===t?void 0:t._id,value:null!==(a=null===(o=e.city)||void 0===o?void 0:o.value)&&void 0!==a?a:""},address:e.address,location:{type:"Point",coordinates:null!==(r=null===(l=e.location)||void 0===l?void 0:l.coordinates)&&void 0!==r?r:[]},shortName:e.shortName,locality:e.locality}})),ew(eb.radius,o.radius)||(e.radius={value:null===(t=o.radius)||void 0===t?void 0:t.value}),eb.relocate!==o.relocate&&(e.relocate=o.relocate)}else e={...e,radius:{value:null==ei?void 0:ei.value},locations:eo.map(e=>{var t,o,l,a,r;return{city:{_id:null===(t=e.city)||void 0===t?void 0:t._id,value:null!==(a=null===(o=e.city)||void 0===o?void 0:o.value)&&void 0!==a?a:""},address:e.address,location:{type:"Point",coordinates:null!==(r=null===(l=e.location)||void 0===l?void 0:l.coordinates)&&void 0!==r?r:[]},shortName:e.shortName,locality:e.locality}}),relocate:null==es||es};let{data:o,errors:l}=await w({variables:{input:e},fetchPolicy:"network-only"});if(F(!1),void 0!==l)return n.Am.error(l[0].message,{autoClose:2e3,hideProgressBar:!0}),null;if(void 0===o)return n.Am.error("Something went wrong!",{autoClose:2e3,hideProgressBar:!0}),null;ej({locations:eo,radius:ei,relocate:es}),Y((0,a.D4)(a.O$.jobs)),j.push("/dashboard/?page=".concat(a.O$.jobs)),n.Am.success("Job details updated successfully!",{autoClose:2e3,hideProgressBar:!0})}else ef()},eA=e=>{let[t,o]=$[e.location]||[0,0],l={_id:"",city:{_id:e._id,value:e.location},address:e.location,location:{type:"Point",coordinates:[o,t]},shortName:e.location,locality:e.location};Y((0,c.HL)({locations:[l],latitude:t,longitude:o})),null!==eS.current&&(eS.current.value="")},eN=e=>{var t,o;let l=null!==(t=null==ei?void 0:ei.value)&&void 0!==t?t:25,a=e?l+1:l-1;a>=0&&a<=30&&Y((0,c.HL)({radius:{_id:null!==(o=null==ei?void 0:ei._id)&&void 0!==o?o:"",value:a}}))},{isLoaded:eE}=(0,L.Ji)({id:"google-maps-script",googleMapsApiKey:"AIzaSyDQSmnsP6MdkExxVrM_zmi8-pMvVEkOP_c",libraries:T.Pl}
1),[eP,ek]=(0,s.useState)(),eS=(0,s.useRef)(null);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.Z,{setLoading:F,jobId:eh,triggerCounter:W}),(0,l.jsx)(y.Z,{show:U,closeHandler:()=>{J(!1),H(void 0)},handleModalSubmit:ev,resendHandler:ef,text:"Enter the code sent on your email address to post the job. It's only valid for 10 minutes."}),(0,l.jsx)(m.default,{loading:D}),(0,l.jsx)(p.Z,{show:z,close:()=>{},size:"w-11/12 xl:w-1/3",children:(0,l.jsxs)("div",{className:"w-full flex flex-col justify-center items-center",children:[(0,l.jsx)("p",{className:"text-sm w-full text-justify text-gray-500 font-normal px-4 pt-6 lg:whitespace-pre-line",style:{textAlignLast:"center"},children:"Make sure that you have selected proper location.\nYou can also select more than one locations"}),(0,l.jsxs)("div",{className:"flex flex-row justify-end gap-2 w-full p-4",children:[(0,l.jsx)("button",{type:"submit",className:"w-24 text-xs bg-white p-2 text-primary border border-primary grid place-items-center rounded-full cursor-pointer",onClick:()=>{q(!1)},children:"Change"}),(0,l.jsx)("button",{type:"submit",className:"w-24 text-xs bg-primary p-2 text-white grid place-items-center rounded-full cursor-pointer",onClick:()=>{q(!1),eC()},children:"Yes, Proceed"})]})]})}),(0,l.jsxs)("div",{className:"flex w-full justify-center mx-auto px-4 gap-8",children:[(0,l.jsxs)("div",{className:"w-full items-center justify-center gap-10 flex flex-col md:flex-row",children:[(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-6",children:"Pick your city"}),(0,l.jsx)("div",{className:"grid grid-cols-3 gap-4 items-center",children:ee.slice().sort((e,t)=>e.location.localeCompare(t.location)).map(e=>{var t,o;return(0,l.jsxs)("div",{onClick:()=>eA(e),className:"relative flex flex-col justify-center items-center p-4 bg-white text-black aspect-square rounded-xl border border-lightGray hover:bg-lightPurple hover:border hover:border-primary hover:fill-primary hover:text-primary transition-all cursor-pointer ".concat((null==eg?void 0:null===(t=eg.city)||void 0===t?void 0:t._id)===e._id?"!bg-primary !fill-white !text-white":""),children:[(null==eg?void 0:null===(o=eg.city)||void 0===o?void 0:o._id)===e._id&&(0,l.jsx)("div",{className:"absolute top-2 right-2",children:(0,l.jsx)(I.G,{icon:B.f8k,size:"sm",className:"text-white"})}),(0,l.jsx)("div",{className:"w-16 h-16 flex items-center justify-center",children:X(e.location)}),(0,l.jsx)("p",{className:"text-sm md:text-base font-medium text-center",children:e.location})]},e._id)})})]}),eg&&eE&&(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-6",children:"How far can employees come from?"}),(0,l.jsxs)(L.b6,{zoom:10,center:{lat:null!=en?en:19.076,lng:null!=ed?ed:72.8777},mapContainerClassName:"w-full h-[300px] mt-2 mb-4",options:{restriction:{latLngBounds:{north:35.5087,south:6.4627,west:68.1097,east:97.3954},strictBounds:!0},disableDefaultUI:!1,streetViewControl:!1,panControl:!1,mapTypeControl:!1},onLoad:()=>{ei||Y((0,c.HL)({radius:{_id:"",value:25}}))},children:[(0,l.jsx)(L.F2,{onLoad:e=>{ek(e)},onPlaceChanged:()=>{if(eP){var e,t,o,l,a;let r=eP.getPlace(),s=null===(t=r.geometry)||void 0===t?void 0:null===(e=t.location)||void 0===e?void 0:e.lat(),i=null===(l=r.geometry)||void 0===l?void 0:null===(o=l.location)||void 0===o?void 0:o.lng(),n=r.formatted_address||"";if(void 0!==s&&void 0!==i){let e={_id:"",city:null!==(a=null==eg?void 0:eg.city)&&void 0!==a?a:{_id:"",value:""},address:n,location:{type:"Point",coordinates:[i,s]},shortName:n,locality:n};Y((0,c.HL)({locations:[e],latitude:s,longitude:i}))}}},restrictions:{country:["IN"]},children:(0,l.jsx)("div",{className:"absolute top-2 left-4 right-10",children:(0,l.jsx)("input",{ref:eS,type:"text",className:"bg-white px-2 py-2 lg:px-3 rounded-md focus-visible:outline-none text-xs font-normal w-full",placeholder:"Search Places...",autoComplete:"off"})})}),void 0!==en&&void 0!==ed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(L.jC,{position:{lat:en,lng:ed},draggable:!0,onDragEnd:e=>{var t,o;let l=null===(t=e.latLng)||void 0===t?void 0:t.lat(),a=null===(o=e.latLng)||void 0===o?void 0:o.lng();if(l&&a){let e={...eg,location:{type:"Point",coordinates:[a,l]}};Y((0,c.HL)({locations:[e],latitude:l,longitude:a}
1))}}}),(0,l.jsx)(L.VM,{center:{lat:en,lng:ed},radius:ei?1e3*ei.value:25e3,options:{strokeColor:"#ff6666",fillColor:"#ffb3b3",fillOpacity:.15,strokeOpacity:.7}})]})]}),(0,l.jsxs)("div",{className:"flex justify-center items-center gap-4 mb-5",children:[(0,l.jsx)("p",{className:"text-sm text-darkGray font-semibold",children:"Open to employees beyond the radius?"}),(0,l.jsx)(M.default,{checked:null!=es&&es,onChange:e=>{Y((0,c.HL)({relocate:e}))},offColor:"#e7e7e7",onColor:"#4d33e0",checkedIcon:(0,l.jsx)(l.Fragment,{}),uncheckedIcon:(0,l.jsx)(l.Fragment,{}),handleDiameter:12,height:20,width:36,className:"justify-start !flex items-center"})]}),(0,l.jsx)("div",{className:"w-full max-w-full pb-7",children:(0,l.jsxs)("div",{className:"w-full flex items-center justify-between mt-2",children:[(0,l.jsx)("div",{className:"flex items-center gap-2",children:(0,l.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Select your radius"})}),(0,l.jsxs)("div",{className:"flex items-center border rounded-2xl bg-white px-3 py-1.5 shadow-sm",children:[(0,l.jsx)("button",{onClick:()=>eN(!1),className:"text-gray-400 hover:text-gray-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Decrease radius",disabled:(null!==(t=null==ei?void 0:ei.value)&&void 0!==t?t:0)<=10,children:(0,l.jsx)(I.G,{icon:B.Kl4,className:"text-sm"})}),(0,l.jsxs)("div",{className:"flex items-center mx-4",children:[(0,l.jsx)("span",{className:"text-sm font-medium",children:null!==(o=null==ei?void 0:ei.value)&&void 0!==o?o:25}),(0,l.jsx)("span",{className:"text-sm font-medium ml-1",children:"km"})]}),(0,l.jsx)("button",{onClick:()=>eN(!0),className:"text-gray-400 hover:text-gray-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Increase radius",disabled:(null!==(f=null==ei?void 0:ei.value)&&void 0!==f?f:0)>=30,children:(0,l.jsx)(I.G,{icon:B.r8p,className:"text-sm"})})]})]})})]})]}),(0,l.jsx)(p.Z,{show:ey,close:()=>Y((0,c.bb)(!1)),size:"max-w-2xl w-11/12 md:w-full",children:(0,l.jsxs)("div",{className:"w-full items-center justify-start p-6",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Complete your profile"}),(0,l.jsx)(G,{edit:!1,onClose:()=>Y((0,c.bb)(!1)),onProfileComplete:()=>ex()})]})})]}),(0,l.jsx)("div",{className:"w-full fixed bottom-0 right-0 bg-white py-3 px-4 xl:px-24 border-t flex justify-end gap-5",children:(0,l.jsxs)("div",{className:"w-full flex gap-5 justify-end",children:[(0,l.jsx)(g.Z,{bg:"bg-lightPurple w-fit !rounded-md",title:"Back",text:"text-primary",type:"submit",size:"small",onClick:()=>{j.replace("/job-details?page="+c.Ju["job-details"]+"&jobId="+eh+(v?"&edit=yes":"")+(b?"&isSourcedJob=yes":""))}}),(0,l.jsx)(g.Z,{bg:"bg-primary w-fit !rounded-md",title:b?"Save & Next":"Submit",text:"text-white",type:"submit",size:"small",onClick:eC})]})})]})},title:"Job Location Details",desc:"Pinpoint where the job is based to attract candidates in the right area."},{key:c.Ju["requirements-synopsis"],color:"bg-purple4",component:e=>{let{edit:t,otpkey:o,isSourcedJob:b}=e,C=(0,r.useRouter)(),[P]=(0,u._Cv)(),[k]=(0,u.MyG)(),[S]=(0,u.csg)(),[_]=(0,u._iH)(),[B,I]=(0,s.useState)(!1),[L,D]=(0,s.useState)(""),[O,M]=(0,s.use
1State)(!1),[T,F]=(0,s.useState)(),[Z,H]=(0,s.useState)(!1),[U,J]=(0,s.useState)(""),[R,V]=(0,s.useState)(0),[W,Q]=(0,s.useState)(x.EditorState.createEmpty()),[z,q]=(0,s.useState)(),[K,G]=(0,s.useState)(!1),[X,$]=(0,s.useState)(),[Y,ee]=(0,s.useState)(0),[et]=(0,u.eV2)(),eo=(0,i.I0)(),el=(0,i.v9)(e=>e.job.job.jobTitle);(0,i.v9)(e=>e.job.job.sourcedCompanyLinkedIn),(0,i.v9)(e=>e.job.job.sourcedCompanyWebsite);let ea=(0,i.v9)(e=>e.job.job.sourcedCompanyName),er=(0,i.v9)(e=>e.job.job.sourcedCompanyExternalLink),es=(0,i.v9)(e=>e.job.job.jobStatus),ei=(0,i.v9)(e=>e.job.job.listingComplete),en=(0,i.v9)(e=>e.job.job.sourcedCompanyDesc),ed=(0,i.v9)(e=>e.job.job.sourcedCompanyLogo),ec=(0,i.v9)(e=>e.job.job._id),eu=e=>{let t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""};(0,s.useEffect)(()=>{if((null==en?void 0:en.value)!==""){var e,t;let o=E(null!==(e=null==en?void 0:en.value)&&void 0!==e?e:""),l=x.ContentState.createFromBlockArray(o.contentBlocks);Q(x.EditorState.createWithContent(l)),q(en),ee(eu(null!==(t=null==en?void 0:en.value)&&void 0!==t?t:"").trim().length)}},[en]);let em=async()=>{try{eo((0,d.o4)());let{data:e,error:t}=await k({variables:{job:!0,edit:!1},fetchPolicy:"network-only"});if(eo((0,d.o4)()),t){n.Am.error(t.message,{autoClose:2e3,hideProgressBar:!0});return}if(void 0===e){n.Am.error("Something went wrong",{autoClose:2e3,hideProgressBar:!0});return}F(e.generateOtp),H(!0),n.Am.info("OTP sent to your registered email",{autoClose:2e3,hideProgressBar:!0})}catch(e){eo((0,d.o4)()),n.Am.error("Something went wrong",{autoClose:2e3,hideProgressBar:!0});return}},ep=async e=>{try{var t,o,l;if(!T){n.Am.info("Something went wrong, please try again later.",{autoClose:2e3,hideProgressBar:!0});return}eo((0,d.o4)());let r=await P({variables:{input:{_id:ec,isSourcedJob:!0,sourcedCompanyDesc:{value:null==z?void 0:z.value},sourcedCompanyExternalLink:er,sourcedCompanyLogo:X?{value:L}:{value:null==ed?void 0:ed.value},sourcedCompanyName:ea}},fetchPolicy:"network-only"}),{data:s}=await _({variables:{input:{jobId:ec,key:T,otp:e}},fetchPolicy:"network-only"});if(void 0===s){eo((0,d.o4)()),n.Am.error("Something went wrong",{autoClose:2e3,hideProgressBar:!0});return}if(!s.verifyAndActivateJob){eo((0,d.o4)()),n.Am.info("Invalid OTP entered",{autoClose:2e3,hideProgressBar:!0});return}eo((0,d.o4)()),(null===(o=r.data)||void 0===o?void 0:null===(t=o.updateEmployerJob)||void 0===t?void 0:t.success)?(n.Am.success("OTP verified and job posted successfully",{autoClose:2e3,hideProgressBar:!0}),H(!1),J(e),I(!0),eo((0,a.D4)(a.O$.jobs)),C.push("/dashboard/?page=".concat(a.O$.jobs,"&jobAddedId=").concat(ec,"&jobAddedTitle=").concat(encodeURIComponent(null!==(l=null==el?void 0:el.value)&&void 0!==l?l:"")))):n.Am.error("Failed to post job",{autoClose:2e3,hideProgressBar:!0}),r.errors&&n.Am.error(r.errors[0].message,{autoClose:2e3,hideProgressBar:!0})}catch(e){eo((0,d.o4)()),n.Am.error(e.message,{autoClose:2e3,hideProgressBar:!0});return}},eg=e=>{try{return null!==e.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)}catch(e){return!1}},ey=e=>e.startsWith("http://")||e.startsWith("https://")?e:"https://".concat(e),eh=async()=>{var e,o;if(!ea){n.Am.info("Please provide your company name!",{autoClose:2e3,hideProgressBar:!0});return}if(!er){n.Am.info("External link is missing",{autoClose:2e3,hideProgressBar:!0});return}if(!eg(ey(er))){n.Am.info("Please provide valid external link",{autoClose:2e3,hideProgressBar:!0});return}if(!z||""===z.value.trim()||"<p></p>"===z.value.trim()){n.Am.info("Please provide your company description!",{autoClose:2e3,hideProgressBar:!0});return}if(Y<50){n.Am.info("Company description must be at least ".concat(50," characters long!"),{autoClose:2e3,hideProgressBar:!0});return}if(Y>2500){n.Am.info("Company description cannot exceed ".concat(2500," characters!"),{autoClose:2e3,hideProgressBar:!0});return}if(!ed&&!X){n.Am.info("Please upload your company's logo!",{autoClose:2e3,hideProgressBar:!0});return}if(M(!0),X){let{contentType:t,ext:l}=(0,N.hU)(X),a=N.WC?"company-logos-dev":"company-logos",r="".concat(a,"/logo_").concat(ea,"_").concat(Math.round(Date.now()/1e3),".").concat(l),s=await A().post(N.hW,{fileKey:r});if(200!==s.status||!(null===(o=s.data)||void 0===o?void 0:o.fileUploadUrl)){n.Am.error("Something went wrong during logo upload, please try again after sometime.",{hideProgressBar:!0,autoClose:2e3});return}let{fileUploadUrl:i}=s.data;await A().put(i,X,{headers:{"Content-Type":t}});let d="https://assets.inradius.in/".concat(r);e={secure_url:d},D(d)}if(t&&es===u.$T5.Open&&ei)try{let{data:t,errors:o}=await P({variables:{input:{_id:ec,isSourcedJob:!0,sourcedCompanyDesc:{value:null==z?void 0:z.value},sourcedCompanyExternalLink:er,sourcedCompanyLogo:X?{value:e.secure_url}:{value:null==ed?void 0:ed.value},sourcedCompanyName:ea}},fetchPolicy:"network-only"});if(M(!1),void 0!==o)return n.Am.error(o[0].message,{autoClose:2e3,hideProgressBar:!0}),null;if(void 0===t)return n.Am.error("Something went wrong!",{autoClose:2e3,hideProgressBar:!0}),null;eo((0,a.D4)(a.O$.jobs)),C.push("/dashboard/?page=".concat(a.O$.jobs)),n.Am.success("Job details updated successfully!",{autoClose:2e3,hideProgressBar:!0});return}catch(e){console.log(e),n.Am.error(e.message)}else M(!1),em();M(!1)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.Z,{setLoading:M,jobId:ec,triggerCounter:R}),(0,l.jsx)(y.Z,{show:Z,closeHandler:()=>{H(!1),F(void 0)},handleModalSubmit:ep,resendHandler:em,text:"Enter the code sent on your email address to post the job. It's only valid for 10 minutes."}),(0,l.jsx)(m.default,{loading:O}),(0,l.jsx)(p.Z,{show:K,close:()=>{},size:"w-11/12 xl:w-1/3",children:(0,l.jsxs)("div",{className:"w-full flex flex-col justify-center items-center",children:[(0,l.jsx)("p",{className:"text-sm w-full text-ju
1stify text-gray-500 font-normal px-4 pt-6 lg:whitespace-pre-line",style:{textAlignLast:"center"},children:"Make sure that you have selected proper location.\nYou can also select more than one locations"}),(0,l.jsxs)("div",{className:"flex flex-row justify-end gap-2 w-full p-4",children:[(0,l.jsx)("button",{type:"submit",className:"w-24 text-xs bg-white p-2 text-primary border border-primary grid place-items-center rounded-full cursor-pointer",onClick:()=>{G(!1)},children:"Change"}),(0,l.jsx)("button",{type:"submit",className:"w-24 text-xs bg-primary p-2 text-white grid place-items-center rounded-full cursor-pointer",onClick:()=>{G(!1),eh()},children:"Yes, Proceed"})]})]})}),(0,l.jsxs)("div",{className:"flex flex-col gap-5 md:gap-10 w-full pb-2",children:[(0,l.jsxs)("div",{className:"flex flex-col md:flex-row items-center gap-4 md:gap-10 justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col justify-start w-full",children:[(0,l.jsx)("p",{className:"text-lg font-semibold mb-2 md:mb-4",children:"Company Name"}),(0,l.jsx)(f.Z,{type:"text",placeholder:"Company Name",value:null!=ea?ea:"",onChange:e=>{eo((0,c.HL)({sourcedCompanyName:e.target.value}))},backgroud:"bg-transparent border border-gray-300"})]}),(0,l.jsxs)("div",{className:"flex flex-col justify-start w-full",children:[(0,l.jsx)("p",{className:"text-lg font-semibold mb-2 md:mb-4",children:"External link"}),(0,l.jsx)(f.Z,{type:"text",placeholder:"https://debox.co.in/",value:null!=er?er:"",onChange:e=>{eo((0,c.HL)({sourcedCompanyExternalLink:e.target.value}))},backgroud:"bg-transparent border border-gray-300"})]})]}),(0,l.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:gap-10 justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col justify-start w-full mb-6",children:[(0,l.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,l.jsx)("p",{className:"text-lg font-semibold",children:"Company Description"})}),(0,l.jsx)("div",{className:"bg-lightpinkBg rounded-lg p-2 w-full mb-2",children:(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 24 24",fill:"none",stroke:"blue",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("path",{d:"M12 16v-4"}),(0,l.jsx)("path",{d:"M12 8h.01"})]}),(0,l.jsx)("p",{className:"text-xs font-normal italic text-black mt-0.5",children:"Company description should at least contain 50 characters."})]})}),(0,l.jsx)(v.default,{editorState:W,onEditorStateChange:e=>{let t=j()((0,x.convertToRaw)(e.getCurrentContent()));Q(e),q({_id:"",value:t}),ee(eu(t).trim().length)}}),(0,l.jsx)("div",{className:"text-xs w-full text-right text-gray-500 font-normal mt-2",children:(0,l.jsxs)("span",{className:Y>2500||Y<50?"text-red-500":"text-gray-500",children:[Y,"/",2500," Character(s)"]})})]}),(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,l.jsx)("p",{className:"text-lg font-semibold",children:"Company Logo"})}),(0,l.jsx)(w.Z,{fileC:X,setFileC:$,isSourcedJob:!0,companyImage:ed,edit:!1})]})]}),(0,l.jsx)("div",{className:"flex flex-col items-start justify-between"})]}),(0,l.jsx)("br",{}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{className:"w-full fixed bottom-0 right-0 bg-white py-3 px-4 xl:px-24 border-t flex justify-end gap-5",children:(0,l.jsxs)("div",{className:"w-full flex gap-5 justify-end",children:[(0,l.jsx)(g.Z,{bg:"bg-lightPurple w-fit !rounded-md",title:"Back",text:"text-primary",type:"submit",size:"small",onClick:()=>{C.replace("/job-details?page="+c.Ju["define-radius"]+"&jobId="+ec+(t?"&edit=yes":"")+(b?"&isSourcedJob=yes":""))}}),(0,l.jsx)(g.Z,{bg:"bg-primary w-fit !rounded-md",title:"Submit",text:"text-white",type:"submit",size:"small",onClick:eh})]})})]})},title:"Company Details",desc:"Specify the basic details for the sourced jobs to post a sourced jobs."}];var ee=()=>{let{jobId:e,page:t,edit:o,isSourcedJob:a}=(0,r.useRouter)().query,m=Date.now().toString(),p=Date.now().toString();(0,i.v9)(e=>e.dashboard.dashboardJobNames);
1let g=(0,i.I0)(),[y,h]=(0,s.useState)(0),[f]=(0,u.a3K)(),[v]=(0,u.gH_)(),[x]=(0,u.csg)(),[b]=(0,u.vIM)(),[j]=(0,u.mqg)(),[w]=(0,u.dCe)(),[C]=(0,u.ABF)(),[A]=(0,u.OjM)(),[N]=(0,u.Zqs)(),[E]=(0,u.MZQ)();(0,s.useEffect)(()=>{(async()=>{g((0,d.o4)());try{let[e,t]=await Promise.all([j(),N({fetchPolicy:"network-only"})]);if(e.data){let t=e.data.allDomains.map(e=>({_id:e._id,domain:e.domain})).sort((e,t)=>e.domain.localeCompare(t.domain));g((0,d.Kt)(t))}if(t.data){let e=t.data.allDesignations.map(e=>({_id:e._id,designation:e.designation})).sort((e,t)=>e.designation.localeCompare(t.designation));g((0,d.T1)(e))}}catch(e){n.Am.error("Failed to fetch master data")}g((0,d.o4)())})()},[j,b,v,A,w,C,N,g]),(0,s.useEffect)(()=>{(async()=>{var e,t;g((0,d.o4)());let{data:o,error:l}=await x({fetchPolicy:"network-only"});if(void 0!==l)return n.Am.error(l.message,{autoClose:2e3,hideProgressBar:!0});if(void 0===o)return n.Am.error("Something went wrong!",{autoClose:2e3,hideProgressBar:!0});let a={_id:o.getEmployer._id,companyName:null!==(t=o.getEmployer.companyName)&&void 0!==t?t:localStorage.getItem("companyName"),companyDesc:o.getEmployer.companyDesc,companyWebsite:o.getEmployer.companyWebsite,companyImage:o.getEmployer.image,companyLetterHead:o.getEmployer.companyLetterHead,employerVerifyStatus:o.getEmployer.employerVerifyStatus,employerVerified:o.getEmployer.employerVerified,linkedIn:o.getEmployer.linkedIn,gstNo:o.getEmployer.gstNo,panNo:o.getEmployer.panNo,registeredAddress:o.getEmployer.registeredAddress,currentAddress:o.getEmployer.currentAddress,noOfLocations:o.getEmployer.noOfLocations,landline:o.getEmployer.landline,noOfEmployees:o.getEmployer.noOfEmployees,lastTurnover:o.getEmployer.lastTurnover,noOfHiring:o.getEmployer.noOfHiring,attritionRate:o.getEmployer.attritionRate,benefits:null===(e=o.getEmployer.benefits)||void 0===e?void 0:e.map(e=>({_id:e._id,value:e.value}))};g((0,P.EM)(a)),g((0,d.o4)())})()},[x,g]),(0,s.useEffect)(()=>{(async()=>{if(e){g((0,d.o4)());try{var t,o,l,a,r,s,i;let{data:n,error:d}=await f({fetchPolicy:"network-only",variables:{jobId:e.toString()}});if(d||!n)throw Error((null==d?void 0:d.message)||"Failed to fetch job details");let u=n.getJobDetails,m={_id:u._id,benefits:u.benefits,companyDesc:u.companyDesc,companyImage:u.companyImage,companyName:u.companyName,companyWebsite:u.companyWebsite,createdAt:u.createdAt,domain:u.domain,employerId:u.employerId,industry:u.industry,jobDesc:u.jobDesc,jobStatus:u.jobStatus,jobTitle:u.jobTitle,jobType:u.jobType,listingComplete:u.listingComplete,locations:null!==(r=u.locations)&&void 0!==r?r:[],maxPay:u.maxPay,minPay:u.minPay,minRequiredExp:u.minRequiredExp,maxRequiredExp:u.maxRequiredExp,openings:u.openings,qualifications:u.qualifications,radius:u.radius,skills:u.skills,subDomain:u.subDomain,suggestions:u.suggestions,relocate:u.relocate,latitude:null!==(s=null===(o=u.locations[0])||void 0===o?void 0:null===(t=o.location)||void 0===t?void 0:t.coordinates[1])&&void 0!==s?s:0,longitude:null!==(i=null===(a=u.locations[0])||void 0===a?void 0:null===(l=a.location)||void 0===l?void 0:l.coordinates[0])&&void 0!==i?i:0,isUrgent:u.isUrgent,isSourcedJob:u.isSourcedJob,sourcedCompanyDesc:u.sourcedCompanyDesc,sourcedCompanyExternalLink:u.sourcedCompanyExternalLink,sourcedCompanyLinkedIn:u.sourcedCompanyLinkedIn,sourcedCompanyLogo:u.sourcedCompanyLogo,sourcedCompanyName:u.sourcedCompanyName,sourcedCompanyWebsite:u.sourcedCompanyWebsite,paymentDetails:u.paymentDetails};g((0,c.Og)(m))}catch(e){n.Am.error(e.message)}g((0,d.o4)())}})()},[f,g,e]),(0,s.useEffect)(()=>{if(t){let e=Y.findIndex(e=>e.key===t);-1!==e&&h(e)}},[t]),Y.length;let _=Y[y].component;return k.Z,S.Z,(0,l.jsxs)("div",{className:"w-full h-full mx-auto",children:[(0,l.jsx)("div",{className:"w-full bg-lightpinkBg px-4 py-4 fixed top-0 z-50",children:(0,l.jsxs)("div",{className:"mx-auto xl:px-24 px-6",children:[(0,l.jsx)("h1",{className:"text-lg lg:text-2xl font-semibold mt-2",children:Y[y].title}),(0,l.jsx)("p",{className:"text-sm lg:text-base font-normal text-black text-opacity-50 mt-1",children:Y[y].desc})]})}),(0,l.jsx)("div",{className:"w-full px-4 py-8 mt-24 h-full",children:(0,l.jsx)("div",{className:"w-full h-full mx-auto xl:px-24 px-6",children:(0,l.jsx)(_,{isSourcedJob:"yes"===a,edit:"yes"===o,otp:p,otpkey:m})})})]})}}},function(e){e.O(0,[4976,7948,3662,4885,1255,2822,9603,1664,798,8159,9755,2586,6192,6908,3157,6450,3392,6202,8764,9669,673,1406,8168,6348,1739,2773,2888,9774,179],function(){return e(e.s=73060)}),_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.