1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[921],{888:(e,l,t)=>{"use strict";t.d(l,{A:()=>f});var n=t(37876),r=t(89099),s=t(14232),a=t(2171),i=t(89311),o=t(83872),d=t(21639),c=t(38243),u=t(16416),x=t(16495),m=t(63819),h=t(71297),p=t(95729),v=t(52200);let j={TextWithPlansApply:e=>{let{text:l="Upgrade to Peerlist Pro",className:t="",textColor:r,isCompany:a,addon:o,isPatron:d,...c}=e,[u,x]=(0,s.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.default.SemiBoldText,{textColor:r,className:"cursor-pointer ".concat(t),onClick:()=>x(!0),...c,children:l}),u?(0,n.jsx)(j.HirePlusModal,{showModal:u,setShowModal:x}):null]})},UpgradeText:e=>{let{text:l="Upgrade to Peerlist Pro to modify this.",hideInfoIcon:t=!1}=e,[r,a]=(0,s.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{className:"w-full flex justify-between items-center group cursor-pointer",onClick:()=>a(e=>!e),type:"button",children:[(0,n.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,n.jsx)("span",{className:" text-green",children:(0,n.jsx)(o.SparkIcon,{size:16})}),(0,n.jsx)(i.default.SemiBoldText,{xs:!0,textColor:"text-green-500 group-hover:underline",className:"whitespace-nowrap",children:l})]}),t?null:(0,n.jsx)("div",{className:"flex text-gray-500",children:(0,n.jsx)(o.InfoIcon,{size:"16"})})]}),r?(0,n.jsx)(j.HirePlusModal,{showModal:r,setShowModal:a}):null]})},UpgradeToProBtn:()=>{let e=(0,r.useRouter)(),l=async()=>{try{e.push(u.A.APP_PATHS.upgrade)}catch(e){}};return(0,n.jsx)(d.Ay.Blue,{onClick:()=>l(),iconRight:(0,n.jsx)(o.ArrowRightIcon,{}),children:"Upgrade"})},IconTextWithPlansApply:e=>{let{title:l="Upgrade to Peerlist Pro",description:t}=e;return(0,n.jsxs)("div",{className:"my-10",children:[(0,n.jsx)("img",{src:x.CDNImage.upgradeToPro,alt:"Upgrade to Peerlist Pro",className:"h-14 mx-auto"}),(0,n.jsxs)("div",{className:"text-center flex flex-col justify-between mt-4",children:[l?(0,n.jsx)(i.default.SemiBoldText,{sm:!0,className:"mb-0.5",children:l}):null,t&&(0,n.jsx)(i.default.NormalText,{xs:!0,className:"mb-4",children:t}),(0,n.jsx)("div",{className:"",children:(0,n.jsx)(j.UpgradeToProBtn,{})})]})]})},HirePlusModal:e=>{let{showModal:l,setShowModal:t}=e,{primaryUserData:r}=(0,a.useSelector)(e=>e.PrimaryUserData),{company:s}=(0,a.useSelector)(e=>e.Company),u=(0,v.A)({productPayment:x.PAYMENTS.STRIPE.PLAN_PRICE_DETAILS.payPerJob});return(0,n.jsxs)(c.Ay,{showModal:l,setShowModal:t,showClose:!0,small:!0,children:[(0,n.jsxs)(c.Ep.Body,{defaultClasses:"p-6",children:[(0,n.jsx)("img",{src:x.CDNImage.hireModalMagnetImage,alt:"Hire like a pro with Peerlist",className:"h-50 mx-auto dark:invert"}),(0,n.jsxs)(i.default.NormalText,{as:"h4",textColor:"text-gray-1k",className:"font-instrument mt-6 text-center",xxxl:!0,children:["Hire like a ",(0,n.jsx)("i",{children:"pro"})," with Peerlist!"]}),(0,n.jsx)(i.default.NormalText,{sm:!0,className:"mt-2",textColor:"text-gray text-center",children:"Find and hire the most talented and accomplished designers & developers in the world. Link directly to your application form or use Peerlist's native applicant tracking system."})]}),(0,n.jsxs)(c.Ep.Footer,{className:"justify-between",children:[(0,n.jsxs)(i.default.MutedText,{className:"flex items-center",children:["Secured by",(0,n.jsx)("span",{className:"text-gray-500 dark:text-gray-600 ml-0.5",children:(0,n.jsx)(p.DZ,{color:"currentColor"})})]}),(0,n.jsxs)(d.Ay.Primary,{as:"a",href:x.PAYMENTS.STRIPE.getPaymentURL({url:u.url,email:(null==r?void 0:r.email)||"",refId:(null==s?void 0:s.id)||(null==r?void 0:r.id)}),iconRight:(0,n.jsx)(o.ArrowUpRightIcon,{}),children:["Post a Job ",(0,n.jsx)(i.default.Dot,{})," ",u.price]})]})]})},PayPerJobOffers:()=>(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(i.default.NormalText,{xs:!0,as:"span",textColor:"text-green-400",children:"For limited time, 90% off â â"}),(0,n.jsx)(i.default.SemiBoldText,{xs:!0,as:"span",textColor:"text-green-400",onClick:e=>{m.default.copyToClipboard("EARLYSUPPORTERS"),e.stopPropagation(),h.A.SuccessToast("Copied to clipboard")},children:"EARLYSUPPORTERS"}),(0,n.jsx)(i.default.NormalText,{xs:!0,as:"span",textColor:"text-green-400",children:"â"})]})},f=j},16217:(e,l,t)=>{"use strict";t.d(l,{r:()=>a});var n=t(58385),r=t(16495),s=t(63819);let a=e=>{let l=[];return e&&r.SOCIAL_LINK_NAMES.map(t=>{let r=n.A["".concat(t,"Colored")],a=t;"producthunt"===t.toLowerCase()&&(a="Product Hunt",r=n.A.ProductHuntSmallP),"linkedin"===t.toLowerCase()&&(a="Linkedin",r=n.A.LinkedinColored),"github"===t.toLowerCase()&&(a="GitHub",r=n.A.GithubSmall),"angellist"===t.toLowerCase()&&(a="Wellfound"),"youtube"===t.toLowerCase()&&(a="Youtube",r=n.A.YoutubeSmall),"facebook"===t.toLowerCase()&&(a="Facebook",r=n.A.FacebookColored),"discord"===t.toLowerCase()&&(a="Discord",r=n.A.DiscordColored),"dribbble"===t.toLowerCase()&&(a="Dribbble",r=n.A.DribbbleSmall),"leetcode"===t.toLowerCase()&&(a="Leetcode",r=n.A.Leetcode),"twitter"===t.toLowerCase()&&(a="X",r=n.A.TwitterColored),"x"===t.toLowerCase()&&(a="X",r=n.A.TwitterColored),"website"===t.toLowerCase()&&(a="Portfolio Website",r=n.A.SocialLinkSmall),"medium"===t.toLowerCase()&&(a="Medium",r=n.A.MediumSmall),"substack"===t.toLowerCase()&&(a="Substack",r=n.A.SubstackSmall),"peerlist"===t.toLowerCase()&&(r=n.A.PeerlistP),"threads"===t.toLowerCase()&&(a="Threads",r=n.A.ThreadsSmall);let i={...(0,s.SocialLinkSanity)({name:a,url:e[t]||e[t.toLowerCase()]}),icon:r};(e[t]||e[t.toLowerCase()])&&l.push(i)}),l}},31377:(e,l,t)=>{"use strict";t.d(l,{o:()=>c});var n=t(37876),r=t(14232),s=t(5048);let a=(0,r.createContext)(null);var i=t(90050),o=t(74896);let d=e=>!e.isLayoutDirty&&e.willUpdate(!1),c=({children:e,id:l,inherit:t=!0})=>{let c=(0,r.useContext)(s.L),u=(0,r.useContext)(a),[x,m]=function(){let e=function(){let e=(0,r.useRef)(!1);return(0,o.E)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),[l,t]=(0,r.useState)(0),n=(0,r.useCallback)(()=>{e.current&&t(l+1)},[l]);return[(0,r.useCallback)(()=>i.Gt.postRender(n),[n]),l]}(),h=(0,r.useRef)(null),p=c.id||u;null===h.current&&((e=>!0==(!0===e)||"id"===e)(t)&&p&&(l=l?p+"-"+l:p),h.current={id:l,group:!0===t&&c.group||function(){let e=new Set,l=new WeakMap,t=()=>e.forEach(d);return{add:n=>{e.add(n),l.set(n,n.addEventListener("willUpdate",t))},remove:n=>{e.delete(n);let r=l.get(n);r&&(r(),l.delete(n)),t()},dirty:t}}()});let v=(0,r.useMemo)(()=>({...h.current,forceRender:x}),[m]);return(0,n.jsx)(s.L.Provider,{value:v,children:e})}},41972:(e,l,t)=>{"use strict";t.d(l,{A:()=>b});var n=t(37876),r=t(19635),s=t.n(r),a=t(81515),i=t.n(a),o=t(63819),d=t(82381),c=t(16495),u=t(70514),x=t(78063),m=t(1492);let h=c.JOB_PREFERENCES_CONST.JOB_ROLES,p=c.JOB_PREFERENCES_CONST.SKILLS,v=c.JOB_PREFERENCES_CONST.JOB_TYPES,j=c.JOB_PREFERENCES_CONST.LOCATION,f="remoteOnly",g="minExp",y="maxExp",b={generateQueriesFromFilter:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=Object.entries(e),t=[];
1return l.forEach(e=>{let[l,n]=e;switch(l){case p:{if(!(null==n?void 0:n.length)||!n)return;let e=n.map(e=>e.name);t.push("skills=".concat(encodeURIComponent(e.toString())));break}case h:n.length>0&&t.push("roles=".concat(n.toString()));break;case"min":case g:Number.isInteger(n)&&t.push("minExp=".concat(n));break;case"max":case y:Number.isInteger(n)&&t.push("maxExp=".concat(n));break;case f:t.push("remoteOnly=".concat(n));break;case v:t.push("jobType=".concat(n));break;case j:{let e=(0,d.yY)(n);e&&t.push(e);break}case"cities":if(n.length>0){let e=n.map(e=>o.default.isString(e)?e:e.city);t.some(e=>e.includes("cities"))||t.push("cities=".concat(e.toString()))}break;case"countries":if(n.length>0){let e=n.map(e=>o.default.isString(e)?e:e.country);t.some(e=>e.includes("countries"))||t.push("countries=".concat(e.toString()))}}}),t},generateFilterFromQueries:e=>{let l=Object.entries(e),t={};return l.forEach(e=>{var l,n,r;let[s,a]=e;switch(s){case p:t.skills=null==a||null==(l=a.split(","))?void 0:l.map(e=>({label:e,name:e}));break;case h:t.roles=null==a?void 0:a.split(",");break;case f:t.remoteOnly="true"===a;break;case v:t.jobType=a;break;case g:t[g]=a;break;case y:t[y]=a;break;case"cities":{let e=Array.isArray(a)?a:null==a||null==(n=a.split(","))?void 0:n.map(e=>({city:e}));t.cities=e,t.location=Array.isArray(t.location)?t.location.concat(e):e;break}case"countries":{let e=a instanceof Array?(null==a?void 0:a[0])||"":a,l=null==e||null==(r=e.split(","))?void 0:r.map(e=>({country:e}));t.countries=l,t.location=Array.isArray(t.location)?t.location.concat(l):l}}}),t},calculateJobPostPercentage:e=>{let l=0,t=["jobTitle","jobType","jobDescription","department","locationPreference","location","roles","skills","otherOptions","salary"];(null==e?void 0:e.applyLink)&&t.push(c.JOB_PREFERENCES_CONST.APPLY_LINK),(null==e?void 0:e.jobType)!==u.A.INTERNSHIP&&t.push(c.JOB_PREFERENCES_CONST.EQUITY,c.JOB_PREFERENCES_CONST.EXPERIENCE),(null==e?void 0:e.jobType)===u.A.INTERNSHIP&&t.push(u.A.INTERNSHIP_DURATION);let n=t.length;return Object.entries(s()(e,t)).forEach(e=>{var t;let[n,r]=e;if(null!=r){if(Array.isArray(r)&&r.length>0||"string"==typeof r&&""!==r.trim()||"boolean"==typeof r){l+=1;return}if("salary"===n){(null==r?void 0:r.min)&&(null==r?void 0:r.max)&&(l+=1);return}if("object"==typeof r&&!Array.isArray(r)&&(null==(t=Object)?void 0:t.keys(r).length)>0){if("equity"===n&&!(null==r?void 0:r.option))return;l+=1}"number"==typeof r&&(l+=1)}}),Math.min(l/n*100,100).toFixed()},restructureJobPostDataBeforeApiCall:(e,l)=>{var t,n,r,s,a,o,d;let{questions:m,socialLinks:h}=l,p={...e},v=["hiringManagerDetails","publishedAt"];(null==e?void 0:e.jobType)===u.A.INTERNSHIP&&v.push(c.JOB_PREFERENCES_CONST.EXPERIENCE),[u.A.FREELANCE,u.A.CONSULTANT,u.A.INTERNSHIP].includes(null==e?void 0:e.jobType)&&(v.push(c.JOB_PREFERENCES_CONST.EQUITY),p.salary={currency:null==e||null==(t=e.salary)?void 0:t.currency,min:null==e||null==(n=e.salary)?void 0:n.min,unit:null==e||null==(r=e.salary)?void 0:r.unit});let j=i()(p,v);if(null==j?void 0:j[c.JOB_PREFERENCES_CONST.EQUITY]){let e={min:(null==(s=j.equity)?void 0:s.min)&&parseFloat(j.equity.min)||null,max:(null==j||null==(a=j.equity)?void 0:a.max)&&parseFloat(j.equity.max)||null,option:j.equity.option};j[c.JOB_PREFERENCES_CONST.EQUITY]=e}return(null==j?void 0:j[c.JOB_PREFERENCES_CONST.JOB_DESCRIPTION])&&(j[c.JOB_PREFERENCES_CONST.JOB_DESCRIPTION]=(0,x.sanitizeRichText)(null==j?void 0:j.jobDescription,x.extendTagsMap.job)),(null==m?void 0:m.length)&&(j.applicationForm={...null!=(o=null==e?void 0:e.applicationForm)?o:{},questions:m}),(null==h?void 0:h.length)&&(j.applicationForm={...null!=(d=null==j?void 0:j.applicationForm)?d:{},socialLinks:h}),j},getCandidateBadgeByScore:e=>{if(!e||e>1||e<=0)return null;let l=null,t=parseFloat(e||0,10);switch(!0){case t>=.8:l=(0,n.jsx)(m.A.GreatFit,{});break;case t>=.6&&t<.8:l=(0,n.jsx)(m.A.GoodFit,{});break;case t<.3:l=(0,n.jsx)(m.A.MisFit,{});break;default:l=null}return l}}},42465:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>eU});var n=t(37876),r=t(14232),s=t(77328),a=t.n(s),i=t(89099),o=t(2171),d=t(47553),c=t(68827),u=t(34321),x=t(70514),m=t(71297),h=t(14372),p=t(57994),v=t(63819),j=t(14291),f=t(12717),g=t(43934),y=t(83872),b=t(89311),A=t(48187),N=t(442),S=t(95600),E=t(22757),T=t(34217),C=t(21639),w=t(888),I=t(78004),P=t.n(I);let{MATCHED:k,SHORTLISTED:R,APPLIED:L,REJECTED:B}=x.A,O=[{icon:(0,n.jsx)("span",{className:"w-4 h-4 bg-red rounded-full text-white flex items-center justify-center",children:(0,n.jsx)(y.MinusIcon,{size:12})}),type:B,title:B,themeColor:{headerText:"text-red-300 dark:text-red-100",headerBG:"bg-red-00 dar
1k:bg-red-300/20 hover:cursor-pointer",border:"border-red-00 dark:border-red-900",borderHighLight:"border-red"}},{icon:(0,n.jsx)(y.CircleIcon,{size:16}),type:L,title:L,themeColor:{headerText:"text-gray-1k",headerBG:"bg-gray-200",border:"border-gray-200",borderHighLight:"border-gray-500"}},{icon:(0,n.jsx)("span",{className:"flex items-center justify-center w-4 h-4 bg-green-300 text-white rounded-full",children:(0,n.jsx)(y.CheckIcon,{size:12})}),type:R,title:R,themeColor:{headerText:"text-green-300 dark:text-green-200",headerBG:"bg-green-00 dark:bg-green-300/10",border:"border-green-00 dark:border-green-800",borderHighLight:"border-green-100"}}],_=[B,k],D=e=>{let{loading:l,candidates:t,isJobArchived:s,fetchCandidates:a,canAccessMatched:i,triggerShareModal:o,onSelectCandidate:d,handleApplicantProfileAction:c}=e,[u,x]=(0,r.useState)([B]),[h,p]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if(s)return;let e={};return[B,R,L].forEach(l=>{let n=document.getElementById(l),r=g.default.create(n,{animation:200,forceFallback:!0,group:{name:"shared",put:l!==k,pull:l!==k||!!i},onChoose:()=>{document.body.classList.add("grabbing")},onUnchoose:()=>{document.body.classList.remove("grabbing")},onEnd:()=>{p(null),document.body.classList.remove("grabbing")},onMove:e=>{let{from:l,to:t}=e,n=null==t?void 0:t.id,r=null==l?void 0:l.id;if(p(n),r===k&&n===L||n===k)return!1;n===B&&u.includes(B)&&x(u.filter(e=>e!==B))},onAdd:async e=>{var l;let{from:n,to:r,item:s}=e,a=null==n?void 0:n.id,i=null==r?void 0:r.id,o={toColumn:i,fromColumn:a,applicantID:null==s?void 0:s.id,oldIndex:e.oldIndex,newIndex:e.newIndex},d=null==t||null==(l=t[a].users)?void 0:l[e.oldIndex];if((null==d?void 0:d.type)===k&&i===L){m.A.ErrorToast("Cannot move Matched candidate to Applied."),n.insertBefore(s,n.childNodes[e.oldIndex]);return}await c({dragEvent:o,userInfo:d})||n.insertBefore(s,n.childNodes[e.oldIndex])}});e[l]=r}),()=>{Object.values(e).forEach(e=>e.destroy())}},[t,s,i]),(0,n.jsx)("section",{className:"mb-20 relative overflow-x-auto lg:overflow-x-clip",children:(0,n.jsx)("ul",{className:"flex justify-between gap-x-2 min-h-screen px-6",children:O.map(e=>{var r,c,m,p;let v=u.includes(e.type);if(s&&e.type===k)return null;let j=(null==t||null==(r=t[e.type])?void 0:r.fetchNext)||!1,f=(null==t||null==(c=t[e.type])?void 0:c.users)||[],g=(null==t||null==(m=t[e.type])?void 0:m.totalCount)||(null==f?void 0:f.length)||0,A=h===e.type?e.themeColor.borderHighLight:e.themeColor.border;return(0,n.jsxs)("li",{className:"border bg-gray-50 flex flex-col rounded-lg transition-all duration-200 ease-linear relative ".concat(v?"w-16 min-w-[64px] shrink":"w-full min-w-[229px]"," ").concat(A," "),children:[(0,n.jsx)("div",{role:"none",onClick:()=>(e=>{if(!_.includes(e))return;let l=u.includes(e);[...u];x(l?u.filter(l=>l!==e):[...u,e])})(e.type),className:"p-2 transition-none ".concat(e.themeColor.headerBG," rounded-t-md md:sticky top-0 lg:top-14 z-[1] select-none"),children:(0,n.jsxs)("div",{className:"flex justify-start items-center ".concat(e.themeColor.headerText),children:[(0,n.jsx)("div",{className:v?"mx-auto":"",children:e.icon}),(0,n.jsxs)("div",{className:"flex items-center transition-all duration-200 ease-linear justify-between ".concat(v?"w-0 h-0 opacity-0":" opacity-100 w-full"),children:[(0,n.jsxs)(b.default.SemiBoldText,{xs:!0,textColor:e.themeColor.headerText,className:"tracking-wider ml-2 uppercase whitespace-nowrap",children:[e.title," ",(0,n.jsx)(b.default.Dot,{})," ",g]}),_.includes(e.type)&&!v?(0,n.jsx)("span",{children:(0,n.jsx)(y.ReduceIcon,{size:16})}):null]})]})}),(0,n.jsxs)("ul",{id:e.type,className:"my-2 h-full px-2 ",children:[null==f?void 0:f.map((l,t)=>{let r=f.length-2===t;return(null==l?void 0:l.id)||(null==l?void 0:l.isExternalApplicant)?(0,n.jsx)("li",{id:l.id,"data-type":e.type,className:"mb-2",children:(0,n.jsx)(S.A,{isLast:r,fetchNew:()=>{j&&a({allTypes:!1})},children:(0,n.jsx)(E.A,{user:l,sectionType:e.type,isCollapsedSection:v,openModal:()=>d({...l,dragEvent:{toColumn:null,fromColumn:e.type,applicantID:l.id,oldIndex:t,newIndex:0}})})})},l.id):null}),(0,n.jsx)(F,{isLoading:null==l?void 0:l[e.type],isCollapsedSection:v,canAccessMatched:i,hideLoader:e.type===k&&!i}),e.type!==k||i?null:(0,n.jsx)(H,{isCollapsedSection:v,totalCount:null==t||null==(p=t[e.type])?void 0:p.totalCount}),e.type===L&&(null==t?void 0:t.hiddenApplicantsCount)>
10?(0,n.jsx)(w.A.IconTextWithPlansApply,{title:"This job has ".concat(null==t?void 0:t.hiddenApplicantsCount," more applicants"),buttonText:"Peerlist Pro",description:"Please upgrade to view remaining candidates!",isCompany:!0}):null,l[e.type]||e.type!==L||g?null:(0,n.jsx)(M,{candidates:t,triggerShareModal:o})]},g)]},e.type)})})})},M=e=>{let{candidates:l,triggerShareModal:t}=e;return(0,r.useCallback)(()=>{let e=[];return Object.entries(l||{}).forEach(l=>{let[t,n]=l;t!==k&&e.push(...(null==n?void 0:n.users)||[])}),!(null==e?void 0:e.length)},[l])()?(0,n.jsxs)("div",{children:[(0,n.jsx)(T.A.EmptyState,{title:"Applications will appear here.",description:"You can increase the applicant rate by sharing it on various platforms and within your team.",icon:(0,n.jsx)(y.CheckRoundedIcon,{size:30,color:P().green.bright,checkColor:P().green.bright,background:P().white.DEFAULT})}),(0,n.jsx)(C.Ay.Carbon,{small:!0,onClick:t,className:"mx-auto",iconLeft:(0,n.jsx)(y.ShareIcon,{size:16}),children:"Share"})]}):(0,n.jsx)(T.A.EmptyState,{title:"You're all caught up!",description:"You've responded to all applicants. Kudos!",icon:(0,n.jsx)(y.CheckRoundedIcon,{size:30,color:P().green.bright,checkColor:P().green.bright,background:P().white.DEFAULT})})},F=e=>
1{let{isLoading:l,isCollapsedSection:t,hideLoader:r}=e;if(!l||r)return null;let s=[,,,,,].fill(null);return l&&t?(0,n.jsx)("div",{className:"mx-auto animate-pulse",children:s.map((e,l)=>(0,n.jsx)("div",{className:"border border-primaryBorder rounded-lg bg-gray-00 flex justify-center mb-2",children:(0,n.jsx)(N.H8,{})},"user-".concat(+l)))}):(0,n.jsx)("div",{className:"p-4",children:s.map((e,l)=>(0,n.jsx)(A.A.UserProfileCardSkeleton,{},"user-".concat(+l)))})},H=e=>{let{isCollapsedSection:l,totalCount:t=0}=e,[s,a]=(0,r.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[l?(0,n.jsx)(C.Ay.Primary,{circular:!0,className:"mx-auto",onClick:()=>a(!0),children:(0,n.jsx)(y.SparkIcon,{})}):(0,n.jsx)(w.A.IconTextWithPlansApply,{title:t>0?(0,n.jsxs)(b.default.SemiBoldText,{sm:!0,className:"mb-0.5",children:["Unlock ",t," matches!"]}):null,buttonText:"Peerlist Pro",description:"A list of the best matching candidates every time you post a job!",isCompany:!0}),s&&(0,n.jsx)(w.A.HirePlusModal,{showModal:s,setShowModal:a})]})};var U=t(95726),z=t(57825),J=t(68580),Y=t(16416),G=t(1492),q=t(79848),W=t(4755),Q=t(48230),X=t.n(Q),V=t(16495),K=t(11520),Z=t(77e3),$=t(1245),ee=t(69963),el=t(56998),et=t(63801),en=t(58385),er=t(11023);let{MATCHED:es,SHORTLISTED:ea,APPLIED:ei,REJECTED:eo}=x.A,ed={[ei]:[ea,eo],[ea]:[eo,ei],[eo]:[ea,ei],[es]:[ea,eo]},ec={[ei]:(0,n.jsx)(C.Ay.Carbon,{iconLeft:(0,n.jsx)(y.CheckIcon,{size:16}),iconRight:(0,n.jsx)(y.ChevronDownIcon,{size:16}),children:"Applied"}),[ea]:(0,n.jsx)(C.Ay.Primary,{iconLeft:(0,n.jsx)(y.CheckRoundedIcon,{size:16,color:P().white.DEFAULT}),iconRight:(0,n.jsx)(y.ChevronDownIcon,{size:16}),children:"Shortlisted"}),[eo]:(0,n.jsx)(C.Ay.Red,{iconLeft:(0,n.jsx)(y.CircleMinusIcon,{size:16}),iconRight:(0,n.jsx)(y.ChevronDownIcon,{size:16}),children:"Rejected"}),[es]:(0,n.jsx)(C.Ay.Blue,{iconLeft:(0,n.jsx)(y.SparksIcon,{size:16}),iconRight:(0,n.jsx)(y.ChevronDownIcon,{size:16}),children:"Matched"})},eu={[ei]:{icon:(0,n.jsx)(y.ReplyIcon,{}),title:"Move back to Applied",subTitle:"Candidate will be moved back to Applied."},[ea]:{icon:(0,n.jsx)(y.CheckRoundedIcon,{size:24,color:P().green.bright,background:P().white.DEFAULT}),title:"Shortlist",subTitle:"Move them to the next step."},[eo]:{icon:(0,n.jsx)("span",{className:"text-red",children:(0,n.jsx)(y.CircleMinusIcon,{})}),title:"Reject",subTitle:"You can notify the candidate via email."}},ex=e=>{var l;let{candidate:t,disableButtons:s=!1,handleApplicantProfileAction:a}=e,i=(null==t||null==(l=t.dragEvent)?void 0:l.fromColumn)||null;if(!i)return null;let o=ed[i],d=r.cloneElement(ec[i],{disabled:s});return(0,n.jsx)(er.A,{position:"right",width:"w-80",dropdownButton:d,disabledDropdown:s,children:o.map(e=>{let l=eu[e],r=l.subTitle||"";return(t.type===es&&e===eo&&(r="The candidate will be moved to Rejected."),t.type===es&&e===ei)?null:(0,n.jsx)(er.e.Item,{onClick:()=>(e=>{let l={...t.dragEvent};l.toColumn=e,a({dragEvent:l,userInfo:t})})(e),children:(0,n.jsxs)("div",{className:"flex items-center gap-x-2 ",children:[l.icon,(0,n.jsxs)("div",{children:[(0,n.jsx)(b.default.SemiBoldText,{sm:!0,children:l.title}),(0,n.jsx)(b.default.NormalText,{xs:!0,children:r})]})]})},e)})})};var em=t(5357),eh=t(916),ep=t(86871),ev=t(90828),ej=t(65777),ef=t(28857),eg=t(76095),ey=t(78063);let eb=e=>{let{type:l}=e;switch(l){case Y.A.APPLICANT_ACTIVITY_TYPE.SHORTLISTED:return(0,n.jsx)(b.default.SemiBoldText,{textColor:"text-green",xxs:!0,children:"Shortlisted"});case Y.A.APPLICANT_ACTIVITY_TYPE.APPLIED:return(0,n.jsx)(b.default.SemiBoldText,{textColor:"text-green",xxs:!0,children:"Applied"});case Y.A.APPLICANT_ACTIVITY_TYPE.REJECTED:return(0,n.jsx)(b.default.SemiBoldText,{textColor:"text-red",xxs:!0,children:"Rejected"});case Y.A.APPLICANT_ACTIVITY_TYPE.REMOVED_LIST:return(0,n.jsx)(b.default.SemiBoldText,{textColor:"text-gray",xxs:!0,children:"Moved back to Applied"});default:return(0,n.jsx)(b.default.SemiBoldText,{xxs:!0,children:"Note Added"})}},eA=e=>{let{note:l}=e,t=(0,v.timeSince)(null==l?void 0:l.createdAt);return(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(eb,{type:null==l?void 0:l.type}),(0,n.jsxs)(b.default.NormalText,{textColor:"text-gray-500",xxs:!0,children:[(0,n.jsx)(b.default.Dot,{})," ",t," ","now"===t?"":"ago"]})]})},eN=e=>{let{note:l}=e,t=null==l?void 0:l.createdBy;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 ",children:[(null==t?void 0:t.profileHandle)&&(null==t?void 0:t.profilePicture)?(0,n.jsx)(X(),{href:V.APP_PATHS.userProfile({profileHandle:null==t?void 0:t.profileHandle}),children:(0,n.jsx)(W.Ay.Smaller,{image:(null==t?void 0:t.profilePicture)||V.CDNImage.emptyUserDP,alt:"".concat(null==t?void 0:t.firstName," ").concat(null==t?void 0:t.lastName)})}):(0,n.jsx)(eh.A.Smaller,{firstName:null==t?void 0:t.firstName,lastName:null==t?void 0:t.lastName}),(0,n.jsxs)("div",{children:[(0,n.jsx)(X(),{href:V.APP_PATHS.userProfile({profileHandle:null==t?void 0:t.profileHandle}),children:(0,n.jsxs)(b.default.SemiBoldText,{xs:!0,children:[null==t?void 0:t.firstName," ",null==t?void 0:t.lastName]})}),(0,n.jsx)(eA,{note:l})]})]}),(null==l?void 0:l.note)?(0,n.jsx)("div",{className:"ml-10 mt-1",children:(0,n.jsx)(ef.f,{wrapperId:null==l?void 0:l.id,children:(0,n.jsx)(ey.default,{id:"hiring-note",html:null==l?void 0:l.note,className:"text-gray-1k text-sm","aria-label":"Hiring notes"})})}):null]})},eS=e=>{var l,t,s;let{jobId:a,userId:i,hiringApplicantId:o,isArchived:d,hideTitle:c=!1}=e,x=(0,f.A)(V.PERMISSIONS_LIST.MANAGE_HIRING_ACTIVITY_NOTE),[m,h]=(0,r.useState)({}),p=(0,r.useRef)(),v=(0,r.useRef)(),j=(0,eg.A)(),[g,A]=(0,r.useState)(!1),[N,S]=(0,r.useState)(!1),E=async()=>{try{if(S(!0),!m.notes||m.cursor){var e,l,t,n,r,s,d;let c="limit=10&jobId=".concat(a);
1(null==m?void 0:m.cursor)&&(c+="&cursor=".concat(null==m?void 0:m.cursor)),i&&(c+="&applicantId=".concat(i)),o&&(c+="&hiringId=".concat(o));let x=await u.vS.getHiringNotes(c),p=[...(null==m?void 0:m.notes)||[]];null==x||null==(t=x.data)||null==(l=t.data)||null==(e=l.notes)||e.forEach(e=>p.unshift(e));let v={notes:p,totalCount:(null==x||null==(r=x.data)||null==(n=r.data)?void 0:n.totalCount)||0,cursor:(null==x||null==(d=x.data)||null==(s=d.data)?void 0:s.cursor)||null};h(v)}}catch(e){}finally{setTimeout(()=>S(!1),200)}};(0,r.useEffect)(()=>{E()},[]);let I=async e=>{if(x)try{var l,t,n,r;A(!0);let s=await u.vS.addNotes({jobId:a,note:e,applicantId:i,hiringId:o});if(null==s||null==(l=s.data)?void 0:l.success){let l={createdBy:j,note:e,createdAt:new Date().toISOString(),id:null==s||null==(t=s.data)?void 0:t.id};null==m||null==(n=m.notes)||n.push(l);let a={notes:[...(null==m?void 0:m.notes)||[]],totalCount:null==m?void 0:m.totalCount,cursor:null==m?void 0:m.cursor};h(a),null==p||null==(r=p.current)||r.clearContent()}}catch(e){}finally{A(!1),(()=>{var e;null==v||null==(e=v.current)||e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})})()}};return(0,n.jsxs)("div",{className:"h-full flex flex-col justify-between",children:[(0,n.jsxs)("div",{className:"h-[calc(100%-80px)]",children:[(0,n.jsxs)("div",{className:"px-6 py-4 flex items-center justify-between",children:[c?null:(0,n.jsx)(b.default.SemiBoldText,{sm:!0,children:"Timeline"})," ",(null==m?void 0:m.cursor)?(0,n.jsxs)("button",{type:"button",disabled:N,onClick:E,className:"flex items-center font-semibold text-xs text-gray-500 gap-x-1 transition-all hover:underline hover:text-gray-1k",children:[(0,n.jsx)("span",{className:N?"animate-spin":"",children:(0,n.jsx)(y.ReloadIcon,{size:14})}),"Load Previous"]}):null]}),(0,n.jsxs)("div",{className:"w-full overflow-y-auto px-6 h-[calc(100%-52px)]",children:[!N||(null==m||null==(l=m.notes)?void 0:l.length)?null==m||null==(t=m.notes)?void 0:t.map(e=>(0,n.jsx)("div",{className:"py-2 relative",children:(0,n.jsx)(eN,{note:e})},e.id)):(0,n.jsx)(eE,{}),N||(null==m||null==(s=m.notes)?void 0:s.length)?null:(0,n.jsx)(T.A.EmptyState,{icon:(0,n.jsx)(en.A.EmptyComments,{}),title:"Nothing Here Yet.",description:"Add some notes to keep track of your thoughts and candidate interactions."}),(0,n.jsx)("div",{ref:v})]})]}),(0,n.jsxs)("div",{className:"px-6 bg-gray-100 sticky h-20 flex flex-col justify-center",children:[d?null:(0,n.jsx)(ej.A,{smallerSize:!0,autofocusArea:!1,postComment:I,loading:g,ref:p,editable:x,showEmojiPicker:!1,placeholder:"Add a note. @mention recruiters.",customActionButton:C.Ay.Carbon,companyAdminsOnly:!0}),x?null:(0,n.jsx)("div",{className:"mt-1",children:(0,n.jsx)(w.A.UpgradeText,{text:"Upgrade to Peerlist Pro to hire collaboratively.",hideInfoIcon:!0})})]})]})},eE=()=>(0,n.jsx)("div",{children:Array(6).fill(null).map((e,l)=>(0,n.jsxs)("div",{className:"mb-4 animate-pulse",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{className:"w-10 h-10 bg-gray-00 rounded-full"}),(0,n.jsx)("div",{className:"h-5 bg-gray-00 rounded w-36 mb-1"})]}),(0,n.jsxs)("div",{className:"ml-12",children:[(0,n.jsx)("div",{className:"h-3 bg-gray-00 rounded w-56 mb-1"}),(0,n.jsx)("div",{className:"h-3 bg-gray-00 rounded w-20"})]})]},"dummy-".concat(2*l)))});var eT=t(18447);let eC=e=>{let{question:l,answer:t,isLink:r=!1,elementType:s}=e,a=s===eT.xO.LONG_TEXT,i=r&&v.default.validateURL(t||"");return(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(b.default.MediumText,{sm:!0,textColor:"text-gray-400",children:"Q."}),(0,n.jsx)(b.default.MediumText,{sm:!0,textColor:"text-gray-400",children:l})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(b.default.NormalText,{sm:!0,children:"A."}),a?(0,n.jsx)(ey.default,{html:t,allowEmptyTags:!0,className:"text-sm font-normal",id:"markdown"}):(0,n.jsx)(b.default.NormalText,{as:i?X():"p",href:i?(0,v.urlFormatter)(t):t,target:"_blank",rel:"nofollow noreferrer",sm:!0,className:"".concat(i?"underline":""),children:t})]})]})},ew=()=>(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("span",{children:(0,n.jsx)(y.SparkIcon,{})}),(0,n.jsx)(b.default.SemiBoldText,{sm:!0,children:"Profile Highlights"})]}),(0,n.jsx)(b.default.MutedText,{xs:!0,children:"Summary is only available for candidates that apply with a Peerlist profile."})]}),eI=e=>{var l,t,s,a,i,o,d,h,p;let{job:j,candidate:f,setShowModal:g,canAccessMatched:A,handleApplicantProfileAction:N,onNext:S=()=>{}}=e,[E,w]=(0,r.useState)(null),I=(0,r.useCallback)(null==j||null==(t=j.applicationForm)||null==(l=t.questions)?void 0:l.reduce((e,l)=>({...e,[l.id]:l}),{}),[j]),P=[{label:V.TABS_NAME.RESUME,link:V.TABS_NAME.RESUME},{label:V.TABS_NAME.WORK,link:V.TABS_NAME.WORK,hide:v.default.isWorkHidden(E)},{label:Y.A.APPLICANT_BOARD_TAB.SCREENING_QUESTIONS,link:Y.A.APPLICANT_BOARD_TAB.SCREENING_QUESTIONS,hide:!(null==f||null==(s=f.answers
1)?void 0:s.length)&&!(null==f||null==(a=f.socialLinks)?void 0:a.filter(e=>{var l;return!(null==e||null==(l=e.iconId)?void 0:l.length)}))}],[k,R]=(0,r.useState)(!0),[L,B]=(0,r.useState)(!1),[O,_]=(0,r.useState)(!1),[D,M]=(0,r.useState)(!1),[F,H]=(0,r.useState)(V.TABS_NAME.RESUME),[U,z]=(0,r.useState)(""),J=async()=>{var e,l,t,n,r;try{if(null==f?void 0:f.profileHandle){let t=await u.Eo.getProfile({profileHandle:null==f?void 0:f.profileHandle,params:"?type=job"});w((null==t||null==(l=t.data)||null==(e=l.data)?void 0:e.profile)||null)}}catch(e){B((null==e||null==(r=e.response)||null==(n=r.data)||null==(t=n.error)?void 0:t.message)||c.A.GLOBAL.serverError)}finally{R(!1)}},q=async()=>{var e,l,t,n,r;try{if(null==f?void 0:f.resumeURL){R(!0);let t=await u.DX.getReadExternalSignedUrl({fullPath:null==f?void 0:f.resumeURL});z((null==t||null==(l=t.data)||null==(e=l.data)?void 0:e.url)||null)}}catch(e){B((null==e||null==(r=e.response)||null==(n=r.data)||null==(t=n.error)?void 0:t.message)||c.A.GLOBAL.serverError)}finally{R(!1)}};(0,r.useEffect)(()=>{E||J(),(null==f?void 0:f.isExternalApplicant)&&(null==f?void 0:f.resumeURL)&&q()},[]);let Q=()=>{g(null),w(null),B(!1)},X=null,ee=null;(null==f||null==(i=f.experience)?void 0:i.length)&&(X=null==f||null==(p=f.experience)?void 0:p.find(e=>e.current),ee=(0,v.calculateExperience)(null==f?void 0:f.experience)),f.isExternalApplicant&&(null==f?void 0:f.experienceYears)&&(ee={totalExperience:"".concat(null==f?void 0:f.experienceYears,"y")});let el=(null==X?void 0:X.location)?v.default.convertLocationObjectToString(X.location):null,et=V.APP_PATHS.userProfile({profileHandle:f.profileHandle}),er=(0,r.useCallback)(e=>{(null==e?void 0:e.key)==="Escape"&&f&&Q()},[g,f]);(0,r.useEffect)(()=>{var e;return null==(e=document)||e.addEventListener("keydown",er),()=>{var e;null==(e=document)||e.removeEventListener("keydown",er)}},[f]);let es=(0,r.useMemo)(()=>{let e=!!(null==j?void 0:j.archivedAt)||f.type===x.A.MATCHED&&!A;return(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[f.isExternalApplicant?null:(0,n.jsx)(C.Ay.CarbonOutline,{as:"a",target:"_blank",rel:"noreferrer",href:V.APP_PATHS.inboxWithHandle({profileHandle:f.profileHandle}),circular:!0,children:(0,n.jsx)(y.ChatBubbleIcon,{size:20})}),(0,n.jsx)(ex,{candidate:f,disableButtons:e,handleApplicantProfileAction:N})]})},[f]);return(0,n.jsx)(K.A,{portalId:"candidate-details",children:(0,n.jsxs)("section",{"aria-hidden":!0,style:{zIndex:61},className:"modal-background-overlay w-full h-full bg-gray-1k/80 dark:bg-gray-400/20 fixed inset-0 flex items-center justify-center",onClick:Q,children:[(0,n.jsxs)("div",{role:"dialog","aria-modal":!0,onClick:e=>e.stopPropagation(),className:"w-[999px] relative h-[calc(100%-100px)] bg-gray-00 rounded-lg flex flex-col justify-between overflow-hidden modal-scale-in-content",children:[(0,n.jsxs)("div",{className:"border-b border-primaryBorder px-6 py-3 flex items-center justify-between",children:[(0,n.jsx)(b.default.SemiBoldText,{children:j.jobTitle}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"absolute right-20 top-4 block md:hidden z-10",children:(0,n.jsx)(C.Ay.CarbonOutline,{small:!0,onClick:()=>_(e=>!e),iconLeft:O?(0,n.jsx)(y.SidebarCollapseIcon,{size:14}):(0,n.jsx)(y.SidebarExpandIcon,{size:14}),children:"Highlights"})}),(0,n.jsx)(C.Ay.CarbonOutline,{circular:!0,onClick:Q,children:(0,n.jsx)(y.CloseXIcon,{size:20})})]})]}),(0,n.jsxs)("div",{className:"w-full h-full md:w-[640px] bg-gray-00 relative",children:[(0,n.jsxs)("div",{className:"p-6 border-b border-primaryBorder",children:[(0,n.jsxs)("div",{className:"flex sm:items-center sm:flex-row flex-col w-full mb-4 gap-4",children:[(0,n.jsxs)("div",{className:"flex sm:justify-start items-center justify-between",children:[(null==f?void 0:f.isExternalApplicant)?(0,n.jsx)(eh.A.Small,{firstName:f.firstName,lastName:f.lastName}):(0,n.jsx)("a",{href:et,target:"_blank",rel:"noreferrer","aria-label":"Open Peerlist profile",children:(0,n.jsx)(W.Ay.Small,{image:null==f?void 0:f.profilePicture})}),(0,n.jsx)("div",{className:"block sm:hidden",children:es})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,n.jsx)("a",{href:et,target:"_blank",rel:"noreferrer",className:"hover:underline transition-all ease-in-out",children:(0,n.jsxs)(b.default.SemiBoldText,{children:[f.firstName," ",f.lastName]})}),(null==f?void 0:f.matched)||(null==f?void 0:f.type)===x.A.MATCHED?(0,n.jsx)(em.A.GreenWithIcon,{children:"Matched"}):(0,n.jsx)(G.A.AppliedDate,{appliedDate:null==f?void 0:f.createdAt,sectionType:f.dragEvent.fromColumn})]}),X?(0,n.jsxs)(b.default.NormalText,{xs:!0,children:[null==X?void 0:X.title," ",(null==X?void 0:X.companyName)?(0,n.jsxs)("span",{children:["at ",null==X?void 0:X.companyName]}):null,el?(0,n.jsxs)("span",{children:[(0,n.jsx)(b.default.Dot,{})," ",el]}):null]}):(0,n.jsx)(b.default.NormalText,{xs:!0,children:f.headline})]}),(0,n.jsx)("div",{className:"sm:block hidden",children:es})]})]}),(0,n.jsxs)("div",{className:"pl-0 sm:pl-14 grid grid-cols-2 gap-y-2 mob:flex items-center gap-x-6",children:[(0,n.jsx)(G.A.TableCol,{header:"Experience",children:(null==ee?void 0:ee.totalExperience)?(0,n.jsx)("span",{children:null==ee||null==(d=ee.totalExperience)||null==(o=d.replace(/ years| year/gi,"y"))?void 0:o.replace(/ months| month/gi,"m")}):"Fresher"}),(0,n.jsx)(G.A.TableCol,{header:"Holding offer?",children:(0,n.jsx)(G.A.JobPreferance,{jobPreference:(null==f?void 0:f.jobPreferences)||null})}),(0,n.jsx)(G.A.TableCol,{header:"Notice Period",className:"",children:(()=>{var e,l,t,n;return(null==f||null==(e=f.jobPreferences)?void 0:e.immediateJoining)||(null==f||null==(l=f.jobPreferences)?void 0:l.joinAfterDays)===eT.pw?eT.pw:(null==f||null==(t=f.jobPreferences)?void 0:t.joinAfterDays)?"".concat(null==f||null==(n=f.jobPreferences)?void 0:n.joinAfterDays," days"):"-"})()}),(null==f?void 0:f.type)===x.A.MATCHED?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(G.A.TableCol,{header:"Contact",children:(0,n.jsx)("div",{className:"font-medium text-xs flex items-left md:flex-row flex-col md:flex-wrap",children:(null==f?void 0:f.email)||(null==f?void 0:f.mobile)?(0,n.jsxs)(n.Fragment,{children:[(null==f?void 0:f.email)?(0,n.jsxs)("span",{className:"mr-1 group hover:underline cursor-copy flex break-word items-center ",role:"none","data-tip":"","data-effect":"solid","data-for":"contact-info",onClick:async()=>{await navigator.clipboard.writeText(null==f?void 0:f.email),m.A.SuccessToast("Copied successfully!")},children:[(0,n.jsx)("span",{className:"mr-1 flex-shrink-0",children:(0,n.jsx)(y.CopyIcon,{size:14})}),null==f?void 0:f.email]}):null,(null==f?void 0:f.mobile)?(0,n.jsxs)("span",{className:"hover:underline cursor-copy flex items-center max-w-max",role:"none","data-tip":"","data-effect":"solid","data-for":"contact-info",onClick:async()=>{await navigator.clipboard.writeText(null==f?void 0:f.mobile),m.A.SuccessToast("Copied successfully!")},children:[(0,n.jsx)("span",{className:"mr-1",children:(0,n.jsx)(y.CopyIcon,{size:14})}),null==f?void 0:f.mobile]}):null]}):"-"})}),(0,n.jsx)($.A,{id:"contact-info",text:"Copy to clipboard",textId:"copy-text-action"})]})]})]}),(0,n.jsx)("div",{className:"h-[calc(100%-195px)]",children:(0,n.jsx)("div",{className:"flex w-full h-full",children:(null==f?void 0:f.isExternalApplicant)?(0,n.jsxs)("main",{className:"pl-2 pb-2 overflow-y-auto w-full",children:[(0,n.jsx)("div",{className:"sticky top-0 bg-gray-00 z-[7]",children:(0,n.jsx)("div",{className:"relative flex items-center",children:(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(Z.A,{navTabs:P.filter(e=>!e.hide),className:"ml-0 w-full",currentNavTab:F,onClick:e=>H(e.link)})})})}),k?(0,n.jsx)(eL,{}):null,(0,n.jsx)("div",{className:"p-6 h-full",children:(0,n.jsx)(ek,{candidate:f,currentNavTab:F,resumePDFURL:U,socialLinks:(()=>{var e,l;let t={};return(null==f?void 0:f.socialLinks)instanceof Array&&(null==f||null==(e=f.socialLinks)?void 0:e.length)>
10?null==f||null==(l=f.socialLinks)||l.forEach(e=>{var l;if(!(null==e||null==(l=e.iconId)?void 0:l.length)){t[e.title]=e.username;return}e.url?t[e.iconId]=(0,v.urlFormatter)("".concat(e.url).concat(e.username||"")):t[e.title]=(0,v.urlFormatter)("".concat(e.username||""))}):t=null==f?void 0:f.socialLinks,t})(),questions:I})})]}):(0,n.jsxs)("main",{className:"w-full",children:[(0,n.jsx)("div",{className:"sticky top-0 bg-gray-00 z-[7]",children:(0,n.jsx)("div",{className:"relative flex items-center",children:(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(Z.A,{navTabs:P.filter(e=>!e.hide),className:"ml-0 w-full",currentNavTab:F,onClick:e=>H(e.link)})})})}),L?(0,n.jsx)("div",{className:"my-10",children:(0,n.jsx)(T.A.EmptyState,{icon:(0,n.jsx)(en.A.EmptySearch,{}),title:"Something went wrong!",description:L})}):(0,n.jsx)("div",{className:"overflow-y-auto h-[calc(100%-40px)]",children:!k&&E?(0,n.jsx)("div",{className:"p-6",children:(0,n.jsx)(eP,{profile:E,currentNavTab:F,questions:I,answers:null==f?void 0:f.answers,customSocialLinks:null==f||null==(h=f.socialLinks)?void 0:h.filter(e=>{var l;return!(null==e||null==(l=e.iconId)?void 0:l.length)})})}):(0,n.jsx)(eL,{})})]})})})]}),(0,n.jsx)("aside",{className:" z-10 h-full top-14 overflow-y-auto pb-40 bg-gray-50 border-l border-t border-primaryBorder transition-all duration-200 max-w-[358px] right-0 absolute md:w-full ".concat(O?"w-[358px] ":"w-0"),children:(0,n.jsx)("div",{className:"m-6 overflow-y-auto",children:(null==f?void 0:f.isExternalApplicant)?(0,n.jsx)(ew,{}):(0,n.jsx)(ev.A,{profileHandle:null==f?void 0:f.profileHandle,score:null==f?void 0:f.normalizedScore,noBg:!0})})}),(0,n.jsxs)("aside",{className:" z-10 bottom-0 bg-gray-00 border-l border-t border-primaryBorder transition-all duration-700 max-w-[358px] right-0 absolute md:w-full ".concat(D?"h-[calc(80%)] ":""),children:[(0,n.jsxs)("button",{type:"button",className:" cursor-pointer w-full flex items-center justify-between px-6 py-4 bg-gray-00 sticky-top z-10 border-b border-primaryBorder",onClick:()=>M(!D),children:[(0,n.jsx)(b.default.SemiBoldText,{sm:!0,children:"Activity & Notes"}),D?(0,n.jsx)(y.ChevronDownIcon,{size:20}):(0,n.jsx)(y.ChevronUpIcon,{size:20})]}),(0,n.jsx)("div",{className:"h-[calc(100%-52px)]",children:D?(0,n.jsx)(eS,{jobId:j.jobId,userId:f.id,hiringApplicantId:null==f?void 0:f.hiringId,isArchived:!!(null==j?void 0:j.archivedAt),hideTitle:!0}):null})]})]}),(0,n.jsx)("div",{className:"absolute right-4 top-2/4",children:(0,n.jsx)(C.Ay.CarbonOutline,{circular:!0,onClick:()=>{Q(),S(f)},children:(0,n.jsx)(y.ArrowRightIcon,{size:20})})})]})})},eP=e=>{let{profile:l,currentNavTab:t,questions:r,answers:s,customSocialLinks:a=[]}=e;if(t===V.TABS_NAME.RESUME){var i;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(b.default.SemiBoldText,{children:"Skills"}),(0,n.jsx)("div",{className:"flex items-center flex-wrap gap-2 my-6",children:null==l||null==(i=l.skills)?void 0:i.map((e,l)=>(0,n.jsx)(ee.A.Skills,{skill:e},"".concat(e.name,"-").concat(l+1)))})]}),(0,n.jsx)(el.A,{data:l})]})}return t===V.TABS_NAME.WORK?(0,n.jsx)(et.A,{data:l,openProjectInNewTab:!0}):t===Y.A.APPLICANT_BOARD_TAB.SCREENING_QUESTIONS?(0,n.jsx)(eR,{answers:s,questions:r,customSocialLinks:a}):null},ek=e=>{let{candidate:l,currentNavTab:t,resumePDFURL:s,socialLinks:a,questions:i}=e,[o,d]=(0,r.useState)(!1),c=()=>{d(!!document.fullscreenElement)};(0,r.useEffect)(()=>(document.addEventListener("fullscreenchange",c),()=>{document.removeEventListener("fullscreenchange",c)}),[]);let u=null==l?void 0:l.answers;if(t===V.TABS_NAME.RESUME)return s?(0,n.jsxs)("div",{className:"flex flex-col justify-between h-full w-full",children:[(0,n.jsxs)("div",{id:"resumeEmbed",className:"w-full h-full relative",children:[(0,n.jsx)("embed",{src:s,width:"100%",height:"100%",alt:"pdf"}),(0,n.jsx)(C.Ay.CarbonOutline,{circular:!0,className:"absolute bottom-4 right-4 shadow-editorHover",onClick:()=>{let e=document.getElementById("resumeEmbed");o?document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},children:o?(0,n.jsx)(y.ReduceIcon,{size:18}):(0,n.jsx)(y.EnlargeIcon,{size:18})})]}),(0,n.jsx)("div",{className:"mt-6 h-10",children:(0,n.jsx)(ep.A,{user:{...l,socialLinks:a}})})]}):(0,n.jsx)("div",{className:"my-10",children:(0,n.jsx)(T.A.EmptyState,{icon:(0,n.jsx)(en.A.EmptySearch,{}),title:"Resume not found!"})});if(t===Y.A.APPLICANT_BOARD_TAB.SCREENING_QUESTIONS){var x;return(0,n.jsx)(eR,{answers:u,questions:i,customSocialLinks:null==l||null==(x=l.socialLinks)?void 0:x.filter(e=>{var l;return!(null==e||null==(l=e.iconId)?void 0:l.length)})})}return null},eR=e=>{let{answers:l,questions:t,customSocialLinks:r=[]}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-8 pb-10",children:[[...l].sort((e,l)=>e.order-l.order).map(e=>{var l,r;let s=null==t?void 0:t[e.questionId],a=(null==e?void 0:e.elementType)===eT.xO.URL,i=v.default.isString(null==e?void 0:e.value)?e.value:null==(r=e.value)||null==(l=r.map(e=>(null==e?void 0:e.label)?e.label:e))?void 0:l.join(", ");return s&&(null==e?void 0:e.value)?(0,n.jsx)(eC,{question:s.title,answer:i,elementType:null==e?void 0:e.elementType,isLink:a}):null}),null==r?void 0:r.map(e=>(0,n.jsx)(eC,{question:e.title,answer:e.username,isLink:!0}))]})},eL=()=>(0,n.jsxs)("div",{className:"p-6 animate-pulse flex flex-col gap-10",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"w-20 h-5 bg-gray-100 rounded"}),(0,n.jsx)("div",{className:"my-6 flex items-center flex-wrap gap-2",children:Array(8).fill(null).map((e,l)=>(0,n.jsx)("div",{className:"h-5 w-16 bg-gray-100 rounded"},"item-".concat(l+1)))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"w-20 h-5 bg-gray-100 rounded mb-6"}),(0,n.jsx)("div",{className:"flex flex-col gap-6",children:Array(6).fill(null).map((e,l)=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("div",{className:"h-6 w-6 bg-gray-100 rounded-full"}),(0,n.jsx)("div",{className:"w-36 h-6 bg-gray-100 rounded"})]}),(0,n.jsxs)("div",{className:"mt-3",children:[(0,n.jsx)("div",{className:"w-96 h-4 bg-gray-100 ml-10 rounded-sm mb-2"}),(0,n.jsx)("div",{className:"w-56 h-3 bg-gray-100 ml-10 rounded-sm"})]})]},"dummy-item-".concat(2*l)))})]})]});var eB=t(72723),eO=t(69198);let{MATCHED:e_,SHORTLISTED:eD,APPLIED:eM,REJECTED:eF}=x.A,eH=e=>[{userId:e.userId||e.id,hiringId:e.hiringId}],eU=(0,d.A)((0,J.A)(()=>{var e,l,t,s,d,g,A,N,S;let E=(0,i.useRouter)(),[T,w]=(0,r.useState)(null),{company:I}=(0,o.useSelector)(e=>e.Company),P=(0,f.A)(V.PERMISSIONS_LIST.MATCHED_CANDIDATES,!0),[k,R]=(0,r.useState)(null),[L,B]=(0,r.useState)(""),[O,_]=(0,r.useState)(!1),[M,F]=(0,r.useState)(null),[H,J]=(0,r.useState)(!1),[Q,X]=(0,r.useState)(!1),[K,Z]=(0,r.useState)(!0),[$,ee]=(0,r.useState)(!1),[el,et]=(0,r.useState)(""),[en,er]=(0,r.useState)(null),[es,ea]=(0,r.useState)(!1),ei=V.APP_PATHS.getJobURL({companyName:null==T||null==(e=T.company)?void 0:e.name,companyProfileHandle:null==T||null==(l=T.company)?void 0:l.profileHandle,jobTitle:null==T?void 0:T.jobTitle,jobId:null==T?void 0:T.jobId}),eo=async e=>{let{userInfo:l,unlistFrom:t}=e,n=eH(l);try{let e={jobId:null==T?void 0:T.jobId,shortlists:n};return await u.vS.addToShortlist(e,"?".concat(t===e_?"matched=true":"")),!0}catch(e){var r,s,a;return m.A.ErrorToast((null==e||null==(a=e.response)||null==(s=a.data)||null==(r=s.error)?void 0:r.message)||c.A.GLOBAL.wrong),!1}},ed=async e=>{let{applicantData:l,unlistFrom:t}=e,n=eH(l);try{let e={rejects:n,jobId:null==T?void 0:T.jobId,emailData:{subject:l.emailSubject,body:l.emailBody}};return await u.vS.addToRejectList(e,"?".concat(t===e_?"matched=true":"")),F(null),!0}catch(e){var r,s,a;return m.A.ErrorToast((null==e||null==(a=e.response)||null==(s=a.data)||null==(r=s.error)?void 0:r.message)||c.A.GLOBAL.wrong),!1}},ec=async e=>{let{userInfo:l,unlistFrom:t}=e,n=eH(l),r={jobId:null==T?void 0:T.jobId};try{return t===eD&&(r.shortlists=n,await u.vS.addToShortlist(r,"?remove=".concat(!0))),t===eF&&(r.rejects=n,await u.vS.addToRejectList(r,"?remove=".concat(!0))),!0}catch(e){var s,a,i;return m.A.ErrorToast((null==e||null==(i=e.response)||null==(a=i.data)||null==(s=a.error)?void 0:s.message)||c.A.GLOBAL.wrong),!1}},eu=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(e)return ee({[eM]:!0,[e_]:!0,[eD]:!0,[eF]:!0}),"all=".concat(!0);let l=[],t={};
1return Object.entries(k).forEach(e=>{let[n,r]=e;(null==r?void 0:r.fetchNext)&&(t.key=!0,l.push("".concat(n.toLowerCase(),"=",!0)))}),ee(t),l.join("&")},ex=async e=>{var l,t,n,r,s,a,i,o;let{updatePreviousState:d=!1,allTypes:x=!0}=e;if(!(null==T?void 0:T.jobId))return;let h=["jobId=".concat(null==T?void 0:T.jobId)];h.push(eu(x)),!d&&L&&h.push("cursor=".concat(L)),en&&h.push(en),el&&h.push("q=".concat(el));let p="?".concat(h.join("&"));try{let{hiddenApplicantsCount:e,applied:s,matched:a,rejected:i,shortlisted:o,cursor:c}=(await u.vS.getJobsReleatedData(p)).data.data;B(c||null);let x={[eM]:{...s,users:d?(null==s?void 0:s.users)||[]:[...(null==k||null==(l=k[eM])?void 0:l.users)||[],...(null==s?void 0:s.users)||[]]},[e_]:{...a,users:d?(null==a?void 0:a.users)||[]:[...(null==k||null==(t=k[e_])?void 0:t.users)||[],...(null==a?void 0:a.users)||[]]},[eF]:{...i,users:d?(null==i?void 0:i.users)||[]:[...(null==k||null==(n=k[eF])?void 0:n.users)||[],...(null==i?void 0:i.users)||[]]},[eD]:{...o,users:d?(null==o?void 0:o.users)||[]:[...(null==k||null==(r=k[eD])?void 0:r.users)||[],...(null==o?void 0:o.users)||[]]},hiddenApplicantsCount:e||0};R(x)}catch(e){if((null==e||null==(s=e.response)?void 0:s.status)===403)return void E.replace(ei);m.A.ErrorToast((null==e||null==(o=e.response)||null==(i=o.data)||null==(a=i.error)?void 0:a.message)||c.A.GLOBAL.wrong)}finally{ee(!1)}},em=async e=>{let{dragEvent:l,userInfo:t,emailData:n={},confirmReject:r=!1}=e,{toColumn:s,fromColumn:a,oldIndex:i,newIndex:o}=l,d=null==k?void 0:k[a],c=null==k?void 0:k[s],u=!1,x="";switch(s){case eM:u=await ec({userInfo:t,unlistFrom:a}),x="moved to Applied.";break;case eD:u=await eo({userInfo:t,unlistFrom:a}),x="is Shortlisted.";break;case eF:if(!r&&t.type!==e_)return ea(!0),F({userInfo:t,dragEvent:l}),!1;u=await ed({applicantData:{...t,...n||{}},unlistFrom:a}),x="moved to Rejected."}if(u){let[e]=d.users.splice(i,1);c.users.splice(o,0,e),R(e=>({...e,[s]:{...e[s],users:c.users,totalCount:c.users.length},[a]:{...e[a],users:d.users,totalCount:d.users.length}})),e&&m.A.SuccessToast("".concat(e.firstName," ").concat(x)),O&&_(e=>({...e,dragEvent:{...e,fromColumn:s}}))}return u},eh=async e=>{var l,t,n;K||Z(!0);try{let n=await u.gz.getJobBoardJobs("id=".concat(e));w(null==n||null==(t=n.data)||null==(l=t.data)?void 0:l.job)}catch(t){let e=null==E||null==(n=E.query)?void 0:n.companyName,l=Y.A.APP_PATHS.PROFILE_SUBPAGE({profileHandle:e,subPage:"/careers"});E.replace(l)}finally{Z(!1)}};(0,r.useEffect)(()=>{var e,l;let t=(null==E||null==(l=E.query)||null==(e=l.jobId)?void 0:e.toUpperCase())||null;t&&(null==T?void 0:T.jobId)!==t&&(eh(t),R(null),B(""))},[E.query]),(0,r.useEffect)(()=>{!k&&(null==T?void 0:T.jobId)&&ex({allTypes:!0})},[T]),(0,r.useEffect)(()=>{let e=setTimeout(async()=>{ex({allTypes:!0,updatePreviousState:!0})},800);return()=>{clearTimeout(e)}},[el,en]);let ep=v.default.jobBoardJobLocationString(T,1),ev=v.default.generateJobShareData(T),ej=e=>{e&&w(l=>({...l,status:e}))},ef=async()=>{if(T.jobId)try{await u.gz.unpauseJobPost(T.jobId),ej(x.A.STATUS.PUBLISHED),m.A.SuccessToast("Job Resumed!")}catch(n){var e,l,t;m.A.ErrorToast((null==n||null==(t=n.response)||null==(l=t.data)||null==(e=l.error)?void 0:e.message)||c.A.GLOBAL.serverError)}};if(!T||K)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a(),{children:(0,n.jsx)("title",{children:"Loading..."})}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(p.A.CenterTop,{}),(0,n.jsx)(ez,{})]})]});let{appliedCount:eg,shortListedCount:ey,rejectedCount:eb}=(null==T?void 0:T.candidateCounts)||{};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a(),{children:(0,n.jsx)("title",{children:"".concat(null==T?void 0:T.jobTitle," - Peerlist Hire")})}),(0,n.jsxs)("div",{className:"relative pt-14",children:[(0,n.jsxs)(p.A.CenterTop,{internalPage:!0,children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(p.A.BackButton,{}),(0,n.jsx)(p.A.PageHeading,{className:"paragraph-clamp1 mr-2",children:"Manage Applicants"})]}),(0,n.jsx)(C.Ay.Carbon,{small:!0,onClick:()=>E.push(Y.A.APP_PATHS.postAJob),iconLeft:(0,n.jsx)(y.BriefCaseAddIcon,{size:"14"}),children:"Post a Job"})]}),(0,n.jsxs)("div",{children:[(null==T?void 0:T.jobId)&&(0,n.jsxs)(n.Fragment,{children:[(null==T?void 0:T.status)===x.A.STATUS.PAUSED?(0,n.jsxs)("div",{className:"flex items-center justify-center bg-gray-200 px-6 py-2",children:[(0,n.jsxs)(b.default.NormalText,{xs:!0,as:"span",children:["Applications for this role have been paused."," "]}),(0,n.jsx)(b.default.SemiBoldText,{xs:!0,as:"span",className:"hover:underline cursor-pointer ml-1",onClick:()=>{ef()},children:"Start accepting."})]}):null,(0,n.jsxs)("div",{className:"border-b border-primaryBorder p-6 bg-gray-50",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between flex-wrap gap-4 w-ful mb-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)(q.A.Small,{image:null==T||null==(t=T.company)?void 0:t.logo}),(0,n.jsxs)("div",{children:[(0,n.jsx)(eJ,{jobTitleText:T.jobTitle,currentJobId:null==T?void 0:T.jobId,isJobArchived:!!(null==T?void 0:T.archivedAt),isJobPaused:(null==T?void 0:T.status)===x.A.STATUS.PAUSED}),(0,n.jsxs)(b.default.NormalText,{sm:!0,children:["at ",null==T||null==(s=T.company)?void 0:s.name,(0,n.jsx)(b.default.Dot,{}),T.jobType,(0,n.jsx)(b.default.Dot,{}),(0,n.jsx)("span",{className:"capitalize",children:ep})]})]})]}
1),(0,n.jsx)(G.A.RecruiterViewJobButtons,{job:T,boardState:(null==T?void 0:T.archivedAt)?V.JOB_STATES.ARCHIVED:V.JOB_STATES.PUBLISHED,handleJobRemoveOnLocal:()=>{if(!(null==T?void 0:T.archivedAt)){w(e=>({...e,publishedAt:null,archivedAt:new Date().toISOString()})),m.A.SuccessToast(eO.A.JOB.jobArchived);return}if(m.A.SuccessToast(eO.A.JOB.jobDeleted),null==I?void 0:I.profileHandle){let e=Y.A.APP_PATHS.PROFILE_SUBPAGE({profileHandle:null==I?void 0:I.profileHandle,subPage:Y.A.APP_PATHS.careers});E.push(e)}},handleJobStatusChange:ej})]}),(0,n.jsxs)("div",{className:"ml-0 sm:ml-16 pl-2 flex items-center justify-between flex-wrap gap-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[Number.isInteger(eg)?(0,n.jsxs)(b.default.NormalText,{xs:!0,children:[(0,n.jsx)("strong",{children:eg})," Applied"]}):null,Number.isInteger(ey)?(0,n.jsxs)(b.default.NormalText,{xs:!0,children:[(0,n.jsx)("strong",{children:ey})," Shortlisted"]}):null,Number.isInteger(eb)?(0,n.jsxs)(b.default.NormalText,{xs:!0,children:[(0,n.jsx)("strong",{children:eb})," Rejected"]}):null]}),(null==T||null==(d=T.creator)?void 0:d.id)&&(0,n.jsxs)("div",{className:"sm:ml-auto flex items-center gap-x-1 text-xxs text-gray-500",children:[(null==T?void 0:T.publishedAt)?(0,n.jsxs)(b.default.MutedText,{xxs:!0,children:["Posted"," ",(0,n.jsx)("span",{className:"text-gray-1k font-semibold",children:(0,v.timeSince)(null==T?void 0:T.publishedAt)})]}):null,"by",(0,n.jsx)(W.Ay.Tiny,{image:(null==T||null==(g=T.creator)?void 0:g.profilePicture)||V.CDNImage.emptyUserDP}),(0,n.jsxs)(b.default.SemiBoldText,{xxs:!0,children:[null==T||null==(A=T.creator)?void 0:A.firstName," ",null==T||null==(N=T.creator)?void 0:N.lastName]})]})]})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"px-6 pt-6 mb-6 flex items-center justify-between",children:[(0,n.jsx)("div",{className:"w-72 group",children:(0,n.jsx)(U.Ay,{value:el,onChange:e=>et(e.target.value),type:"search",placeholder:"Search candidates",icon:(0,n.jsx)(y.SearchIcon,{size:18}),iconContainerClass:"opacity-50 hover:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 transition-all ease-in-out group-focus-within:rotate-90"})}),(0,n.jsxs)(C.Ay.CarbonOutline,{small:!0,onClick:()=>X(e=>!e),iconLeft:Q?(0,n.jsx)(y.CloseXIcon,{size:16}):(0,n.jsx)(y.FilterIcon,{size:14}),children:["Filter",en&&(0,n.jsx)("span",{className:"h-2 w-2 rounded-full bg-green-300"})]})]}),(0,n.jsx)(z.A,{job:T,newFilter:!0,setFilterParams:er,showFilterSection:Q})]}),(0,n.jsx)("div",{children:(0,n.jsx)(D,{loading:$,candidates:k,isJobArchived:!!(null==T?void 0:T.archivedAt),fetchCandidates:ex,canAccessMatched:P,triggerShareModal:()=>J(!0),onSelectCandidate:e=>_(e),handleApplicantProfileAction:em})})]}),es&&(0,n.jsx)(h.A.RejectApplication,{showModal:es,setShowModal:()=>ea(!1),user:M.userInfo,jobTitle:null==T?void 0:T.jobTitle,jobCompany:null==T||null==(S=T.company)?void 0:S.name,addCandidateToReject:e=>em({dragEvent:M.dragEvent,emailData:e,confirmReject:!0}),handleCancelRejection:()=>{ea(!1),F(null)}})]}),H?(0,n.jsx)(j.A.CreatePostWithContext,{showModal:H,setShowModal:J,shareData:ev,preSelectedContext:V.SCROLL_CONTEXT_TYPES.HIRING,fromShareModal:!0}):null,O?(0,n.jsx)(eI,{job:T,candidate:O,canAccessMatched:P,setShowModal:_,handleApplicantProfileAction:em,onNext:e=>{setTimeout(()=>{var l,t;if(null==e||null==(l=e.dragEvent)?void 0:l.fromColumn){let l=k[null==e||null==(t=e.dragEvent)?void 0:t.fromColumn],[,n]=((e,l)=>{let t=l.findIndex(l=>l.id===e||l.hiringId===e);return -1===t?[void 0,void 0]:[l[t-1],l[t+1]]})(e.id||e.hiringId,l.users);n&&(n.dragEvent=e.dragEvent,_(n))}},300)}}):null]})})),ez=()=>(0,n.jsxs)("div",{className:"w-full h-screen pt-14 animate-pulse",children:[(0,n.jsxs)("div",{className:"border-b border-primaryBorder p-6 flex items-start gap-x-4",children:[(0,n.jsx)("div",{className:"w-12 h-12 bg-gray-100 rounded-lg"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"h-4 rounded bg-gray-200 w-96 mb-2"}),(0,n.jsx)("div",{className:"h-4 rounded bg-gray-100 w-96"}),(0,n.jsxs)("div",{className:"mt-8 flex items-center gap-5",children:[(0,n.jsx)("div",{className:"w-36 h-3 bg-gray-200 rounded-sm"}),(0,n.jsx)("div",{className:"w-36 h-3 bg-gray-200 rounded-sm"}),(0,n.jsx)("div",{className:"w-36 h-3 bg-gray-200 rounded-sm"})]})]})]}),(0,n.jsx)("div",{className:"px-6 pt-6",children:(0,n.jsx)("div",{className:"h-10 w-full bg-gray-100 rounded-lg"})}),(0,n.jsx)("div",{className:"h-full w-full flex justify-between gap-4 p-6",children:[,,,,].fill(null).map((e,l)=>(0,n.jsx)("div",{className:"h-full rounded-md bg-gray-100 ".concat(0===l?"w-16":"flex-1 w-full")},"random-".concat(2*l)))})]}),eJ=e=>{let{jobTitleText:l,currentJobId:t,isJobArchived:s,isJobPaused:a=!1}=e,d=(0,i.useRouter)(),c=(0,o.useDispatch)(),{allRecruiterJobs:x}=(0,o.useSelector)(e=>e.RecruiterData),m=async()=>{try{var e;let l=await u.gz.getJobBoardJobs(),t=(null==l||null==(e=l.data)?void 0:e.jobs)||[];c(eB.KU.updateAllJobs(t))}catch(e){}};(0,r.useEffect)(()=>{(null==x?void 0:x.length)||m()},[]);let h=(0,r.useMemo)(()=>(0,n.jsxs)(b.default.SemiBoldText,{className:"mb-0.5",children:[s?(0,n.jsx)(b.default.SemiBoldText,{as:"span",textColor:"text-gray-500",children:"[Archived]"}):null,a?(0,n.jsx)(b.default.SemiBoldText,{as:"span",textColor:"text-gray-500",children:"[Paused]"}):null," ",l]}),[a]),p=(null==x?void 0:x.length)?x.filter(e=>(null==e?void 0:e.jobId)!==t):[];return(null==p?void 0:p.length)?(0,n.jsxs)(er.A,{width:"w-64",className:"lg:right",dropdownButton:(0,n.jsxs)("div",{className:"flex items-center gap-x-1 cursor-pointer select-none group",children:[h,(0,n.jsx)(C.Ay.CarbonTransparent,{small:!0,circular:!0,children:(0,n.jsx)(y.ChevronDownIcon,{size:16})})]}),children:[(0,n.jsx)("div",{className:"p-2",children:(0,n.jsx)(b.default.SemiBoldText,{xs:!0,children:"Published Jobs"})}),(0,n.jsx)("ul",{className:"max-h-56 overflow-y-auto",children:p.map(e=>
1{let l=v.default.getRecruiterViewURL(e.company.name,e.jobId);return(0,n.jsx)("li",{children:(0,n.jsx)(er.e.Item,{className:"block",onClick:()=>d.replace(l),children:(0,n.jsx)(b.default.NormalText,{sm:!0,className:"paragraph-clamp1",children:e.jobTitle})})},null==e?void 0:e.jobId)})})]}):h}},68580:(e,l,t)=>{"use strict";t.d(l,{A:()=>a});var n=t(37876),r=t(89099),s=t(2171);let a=e=>l=>{let t=(0,r.useRouter)(),{appData:a}=(0,s.useSelector)(e=>e.AppData);if(null==a?void 0:a.id)return(null==a?void 0:a.isCompanyAdmin)?(0,n.jsx)(e,{...l}):(t.push("/404"),null)}},82381:(e,l,t)=>{"use strict";t.d(l,{AD:()=>a,kC:()=>s,yY:()=>i});var n=t(61251),r=t(16495);let s=e=>{if(e){if((null==e?void 0:e.city)&&(null==e?void 0:e.country)&&((null==e?void 0:e.code)||(null==e?void 0:e.countryCode)))return e;if((null==e?void 0:e.city)&&(null==e?void 0:e.country)&&!e.code){let l=n.find(l=>l.country===(null==e?void 0:e.country));return{city:null==e?void 0:e.city,country:null==l?void 0:l.country,code:null==l?void 0:l.code,countryCode:null==l?void 0:l.code}}if("string"==typeof e){var l;let t=e.split(","),r=null==t?void 0:t.length,s=t[0],a=null==t||null==(l=t[r-1])?void 0:l.trim(),i=n.find(e=>e.country===a);return{city:s,country:null==i?void 0:i.country,code:null==i?void 0:i.code}}if((null==e?void 0:e.country)===r.REMOTE)return{country:r.REMOTE,code:r.REMOTE};if((null==e?void 0:e.country)!==r.REMOTE&&((null==e?void 0:e.city)===""||!(null==e?void 0:e.city))){if((null==e?void 0:e.country)&&(null==e?void 0:e.code))return e;let l=null==e?void 0:e.country,t=n.find(e=>e.country.toLowerCase()===(null==l?void 0:l.toLowerCase()));return{country:null==t?void 0:t.country,code:null==t?void 0:t.code}}}},a=e=>{let l;if(!(e instanceof Array)||(null==e?void 0:e.length)===0)return;let t=[],n=[];return(e.forEach(e=>{let r=null==n?void 0:n.find(l=>l===e.city);(null==t?void 0:t.find(l=>l===e.country))||t.push(e.country),r||void 0===e.city||n.push(e.city),e.remote&&(l=e.remote)}),n.length>0&&t.length>0)?{cities:n,remote:l}:1===t.length||0===n.length?{countries:t,remote:l}:{remote:l}},i=e=>{if(!(e instanceof Array)||(null==e?void 0:e.length)===0)return;let{countries:l,cities:t}=a(e);return(null==t?void 0:t.length)>0?"cities=".concat(t.toString()):(null==l?void 0:l.length)>=1||(null==t?void 0:t.length)===0?"countries=".concat(l.join(",")):""}},86871:(e,l,t)=>{"use strict";t.d(l,{A:()=>i});var n=t(37876),r=t(48230),s=t.n(r),a=t(16217);let i=e=>{let{user:l}=e,t=(null==l?void 0:l.socialLinks)?(0,a.r)(l.socialLinks):[];return(0,n.jsx)("div",{className:"w-full flex items-center justify-center",children:t.length?(0,n.jsx)("div",{className:"flex gap-2 items-center flex-shrink-0",children:t.map(e=>(0,n.jsx)(s(),{href:e.url,target:"_blank",rel:"nofollow noreferrer ugc",className:"px-1",title:"".concat(e.name," link"),children:(0,n.jsx)(e.icon,{size:16,width:16,height:16})},e.name))}):null})}},88433:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/company/[companyName]/[jobId]/recruiter-view",function(){return t(42465)}])},95600:(e,l,t)=>{"use strict";t.d(l,{A:()=>s});var n=t(37876),r=t(14232);function s(e){let{children:l,fetchNew:t,isLast:s}=e,a=(0,r.useRef)();return(0,r.useEffect)(()=>{if(!(null==a?void 0:a.current))return;let e=new IntersectionObserver(l=>{let[n]=l;s&&n.isIntersecting&&(t(),e.unobserve(n.target))});e.observe(a.current)},[s]),(0,n.jsx)("div",{ref:a,children:l})}}},e=>{e.O(0,[1515,5907,9111,5777,7653,828,3801,636,6593,8792],()=>e(e.s=88433)),_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.