1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7639],{1662:(e,t,n)=>{n.d(t,{f:()=>a,y:()=>o});var l=n(21462);let o="hiair:post-onboarding-tour";function a(){let[e,t]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{try{"1"===sessionStorage.getItem(o)&&(sessionStorage.removeItem(o),t(!0))}catch(e){}},[]),e}},17639:(e,t,n)=>{n.d(t,{A:()=>tu});var l=n(23798),o=n(21462),a=n(65396),i=n(59670),r=n(5240),s=n(35243),c=n(39811),d=n(46254),p=n(1618),u=n(61253),x=n(38038),h=n(89577),m=n.n(h),g=n(40568),f=n(89277),b=n(84480),j=n(11499),y=n(3673),v=n(57073),A=n(34245),w=n(51998),k=n(44181),C=n(42830),S=n(82770),I=n(38847),z=n(4522),_=n(82734);let T=e=>{let{isOpen:t,onClose:n,filters:i,onApply:u,defaultSort:x="date_added",signedIn:h,isAdmin:m}=e,[g,f]=(0,o.useState)(i),[j,T]=(0,o.useState)(""),[R,E]=(0,o.useState)(""),[M,D]=(0,o.useState)([]),[L,P]=(0,o.useState)(!1);(0,o.useEffect)(()=>{f(i)},[i,t]),(0,o.useEffect)(()=>{t&&!M.length&&(0,C.LD)().then(D).catch(()=>void 0)},[t,M.length]);let W=()=>{let e=j.trim();!e||g.locations.includes(e)||(f(t=>({...t,locations:[...t.locations,e]})),T(""))};return(0,l.jsxs)(y.Ay,{anchor:"right",open:t,onClose:n,PaperProps:{sx:{width:{xs:"90%",sm:"420px"}}},children:[(0,l.jsxs)(s.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",p:2,bgcolor:"background.default",borderBottom:"1px solid",borderColor:"divider"},children:[(0,l.jsxs)(s.A,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,l.jsx)(r.A,{onClick:n,children:(0,l.jsx)(k.A,{})}),(0,l.jsx)(c.A,{variant:"h6",children:"Filters"})]}),(0,l.jsxs)(s.A,{sx:{display:"flex",gap:1},children:[(0,l.jsx)(p.A,{onClick:()=>f({...S.c2,sort:x}),children:"Clear"}),(0,l.jsx)(p.A,{variant:"contained",onClick:()=>{u(g),n()},children:"Apply"})]})]}),(0,l.jsxs)(s.A,{sx:{p:2,display:"flex",flexDirection:"column",gap:2,bgcolor:"background.default",height:"100%"},children:[(0,l.jsxs)(s.A,{sx:{p:2,borderRadius:"10px",bgcolor:"background.paper",border:"1px solid",borderColor:"divider"},children:[(0,l.jsx)(c.A,{sx:{...(0,z.ji)("tag"),mb:1},children:"Experience level"}),(0,l.jsx)(w.A,{container:!0,spacing:1,children:S.bp.map(e=>(0,l.jsx)(w.A,{size:6,children:(0,l.jsxs)(s.A,{display:"flex",alignItems:"center",sx:{borderRadius:"8px",px:1,bgcolor:"action.hover",cursor:"pointer"},onClick:()=>(e=>{f(t=>({...t,levels:t.levels.includes(e)?t.levels.filter(t=>t!==e):[...t.levels,e]}))})(e),children:[(0,l.jsx)(v.A,{size:"small",checked:g.levels.includes(e)}),(0,l.jsx)(c.A,{variant:"subtitle2",children:e})]})},e))})]}),(0,l.jsxs)(s.A,{sx:{p:2,borderRadius:"10px",bgcolor:"background.paper",border:"1px solid",borderColor:"divider"},children:[(0,l.jsx)(c.A,{sx:{...(0,z.ji)("tag"),mb:1},children:"Company"}),(0,l.jsx)(A.A,{options:M.filter(e=>!g.companies.includes(e)),inputValue:R,onInputChange:(e,t)=>
1E(t),onChange:(e,t)=>{t&&(f(e=>({...e,companies:[...e.companies,t]})),E(""))},noOptionsText:(0,l.jsx)(p.A,{size:"small",onMouseDown:e=>e.preventDefault(),onClick:()=>P(!0),sx:{textTransform:"none"},children:R.trim()?"Request â".concat(R.trim(),"â"):"Request a company"}),renderInput:e=>(0,l.jsx)(a.A,{...e,size:"small",label:"Search company"})}),(0,l.jsx)(p.A,{size:"small","data-testid":"request-company-drawer",onClick:()=>P(!0),sx:{mt:1,px:0,textTransform:"none",color:"text.secondary"},children:"Donât see a company? Request it"}),(0,l.jsx)(s.A,{display:"flex",flexWrap:"wrap",gap:1,mt:2,children:g.companies.map(e=>(0,l.jsx)(d.A,{label:e,onDelete:()=>f(t=>({...t,companies:t.companies.filter(t=>t!==e)})),deleteIcon:(0,l.jsx)(b.A,{})},e))})]}),(0,l.jsxs)(s.A,{sx:{p:2,borderRadius:"10px",bgcolor:"background.paper",border:"1px solid",borderColor:"divider"},children:[(0,l.jsx)(c.A,{sx:{...(0,z.ji)("tag"),mb:1},children:"Minimum compensation"}),(0,l.jsx)(s.A,{display:"flex",flexWrap:"wrap",gap:1,children:S.bD.map(e=>{let t=g.salaryMin===e;return(0,l.jsx)(d.A,{label:(0,I.AX)(e),size:"small",variant:t?"filled":"outlined",color:t?"primary":"default",onClick:()=>f(n=>({...n,salaryMin:t?void 0:e}))},e)})}),(0,l.jsx)(c.A,{variant:"caption",sx:{display:"block",mt:1.5,color:"text.secondary"},children:"Roughly 9% of listings publish a salary, so this narrows results sharply. Postings without one are hidden, and figures are compared as written without converting currencies."})]}),m&&(0,l.jsxs)(s.A,{sx:{p:2,borderRadius:"10px",bgcolor:"background.paper",border:"1px solid",borderColor:"divider"},children:[(0,l.jsx)(c.A,{sx:{...(0,z.ji)("tag"),mb:1},children:"ATS"}),(0,l.jsx)(w.A,{container:!0,spacing:1,children:S.nK.map(e=>{var t;return(0,l.jsx)(w.A,{size:6,children:(0,l.jsxs)(s.A,{display:"flex",alignItems:"center",sx:{borderRadius:"8px",px:1,bgcolor:"action.hover",cursor:"pointer"},onClick:()=>(e=>{f(t=>{var n;let l=null!=(n=t.domains)?n:[];return{...t,domains:l.includes(e)?l.filter(t=>t!==e):[...l,e]}})})(e.value),children:[(0,l.jsx)(v.A,{size:"small",checked:(null!=(t=g.domains)?t:[]).includes(e.value)}),(0,l.jsx)(c.A,{variant:"subtitle2",children:e.label})]})},e.value)})})]}),(0,l.jsxs)(s.A,{sx:{p:2,borderRadius:"10px",bgcolor:"background.paper",border:"1px solid",borderColor:"divider"},children:[(0,l.jsx)(c.A,{sx:{...(0,z.ji)("tag"),mb:1},children:"Location"}),(0,l.jsxs)(s.A,{display:"flex",gap:2,children:[(0,l.jsx)(a.A,{size:"small",fullWidth:!0,label:"City or Remote",value:j,onChange:e=>T(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),W())}}),(0,l.jsx)(p.A,{variant:"contained",onClick:W,children:"Add"})]}),(0,l.jsx)(s.A,{display:"flex",flexWrap:"wrap",gap:1,mt:2,children:g.locations.map(e=>(0,l.jsx)(d.A,{label:e,onDelete:()=>f(t=>({...t,locations:t.locations.filter(t=>t!==e)})),deleteIcon:(0,l.jsx)(b.A,{})},e))})]})]}),(0,l.jsx)(_.A,{open:L,onClose:()=>P(!1),kind:"company_add",defaultSubject:R.trim(),source:"filter_drawer",signedIn:h})]})};var R=n(42523),E=n(49691),M=n(33381),D=n(93180),L=n(84201),P=n(21645),W=n(60935),q=n(46287),N=n(12504),O=n(35640),F=n(99943),H=n(69215),B=n(64033),U=n(83283);let X=e=>t=>({height:32,borderRadius:8,fontWeight:500,px:1.5,flexShrink:0,borderColor:e?(0,L.X4)(t.palette.primary.main,.5):t.palette.divider,bgcolor:e?(0,L.X4)(t.palette.primary.main,"dark"===t.palette.mode?.18:.1):t.palette.background.paper,color:e?"dark"===t.palette.mode?t.palette.primary.main:t.palette.primary.dark:t.palette.text.primary,"&:hover":{bgcolor:e?(0,L.X4)(t.palette.primary.main,"dark"===t.palette.mode?.26:.16):t.palette.action.hover,borderColor:e?t.palette.primary.main:t.palette.text.primary}}),G={px:1,pb:1,fontFamily:'"Fragment Mono", monospace',fontSize:"0.62rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"text.secondary"},K=e=>{var t,n,r,u;let{filters:x,feedMode:h,feedModeHref:g,forYou:b,onToggleForYou:j,signedIn:y,isAdmin:w,onFiltersChange:k,onOpenAllFilters:z}=e,[T,L]=(0,o.useState)(null),[K,Y]=(0,o.useState)(null),[J,V]=(0,o.useState)(null),[Q,$]=(0,o.useState)(null),[Z,ee]=(0,o.useState)(null),[et,en]=(0,o.useState)([]),[el,eo]=(0,o.useState)([]),[ea,ei]=(0,o.useState)(""),[er,es]=(0,o.useState)(""),[ec,ed]=(0,o.useState)(!1);(0,o.useEffect)(()=>{(0,C.PB)().then(en).catch(()=>void 0),(0,C.fetchMarketplaceLocations)().then(eo).catch(()=>void 0)},[]);let ep=x.locations.some(e=>"remote"===e.toLowerCase()),eu=x.locations.filter(e=>"remote"!==e.toLowerCase()).length,ex=(0,o.useMemo)(()=>{let e=ea.trim().toLowerCase();return et.filter(e=>!!e.companyname).filter(t=>!e||t.companyname.toLowerCase().includes(e)).slice(0,50)},[et,ea]),eh=e=>{k({...x,companies:x.companies.includes(e)?x.companies.filter(t=>t!==e):[...x.companies,e]})},em=(0,o.useMemo)(()=>{let e=er.trim().toLowerCase();return el.filter(e=>"remote"!==e.toLowerCase()).filter(e=>!x.locations.includes(e)).filter(t=>!e||t.toLowerCase().includes(e)).slice(0,50)},[el,er,x.locations]),eg=e=>{let t=(null!=e?e:er).trim();!t||x.locations.includes(t)||(k({...x,locations:[...x.locations,t]}),es(""))},ef=()=>{V(null),ed(!0)};return(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",gap:1,overflowX:"auto",px:{xs:2,md:3},py:1.25,borderBottom:"1px solid",borderColor:"divider",bgcolor:"background.paper","&::-webkit-scrollbar":{display:"none"}},children:[(0,l.jsx)(p.A,{component:m(),href:g("all"),variant:"outlined",size:"small","data-testid":"feed-mode-all","aria-current":"all"===h?"page":void 0,sx:X("all"===h),children:"All jobs"}),(0,l.jsx)(p.A,{component:m(),href:y?g("saved"):"/auth/login",variant:"outlined",size:"small","data-testid":"feed-mode-saved","aria-current":"saved"===h?"page":void 0,startIcon:(0,l.jsx)(N.A,{s
1x:{fontSize:16}}),sx:X("saved"===h),children:"Saved"}),"saved"!==h&&(0,l.jsxs)(l.Fragment,{children:[y&&j&&(0,l.jsx)(p.A,{variant:"outlined",size:"small","data-testid":"filter-for-you","aria-pressed":b,onClick:j,startIcon:(0,l.jsx)(B.A,{sx:{fontSize:16}}),sx:X(!!b),children:"For you"}),(0,l.jsx)(R.A,{orientation:"vertical",flexItem:!0,sx:{mx:.5,display:y?"block":"none"}}),(0,l.jsxs)(p.A,{variant:"outlined",size:"small",endIcon:(0,l.jsx)(P.A,{}),onClick:e=>ee(e.currentTarget),sx:X(!1),children:["Sort: ",null!=(n=null==(t=I.mm.find(e=>e.value===x.sort))?void 0:t.label)?n:"Date added"]}),(0,l.jsxs)(p.A,{variant:"outlined",size:"small",startIcon:(0,l.jsx)(O.A,{sx:{fontSize:16}}),endIcon:(0,l.jsx)(P.A,{}),onClick:e=>Y(e.currentTarget),sx:X(x.levels.length>0),children:["Experience level",x.levels.length?" (".concat(x.levels.length,")"):""]}),(0,l.jsxs)(p.A,{variant:"outlined",size:"small",startIcon:(0,l.jsx)(F.A,{sx:{fontSize:16}}),endIcon:(0,l.jsx)(P.A,{}),onClick:e=>V(e.currentTarget),sx:X(x.companies.length>0),children:["Company",x.companies.length?" (".concat(x.companies.length,")"):""]}),(0,l.jsxs)(p.A,{variant:"outlined",size:"small",startIcon:(0,l.jsx)(H.A,{sx:{fontSize:16}}),endIcon:(0,l.jsx)(P.A,{}),onClick:e=>$(e.currentTarget),sx:X(eu>0||ep),children:["Location",eu+ +!!ep?" (".concat(eu+ +!!ep,")"):""]}),w&&(0,l.jsxs)(p.A,{variant:"outlined",size:"small","data-testid":"filter-ats",startIcon:(0,l.jsx)(q.A,{sx:{fontSize:16}}),endIcon:(0,l.jsx)(P.A,{}),onClick:e=>L(e.currentTarget),sx:X((null!=(r=x.domains)?r:[]).length>0),children:["ATS",(null!=(u=x.domains)?u:[]).length?" (".concat(x.domains.length,")"):""]}),(0,l.jsx)(p.A,{variant:"outlined",size:"small",startIcon:(0,l.jsx)(W.A,{}),onClick:z,sx:X(!1),children:"All filters"})]}),(0,l.jsx)(E.Ay,{open:!!K,anchorEl:K,onClose:()=>Y(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,l.jsxs)(s.A,{sx:{width:280,p:1.5},children:[(0,l.jsx)(c.A,{sx:G,children:"Experience level"}),S.bp.map(e=>(0,l.jsx)(M.A,{sx:{display:"flex",mx:0,px:1},control:(0,l.jsx)(v.A,{size:"small",checked:x.levels.includes(e),onChange:()=>(e=>{k({...x,levels:x.levels.includes(e)?x.levels.filter(t=>t!==e):[...x.levels,e]})})(e)}),label:(0,l.jsx)(c.A,{variant:"body2",children:e})},e))]})}),(0,l.jsx)(E.Ay,{open:!!J,anchorEl:J,onClose:()=>V(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,l.jsxs)(s.A,{sx:{width:340,p:1.5},onClick:e=>e.stopPropagation(),children:[(0,l.jsx)(c.A,{sx:G,children:"Company"}),(0,l.jsx)(s.A,{sx:{px:1},children:(0,l.jsx)(a.A,{size:"small",fullWidth:!0,autoFocus:!0,placeholder:"Search company",value:ea,onChange:e=>ei(e.target.value),InputProps:{startAdornment:(0,l.jsx)(i.A,{position:"start",children:(0,l.jsx)(f.A,{sx:{fontSize:18,color:"text.secondary"}})})}})}),x.companies.length>0&&(0,l.jsx)(s.A,{sx:{display:"flex",flexWrap:"wrap",gap:1,mt:1.5,px:1},children:x.companies.map(e=>(0,l.jsx)(d.A,{label:e,size:"small",onDelete:()=>eh(e)},e))}),(0,l.jsx)(s.A,{sx:{mt:1,maxHeight:280,overflowY:"auto"},children:0===ex.length?(0,l.jsxs)(s.A,{sx:{px:1,py:2,display:"flex",flexDirection:"column",alignItems:"flex-start",gap:1.25},children:[(0,l.jsx)(c.A,{variant:"body2",sx:{color:"text.secondary"},children:"No companies found"}),(0,l.jsx)(p.A,{size:"small",variant:"outlined","data-testid":"request-company-empty",onClick:ef,sx:{textTransform:"none"},children:ea.trim()?"Request â".concat(ea.trim(),"â"):"Request a company"})]}):ex.map(e=>(0,l.jsxs)(s.A,{onClick:()=>eh(e.companyname),sx:{display:"flex",alignItems:"center",gap:1.5,px:1,py:.75,borderRadius:1,cursor:"pointer","&:hover":{bgcolor:"action.hover"}},children:[(0,l.jsx)(v.A,{size:"small",sx:{p:0},checked:x.companies.includes(e.companyname)}),(0,l.jsx)(U.A,{name:e.companyname,logoUrl:e.companylogourl,size:28}),(0,l.jsx)(c.A,{variant:"body2",noWrap:!0,children:e.companyname})]},e.companyname))}),ex.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R.A,{sx:{mt:1}}),(0,l.jsx)(p.A,{fullWidth:!0,size:"small","data-testid":"request-company-footer",onClick:ef,sx:{mt:.5,justifyContent:"flex-start",textTransform:"none",color:"text.secondary"},children:ea.trim()?"Request â".concat(ea.trim(),"â"):"Missing a company? Request it"})]})]})}),(0,l.jsx)(E.Ay,{open:!!Q,anchorEl:Q,onClose:()=>$(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,l.jsxs)(s.A,{sx:{width:320,p:1.5},children:[(0,l.jsx)(c.A,{sx:G,children:"Location"}),(0,l.jsx)(M.A,{sx:{display:"flex",mx:0,px:1},control:(0,l.jsx)(v.A,{size:"small",checked:ep,onChange:()=>{k({...x,locations:ep?x.locations.filter(e=>"remote"!==e.toLowerCase()):[...x.locations,"Remote"]})}}),label:(0,l.jsx)(c.A,{variant:"body2",children:"Remote"})}),(0,l.jsxs)(s.A,{sx:{display:"flex",gap:1,px:1,mt:1},children:[(0,l.jsx)(A.A,{freeSolo:!0,fullWidth:!0,options:em,filterOptions:e=>e,inputValue:er,onInputChange:(e,t)=>
1es(t),onChange:(e,t)=>{"string"==typeof t&&eg(t)},renderInput:e=>(0,l.jsx)(a.A,{...e,size:"small",label:"City or region"})}),(0,l.jsx)(p.A,{variant:"contained",onClick:()=>eg(),children:"Add"})]}),(0,l.jsx)(s.A,{sx:{display:"flex",flexWrap:"wrap",gap:1,mt:1.5,px:1},children:x.locations.filter(e=>"remote"!==e.toLowerCase()).map(e=>(0,l.jsx)(d.A,{label:e,size:"small",onDelete:()=>k({...x,locations:x.locations.filter(t=>t!==e)})},e))})]})}),(0,l.jsx)(E.Ay,{open:!!T,anchorEl:T,onClose:()=>L(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,l.jsxs)(s.A,{sx:{width:240,p:1.5},children:[(0,l.jsx)(c.A,{sx:G,children:"ATS"}),S.nK.map(e=>{var t;return(0,l.jsx)(M.A,{sx:{display:"flex",mx:0,px:1},control:(0,l.jsx)(v.A,{size:"small",checked:(null!=(t=x.domains)?t:[]).includes(e.value),onChange:()=>(e=>{var t;let n=null!=(t=x.domains)?t:[];k({...x,domains:n.includes(e)?n.filter(t=>t!==e):[...n,e]})})(e.value)}),label:(0,l.jsx)(c.A,{variant:"body2",children:e.label})},e.value)})]})}),(0,l.jsx)(E.Ay,{open:!!Z,anchorEl:Z,onClose:()=>ee(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,l.jsxs)(s.A,{sx:{width:200,p:1.5},children:[(0,l.jsx)(c.A,{sx:G,children:"Sort by"}),I.mm.map(e=>(0,l.jsx)(M.A,{sx:{display:"flex",mx:0,px:1},control:(0,l.jsx)(D.A,{size:"small",checked:x.sort===e.value,onChange:()=>(e=>{e!==x.sort&&k({...x,sort:e})})(e.value)}),label:(0,l.jsx)(c.A,{variant:"body2",children:e.label})},e.value))]})}),(0,l.jsx)(_.A,{open:ec,onClose:()=>ed(!1),kind:"company_add",defaultSubject:ea.trim(),source:"filter_bar",signedIn:y})]})};var Y=n(55913),J=n(28744),V=n(34709),Q=n(17999),$=n(24155),Z=n(27567),ee=n(81414),et=n(3816),en=n(19260),el=n(63855),eo=n(34541),ea=n(5476),ei=n(68877),er=n(92766),es=n(55381),ec=n(24557),ed=n(73408),ep=n(6086);let eu=new Set(["queued","running","waiting_for_you"]),ex={queued:(0,l.jsx)(eo.A,{sx:{fontSize:18}}),running:(0,l.jsx)(ea.A,{sx:{fontSize:18,"@keyframes quickApplySpin":{to:{transform:"rotate(360deg)"}},animation:"quickApplySpin 2.4s linear infinite"}}),waiting_for_you:(0,l.jsx)(ei.A,{sx:{fontSize:17}}),needs_human:(0,l.jsx)(er.A,{sx:{fontSize:18}}),succeeded:(0,l.jsx)(en.A,{sx:{fontSize:20}})},eh=e=>{let{job:t,applyRun:n,applying:o,onQuickApply:a}=e,i=(0,Q.A)();if(!a||!t.joblink)return null;let c=null==n?void 0:n.status,d="dark"===i.palette.mode;if(c&&ex[c]){let e=(0,z.Mb)(i,ed.TS[c]||"neutral"),t="succeeded"===c?"Applied":ed.LM[c]||c;return(0,l.jsx)(Z.A,{title:t,placement:"left",children:(0,l.jsxs)(s.A,{role:"img","aria-label":"Application ".concat(t.toLowerCase()),"data-testid":"job-quick-apply-status",sx:{position:"relative",width:40,height:40,borderRadius:"50%",display:"grid",placeItems:"center",flexShrink:0,color:e,border:"1px solid ".concat((0,L.X4)(e,.4)),bgcolor:(0,L.X4)(e,d?.16:.09)},children:[ex[c],eu.has(c)&&(0,l.jsx)(s.A,{"aria-hidden":!0,sx:{position:"absolute",right:1,bottom:1,width:8,height:8,borderRadius:"50%",bgcolor:e,border:"1.5px solid",borderColor:"background.paper","@keyframes quickApplyPulse":{"0%":{opacity:1},"50%":{opacity:.35},"100%":{opacity:1}},animation:"quickApplyPulse 1.6s ease-in-out infinite"}})]})})}let p=!!(c&&ed.F4.has(c)),u=i.palette.primary.main,x=o?"Queuingâ¦":p?"Retry application":"Queue application";return(0,l.jsx)(Z.A,{title:x,placement:"left",children:(0,l.jsx)(s.A,{component:"span",sx:{display:"inline-flex",flexShrink:0},children:(0,l.jsx)(r.A,{"data-testid":"job-quick-apply-button","aria-label":"".concat(x," to ").concat(t.jobtitle),disabled:o,onClick:()=>a(t),sx:{width:40,height:40,p:0,transition:"transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:active":{transform:"scale(0.94)"},...p?{color:u,border:"1px dashed ".concat((0,L.X4)(u,.6)),bgcolor:(0,L.X4)(u,d?.12:.06),"&:hover":{bgcolor:(0,L.X4)(u,d?.22:.12),transform:"scale(1.06)"}}:{color:"primary.contrastText",bgcolor:"primary.main",boxShadow:"0 2px 10px ".concat((0,L.X4)(u,.35)),"&:hover":{bgcolor:"primary.dark",boxShadow:"0 4px 14px ".concat((0,L.X4)(u,.45)),transform:"translateY(-1px) scale(1.06)"}},"&.Mui-disabled":{color:"primary.contrastText",bgcolor:(0,L.X4)(u,.45),boxShadow:"none"}},children:o?(0,l.jsx)(J.A,{size:16,thickness:5,sx:{color:"inherit"}}):p?(0,l.jsx)(el.A,{sx:{fontSize:19}}):(0,l.jsx)(es.n,{icon:ec.A,size:18,color:"currentColor",strokeWidth:1.7})})})})},em=o.memo(e=>{var t;let{job:n,index:o,selected:a,onSelect:i,saved:d,onToggleSave:p,onDismiss:u,applyRun:x,applying:h,onQuickApply:m}=e,g=(0,I.wR)(n.dateadded),f=(0,I.NN)(n.joblocation),b=[n.joblocation,f&&!(null==(t=n.joblocation)?void 0:t.toLowerCase().includes(f.toLowerCase()))?"(".concat(f,")"):null].filter(
1Boolean).join(" "),j="number"==typeof n.match_score,y=!!(m&&n.joblink),v=!!(p||u);return(0,l.jsxs)(s.A,{role:"button",tabIndex:0,"aria-pressed":a,onClick:()=>i(n,o),onKeyDown:e=>{e.target===e.currentTarget&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),i(n,o))},sx:{display:"flex",gap:1.5,width:"100%",textAlign:"left",borderBottom:"1px solid",borderColor:"divider",borderLeft:a?"3px solid":"3px solid transparent",borderLeftColor:a?"primary.main":"transparent",bgcolor:a?"action.selected":"transparent",px:2,py:1.75,cursor:"pointer",userSelect:"none",color:"text.primary",transition:"background-color 120ms ease","&:hover":{bgcolor:a?"action.selected":"action.hover"},"&:focus-visible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:-2},"@media (hover: hover)":{"& .rowAction":{opacity:0,transition:"opacity 120ms ease"},"& .rowActionPinned":{opacity:1},"&:hover .rowAction, &:focus-within .rowAction":{opacity:1}}},children:[(0,l.jsx)(U.A,{name:n.companyname,logoUrl:n.companylogourl,size:48}),(0,l.jsxs)(s.A,{sx:{minWidth:0,flex:1},children:[(0,l.jsx)(c.A,{sx:{color:"text.primary",fontWeight:600,fontSize:"1rem",lineHeight:1.3},noWrap:!0,children:n.jobtitle}),(0,l.jsx)(c.A,{variant:"body2",noWrap:!0,sx:{color:"text.primary"},children:n.companyname}),b&&(0,l.jsx)(c.A,{variant:"body2",noWrap:!0,color:"text.secondary",children:b}),(0,I.jV)(n)&&(0,l.jsx)(c.A,{variant:"body2",sx:{mt:.25,fontWeight:500},children:n.jobsalaryrange}),(0,l.jsx)(c.A,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:.75},children:[n.joblevel,n.employment_type,g].filter(Boolean).join(" \xb7 ")})]}),(j||y||v)&&(0,l.jsxs)(s.A,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-end",justifyContent:"space-between",gap:.75,flexShrink:0},children:[j||y?(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",gap:1},onClick:e=>e.stopPropagation(),children:[y&&(0,l.jsx)(eh,{job:n,applyRun:x,applying:h,onQuickApply:m}),j&&(0,l.jsx)(ep.Ay,{score:n.match_score,size:40})]}):(0,l.jsx)(s.A,{}),v&&(0,l.jsxs)(s.A,{sx:{display:"flex",mr:-.75},onClick:e=>e.stopPropagation(),children:[p&&(0,l.jsx)(Z.A,{title:d?"Unsave":"Save",children:(0,l.jsx)(r.A,{size:"small",className:d?"rowAction rowActionPinned":"rowAction","aria-label":d?"Unsave job":"Save job",onClick:()=>p(n),sx:{color:d?"primary.main":"text.disabled","&:hover":{color:"primary.main"}},children:d?(0,l.jsx)(ee.A,{fontSize:"small"}):(0,l.jsx)(N.A,{fontSize:"small"})})}),u&&(0,l.jsx)(Z.A,{title:"Not interested",children:(0,l.jsx)(r.A,{size:"small",className:"rowAction","aria-label":"Not interested",onClick:()=>u(n),sx:{color:"text.disabled","&:hover":{color:"error.main"}},children:(0,l.jsx)(et.A,{fontSize:"small"})})})]})]})]})});var eg=n(48625),ef=n(92168);let eb=[],ej=null,ey=null,ev=!1,eA=new Set,ew=(e,t,n)=>{let l=(()=>{let e="https://hiair-jobs-be-mljpbytsnq-wl.a.run.app";return e?"".concat(e.replace(/\/$/,""),"/jobs/events"):""})();l&&e.length&&fetch(l,{method:"POST",keepalive:n,headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({events:e})}).catch(()=>void 0)},ek=(e,t)=>{for(;eb.length;)ew(eb.splice(0,100),e,t)},eC=()=>{if(ej&&(clearTimeout(ej),ej=null),!eb.length)return;let e=ef.j2.currentUser;if(!e){eb=[];return}e.getIdToken().then(e=>{ey=e,ek(e,!1)}).catch(()=>void 0)},eS=()=>{ej&&(clearTimeout(ej),ej=null),eb.length&&ey&&ek(ey,!0)},eI=e=>{let t=ef.j2.currentUser;if(t){if("impression"===e.event){var n;let t="".concat(null!=(n=e.source)?n:"",":").concat(e.job_id);if(eA.has(t))return;eA.add(t)}if(eb.push(e),ev||(ev=!0,window.addEventListener("pagehide",eS),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&eS()})),ey||t.getIdToken().then(e=>{ey=e}).catch(()=>void 0),eb.length>=100)return void eC();ej||(ej=setTimeout(eC,2500))}},ez=e=>{let{jobs:t,total:n,hasMore:a,loadingMore:i,onLoadMore:r,signupHref:d,signedIn:p,savedIds:u,onToggleSave:x,onDismiss:h,eventSource:m,emptyTitle:f="No roles match those filters",emptySubtitle:b="Try a different search, company, location, or experience level.",emptyAction:j,profileGap:y,applyingJobId:v,runForJob:A,cancellingRunId:w,answeringRunId:k,continuingRunId:C,answerError:S,onAgentApply:_,onQuickApply:T,onCancelApply:R,onAnswerApply:E,onContinueApply:M,creditSummary:D,onShowPlans:L}=e,P=(0,g.useRouter)(),W=(0,Q.A)(),q=(0,Y.A)(W.breakpoints.up("md"),{noSsr:!0}),[N,O]=(0,o.useState)(null),[F,H]=(0,o.useState)(!1),B=(0,o.useRef)(null),U=(0,o.useRef)(null),X=(0,o.useRef)(new Map),G=(0,o.useCallback)(e=>{let t=null==e?void 0:e.dataset.jobId;e&&t&&X.current.set(t,e)},[]);(0,o.useEffect)(()=>
1{if(!t.length){O(null),H(!1);return}O(e=>{let n=e?t.find(t=>t.job_id===e.job_id):void 0;return null!=n?n:t[0]})},[t]),(0,o.useEffect)(()=>{let e=B.current,t=U.current;if(!e||!t)return;let n=new IntersectionObserver(e=>{var t;(null==(t=e[0])?void 0:t.isIntersecting)&&a&&!i&&r()},{root:e,threshold:.2});return n.observe(t),()=>n.disconnect()},[a,i,r,t.length]),(0,o.useEffect)(()=>{if(!m)return;let e=B.current;if(!e)return;let t=new IntersectionObserver(e=>{e.forEach(e=>{var n;if(!e.isIntersecting)return;let l=e.target,o=l.dataset.jobId;o&&(eI({job_id:o,event:"impression",source:m,position:Number(null!=(n=l.dataset.position)?n:0),match_score:l.dataset.matchScore?Number(l.dataset.matchScore):void 0}),t.unobserve(l))})},{root:e,threshold:.5});return X.current.forEach((e,n)=>{if(!e.isConnected)return void X.current.delete(n);t.observe(e)}),()=>t.disconnect()},[m,t]),(0,o.useEffect)(()=>()=>eC(),[]);let K=(0,o.useCallback)((e,t)=>{O(e),H(!0),m&&eI({job_id:e.job_id,event:"click",source:m,position:t,match_score:"number"==typeof e.match_score?e.match_score:void 0})},[m]);if(!t.length)return(0,l.jsx)(s.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,px:3,py:8,bgcolor:"background.paper"},children:(0,l.jsxs)(s.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:1,maxWidth:420,px:4,py:5,border:"1px dashed",borderColor:"divider",borderRadius:"10px"},children:[(0,l.jsx)($.A,{sx:{fontSize:32,color:"text.disabled"}}),(0,l.jsx)(c.A,{component:"span",sx:(0,z.ji)("tag"),children:"Nothing on this page"}),(0,l.jsx)(c.A,{variant:"h6",children:f}),(0,l.jsx)(c.A,{variant:"body2",color:"text.secondary",children:b}),j&&(0,l.jsx)(s.A,{sx:{mt:1},children:j})]})});let Z=(0,l.jsxs)(s.A,{sx:{width:{xs:"100%",md:400},flexShrink:0,display:F&&!q?"none":"flex",flexDirection:"column",borderRight:{md:"1px solid"},borderColor:{md:"divider"},bgcolor:"background.paper",minHeight:0},children:[(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"baseline",justifyContent:"space-between",px:2,py:1.25,borderBottom:"1px solid",borderColor:"divider"},children:[(0,l.jsxs)(s.A,{sx:{display:"inline-flex",flexDirection:"column",gap:"3px"},children:[(0,l.jsx)(c.A,{component:"span",sx:{fontFamily:'"Fragment Mono", monospace',fontSize:"0.68rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"text.secondary"},children:(0,I.fi)(n)}),(0,l.jsx)(s.A,{component:"svg","aria-hidden":!0,viewBox:"0 0 120 4",preserveAspectRatio:"none",sx:{width:"100%",height:3,display:"block",color:"primary.main"},children:(0,l.jsx)("path",{d:"M1 3 Q 15 0.8 30 2.4 T 60 1.9 T 90 2.6 T 119 1.6",stroke:"currentColor",strokeWidth:"1.6",fill:"none",strokeLinecap:"round"})})]}),(0,l.jsx)(c.A,{component:"span",sx:{fontFamily:'"Fragment Mono", monospace',fontSize:"0.62rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"text.secondary",opacity:.7},children:"Match"})]}),(0,l.jsxs)(s.A,{ref:B,sx:{flex:1,overflowY:"auto",minHeight:0},children:[t.map((e,t)=>(0,l.jsx)(s.A,{"data-job-id":e.job_id,"data-position":t,"data-match-score":"number"==typeof e.match_score?e.match_score:void 0,ref:G,children:(0,l.jsx)(em,{job:e,index:t,selected:(null==N?void 0:N.job_id)===e.job_id,onSelect:K,saved:null==u?void 0:u.has(e.job_id),onToggleSave:x,onDismiss:h,applyRun:T&&A?A(e):null,applying:v===e.job_id,onQuickApply:T})},e.job_id)),(0,l.jsx)(s.A,{ref:U,sx:{height:1}}),i&&(0,l.jsx)(s.A,{sx:{display:"flex",justifyContent:"center",py:2},children:(0,l.jsx)(J.A,{size:22})}),!a&&t.length>0&&(0,l.jsxs)(c.A,{sx:{...(0,z.ji)("tag"),py:3,textAlign:"center",opacity:.7},children:["\xb7 end of matches \xb7 ",n," roles indexed \xb7"]})]}),!p&&(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,px:2,py:1,borderTop:"1px solid",borderColor:"divider",bgcolor:"action.selected"},children:[(0,l.jsx)(c.A,{variant:"body2",fontWeight:600,color:"primary.dark",children:"Get job alerts for this search"}),(0,l.jsx)(V.A,{size:"small",onChange:()=>{P.push(d)},inputProps:{"aria-label":"Get job alerts"}})]})]}),ee=N&&A?A(N):null,et=(0,l.jsx)(s.A,{sx:{flex:1,minWidth:0,minHeight:0,display:q||F?"block":"none",bgcolor:"background.paper"},children:N?(0,l.jsx)(eg.A,{job:N,signupHref:d,onBack:q?void 0:()=>H(!1),signedIn:p,saved:null==u?void 0:u.has(N.job_id),onToggleSave:x?()=>x(N):void 0,onDismiss:h?()=>h(N):void 0,profileGap:y,applyRun:ee,applying:v===N.job_id,cancelling:w===(null==ee?void 0:ee.run_id),onAgentApply:_?()=>_(N):void 0,onCancelApply:R&&ee?()=>R(ee.run_id):void 0,answering:k===(null==ee?void 0:ee.run_id),continuing:C===(null==ee?void 0:ee.run_id),answerError:S,onAnswerApply:E&&ee?e=>E(ee.run_id,e):void 0,onContinueApply:M&&ee?()=>M(ee.run_id):void 0,creditSummary:D,onShowPlans:L}):(0,l.jsxs)(s.A,{sx:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:1,p:4},children:[(0,l.jsx)(c.A,{component:"span",sx:(0,z.ji)("tag"),children:"The reading pane"}),(0,l.jsx)(c.A,{variant:"body2",color:"text.secondary",children:"Select a role on the left to read it here."})]})});return(0,l.jsxs)(s.A,{sx:{display:"flex",flex:1,minHeight:0,bgcolor:"background.default"},children:[Z,et]})};var e_=n(73171),eT=n(79050),eR=n(13229);let eE=["Find roles that match my profile","Apply to everything I've saved","Any interviews this week?"],eM=o.memo(()=>{let e=(0,g.useRouter)(),[t,n]=(0,o.useState)(""),i=t=>{let n=null==t?void 0:t.trim();e.push(n?{pathname:"/agent",query:{prompt:n}}:"/agent")};return(0,l.jsxs)(s.A,{sx:{width:{lg:320,xl:420},minWidth:{lg:320,xl:420},display:{xs:"none",lg:"flex"},flexDirection:"column",borderLeft:"1px solid",borderColor:"divider",bgcolor:"background.paper",minHeight:0},children:[(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,l.jsx)(e_.A,{overlap:"circular",variant:"dot",anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiBadge-badge":{backgroundColor:"success.dark",color:"success.dark"}},children:(0,l.jsx)(eT.A,{src:"/owlbert.png",alt:"Owlbert AI",sx:{width:48,height:48}})}),(0,l.jsxs)(s.A,{children:[(0,l.jsx)(c.A,{fontWeight:600,children:"Owlbert"}),(0,l.jsx)(c.A,{component:"span",sx:(0,z.ji)("tag"),children:"Job search copilot"})]})]}),(0,l.jsx)(p.A,{variant:"outlined",size:"small",onClick:()=>i(),children:"Open chat"})]}),(0,l.jsxs)(s.A,{sx:{flex:1,overflowY:"auto",p:2,minHeight:0},children:[(0,l.jsx)(s.A,{sx:{p:1.5,borderRadius:"10px",border:"1px solid",borderColor:"divider",bgcolor:"background.default"},children:(0,l.jsx)(c.A,{variant:"body2",children:"Hi, I'm Owlbert. Tell me what you're looking for and I'll line up matching roles, tailor your resume, and fill the applications â you approve every step."})}),(0,l.jsx)(c.A,{component:"span",sx:{...(0,z.ji)("tag"),display:"block",mt:2.5,mb:1},children:"Try one of these"}),(0,l.jsx)(s.A,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",ga
1p:1},children:eE.map(e=>(0,l.jsx)(d.A,{label:e,variant:"outlined",onClick:()=>i(e),sx:{height:"auto",py:.75,"& .MuiChip-label":{whiteSpace:"normal"},"&:hover":{borderColor:"primary.main",bgcolor:e=>(0,L.X4)(e.palette.primary.main,.06)}}},e))})]}),(0,l.jsx)(s.A,{sx:{p:1.5,borderTop:"1px solid",borderColor:"divider"},children:(0,l.jsx)(a.A,{fullWidth:!0,multiline:!0,size:"small",minRows:2,maxRows:4,placeholder:"Message Owlbertâ¦",value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),i(t))},InputProps:{endAdornment:(0,l.jsx)(r.A,{size:"small","aria-label":"Start a chat with Owlbert",disabled:!t.trim(),onClick:()=>i(t),sx:{alignSelf:"flex-end",color:t.trim()?"primary.main":void 0},children:(0,l.jsx)(es.n,{icon:eR.A,size:18,color:"currentColor",strokeWidth:1.5})})},sx:{"& .MuiOutlinedInput-root":{alignItems:"flex-start"}}})})]})});var eD=n(27481),eL=n(12226);let eP=async()=>{var e;let t=await (null==(e=ef.j2.currentUser)?void 0:e.getIdToken());if(!t)throw Error("Not signed in");return{Authorization:"Bearer ".concat(t)}},eW=(e,t)=>"".concat((()=>{let e="https://hiair-jobs-be-mljpbytsnq-wl.a.run.app";if(!e)throw Error("NEXT_PUBLIC_MARKETPLACE_URL is not set");return e.replace(/\/$/,"")})(),"/jobs/").concat(encodeURIComponent(e),"/").concat(t),eq=async e=>{await eL.A.post(eW(e,"save"),void 0,{headers:await eP()})},eN=async e=>{await eL.A.delete(eW(e,"save"),{headers:await eP()})},eO=async e=>{await eL.A.post(eW(e,"dismiss"),void 0,{headers:await eP()})},eF=async e=>{await eL.A.delete(eW(e,"dismiss"),{headers:await eP()})};var eH=n(23172);let eB="hiair-marketplace-filters",eU=["levels","companies","locations","salarymin","domains"],eX=e=>Array.isArray(e)?e.filter(e=>"string"==typeof e).map(e=>e.trim()).filter(Boolean):[],eG="hiair-marketplace-geo-cleared",eK=e=>e.trim().toLowerCase(),eY=()=>(e=>{if("undefined"==typeof sessionStorage)return!1;try{return"1"===sessionStorage.getItem(e)}catch(e){return!1}})(eG),eJ=()=>{if("undefined"!=typeof sessionStorage)try{sessionStorage.setItem(eG,"1")}catch(e){}},eV=function(e,t){var n;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=eK(t);if(!o)return null;let a=e.filter(e=>{let t=eK(e);return!!t&&"remote"!==t});if(l.trim()){let e="".concat(t.trim(),", ").concat(l.trim()),n=a.find(t=>eK(t)===eK(e));if(n)return n}let i=a.find(e=>{let t=eK(e);return t.startsWith("".concat(o,","))||t.startsWith("".concat(o," "))});return i||(null!=(n=a.find(e=>eK(e).includes(o)))?n:null)},eQ=()=>"undefined"!=typeof navigator&&navigator.geolocation?new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>e({lat:t.coords.latitude,lng:t.coords.longitude}),()=>e(null),{enableHighAccuracy:!1,timeout:8e3,maximumAge:3e5})}):Promise.resolve(null),e$=null,eZ=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;return(null==(t=window.google)||null==(e=t.maps)?void 0:e.Geocoder)?Promise.resolve(new window.google.maps.Geocoder):new Promise(e=>{let t=Date.now(),l=window.setInterval(()=>{var o,a;if(null==(a=window.google)||null==(o=a.maps)?void 0:o.Geocoder){window.clearInterval(l),e(new window.google.maps.Geocoder);return}Date.now()-t>=n&&(window.clearInterval(l),e(null))},100)})},e0=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=null==e?void 0:e.find(e=>e.types.includes(t));return l?n?l.short_name:l.long_name:""},e1=async e=>{let t=await eZ();return t?new Promise(n=>{try{t.geocode({location:{lat:e.lat,lng:e.lng}},(e,t)=>{if("OK"!==t||!(null==e?void 0:e[0]))return void n(null);let l=e[0].address_components,o=e0(l,"locality")||e0(l,"postal_town")||e0(l,"sublocality"),a=e0(l,"administrative_area_level_1",!0);n(o?{city:o,state:a}:null)})}catch(e){n(null)}}):null},e2=async e=>{if("undefined"==typeof fetch)return null;let t="https://api-bdc.io/data/reverse-geocode-client?latitude=".concat(e.lat,"&longitude=").concat(e.lng,"&localityLanguage=en");try{let e=await fetch(t);if(!e.ok)return null;return(e=>{let t=(e.city||e.locality||"").trim();if(!t)return null;let n=(e.principalSubdivisionCode||"").trim();return{city:t,state:n.includes("-")?n.split("-").pop()||"":(e.principalSubdivision||"").trim()}})(await e.json())}catch(e){return null}},e5=async e=>{var t;return null!=(t=await e1(e))?t:e2(e)},e4=async function(){var e,t,l;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=null!=(e=o.getPosition)?e:eQ,i=null!=(t=o.reverseGeocode)?t:e5,r=null!=(l=o.fetchLocations)?l:async()=>{let{fetchMarketplaceLocations:e}=await Promise.resolve().then(n.bind(n,42830));return e()};try{let e=await a();if(!e)return null;let[t,n]=await Promise.all([i(e),r().catch(()=>[])]);if(!t||!n.length)return null;return eV(n,t.city,t.state)}catch(e){return null}},e3=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.getPosition||e.reverseGeocode||e.fetchLocations?e4(e):e$||(e$=e4(e).finally(()=>{e$=null}))};var e6=n(41444),e8=n(38572),e7=n(80214),e9=n(25602),te=n.n(e9),tt=n(85075),tn=n(3484);let tl=te()(()=>Promise.resolve().then(n.bind(n,85075)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),to=e=>{let{active:t,loading:n,jobs:a,runForJob:i}=e,{status:r}=(0,tn.I)(),s=(0,Q.A)(),c=(0,Y.A)(s.breakpoints.up("md"),{noSsr:!0}),[d,p]=(0,o.useState)(!1),[u,x]=(0,o.useState)(0),[h,m]=(0,o.useState)(null);(0,o.useEffect)(()=>{!h&&!n&&(null==r?void 0:r.paired)&&a.length&&m(a.filter(e=>e.joblink).slice().sort((e,t)=>
1{var n,l;return(null!=(n=t.match_score)?n:-1)-(null!=(l=e.match_score)?l:-1)}).slice(0,2))},[h,n,null==r?void 0:r.paired,a]);let g=(0,o.useMemo)(()=>r?r.paired?(null!=h?h:[]).map((e,t)=>{let n;return{target:(n=e.job_id,'[data-job-id="'.concat(n,'"] [data-testid="job-quick-apply-button"]')),content:0===t?"You're all set. Click here to queue this application â HiAir opens Chrome and fills it in for you.":"Try a second one so you can watch it queue up too.",disableBeacon:!0,spotlightClicks:!0,placement:"left"}}):c?[{target:'[data-testid="sidebar-cli-status"]',content:"One more thing â set up the HiAir CLI here so queued applications fill automatically in your Chrome.",disableBeacon:!0,placement:"right"}]:[]:[],[r,c,h]),f=e=>{e>=g.length?p(!0):x(e)};return((0,o.useEffect)(()=>{if(!(null==r?void 0:r.paired)||!i||!h)return;let e=h[u];e&&i(e)&&f(u+1)},[null==r?void 0:r.paired,i,h,u,g.length]),t&&!d&&g.length)?(0,l.jsx)(tl,{steps:g,run:!0,stepIndex:u,continuous:!0,showSkipButton:!0,callback:e=>{let{status:t,action:n,index:l,type:o}=e;(o===tt.EVENTS.STEP_AFTER||o===tt.EVENTS.TARGET_NOT_FOUND)&&f(l+(n===tt.ACTIONS.PREV?-1:1)),(t===tt.STATUS.FINISHED||t===tt.STATUS.SKIPPED)&&p(!0)},styles:{options:{primaryColor:s.palette.primary.main,zIndex:1500}}}):null};var ta=n(1662),ti=n(15469),tr=n(4776);let ts=(e,t,n)=>{if(e.some(e=>e.job_id===t.job_id))return e;let l=[...e];return l.splice(Math.max(0,Math.min(n,l.length)),0,t),l},tc=o.memo(e=>{let{activeSearch:t,onSubmit:n}=e,[s,c]=(0,o.useState)(t);return(0,o.useEffect)(()=>{c(t)},[t]),(0,l.jsx)(a.A,{fullWidth:!0,size:"small",placeholder:"Search jobs, companies, or keywords",value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),n(s.trim()))},InputProps:{startAdornment:(0,l.jsx)(i.A,{position:"start",children:(0,l.jsx)(f.A,{fontSize:"small"})}),endAdornment:s?(0,l.jsx)(i.A,{position:"end",children:(0,l.jsx)(r.A,{size:"small",onClick:()=>{c(""),n("")},children:(0,l.jsx)(b.A,{fontSize:"small"})})}):void 0},sx:{maxWidth:{md:480},"& .MuiOutlinedInput-root":{borderRadius:999}}})});tc.displayName="MarketplaceSearchField";let td=o.memo(e=>{let{firstName:t,total:n,forYou:o,feedMode:a}=e,i=new Date().getHours(),r=[new Date().toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}).toUpperCase().replace(/,/g," \xb7")];return"saved"===a?n>0&&r.push("".concat(n," saved")):(n>0&&r.push("".concat(n>99?"99+":n," matches")),o&&r.push("ranked for you")),(0,l.jsxs)(s.A,{sx:{px:{xs:2,md:3},pt:2,pb:1.5,bgcolor:"background.paper",borderBottom:"3px double",borderColor:"divider"},children:[(0,l.jsx)(c.A,{variant:"h5",sx:{fontWeight:400,letterSpacing:"-0.01em"},children:"saved"===a?"Your saved roles.":"Good ".concat(i<12?"morning":i<18?"afternoon":"evening").concat(t?", ".concat(t):"",".")}),(0,l.jsx)(c.A,{sx:{mt:.5,...(0,z.ji)("eyebrow")},children:r.join(" \xb7 ")})]})});td.displayName="MarketplaceMasthead";let tp=e=>{var t;let{role:n,feedMode:a}=e,i=(0,g.useRouter)(),{marketplaceUser:r,currentUser:h}=(0,e6.Z2)(),f=(0,e8.s)(),{runs:b,error:y,applyingJobId:v,cancellingRunId:A,answeringRunId:w,continuingRunId:k,queueApply:_,cancelRun:R,answerQuestions:E,continueRun:M,runForJob:D,profileGap:L,signedIn:P,creditSummary:W,paywallOpen:q,paywallReason:N,openPaywall:O,closePaywall:F}=(0,e7.$N)(),H=null!=(t=i.asPath.split("?")[1])?t:"",B=(0,o.useMemo)(()=>new URLSearchParams(H).get("foryou"),[H]),U="all"===a&&(null===B?!!h:"1"===B),X="saved"===a?S.Hm.saved:U?"recommended":S.Hm.all,{filters:G,search:Y}=(0,o.useMemo)(()=>(0,I.Fe)(H,X),[H,X]),[J,V]=(0,o.useState)(!1),Q=(0,o.useRef)(!1),[$,Z]=(0,o.useState)(!1),[ee,et]=(0,o.useState)(new Set),[en,el]=(0,o.useState)(null),{displayNotification:eo}=(0,eH.h)(),ea=(0,ta.f)(),ei=(0,o.useMemo)(()=>{var e;return[...G.levels.map(e=>({kind:"level",value:e,label:e})),...G.companies.map(e=>({kind:"company",value:e,label:e})),...G.locations.map(e=>({kind:"location",value:e,label:e})),...f?(null!=(e=G.domains)?e:[]).map(e=>{var t,n;return{kind:"domain",value:e,label:null!=(n=null==(t=S.nK.find(t=>t.value===e))?void 0:t.label)?n:e}}):[],...G.salaryMin?[{kind:"salary",value:String(G.salaryMin),label:(0,I.AX)(G.salaryMin)}]:[],...Y?[{kind:"search",value:Y,label:"â".concat(Y,"â")}]:[]]},[G,Y,f]),er=(0,o.useMemo)(()=>b.filter(e=>ed.jH.has(e.status)).length,[b]),es=(0,o.useMemo)(()=>b.filter(e=>"queued"===e.status||"running"===e.status).length,[b]),ec=er?"".concat(er," application").concat(1===er?"":"s"," need").concat(1===er?"s":""," you"):es?"".concat(es," application").concat(1===es?"":"s"," in progress"):b.length?"".concat(b.length," recent agent apply").concat(1===b.length?"":"s"):"No agent applies yet",ep=(0,o.useCallback)((e,t)=>{let n=(0,I.D7)(i.pathname,(0,I.KN)(e,t,X));i.replace(n,void 0,{shallow:!0,scroll:!1})},[i,X]),eu=(0,o.useCallback)(e=>(0,I.D7)(S.mW[e],(0,I.KN)(G,Y,S.Hm[e])),[G,Y]),ex=(0,o.useCallback)(e=>{e.locations.length<G.locations.length&&eJ(),ep(e,Y)},[ep,Y,G.locations.length]),eh=(0,o.useCallback)(()=>{let e=!U;ep({...G,forYou:e,sort:e?"recommended":"date_added"},Y)},[U,G,Y,ep]),em=()=>{eJ(),ep({...S.c2,sort:X},"")},{jobs:eg,page:ef,hasMore:eb,total:ej,loading:ey,loadingMore:ev,error:eA,loadMore:ew,patchJobs:ek}=(0,eD.j)({feedMode:a,filters:G,search:Y,uid:null==h?void 0:h.uid,enabled:i.isReady&&$});(0,o.useEffect)(()=>
1{if(!i.isReady||Q.current)return;Q.current=!0;let e=new URLSearchParams(H),t=eU.some(t=>e.has(t)),n=e.getAll("locations").map(e=>e.trim()).filter(Boolean),l="all"!==a||t?null:(()=>{try{let e=window.localStorage.getItem(eB);if(!e)return null;let t=JSON.parse(e);if(!t||"object"!=typeof t)return null;let n={levels:eX(t.levels),companies:eX(t.companies),locations:eX(t.locations),salaryMin:(e=>"number"==typeof e&&Number.isFinite(e)&&e>0?e:void 0)(t.salaryMin)};return n.levels.length||n.companies.length||n.locations.length||void 0!==n.salaryMin?n:null}catch(e){return null}})();(async()=>{var e;let t=l?{...G,...l}:G;if((e=>{let{feedMode:t,urlLocations:n,storedLocations:l,sessionAttempted:o=eY()}=e;return"all"===t&&0===n.length&&0===l.length&&!o})({feedMode:a,urlLocations:n,storedLocations:null!=(e=null==l?void 0:l.locations)?e:[],sessionAttempted:eY()})){let e=await e3();e&&!t.locations.includes(e)&&(t={...t,locations:[...t.locations,e]})}let o=(0,I.D7)(i.pathname,(0,I.KN)(t,Y,X));o!==(0,I.D7)(i.pathname,H)&&await i.replace(o,void 0,{shallow:!0,scroll:!1}),Z(!0)})()},[i,H,a,G,Y,X]),(0,o.useEffect)(()=>{$&&"all"===a&&(e=>{let t={levels:e.levels,companies:e.companies,locations:e.locations,salaryMin:e.salaryMin},n=!t.levels.length&&!t.companies.length&&!t.locations.length&&void 0===t.salaryMin;try{if(n)return void window.localStorage.removeItem(eB);window.localStorage.setItem(eB,JSON.stringify(t))}catch(e){}})(G)},[$,a,G]),(0,o.useEffect)(()=>{"saved"===a&&eg.length&&et(e=>{let t=new Set(e);return eg.forEach(e=>t.add(e.job_id)),t})},[a,eg]),(0,o.useEffect)(()=>{if(!(null==h?void 0:h.uid))return void et(new Set);let e=!1;return(0,C.pG)(h.uid).then(t=>{e||et(e=>{let n=new Set(e);return t.forEach(e=>n.add(e)),n})}).catch(()=>void 0),()=>{e=!0}},[null==h?void 0:h.uid]);let eC=(0,o.useCallback)(e=>{let t=ee.has(e.job_id),n=-1;et(n=>{let l=new Set(n);return t?l.delete(e.job_id):l.add(e.job_id),l}),"saved"===a&&t&&ek(t=>(n=t.findIndex(t=>t.job_id===e.job_id),t.filter(t=>t.job_id!==e.job_id)),-1),(null==h?void 0:h.uid)&&(0,C.if)(h.uid,e.job_id,!t),(t?eN:eq)(e.job_id).catch(()=>{(null==h?void 0:h.uid)&&(0,C.if)(h.uid,e.job_id,t),et(n=>{let l=new Set(n);return t?l.add(e.job_id):l.delete(e.job_id),l}),"saved"===a&&t&&ek(t=>ts(t,e,n),1),eo({message:t?"Couldn't unsave this job. Please try again.":"Couldn't save this job. Please try again.",type:"error"})})},[ee,a,eo,null==h?void 0:h.uid,ek]),eS=(0,o.useCallback)(e=>{let t=-1;ek(n=>(t=n.findIndex(t=>t.job_id===e.job_id),n.filter(t=>t.job_id!==e.job_id)),-1),el({job:e,index:Math.max(0,t)}),eO(e.job_id).catch(()=>{ek(n=>ts(n,e,t),1),el(null),eo({message:"Couldn't hide this job. Please try again.",type:"error"})})},[eo,ek]),eI=(0,o.useCallback)(e=>{if(L)return void eo({message:L,type:"warning",duration:8e3,actionLabel:"Finish profile",actionHref:e7.Y4});_(e).catch(e=>{eo({message:e instanceof Error&&e.message?e.message:"Couldn't queue this application. Please try again.",type:"error"})})},[L,_,eo]),e_=(0,o.useCallback)(()=>{if(!en)return;let{job:e,index:t}=en;el(null),ek(n=>ts(n,e,t),1),eF(e.job_id).catch(()=>{eo({message:"Couldn't restore this job.",type:"error"})})},[en,eo,ek]),eT=(0,o.useCallback)(e=>ep(G,e),[ep,G]),eR=(0,l.jsx)(tc,{activeSearch:Y,onSubmit:eT});return(0,l.jsx)(j.A,{role:n,topBar:eR,children:(0,l.jsxs)(s.A,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,bgcolor:"background.default",overflow:"hidden"},children:[h&&(0,l.jsx)(td,{firstName:(null==r?void 0:r.first_name)||(null==r?void 0:r.display_name)||null,total:ej,forYou:U,feedMode:a}),(0,l.jsx)(K,{filters:G,feedMode:a,feedModeHref:eu,signedIn:P,isAdmin:f,forYou:U,onToggleForYou:eh,onFiltersChange:ex,onOpenAllFilters:()=>V(!0)}),ei.length>0&&"saved"!==a&&(0,l.jsxs)(s.A,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1,px:{xs:2,md:3},py:1,bgcolor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:[ei.map(e=>(0,l.jsx)(d.A,{label:e.label,size:"small",onDelete:()=>{if("search"===e.kind)return void ep(G,"");if("salary"===e.kind)return void ex({...G,salaryMin:void 0});if("domain"===e.kind){var t;ex({...G,domains:(null!=(t=G.domains)?t:[]).filter(t=>t!==e.value)});return}let n="level"===e.kind?"levels":"company"===e.kind?"companies":"locations";ex({...G,[n]:G[n].filter(t=>t!==e.value)})}},"".concat(e.kind,"-").concat(e.value))),(0,l.jsx)(d.A,{label:"Clear all",size:"small",variant:"outlined",onClick:em,sx:{borderStyle:"dashed",color:"text.secondary"}})]}),eA&&(0,l.jsx)(s.A,{sx:{px:3,py:1,bgcolor:"background.paper",color:"error.main"},children:eA}),r&&(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:{xs:2,md:3},py:1.25,bgcolor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:[(0,l.jsxs)(s.A,{sx:{minWidth:0},children:[(0,l.jsx)(c.A,{component:"span",sx:{...(0,z.ji)("tag"),display:"block"},children:"Application queue"}),(0,l.jsx)(c.A,{variant:"body2",color:y?"error":er?"warning.main":"text.secondary",noWrap:!0,sx:er?{fontWeight:600}:void 0,children:y||ec})]}),(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:[(0,l.jsx)(ti.h,{summary:W,onClick:()=>O()}),(0,l.jsx)(p.A,{component:m(),href:"/applications",variant:"outlined",size:"small",children:"View applications"})]})]}),(0,l.jsxs)(s.A,{sx:{display:"flex",flexDirection:"row",flex:1,minHeight:0},children:[ey&&0===eg.length?(0,l.jsxs)(s.A,{sx:{display:"flex",flex:1,minHeight:0,bgcolor:"background.paper"},children:[(0,l.jsx)(s.A,{sx:{width:{xs:"100%",md:400},borderRight:{md:"1px solid"},borderColor:{md:"divider"},p:2},children:Array.from({length:8}).map((e,t)=>(0,l.jsxs)(s.A,{sx:{display:"flex",gap:1.5,py:1.5},children:[(0,l.jsx)(u.A,{variant:"rounded",width:48,height:48}),(0,l.jsxs)(s.A,{sx:{flex:1},children:[(0,l.jsx)(u.A,{width:"70%"}),(0,l.jsx)(u.A,{width:"40%"}),(0,l.jsx)(u.A,{width:"55%"})]})]},t))}),(0,l.jsxs)(s.A,{sx:{flex:1,p:3,display:{xs:"none",md:"block"}},children:[(0,l.jsx)(u.A,{width:"40%",height:36}),(0,l.jsx)(u.A,{width:"25%"}),(0,l.jsx)(u.A,{width:"80%",sx:{mt:2}}),(0,l.jsx)(u.A,{width:"90%"}),(0,l.jsx)(u.A,{width:"70%"})]})]}):(0,l.jsx)(s.A,{sx:{display:"flex",flex:1,minHeight:0,opacity:ey?.55:1,pointerEvents:ey?"none":"auto",transition:"opacity 150ms ease"},children:(0,l.jsx)(ez,{jobs:eg,total:ej,hasMore:eb,loadingMore:ev,onLoadMore:ew,signupHref:"/auth/signup",signedIn:P,savedIds:ee,onToggleSave:h?eC:void 0,onDismiss:h&&"saved"!==a?eS:void 0,eventSource:h?U?"for-you":a:void 0,emptyTitle:"saved"===a?"No saved jobs yet":void 0,emptySubtitle:"saved"===a?"Tap the bookmark on any job to keep it here.":void 0,emptyAction:"saved"===a?(0,l.jsx)(p.A,{component:m(),href:eu("all"),variant:"outlined",size:"small",children:"Browse all jobs"}):ei.length>0?(0,l.jsx)(p.A,{variant:"outlined",size:"small",onClick:em,children:"Clear filters"}):void 0,profileGap:L,applyingJobId:v,cancellingRunId:A,runForJob:D,onAgentApply:_,onQuickApply:h?eI:void 0,onCancelApply:R,answeringRunId:w,continuingRunId:k,answerError:y,onAnswerApply:E,onContinueApply:M,creditSummary:W,onShowPlans:()=>O()})}),h&&(0,l.jsx)(eM,{})]}),h&&(0,l.jsx)(to,{active:ea,loading:ey,jobs:eg,runForJob:D}),(0,l.jsx)(tr.A,{open:q,onClose:F,reason:N}),(0,l.jsx)(T,{isOpen:J,onClose:()=>V(!1),filters:G,onApply:ex,defaultSort:X,signedIn:P,isAdmin:f}),(0,l.jsx)(x.A,{open:!!en,autoHideDuration:6e3,onClose:(e,t)=>{"clickaway"!==t&&el(null)},message:"Job hidden â we won't recommend it again",action:(0,l.jsx)(p.A,{color:"primary",size:"small",onClick:e_,sx:{fontWeight:600},children:"Undo"}),anchorOrigin:{vertical:"bottom",horizontal:"center"}})]})})},tu=e=>{let{role:t,feedMode:n="all"}=e;return(0,l.jsx)(tp,{role:t,feedMode:n})}},82734:(e,t,n)=>{n.d(t,{A:()=>y});var l=n(23798),o=n(21462),a=n(37338),i=n(93547),r=n(34295),s=n(51221),c=n(13854),d=n(1618),p=n(56268),u=n(65396),x=n(11463),h=n(89577),m=n.n(h),g=n(23172),f=n(33365);let b=[{value:"company_add",label:"Add a company"},{value:"feature",label:"Feature request"},{value:"other",label:"Something else"}],j={company_add:{title:"Request a company",subjectLabel:"Company name",placeholder:"Acme"},feature:{title:"Request a feature",subjectLabel:"What would you like?",placeholder:"Alerts for new roles"},other:{title:"Send a request",subjectLabel:"What's the ask?",placeholder:"Tell us what you need"}},y=e=>{let{open:t,onClose:n,kind:h,defaultSubject:y="",source:v,signedIn:A}=e,{submitting:w,submitRequest:k}=(0,f.D)(),{displayNotification:C}
1=(0,g.h)(),[S,I]=(0,o.useState)(null!=h?h:"company_add"),[z,_]=(0,o.useState)(y),[T,R]=(0,o.useState)(""),[E,M]=(0,o.useState)("");(0,o.useEffect)(()=>{t&&(I(null!=h?h:"company_add"),_(y),R(""),M(""))},[t,h,y]);let D=j[S],L=async()=>{let e=z.trim();if(!e)return void C({message:"".concat(D.subjectLabel," is required."),type:"error"});try{let t=await k({kind:S,subject:e,url:T,details:E,source:v});C(t.alreadyAvailable?{message:"".concat(t.subject," is already on hiair â try searching for it."),type:"info"}:{message:"Thanks â we'll look into adding ".concat(t.subject,"."),type:"success"}),n()}catch(e){C({message:e instanceof Error?e.message:"Couldn't send that request.",type:"error"})}};return(0,l.jsxs)(a.A,{open:t,onClose:n,fullWidth:!0,maxWidth:"xs",children:[(0,l.jsx)(i.A,{children:h?j[h].title:"Send a request"}),!1===A?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.A,{children:(0,l.jsx)(s.A,{variant:"body2",children:"Sign in first so we can follow up with you once it's on the index."})}),(0,l.jsxs)(c.A,{sx:{px:3,pb:2},children:[(0,l.jsx)(d.A,{onClick:n,children:"Cancel"}),(0,l.jsx)(d.A,{component:m(),href:"/auth/login",variant:"contained",children:"Sign in to request a company"})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.A,{children:(0,l.jsxs)(p.A,{spacing:2,sx:{mt:.5},children:[!h&&(0,l.jsx)(u.A,{select:!0,size:"small",label:"Type",value:S,onChange:e=>I(e.target.value),children:b.map(e=>(0,l.jsx)(x.A,{value:e.value,children:e.label},e.value))}),(0,l.jsx)(u.A,{autoFocus:!0,size:"small",label:D.subjectLabel,placeholder:D.placeholder,value:z,onChange:e=>_(e.target.value),inputProps:{maxLength:512}}),(0,l.jsx)(u.A,{size:"small",label:"Careers page or website (optional)",placeholder:"https://acme.com/careers",value:T,onChange:e=>R(e.target.value),helperText:"A link makes it much faster for us to add.",inputProps:{maxLength:2048}}),(0,l.jsx)(u.A,{size:"small",label:"Anything else? (optional)",multiline:!0,rows:3,value:E,onChange:e=>M(e.target.value),inputProps:{maxLength:4e3}})]})}),(0,l.jsxs)(c.A,{sx:{px:3,pb:2},children:[(0,l.jsx)(d.A,{onClick:n,disabled:w,children:"Cancel"}),(0,l.jsx)(d.A,{variant:"contained",onClick:L,disabled:w,children:w?"Sendingâ¦":"Send request"})]})]})]})}}}]);
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.