hunter-mate 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/assets/extension/background/{service-worker.20261017183328.js → service-worker.20261019161523.js} +56 -4
  2. package/dist/assets/extension/background/service-worker.js +56 -4
  3. package/dist/assets/extension/build-info.json +1 -1
  4. package/dist/assets/extension/manifest.json +3 -3
  5. package/dist/assets/server/main.mjs +885 -782
  6. package/dist/index.js +20 -5
  7. package/dist/watchdog.js +14 -3
  8. package/dist/web/dist/404.html +1 -1
  9. package/dist/web/dist/_next/static/chunks/187-f067914dcd1330c2.js +32 -0
  10. package/dist/web/dist/_next/static/chunks/253-9278ce6c4d446329.js +1 -0
  11. package/dist/web/dist/_next/static/chunks/{589-f984bff035a1cb85.js → 589-cc56950ae4117cdd.js} +1 -1
  12. package/dist/web/dist/_next/static/chunks/659-122057f46f941df7.js +1 -0
  13. package/dist/web/dist/_next/static/chunks/{686-9f419b70feea9470.js → 686-05b99d3674f45bf7.js} +1 -1
  14. package/dist/web/dist/_next/static/chunks/728-cffab7e836020551.js +12 -0
  15. package/dist/web/dist/_next/static/chunks/{865-0ed23dd43c0832a2.js → 865-8e1d8c34192526ed.js} +1 -1
  16. package/dist/web/dist/_next/static/chunks/{935-7be3e60dd8bc29d2.js → 935-efb30b9f6f558e3f.js} +1 -1
  17. package/dist/web/dist/_next/static/chunks/{a7067448-e416655baf443992.js → a7067448-3f2b194cfadb91fb.js} +1 -1
  18. package/dist/web/dist/_next/static/chunks/app/_not-found/{page-5b7249eb3c9a6cb9.js → page-d939b40bb8878d26.js} +1 -1
  19. package/dist/web/dist/_next/static/chunks/app/admin/data/{page-14698e9c4ddaa6d9.js → page-df1d84c14e85f294.js} +1 -1
  20. package/dist/web/dist/_next/static/chunks/app/auth/verify/{page-05304d5803008d61.js → page-cfeb844e1b72ccaa.js} +1 -1
  21. package/dist/web/dist/_next/static/chunks/app/companies/{page-e8d02fe997579315.js → page-57b1ef0b12134ce0.js} +1 -1
  22. package/dist/web/dist/_next/static/chunks/app/company/admin/{page-c2584183bc4b34d1.js → page-010928306f8df0ed.js} +1 -1
  23. package/dist/web/dist/_next/static/chunks/app/entity/{page-08755f96102f0565.js → page-fa96319650d38e78.js} +1 -1
  24. package/dist/web/dist/_next/static/chunks/app/jobs/page-5ba0bdc881b98d42.js +1 -0
  25. package/dist/web/dist/_next/static/chunks/app/{layout-af39afc7866e74db.js → layout-bd9a7e5e4474b692.js} +1 -1
  26. package/dist/web/dist/_next/static/chunks/app/logs/{page-be50a4e10b1a0024.js → page-bcdbb3885abda5a2.js} +1 -1
  27. package/dist/web/dist/_next/static/chunks/app/matching/jobs/[id]/talents/{page-cf445b0cb8c2cb0a.js → page-8aca89db1e666a49.js} +1 -1
  28. package/dist/web/dist/_next/static/chunks/app/matching/portraits/[id]/jobs/{page-c7ff0d79b6a75915.js → page-7086f1b773e57511.js} +1 -1
  29. package/dist/web/dist/_next/static/chunks/app/{page-bd282e1e5f0965f1.js → page-49fe1e8630d2237e.js} +1 -1
  30. package/dist/web/dist/_next/static/chunks/app/parselog/{page-9814e75d6900a743.js → page-fcdfdd41cf1f86f7.js} +1 -1
  31. package/dist/web/dist/_next/static/chunks/app/recordings/{page-441016638b43c4f8.js → page-7ba5d89391c9dace.js} +1 -1
  32. package/dist/web/dist/_next/static/chunks/app/resource-usage/{page-f6fa06bfe21bcd32.js → page-7b939cf673d764e6.js} +1 -1
  33. package/dist/web/dist/_next/static/chunks/app/shared/[token]/{page-c9c5042a2d07c0bc.js → page-df87328c52f862f1.js} +1 -1
  34. package/dist/web/dist/_next/static/chunks/app/snapshots/[id]/agent-prompt/{page-f54cf2f0058035ca.js → page-7d4d25de2c6704e9.js} +1 -1
  35. package/dist/web/dist/_next/static/chunks/app/talents/{page-0edef6d07b3cf69d.js → page-5a2caa7a503ee041.js} +1 -1
  36. package/dist/web/dist/_next/static/chunks/app/team/insights/{page-8b3934df3e292368.js → page-f097b4b8578a6e5d.js} +1 -1
  37. package/dist/web/dist/_next/static/css/a8f0a381a2372781.css +3 -0
  38. package/dist/web/dist/admin/data.html +1 -1
  39. package/dist/web/dist/admin/data.txt +5 -5
  40. package/dist/web/dist/auth/verify.html +1 -1
  41. package/dist/web/dist/auth/verify.txt +5 -5
  42. package/dist/web/dist/companies.html +1 -1
  43. package/dist/web/dist/companies.txt +5 -5
  44. package/dist/web/dist/company/admin.html +1 -1
  45. package/dist/web/dist/company/admin.txt +5 -5
  46. package/dist/web/dist/entity.html +1 -1
  47. package/dist/web/dist/entity.txt +5 -5
  48. package/dist/web/dist/index.html +1 -1
  49. package/dist/web/dist/index.txt +5 -5
  50. package/dist/web/dist/jobs.html +1 -1
  51. package/dist/web/dist/jobs.txt +5 -5
  52. package/dist/web/dist/logs.html +1 -1
  53. package/dist/web/dist/logs.txt +5 -5
  54. package/dist/web/dist/matching/jobs/placeholder/talents.html +1 -1
  55. package/dist/web/dist/matching/jobs/placeholder/talents.txt +5 -5
  56. package/dist/web/dist/matching/portraits/placeholder/jobs.html +1 -1
  57. package/dist/web/dist/matching/portraits/placeholder/jobs.txt +5 -5
  58. package/dist/web/dist/parselog.html +1 -1
  59. package/dist/web/dist/parselog.txt +5 -5
  60. package/dist/web/dist/recordings.html +1 -1
  61. package/dist/web/dist/recordings.txt +5 -5
  62. package/dist/web/dist/resource-usage.html +1 -1
  63. package/dist/web/dist/resource-usage.txt +5 -5
  64. package/dist/web/dist/shared/placeholder.html +1 -1
  65. package/dist/web/dist/shared/placeholder.txt +5 -5
  66. package/dist/web/dist/snapshots/placeholder/agent-prompt.html +1 -1
  67. package/dist/web/dist/snapshots/placeholder/agent-prompt.txt +5 -5
  68. package/dist/web/dist/talents.html +1 -1
  69. package/dist/web/dist/talents.txt +5 -5
  70. package/dist/web/dist/team/insights.html +1 -1
  71. package/dist/web/dist/team/insights.txt +5 -5
  72. package/package.json +1 -1
  73. package/dist/web/dist/_next/static/chunks/105-dcd8f6d5867c8995.js +0 -32
  74. package/dist/web/dist/_next/static/chunks/253-a05d05b94bfbd7a4.js +0 -1
  75. package/dist/web/dist/_next/static/chunks/555-e2a871b9d2eccb03.js +0 -12
  76. package/dist/web/dist/_next/static/chunks/852-ad19b97821a4cf9e.js +0 -1
  77. package/dist/web/dist/_next/static/chunks/app/jobs/page-4827a9ef286b6483.js +0 -1
  78. package/dist/web/dist/_next/static/css/10ba1fa1d6ce23a7.css +0 -3
  79. /package/dist/web/dist/_next/static/{5MA8faUttk6FzlxGWnOlM → m0UGHVTGvtvb9mn4-uzJJ}/_buildManifest.js +0 -0
  80. /package/dist/web/dist/_next/static/{5MA8faUttk6FzlxGWnOlM → m0UGHVTGvtvb9mn4-uzJJ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9ebba666-6179-4511-9383-5cee626116f0",e._sentryDebugIdIdentifier="sentry-dbid-9ebba666-6179-4511-9383-5cee626116f0")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{55589:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(66867),o=n.n(r)},34656:function(e,t,n){function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(62693),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},66867:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return j}});let r=n(98422),o=n(72835),l=r._(n(60635)),u=n(86197),f=n(3076),a=n(87119),i=n(55898),c=n(54828),s=n(41931),d=n(13700),p=n(6274),b=n(34656),y=n(61533),h=n(26e3),v=new Set;function g(e,t,n,r,o,l){if("undefined"!=typeof window&&(l||(0,f.isLocalURL)(t))){if(!r.bypassPrefetchedCheck){let o=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(o))return;v.add(o)}(async()=>l?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function _(e){return"string"==typeof e?e:(0,a.formatUrl)(e)}let j=l.default.forwardRef(function(e,t){let n,r;let{href:a,as:v,children:j,prefetch:k=null,passHref:C,replace:m,shallow:M,scroll:P,locale:w,onClick:O,onMouseEnter:E,onTouchStart:I,legacyBehavior:L=!1,...x}=e;n=j,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let R=l.default.useContext(s.RouterContext),D=l.default.useContext(d.AppRouterContext),T=null!=R?R:D,S=!R,U=!1!==k,K=null===k?h.PrefetchKind.AUTO:h.PrefetchKind.FULL,{href:A,as:N}=l.default.useMemo(()=>{if(!R){let e=_(a);return{href:e,as:v?_(v):e}}let[e,t]=(0,u.resolveHref)(R,a,!0);return{href:e,as:v?(0,u.resolveHref)(R,v):t||e}},[R,a,v]),H=l.default.useRef(A),q=l.default.useRef(N);L&&(r=l.default.Children.only(n));let z=L?r&&"object"==typeof r&&r.ref:t,[B,F,G]=(0,p.useIntersection)({rootMargin:"200px"}),J=l.default.useCallback(e=>{(q.current!==N||H.current!==A)&&(G(),q.current=N,H.current=A),B(e),z&&("function"==typeof z?z(e):"object"==typeof z&&(z.current=e))},[N,z,A,G,B]);l.default.useEffect(()=>{T&&F&&U&&g(T,A,N,{locale:w},{kind:K},S)},[N,A,F,w,U,null==R?void 0:R.locale,T,S,K]);let Q={ref:J,onClick(e){L||"function"!=typeof O||O(e),L&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,n,r,o,u,a,i,c){let{nodeName:s}=e.currentTarget;if("A"===s.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,f.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==a||a;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:u,locale:i,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};c?l.default.startTransition(d):d()}(e,T,A,N,m,M,P,w,S)},onMouseEnter(e){L||"function"!=typeof E||E(e),L&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),T&&(U||!S)&&g(T,A,N,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:K},S)},onTouchStart:function(e){L||"function"!=typeof I||I(e),L&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),T&&(U||!S)&&g(T,A,N,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:K},S)}};if((0,i.isAbsoluteUrl)(N))Q.href=N;else if(!L||C||"a"===r.type&&!("href"in r.props)){let e=void 0!==w?w:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,b.getDomainLocale)(N,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);Q.href=t||(0,y.addBasePath)((0,c.addLocale)(N,e,null==R?void 0:R.defaultLocale))}return L?l.default.cloneElement(r,Q):(0,o.jsx)("a",{...x,...Q,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6274:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return a}});let r=n(60635),o=n(71935),l="function"==typeof IntersectionObserver,u=new Map,f=[];function a(e){let{rootRef:t,rootMargin:n,disabled:a}=e,i=a||!l,[c,s]=(0,r.useState)(!1),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{d.current=e},[]);return(0,r.useEffect)(()=>{if(l){if(i||c)return;let e=d.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:l}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=f.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=u.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},f.push(n),u.set(n,t),t}(n);return l.set(e,t),o.observe(e),function(){if(l.delete(e),o.unobserve(e),0===l.size){o.disconnect(),u.delete(r);let e=f.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&f.splice(e,1)}}}(e,e=>e&&s(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,o.requestIdleCallback)(()=>s(!0));return()=>(0,o.cancelIdleCallback)(e)}},[i,n,t,c,d.current]),[p,c,(0,r.useCallback)(()=>{s(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="beff98e4-a5fb-421e-919d-56b39aca277c",e._sentryDebugIdIdentifier="sentry-dbid-beff98e4-a5fb-421e-919d-56b39aca277c")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{55589:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(66867),o=n.n(r)},34656:function(e,t,n){function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(62693),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},66867:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return j}});let r=n(98422),o=n(72835),l=r._(n(60635)),u=n(86197),f=n(3076),a=n(87119),i=n(55898),c=n(54828),d=n(41931),s=n(13700),p=n(6274),b=n(34656),y=n(61533),h=n(26e3),v=new Set;function g(e,t,n,r,o,l){if("undefined"!=typeof window&&(l||(0,f.isLocalURL)(t))){if(!r.bypassPrefetchedCheck){let o=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(o))return;v.add(o)}(async()=>l?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function _(e){return"string"==typeof e?e:(0,a.formatUrl)(e)}let j=l.default.forwardRef(function(e,t){let n,r;let{href:a,as:v,children:j,prefetch:k=null,passHref:C,replace:m,shallow:M,scroll:P,locale:w,onClick:O,onMouseEnter:E,onTouchStart:I,legacyBehavior:L=!1,...x}=e;n=j,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let R=l.default.useContext(d.RouterContext),D=l.default.useContext(s.AppRouterContext),T=null!=R?R:D,S=!R,U=!1!==k,K=null===k?h.PrefetchKind.AUTO:h.PrefetchKind.FULL,{href:A,as:N}=l.default.useMemo(()=>{if(!R){let e=_(a);return{href:e,as:v?_(v):e}}let[e,t]=(0,u.resolveHref)(R,a,!0);return{href:e,as:v?(0,u.resolveHref)(R,v):t||e}},[R,a,v]),H=l.default.useRef(A),q=l.default.useRef(N);L&&(r=l.default.Children.only(n));let z=L?r&&"object"==typeof r&&r.ref:t,[B,F,G]=(0,p.useIntersection)({rootMargin:"200px"}),J=l.default.useCallback(e=>{(q.current!==N||H.current!==A)&&(G(),q.current=N,H.current=A),B(e),z&&("function"==typeof z?z(e):"object"==typeof z&&(z.current=e))},[N,z,A,G,B]);l.default.useEffect(()=>{T&&F&&U&&g(T,A,N,{locale:w},{kind:K},S)},[N,A,F,w,U,null==R?void 0:R.locale,T,S,K]);let Q={ref:J,onClick(e){L||"function"!=typeof O||O(e),L&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,n,r,o,u,a,i,c){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,f.isLocalURL)(n)))return;e.preventDefault();let s=()=>{let e=null==a||a;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:u,locale:i,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};c?l.default.startTransition(s):s()}(e,T,A,N,m,M,P,w,S)},onMouseEnter(e){L||"function"!=typeof E||E(e),L&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),T&&(U||!S)&&g(T,A,N,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:K},S)},onTouchStart:function(e){L||"function"!=typeof I||I(e),L&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),T&&(U||!S)&&g(T,A,N,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:K},S)}};if((0,i.isAbsoluteUrl)(N))Q.href=N;else if(!L||C||"a"===r.type&&!("href"in r.props)){let e=void 0!==w?w:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,b.getDomainLocale)(N,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);Q.href=t||(0,y.addBasePath)((0,c.addLocale)(N,e,null==R?void 0:R.defaultLocale))}return L?l.default.cloneElement(r,Q):(0,o.jsx)("a",{...x,...Q,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6274:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return a}});let r=n(60635),o=n(71935),l="function"==typeof IntersectionObserver,u=new Map,f=[];function a(e){let{rootRef:t,rootMargin:n,disabled:a}=e,i=a||!l,[c,d]=(0,r.useState)(!1),s=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{s.current=e},[]);return(0,r.useEffect)(()=>{if(l){if(i||c)return;let e=s.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:l}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=f.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=u.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},f.push(n),u.set(n,t),t}(n);return l.set(e,t),o.observe(e),function(){if(l.delete(e),o.unobserve(e),0===l.size){o.disconnect(),u.delete(r);let e=f.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&f.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,o.requestIdleCallback)(()=>d(!0));return()=>(0,o.cancelIdleCallback)(e)}},[i,n,t,c,s.current]),[p,c,(0,r.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
@@ -0,0 +1 @@
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c249ee84-25eb-4e52-970d-ec1caeba818a",e._sentryDebugIdIdentifier="sentry-dbid-c249ee84-25eb-4e52-970d-ec1caeba818a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[659],{59659:function(e,t,l){l.d(t,{EntityListPage:function(){return U}});var s=l(72835),a=l(60635),n=l(27473),r=l(74431),i=l(37202),d=l(94518),o=l(63718),c=l(19036),u=l(8448),x=l(86777);let m=["workExperiences","projects","education"],h={intent:["position","salary","city","industries"]},p={name:"姓名",headline:"头衔",currentPosition:"现职位",currentCompany:"现公司",city:"城市",degree:"学历",workYears:"工作年限",age:"年龄",gender:"性别",resId:"resId",statusTag:"状态标签",contactTime:"方便联系时间",phone:"电话",email:"邮箱",profileUrl:"主页 URL",sourceUrl:"来源 URL",selfEvaluation:"自我评价",statement:"平台声明","intent.position":"期望职位","intent.salary":"期望薪资","intent.city":"期望城市","intent.industries":"期望行业",updatedAt:"更新时间"},g={workExperiences:"工作经历",projects:"项目经历",education:"教育经历"},y={company:"公司",position:"职位",period:"时间段",start:"开始",end:"结束",department:"部门",location:"地点",reportsTo:"汇报对象",school:"学校",major:"专业",degree:"学历",name:"名称",role:"角色",description:"描述",duties:"职责",industry:"行业"};function b(e){return null==e||""===e?"—":Array.isArray(e)?e.length?e.map(e=>b(e)).filter(e=>"—"!==e).join("、"):"—":"object"==typeof e?JSON.stringify(e):"string"==typeof e&&/^\d{4}-\d{2}-\d{2}T/.test(e)?(0,u.d3)(e):String(e)}function v(e){var t;let{entity:l}=e,i=(0,n.useRouter)(),d=l.id,[o,c]=(0,a.useState)(null),[x,v]=(0,a.useState)(!1),[j,f]=(0,a.useState)({}),[N,w]=(0,a.useState)(null),[k,S]=(0,a.useState)(new Set),[A,C]=(0,a.useState)({}),[T,I]=(0,a.useState)({}),[E,U]=(0,a.useState)(!1),[O,D]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=!0;return c(null),D(""),(async()=>{try{let t=await (0,r.aA)("/entities/talent/".concat(d,"/duplicates"));e&&c(t.candidates)}catch(t){e&&c([])}})(),()=>{e=!1}},[d]);let F=(0,a.useMemo)(()=>{var e;return null!==(e=l.extracted)&&void 0!==e?e:{}},[l.extracted]),P=async e=>{if(j[e])return j[e];try{let t=await (0,r.aA)("/entities/talent/".concat(e));if(!t.entity)return null;return f(l=>({...l,[e]:t.entity})),t.entity}catch(e){return null}},L=async()=>{var e,t,l,s,a,n,r;U(!0),D("");let i=[d,...(null!=o?o:[]).map(e=>e.talent.id)],c=await Promise.all(i.map(e=>P(e)));if(U(!1),c.some(e=>!e)){D("全量简历拉取失败,请重试");return}let u=c[0],x=null!==(t=u.extracted)&&void 0!==t?t:{},p={name:u.name,headline:u.headline},g={};for(let e of Object.keys(x))if(m.includes(e))g[e]=Array.isArray(x[e])?[...x[e]]:[];else if(h[e]){let t=null!==(s=x[e])&&void 0!==s?s:{};for(let l of h[e])p["".concat(e,".").concat(l)]=null!==(a=t[l])&&void 0!==a?a:"industries"===l?[]:""}else(null==(r=x[e])||["string","number","boolean"].includes(typeof r))&&!e.startsWith("_")&&(p[e]=null!==(l=x[e])&&void 0!==l?l:"");C(p),I(g),w(null!==(n=null==o?void 0:null===(e=o[0])||void 0===e?void 0:e.talent.id)&&void 0!==n?n:null),v(!0)},M=e=>{var t;let s=[],a=t=>{var l,s,a,n;if(t){if("name"===e)return t.name;if("headline"===e)return t.headline;if(e.startsWith("intent.")){let l=e.slice(7),n=null===(a=t.extracted)||void 0===a?void 0:null===(s=a.intent)||void 0===s?void 0:s[l];return"industries"===l?Array.isArray(n)?n:[]:null!=n?n:""}return null!==(n=null===(l=t.extracted)||void 0===l?void 0:l[e])&&void 0!==n?n:""}},n=a(null!==(t=j[d])&&void 0!==t?t:l);for(let e of(s.push({id:0,label:"当前",value:n}),null!=o?o:[])){let t=j[e.talent.id];if(!t)continue;let l=a(t);void 0!==l&&"—"!==b(l)&&s.push({id:e.talent.id,label:"#".concat(e.talent.id),value:l})}return s},_=(e,t)=>C(l=>({...l,[e]:t})),B=async e=>{U(!0);try{await (0,r.aA)("/entities/talent/".concat(d,"/duplicates/dismiss"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({otherId:e})}),c(t=>(null!=t?t:[]).filter(t=>t.talent.id!==e)),N===e&&w(null)}catch(e){D("标注失败,请重试")}finally{U(!1)}},q=async()=>{var e,t,l,s;let a={...F};for(let[t,l]of Object.entries(A))if("name"!==t&&"headline"!==t){if(t.startsWith("intent.")){let s=t.slice(7);a.intent={...null!==(e=a.intent)&&void 0!==e?e:{},[s]:l}}else a[t]="number"!=typeof(s=F[t])||"string"!=typeof l||""===l.trim()||Number.isNaN(Number(l))?"boolean"==typeof s&&"string"==typeof l?"true"===l:l:Number(l)}for(let e of m)T[e]&&(a[e]=T[e]);let n=(null!=o?o:[]).filter(e=>!k.has(e.talent.id)).map(e=>e.talent.id);if(0===n.length){D("未勾选任何候选参与合并");return}U(!0);let c=!1;for(let e of n)try{await (0,r.aA)("/entities/talent/merge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepId:d,removeId:e,extracted:a,name:null!==(t=A.name)&&void 0!==t?t:null,headline:null!==(l=A.headline)&&void 0!==l?l:null})})}catch(e){c=!0;break}if(U(!1),c){D("合并失败,请重试");return}i.replace("/talents?id=".concat(d)),i.refresh(),window.location.reload()},R=async()=>{let e=(null!=o?o:[]).filter(e=>!k.has(e.talent.id)).map(e=>e.talent.id);if(0===e.length){D("未勾选任何候选参与合并");return}U(!0);let t=!0;for(let l of e)try{await (0,r.aA)("/entities/talent/merge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepId:d,removeId:l})})}catch(e){t=!1;break}if(U(!1),!t){D("合并失败,请重试");return}i.replace("/talents?id=".concat(d)),i.refresh(),window.location.reload()};if(null===o||0===o.length)return null;let J=null!==(t=o.find(e=>e.talent.id===N))&&void 0!==t?t:null,Y=null!=N?j[N]:null,z=e=>(0,s.jsx)("span",{className:"flex flex-wrap items-center gap-1",children:M(e).map(t=>(0,s.jsx)("button",{type:"button",title:"采纳:".concat(b(t.value)),onClick:()=>_(e,t.value),className:"rounded border border-gray-200 px-1.5 py-0.5 text-xs text-gray-500 hover:border-blue-400 hover:text-blue-600",children:t.label},t.id))});return(0,s.jsxs)("div",{className:"mb-4 rounded-lg border border-amber-300 bg-amber-50 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{className:"text-sm font-medium text-amber-800",children:["发现 ",o.length," 条可能重复的人才记录"]}),(0,s.jsx)("button",{onClick:()=>void L(),disabled:E,className:"rounded bg-amber-600 px-3 py-1 text-sm text-white hover:bg-amber-700 disabled:opacity-50",children:"查看并处理"}),(0,s.jsx)("button",{onClick:()=>void B(o[0].talent.id),disabled:E,className:"rounded border border-amber-400 px-3 py-1 text-sm text-amber-700 hover:bg-amber-100 disabled:opacity-50",children:"与最高分条目非重复"}),O?(0,s.jsx)("span",{className:"text-sm text-red-600",children:O}):null]}),x?(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-2 sm:p-4",onClick:()=>v(!1),children:(0,s.jsxs)("div",{className:"flex max-h-[92vh] w-full max-w-6xl flex-col overflow-hidden rounded-lg bg-white shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 border-b border-gray-200 px-4 py-3",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"重复简历合并工作区"}),(0,s.jsxs)("span",{className:"text-sm text-gray-500",children:["当前 #",d,l.name?" \xb7 ".concat(l.name):""," — ",o.length," 条候选"]}),(0,s.jsx)("button",{onClick:()=>v(!1),className:"ml-auto text-sm text-gray-500 hover:text-gray-700",children:"关闭"})]}),(0,s.jsxs)("div",{className:"grid flex-1 gap-0 overflow-hidden md:grid-cols-[250px,1fr]",children:[(0,s.jsxs)("div",{className:"overflow-y-auto border-b border-gray-200 p-3 md:border-b-0 md:border-r",children:[(0,s.jsx)("div",{className:"mb-2 text-xs font-medium text-gray-500",children:"候选简历(逐条处理)"}),(0,s.jsx)("div",{className:"space-y-2",children:o.map(e=>{var t;return(0,s.jsxs)("div",{className:"rounded-lg border p-2 ".concat(N===e.talent.id?"border-blue-400 bg-blue-50":"border-gray-200"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:!k.has(e.talent.id),disabled:E,onChange:t=>{S(l=>{let s=new Set(l);return t.target.checked?s.delete(e.talent.id):s.add(e.talent.id),s})},title:"勾选=同一人,参与本次合并"}),(0,s.jsx)("span",{className:"text-sm font-medium text-gray-900",children:null!==(t=e.talent.name)&&void 0!==t?t:"(未命名)"}),(0,s.jsxs)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-600",children:["相似度 ",e.score]})]}),(0,s.jsxs)("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:e.talent.sourceUrl,children:[e.talent.source," \xb7 ",(0,u.d3)(e.talent.updatedAt)]}),(0,s.jsxs)("div",{className:"mt-1.5 flex gap-1.5",children:[(0,s.jsx)("button",{type:"button",onClick:()=>w(e.talent.id),className:"rounded border border-gray-300 px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-50",children:"选中对比"}),(0,s.jsx)("button",{type:"button",disabled:E,onClick:()=>void B(e.talent.id),className:"rounded border border-gray-300 px-2 py-0.5 text-xs text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"非同一人"})]})]},e.talent.id)})})]}),(0,s.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex-1 space-y-4 overflow-y-auto p-4",children:[(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 border-b border-gray-100 px-3 py-2",children:[(0,s.jsx)("h4",{className:"text-sm font-semibold text-gray-900",children:"最终采用简历(可编辑)"}),(0,s.jsx)("button",{type:"button",onClick:()=>{L()},className:"rounded border border-gray-300 px-2 py-0.5 text-xs text-gray-600 hover:bg-gray-50",children:"重置为当前简历"})]}),(0,s.jsx)("div",{className:"divide-y divide-gray-100",children:Object.keys(A).map(e=>{var t,a;return(0,s.jsxs)("div",{className:"grid grid-cols-[90px,1fr,auto] items-center gap-2 px-3 py-1.5",children:[(0,s.jsx)("label",{className:"text-xs text-gray-500",children:null!==(t=p[e])&&void 0!==t?t:e}),"sourceUrl"===e?(0,s.jsx)("a",{href:String(null!==(a=A[e])&&void 0!==a?a:l.sourceUrl),target:"_blank",rel:"noreferrer",className:"truncate text-sm text-blue-600 hover:underline",children:"—"===b(A[e])?l.sourceUrl:b(A[e])}):"selfEvaluation"===e||"statement"===e?(0,s.jsx)("textarea",{value:"—"===b(A[e])?"":String(A[e]),onChange:t=>_(e,t.target.value),rows:2,className:"w-full rounded border border-gray-300 px-2 py-1 text-sm"}):(0,s.jsx)("input",{value:"—"===b(A[e])?"":String(A[e]),onChange:t=>_(e,t.target.value),className:"w-full rounded border border-gray-300 px-2 py-1 text-sm"}),z(e)]},e)})})]}),m.map(e=>{var t,l,a;let n=null!==(t=T[e])&&void 0!==t?t:[],r=[];for(let t of null!=o?o:[]){let s=j[t.talent.id],a=null==s?void 0:null===(l=s.extracted)||void 0===l?void 0:l[e];Array.isArray(a)&&a.forEach(e=>r.push({id:t.talent.id,item:e}))}return(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200",children:[(0,s.jsx)("div",{className:"flex items-center justify-between border-b border-gray-100 px-3 py-2",children:(0,s.jsxs)("h4",{className:"text-sm font-semibold text-gray-900",children:[null!==(a=g[e])&&void 0!==a?a:e,"(",n.length,")"]})}),0===n.length&&0===r.length?(0,s.jsx)("p",{className:"px-3 py-2 text-xs text-gray-400",children:"两侧均无数据"}):(0,s.jsxs)("div",{className:"space-y-2 p-3",children:[n.map((t,l)=>(0,s.jsxs)("div",{className:"rounded border border-gray-200 p-2",children:[(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 lg:grid-cols-4",children:Object.keys(null!=t?t:{}).filter(e=>!e.startsWith("_")).map(a=>{var r;return(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-xs text-gray-400",children:null!==(r=y[a])&&void 0!==r?r:a}),"string"==typeof t[a]&&t[a].length>40?(0,s.jsx)("textarea",{value:t[a],rows:2,onChange:t=>{let s=[...n];s[l]={...s[l],[a]:t.target.value},I(t=>({...t,[e]:s}))},className:"w-full rounded border border-gray-300 px-2 py-1 text-xs"}):(0,s.jsx)("input",{value:"—"===b(t[a])?"":String(t[a]),onChange:t=>{let s=[...n];s[l]={...s[l],[a]:t.target.value},I(t=>({...t,[e]:s}))},className:"w-full rounded border border-gray-300 px-2 py-1 text-xs"})]},a)})}),(0,s.jsx)("div",{className:"mt-1.5 flex items-center gap-2",children:(0,s.jsx)("button",{type:"button",onClick:()=>I(t=>({...t,[e]:n.filter((e,t)=>t!==l)})),className:"rounded border border-red-200 px-2 py-0.5 text-xs text-red-600 hover:bg-red-50",children:"删除此条"})})]},l)),r.length?(0,s.jsxs)("div",{className:"rounded border border-dashed border-gray-300 p-2",children:[(0,s.jsx)("div",{className:"mb-1 text-xs text-gray-500",children:"候选条目(选择合入或更新)"}),(0,s.jsx)("div",{className:"space-y-1.5",children:r.map((t,l)=>{var a,r,i,d,o,c,u,x,m;let h=n.findIndex(e=>(function(e,t){let l=e=>{var t,l,s;return String(null!==(s=null!==(l=null!==(t=null==e?void 0:e.company)&&void 0!==t?t:null==e?void 0:e.school)&&void 0!==l?l:null==e?void 0:e.name)&&void 0!==s?s:"")},s=e=>{var t,l,s;return String(null!==(s=null==e?void 0:e.period)&&void 0!==s?s:"".concat(null!==(t=null==e?void 0:e.start)&&void 0!==t?t:"","-").concat(null!==(l=null==e?void 0:e.end)&&void 0!==l?l:""))},a=l(e),n=l(t),r=s(e),i=s(t);return!!a&&!!n&&a===n||!!r&&!!i&&r===i&&(!a||!n||a===n)})(e,t.item));return(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsxs)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-gray-500",children:["#",t.id]}),(0,s.jsxs)("span",{className:"min-w-0 flex-1 truncate text-gray-700",children:[b(null!==(i=null!==(r=null!==(a=t.item.company)&&void 0!==a?a:t.item.school)&&void 0!==r?r:t.item.name)&&void 0!==i?i:"")," \xb7 ",b(null!==(c=null!==(o=null!==(d=t.item.position)&&void 0!==d?d:t.item.major)&&void 0!==o?o:t.item.role)&&void 0!==c?c:"")," \xb7 ",b(null!==(m=t.item.period)&&void 0!==m?m:"".concat(null!==(u=t.item.start)&&void 0!==u?u:"","-").concat(null!==(x=t.item.end)&&void 0!==x?x:""))]}),h>=0?(0,s.jsxs)("button",{type:"button",onClick:()=>{let l=[...n];l[h]={...t.item},I(t=>({...t,[e]:l}))},className:"shrink-0 rounded border border-blue-300 px-2 py-0.5 text-blue-600 hover:bg-blue-50",children:["更新条目",h+1]}):(0,s.jsx)("button",{type:"button",onClick:()=>I(l=>({...l,[e]:[...n,{...t.item}]})),className:"shrink-0 rounded border border-green-300 px-2 py-0.5 text-green-700 hover:bg-green-50",children:"合入"})]},l)})})]}):null]})]},e)}),J&&Y?(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200",children:[(0,s.jsx)("div",{className:"border-b border-gray-100 px-3 py-2",children:(0,s.jsxs)("h4",{className:"text-sm font-semibold text-gray-900",children:["与候选 #",J.talent.id," 对比",J.reasons.length?(0,s.jsx)("span",{className:"ml-2 space-x-1",children:J.reasons.map(e=>(0,s.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs font-normal text-gray-600",children:e},e))}):null]})}),(0,s.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b border-gray-100 text-left text-xs text-gray-500",children:[(0,s.jsx)("th",{className:"py-1.5 pl-3 pr-2 font-medium",children:"字段"}),(0,s.jsxs)("th",{className:"py-1.5 pr-2 font-medium",children:["当前 #",d]}),(0,s.jsxs)("th",{className:"py-1.5 pr-3 font-medium",children:["候选 #",J.talent.id]})]})}),(0,s.jsx)("tbody",{children:Object.keys(A).map(e=>{var t,a,n,r;let i=b(null===(t=M(e)[0])||void 0===t?void 0:t.value),d=b((()=>{var t,l,s,a;let n=j[J.talent.id];if(n){if("name"===e)return n.name;if("headline"===e)return n.headline;if(e.startsWith("intent.")){let t=e.slice(7),a=null===(s=n.extracted)||void 0===s?void 0:null===(l=s.intent)||void 0===l?void 0:l[t];return"industries"===t?Array.isArray(a)?a:[]:null!=a?a:""}return null!==(a=null===(t=n.extracted)||void 0===t?void 0:t[e])&&void 0!==a?a:""}})()),o=i!==d&&"—"!==i&&"—"!==d;return(0,s.jsxs)("tr",{className:"border-b border-gray-50",children:[(0,s.jsx)("td",{className:"py-1 pl-3 pr-2 text-xs text-gray-500",children:null!==(n=p[e])&&void 0!==n?n:e}),(0,s.jsx)("td",{className:"py-1 pr-2 ".concat(o?"bg-amber-50":""),children:"sourceUrl"===e?(0,s.jsx)("a",{href:String(null!==(r=null===(a=M(e)[0])||void 0===a?void 0:a.value)&&void 0!==r?r:l.sourceUrl),target:"_blank",rel:"noreferrer",className:"break-all text-blue-600 hover:underline",children:i}):(0,s.jsx)("span",{className:"break-all",children:i})}),(0,s.jsx)("td",{className:"py-1 pr-3 ".concat(o?"bg-amber-50":""),children:"sourceUrl"===e?(0,s.jsx)("a",{href:String((()=>{var e;let t=j[J.talent.id];return null!==(e=null==t?void 0:t.sourceUrl)&&void 0!==e?e:""})()),target:"_blank",rel:"noreferrer",className:"break-all text-blue-600 hover:underline",children:d}):(0,s.jsx)("span",{className:"break-all",children:d})})]},e)})})]})]}):null]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-gray-200 px-4 py-3",children:[(0,s.jsx)("button",{type:"button",onClick:()=>void q(),disabled:E,className:"rounded bg-blue-600 px-4 py-1.5 text-sm text-white hover:bg-blue-700 disabled:opacity-50",children:"提交合并(采用上方编辑值)"}),(0,s.jsx)("button",{type:"button",onClick:()=>void R(),disabled:E,title:"传统语义:保留字段更全的一侧,另一侧补空合并",className:"rounded border border-gray-300 px-4 py-1.5 text-sm text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"快捷:整行补空合并"}),(0,s.jsx)("span",{className:"text-xs text-gray-500",children:"被合并的候选会进入回收站(可恢复)"}),O?(0,s.jsx)("span",{className:"text-sm text-red-600",children:O}):null]})]})]})]})}):null]})}var j=l(65777);function f(e){var t,l;let{entityId:n,name:i}=e,[d,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),[x,m]=(0,a.useState)([]),[h,p]=(0,a.useState)(""),[g,y]=(0,a.useState)("pending_invite"),[b,v]=(0,a.useState)(!1),[f,N]=(0,a.useState)(null),[w,k]=(0,a.useState)(null),{sync:S}=(0,j.nu)(),A=null!==(t=null==S?void 0:S.activeTenantId)&&void 0!==t?t:null;(0,a.useEffect)(()=>{d&&((async()=>{try{u(await (0,r.aA)("/recommendations/meta"))}catch(e){}})(),(async()=>{try{let e=await (0,r.aA)("/job-cases?limit=200");m(e.items)}catch(e){}})())},[d,A]);let C=async()=>{if(""!==h){v(!0),k(null);try{await (0,r.aA)("/recommendations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jobCaseId:h,entityId:n,stage:g})}),N({jobCaseId:Number(h)})}catch(e){k("写入失败(服务未启动或无权限)")}finally{v(!1)}}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>{o(!0),N(null),k(null)},className:"rounded bg-blue-600 px-3 py-1 text-sm text-white hover:bg-blue-700",children:"加入推荐流程"}),d?(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",children:(0,s.jsx)("div",{className:"w-96 rounded-lg bg-white p-4 shadow-xl",children:f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"mb-3 text-sm text-gray-800",children:["已把 ",(0,s.jsx)("span",{className:"font-medium",children:i})," 加入推荐流程。"]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,s.jsx)("button",{onClick:()=>o(!1),className:"rounded border border-gray-300 px-3 py-1 text-xs text-gray-600",children:"关闭"}),(0,s.jsx)("a",{href:"/jobs?id=".concat(f.jobCaseId),className:"rounded bg-blue-600 px-3 py-1 text-xs text-white hover:bg-blue-700",children:"去职位推荐流程 →"})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h3",{className:"mb-3 text-sm font-semibold text-gray-900",children:["把 ",i," 加入推荐流程"]}),(0,s.jsxs)("label",{className:"mb-2 block text-xs text-gray-500",children:["目标职位",(0,s.jsxs)("select",{value:h,onChange:e=>p(""===e.target.value?"":Number(e.target.value)),className:"mt-1 w-full rounded border border-gray-300 px-2 py-1.5 text-sm",children:[(0,s.jsx)("option",{value:"",children:"选择职位…"}),x.map(e=>(0,s.jsx)("option",{value:e.id,children:e.title||e.externalId},e.id))]})]}),(0,s.jsxs)("label",{className:"mb-3 block text-xs text-gray-500",children:["推荐阶段(默认待邀请)",(0,s.jsx)("select",{value:g,onChange:e=>y(e.target.value),className:"mt-1 w-full rounded border border-gray-300 px-2 py-1.5 text-sm",children:(null!==(l=null==c?void 0:c.stages)&&void 0!==l?l:[{key:"pending_invite",label:"待邀请"}]).map(e=>(0,s.jsx)("option",{value:e.key,children:e.label},e.key))})]}),w?(0,s.jsx)("p",{className:"mb-2 text-xs text-red-600",children:w}):null,(0,s.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,s.jsx)("button",{onClick:()=>o(!1),className:"rounded border border-gray-300 px-3 py-1 text-xs text-gray-600",children:"取消"}),(0,s.jsx)("button",{onClick:()=>void C(),disabled:""===h||b,className:"rounded bg-blue-600 px-3 py-1 text-xs text-white hover:bg-blue-700 disabled:opacity-40",children:b?"写入中…":"确认加入"})]})]})})}):null]})}var N=l(32587);let w={talent:"人才",job:"职位",company:"公司"},k={talent:"bg-blue-50 text-blue-700",job:"bg-yellow-50 text-yellow-700",company:"bg-green-50 text-green-700"};function S(e){var t,l,n,i,d,o;let{type:c,entity:m,sources:h}=e,[p,g]=(0,a.useState)(h.length?String(h[0].id):""),[y,b]=(0,a.useState)(!1),[j,S]=(0,a.useState)(null),[A,C]=(0,a.useState)(null),[T,I]=(0,a.useState)(null);async function E(){S(null);try{let e=await fetch("".concat((0,r.Ox)(),"/entities/").concat(c,"/").concat(m.id,"/repair-prompt"));if(!e.ok)throw Error("HTTP ".concat(e.status));let t=await e.json();await navigator.clipboard.writeText(t.prompt),b(!0),setTimeout(()=>b(!1),4e3)}catch(e){S(e.message)}}(0,a.useEffect)(()=>{if("talent"!==c)return;let e=!0;return(async()=>{try{var t,l;let s=await fetch("".concat((0,r.Ox)(),"/entities/talent/").concat(m.id,"/matches"));if(!s.ok)return;let a=await s.json();if(!e)return;C(null!==(t=null==a?void 0:a.portraitId)&&void 0!==t?t:null),I(null!==(l=null==a?void 0:a.matches)&&void 0!==l?l:[])}catch(e){}})(),()=>{e=!1}},[c,m.id]);let U="talent"===c?null!==(t=m.name)&&void 0!==t?t:"(未命名)":"job"===c?null!==(l=m.title)&&void 0!==l?l:"(未命名职位)":null!==(n=m.name)&&void 0!==n?n:"(未命名)",O="talent"===c?m.headline:"job"===c?m.company:"",D=h.find(e=>String(e.id)===p)||h[0];return(0,s.jsxs)("div",{className:"w-full",children:["talent"===c?(0,s.jsx)(v,{entity:m}):null,(0,s.jsxs)("header",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:U}),(0,s.jsx)("span",{className:"rounded px-2 py-0.5 text-xs ".concat(null!==(i=k[c])&&void 0!==i?i:"bg-gray-100 text-gray-600"),children:null!==(d=w[c])&&void 0!==d?d:c}),(0,s.jsx)("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-600",children:m.source}),m.sourceUrl?(0,s.jsx)("a",{href:m.sourceUrl,target:"_blank",rel:"noreferrer",title:m.sourceUrl,className:"max-w-xl truncate text-sm text-blue-600 hover:underline",children:m.sourceUrl}):null]}),O?(0,s.jsx)("p",{className:"mt-1 text-gray-600",children:O}):null,m.sessionId?(0,s.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,s.jsx)("button",{onClick:E,className:"rounded bg-amber-600 px-3 py-1 text-sm text-white hover:bg-amber-700",children:y?"已复制 ✓ 请发给 agent":"解析有误让agent修复"}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"按录制重解析、修解析 bug、提 issue"}),j?(0,s.jsx)("span",{className:"text-xs text-red-600",children:j}):null]}):null,"talent"===c?(0,s.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,s.jsx)(f,{entityId:m.id,name:U}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"加入某职位推荐流水线,默认待邀请"})]}):null]}),"talent"===c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.n,{entity:m}),(0,s.jsx)(N.z,{entity:m,portraitId:A,matches:T,sources:h.map(e=>({id:e.id,sourceUrl:e.sourceUrl,domain:e.domain,createdAt:e.createdAt}))})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"解析来源"}),D?(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-500",children:"当前来源页面"}),(0,s.jsx)("a",{href:D.sourceUrl,target:"_blank",rel:"noreferrer",className:"break-all text-sm text-blue-600 hover:underline",children:D.sourceUrl}),D.hasSnapshot?(0,s.jsx)("span",{className:"ml-2 rounded bg-green-50 px-1.5 py-0.5 text-xs text-green-700",children:"有录制快照"}):null]}),h.length>1?(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("label",{className:"text-sm text-gray-600",children:"历史来源:"}),(0,s.jsx)("select",{value:p,onChange:e=>g(e.target.value),className:"rounded border border-gray-300 px-2 py-1 text-sm",children:h.map(e=>(0,s.jsxs)("option",{value:e.id,children:[e.domain," \xb7 ",(0,u.d3)(e.createdAt)]},e.id))}),(0,s.jsx)("a",{href:D.sourceUrl,target:"_blank",rel:"noreferrer",className:"rounded bg-blue-600 px-3 py-1 text-sm text-white hover:bg-blue-700",children:"打开该来源页面"})]}):null]}):(0,s.jsx)("div",{className:"text-sm text-gray-500",children:"暂无解析来源记录"})]}),(0,s.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"原始数据"}),(0,s.jsx)(x.Y,{data:null!==(o=m.extracted)&&void 0!==o?o:m.raw})]})]})]})}var A=l(27828),C=l(26119),T=l(93464);function I(e){let t=new URLSearchParams;Object.entries(e).forEach(e=>{let[l,s]=e;s&&t.set(l,s)});let l=t.toString();return l?"?".concat(l):""}function E(e){var t,l;let{type:x,label:m,batchDelete:h}=e,p=(0,n.useRouter)(),g=(0,n.usePathname)(),y=(0,n.useSearchParams)(),b=y.get("id")||"",v=(0,a.useMemo)(()=>({q:y.get("q")||"",status:"",from:y.get("from")||"",to:y.get("to")||""}),[y]),[f,N]=(0,a.useState)(null),[w,k]=(0,a.useState)(!1),[E,U]=(0,a.useState)(!1),[O,D]=(0,a.useState)(0),F=(0,a.useCallback)(e=>{var t,l;let s=null!==(t=e.filters)&&void 0!==t?t:v,a=I({id:null!==(l=e.id)&&void 0!==l?l:b,q:s.q,from:s.from,to:s.to});p.replace("".concat(g).concat(a))},[v,b,g,p]),{session:P,sync:L}=(0,j.nu)(),M=null!==(t=null==L?void 0:L.activeTenantId)&&void 0!==t?t:null,_=(0,C.B)({deleteUrl:"/entities/".concat(x),label:m,onDeleted:()=>B.refresh(),currentUserId:null!==(l=null==P?void 0:P.hmUserId)&&void 0!==l?l:null}),B=(0,T.k)({fetchPage:(0,a.useCallback)(async(e,t)=>{let l=I({q:v.q,from:v.from,to:v.to}),s=await (0,r.aA)("/entities?type=".concat(x,"&limit=").concat(t,"&offset=").concat(e).concat(l.replace("?","&")));return{items:s.items,total:s.total,nextOffset:s.nextOffset}},[x,v.q,v.from,v.to,M]),pageSize:50,deps:[x,v.q,v.from,v.to,M]}),q=B.items;(0,a.useEffect)(()=>{_.prune(q.map(e=>String(e.id)))},[q,_]);let R=(0,a.useCallback)(()=>{if(q.length)return q[0].updatedAt},[q]);(0,a.useEffect)(()=>{if(!b){N(null),U(!1);return}k(!0),U(!1),Promise.all([(0,r.aA)("/entities/".concat(x,"/").concat(b)),(0,r.aA)("/entities/".concat(x,"/").concat(b,"/sources")).catch(()=>null)]).then(e=>{let[t,l]=e;N({entity:t.entity,sources:l?l.items:[]})}).catch(()=>{N(null),U(!0)}).finally(()=>{k(!1)})},[x,b,M,O]);let J=(0,a.useMemo)(()=>q.map(e=>{var t,l,a;let n=String(e.id),r="talent"===x?(0,s.jsx)(A.oj,{name:null!==(t=e.name)&&void 0!==t?t:"(未命名)",headline:e.headline,source:e.source,updatedAt:e.updatedAt}):"job"===x?(0,s.jsx)(A.rY,{title:null!==(l=e.title)&&void 0!==l?l:"(无标题)",source:e.source,company:e.company,sourceUrl:e.sourceUrl,updatedAt:e.updatedAt}):(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"font-medium text-gray-900",children:null!==(a=e.name)&&void 0!==a?a:"(未命名)"}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[(0,s.jsx)("span",{children:e.source}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("span",{children:(0,u.d3)(e.updatedAt)})]})]});return{id:n,content:(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[h&&_.checkbox(n),r]})}}),[q,x,h,_]),Y=b?w?(0,s.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):E?(0,s.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,s.jsx)("button",{type:"button",onClick:()=>D(e=>e+1),className:"text-blue-500 hover:underline",children:"重试"})]}):f?(0,s.jsx)(S,{type:x,entity:f.entity,sources:f.sources}):(0,s.jsxs)("div",{className:"flex h-full items-center justify-center text-red-500",children:["未找到该",m]}):(0,s.jsxs)("div",{className:"flex h-full items-center justify-center text-gray-400",children:["请在左侧选择一条",m,"查看详情"]});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.m,{filterBar:(0,s.jsxs)("div",{className:"border-b border-gray-200 bg-white",children:[(0,s.jsx)(i.f,{value:v,onChange:e=>F({filters:e})}),(0,s.jsx)(c.Y,{pollUrl:"/entities/count?type=".concat(x),getLatestTimestamp:R,onRefresh:()=>B.refresh(),label:m}),h&&_.bar(J)]}),listPanel:B.error?(0,s.jsxs)("div",{className:"flex-1 overflow-auto p-4 text-center text-sm",children:[(0,s.jsx)("span",{className:"text-red-500",children:"加载失败"}),(0,s.jsx)("button",{type:"button",onClick:()=>B.refresh(),className:"ml-2 text-blue-500 hover:underline",children:"重试"})]}):(0,s.jsx)(o.L,{items:J,selectedId:b,onSelect:e=>F({id:e}),loading:B.loading,emptyText:"暂无".concat(m,"数据"),onLoadMore:B.loadMore,loadingMore:B.loadingMore,exhausted:B.exhausted}),detailPanel:Y}),_.modal()]})}function U(e){return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)("div",{className:"p-6 text-gray-500",children:"加载中…"}),children:(0,s.jsx)(E,{...e})})}},37202:function(e,t,l){l.d(t,{f:function(){return n}});var s=l(72835),a=l(60635);function n(e){let{value:t,showStatus:l,statusOptions:n,onChange:r}=e,[i,d]=(0,a.useState)(t);return(0,a.useEffect)(()=>{d(t)},[t.q,t.status,t.from,t.to]),(0,a.useEffect)(()=>{let e=setTimeout(()=>{(i.q!==t.q||i.status!==t.status||i.from!==t.from||i.to!==t.to)&&r(i)},300);return()=>clearTimeout(e)},[i.q,i.status,i.from,i.to]),(0,s.jsxs)("div",{className:"space-y-2 border-b border-gray-200 bg-white p-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("div",{className:"relative flex-1",children:[(0,s.jsx)("input",{type:"text",value:i.q,onChange:e=>d(t=>({...t,q:e.target.value})),placeholder:"搜索关键词...",className:"w-full rounded border border-gray-300 px-2 py-1.5 pr-8 text-sm outline-none focus:border-blue-500"}),(0,s.jsx)("button",{type:"button",onClick:()=>r({q:"",status:"",from:"",to:""}),title:"重置筛选",className:"absolute right-1 top-1/2 -translate-y-1/2 rounded p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 disabled:opacity-30",disabled:!i.q&&!i.status&&!i.from&&!i.to,children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),l?(0,s.jsxs)("select",{value:i.status,onChange:e=>d(t=>({...t,status:e.target.value})),className:"rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500",children:[(0,s.jsx)("option",{value:"",children:"全部状态"}),(n||[]).map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"date",value:i.from,onChange:e=>d(t=>({...t,from:e.target.value})),className:"rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500"}),(0,s.jsx)("span",{className:"text-sm text-gray-400",children:"-"}),(0,s.jsx)("input",{type:"date",value:i.to,onChange:e=>d(t=>({...t,to:e.target.value})),className:"rounded border border-gray-300 px-2 py-1.5 text-sm outline-none focus:border-blue-500"})]})]})}},86777:function(e,t,l){l.d(t,{Y:function(){return d}});var s=l(72835),a=l(60635);function n(e){let{value:t}=e;if(null===t)return(0,s.jsx)("span",{className:"italic text-gray-400",children:"null"});if(void 0===t)return(0,s.jsx)("span",{className:"italic text-gray-400",children:"undefined"});switch(typeof t){case"string":return(0,s.jsxs)("span",{className:"break-all text-red-700",children:['"',t,'"']});case"number":return(0,s.jsx)("span",{className:"text-emerald-700",children:String(t)});case"boolean":return(0,s.jsx)("span",{className:"text-blue-700",children:String(t)});default:return(0,s.jsx)("span",{className:"text-gray-700",children:String(t)})}}function r(e){let{name:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"text-indigo-700",children:['"',t,'"']}),(0,s.jsx)("span",{className:"text-gray-500",children:": "})]})}function i(e){let{name:t,value:l,depth:d}=e,[o,c]=(0,a.useState)(d<2);if(!("object"==typeof l&&null!==l&&!Array.isArray(l))&&!Array.isArray(l))return(0,s.jsxs)("div",{className:"min-w-0",children:[null!==t?(0,s.jsx)(r,{name:t}):null,(0,s.jsx)(n,{value:l})]});let u=Array.isArray(l),x=u?l.map((e,t)=>[String(t),e]):Object.entries(l),m=u?"]":"}",h=x.length;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"group flex cursor-pointer select-none items-baseline rounded hover:bg-gray-100",onClick:()=>c(e=>!e),role:"button","aria-expanded":o,children:[(0,s.jsx)("span",{className:"mr-0.5 inline-block w-4 shrink-0 text-center text-gray-400",children:h>0?o?"▾":"▸":""}),null!==t?(0,s.jsx)(r,{name:t}):null,(0,s.jsx)("span",{className:"text-gray-700",children:u?"[":"{"}),o?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"mx-1 rounded bg-gray-100 px-1 text-gray-400 group-hover:bg-gray-200",children:u?"".concat(h," 项"):"".concat(h," 键")}),(0,s.jsx)("span",{className:"text-gray-700",children:m})]})]}),o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"ml-[7px] border-l border-gray-200 pl-3",children:x.map(e=>{let[t,l]=e;return(0,s.jsx)(i,{name:u?null:t,value:l,depth:d+1},t)})}),(0,s.jsx)("div",{className:"pl-5 text-gray-700",children:m})]}):null]})}function d(e){let{data:t}=e;return null==t?(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"(无数据)"}):(0,s.jsx)("div",{className:"max-h-[32rem] overflow-auto rounded bg-gray-50 p-3 font-mono text-xs leading-5",children:(0,s.jsx)(i,{name:null,value:t,depth:0})})}},19036:function(e,t,l){l.d(t,{Y:function(){return r}});var s=l(72835),a=l(60635),n=l(74431);function r(e){let{pollUrl:t,intervalMs:l=5e3,onRefresh:r,getLatestTimestamp:i,label:d="新数据"}=e,[o,c]=(0,a.useState)(0),[u,x]=(0,a.useState)(!1),m=(0,a.useRef)(void 0);return((0,a.useEffect)(()=>{let e=()=>x(document.hidden);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,a.useEffect)(()=>{m.current=i(),c(0)},[i]),(0,a.useEffect)(()=>{if(u)return;let e=async()=>{let e=m.current;if(!e)return;let l=t.includes("?")?"&":"?",s=0;try{var a;let r=await (0,n.aA)("".concat(t).concat(l,"since=").concat(encodeURIComponent(e)));s=null!==(a=r.count)&&void 0!==a?a:0}catch(e){}c(e=>Math.max(e,s))};e();let s=setInterval(e,l);return()=>clearInterval(s)},[t,l,u]),o<=0)?null:(0,s.jsxs)("button",{type:"button",onClick:()=>{c(0),r()},className:"w-full bg-blue-50 px-3 py-2 text-center text-sm text-blue-700 hover:bg-blue-100 active:bg-blue-200",children:["有 ",o," 条",d,",点击刷新"]})}},32587:function(e,t,l){l.d(t,{n:function(){return T},z:function(){return I}});var s=l(72835),a=l(60635),n=l(74431);let r={merge:"解析合并",sync:"同步覆盖",manual:"人工编辑",backfill:"回溯回填"};var i=l(8448);let d={"identity.displayName":"姓名","identity.gender":"性别","identity.birthYear":"出生年","identity.location":"地点","identity.nationality":"国籍","professional.headline":"头衔","professional.summary":"简介","professional.currentCompany":"现任公司","professional.currentTitle":"现任职位","professional.titleLevel":"职级","professional.yearsOfExperience":"工作年限","professional.currentStatus":"当前状态","professional.desiredJob":"求职意向","professional.skills":"技能","professional.workExperiences":"工作经历","professional.educations":"教育经历","professional.projects":"项目经历","professional.languages":"语言","professional.certifications":"证书","contact.phones":"电话","contact.emails":"邮箱","contact.wechats":"微信","contact.linkedinUrls":"LinkedIn"},o=e=>{if(null==e)return"(空)";if("object"==typeof e){if(e.truncated)return"".concat(String(e.preview).slice(0,40),"…");if(e.name)return String(e.name);if(e.city)return String(e.city);if(e.added||e.removed){var t,l;let s=[];return(null===(t=e.added)||void 0===t?void 0:t.length)&&s.push("+".concat(e.added.map(e=>{var t,l,s,a;return null!==(a=null!==(s=null!==(l=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e?void 0:e.companyName)&&void 0!==l?l:null==e?void 0:e.school)&&void 0!==s?s:null==e?void 0:e.language)&&void 0!==a?a:String(e)}).join("、"))),(null===(l=e.removed)||void 0===l?void 0:l.length)&&s.push("-".concat(e.removed.map(e=>{var t,l,s,a;return null!==(a=null!==(s=null!==(l=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e?void 0:e.companyName)&&void 0!==l?l:null==e?void 0:e.school)&&void 0!==s?s:null==e?void 0:e.language)&&void 0!==a?a:String(e)}).join("、"))),s.join(" ")||"(数量变化)"}return JSON.stringify(e).slice(0,40)}return String(e)};function c(e){let{versions:t,recommendations:l,changes:n,evaluations:c,matches:u}=e,x=(0,a.useMemo)(()=>{if(!(null==l?void 0:l.length))return null;let e=null;for(let r of l){var t,s,a,n;let l=null!==(t=r.history)&&void 0!==t?t:[],i=l.length?l[l.length-1]:null,d=null!==(s=null==i?void 0:i.at)&&void 0!==s?s:r.createdAt;(!e||d>e.at)&&(e={at:d,jobTitle:null!==(a=r.jobTitle)&&void 0!==a?a:"职位 #".concat(r.jobCaseId),toStage:null!==(n=null==i?void 0:i.toStage)&&void 0!==n?n:r.stage,by:null==i?void 0:i.by})}return e},[l]),m=(0,a.useMemo)(()=>{if(!(null==l?void 0:l.length))return[];let e=new Map;for(let a of l){var t,s;e.set(a.jobCaseId,{jobTitle:null!==(t=a.jobTitle)&&void 0!==t?t:"职位 #".concat(a.jobCaseId),stage:a.stage,stageLabel:null!==(s=a.stageLabel)&&void 0!==s?s:a.stage,updatedAt:a.updatedAt})}return Array.from(e.entries()).map(e=>{let[t,l]=e;return{jobCaseId:t,...l}}).sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt))},[l]),h={rejected:"bg-red-50 text-red-700",onboarding:"bg-green-50 text-green-700"},p=(e,t)=>{var l;return(0,s.jsxs)("span",{className:"rounded px-2 py-0.5 text-xs ".concat(null!==(l=h[e])&&void 0!==l?l:"bg-blue-50 text-blue-700"),children:[t,h[e]?"":"(在途)"]})},g=(0,a.useMemo)(()=>{var e,a,i,u,x,m,h,p,g,y;let b=[];for(let t of null!=l?l:[])for(let l of null!==(e=t.history)&&void 0!==e?e:[])b.push({at:l.at,icon:"\uD83D\uDCE4",tone:"text-blue-700",text:(0,s.jsxs)("span",{children:[(0,s.jsx)("b",{children:null!==(a=t.jobTitle)&&void 0!==a?a:"职位 #".concat(t.jobCaseId)}),":",l.fromStage?"".concat(l.fromStage," → "):"",null!==(i=l.toStage)&&void 0!==i?i:l.action,l.by?(0,s.jsxs)("span",{className:"text-gray-400",children:[" \xb7 ",l.by]}):null,l.note?(0,s.jsxs)("span",{className:"text-gray-400",children:[" \xb7 ",l.note]}):null]})});for(let e of null!=n?n:[])b.push({at:e.createdAt,icon:"\uD83D\uDCDD",tone:"text-amber-700",text:(0,s.jsxs)("span",{children:["简历变更:",null!==(u=d[e.fieldPath])&&void 0!==u?u:e.fieldPath,"(",null!==(x=r[e.changeType])&&void 0!==x?x:e.changeType,")",(0,s.jsxs)("span",{className:"text-gray-400",children:[" ",o(e.oldValue)," → ",o(e.newValue)]}),e.sourceSystem?(0,s.jsxs)("span",{className:"text-gray-400",children:[" \xb7 来源 ",e.sourceSystem]}):null]})});for(let e of null!=t?t:[])b.push({at:e.createdAt,icon:"\uD83C\uDD95",tone:"text-green-700",text:(0,s.jsxs)("span",{children:["新版本简历入库:",null!==(g=null===(m=e.source)||void 0===m?void 0:m.system)&&void 0!==g?g:"未知渠道",(null===(p=e.source)||void 0===p?void 0:null===(h=p.collector)||void 0===h?void 0:h.creatorName)?(0,s.jsxs)("span",{className:"text-gray-400",children:[" \xb7 同步人 ",e.source.collector.creatorName]}):null]})});for(let e of null!=c?c:[])b.push({at:e.createdAt,icon:"\uD83D\uDCCA",tone:"text-violet-700",text:(0,s.jsxs)("span",{children:["生成评估:",(0,s.jsx)("b",{children:null!==(y=e.jobTitle)&&void 0!==y?y:"职位 #".concat(e.jobCaseId)}),(0,s.jsxs)("span",{className:"text-gray-400",children:[" \xb7 ",e.generatedBy]})]})});return b.sort((e,t)=>t.at.localeCompare(e.at)).slice(0,30)},[l,n,t,c]),y=(0,a.useMemo)(()=>(null!=u?u:[]).slice().sort((e,t)=>{var l,s,a,n;return(null!==(a=null===(l=t.scores)||void 0===l?void 0:l.overall)&&void 0!==a?a:0)-(null!==(n=null===(s=e.scores)||void 0===s?void 0:s.overall)&&void 0!==n?n:0)}).slice(0,3),[u]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("section",{className:"rounded-lg border border-blue-200 bg-blue-50/50 p-4",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"最近一次推荐"}),x?(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-lg font-semibold text-gray-900",children:x.jobTitle}),x.toStage?p(x.toStage,x.toStage):null,(0,s.jsxs)("span",{className:"text-xs text-gray-400",children:[(0,i.d3)(x.at),x.by?" \xb7 ".concat(x.by):""]})]}):(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"暂无推荐记录"})]}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-4 shadow-sm",children:[(0,s.jsxs)("h3",{className:"mb-2 text-sm font-semibold text-gray-900",children:["推荐履历(",m.length,")"]}),m.length?(0,s.jsx)("ul",{className:"space-y-2",children:m.map(e=>(0,s.jsxs)("li",{className:"flex items-center justify-between gap-2 text-sm",children:[(0,s.jsx)("a",{href:"/jobs?id=".concat(e.jobCaseId),className:"truncate text-blue-600 hover:underline",children:e.jobTitle}),p(e.stage,e.stageLabel)]},e.jobCaseId))}):(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"暂无推荐记录"})]}),(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-4 shadow-sm",children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-gray-900",children:"在管职位匹配 Top 3"}),y.length?(0,s.jsx)("ul",{className:"space-y-2",children:y.map(e=>{var t,l,a,n,r,i,d;return(0,s.jsxs)("li",{className:"flex items-center justify-between gap-2 text-sm",children:[(0,s.jsx)("a",{href:"/jobs?id=".concat(e.jobCaseId),className:"truncate text-blue-600 hover:underline",children:(null===(t=e.jobCase)||void 0===t?void 0:t.title)||"职位 #".concat(e.jobCaseId)}),(0,s.jsxs)("span",{className:"rounded px-2 py-0.5 text-xs ".concat((null!==(r=null===(l=e.scores)||void 0===l?void 0:l.overall)&&void 0!==r?r:0)>=75?"bg-green-50 text-green-700":(null!==(i=null===(a=e.scores)||void 0===a?void 0:a.overall)&&void 0!==i?i:0)>=60?"bg-amber-50 text-amber-700":"bg-gray-100 text-gray-600"),children:[null!==(d=null===(n=e.scores)||void 0===n?void 0:n.overall)&&void 0!==d?d:"-"," 分"]})]},e.id)})}):(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"暂无高匹配在管职位"}),(0,s.jsx)("p",{className:"mt-2 text-xs text-gray-400",children:"完整匹配与规则明细见「简历」tab"})]})]}),(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-4 shadow-sm",children:[(0,s.jsx)("h3",{className:"mb-3 text-sm font-semibold text-gray-900",children:"动态(推荐 / 简历变更 / 新版本 / 评估)"}),g.length?(0,s.jsx)("ol",{className:"space-y-2",children:g.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm",children:[(0,s.jsx)("span",{children:e.icon}),(0,s.jsx)("span",{className:e.tone,children:e.text}),(0,s.jsx)("span",{className:"shrink-0 text-xs text-gray-400",children:(0,i.d3)(e.at)})]},t))}):(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"暂无动态"})]})]})}var u=l(86777);let x=[["skill","技能",.25],["experience","经验年限",.2],["industry","行业",.1],["company","公司",.1],["location","地点",.1],["salary","薪资",.1],["education","学历",.05],["stability","稳定性",.05],["availability","可用性",.05]],m=(e,t,l)=>[e,t].filter(Boolean).join(" - ")+(l?"(".concat(l,")"):"");function h(e){let{title:t,children:l}=e;return(0,s.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsx)("h2",{className:"mb-3 text-lg font-semibold text-gray-900",children:t}),l]})}function p(e){let{children:t}=e;return(0,s.jsx)("span",{className:"rounded bg-blue-50 px-2 py-0.5 text-xs text-blue-700",children:t})}function g(e){var t,l;let{entity:r}=e,i=r.extracted||{},[d,o]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),[g,y]=(0,a.useState)(!1),[b,v]=(0,a.useState)(null),j=(0,a.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];y(!0);try{var t;let l=e?await (0,n.aA)("/entities/talent/".concat(r.id,"/match-jobs"),{method:"POST",headers:{"Content-Type":"application/json"}}):await (0,n.aA)("/entities/talent/".concat(r.id,"/matches"));o(null!==(t=l.matches)&&void 0!==t?t:[]),u(!1)}catch(e){u(!0)}finally{y(!1)}},[r.id]);(0,a.useEffect)(()=>{j()},[j]);let f=Array.isArray(i.workExperiences)?i.workExperiences:[],N=Array.isArray(i.projects)?i.projects:[],w=Array.isArray(i.education)?i.education:[],k=e=>"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.name?e.name:null,S=(Array.isArray(i.languages)?i.languages:[]).map(k).filter(e=>!!e),A=(Array.isArray(i.skills)?i.skills:[]).map(k).filter(e=>!!e),C=null!==(l=null===(t=i.extra)||void 0===t?void 0:t.sections)&&void 0!==l?l:[],T=i.intent||{},I=[["性别",i.gender],["年龄",null!=i.age?"".concat(i.age," 岁"):null],["城市",i.city],["学历",i.degree],["工作年限",null!=i.workYears?"".concat(i.workYears," 年"):null],["当前职位",i.currentPosition],["当前公司",i.currentCompany],["状态",i.statusTag],["方便联系",i.contactTime]].filter(e=>{let[,t]=e;return null!=t&&""!==t});return(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[i.photoUrl?(0,s.jsx)("img",{src:i.photoUrl,alt:"",className:"h-14 w-14 rounded-full object-cover"}):null,(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xl font-bold text-gray-900",children:i.name||"(未命名)"}),i.nameMasked?(0,s.jsx)(p,{children:"脱敏"}):null]}),I.length?(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1 text-sm text-gray-600",children:I.map(e=>{let[t,l]=e;return(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"text-gray-400",children:t})," ",l]},t)})}):(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-500",children:"仅卡片级数据(搜索入库),尚无详情页解析字段"})]})]}),Object.keys(T).length?(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 border-t border-gray-100 pt-3 text-sm",children:[(0,s.jsx)("span",{className:"text-gray-400",children:"求职意向"}),T.position?(0,s.jsx)(p,{children:T.position}):null,T.salary?(0,s.jsx)(p,{children:T.salary}):null,T.city?(0,s.jsx)(p,{children:T.city}):null,(T.industries||[]).map(e=>(0,s.jsx)(p,{children:e},e))]}):null,A.length||S.length?(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-sm",children:[A.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-gray-400",children:"技能"}),A.map(e=>(0,s.jsx)(p,{children:e},e))]}):null,S.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"ml-2 text-gray-400",children:"语言"}),S.map(e=>(0,s.jsx)(p,{children:e},e))]}):null]}):null]}),(0,s.jsxs)(h,{title:"在管职位匹配",children:[c?(0,s.jsxs)("p",{className:"text-sm text-red-500",children:["匹配加载失败",(0,s.jsx)("button",{type:"button",onClick:()=>void j(),className:"ml-2 text-blue-500 hover:underline",children:"重试"})]}):null===d?(0,s.jsx)("p",{className:"text-sm text-gray-500",children:g?"匹配计算中…":"加载中…"}):0===d.length?(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"暂无匹配记录"}):(0,s.jsx)("ul",{className:"space-y-3",children:d.map(e=>{var t,l,a,n,r,i,d,o,c,u,m,h,p,g,y,j,f,N;let w=b===e.id,k=null!==(y=e.matchDetails)&&void 0!==y?y:{};return(0,s.jsxs)("li",{className:"rounded border border-gray-100 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{className:"font-medium text-gray-900",children:[(null===(t=e.jobCase)||void 0===t?void 0:t.title)||"职位 #".concat(e.jobCaseId),(null===(l=e.jobCase)||void 0===l?void 0:l.company)?(0,s.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.jobCase.company}):null]}),(0,s.jsxs)("span",{className:"rounded px-2 py-0.5 text-sm font-medium ".concat((null!==(j=null===(a=e.scores)||void 0===a?void 0:a.overall)&&void 0!==j?j:0)>=75?"bg-green-50 text-green-700":(null!==(f=null===(n=e.scores)||void 0===n?void 0:n.overall)&&void 0!==f?f:0)>=60?"bg-amber-50 text-amber-700":"bg-gray-100 text-gray-600"),children:[null!==(N=null===(r=e.scores)||void 0===r?void 0:r.overall)&&void 0!==N?N:"-"," 分"]})]}),(null===(i=e.recommendation)||void 0===i?void 0:i.aiReason)?(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-sm text-gray-600",children:e.recommendation.aiReason}):null,(0,s.jsx)("button",{type:"button",onClick:()=>v(w?null:e.id),className:"mt-2 text-xs text-blue-600 hover:underline",children:w?"收起规则明细 ▲":"查看规则明细(为什么这么分)▼"}),w?(0,s.jsxs)("div",{className:"mt-2 space-y-2 border-t border-gray-100 pt-2",children:[k.gate?"fail"===k.gate.status?(0,s.jsxs)("div",{className:"rounded bg-red-50 p-2 text-xs text-red-700",children:[(0,s.jsx)("div",{className:"font-medium",children:"硬性条件不满足(一票否决,已出局)"}),(0,s.jsx)("ul",{className:"mt-1 list-disc pl-4",children:(k.gate.failed||[]).map((e,t)=>(0,s.jsxs)("li",{children:[e.label,e.talentValue?"(候选人:".concat(e.talentValue,")"):"",e.evidence?" JD 证据:「".concat(e.evidence,"」"):""]},t))})]}):"unknown"===k.gate.status?(0,s.jsxs)("div",{className:"rounded bg-amber-50 p-2 text-xs text-amber-700",children:[(0,s.jsx)("div",{className:"font-medium",children:"硬性条件待核实(信息缺失 ≠ 不满足,请人工复核)"}),(0,s.jsx)("ul",{className:"mt-1 list-disc pl-4",children:(k.gate.unknown||[]).map((e,t)=>(0,s.jsxs)("li",{children:[e.label,e.evidence?" JD 证据:「".concat(e.evidence,"」"):""]},t))})]}):(0,s.jsx)("p",{className:"text-xs text-green-700",children:"硬性条件(性别/学历/年龄/地点等):全部满足"}):null,(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2 md:grid-cols-5",children:x.map(t=>{var l;let[a,n,r]=t;return(0,s.jsxs)("div",{className:"rounded bg-gray-50 p-2 text-xs",children:[(0,s.jsxs)("div",{className:"text-gray-400",children:[n," ",(0,s.jsxs)("span",{title:"规则权重",children:["\xd7",r]})]}),(0,s.jsx)("div",{className:"font-medium",children:(null===(l=e.scores)||void 0===l?void 0:l[a])!=null?"".concat(Math.round(100*e.scores[a])):"-"})]},a)})}),"number"==typeof k.vectorCosine?(0,s.jsxs)("p",{className:"text-xs text-gray-500",children:["语义向量(本地 bge-small 余弦,权重 \xd70.2):",(100*k.vectorCosine).toFixed(1)," 分"]}):null,Array.isArray(k.hitSkills)&&k.hitSkills.length?(0,s.jsxs)("p",{className:"text-xs text-green-700",children:["命中技能:",k.hitSkills.map(e=>{var t;return null!==(t=null==e?void 0:e.name)&&void 0!==t?t:e}).join("、")]}):null,Array.isArray(k.missedSkills)&&k.missedSkills.length?(0,s.jsxs)("p",{className:"text-xs text-red-600",children:["缺失技能:",k.missedSkills.map(e=>{var t;return null!==(t=null==e?void 0:e.name)&&void 0!==t?t:e}).join("、")]}):null,Array.isArray(k.concernFlags)&&k.concernFlags.length?(0,s.jsxs)("p",{className:"text-xs text-amber-700",children:["风险提示:",k.concernFlags.join(";")]}):null,(null===(d=k.industryFit)||void 0===d?void 0:d.fitTag)||(null===(o=k.salaryFit)||void 0===o?void 0:o.fitTag)||(null===(c=k.locationFit)||void 0===c?void 0:c.fitTag)||(null===(u=k.experienceFit)||void 0===u?void 0:u.fitTag)?(0,s.jsxs)("p",{className:"text-xs text-gray-500",children:["适配标签:",[null===(m=k.industryFit)||void 0===m?void 0:m.fitTag,null===(h=k.salaryFit)||void 0===h?void 0:h.fitTag,null===(p=k.locationFit)||void 0===p?void 0:p.fitTag,null===(g=k.experienceFit)||void 0===g?void 0:g.fitTag].filter(Boolean).join(" / ")]}):null]}):null]},e.id)})}),(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)("button",{type:"button",disabled:g,onClick:()=>void j(!0),className:"rounded bg-blue-600 px-3 py-1 text-sm text-white hover:bg-blue-700 disabled:opacity-50",children:g?"匹配中…":"重新匹配在管职位"})})]}),f.length?(0,s.jsx)(h,{title:"工作经历(".concat(f.length,")"),children:(0,s.jsx)("ol",{className:"space-y-4",children:f.map((e,t)=>(0,s.jsxs)("li",{className:"border-l-2 border-blue-100 pl-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-gray-900",children:e.company||"(公司未知)"}),(0,s.jsx)("span",{className:"text-gray-700",children:e.position}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:m(e.start,e.end,e.duration)})]}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap gap-x-3 text-xs text-gray-500",children:[e.department?(0,s.jsxs)("span",{children:["部门:",e.department]}):null,e.location?(0,s.jsxs)("span",{children:["地点:",e.location]}):null,e.reportsTo?(0,s.jsxs)("span",{children:["汇报:",e.reportsTo]}):null,null!=e.subordinates?(0,s.jsxs)("span",{children:["下属:",e.subordinates," 人"]}):null]}),e.responsibilities?(0,s.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm text-gray-700",children:e.responsibilities}):null,e.extra?(0,s.jsx)("div",{className:"mt-1 flex flex-wrap gap-x-3 text-xs text-gray-500",children:Object.entries(e.extra).map(e=>{let[t,l]=e;return(0,s.jsxs)("span",{children:[t,":",l]},t)})}):null]},t))})}):null,N.length?(0,s.jsx)(h,{title:"项目经历(".concat(N.length,")"),children:(0,s.jsx)("ol",{className:"space-y-4",children:N.map((e,t)=>(0,s.jsxs)("li",{className:"border-l-2 border-green-100 pl-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-gray-900",children:e.name||"(项目未知)"}),e.role?(0,s.jsx)("span",{className:"text-gray-700",children:e.role}):null,e.company?(0,s.jsx)("span",{className:"text-sm text-gray-500",children:e.company}):null,(0,s.jsx)("span",{className:"text-xs text-gray-400",children:m(e.start,e.end,e.duration)})]}),e.description?(0,s.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm text-gray-700",children:e.description}):null,e.duties?(0,s.jsxs)("p",{className:"mt-1 whitespace-pre-wrap text-sm text-gray-600",children:["职责:",e.duties]}):null,e.extra?(0,s.jsx)("div",{className:"mt-1 flex flex-wrap gap-x-3 text-xs text-gray-500",children:Object.entries(e.extra).map(e=>{let[t,l]=e;return(0,s.jsxs)("span",{children:[t,":",l]},t)})}):null]},t))})}):null,w.length?(0,s.jsx)(h,{title:"教育经历(".concat(w.length,")"),children:(0,s.jsx)("ol",{className:"space-y-3",children:w.map((e,t)=>(0,s.jsxs)("li",{className:"flex flex-wrap items-baseline gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-gray-900",children:e.school||"(学校未知)"}),e.major?(0,s.jsx)("span",{className:"text-gray-700",children:e.major}):null,e.degree?(0,s.jsx)(p,{children:e.degree}):null,e.period?(0,s.jsx)("span",{className:"text-xs text-gray-400",children:e.period}):null,(e.tags||[]).map(e=>(0,s.jsx)(p,{children:e},e))]},t))})}):null,i.selfEvaluation?(0,s.jsx)(h,{title:"自我评价",children:(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm text-gray-700",children:i.selfEvaluation})}):null,C.map(e=>(0,s.jsx)(h,{title:e.title||e.key,children:(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm text-gray-700",children:e.text})},e.key))]})}var y=l(65777);function b(e){var t;let{portraitId:l}=e,[r,d]=(0,a.useState)([]),[o,c]=(0,a.useState)(""),[u,x]=(0,a.useState)(!1),[m,h]=(0,a.useState)(null),[p,g]=(0,a.useState)([]),{sync:b}=(0,y.nu)(),v=null!==(t=null==b?void 0:b.activeTenantId)&&void 0!==t?t:null;(0,a.useEffect)(()=>{(0,n.aA)("/job-cases?limit=200").then(e=>{var t;let l=(Array.isArray(e)?e:null!==(t=null==e?void 0:e.items)&&void 0!==t?t:[]).filter(e=>"active"===e.status||!e.status);d(l),c(e=>e&&l.some(t=>String(t.id)===e)?e:"")}).catch(()=>d([]))},[v]);let j=(0,a.useCallback)(async()=>{if(!l)return;let e=null;try{e=await (0,n.aA)("/talent-portraits/".concat(l,"/evaluations"))}catch(e){}g(e?e.items:[])},[l]);async function f(){if(h(null),!l||!o){h("先选择要评估的职位");return}try{let e=await fetch("".concat((0,n.Ox)(),"/talent-job-evaluations/evaluate-prompt?portraitId=").concat(l,"&jobCaseId=").concat(o));if(!e.ok)throw Error("HTTP ".concat(e.status));let t=await e.json();await navigator.clipboard.writeText(t.prompt),x(!0),setTimeout(()=>x(!1),4e3),setTimeout(()=>void j(),3e4)}catch(e){h(e.message)}}(0,a.useEffect)(()=>{j()},[j]);let N=o?p.filter(e=>String(e.jobCaseId)===o):p;return(0,s.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsx)("h2",{className:"mb-3 text-lg font-semibold text-gray-900",children:"评估(人才 \xd7 职位)"}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("select",{value:o,onChange:e=>c(e.target.value),className:"rounded border border-gray-300 px-2 py-1 text-sm",children:[(0,s.jsx)("option",{value:"",children:"选择要评估的在管职位…"}),r.map(e=>(0,s.jsx)("option",{value:e.id,children:e.title||"职位 #".concat(e.id)},e.id))]}),(0,s.jsx)("button",{type:"button",onClick:()=>void f(),className:"rounded bg-violet-600 px-3 py-1 text-sm text-white hover:bg-violet-700",children:u?"已复制 ✓ 请发给 agent":"复制评估 prompt"}),m?(0,s.jsx)("span",{className:"text-xs text-red-600",children:m}):null]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-gray-400",children:"评估由 agent 生成后写回;同一人才\xd7职位可多次评估,历史全留痕。原「AI 总结与评估」(不针对职位)已按 2026-10-04 裁定移除。"}),(0,s.jsx)("div",{className:"mt-3 space-y-3",children:N.length?N.map(e=>{var t;return(0,s.jsxs)("div",{className:"rounded border border-gray-100 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-400",children:[(0,s.jsx)("span",{className:"font-medium text-gray-800",children:null!==(t=e.jobTitle)&&void 0!==t?t:"职位 #".concat(e.jobCaseId)}),(0,s.jsx)("span",{children:(0,i.d3)(e.createdAt)}),(0,s.jsxs)("span",{children:["生成:",e.generatedBy]}),e.createdBy?(0,s.jsxs)("span",{children:["操作者:",e.createdBy]}):null]}),(0,s.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm text-gray-700",children:e.content})]},e.id)}):(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"暂无评估记录"})})]})}let v=e=>"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.name?e.name:null;function j(e){var t;let{entity:l,portraitId:n,versions:r,sources:d}=e,[o,c]=(0,a.useState)("merged"),x=null!=r?r:[],m=null!==(t=x.find(e=>e.id===o))&&void 0!==t?t:null;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>c("merged"),className:"rounded px-3 py-1 text-sm ".concat("merged"===o?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:"合并画像(默认)"}),x.map(e=>{var t,l,a,n,r,d;return(0,s.jsxs)("button",{type:"button",onClick:()=>c(e.id),className:"rounded px-3 py-1 text-sm ".concat(o===e.id?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"),title:"".concat(null!==(r=null===(t=e.source)||void 0===t?void 0:t.url)&&void 0!==r?r:""," ").concat((0,i.d3)(e.createdAt)),children:[null!==(d=null===(l=e.source)||void 0===l?void 0:l.system)&&void 0!==d?d:"未知渠道",(null===(n=e.source)||void 0===n?void 0:null===(a=n.collector)||void 0===a?void 0:a.creatorName)?" \xb7 ".concat(e.source.collector.creatorName):""," \xb7 ",(0,i.d3)(e.createdAt)]},e.id)}),x.length?null:(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"暂无独立版本(合并画像即全部已知信息)"})]}),"merged"!==o&&m?(0,s.jsx)(f,{version:m}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g,{entity:l}),(0,s.jsx)(b,{portraitId:n}),(0,s.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsx)("h3",{className:"mb-2 text-lg font-semibold",children:"原始数据(合并画像)"}),(0,s.jsx)(u.Y,{data:l.extracted})]})]}),(0,s.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"解析来源"}),d.length?(0,s.jsx)("ul",{className:"space-y-1 text-sm",children:d.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:e.sourceUrl,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:e.domain}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-400",children:(0,i.d3)(e.createdAt)})]},e.id))}):(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"暂无解析来源记录"})]})]})}function f(e){var t,l,a,n,r,d,o,c,x,m,h,p,g;let{version:y}=e,b=null!==(c=y.extracted)&&void 0!==c?c:{},j=Array.isArray(b.workExperiences)?b.workExperiences:[],f=Array.isArray(b.educations)?null!==(x=b.education)&&void 0!==x?x:b.educations:Array.isArray(b.education)?b.education:[],N=(Array.isArray(b.skills)?b.skills:[]).map(v).filter(Boolean),w=null!==(m=b.contact)&&void 0!==m?m:{};return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xl font-bold text-gray-900",children:null!==(p=null!==(h=w.fullName)&&void 0!==h?h:b.name)&&void 0!==p?p:"(未命名)"}),(0,s.jsx)("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-600",children:null!==(g=null===(t=y.source)||void 0===t?void 0:t.system)&&void 0!==g?g:"未知渠道"}),(null===(a=y.source)||void 0===a?void 0:null===(l=a.collector)||void 0===l?void 0:l.creatorName)?(0,s.jsxs)("span",{className:"rounded bg-violet-50 px-2 py-0.5 text-xs text-violet-700",children:["同步人 ",y.source.collector.creatorName]}):null,(0,s.jsx)("span",{className:"text-xs text-gray-400",children:(0,i.d3)(y.createdAt)}),(null===(n=y.confidence)||void 0===n?void 0:n.overall)!=null?(0,s.jsxs)("span",{className:"text-xs text-gray-400",children:["置信度 ",Math.round(100*y.confidence.overall),"%"]}):null]}),b.headline?(0,s.jsx)("p",{className:"mt-1 text-gray-600",children:b.headline}):null,(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1 text-sm text-gray-600",children:[b.gender?(0,s.jsxs)("span",{children:["性别 ",b.gender]}):null,(null===(r=b.basic)||void 0===r?void 0:r.gender)?(0,s.jsxs)("span",{children:["性别 ",b.basic.gender]}):null,b.city?(0,s.jsxs)("span",{children:["城市 ",b.city]}):null,(null===(o=b.basic)||void 0===o?void 0:null===(d=o.location)||void 0===d?void 0:d.city)?(0,s.jsxs)("span",{children:["城市 ",b.basic.location.city]}):null]}),N.length?(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1 text-sm",children:[(0,s.jsx)("span",{className:"text-gray-400",children:"技能"}),N.map(e=>(0,s.jsx)("span",{className:"rounded bg-blue-50 px-2 py-0.5 text-xs text-blue-700",children:e},e))]}):null]}),j.length?(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsxs)("h3",{className:"mb-2 text-lg font-semibold",children:["工作经历(",j.length,")"]}),(0,s.jsx)("ol",{className:"space-y-2",children:j.map((e,t)=>{var l,a,n,r,i;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsx)("b",{children:null!==(a=null!==(l=e.companyName)&&void 0!==l?l:e.company)&&void 0!==a?a:"(公司未知)"})," ",null!==(n=e.title)&&void 0!==n?n:e.position," ",(0,s.jsx)("span",{className:"text-xs text-gray-400",children:[null!==(r=e.startDate)&&void 0!==r?r:e.start,null!==(i=e.endDate)&&void 0!==i?i:e.end].filter(Boolean).join(" - ")})]},t)})})]}):null,f.length?(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsxs)("h3",{className:"mb-2 text-lg font-semibold",children:["教育经历(",f.length,")"]}),(0,s.jsx)("ol",{className:"space-y-1",children:f.map((e,t)=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsx)("b",{children:e.school})," ",e.major," ",(0,s.jsx)("span",{className:"text-xs text-gray-400",children:e.degree})]},t))})]}):null,(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,s.jsx)("h3",{className:"mb-2 text-lg font-semibold",children:"原始数据(该版本)"}),(0,s.jsx)(u.Y,{data:y.extracted})]})]})}let N={create:"建档",move:"阶段流转",form:"表单更新",invite:"邀请",invite_approved:"邀请批准",note:"备注",delete:"删除"};function w(e){let{recommendations:t,error:l,onRetry:n}=e,[r,d]=(0,a.useState)(null);return l?(0,s.jsxs)("p",{className:"rounded-lg border border-red-200 bg-white p-5 text-sm text-red-500 shadow-sm",children:["推荐记录加载失败:",l,n?(0,s.jsx)("button",{type:"button",onClick:n,className:"ml-2 text-blue-500 hover:underline",children:"重试"}):null]}):(null==t?void 0:t.length)?(0,s.jsx)("div",{className:"space-y-3",children:t.map(e=>{var t,l,a,n,o;let c=r===e.id,u=Object.entries(null!==(t=e.formData)&&void 0!==t?t:{}).filter(e=>{let[,t]=e;return null!=t&&""!==t});return(0,s.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-4 shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("a",{href:"/jobs?id=".concat(e.jobCaseId),className:"font-medium text-blue-600 hover:underline",children:null!==(l=e.jobTitle)&&void 0!==l?l:"职位 #".concat(e.jobCaseId)}),(0,s.jsx)("span",{className:"rounded bg-blue-50 px-2 py-0.5 text-xs text-blue-700",children:null!==(a=e.stageLabel)&&void 0!==a?a:e.stage})]}),(0,s.jsx)("button",{type:"button",onClick:()=>d(c?null:e.id),className:"text-xs text-blue-600 hover:underline",children:c?"收起 ▲":"展开表单与历史 ▼"})]}),c?(0,s.jsxs)("div",{className:"mt-3 space-y-3 border-t border-gray-100 pt-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-1 text-xs text-gray-400",children:["当前阶段表单(",u.length,")"]}),u.length?(0,s.jsx)("dl",{className:"grid gap-x-6 gap-y-1 md:grid-cols-2",children:u.map(e=>{let[t,l]=e;return(0,s.jsxs)("div",{className:"flex gap-2 text-sm",children:[(0,s.jsx)("dt",{className:"shrink-0 text-gray-400",children:t}),(0,s.jsx)("dd",{className:"whitespace-pre-wrap text-gray-800",children:"object"==typeof l?JSON.stringify(l):String(l)})]},t)})}):(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"(空)"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-1 text-xs text-gray-400",children:["操作历史(",(null!==(n=e.history)&&void 0!==n?n:[]).length,")"]}),(0,s.jsx)("ol",{className:"space-y-1",children:(null!==(o=e.history)&&void 0!==o?o:[]).map((e,t)=>{var l;return(0,s.jsxs)("li",{className:"text-sm text-gray-700",children:[(0,s.jsx)("span",{className:"text-gray-400",children:(0,i.d3)(e.at)})," ",(0,s.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs",children:null!==(l=N[e.action])&&void 0!==l?l:e.action})," ",e.fromStage?(0,s.jsxs)("span",{children:[e.fromStage," → "]}):null,e.toStage?(0,s.jsx)("b",{children:e.toStage}):null,e.by?(0,s.jsxs)("span",{className:"text-gray-400",children:[" \xb7 ",e.by]}):null,e.note?(0,s.jsxs)("span",{className:"text-gray-400",children:[" \xb7 ",e.note]}):null]},t)})})]})]}):null]},e.id)})}):(0,s.jsx)("p",{className:"rounded-lg border border-gray-200 bg-white p-5 text-sm text-gray-500 shadow-sm",children:"暂无推荐记录(可从头部「加入推荐流程」建档,或让 agent 写回)"})}let k={merge:"bg-blue-50 text-blue-700",sync:"bg-violet-50 text-violet-700",manual:"bg-amber-50 text-amber-700",backfill:"bg-gray-100 text-gray-600"},S={"identity.displayName":"姓名","identity.gender":"性别","identity.birthYear":"出生年","identity.location":"地点","identity.nationality":"国籍","professional.headline":"头衔","professional.summary":"简介","professional.currentCompany":"现任公司","professional.currentTitle":"现任职位","professional.titleLevel":"职级","professional.yearsOfExperience":"工作年限","professional.currentStatus":"当前状态","professional.desiredJob":"求职意向","professional.skills":"技能","professional.workExperiences":"工作经历","professional.educations":"教育经历","professional.projects":"项目经历","professional.languages":"语言","professional.certifications":"证书","contact.phones":"电话","contact.emails":"邮箱","contact.wechats":"微信","contact.linkedinUrls":"LinkedIn"},A=e=>{if(null==e)return"(空)";if("object"==typeof e){if(e.truncated)return"".concat(String(e.preview).slice(0,60),"…");if(e.name)return String(e.name);if(e.city)return String(e.city);if(e.added||e.removed){var t,l,s;let a=[],n=e=>{var t,l,s,a,n;return null!==(n=null!==(a=null!==(s=null!==(l=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e?void 0:e.companyName)&&void 0!==l?l:null==e?void 0:e.school)&&void 0!==s?s:null==e?void 0:e.language)&&void 0!==a?a:null==e?void 0:e.value)&&void 0!==n?n:String(e)};return(null===(t=e.added)||void 0===t?void 0:t.length)&&a.push("新增 ".concat(e.added.map(n).join("、"))),(null===(l=e.removed)||void 0===l?void 0:l.length)&&a.push("移除 ".concat(e.removed.map(n).join("、"))),a.length||null==e.before||a.push("".concat(e.before," → ").concat(null!==(s=e.after)&&void 0!==s?s:"?"," 条")),a.join(";")}return JSON.stringify(e).slice(0,60)}return String(e)};function C(e){let{changes:t}=e;return(null==t?void 0:t.length)?(0,s.jsx)("ol",{className:"space-y-2",children:t.map(e=>{var t,l,a;return(0,s.jsxs)("li",{className:"rounded-lg border border-gray-200 bg-white p-3 text-sm shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-gray-900",children:null!==(t=S[e.fieldPath])&&void 0!==t?t:e.fieldPath}),(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat(null!==(l=k[e.changeType])&&void 0!==l?l:"bg-gray-100 text-gray-600"),children:null!==(a=r[e.changeType])&&void 0!==a?a:e.changeType}),e.sourceSystem?(0,s.jsxs)("span",{className:"text-xs text-gray-400",children:["来源 ",e.sourceSystem]}):null,(0,s.jsx)("span",{className:"ml-auto text-xs text-gray-400",children:(0,i.d3)(e.createdAt)})]}),(0,s.jsxs)("div",{className:"mt-1 text-gray-600",children:[(0,s.jsx)("span",{className:"text-red-600 line-through decoration-red-300",children:A(e.oldValue)}),(0,s.jsx)("span",{className:"mx-2 text-gray-400",children:"→"}),(0,s.jsx)("span",{className:"text-green-700",children:A(e.newValue)})]}),e.actor?(0,s.jsxs)("div",{className:"mt-0.5 text-xs text-gray-400",children:["操作者:",e.actor]}):null]},e.id)})}):(0,s.jsx)("p",{className:"rounded-lg border border-gray-200 bg-white p-5 text-sm text-gray-500 shadow-sm",children:"暂无字段级变更记录(画像被新解析合并/同步覆盖时自动留痕,自 2026-10-04 起记)"})}function T(e){var t,l,a,n,r,i,d,o,c,u,x,m;let{entity:h}=e,p=h.extracted||{},g=Array.isArray(p.workExperiences)?p.workExperiences:[],y=Array.isArray(p.education)?p.education:[],b=e=>"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.name?e.name:null,v=(Array.isArray(p.skills)?p.skills:[]).map(b).filter(Boolean),j=(Array.isArray(p.languages)?p.languages:[]).map(b).filter(e=>!!e),f=[["博士后",9],["博士",8],["DBA",8],["MBA",7],["EMBA",7],["硕士",6],["研究生",6],["MBA/EMBA",7],["本科",5],["学士",5],["大专",4],["专科",4],["高中",2],["中专",2],["初中",1]],N=e=>{if(!e)return 0;let t=0;for(let[l,s]of f)e.includes(l)&&s>t&&(t=s);return t},w=y.length?y.reduce((e,t)=>N(null==t?void 0:t.degree)>N(null==e?void 0:e.degree)?t:e):null,k=e=>{var t,l;return[null!==(t=e.start)&&void 0!==t?t:e.startDate,null!==(l=e.end)&&void 0!==l?l:e.endDate].filter(Boolean).join(" - ")};return(0,s.jsxs)("div",{className:"mb-4 rounded-lg border border-gray-200 bg-white p-4 shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2 text-sm",children:[(0,s.jsx)("span",{className:"text-gray-500",children:"现任"}),(0,s.jsx)("b",{className:"text-gray-900",children:null!==(c=null!==(o=null!==(d=p.currentCompany)&&void 0!==d?d:null===(t=g[0])||void 0===t?void 0:t.companyName)&&void 0!==o?o:null===(l=g[0])||void 0===l?void 0:l.company)&&void 0!==c?c:"(未知)"}),(0,s.jsx)("span",{className:"text-gray-700",children:null!==(m=null!==(x=null!==(u=p.currentPosition)&&void 0!==u?u:null===(a=g[0])||void 0===a?void 0:a.title)&&void 0!==x?x:null===(n=g[0])||void 0===n?void 0:n.position)&&void 0!==m?m:""})]}),g.length?(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)("div",{className:"text-xs text-gray-400",children:["工作经历(近 3 段 / 共 ",g.length," 段)"]}),(0,s.jsx)("ul",{className:"mt-1 space-y-0.5 text-sm text-gray-700",children:g.slice(0,3).map((e,t)=>{var l,a,n;return(0,s.jsxs)("li",{children:[(0,s.jsx)("b",{children:null!==(a=null!==(l=e.companyName)&&void 0!==l?l:e.company)&&void 0!==a?a:"(公司未知)"})," ",null!==(n=e.title)&&void 0!==n?n:e.position," ",(0,s.jsx)("span",{className:"text-xs text-gray-400",children:k(e)})]},t)})})]}):null,y.length?(0,s.jsxs)("div",{className:"mt-2 text-sm text-gray-700",children:[(0,s.jsxs)("span",{className:"text-xs text-gray-400",children:["教育(最近 / 最高 / 共 ",y.length," 段):"]})," ",null===(r=y[0])||void 0===r?void 0:r.school," ",null===(i=y[0])||void 0===i?void 0:i.degree,w&&w!==y[0]?" \xb7 最高:".concat(w.school," ").concat(w.degree):""]}):null,v.length||j.length?(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1 text-sm",children:[v.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"技能"}),v.slice(0,12).map(e=>(0,s.jsx)("span",{className:"rounded bg-blue-50 px-2 py-0.5 text-xs text-blue-700",children:e},e))]}):null,j.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-400",children:"语言"}),j.map(e=>(0,s.jsx)("span",{className:"rounded bg-green-50 px-2 py-0.5 text-xs text-green-700",children:e},e))]}):null]}):null]})}function I(e){var t,l,r;let{entity:i,portraitId:d,matches:o,sources:u}=e,[x,m]=(0,a.useState)("overview"),{versions:h,recommendations:p,changes:g,evaluations:y,recommendationsError:b,reloadRecommendations:v}=function(e){let[t,l]=(0,a.useState)(null),[s,r]=(0,a.useState)(null),[i,d]=(0,a.useState)(null),[o,c]=(0,a.useState)(null),[u,x]=(0,a.useState)(null),[m,h]=(0,a.useState)(0);return(0,a.useEffect)(()=>{if(!e){l([]),r([]),d([]),c([]),x(null);return}let t=!0;return(async()=>{let s=async(e,t)=>{try{return await e}catch(e){return t}},[a,r,i]=await Promise.all([s((0,n.aA)("/parsed-resumes?portraitId=".concat(e)),{items:[]}),s((0,n.aA)("/resume-field-changes?portraitId=".concat(e)),{items:[]}),s((0,n.aA)("/talent-portraits/".concat(e,"/evaluations")),{items:[]})]);t&&(l(a.items),d(r.items),c(i.items))})(),(async()=>{try{let l=await (0,n.aA)("/recommendations/by-portrait/".concat(e));if(!t)return;r(l.items),x(null)}catch(e){if(!t)return;r([]),x(e instanceof Error?e.message:"加载失败")}})(),()=>{t=!1}},[e,m]),{versions:t,recommendations:s,changes:i,evaluations:o,recommendationsError:u,reloadRecommendations:()=>h(e=>e+1)}}(d),f=[{key:"overview",label:"最新情况"},{key:"resumes",label:"简历",count:null!==(t=null==h?void 0:h.length)&&void 0!==t?t:null},{key:"recommendations",label:"推荐记录",count:null!==(l=null==p?void 0:p.length)&&void 0!==l?l:null},{key:"changes",label:"变更历史",count:null!==(r=null==g?void 0:g.length)&&void 0!==r?r:null}];return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-4 flex flex-wrap gap-1 border-b border-gray-200",children:f.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>m(e.key),className:"px-4 py-2 text-sm ".concat(x===e.key?"border-b-2 border-blue-500 font-medium text-blue-600":"text-gray-600 hover:text-gray-900"),children:[e.label,null!=e.count&&e.count>0?(0,s.jsxs)("span",{className:"ml-1 text-xs text-gray-400",children:["(",e.count,")"]}):null]},e.key))}),"overview"===x?(0,s.jsx)(c,{versions:h,recommendations:p,changes:g,evaluations:y,matches:o}):null,"resumes"===x?(0,s.jsx)(j,{entity:i,portraitId:d,versions:h,sources:u}):null,"recommendations"===x?(0,s.jsx)(w,{recommendations:p,error:b,onRetry:v}):null,"changes"===x?(0,s.jsx)(C,{changes:g}):null]})}}}]);
@@ -1 +1 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cb659b33-82b4-40b8-9c36-6b8b037e1b06",e._sentryDebugIdIdentifier="sentry-dbid-cb659b33-82b4-40b8-9c36-6b8b037e1b06")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[686],{49616:function(e,t,a){a.d(t,{I:function(){return x},v:function(){return b}});var s=a(72835),n=a(60635),r=a(74431),o=a(84704);function l(e){let t=null!=e?e:"<职位管理页 tabId>";return["公共纪律(全文 SSOT: hunter-mate-harness .harness/workflows/subagent-job-platform-ops.md,先读再动手):",'0. 浏览器操作只走 hunter-mate extension *;控制命令 JSON 显式带 "__tab":"'.concat(t,'"(cp.tab.* 子命令用 "tab":"').concat(t,'");录制 title 带 job-ops- 前缀;执行环境带写护栏先切 SINGLE_REPO_DEV。'),"1. 风控红线:cp.eval 读 location.href/document.title 判页面存活;CAPTCHA/登录墙/空白杀 → 立即 halt 当日不重试;eval ≥2s、字段填写 ≥1.5s、切页 3-5s(human-paced,平台数值以 risk-profile 为准)。","2. 回写契约:结果必须调 hunter-mate API 落库并 GET 读回;只操作不落库=未完成。凭证零落地:平台账号密码不入库,note 只记别名。"].join("\n")}function d(e,t,a,s,n){return["[hunter-mate] ".concat(e),"","职位案件: #".concat(t," ").concat(a,"(平台槽位: ").concat(s,")"),"API 基址: http://127.0.0.1:34571",...n?["平台页 tab: ".concat(n,"(已开则定向复用;未开用 hunter-mate extension 后台新开,禁 CDP 附加导航)")]:[],""].join("\n")}function c(e){return[d("收简历:到平台收件箱收取本案职位简历,落人才库并回写简历流水。",e.jobCaseId,e.title,e.platform),l(),"","执行步骤:","1. 前置:GET /job-cases/".concat(e.jobCaseId,"/postings 确认 ").concat(e.platform," 槽位 status=published(未发布无收件箱)。"),"2. 打开收件箱(猎聘=职位详情页 /job/gethjobdetail?hjobId=<id> 内待处理简历区;入口结构按 flows/resume-collect.yaml,标 recon-pending 处先只读 recon 固化再提取)。","3. 逐份提取:候选人姓名/接收时间;详情走既有 talent adapter 落人才库,命中已有人才复用 talentEntityId(dedup 结论),不重复建档。","4. 回写:先 GET /job-cases/".concat(e.jobCaseId,"/applications 查重(同人同案跳过),再 POST /job-cases/").concat(e.jobCaseId,'/applications {name, platform:"').concat(e.platform,'", talentEntityId?, note};单平台单次 ≤20 份;回写后 GET 读回确认。'),"5. 只读平台:沟通/回复/下载等任何平台写操作不在范围。"].join("\n")}let i={draft:{label:"待发布",cls:"bg-gray-100 text-gray-500"},published:{label:"已发布",cls:"bg-emerald-100 text-emerald-700"},offline:{label:"已下线",cls:"bg-gray-200 text-gray-400"}},u=["job","job-list","job-detail"];function b(e){let{platform:t,sm:a}=e,n=(0,o.mS)(t);return(0,s.jsx)("span",{title:t,className:"inline-flex items-center justify-center rounded bg-[color:var(--brand-soft)] font-semibold ".concat(a?"h-3.5 w-3.5 text-[8px]":"h-4 w-4 text-[9px]"),style:{color:n.fg},children:n.label})}function p(e){let{text:t,label:a,primary:r}=e,[o,l]=(0,n.useState)(!1);return(0,s.jsx)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(t)}catch(a){let e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}l(!0),window.setTimeout(()=>l(!1),2e3)},className:r?"rounded bg-blue-600 px-2 py-1 text-xs text-white hover:bg-blue-700":"rounded border border-blue-300 px-1.5 py-0.5 text-xs text-blue-700 hover:bg-blue-50",children:o?"已复制 ✓":a})}function x(e){var t,a;let{jobCaseId:o,caseTitle:x,canOperate:m=!0}=e,[g,h]=(0,n.useState)([]),[y,f]=(0,n.useState)([]),[j,v]=(0,n.useState)(new Set),[N,w]=(0,n.useState)(""),[C,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[E,A]=(0,n.useState)(""),[T,P]=(0,n.useState)(null),[_,D]=(0,n.useState)(null),[O,G]=(0,n.useState)(""),[H,J]=(0,n.useState)([]),[U,L]=(0,n.useState)(!1),[R,M]=(0,n.useState)([]),[q,K]=(0,n.useState)(""),[V,W]=(0,n.useState)(""),[z,B]=(0,n.useState)(""),F=(0,n.useCallback)(async()=>{try{h(await (0,r.aA)("/job-cases/".concat(o,"/postings")))}catch(e){}try{M(await (0,r.aA)("/job-cases/".concat(o,"/applications")))}catch(e){}},[o]);(0,n.useEffect)(()=>{F(),(async()=>{try{S(await (0,r.aA)("/job-postings/sources"))}catch(e){}})(),(async()=>{try{let e=await (0,r.aA)("/adapters/capabilities");f(e.platforms)}catch(e){}})()},[F]);let Q=(0,n.useCallback)(e=>{let t=e.trim().toLowerCase();return y.find(e=>e.platform===t||t.includes(e.platform)||e.platform.includes(t))},[y]),X=(0,n.useCallback)(async(e,t,a)=>{I(!0),A("");try{await (0,r.aA)(e,{method:t,headers:{"Content-Type":"application/json"},body:null!=a?JSON.stringify(a):void 0})}catch(e){return I(!1),A("操作失败(服务端拒绝或网络错误)"),!1}return I(!1),await F(),!0},[F]),Y=(0,n.useCallback)(async()=>{try{let e=await (0,r.aA)("/entities?type=job&limit=10&q=".concat(encodeURIComponent(O.trim())));J(e.items)}catch(e){J([]),A("搜索失败,请重试")}},[O]),Z=(0,n.useCallback)(async(e,t)=>{("new"===e?await X("/job-cases/".concat(o,"/postings"),"POST",{platform:t.source,jobPostingId:t.id,status:"published"}):await X("/job-case-postings/".concat(e),"PATCH",{jobPostingId:t.id,status:"published"}))&&(D(null),J([]),G(""))},[X,o]),$=(0,n.useMemo)(()=>{let e=new Set;for(let t of g)e.add(t.platform);for(let t of R)t.platform&&e.add(t.platform);return Array.from(e).sort()},[g,R]),ee=$.includes(q)?q:null!==(t=$[0])&&void 0!==t?t:"",et=(0,n.useMemo)(()=>R.filter(e=>{var t;return(null!==(t=e.platform)&&void 0!==t?t:"")===ee}),[R,ee]),ea=g.filter(e=>j.has(e.id)).map(e=>e.platform);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"flex items-center gap-2 text-xs text-gray-400",children:(0,s.jsx)("span",{children:"发布是 agent 平台适配能力:勾选平台后复制任务 prompt 给 agent 执行;手动操作收在「手动」里。"})}),E?(0,s.jsx)("div",{className:"text-xs text-red-500",children:E}):null,(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(p,{primary:!0,label:"让Agent同步检查".concat(ea.length?"(".concat(ea.join("、"),")"):""),text:[d("职位已发布同步检查:到平台职位管理页核对本案职位是否已发布,回写槽位状态。",(a={jobCaseId:o,title:x,platforms:ea.length?ea:["<勾选平台>"]}).jobCaseId,a.title,a.platforms.join("、"),a.tabId),l(a.tabId),"","执行步骤:","1. GET /job-cases/".concat(a.jobCaseId,"/postings 读目标平台槽位(须有 pid;无槽位先 POST 建 draft 槽位)。"),"2. 打开平台职位管理页(猎聘=https://h.liepin.com/job/showlistpage?jobStatus=11);解析优先走 adapter:录制该页 → recordings show <sid> --parse(jobs-list adapter);adapter 未就绪按 flows/job-sync.yaml recon 选择器只读提取(标 assumed)。","3. 标题归一化比对(去空白/全半角/大小写;企业名包装差异忽略):命中 → 取平台行 id+状态;同标题多行取最新,note 记全部候选。",'4. 回写:命中 → PATCH /job-case-postings/<pid> {status:"published", note:"synced <date> 平台行=<id> 平台状态=<status>"};未命中 → note 记"未找到发布 <date>",status 保持 draft。',"5. 平台有而本地 job_postings 无 → 触发 adapter parse 落库后再补链接;全部回写后 GET 读回确认。"].join("\n")}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:ea.length?"把 prompt 贴给 agent,回写后刷新可见":"先勾选下方平台槽位"})]}),(0,s.jsx)("div",{className:"space-y-1.5",children:0===g.length?(0,s.jsx)("div",{className:"rounded border border-dashed border-gray-200 p-4 text-center text-xs text-gray-400",children:"还没有平台槽位,先在下方添加"}):g.map(e=>{var t,a;let n=Q(e.platform),r=!!n&&n.rules>0,g=!!n&&n.pageClasses.some(e=>u.some(t=>e.startsWith(t)));return(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded border border-gray-200 px-2.5 py-1.5 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:j.has(e.id),onChange:t=>{let a=new Set(j);t.target.checked?a.add(e.id):a.delete(e.id),v(a)},title:"勾选后纳入同步检查"}),(0,s.jsx)(b,{platform:e.platform}),(0,s.jsx)("span",{className:"w-24 truncate font-medium text-gray-800",children:e.platform}),(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] ".concat(r?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-400"),title:n?"adapter rules=".concat(n.rules," pageClasses=").concat(n.pageClasses.join(",")):"adapter 未登记",children:r?g?"适配\xb7职位":"适配\xb7人才":"未适配"}),(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat(i[e.status].cls),children:i[e.status].label}),e.posting?(0,s.jsxs)("a",{href:e.posting.sourceUrl,target:"_blank",rel:"noreferrer",className:"min-w-0 flex-1 truncate text-xs text-blue-600 hover:underline",title:e.posting.sourceUrl,children:[null!==(t=e.posting.title)&&void 0!==t?t:"(无标题)",e.posting.company?" \xb7 ".concat(e.posting.company):""]}):(0,s.jsx)("span",{className:"flex-1 text-xs text-gray-300",children:"未链接发布"}),e.publishedAt?(0,s.jsx)("span",{className:"text-xs text-gray-400",children:e.publishedAt.slice(0,10)}):null,(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs",children:["published"!==e.status?(0,s.jsx)(p,{label:"让Agent发布",text:[d("发布职位(谨慎级写操作,费用敏感):代用户在平台发布本职位,查重前置(禁止重复发布)→资格前置→recon→填单→自检→提交→回写。",(a={jobCaseId:o,title:x,platform:e.platform}).jobCaseId,a.title,a.platform,a.tabId),l(a.tabId),"","执行步骤:","1. 资格硬闸门:读平台发布资格(猎聘=职位管理页顶《猎头诚信联盟承诺函》审核状态+账户资源配额);不足 → halt 报告,不绕过。",'2. 查重硬闸门(发布可能产生费用,禁止重复发布):先做同步检查同款列表核对(adapter parse 优先,标题归一化比对本案职位);命中已发布/审核中 → 立即 halt,回报用户裁定"再发重复 vs 旧职位修改再发",不得自行决定;未命中须把比对证据(行数+标题集合)写进汇报。',"2b. 费用意识:发布前 recon 平台收费规则(不可见标 assumed 并声明);同平台同职位只发一次,再发/多平台代发须用户逐个授权。","3. 表单 recon:打开发职位页(猎聘=职位管理「发职位」入口,禁直达表单 URL),按 flows/job-publish.yaml 字段清单逐项读控件;recon-pending 项首跑只 recon 不提交,补录 flow 后再执行。","4. 填单(JobCase #".concat(a.jobCaseId,"):").concat(a.jd?"JD 摘要:".concat(a.jd):"职位信息以 JobCase 详情为准",";每字段间隔 ≥2s,eval 间隔 ≥3s(表单页红线)。"),"5. 提交前自检:cp.eval 读表单全部已填值与期望逐字段比对;提交前状态录一次(录制最后一镜)。","6. 提交+读回:点击提交 → 等审核态/结果文案 → 读平台状态;提交步出现 CAPTCHA/二次验证 → 立即 halt 报告人工,绝不重试提交。",'7. 回写:PATCH /job-case-postings/<pid> {status:"published", note:"published <date> 平台状态=<审核中|已发布|失败原因原文> 查重证据=<行数+标题>"};失败完整回写原因;等平台列表可见后走同步检查补链接。'].join("\n")}):(0,s.jsx)(p,{label:"让Agent收简历",text:c({jobCaseId:o,title:x,platform:e.platform})}),m?(0,s.jsx)("button",{type:"button",onClick:()=>P(T===e.id?null:e.id),className:"rounded border border-gray-200 px-1.5 py-0.5 text-gray-400 hover:bg-gray-50",children:"手动"}):null]}),T===e.id&&m?(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs",children:["published"!==e.status?(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>void X("/job-case-postings/".concat(e.id),"PATCH",{status:"published"}),className:"rounded border border-emerald-300 px-1.5 py-0.5 text-emerald-700 hover:bg-emerald-50",children:"标记已发布"}):(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>void X("/job-case-postings/".concat(e.id),"PATCH",{status:"offline"}),className:"rounded border border-gray-300 px-1.5 py-0.5 text-gray-500 hover:bg-gray-50",children:"下线"}),(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>{D(_===e.id?null:e.id),G(""),J([])},className:"rounded border border-blue-300 px-1.5 py-0.5 text-blue-700 hover:bg-blue-50",children:e.posting?"换链接":"链接发布"}),(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>void X("/job-case-postings/".concat(e.id),"DELETE"),className:"rounded border border-gray-200 px-1.5 py-0.5 text-gray-400 hover:bg-red-50 hover:text-red-500",children:"删除槽位"})]}):null]},e.id)})}),null!=_&&m?(0,s.jsxs)("div",{className:"rounded border border-blue-200 bg-blue-50/50 p-2",children:[(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("input",{type:"text",value:O,onChange:e=>G(e.target.value),onKeyDown:e=>"Enter"===e.key&&void Y(),placeholder:"按标题/公司搜索解析库里的职位发布…",className:"flex-1 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("button",{type:"button",onClick:()=>void Y(),className:"rounded bg-blue-600 px-2 py-1 text-xs text-white hover:bg-blue-700",children:"搜索"})]}),(0,s.jsxs)("div",{className:"mt-1.5 space-y-1",children:[H.map(e=>{var t;return(0,s.jsxs)("button",{type:"button",onClick:()=>void Z(_,e),className:"block w-full truncate rounded bg-white px-2 py-1 text-left text-xs hover:bg-blue-100",title:e.sourceUrl,children:[(0,s.jsx)(b,{platform:e.source,sm:!0})," ",null!==(t=e.title)&&void 0!==t?t:"(无标题)",e.company?" \xb7 ".concat(e.company):""," ",(0,s.jsxs)("span",{className:"text-gray-400",children:["(",e.source,")"]})]},e.id)}),0===H.length&&O?(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"无匹配,换个关键词"}):null]})]}):null,m?(0,s.jsxs)("div",{className:"flex items-center gap-1.5 border-t border-gray-100 pt-2",children:[(0,s.jsx)("input",{type:"text",list:"hm-known-platforms",value:N,onChange:e=>w(e.target.value),placeholder:"平台名(如 liepin.com / 拉勾)",className:"w-56 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("datalist",{id:"hm-known-platforms",children:C.map(e=>(0,s.jsx)("option",{value:e},e))}),(0,s.jsx)("button",{type:"button",disabled:k||!N.trim(),onClick:()=>void X("/job-cases/".concat(o,"/postings"),"POST",{platform:N.trim()}).then(e=>e&&w("")),className:"rounded border border-gray-300 px-2 py-1 text-xs hover:bg-gray-50 disabled:opacity-40",children:"添加待发布"}),(0,s.jsx)("button",{type:"button",disabled:k||!N.trim(),onClick:()=>{D("new"),G(N.trim()),Y()},className:"rounded border border-blue-300 px-2 py-1 text-xs text-blue-700 hover:bg-blue-50 disabled:opacity-40",children:"添加并链接发布…"})]}):(0,s.jsx)("div",{className:"rounded border border-amber-100 bg-amber-50 px-2 py-1 text-xs text-amber-600",children:"仅该职位的 op/rs 可管理发布与简历,你可查看"}),(0,s.jsxs)("section",{className:"border-t border-gray-100 pt-3",children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center justify-between",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium text-gray-800",children:["收到的简历(",R.length,")"]}),ee?(0,s.jsx)(p,{label:"让Agent收简历",text:c({jobCaseId:o,title:x,platform:ee})}):null]}),$.length?(0,s.jsx)("div",{className:"mb-2 flex gap-1",children:$.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>K(e),className:"flex items-center gap-1 rounded px-2 py-1 text-xs ".concat(ee===e?"bg-[color:var(--brand-soft)] font-medium text-[color:var(--brand-strong)]":"text-gray-500 hover:bg-gray-100"),children:[(0,s.jsx)(b,{platform:e,sm:!0}),e,(0,s.jsxs)("span",{className:"text-gray-400",children:["(",R.filter(t=>{var a;return(null!==(a=t.platform)&&void 0!==a?a:"")===e}).length,")"]})]},e))}):(0,s.jsx)("div",{className:"rounded border border-dashed border-gray-200 p-3 text-center text-xs text-gray-400",children:"还没有平台槽位;添加平台并发布后,按平台收简历"}),ee?0===et.length?(0,s.jsxs)("div",{className:"rounded border border-dashed border-gray-200 p-3 text-center text-xs text-gray-400",children:[ee," 还没有收到简历"]}):(0,s.jsx)("div",{className:"space-y-1",children:et.map(e=>{var t,a;return(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded border border-gray-100 px-2 py-1 text-xs",children:[(0,s.jsx)("span",{className:"font-medium text-gray-800",children:e.name}),(null===(t=e.posting)||void 0===t?void 0:t.title)?(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-gray-400",children:e.posting.title}):(0,s.jsx)("span",{className:"flex-1"}),e.note?(0,s.jsx)("span",{className:"text-gray-400",children:e.note}):null,(0,s.jsx)("span",{className:"text-gray-400",children:null===(a=e.receivedAt)||void 0===a?void 0:a.slice(0,10)}),m?(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>void X("/job-applications/".concat(e.id),"DELETE"),className:"text-gray-300 hover:text-red-500",children:"✕"}):null]},e.id)})}):null,m?(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>L(!U),className:"text-xs text-gray-400 underline hover:text-gray-600",children:U?"收起手动录入":"手动录入简历(agent 不在场兜底)"}),U?(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5",children:[(0,s.jsx)("input",{type:"text",value:V,onChange:e=>W(e.target.value),placeholder:"候选人姓名",className:"w-36 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsxs)("span",{className:"text-xs text-gray-500",children:["平台=",(0,s.jsx)("b",{children:ee||"未选"})]}),(0,s.jsx)("input",{type:"text",value:z,onChange:e=>B(e.target.value),placeholder:"备注(可空)",className:"w-44 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("button",{type:"button",disabled:k||!V.trim()||!ee,onClick:()=>void X("/job-cases/".concat(o,"/applications"),"POST",{name:V.trim(),platform:ee,note:z.trim()||void 0}).then(e=>{e&&(W(""),B(""))}),className:"rounded border border-gray-300 px-2 py-1 text-xs hover:bg-gray-50 disabled:opacity-40",children:"录入"})]}):null]}):null]})]})}},88801:function(e,t,a){a.d(t,{hm:function(){return c},mJ:function(){return u},oU:function(){return i}});var s=a(60635);let n="hm-view-mode",r=new Set;function o(){return"bd"===window.localStorage.getItem(n)?"bd":"delivery"}function l(e){return r.add(e),()=>r.delete(e)}function d(e){"undefined"!=typeof document&&(document.documentElement.dataset.view=e)}function c(e){window.localStorage.setItem(n,e),d(e),r.forEach(e=>e())}function i(){d(o())}function u(e){let t=(0,s.useSyncExternalStore)(l,o,()=>"delivery");return null!=e?e:t}}}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="43ea801e-7b6a-4187-90ae-2cea8b0f3fc2",e._sentryDebugIdIdentifier="sentry-dbid-43ea801e-7b6a-4187-90ae-2cea8b0f3fc2")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[686],{49616:function(e,t,a){a.d(t,{I:function(){return x},v:function(){return p}});var s=a(72835),n=a(60635),r=a(74431),o=a(84704);function l(e){let t=null!=e?e:"<职位管理页 tabId>";return["公共纪律(全文 SSOT: hunter-mate-harness .harness/workflows/subagent-job-platform-ops.md,先读再动手):",'0. 浏览器操作只走 hunter-mate extension *;控制命令 JSON 显式带 "__tab":"'.concat(t,'"(cp.tab.* 子命令用 "tab":"').concat(t,'");录制 title 带 job-ops- 前缀;执行环境带写护栏先切 SINGLE_REPO_DEV。'),"1. 风控红线:cp.eval 读 location.href/document.title 判页面存活;CAPTCHA/登录墙/空白杀 → 立即 halt 当日不重试;eval ≥2s、字段填写 ≥1.5s、切页 3-5s(human-paced,平台数值以 risk-profile 为准)。","2. 回写契约:结果必须调 hunter-mate API 落库并 GET 读回;只操作不落库=未完成。凭证零落地:平台账号密码不入库,note 只记别名。"].join("\n")}function d(e,t,a,s,n){return["[hunter-mate] ".concat(e),"","职位案件: #".concat(t," ").concat(a,"(平台槽位: ").concat(s,")"),"API 基址: http://127.0.0.1:34571",...n?["平台页 tab: ".concat(n,"(已开则定向复用;未开用 hunter-mate extension 后台新开,禁 CDP 附加导航)")]:[],""].join("\n")}function c(e){return[d("收简历:到平台收件箱收取本案职位简历,落人才库并回写简历流水。",e.jobCaseId,e.title,e.platform),l(),"","执行步骤:","1. 前置:GET /job-cases/".concat(e.jobCaseId,"/postings 确认 ").concat(e.platform," 槽位 status=published(未发布无收件箱)。"),"2. 打开收件箱(猎聘=职位详情页 /job/gethjobdetail?hjobId=<id> 内待处理简历区;入口结构按 flows/resume-collect.yaml,标 recon-pending 处先只读 recon 固化再提取)。","3. 逐份提取:候选人姓名/接收时间;详情走既有 talent adapter 落人才库,命中已有人才复用 talentEntityId(dedup 结论),不重复建档。","4. 回写:先 GET /job-cases/".concat(e.jobCaseId,"/applications 查重(同人同案跳过),再 POST /job-cases/").concat(e.jobCaseId,'/applications {name, platform:"').concat(e.platform,'", talentEntityId?, note};单平台单次 ≤20 份;回写后 GET 读回确认。'),"5. 只读平台:沟通/回复/下载等任何平台写操作不在范围。"].join("\n")}let i={draft:{label:"待发布",cls:"bg-gray-100 text-gray-500"},published:{label:"已发布",cls:"bg-emerald-100 text-emerald-700"},offline:{label:"已下线",cls:"bg-gray-200 text-gray-400"}},u=["job","job-list","job-detail"];function p(e){let{platform:t,sm:a}=e,n=(0,o.mS)(t);return(0,s.jsx)("span",{title:t,className:"inline-flex items-center justify-center rounded bg-[color:var(--brand-soft)] font-semibold ".concat(a?"h-3.5 w-3.5 text-[8px]":"h-4 w-4 text-[9px]"),style:{color:n.fg},children:n.label})}function b(e){let{text:t,label:a,primary:r}=e,[o,l]=(0,n.useState)(!1);return(0,s.jsx)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(t)}catch(a){let e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}l(!0),window.setTimeout(()=>l(!1),2e3)},className:r?"rounded bg-blue-600 px-2 py-1 text-xs text-white hover:bg-blue-700":"rounded border border-blue-300 px-1.5 py-0.5 text-xs text-blue-700 hover:bg-blue-50",children:o?"已复制 ✓":a})}function x(e){var t,a;let{jobCaseId:o,caseTitle:x,canOperate:m=!0}=e,[g,h]=(0,n.useState)([]),[y,f]=(0,n.useState)([]),[j,v]=(0,n.useState)(new Set),[N,w]=(0,n.useState)(""),[C,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[E,A]=(0,n.useState)(""),[T,P]=(0,n.useState)(null),[_,D]=(0,n.useState)(null),[O,G]=(0,n.useState)(""),[H,J]=(0,n.useState)([]),[U,L]=(0,n.useState)(!1),[R,M]=(0,n.useState)([]),[q,K]=(0,n.useState)(""),[V,W]=(0,n.useState)(""),[z,B]=(0,n.useState)(""),F=(0,n.useCallback)(async()=>{try{h(await (0,r.aA)("/job-cases/".concat(o,"/postings")))}catch(e){}try{M(await (0,r.aA)("/job-cases/".concat(o,"/applications")))}catch(e){}},[o]);(0,n.useEffect)(()=>{F(),(async()=>{try{S(await (0,r.aA)("/job-postings/sources"))}catch(e){}})(),(async()=>{try{let e=await (0,r.aA)("/adapters/capabilities");f(e.platforms)}catch(e){}})()},[F]);let Q=(0,n.useCallback)(e=>{let t=e.trim().toLowerCase();return y.find(e=>e.platform===t||t.includes(e.platform)||e.platform.includes(t))},[y]),X=(0,n.useCallback)(async(e,t,a)=>{I(!0),A("");try{await (0,r.aA)(e,{method:t,headers:{"Content-Type":"application/json"},body:null!=a?JSON.stringify(a):void 0})}catch(e){return I(!1),A("操作失败(服务端拒绝或网络错误)"),!1}return I(!1),await F(),!0},[F]),Y=(0,n.useCallback)(async()=>{try{let e=await (0,r.aA)("/entities?type=job&limit=10&q=".concat(encodeURIComponent(O.trim())));J(e.items)}catch(e){J([]),A("搜索失败,请重试")}},[O]),Z=(0,n.useCallback)(async(e,t)=>{("new"===e?await X("/job-cases/".concat(o,"/postings"),"POST",{platform:t.source,jobPostingId:t.id,status:"published"}):await X("/job-case-postings/".concat(e),"PATCH",{jobPostingId:t.id,status:"published"}))&&(D(null),J([]),G(""))},[X,o]),$=(0,n.useMemo)(()=>{let e=new Set;for(let t of g)e.add(t.platform);for(let t of R)t.platform&&e.add(t.platform);return Array.from(e).sort()},[g,R]),ee=$.includes(q)?q:null!==(t=$[0])&&void 0!==t?t:"",et=(0,n.useMemo)(()=>R.filter(e=>{var t;return(null!==(t=e.platform)&&void 0!==t?t:"")===ee}),[R,ee]),ea=g.filter(e=>j.has(e.id)).map(e=>e.platform);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"flex items-center gap-2 text-xs text-gray-400",children:(0,s.jsx)("span",{children:"发布是 agent 平台适配能力:勾选平台后复制任务 prompt 给 agent 执行;手动操作收在「手动」里。"})}),E?(0,s.jsx)("div",{className:"text-xs text-red-500",children:E}):null,(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(b,{primary:!0,label:"让Agent同步检查".concat(ea.length?"(".concat(ea.join("、"),")"):""),text:[d("职位已发布同步检查:到平台职位管理页核对本案职位是否已发布,回写槽位状态。",(a={jobCaseId:o,title:x,platforms:ea.length?ea:["<勾选平台>"]}).jobCaseId,a.title,a.platforms.join("、"),a.tabId),l(a.tabId),"","执行步骤:","1. GET /job-cases/".concat(a.jobCaseId,"/postings 读目标平台槽位(须有 pid;无槽位先 POST 建 draft 槽位)。"),"2. 打开平台职位管理页(猎聘=https://h.liepin.com/job/showlistpage?jobStatus=11);解析优先走 adapter:录制该页 → recordings show <sid> --parse(jobs-list adapter);adapter 未就绪按 flows/job-sync.yaml recon 选择器只读提取(标 assumed)。","3. 标题归一化比对(去空白/全半角/大小写;企业名包装差异忽略):命中 → 取平台行 id+状态;同标题多行取最新,note 记全部候选。",'4. 回写:命中 → PATCH /job-case-postings/<pid> {status:"published", note:"synced <date> 平台行=<id> 平台状态=<status>"};未命中 → note 记"未找到发布 <date>",status 保持 draft。',"5. 平台有而本地 job_postings 无 → 触发 adapter parse 落库后再补链接;全部回写后 GET 读回确认。"].join("\n")}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:ea.length?"把 prompt 贴给 agent,回写后刷新可见":"先勾选下方平台槽位"})]}),(0,s.jsx)("div",{className:"space-y-1.5",children:0===g.length?(0,s.jsx)("div",{className:"rounded border border-dashed border-gray-200 p-4 text-center text-xs text-gray-400",children:"还没有平台槽位,先在下方添加"}):g.map(e=>{var t,a;let n=Q(e.platform),r=!!n&&n.rules>0,g=!!n&&n.pageClasses.some(e=>u.some(t=>e.startsWith(t)));return(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded border border-gray-200 px-2.5 py-1.5 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:j.has(e.id),onChange:t=>{let a=new Set(j);t.target.checked?a.add(e.id):a.delete(e.id),v(a)},title:"勾选后纳入同步检查"}),(0,s.jsx)(p,{platform:e.platform}),(0,s.jsx)("span",{className:"w-24 truncate font-medium text-gray-800",children:e.platform}),(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] ".concat(r?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-400"),title:n?"adapter rules=".concat(n.rules," pageClasses=").concat(n.pageClasses.join(",")):"adapter 未登记",children:r?g?"适配\xb7职位":"适配\xb7人才":"未适配"}),(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat(i[e.status].cls),children:i[e.status].label}),e.posting?(0,s.jsxs)("a",{href:e.posting.sourceUrl,target:"_blank",rel:"noreferrer",className:"min-w-0 flex-1 truncate text-xs text-blue-600 hover:underline",title:e.posting.sourceUrl,children:[null!==(t=e.posting.title)&&void 0!==t?t:"(无标题)",e.posting.company?" \xb7 ".concat(e.posting.company):""]}):(0,s.jsx)("span",{className:"flex-1 text-xs text-gray-300",children:"未链接发布"}),e.publishedAt?(0,s.jsx)("span",{className:"text-xs text-gray-400",children:e.publishedAt.slice(0,10)}):null,(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs",children:["published"!==e.status?(0,s.jsx)(b,{label:"让Agent发布",text:[d("发布职位(谨慎级写操作,费用敏感):代用户在平台发布本职位,查重前置(禁止重复发布)→资格前置→recon→填单→自检→提交→回写。",(a={jobCaseId:o,title:x,platform:e.platform}).jobCaseId,a.title,a.platform,a.tabId),l(a.tabId),"","执行步骤:","1. 资格硬闸门:读平台发布资格(猎聘=职位管理页顶《猎头诚信联盟承诺函》审核状态+账户资源配额);不足 → halt 报告,不绕过。",'2. 查重硬闸门(发布可能产生费用,禁止重复发布):先做同步检查同款列表核对(adapter parse 优先,标题归一化比对本案职位);命中已发布/审核中 → 立即 halt,回报用户裁定"再发重复 vs 旧职位修改再发",不得自行决定;未命中须把比对证据(行数+标题集合)写进汇报。',"2b. 费用意识:发布前 recon 平台收费规则(不可见标 assumed 并声明);同平台同职位只发一次,再发/多平台代发须用户逐个授权。","3. 表单 recon:打开发职位页(猎聘=职位管理「发职位」入口,禁直达表单 URL),按 flows/job-publish.yaml 字段清单逐项读控件;recon-pending 项首跑只 recon 不提交,补录 flow 后再执行。","4. 填单(JobCase #".concat(a.jobCaseId,"):").concat(a.jd?"JD 摘要:".concat(a.jd):"职位信息以 JobCase 详情为准",";每字段间隔 ≥2s,eval 间隔 ≥3s(表单页红线)。"),"5. 提交前自检:cp.eval 读表单全部已填值与期望逐字段比对;提交前状态录一次(录制最后一镜)。","6. 提交+读回:点击提交 → 等审核态/结果文案 → 读平台状态;提交步出现 CAPTCHA/二次验证 → 立即 halt 报告人工,绝不重试提交。",'7. 回写:PATCH /job-case-postings/<pid> {status:"published", note:"published <date> 平台状态=<审核中|已发布|失败原因原文> 查重证据=<行数+标题>"};失败完整回写原因;等平台列表可见后走同步检查补链接。'].join("\n")}):(0,s.jsx)(b,{label:"让Agent收简历",text:c({jobCaseId:o,title:x,platform:e.platform})}),m?(0,s.jsx)("button",{type:"button",onClick:()=>P(T===e.id?null:e.id),className:"rounded border border-gray-200 px-1.5 py-0.5 text-gray-400 hover:bg-gray-50",children:"手动"}):null]}),T===e.id&&m?(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs",children:["published"!==e.status?(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>void X("/job-case-postings/".concat(e.id),"PATCH",{status:"published"}),className:"rounded border border-emerald-300 px-1.5 py-0.5 text-emerald-700 hover:bg-emerald-50",children:"标记已发布"}):(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>void X("/job-case-postings/".concat(e.id),"PATCH",{status:"offline"}),className:"rounded border border-gray-300 px-1.5 py-0.5 text-gray-500 hover:bg-gray-50",children:"下线"}),(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>{D(_===e.id?null:e.id),G(""),J([])},className:"rounded border border-blue-300 px-1.5 py-0.5 text-blue-700 hover:bg-blue-50",children:e.posting?"换链接":"链接发布"}),(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>void X("/job-case-postings/".concat(e.id),"DELETE"),className:"rounded border border-gray-200 px-1.5 py-0.5 text-gray-400 hover:bg-red-50 hover:text-red-500",children:"删除槽位"})]}):null]},e.id)})}),null!=_&&m?(0,s.jsxs)("div",{className:"rounded border border-blue-200 bg-blue-50/50 p-2",children:[(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("input",{type:"text",value:O,onChange:e=>G(e.target.value),onKeyDown:e=>"Enter"===e.key&&void Y(),placeholder:"按标题/公司搜索解析库里的职位发布…",className:"flex-1 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("button",{type:"button",onClick:()=>void Y(),className:"rounded bg-blue-600 px-2 py-1 text-xs text-white hover:bg-blue-700",children:"搜索"})]}),(0,s.jsxs)("div",{className:"mt-1.5 space-y-1",children:[H.map(e=>{var t;return(0,s.jsxs)("button",{type:"button",onClick:()=>void Z(_,e),className:"block w-full truncate rounded bg-white px-2 py-1 text-left text-xs hover:bg-blue-100",title:e.sourceUrl,children:[(0,s.jsx)(p,{platform:e.source,sm:!0})," ",null!==(t=e.title)&&void 0!==t?t:"(无标题)",e.company?" \xb7 ".concat(e.company):""," ",(0,s.jsxs)("span",{className:"text-gray-400",children:["(",e.source,")"]})]},e.id)}),0===H.length&&O?(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"无匹配,换个关键词"}):null]})]}):null,m?(0,s.jsxs)("div",{className:"flex items-center gap-1.5 border-t border-gray-100 pt-2",children:[(0,s.jsx)("input",{type:"text",list:"hm-known-platforms",value:N,onChange:e=>w(e.target.value),placeholder:"平台名(如 liepin.com / 拉勾)",className:"w-56 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("datalist",{id:"hm-known-platforms",children:C.map(e=>(0,s.jsx)("option",{value:e},e))}),(0,s.jsx)("button",{type:"button",disabled:k||!N.trim(),onClick:()=>void X("/job-cases/".concat(o,"/postings"),"POST",{platform:N.trim()}).then(e=>e&&w("")),className:"rounded border border-gray-300 px-2 py-1 text-xs hover:bg-gray-50 disabled:opacity-40",children:"添加待发布"}),(0,s.jsx)("button",{type:"button",disabled:k||!N.trim(),onClick:()=>{D("new"),G(N.trim()),Y()},className:"rounded border border-blue-300 px-2 py-1 text-xs text-blue-700 hover:bg-blue-50 disabled:opacity-40",children:"添加并链接发布…"})]}):(0,s.jsx)("div",{className:"rounded border border-amber-100 bg-amber-50 px-2 py-1 text-xs text-amber-600",children:"仅该职位的 op/rs 可管理发布与简历,你可查看"}),(0,s.jsxs)("section",{className:"border-t border-gray-100 pt-3",children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center justify-between",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium text-gray-800",children:["收到的简历(",R.length,")"]}),ee?(0,s.jsx)(b,{label:"让Agent收简历",text:c({jobCaseId:o,title:x,platform:ee})}):null]}),$.length?(0,s.jsx)("div",{className:"mb-2 flex gap-1",children:$.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>K(e),className:"flex items-center gap-1 rounded px-2 py-1 text-xs ".concat(ee===e?"bg-[color:var(--brand-soft)] font-medium text-[color:var(--brand-strong)]":"text-gray-500 hover:bg-gray-100"),children:[(0,s.jsx)(p,{platform:e,sm:!0}),e,(0,s.jsxs)("span",{className:"text-gray-400",children:["(",R.filter(t=>{var a;return(null!==(a=t.platform)&&void 0!==a?a:"")===e}).length,")"]})]},e))}):(0,s.jsx)("div",{className:"rounded border border-dashed border-gray-200 p-3 text-center text-xs text-gray-400",children:"还没有平台槽位;添加平台并发布后,按平台收简历"}),ee?0===et.length?(0,s.jsxs)("div",{className:"rounded border border-dashed border-gray-200 p-3 text-center text-xs text-gray-400",children:[ee," 还没有收到简历"]}):(0,s.jsx)("div",{className:"space-y-1",children:et.map(e=>{var t,a;return(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded border border-gray-100 px-2 py-1 text-xs",children:[(0,s.jsx)("span",{className:"font-medium text-gray-800",children:e.name}),(null===(t=e.posting)||void 0===t?void 0:t.title)?(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-gray-400",children:e.posting.title}):(0,s.jsx)("span",{className:"flex-1"}),e.note?(0,s.jsx)("span",{className:"text-gray-400",children:e.note}):null,(0,s.jsx)("span",{className:"text-gray-400",children:null===(a=e.receivedAt)||void 0===a?void 0:a.slice(0,10)}),m?(0,s.jsx)("button",{type:"button",disabled:k,onClick:()=>void X("/job-applications/".concat(e.id),"DELETE"),className:"text-gray-300 hover:text-red-500",children:"✕"}):null]},e.id)})}):null,m?(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>L(!U),className:"text-xs text-gray-400 underline hover:text-gray-600",children:U?"收起手动录入":"手动录入简历(agent 不在场兜底)"}),U?(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5",children:[(0,s.jsx)("input",{type:"text",value:V,onChange:e=>W(e.target.value),placeholder:"候选人姓名",className:"w-36 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsxs)("span",{className:"text-xs text-gray-500",children:["平台=",(0,s.jsx)("b",{children:ee||"未选"})]}),(0,s.jsx)("input",{type:"text",value:z,onChange:e=>B(e.target.value),placeholder:"备注(可空)",className:"w-44 rounded border border-gray-300 px-2 py-1 text-xs outline-none focus:border-blue-500"}),(0,s.jsx)("button",{type:"button",disabled:k||!V.trim()||!ee,onClick:()=>void X("/job-cases/".concat(o,"/applications"),"POST",{name:V.trim(),platform:ee,note:z.trim()||void 0}).then(e=>{e&&(W(""),B(""))}),className:"rounded border border-gray-300 px-2 py-1 text-xs hover:bg-gray-50 disabled:opacity-40",children:"录入"})]}):null]}):null]})]})}},88801:function(e,t,a){a.d(t,{hm:function(){return c},mJ:function(){return u},oU:function(){return i}});var s=a(60635);let n="hm-view-mode",r=new Set;function o(){return"bd"===window.localStorage.getItem(n)?"bd":"delivery"}function l(e){return r.add(e),()=>r.delete(e)}function d(e){"undefined"!=typeof document&&(document.documentElement.dataset.view=e)}function c(e){window.localStorage.setItem(n,e),d(e),r.forEach(e=>e())}function i(){d(o())}function u(e){let t=(0,s.useSyncExternalStore)(l,o,()=>"delivery");return null!=e?e:t}}}]);