1import{a as de,b as se}from"./chunk-6LD5ZLFD.js";import{a as re}from"./chunk-DUWPI6XO.js";import{a as le}from"./chunk-77L3FRJC.js";import{a as oe}from"./chunk-U2JFL5MT.js";import"./chunk-JC7WZY4B.js";import{a as ee,b as te,f as ne,k as ie,m as ae}from"./chunk-K6T5ICY7.js";import"./chunk-JXOIEU27.js";import"./chunk-JGPKEF44.js";import{a as j}from"./chunk-SXHHBGQC.js";import{c as z,d as H,g as Y,i as J,j as K,k as W,l as G,m as Q,n as X,r as Z}from"./chunk-TG6L5SSD.js";import{a as w}from"./chunk-RIXE6A5Q.js";import{j as $,m as q}from"./chunk-GWA6TDUW.js";import{Bb as S,C as R,Cb as u,Db as s,Gc as O,Jc as L,Nb as l,Ob as _,Pb as C,Rb as N,Sa as o,W as k,_b as V,ba as y,bb as B,ca as v,fb as f,ia as U,lb as x,n as E,ob as P,qa as p,qb as m,qc as D,sb as F,tb as h,ua as A,ub as b,vb as i,w as I,wb as a,xb as g,z as T}from"./chunk-O4QU2GHG.js";import{e as M}from"./chunk-LYWLWC7U.js";var me=()=>[1,2,3,4,5,6],ue=(t,n)=>n.value,_e=(t,n)=>n.profileId;function Ce(t,n){if(t&1&&g(0,"app-portal-alert",2),t&2){let e=s();x("message",e.toast())}}function fe(t,n){if(t&1&&g(0,"app-portal-alert",3),t&2){let e=s();x("message",e.error())}}function xe(t,n){if(t&1&&(i(0,"option",7),l(1),a()),t&2){let e=n.$implicit;x("value",e.value),o(),_(e.label)}}function ge(t,n){t&1&&g(0,"div",24)}function ke(t,n){t&1&&(i(0,"div",21),h(1,ge,1,0,"div",24,F),a()),t&2&&(o(),b(V(0,me)))}function ye(t,n){t&1&&g(0,"app-empty-state",22)}function ve(t,n){if(t&1&&l(0),t&2){let e=s().$implicit;C(" \xB7 ",e.experienceBand," ")}}function he(t,n){t&1&&g(0,"app-portal-status-badge",34)}function be(t,n){if(t&1&&(i(0,"span",35),l(1),a()),t&2){let e=s().$implicit;o(),_(e.sourceTenantName)}}function Se(t,n){if(t&1){let e=S();i(0,"button",26),u("click",function(){let d=y(e).$implicit,c=s(2);return v(c.openCard(d))}),i(1,"div",27)(2,"div")(3,"p",28),l(4),a(),i(5,"p",29),l(6),f(7,ve,1,1),a()(),i(8,"span",30),l(9),a()(),i(10,"p",31),l(11),a(),i(12,"div",32),g(13,"app-portal-status-badge",33),f(14,he,1,0,"app-portal-status-badge",34)(15,be,2,1,"span",35),a()()}if(t&2){let e=n.$implicit;o(4),_(e.displayLabel),o(2),C(" ",e.primarySkill||"Skill TBD"," "),o(),m(e.experienceBand?7:-1),o(2),C(" ",e.compositeScore," "),o(2),C(" ",e.redactedSummary," "),o(3),m(e.unlocked?14:-1),o(),m(e.sourceTenantName?15:-1)}}function Me(t,n){if(t&1&&(i(0,"div",21),h(1,Se,16,7,"button",25,_e),a()),t&2){let e=s();o(),b(e.items())}}function Pe(t,n){t&1&&(i(0,"p",43),l(1,"Loading\u2026"),a())}function we(t,n){if(t&1&&(i(0,"p",50),l(1),a()),t&2){let e=s(3);o(),_(e.email)}}function Ee(t,n){if(t&1&&(i(0,"p",51),l(1),a()),t&2){let e=s(3);o(),C("Role: ",e.role,"")}}function Ie(t,n){if(t&1&&(i(0,"div",48)(1,"p",49),l(2),a(),f(3,we,2,1,"p",50)(4,Ee,2,1,"p",51),a()),t&2){let e=s(2);o(2),C(" ",e.fullName||e.displayLabel," "),o(),m(e.email?3:-1),o(),m(e.role?4:-1)}}function Te(t,n){t&1&&l(0," Opening checkout\u2026 ")}function Re(t,n){if(t&1&&l(0),t&2){let e=s(4);C(" Unlock full profile \xB7 \u20B9",e.unlockPriceInr()," ")}}function Ue(t,n){if(t&1){let e=S();i(0,"button",52),u("click",function(){y(e);let d=s(3);return v(d.unlockSelected())}),f(1,Te,1,0)(2,Re,1,1),a(),i(3,"p",53),l(4," Pay-per-shortlist. No raw interview transcripts are shared. "),a()}if(t&2){let e=s(3);P(e.primaryBtnClass),x("disabled",e.unlocking()),o(),m(e.unlocking()?1:2)}}function Ae(t,n){if(t&1&&(i(0,"p",44),l(1),a(),i(2,"dl",45)(3,"div")(4,"dt",40),l(5,"Score"),a(),i(6,"dd",46),l(7),a()(),i(8,"div")(9,"dt",40),l(10,"Sessions"),a(),i(11,"dd",46),l(12),a()(),i(13,"div")(14,"dt",40),l(15,"Skill"),a(),i(16,"dd",47),l(17),a()(),i(18,"div")(19,"dt",40),l(20,"ATS"),a(),i(21,"dd",46),l(22),a()()(),f(23,Ie,5,3,"div",48)(24,Ue,5,4)),t&2){let e=s(),r=s();o(),_(e.redactedSummary),o(6),_(e.compositeScore),o(5),_(e.completedSessionCount),o(5),_(e.primarySkill||"\u2014"),o(5),C(" ",e.latestAtsScore!=null?e.latestAtsScore:"\u2014"," "),o(),m(r.isUnlockedProfile(e)?23:r.canUnlock()?24:-1)}}function Be(t,n){if(t&1){let e=S();i(0,"div",36),u("click",function(){y(e);let d=s();return v(d.closeDetail())}),i(1,"div",37),u("click",function(d){return y(e),v(d.stopPropagation())}),i(2,"div",38)(3,"div")(4,"h2",39),l(5),a(),i(6,"p",40),l(7),a()(),i(8,"button",41),u("click",function(){y(e);let d=s();
1return v(d.closeDetail())}),i(9,"span",42),l(10,"close"),a()()(),f(11,Pe,2,0,"p",43)(12,Ae,25,6),a()()}if(t&2){let e=n,r=s();o(5),C(" ",e.displayLabel," "),o(2),_(e.badge),o(4),m(r.detailLoading()?11:12)}}var pe=class t{api=k(se);route=k($);router=k(q);destroyRef=k(U);platformId=k(A);tenantSession=k(j);primaryBtnClass=ee;secondaryBtnClass=te;skillOptions=de;loading=p(!0);unlocking=p(!1);error=p(null);toast=p(null);items=p([]);total=p(0);unlockPriceInr=p(499);page=p(1);pageSize=20;skill=p("");minScore=p(70);experienceBand=p("");q=p("");selected=p(null);detailLoading=p(!1);canUnlock=D(()=>["COMPANY_ADMIN","HR","RECRUITER"].includes(this.tenantSession.role()??""));ngOnInit(){if(!L(this.platformId)){this.loading.set(!1);return}this.reload();let n=this.route.snapshot.queryParamMap.get("order_id");n?.startsWith("mu_")&&this.pollUnlock(n)}reload(){this.loading.set(!0),this.error.set(null),this.api.browse({skill:this.skill()||void 0,minScore:this.minScore()??void 0,experienceBand:this.experienceBand()||void 0,q:this.q().trim()||void 0,page:this.page(),pageSize:this.pageSize}).subscribe({next:n=>{this.items.set(n.items),this.total.set(n.total),this.unlockPriceInr.set(n.unlockPriceInr),this.loading.set(!1)},error:()=>{this.error.set("Could not load verified candidates."),this.loading.set(!1)}})}applyFilters(){this.page.set(1),this.reload()}openCard(n){this.selected.set(n),this.detailLoading.set(!0),this.api.getCandidate(n.profileId).subscribe({next:e=>{this.selected.set(e),this.detailLoading.set(!1)},error:()=>{this.detailLoading.set(!1),this.toast.set("Could not load candidate details.")}})}closeDetail(){this.selected.set(null)}unlockSelected(){return M(this,null,function*(){let n=this.selected();if(!(!n||this.unlocking()||!this.canUnlock())&&!n.unlocked){this.unlocking.set(!0),this.toast.set(null);try{let r=`${typeof window<"u"?window.location.origin:w.appUrl}/company/marketplace`,d=yield E(this.api.unlock(n.profileId,r));if(d.alreadyUnlocked||d.status==="PAID"){this.toast.set("Profile already unlocked."),this.openCard(n),this.unlocking.set(!1),this.reload();return}yield this.openCashfree(d.payment_session_id,d.order_id,d.cashfree_checkout_mode)}catch{this.toast.set("Could not start checkout. Try again."),this.unlocking.set(!1)}}})}isUnlockedProfile(n){return!!n&&"fullName"in n}openCashfree(n,e,r){return M(this,null,function*(){let{load:d}=yield import("./chunk-VKHQSHZV.js"),c=yield d({mode:r});if(!c)throw new Error("Cashfree unavailable");let ce=`${typeof window<"u"?window.location.origin:w.appUrl}/company/marketplace?order_id=${encodeURIComponent(e)}`;yield c.checkout({paymentSessionId:n,returnUrl:ce}),this.unlocking.set(!1)})}pollUnlock(n){this.toast.set("Confirming payment..."),I(0,2e3).pipe(R(20),T(()=>this.api.unlockStatus(n)),oe(this.destroyRef)).subscribe({next:e=>{e.status==="PAID"?(this.toast.set("Profile unlocked."),this.reload(),this.router.navigate([],{relativeTo:this.route,queryParams:{},replaceUrl:!0})):e.status==="FAILED"&&this.toast.set("Payment was not completed.")}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=B({type:t,selectors:[["app-company-marketplace-page"]],decls:34,vars:13,consts:[[1,"portal-page"],["variant","list","title","Verified candidates","subtitle","Browse Interview-Ready talent who opted in to be discovered. Full contact details unlock after payment."],["variant","info",1,"mb-4","block",3,"message"],["variant","error",1,"mb-4","block",3,"message"],["aria-label","Filters",1,"portal-surface","mb-4","grid","gap-3","sm:grid-cols-2","lg:grid-cols-5"],["label","Skill"],[1,"portal-input",3,"ngModelChange","ngModel"],[3,"value"],["label","Min score"],["type","number","min","0","max","100",1,"portal-input",3,"ngModelChange","ngModel"],["label","Experience"],["value",""],["value","FRESHER"],["value","JUNIOR"],["value","MID"],["value","SENIOR"],["label","Search"],["type","search","placeholder","College, skill\u2026",1,"portal-input",3,"ngModelChange","ngModel"],[1,"flex","items-end"],["type","button",1,"w-full",3,"click"],[1,"mb-3","text-xs","text-slate-500","dark:text-slate-400"],[1,"grid","gap-3","sm:grid-cols-2","lg:grid-cols-3"],["icon","person_search","title","No verified candidates yet","description","When candidates earn Interview-Ready and opt in, they appear here with redacted summaries."],["role","dialog","aria-modal","true","aria-labelledby","mp-detail-title",1,"fixed","inset-0","z-40","flex","items-end","justify-center","bg-slate-900/40","p-4","sm:items-center"],[1,"portal-surface","h-40","animate-pulse","bg-slate-100","dark:bg-slate-800"],["type","button",1,"portal-surface","flex","flex-col","gap-2","text-left","transition","hover:bg-slate-50","dark:hover:bg-slate-800/60"],["type","button",1,"portal-surface","flex","flex-col","gap-2","text-left","transition","hover:bg-slate-50","dark:hover:bg-slate-800/60",3,"click"],[1,"flex","items-start","justify-between","gap-2"],[1,"font-semibold","text-slate-900","dark:text-white"],[1,"text-xs","text-slate-500","dark:text-slate-400"],[1,"tabular-nums","text-lg","font-bold","text-slate-900","dark:text-white"],[1,"line-clamp-3","text-sm","text-slate-600","dark:text-slate-300"],[1,"mt-auto","flex","flex-wrap","items-center","gap-2","pt-1"],["tone","success","label","Verified"],["tone","info","label","Unlocked"],[1,"text-[11px]","text-slate-500"],["role","dialog","aria-modal","true","aria-labelledby","mp-detail-title",1,"fixed","inset-0","z-40","flex","items-end","justify-center","bg-slate-900/40","p-4","sm:items-center",3,"click"],[1,"max-h-[90vh]","w-full","max-w-lg","overflow-auto","rounded-2xl","border","border-slate-200","bg-white","p-5","shadow-xl","dark:border-slate-700","dark:bg-slate-900",3,"click"],[1,"flex","items-start","justify-between","gap-3"],["id","mp-detail-title",1,"text-lg","font-bold","text-slate-900","dark:text-white"],[1,"text-xs","text-slate-500"],["type","button","aria-label","Close",1,"min-h-10","min-w-10","rounded-lg","text-slate-400","hover:bg-slate-100","dark:hover:bg-slate-800",3,"click"],[1,"material-symbols-outlined"],[1,"mt-4","text-sm","text-slate-500"],[1,"mt-3","text-sm","text-slate-600","dark:text-slate-300"],[1,"mt-4","grid","grid-cols-2","gap-3","text-sm"],[1,"font-semibold","tabular-nums"],[1,"font-semibold"],[1,"mt-4","rounded-xl","border","border-emerald-200/80","bg-emerald-50/60","p-3","dar
1k:border-emerald-800","dark:bg-emerald-950/30"],[1,"text-sm","font-semibold","text-slate-900","dark:text-white"],[1,"mt-1","text-sm","text-slate-700","dark:text-slate-200"],[1,"mt-1","text-xs","text-slate-500"],["type","button",1,"mt-5","w-full",3,"click","disabled"],[1,"mt-2","text-center","text-[11px]","text-slate-500"]],template:function(e,r){if(e&1&&(i(0,"div",0),g(1,"app-page-header",1),f(2,Ce,1,1,"app-portal-alert",2)(3,fe,1,1,"app-portal-alert",3),i(4,"section",4)(5,"app-portal-form-field",5)(6,"select",6),u("ngModelChange",function(c){return r.skill.set(c)}),h(7,xe,2,2,"option",7,ue),a()(),i(9,"app-portal-form-field",8)(10,"input",9),u("ngModelChange",function(c){return r.minScore.set(c===""||c==null?null:+c)}),a()(),i(11,"app-portal-form-field",10)(12,"select",6),u("ngModelChange",function(c){return r.experienceBand.set(c)}),i(13,"option",11),l(14,"All levels"),a(),i(15,"option",12),l(16,"Fresher"),a(),i(17,"option",13),l(18,"Junior"),a(),i(19,"option",14),l(20,"Mid"),a(),i(21,"option",15),l(22,"Senior"),a()()(),i(23,"app-portal-form-field",16)(24,"input",17),u("ngModelChange",function(c){return r.q.set(c)}),a()(),i(25,"div",18)(26,"button",19),u("click",function(){return r.applyFilters()}),l(27," Apply filters "),a()()(),i(28,"p",20),l(29),a(),f(30,ke,3,1,"div",21)(31,ye,1,0,"app-empty-state",22)(32,Me,3,0,"div",21)(33,Be,13,3,"div",23),a()),e&2){let d;o(2),m(r.toast()?2:-1),o(),m(r.error()?3:-1),o(3),x("ngModel",r.skill()),o(),b(r.skillOptions),o(3),x("ngModel",r.minScore()),o(2),x("ngModel",r.experienceBand()),o(12),x("ngModel",r.q()),o(2),P(r.primaryBtnClass),o(3),N(" ",r.total()," verified candidate",r.total()===1?"":"s"," \xB7 Unlock \u20B9",r.unlockPriceInr()," "),o(),m(r.loading()?30:r.items().length===0?31:32),o(3),m((d=r.selected())?33:-1,d)}},dependencies:[O,Z,W,G,z,J,K,H,X,Q,Y,le,re,ne,ie,ae],encapsulation:2})};export{pe as CompanyMarketplacePageComponent};
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.