1try{!function(){var 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]="80bbfcbe-233e-4627-a749-96ce501b1ed7",e._sentryDebugIdIdentifier="sentry-dbid-80bbfcbe-233e-4627-a749-96ce501b1ed7")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1853],{92947:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/hr/[tenant]/hiring/[id]/scorecard",function(){return n(94443)}])},79337:function(e,t,n){"use strict";var s=n(52322),r=n(55351),a=n(45847),i=n.n(a),l=n(13980),o=n.n(l);let c=e=>{let{title:t="The leading job board for the modern workforce.",description:n="The #1 job board for the modern workforce.",canonical:a="https://www.elevolt.co.ke/",page:l="",thirdParty:o=!0,children:c}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.PB,{canonical:a+l,description:"".concat(n," | Elevolt"),facebook:{appId:"346824926505117"},openGraph:{type:"website",url:a+l,title:"".concat(t," | Elevolt"),description:"".concat(n," | Elevolt"),images:[{url:"https://www.elevolt.co.ke/elevolt-og.png",width:1600,height:800,alt:"Elevolt"}],site_name:"Elevolt"},title:"".concat(t," | Elevolt"),twitter:{handle:"@ElevoltK",site:"@ElevoltK",cardType:"summary_large_image"}}),!!o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i(),{id:"hs-script-loader",src:"//js-eu1.hs-scripts.com/25842252.js",strategy:"lazyOnload"}),(0,s.jsx)(i(),{dangerouslySetInnerHTML:{__html:"(function(h,o,t,j,a,r){\n h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n h._hjSettings={hjid:2328489,hjsv:6};\n a=o.getElementsByTagName('head')[0];\n r=o.createElement('script');r.async=1;\n r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n a.appendChild(r);\n })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');"},id:"hotjar",strategy:"lazyOnload"}),(0,s.jsx)(i(),{dangerouslySetInnerHTML:{__html:"!function(f,b,e,v,n,t,s)\n {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t,s)}(window, document,'script',\n 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '583365066890254');\n fbq('track', 'PageView');"},id:"meta",strategy:"lazyOnload"}),(0,s.jsx)("noscript",{children:(0,s.jsx)("img",{height:"1",src:"https://www.facebook.com/tr?id=583365066890254&ev=PageView&noscript=1",style:{display:"none"},width:"1"})})]}),c]})};c.propTypes={title:o().string,description:o().string,canonical:o().string,page:o().string,thirdParty:o().bool,children:o().node},t.Z=c},94443:function(e,t,n){"use strict";n.r(t);var s=n(52322),r=n(59417),a=n(99603),i=n(88883),l=n(14010),o=n(13980),c=n.n(o),d=n(2784),m=n(40023),u=n(63955),p=n(62202),x=n(36160),g=n.n(x),h=n(5120),f=n(47023),b=n(65232),j=n(1973),y=n(22406),v=n(16049),N=n(95254),w=n(63798),q=n(77590),_=n(18808),T=n(79453),k=n(74021),C=n(20270),R=n(3316),E=n(76467),Z=n(84475),P=n(79337);let S=h.Ryn({name:h.Z_8().min(1,"Name is required"),type:h.KmV(["rating","yes/no","text"]).default("rating")}),L=h.Ryn({attributes:h.IXX(S).min(1,"At least one attribute is required"),company_values:h.IXX(S).min(1,"At least one company value is required")}),I=["rating","yes/no","text"],A={rating:"bg-blue-100 text-blue-700","yes/no":"bg-green-100 text-green-700",text:"bg-gray-100 text-gray-700"},O=e=>{let{type:t}=e;return(0,s.jsx)("span",{className:"px-2 py-1 rounded-full text-xs font-medium capitalize ".concat(A[t]||A.text),children:t})};O.propTypes={type:c().string.isRequired};let z=e=>{let{title:t,description:n,items:r=[],itemLabel:a}=e;return(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(E.Z,{variant:"sectionHeader",children:t}),(0,s.jsx)(E.Z,{className:"mt-1",variant:"bodySmall",children:n})]}),r.length>0&&(0,s.jsx)("div",{className:"space-y-3",role:"list",children:r.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-4 p-4 bg-white border border-gray-100 rounded-lg transition-colors hover:border-gray-200",role:"listitem",children:[(0,s.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-gray-100 text-gray-600 flex items-center justify-center text-sm font-medium",children:t+1}),(0,s.jsx)("div",{className:"flex-1",children:(0,s.jsx)(E.Z,{className:"capitalize",variant:"labelValue",children:e.name})}),(0,s.jsx)(O,{type:e.type})]},"".concat(a,"-").concat(e.name,"-").concat(e.type)))}),0===r.length&&(0,s.jsxs)(E.Z,{className:"italic",variant:"caption",children:["No ",a.toLowerCase(),"s configured"]})]})};z.propTypes={title:c().string.isRequired,description:c().string.isRequired,items:c().arrayOf(c().shape({name:c().string.isRequired,type:c().string.isRequired})),itemLabel:c().string.isRequired};let D=e=>{var t;let{title:n,description:i,fields:l,onAdd:o,onRemove:c,onReorder:d,canAdd:p,fieldName:x,itemLabel:g,addButtonText:h,control:b,errors:j}=e;return(0,s.jsxs)("div",{"aria-labelledby":"".concat(x,"-heading"),className:"mb-8",role:"group",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(E.Z,{as:"h3",id:"".concat(x,"-heading"),variant:"sectionHeader",children:n}),(0,s.jsx)(E.Z,{className:"mt-1",variant:"bodySmall",children:i})]}),(0,s.jsx)(f.Z,{className:"text-sm w-full sm:w-auto",design:"secondary",disabled:!p,onClick:o,title:p?"Add a new ".concat(g.toLowerCase()):"Please complete all existing ".concat(g.toLowerCase(),"s before adding a new one"),type:"button",children:h})]}),!!(!p&&l.length>0)&&(0,s.jsxs)("p",{className:"text-sm text-amber-600 mb-3",children:["* ",g.toLowerCase()," names are required."]}),(0,s.jsx)(m.Z5,{onDragEnd:e=>{e.destination&&e.source.index!==e.destination.index&&d(e.source.index,e.destination.index)},children:(0,s.jsx)(m.bK,{droppableId:x,children:e=>(0,s.jsxs)("div",{ref:e.innerRef,role:"list",...e.droppableProps,children:[l.map((e,t)=>(0,s.jsx)(m._l,{draggableId:e.id,index:t,children:(e,n)=>(0,s.jsxs)("div",{ref:e.innerRef,role:"listitem",...e.draggableProps,className:"group flex flex-col sm:flex-row sm:items-start gap-3 mb-3 p-4 bg-gray-50 rounded-lg border transition-all duration-200 ".concat(n.isDragging?"border-blue-300 shadow-lg":"border-transparent hover:border-gray-200"),children:[(0,s.jsx)("div",{...e.dragHandleProps,"aria-label":"Drag to reorder ".concat(g," ").concat(t+1),className:"flex-shrink-0 cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600 p-1 self-center sm:self-start sm:mt-8",children:(0,s.jsx)(a.G,{icon:r.g$q})}),(0,s.jsx)("div",{className:"hidden sm:flex flex-shrink-0 w-8 h-8 rounded-full bg-blue-100 text-blue-700 items-center justify-center text-sm font-medium mt
1-7",children:t+1}),(0,s.jsx)("div",{className:"flex-[2] w-full",children:(0,s.jsx)(u.Qr,{control:b,name:"".concat(x,".").concat(t,".name"),render:e=>{var n,r,a;let{field:i}=e;return(0,s.jsx)(N.o,{error:null===(a=j[x])||void 0===a?void 0:null===(r=a[t])||void 0===r?void 0:null===(n=r.name)||void 0===n?void 0:n.message,label:"".concat(g," Name"),onChange:i.onChange,placeholder:"Enter ".concat(g.toLowerCase()," name"),value:i.value})}})}),(0,s.jsx)("div",{className:"flex-1 w-full sm:min-w-[140px]",children:(0,s.jsx)(u.Qr,{control:b,name:"".concat(x,".").concat(t,".type"),render:e=>{var n,r,a;let{field:i}=e;return(0,s.jsx)(w.P,{defaultOption:"Select Type",error:null===(a=j[x])||void 0===a?void 0:null===(r=a[t])||void 0===r?void 0:null===(n=r.type)||void 0===n?void 0:n.message,label:"Type",name:"".concat(x,"-").concat(t,"-type"),onChange:i.onChange,options:I,selected:i.value})}})}),l.length>1&&(0,s.jsx)("button",{"aria-label":"Remove ".concat(g," ").concat(t+1),className:"flex-shrink-0 p-2 text-gray-400 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100 transition-all self-center sm:self-start sm:mt-7",onClick:()=>c(t),type:"button",children:(0,s.jsx)(a.G,{icon:r.$aW})})]})},e.id)),e.placeholder]})})}),!!(null===(t=j[x])||void 0===t?void 0:t.message)&&(0,s.jsx)("p",{className:"text-red-500 text-sm mt-1",children:j[x].message})]})};D.propTypes={title:c().string.isRequired,description:c().string.isRequired,fields:c().array.isRequired,onAdd:c().func.isRequired,onRemove:c().func.isRequired,onReorder:c().func.isRequired,canAdd:c().bool.isRequired,fieldName:c().string.isRequired,itemLabel:c().string.isRequired,addButtonText:c().string.isRequired,control:c().object.isRequired,errors:c().object.isRequired};let F=e=>{let{post:t,tenantName:n}=e;return g()(t)?null:(0,s.jsxs)("a",{className:"appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-gray-100 hover:bg-gray-200",href:"/hr/".concat(n,"/hiring/").concat(t.jid),children:[(0,s.jsx)(a.G,{className:"mr-2 text-sm",icon:r.x58,size:"1x"}),"Manage Jobpost",(0,s.jsx)(a.G,{className:"ml-auto text-sm text-inherit",icon:r._tD,size:"1x"})]},"manage-jobpost")};F.propTypes={post:c().object,tenantName:c().string};let G=e=>{let{post:t}=e;return g()(t)?null:(0,s.jsxs)("a",{className:"appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-gray-100 hover:bg-gray-200",href:"/job/".concat(t.slug),rel:"noreferrer",target:"_blank",children:[(0,s.jsx)(a.G,{className:"mr-2 text-sm",icon:r.nNP,size:"1x"}),"Preview Jobpost",(0,s.jsx)(a.G,{className:"ml-auto text-sm text-inherit",icon:r._tD,size:"1x"})]},"preview-jobpost")};G.propTypes={post:c().object};let V=e=>{let{post:t,tenantName:n}=e;return g()(t)||!t.applications||0===t.applications.length?null:(0,s.jsxs)("a",{className:"appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-gray-100 hover:bg-gray-200",href:"/hr/".concat(n,"/hiring/").concat(t.jid,"/applications/"),children:[(0,s.jsx)(a.G,{className:"mr-2 text-sm",icon:r.FVb,size:"1x"}),"View Applications",(0,s.jsx)("span",{className:"bg-blue py-1 px-3 ml-2 text-white text-xs rounded-full leading-none",children:t.applications.length}),(0,s.jsx)(a.G,{className:"ml-auto text-sm text-inherit",icon:r._tD,size:"1x"})]},"view-applications")};V.propTypes={post:c().object,tenantName:c().string};let B=e=>{let{post:t,tenantName:n}=e;return g()(t)?null:(0,s.jsxs)("a",{className:"appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-gray-100 hover:bg-gray-200",href:"/hr/".concat(n,"/hiring/").concat(t.jid,"/scorecards/"),children:[(0,s.jsx)(a.G,{className:"mr-2 text-sm",icon:r.OGB,size:"1x"}),"View All Scorecards",(0,s.jsx)(a.G,{className:"ml-auto text-sm text-inherit",icon:r._tD,size:"1x"})]},"view-scorecards")};B.propTypes={post:c().object,tenantName:c().string};let M=e=>{var t,n;let{tenantName:r,jobpostId:a}=e,{data:o}=(0,C.Pi)({enabled:!0}),c=(0,l.NL)(),{data:m,isLoading:x,error:g}=(0,k.r)({enabled:!!a,jid:a,slug:!1}),h=(null==m?void 0:m.data)||{},{data:N,isLoading:w,error:Z}=(0,R.aG)({jobpostId:a}),S=(null==N?void 0:N.data)||[],I=S.length>0?S[0]:null,[A,O]=(0,d.useState)(!1),{control:M,handleSubmit:H,trigger:K,reset:W,formState:{errors:X,isValid:J}}=(0,u.cI)({resolver:(0,i.F)(L),defaultValues:{attributes:[{name:"",type:"rating"}],company_values:[{name:"",type:"rating"}]},mode:"onChange"});(0,d.useEffect)(()=>
1{if(I&&A){let e=I.data||{};W({attributes:e.attributes||[{name:"",type:"rating"}],company_values:e.company_values||[{name:"",type:"rating"}]})}else I||W({attributes:[{name:"",type:"rating"}],company_values:[{name:"",type:"rating"}]})},[I,A]);let Q=(0,u.qo)({control:M,name:"attributes"})||[],U=(0,u.qo)({control:M,name:"company_values"})||[],$=(0,d.useMemo)(()=>Q.every(e=>e.name&&""!==e.name.trim()),[Q]),Y=(0,d.useMemo)(()=>U.every(e=>e.name&&""!==e.name.trim()),[U]),{fields:ee,append:et,remove:en,move:es}=(0,u.Dq)({control:M,name:"attributes"}),{fields:er,append:ea,remove:ei,move:el}=(0,u.Dq)({control:M,name:"company_values"}),eo=(0,R.HB)({jobpostId:a}),ec=(0,R.eO)({jobpostId:a,templateId:null==I?void 0:I.id}),ed=(0,d.useCallback)(e=>{p.default.success("create"===e?"Score card created successfully!":"Score card updated successfully!"),O(!1),c.invalidateQueries(["scorecard-templates",a])},[c,a]),em=(0,d.useCallback)((e,t)=>{var n,s;p.default.error((null===(s=e.response)||void 0===s?void 0:null===(n=s.data)||void 0===n?void 0:n.message)||("create"===t?"Failed to create score card":"Failed to update score card"))},[]),eu=(0,d.useMemo)(()=>[()=>(0,s.jsx)(F,{post:h,tenantName:r}),()=>(0,s.jsx)(G,{post:h}),()=>(0,s.jsx)(V,{post:h,tenantName:r}),()=>(0,s.jsx)(B,{post:h,tenantName:r})],[h,r]),ep=async()=>{await K("attributes")&&$&&et({name:"",type:"rating"})},ex=async()=>{await K("company_values")&&Y&&ea({name:"",type:"rating"})},eg=()=>I?A?"Edit Score Card Template":"Score Card Template":"New Score Card Template",eh=[{href:"/hr/".concat(r,"/hiring/"),name:"Hiring",nodeType:"Link"},{href:"/hr/".concat(r,"/hiring/").concat(h.jid),name:(0,q.excerpt)(h.title,40),nodeType:"Link"},{href:"#",name:I?A?"Edit Score Card Template":"Score Card Template":"Add Score Card Template",nodeType:"Link"}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(P.Z,{title:"".concat((0,q.kC)((0,q.parseUnderScore)(r))," - ").concat(eg())}),(0,s.jsx)("div",{className:"container mx-auto px-6 md:px-8 lg:px-12",children:(0,s.jsx)("div",{className:"w-full flex justify-start",children:(0,s.jsx)(v.Z,{home:"/hr/".concat(r,"/"),links:eh})})}),(0,s.jsx)("div",{className:"container mx-auto px-6 md:px-8 lg:px-12 flex flex-col",children:(0,s.jsx)(T.Z,{canAccess:_.dg,deniedDescription:"Scorecard templates are available for approved job posts.",deniedMessage:"Scorecard template unavailable",isError:!!g,isLoading:x,post:h,tenantName:r,children:(0,s.jsxs)("div",{className:"w-full flex flex-col lg:flex-row mt-2 mb-8 gap-4 lg:gap-x-8",children:[(0,s.jsx)("div",{className:"w-full lg:w-9/12 flex flex-col",children:(0,s.jsxs)(b.ZP,{children:[(0,s.jsx)(b.Ol,{children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(E.Z,{size:"text-xl",variant:"heading3",children:eg()}),!!(I&&!A)&&(0,s.jsx)(f.Z,{className:"text-sm",design:"secondary",onClick:()=>O(!0),type:"button",children:"Edit Template"}),!!A&&(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(f.Z,{className:"text-sm",design:"secondary",onClick:()=>O(!1),type:"button",children:"Cancel"})})]})}),(0,s.jsxs)(b.eW,{children:[!!(w||Z)&&(0,s.jsx)(j.Z,{description:Z?"Please try refreshing the page.":void 0,design:"wrapped",isError:!!Z,isLoading:w,message:Z?"Failed to load scorecard template":"Loading scorecard template..."}),!!(!w&&!Z)&&(0,s.jsxs)(s.Fragment,{children:[!!(I&&!A)&&(0,s.jsxs)("div",{children:[(0,s.jsx)(z,{description:"Key attributes and criteria used to assess candidates for this position.",itemLabel:"Attribute",items:(null===(t=I.data)||void 0===t?void 0:t.attributes)||[],title:"Candidate Attributes"}),(0,s.jsx)(z,{description:"Company values used to evaluate candidates for this job post.",itemLabel:"Company Value",items:(null===(n=I.data)||void 0===n?void 0:n.company_values)||[],title:"Company Values"})]}),!!(!I||A)&&(0,s.jsx)("div",{children:(0,s.jsxs)("form",{className:"w-full",onSubmit:H(e=>{let t={data:e};I?ec.mutate(t,{onSuccess:()=>ed("update"),onError:e=>em(e,"update")}):eo.mutate(t,{onSuccess:()=>ed("create"),onError:e=>em(e,"create")})}),children:[(0,s.jsx)(D,{addButtonText:"Add Attribute",canAdd:$,control:M,description:"Define the key attributes and criteria you'll use to assess candidates for this position.",errors:X,fieldName:"attributes",fields:ee,itemLabel:"Attribute",onAdd:ep,onRemove:en,onReorder:(e,t)=>es(e,t),title:"Candidate Attributes"}),(0,s.jsx)(D,{addButtonText:"Add Value",canAdd:Y,control:M,description:"These are the company values to evaluate candidates for this job post.",errors:X,fieldName:"
1company_values",fields:er,itemLabel:"Company Value",onAdd:ex,onRemove:ei,onReorder:(e,t)=>el(e,t),title:"Company Values"}),(0,s.jsxs)("div",{"aria-live":"polite",className:"sr-only",children:[!!eo.isPending&&"Creating scorecard template...",!!ec.isPending&&"Saving scorecard template..."]}),(0,s.jsx)("div",{className:"flex justify-end pt-4 border-t",children:(0,s.jsx)(f.Z,{disabled:!J||eo.isPending||ec.isPending,loading:eo.isPending||ec.isPending,type:"submit",children:eo.isPending?"Creating...":ec.isPending?"Saving...":I?"Save Template":"Create Template"})})]})})]})]})]})}),(0,s.jsx)("div",{className:"w-full lg:w-3/12 flex flex-col",children:(0,s.jsx)(y.Z,{addons:eu,user:o})})]})})})]})};M.getInitialProps=async e=>({jobpostId:e.query.id,tenantName:e.query.tenant}),M.propTypes={jobpostId:c().string.isRequired,tenantName:c().string.isRequired},t.default=(0,Z.withAuthSync)(M)},65232:function(e,t,n){"use strict";n.d(t,{Ol:function(){return i},eW:function(){return l}});var s=n(52322),r=n(13980),a=n.n(r);n(2784);let i=e=>{let{heading:t,padding:n={}}=e,{x:r=4,y:a=3}=n;return(0,s.jsxs)("div",{className:"card-header",children:[(0,s.jsxs)("div",{className:"px-".concat(r," py-").concat(a),children:[!!t&&(0,s.jsx)("h3",{className:"text-xl font-semibold",children:t}),e.children]}),(0,s.jsx)("hr",{className:"border-gray-200"})]})};i.propTypes={heading:a().string,children:a().node,padding:a().object};let l=e=>{let{padding:t=4}=e;return(0,s.jsx)("div",{className:"p-".concat(t," w-full relative"),children:e.children})};l.propTypes={padding:a().number,children:a().node};let o=e=>{let{heading:t,footer:n,className:r="",...a}=e;return(0,s.jsxs)("div",{className:"w-full bg-white rounded ".concat(r),...a,children:[t?(0,s.jsx)(i,{heading:t}):null,e.children,n]})};o.propTypes={heading:a().string,className:a().node,children:a().node,footer:a().node},t.ZP=o},1973:function(e,t,n){"use strict";var s=n(52322),r=n(2369),a=n(92942),i=n(13980),l=n.n(i);n(2784);var o=n(42369);let c=e=>{let{items:t,message:n,description:i,icon:l,showIcon:o,action:c}=e;return(0,s.jsxs)("div",{className:"w-full h-full flex justify-center items-center flex-col p-8",children:[!!o&&(0,s.jsx)(a.FontAwesomeIcon,{className:"text-gray-400 mb-2 text-3xl",icon:l||r.wK3,size:"xl"}),!!t&&(0,s.jsxs)("p",{className:"text-gray-500 text-center font-medium",children:["We couldn't load any ",t,"."]}),!!n&&(0,s.jsx)("p",{className:"text-gray-500 text-center font-medium",children:n}),!!i&&(0,s.jsx)("p",{className:"text-gray-400 text-center text-sm mt-1",children:i}),!!c&&(0,s.jsx)("div",{className:"mt-4",children:c})]})};c.propTypes={showIcon:l().bool,items:l().string,message:l().string,description:l().string,icon:l().object,action:l().node};let d=e=>{let{className:t,isLoading:n,action:i,items:l,message:d,description:m,icon:u,showIcon:p,isError:x}=e;return(0,s.jsxs)("div",{className:"w-full bg-transparent text-center flex flex-col items-center ".concat(t),children:[!n&&!x&&(0,s.jsx)(c,{action:i,description:m,icon:u,items:l,message:d,showIcon:p}),!n&&!!x&&(0,s.jsxs)("div",{className:"w-full flex flex-col justify-center items-center text-red-500",children:[(0,s.jsx)(a.FontAwesomeIcon,{className:"mb-2",icon:r.eHv,size:"xl"}),(0,s.jsx)("p",{className:"text-center font-medium",children:d||"An error occurred loading ".concat(null!=l?l:"data","...")}),!!m&&(0,s.jsx)("p",{className:"text-red-400 text-center text-sm mt-1",children:m}),!!i&&(0,s.jsx)("div",{className:"mt-4",children:i})]}),!!n&&(0,s.jsx)("div",{className:"w-full flex justify-center items-center",children:(0,s.jsx)(o.Z,{size:"sm"})})]})};d.propTypes={items:l().string,message:l().string,description:l().string,icon:l().object,action:l().node,className:l().string,showIcon:l().bool,isLoading:l().bool,isError:l().bool};let m=e=>{let{items:t,message:n,description:r,icon:a,action:i,className:l,showIcon:o=!0,design:c,isLoading:m=!1,isError:u=!1}=e;return"wrapped"===c?(0,s.jsx)("div",{className:"w-full bg-blue-50 p-4 rounded border border-dashed",children:(0,s.jsx)(d,{action:i,className:l,description:r,icon:a,isError:u,isLoading:m,items:t,message:n,showIcon:o})}):(0,s.jsx)(d,{action:i,className:l,description:r,icon:a,isError:u,isLoading:m,items:t,message:n,showIcon:o})};m.propTypes={items:l().string,message:l().string,description:l().string,icon:l().object,action:l().node,className:l().string,
1showIcon:l().bool,design:l().oneOf(["wrapped","default"]),isLoading:l().bool,isError:l().bool},t.Z=m},63798:function(e,t,n){"use strict";n.d(t,{P:function(){return c}});var s=n(52322),r=n(12524),a=n.n(r),i=n(13980),l=n.n(i);n(2784);let{parseUnderScore:o}=n(77590),c=e=>{let{name:t,error:n,label:r,description:i,options:l,onChange:c,selected:d,required:m=!1,defaultOption:u,...p}=e,x=a()("block","tracking-wide","text-sm","font-medium","mb-2",{"text-gray-700":!n},{"text-red-400":n}),g=a()("block appearance-none w-full bg-blue-50 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500 capitalize",{border:n},{"border-red-400":n}),h=e=>"object"==typeof e&&null!==e?e.label||e.value||"":"string"!=typeof e?String(e):e.replace(/_/g," ").replace(/-/g," ");return(0,s.jsxs)(s.Fragment,{children:[r?(0,s.jsxs)("label",{className:x,htmlFor:t,children:[r,m?(0,s.jsx)("span",{className:"text-red-400 text-xs ml-1",children:"*"}):null]}):null,(0,s.jsx)("div",{className:"flex relative w-full",children:(0,s.jsxs)("select",{className:g,id:t,name:t,onChange:c,value:null!=d?d:"",...p,children:[(0,s.jsx)("option",{value:"",children:u||"Select ".concat(o(t))}),null==l?void 0:l.map((e,t)=>{let n="object"==typeof e&&null!==e?e.value:"string"==typeof e?e.toLowerCase():e;return(0,s.jsx)("option",{value:n,children:h(e)},"option-".concat(t))})]})}),i?(0,s.jsx)("span",{className:"text-gray-500 text-sm mt-1 block",children:i}):null,n?(0,s.jsx)("span",{className:"text-red-400 text-xs",children:n}):null]})};c.propTypes={label:l().string,name:l().string.isRequired,options:l().array.isRequired,selected:l().string,error:l().string,onChange:l().func.isRequired,required:l().bool,defaultOption:l().string}},74021:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var s=n(59820),r=n(60418),a=n(82036),i=n(84475);let l=async e=>{let{jid:t,slug:n}=e;return(await r.Z.get("".concat(a.JW,"jobposts/").concat(t,"/").concat(n?"":"jid"),{headers:{...(0,i.g0)({realm:"hr"})}})).data},o=e=>{let{enabled:t=!1,jid:n,slug:r}=e;return(0,s.a)({enabled:t,queryKey:["jobPost",{jid:n,slug:r}],queryFn:()=>l({jid:n,slug:r})})}},79453:function(e,t,n){"use strict";var s=n(52322),r=n(13980),a=n.n(r),i=n(47023),l=n(1973);let o=e=>{let{tenantName:t,post:n,isLoading:r,isError:a,canAccess:o,deniedMessage:c,deniedDescription:d,children:m}=e;return r?(0,s.jsx)("div",{className:"w-full my-8",children:(0,s.jsx)(l.Z,{design:"wrapped",isLoading:!0,message:"Loading job post"})}):a?(0,s.jsx)("div",{className:"w-full my-8",children:(0,s.jsx)(l.Z,{description:"Something went wrong on our end. Please refresh the page to try again.",design:"wrapped",isError:!0,message:"Couldn't load this job post"})}):(null==n?void 0:n.jid)?o(n)?m:(0,s.jsx)("div",{className:"w-full my-8",children:(0,s.jsx)(l.Z,{action:(0,s.jsx)(i.Z,{design:"primary",href:"/hr/".concat(t,"/hiring/").concat(n.jid),children:"Back to job post"}),description:d,design:"wrapped",message:c})}):(0,s.jsx)("div",{className:"w-full my-8",children:(0,s.jsx)(l.Z,{action:(0,s.jsx)(i.Z,{design:"secondary",href:"/hr/".concat(t,"/hiring/"),children:"Back to hiring"}),description:"We couldn't find this job post. It may have been removed, or the link may be incorrect.",design:"wrapped",message:"Job post not found"})})};o.propTypes={tenantName:a().string,post:a().shape({jid:a().string,status:a().string}),isLoading:a().bool.isRequired,isError:a().bool.isRequired,canAccess:a().func.isRequired,deniedMessage:a().string.isRequired,deniedDescription:a().string.isRequired,children:a().node},t.Z=o},7896:function(e,t,n){"use strict";function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(null,arguments)}n.d(t,{Z:function(){return s}})},31461:function(e,t,n){"use strict";function s(e,t){if(null==e)return{};var n={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;n[s]=e[s]}return n}n.d(t,{Z:function(){return s}})},88960:function(e,t,n){"use strict";
1function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{Z:function(){return s}})}},function(e){e.O(0,[4976,6139,5351,9603,6014,270,8422,2888,9774,179],function(){return e(e.s=92947)}),_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.