hunter-mate 0.1.24 → 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 (84) hide show
  1. package/dist/assets/extension/background/{service-worker.20261017012007.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/chunks/{chunk-SAJB6JRK.mjs → chunk-VL7WHUEV.mjs} +556 -8
  6. package/dist/assets/server/chunks/{script-rule-ZJN6CEYX.mjs → script-rule-4RZQ2PQE.mjs} +1 -2
  7. package/dist/assets/server/main.mjs +1038 -870
  8. package/dist/index.js +178 -24
  9. package/dist/watchdog.js +14 -3
  10. package/dist/web/dist/404.html +1 -1
  11. package/dist/web/dist/_next/static/chunks/187-f067914dcd1330c2.js +32 -0
  12. package/dist/web/dist/_next/static/chunks/253-9278ce6c4d446329.js +1 -0
  13. package/dist/web/dist/_next/static/chunks/{589-f984bff035a1cb85.js → 589-cc56950ae4117cdd.js} +1 -1
  14. package/dist/web/dist/_next/static/chunks/659-122057f46f941df7.js +1 -0
  15. package/dist/web/dist/_next/static/chunks/{686-9f419b70feea9470.js → 686-05b99d3674f45bf7.js} +1 -1
  16. package/dist/web/dist/_next/static/chunks/728-cffab7e836020551.js +12 -0
  17. package/dist/web/dist/_next/static/chunks/{865-0ed23dd43c0832a2.js → 865-8e1d8c34192526ed.js} +1 -1
  18. package/dist/web/dist/_next/static/chunks/{935-7be3e60dd8bc29d2.js → 935-efb30b9f6f558e3f.js} +1 -1
  19. package/dist/web/dist/_next/static/chunks/{a7067448-e416655baf443992.js → a7067448-3f2b194cfadb91fb.js} +1 -1
  20. package/dist/web/dist/_next/static/chunks/app/_not-found/{page-5b7249eb3c9a6cb9.js → page-d939b40bb8878d26.js} +1 -1
  21. package/dist/web/dist/_next/static/chunks/app/admin/data/{page-14698e9c4ddaa6d9.js → page-df1d84c14e85f294.js} +1 -1
  22. package/dist/web/dist/_next/static/chunks/app/auth/verify/{page-05304d5803008d61.js → page-cfeb844e1b72ccaa.js} +1 -1
  23. package/dist/web/dist/_next/static/chunks/app/companies/{page-e8d02fe997579315.js → page-57b1ef0b12134ce0.js} +1 -1
  24. package/dist/web/dist/_next/static/chunks/app/company/admin/{page-c2584183bc4b34d1.js → page-010928306f8df0ed.js} +1 -1
  25. package/dist/web/dist/_next/static/chunks/app/entity/{page-08755f96102f0565.js → page-fa96319650d38e78.js} +1 -1
  26. package/dist/web/dist/_next/static/chunks/app/jobs/page-5ba0bdc881b98d42.js +1 -0
  27. package/dist/web/dist/_next/static/chunks/app/{layout-af39afc7866e74db.js → layout-bd9a7e5e4474b692.js} +1 -1
  28. package/dist/web/dist/_next/static/chunks/app/logs/{page-be50a4e10b1a0024.js → page-bcdbb3885abda5a2.js} +1 -1
  29. package/dist/web/dist/_next/static/chunks/app/matching/jobs/[id]/talents/{page-cf445b0cb8c2cb0a.js → page-8aca89db1e666a49.js} +1 -1
  30. package/dist/web/dist/_next/static/chunks/app/matching/portraits/[id]/jobs/{page-c7ff0d79b6a75915.js → page-7086f1b773e57511.js} +1 -1
  31. package/dist/web/dist/_next/static/chunks/app/{page-bd282e1e5f0965f1.js → page-49fe1e8630d2237e.js} +1 -1
  32. package/dist/web/dist/_next/static/chunks/app/parselog/{page-9814e75d6900a743.js → page-fcdfdd41cf1f86f7.js} +1 -1
  33. package/dist/web/dist/_next/static/chunks/app/recordings/{page-441016638b43c4f8.js → page-7ba5d89391c9dace.js} +1 -1
  34. package/dist/web/dist/_next/static/chunks/app/resource-usage/{page-f6fa06bfe21bcd32.js → page-7b939cf673d764e6.js} +1 -1
  35. package/dist/web/dist/_next/static/chunks/app/shared/[token]/{page-c9c5042a2d07c0bc.js → page-df87328c52f862f1.js} +1 -1
  36. package/dist/web/dist/_next/static/chunks/app/snapshots/[id]/agent-prompt/{page-f54cf2f0058035ca.js → page-7d4d25de2c6704e9.js} +1 -1
  37. package/dist/web/dist/_next/static/chunks/app/talents/{page-0edef6d07b3cf69d.js → page-5a2caa7a503ee041.js} +1 -1
  38. package/dist/web/dist/_next/static/chunks/app/team/insights/{page-8b3934df3e292368.js → page-f097b4b8578a6e5d.js} +1 -1
  39. package/dist/web/dist/_next/static/css/a8f0a381a2372781.css +3 -0
  40. package/dist/web/dist/admin/data.html +1 -1
  41. package/dist/web/dist/admin/data.txt +5 -5
  42. package/dist/web/dist/auth/verify.html +1 -1
  43. package/dist/web/dist/auth/verify.txt +5 -5
  44. package/dist/web/dist/companies.html +1 -1
  45. package/dist/web/dist/companies.txt +5 -5
  46. package/dist/web/dist/company/admin.html +1 -1
  47. package/dist/web/dist/company/admin.txt +5 -5
  48. package/dist/web/dist/entity.html +1 -1
  49. package/dist/web/dist/entity.txt +5 -5
  50. package/dist/web/dist/index.html +1 -1
  51. package/dist/web/dist/index.txt +5 -5
  52. package/dist/web/dist/jobs.html +1 -1
  53. package/dist/web/dist/jobs.txt +5 -5
  54. package/dist/web/dist/logs.html +1 -1
  55. package/dist/web/dist/logs.txt +5 -5
  56. package/dist/web/dist/matching/jobs/placeholder/talents.html +1 -1
  57. package/dist/web/dist/matching/jobs/placeholder/talents.txt +5 -5
  58. package/dist/web/dist/matching/portraits/placeholder/jobs.html +1 -1
  59. package/dist/web/dist/matching/portraits/placeholder/jobs.txt +5 -5
  60. package/dist/web/dist/parselog.html +1 -1
  61. package/dist/web/dist/parselog.txt +5 -5
  62. package/dist/web/dist/recordings.html +1 -1
  63. package/dist/web/dist/recordings.txt +5 -5
  64. package/dist/web/dist/resource-usage.html +1 -1
  65. package/dist/web/dist/resource-usage.txt +5 -5
  66. package/dist/web/dist/shared/placeholder.html +1 -1
  67. package/dist/web/dist/shared/placeholder.txt +5 -5
  68. package/dist/web/dist/snapshots/placeholder/agent-prompt.html +1 -1
  69. package/dist/web/dist/snapshots/placeholder/agent-prompt.txt +5 -5
  70. package/dist/web/dist/talents.html +1 -1
  71. package/dist/web/dist/talents.txt +5 -5
  72. package/dist/web/dist/team/insights.html +1 -1
  73. package/dist/web/dist/team/insights.txt +5 -5
  74. package/package.json +1 -1
  75. package/dist/assets/server/chunks/chunk-BLXHCSZD.mjs +0 -565
  76. package/dist/assets/server/chunks/esm-4U746B76.mjs +0 -29
  77. package/dist/web/dist/_next/static/chunks/105-dcd8f6d5867c8995.js +0 -32
  78. package/dist/web/dist/_next/static/chunks/253-a05d05b94bfbd7a4.js +0 -1
  79. package/dist/web/dist/_next/static/chunks/555-e2a871b9d2eccb03.js +0 -12
  80. package/dist/web/dist/_next/static/chunks/852-ad19b97821a4cf9e.js +0 -1
  81. package/dist/web/dist/_next/static/chunks/app/jobs/page-4827a9ef286b6483.js +0 -1
  82. package/dist/web/dist/_next/static/css/10ba1fa1d6ce23a7.css +0 -3
  83. /package/dist/web/dist/_next/static/{hBLezfvVOMiGqm4V9F15i → m0UGHVTGvtvb9mn4-uzJJ}/_buildManifest.js +0 -0
  84. /package/dist/web/dist/_next/static/{hBLezfvVOMiGqm4V9F15i → 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]="1a33d5ff-f93a-48ec-9796-9193f53a60d8",e._sentryDebugIdIdentifier="sentry-dbid-1a33d5ff-f93a-48ec-9796-9193f53a60d8")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[788],{10793:function(e,t,s){Promise.resolve().then(s.bind(s,4895))},27473:function(e,t,s){"use strict";var r=s(38321);s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}}),s.o(r,"useServerInsertedHTML")&&s.d(t,{useServerInsertedHTML:function(){return r.useServerInsertedHTML}})},4895:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var r=s(72835),n=s(60635),a=s(27473),l=s(74431),o=s(37202),c=s(94518),i=s(63718),u=s(19036),d=s(55589),x=s(8448);let m={ok:"正常",empty:"关键字段为空","no-snapshot":"缺快照","no-rule":"无规则"},f={ok:"bg-green-50 text-green-700",empty:"bg-yellow-50 text-yellow-700","no-snapshot":"bg-red-50 text-red-700","no-rule":"bg-gray-100 text-gray-600"};function h(e){var t,s;let{item:n}=e;return(0,r.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,r.jsx)(d.default,{href:"/parselog",className:"text-sm text-blue-600 hover:underline",children:"← 返回解析日志列表"}),(0,r.jsxs)("header",{className:"mt-4 mb-6",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,r.jsxs)("h1",{className:"text-2xl font-bold text-gray-900",children:["解析记录 #",n.id]}),(0,r.jsx)("span",{className:"rounded px-2 py-0.5 text-xs ".concat(f[n.status]),children:null!==(s=m[n.status])&&void 0!==s?s:n.status}),n.hasSnapshot?(0,r.jsx)("span",{className:"rounded bg-green-50 px-2 py-0.5 text-xs text-green-700",children:"有录制快照"}):null]}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-gray-500",children:[n.domain," \xb7 ",n.pageClass," \xb7 ",(0,x.d3)(n.createdAt)]})]}),(0,r.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,r.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"来源"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsx)("span",{className:"text-gray-500",children:"sessionId: "}),(0,r.jsx)("span",{className:"font-mono",children:n.sessionId})]}),(0,r.jsx)("a",{href:n.sourceUrl,target:"_blank",rel:"noreferrer",className:"break-all text-sm text-blue-600 hover:underline",children:n.sourceUrl}),n.entityId?(0,r.jsxs)("div",{className:"pt-2",children:[(0,r.jsx)("span",{className:"text-sm text-gray-500",children:"关联实体: "}),(0,r.jsxs)(d.default,{href:"/".concat(n.pageClass,"s?id=").concat(n.entityId),className:"text-sm text-blue-600 hover:underline",children:["#",n.entityId," (",n.pageClass,")"]})]}):null]})]}),n.extractedFields?(0,r.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,r.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"提取字段"}),(0,r.jsx)("pre",{className:"max-h-96 overflow-auto rounded bg-gray-50 p-3 text-xs text-gray-700",children:JSON.stringify(n.extractedFields,null,2)})]}):null,(null===(t=n.missingFields)||void 0===t?void 0:t.length)?(0,r.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,r.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"缺失字段(疑似站点改版)"}),(0,r.jsx)("ul",{className:"list-inside list-disc text-sm text-gray-700",children:n.missingFields.map(e=>(0,r.jsx)("li",{children:e},e))})]}):null]})}let g=[{value:"ok",label:"正常"},{value:"empty",label:"关键字段为空"},{value:"no-snapshot",label:"缺快照"},{value:"no-rule",label:"无规则"}],b={ok:"bg-green-50 text-green-700",empty:"bg-yellow-50 text-yellow-700","no-snapshot":"bg-red-50 text-red-700","no-rule":"bg-gray-100 text-gray-600"};function p(e){let t=new URLSearchParams;Object.entries(e).forEach(e=>{let[s,r]=e;r&&t.set(s,r)});let s=t.toString();return s?"?".concat(s):""}function v(){let e=(0,a.useRouter)(),t=(0,a.usePathname)(),s=(0,a.useSearchParams)(),d=s.get("id")||"",m=(0,n.useMemo)(()=>({q:s.get("q")||"",status:s.get("status")||"",from:s.get("from")||"",to:s.get("to")||""}),[s]),[f,v]=(0,n.useState)(null),[y,j]=(0,n.useState)(!1),[N,w]=(0,n.useState)(null),[S,E]=(0,n.useState)(!0),[k,C]=(0,n.useState)(!1),[I,L]=(0,n.useState)(!1),[P,q]=(0,n.useState)(0),[R,_]=(0,n.useState)(0),T=(0,n.useCallback)(s=>{var r,n;let a=null!==(r=s.filters)&&void 0!==r?r:m,l=p({id:null!==(n=s.id)&&void 0!==n?n:d,q:a.q,status:a.status,from:a.from,to:a.to});e.replace("".concat(t).concat(l))},[m,d,t,e]),A=(0,n.useCallback)(()=>{_(e=>e+1)},[]),M=(0,n.useCallback)(()=>{let e=null==f?void 0:f.items[0];return null==e?void 0:e.createdAt},[f]);(0,n.useEffect)(()=>{E(!0),j(!1);let e=p({q:m.q,status:m.status,from:m.from,to:m.to});(0,l.aA)("/parse-log?limit=200".concat(e.replace("?","&"))).then(e=>{v(e)}).catch(()=>{j(!0)}).finally(()=>{E(!1)})},[m.q,m.status,m.from,m.to,R]),(0,n.useEffect)(()=>{if(!d){w(null),L(!1);return}C(!0),L(!1),(0,l.aA)("/parse-log/".concat(d)).then(e=>{w(e)}).catch(()=>{w(null),L(!0)}).finally(()=>{C(!1)})},[d,P]);let O=(0,n.useMemo)(()=>{var e;return(null!==(e=null==f?void 0:f.items)&&void 0!==e?e:[]).map(e=>({id:String(e.id),content:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat(b[e.status]),children:e.status}),(0,r.jsx)("span",{className:"text-xs text-gray-500",children:e.pageClass})]}),(0,r.jsx)("div",{className:"mt-0.5 text-sm font-medium text-gray-900",children:e.domain}),(0,r.jsx)("div",{className:"text-xs text-gray-400",children:(0,x.d3)(e.createdAt)})]})}))},[f]),U=d?k?(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):I?(0,r.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,r.jsx)("button",{type:"button",onClick:()=>q(e=>e+1),className:"text-blue-500 hover:underline",children:"重试"})]}):N?(0,r.jsx)(h,{item:N}):(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-red-500",children:"未找到该解析日志"}):(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"请在左侧选择一条解析日志查看详情"});return(0,r.jsx)(c.m,{filterBar:(0,r.jsxs)("div",{className:"border-b border-gray-200 bg-white",children:[(0,r.jsx)(o.f,{value:m,showStatus:!0,statusOptions:g,onChange:e=>T({filters:e})}),f?(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 pb-2 text-xs text-gray-500",children:[(0,r.jsxs)("span",{children:["共 ",f.total," 条"]}),f.abnormal>0?(0,r.jsxs)("span",{className:"rounded bg-red-50 px-1.5 py-0.5 text-red-700",children:["异常 ",f.abnormal]}):null]}):null,(0,r.jsx)(u.Y,{pollUrl:"/parse-log/count",getLatestTimestamp:M,onRefresh:A,label:"解析日志"})]}),listPanel:y?(0,r.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,r.jsx)("button",{type:"button",onClick:A,className:"text-blue-500 hover:underline",children:"重试"})]}):(0,r.jsx)(i.L,{items:O,selectedId:d,onSelect:e=>T({id:e}),loading:S,emptyText:"暂无解析日志"}),detailPanel:U})}function y(){return(0,r.jsx)(n.Suspense,{fallback:(0,r.jsx)("div",{className:"p-6 text-gray-500",children:"加载中…"}),children:(0,r.jsx)(v,{})})}},37202:function(e,t,s){"use strict";s.d(t,{f:function(){return a}});var r=s(72835),n=s(60635);function a(e){let{value:t,showStatus:s,statusOptions:a,onChange:l}=e,[o,c]=(0,n.useState)(t);return(0,n.useEffect)(()=>{c(t)},[t.q,t.status,t.from,t.to]),(0,n.useEffect)(()=>{let e=setTimeout(()=>{(o.q!==t.q||o.status!==t.status||o.from!==t.from||o.to!==t.to)&&l(o)},300);return()=>clearTimeout(e)},[o.q,o.status,o.from,o.to]),(0,r.jsxs)("div",{className:"space-y-2 border-b border-gray-200 bg-white p-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative flex-1",children:[(0,r.jsx)("input",{type:"text",value:o.q,onChange:e=>c(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,r.jsx)("button",{type:"button",onClick:()=>l({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:!o.q&&!o.status&&!o.from&&!o.to,children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.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"})})})]}),s?(0,r.jsxs)("select",{value:o.status,onChange:e=>c(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,r.jsx)("option",{value:"",children:"全部状态"}),(a||[]).map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))]}):null]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"date",value:o.from,onChange:e=>c(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,r.jsx)("span",{className:"text-sm text-gray-400",children:"-"}),(0,r.jsx)("input",{type:"date",value:o.to,onChange:e=>c(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"})]})]})}},94518:function(e,t,s){"use strict";s.d(t,{m:function(){return n}});var r=s(72835);function n(e){let{filterBar:t,listPanel:s,detailPanel:n}=e;return(0,r.jsxs)("div",{className:"flex h-full",children:[(0,r.jsxs)("div",{className:"flex w-80 flex-col border-r border-gray-200 bg-white",children:[t,s]}),(0,r.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:n})]})}},63718:function(e,t,s){"use strict";s.d(t,{L:function(){return a}});var r=s(72835),n=s(60635);function a(e){let{items:t,selectedId:s,onSelect:a,loading:l,emptyText:o="暂无数据",onLoadMore:c,loadingMore:i,exhausted:u}=e,d=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!c)return;let e=d.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:e.closest(".overflow-auto"),rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[c]),(0,r.jsxs)("div",{className:"flex-1 overflow-auto",children:[l?(0,r.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:"加载中…"}):0===t.length?(0,r.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:o}):(0,r.jsx)("ul",{className:"divide-y divide-gray-100",children:t.map(e=>(0,r.jsx)("li",{role:"button",tabIndex:0,onClick:()=>a(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&a(e.id)},className:"cursor-pointer px-3 py-2 text-sm transition-colors ".concat(s===e.id?"bg-blue-50":"hover:bg-gray-50"),children:e.content},e.id))}),c&&!l&&t.length>0&&(0,r.jsx)("div",{ref:d,className:"p-3 text-center text-xs text-gray-400",children:i?"加载更多…":u?"没有更多了":""})]})}},19036:function(e,t,s){"use strict";s.d(t,{Y:function(){return l}});var r=s(72835),n=s(60635),a=s(74431);function l(e){let{pollUrl:t,intervalMs:s=5e3,onRefresh:l,getLatestTimestamp:o,label:c="新数据"}=e,[i,u]=(0,n.useState)(0),[d,x]=(0,n.useState)(!1),m=(0,n.useRef)(void 0);return((0,n.useEffect)(()=>{let e=()=>x(document.hidden);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,n.useEffect)(()=>{m.current=o(),u(0)},[o]),(0,n.useEffect)(()=>{if(d)return;let e=async()=>{let e=m.current;if(!e)return;let s=t.includes("?")?"&":"?",r=0;try{var n;let l=await (0,a.aA)("".concat(t).concat(s,"since=").concat(encodeURIComponent(e)));r=null!==(n=l.count)&&void 0!==n?n:0}catch(e){}u(e=>Math.max(e,r))};e();let r=setInterval(e,s);return()=>clearInterval(r)},[t,s,d]),i<=0)?null:(0,r.jsxs)("button",{type:"button",onClick:()=>{u(0),l()},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:["有 ",i," 条",c,",点击刷新"]})}},8448:function(e,t,s){"use strict";function r(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("zh-CN",{hour12:!1}):""}s.d(t,{d3:function(){return r}})},74431:function(e,t,s){"use strict";s.d(t,{Ox:function(){return a},aA:function(){return c}});var r=s(67002),n=s(60529);function a(){return n.env.HUNTER_MATE_SERVER_URL||""}let l=a();class o extends Error{constructor(e,t,s){super(null!=s?s:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function c(e,t){let s;try{s=await fetch("".concat(l).concat(e),{cache:"no-store",...function(e){let t=(0,r.Xc)();if(!t)return e;let s=new Headers(null==e?void 0:e.headers);return s.has("Authorization")||s.set("Authorization","UTOKEN ".concat(t)),{...e,headers:s}}(t)})}catch(t){throw new o(0,e,t instanceof Error?t.message:"网络错误")}if(!s.ok)throw new o(s.status,e,"HTTP ".concat(s.status));try{return await s.json()}catch(t){throw new o(s.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,s){"use strict";s.d(t,{GK:function(){return l},Lc:function(){return o},Xc:function(){return a}});let r=null,n=new Set;function a(){return r}function l(e){e!==r&&(r=e,n.forEach(e=>e()))}function o(e){return n.add(e),()=>{n.delete(e)}}}},function(e){e.O(0,[589,400,935,744],function(){return e(e.s=10793)}),_N_E=e.O()}]);
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]="8fa42135-4c4a-485e-9179-7ffa08cacb80",e._sentryDebugIdIdentifier="sentry-dbid-8fa42135-4c4a-485e-9179-7ffa08cacb80")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[788],{10793:function(e,t,s){Promise.resolve().then(s.bind(s,4895))},27473:function(e,t,s){"use strict";var r=s(38321);s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}}),s.o(r,"useServerInsertedHTML")&&s.d(t,{useServerInsertedHTML:function(){return r.useServerInsertedHTML}})},4895:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var r=s(72835),n=s(60635),a=s(27473),l=s(74431),c=s(37202),o=s(94518),i=s(63718),u=s(19036),d=s(55589),x=s(8448);let m={ok:"正常",empty:"关键字段为空","no-snapshot":"缺快照","no-rule":"无规则"},f={ok:"bg-green-50 text-green-700",empty:"bg-yellow-50 text-yellow-700","no-snapshot":"bg-red-50 text-red-700","no-rule":"bg-gray-100 text-gray-600"};function h(e){var t,s;let{item:n}=e;return(0,r.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,r.jsx)(d.default,{href:"/parselog",className:"text-sm text-blue-600 hover:underline",children:"← 返回解析日志列表"}),(0,r.jsxs)("header",{className:"mt-4 mb-6",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,r.jsxs)("h1",{className:"text-2xl font-bold text-gray-900",children:["解析记录 #",n.id]}),(0,r.jsx)("span",{className:"rounded px-2 py-0.5 text-xs ".concat(f[n.status]),children:null!==(s=m[n.status])&&void 0!==s?s:n.status}),n.hasSnapshot?(0,r.jsx)("span",{className:"rounded bg-green-50 px-2 py-0.5 text-xs text-green-700",children:"有录制快照"}):null]}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-gray-500",children:[n.domain," \xb7 ",n.pageClass," \xb7 ",(0,x.d3)(n.createdAt)]})]}),(0,r.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,r.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"来源"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsx)("span",{className:"text-gray-500",children:"sessionId: "}),(0,r.jsx)("span",{className:"font-mono",children:n.sessionId})]}),(0,r.jsx)("a",{href:n.sourceUrl,target:"_blank",rel:"noreferrer",className:"break-all text-sm text-blue-600 hover:underline",children:n.sourceUrl}),n.entityId?(0,r.jsxs)("div",{className:"pt-2",children:[(0,r.jsx)("span",{className:"text-sm text-gray-500",children:"关联实体: "}),(0,r.jsxs)(d.default,{href:"/".concat(n.pageClass,"s?id=").concat(n.entityId),className:"text-sm text-blue-600 hover:underline",children:["#",n.entityId," (",n.pageClass,")"]})]}):null]})]}),n.extractedFields?(0,r.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,r.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"提取字段"}),(0,r.jsx)("pre",{className:"max-h-96 overflow-auto rounded bg-gray-50 p-3 text-xs text-gray-700",children:JSON.stringify(n.extractedFields,null,2)})]}):null,(null===(t=n.missingFields)||void 0===t?void 0:t.length)?(0,r.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,r.jsx)("h2",{className:"mb-3 text-lg font-semibold",children:"缺失字段(疑似站点改版)"}),(0,r.jsx)("ul",{className:"list-inside list-disc text-sm text-gray-700",children:n.missingFields.map(e=>(0,r.jsx)("li",{children:e},e))})]}):null]})}let g=[{value:"ok",label:"正常"},{value:"empty",label:"关键字段为空"},{value:"no-snapshot",label:"缺快照"},{value:"no-rule",label:"无规则"}],b={ok:"bg-green-50 text-green-700",empty:"bg-yellow-50 text-yellow-700","no-snapshot":"bg-red-50 text-red-700","no-rule":"bg-gray-100 text-gray-600"};function p(e){let t=new URLSearchParams;Object.entries(e).forEach(e=>{let[s,r]=e;r&&t.set(s,r)});let s=t.toString();return s?"?".concat(s):""}function v(){let e=(0,a.useRouter)(),t=(0,a.usePathname)(),s=(0,a.useSearchParams)(),d=s.get("id")||"",m=(0,n.useMemo)(()=>({q:s.get("q")||"",status:s.get("status")||"",from:s.get("from")||"",to:s.get("to")||""}),[s]),[f,v]=(0,n.useState)(null),[y,j]=(0,n.useState)(!1),[N,w]=(0,n.useState)(null),[S,E]=(0,n.useState)(!0),[k,C]=(0,n.useState)(!1),[I,L]=(0,n.useState)(!1),[P,q]=(0,n.useState)(0),[R,_]=(0,n.useState)(0),T=(0,n.useCallback)(s=>{var r,n;let a=null!==(r=s.filters)&&void 0!==r?r:m,l=p({id:null!==(n=s.id)&&void 0!==n?n:d,q:a.q,status:a.status,from:a.from,to:a.to});e.replace("".concat(t).concat(l))},[m,d,t,e]),A=(0,n.useCallback)(()=>{_(e=>e+1)},[]),M=(0,n.useCallback)(()=>{let e=null==f?void 0:f.items[0];return null==e?void 0:e.createdAt},[f]);(0,n.useEffect)(()=>{E(!0),j(!1);let e=p({q:m.q,status:m.status,from:m.from,to:m.to});(0,l.aA)("/parse-log?limit=200".concat(e.replace("?","&"))).then(e=>{v(e)}).catch(()=>{j(!0)}).finally(()=>{E(!1)})},[m.q,m.status,m.from,m.to,R]),(0,n.useEffect)(()=>{if(!d){w(null),L(!1);return}C(!0),L(!1),(0,l.aA)("/parse-log/".concat(d)).then(e=>{w(e)}).catch(()=>{w(null),L(!0)}).finally(()=>{C(!1)})},[d,P]);let O=(0,n.useMemo)(()=>{var e;return(null!==(e=null==f?void 0:f.items)&&void 0!==e?e:[]).map(e=>({id:String(e.id),content:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"rounded px-1.5 py-0.5 text-xs ".concat(b[e.status]),children:e.status}),(0,r.jsx)("span",{className:"text-xs text-gray-500",children:e.pageClass})]}),(0,r.jsx)("div",{className:"mt-0.5 text-sm font-medium text-gray-900",children:e.domain}),(0,r.jsx)("div",{className:"text-xs text-gray-400",children:(0,x.d3)(e.createdAt)})]})}))},[f]),U=d?k?(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):I?(0,r.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,r.jsx)("button",{type:"button",onClick:()=>q(e=>e+1),className:"text-blue-500 hover:underline",children:"重试"})]}):N?(0,r.jsx)(h,{item:N}):(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-red-500",children:"未找到该解析日志"}):(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"请在左侧选择一条解析日志查看详情"});return(0,r.jsx)(o.m,{filterBar:(0,r.jsxs)("div",{className:"border-b border-gray-200 bg-white",children:[(0,r.jsx)(c.f,{value:m,showStatus:!0,statusOptions:g,onChange:e=>T({filters:e})}),f?(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 pb-2 text-xs text-gray-500",children:[(0,r.jsxs)("span",{children:["共 ",f.total," 条"]}),f.abnormal>0?(0,r.jsxs)("span",{className:"rounded bg-red-50 px-1.5 py-0.5 text-red-700",children:["异常 ",f.abnormal]}):null]}):null,(0,r.jsx)(u.Y,{pollUrl:"/parse-log/count",getLatestTimestamp:M,onRefresh:A,label:"解析日志"})]}),listPanel:y?(0,r.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,r.jsx)("button",{type:"button",onClick:A,className:"text-blue-500 hover:underline",children:"重试"})]}):(0,r.jsx)(i.L,{items:O,selectedId:d,onSelect:e=>T({id:e}),loading:S,emptyText:"暂无解析日志"}),detailPanel:U})}function y(){return(0,r.jsx)(n.Suspense,{fallback:(0,r.jsx)("div",{className:"p-6 text-gray-500",children:"加载中…"}),children:(0,r.jsx)(v,{})})}},37202:function(e,t,s){"use strict";s.d(t,{f:function(){return a}});var r=s(72835),n=s(60635);function a(e){let{value:t,showStatus:s,statusOptions:a,onChange:l}=e,[c,o]=(0,n.useState)(t);return(0,n.useEffect)(()=>{o(t)},[t.q,t.status,t.from,t.to]),(0,n.useEffect)(()=>{let e=setTimeout(()=>{(c.q!==t.q||c.status!==t.status||c.from!==t.from||c.to!==t.to)&&l(c)},300);return()=>clearTimeout(e)},[c.q,c.status,c.from,c.to]),(0,r.jsxs)("div",{className:"space-y-2 border-b border-gray-200 bg-white p-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative flex-1",children:[(0,r.jsx)("input",{type:"text",value:c.q,onChange:e=>o(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,r.jsx)("button",{type:"button",onClick:()=>l({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:!c.q&&!c.status&&!c.from&&!c.to,children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.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"})})})]}),s?(0,r.jsxs)("select",{value:c.status,onChange:e=>o(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,r.jsx)("option",{value:"",children:"全部状态"}),(a||[]).map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))]}):null]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"date",value:c.from,onChange:e=>o(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,r.jsx)("span",{className:"text-sm text-gray-400",children:"-"}),(0,r.jsx)("input",{type:"date",value:c.to,onChange:e=>o(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"})]})]})}},94518:function(e,t,s){"use strict";s.d(t,{m:function(){return n}});var r=s(72835);function n(e){let{filterBar:t,listPanel:s,detailPanel:n}=e;return(0,r.jsxs)("div",{className:"flex h-full",children:[(0,r.jsxs)("div",{className:"flex w-80 flex-col border-r border-gray-200 bg-white",children:[t,s]}),(0,r.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:n})]})}},63718:function(e,t,s){"use strict";s.d(t,{L:function(){return a}});var r=s(72835),n=s(60635);function a(e){let{items:t,selectedId:s,onSelect:a,loading:l,emptyText:c="暂无数据",onLoadMore:o,loadingMore:i,exhausted:u}=e,d=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!o)return;let e=d.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&o()},{root:e.closest(".overflow-auto"),rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[o]),(0,r.jsxs)("div",{className:"flex-1 overflow-auto",children:[l?(0,r.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:"加载中…"}):0===t.length?(0,r.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:c}):(0,r.jsx)("ul",{className:"divide-y divide-gray-100",children:t.map(e=>(0,r.jsx)("li",{role:"button",tabIndex:0,onClick:()=>a(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&a(e.id)},className:"cursor-pointer px-3 py-2 text-sm transition-colors ".concat(s===e.id?"bg-blue-50":"hover:bg-gray-50"),children:e.content},e.id))}),o&&!l&&t.length>0&&(0,r.jsx)("div",{ref:d,className:"p-3 text-center text-xs text-gray-400",children:i?"加载更多…":u?"没有更多了":""})]})}},19036:function(e,t,s){"use strict";s.d(t,{Y:function(){return l}});var r=s(72835),n=s(60635),a=s(74431);function l(e){let{pollUrl:t,intervalMs:s=5e3,onRefresh:l,getLatestTimestamp:c,label:o="新数据"}=e,[i,u]=(0,n.useState)(0),[d,x]=(0,n.useState)(!1),m=(0,n.useRef)(void 0);return((0,n.useEffect)(()=>{let e=()=>x(document.hidden);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,n.useEffect)(()=>{m.current=c(),u(0)},[c]),(0,n.useEffect)(()=>{if(d)return;let e=async()=>{let e=m.current;if(!e)return;let s=t.includes("?")?"&":"?",r=0;try{var n;let l=await (0,a.aA)("".concat(t).concat(s,"since=").concat(encodeURIComponent(e)));r=null!==(n=l.count)&&void 0!==n?n:0}catch(e){}u(e=>Math.max(e,r))};e();let r=setInterval(e,s);return()=>clearInterval(r)},[t,s,d]),i<=0)?null:(0,r.jsxs)("button",{type:"button",onClick:()=>{u(0),l()},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:["有 ",i," 条",o,",点击刷新"]})}},8448:function(e,t,s){"use strict";function r(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("zh-CN",{hour12:!1}):""}s.d(t,{d3:function(){return r}})},74431:function(e,t,s){"use strict";s.d(t,{Ox:function(){return a},aA:function(){return o}});var r=s(67002),n=s(60529);function a(){return n.env.HUNTER_MATE_SERVER_URL||""}let l=a();class c extends Error{constructor(e,t,s){super(null!=s?s:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function o(e,t){let s;try{s=await fetch("".concat(l).concat(e),{cache:"no-store",...function(e){let t=(0,r.Xc)();if(!t)return e;let s=new Headers(null==e?void 0:e.headers);return s.has("Authorization")||s.set("Authorization","UTOKEN ".concat(t)),{...e,headers:s}}(t)})}catch(t){throw new c(0,e,t instanceof Error?t.message:"网络错误")}if(!s.ok)throw new c(s.status,e,"HTTP ".concat(s.status));try{return await s.json()}catch(t){throw new c(s.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,s){"use strict";s.d(t,{GK:function(){return l},Lc:function(){return c},Xc:function(){return a}});let r=null,n=new Set;function a(){return r}function l(e){e!==r&&(r=e,n.forEach(e=>e()))}function c(e){return n.add(e),()=>{n.delete(e)}}}},function(e){e.O(0,[589,400,935,744],function(){return e(e.s=10793)}),_N_E=e.O()}]);
@@ -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]="5d63cfb4-f90b-4956-9bc8-40c6308e874f",e._sentryDebugIdIdentifier="sentry-dbid-5d63cfb4-f90b-4956-9bc8-40c6308e874f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[370],{71428:function(e,t,s){Promise.resolve().then(s.bind(s,36297))},27473:function(e,t,s){"use strict";var n=s(38321);s.o(n,"useParams")&&s.d(t,{useParams:function(){return n.useParams}}),s.o(n,"usePathname")&&s.d(t,{usePathname:function(){return n.usePathname}}),s.o(n,"useRouter")&&s.d(t,{useRouter:function(){return n.useRouter}}),s.o(n,"useSearchParams")&&s.d(t,{useSearchParams:function(){return n.useSearchParams}}),s.o(n,"useServerInsertedHTML")&&s.d(t,{useServerInsertedHTML:function(){return n.useServerInsertedHTML}})},36297:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return T}});var n=s(72835),r=s(60635),l=s(27473),a=s(74431),i=s(37202),o=s(94518),d=s(8448);function c(e){var t,s,r,l,a;let{sessionId:i,eventCount:o,sourceUrl:c,startedAt:u,lastEventAt:x,summary:m}=e,v=[{label:"rrweb",value:null!==(t=null==m?void 0:m.rrwebCount)&&void 0!==t?t:0},{label:"network",value:null!==(s=null==m?void 0:m.networkCount)&&void 0!==s?s:0},{label:"console",value:null!==(r=null==m?void 0:m.consoleCount)&&void 0!==r?r:0},{label:"简历",value:null!==(l=null==m?void 0:m.resumeCount)&&void 0!==l?l:0},{label:"操作",value:null!==(a=null==m?void 0:m.actionCount)&&void 0!==a?a:0}].filter(e=>e.value>0);return(0,n.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"事件数"}),(0,n.jsx)("div",{className:"text-lg font-semibold",children:o})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"来源页面"}),c?(0,n.jsx)("a",{href:c,target:"_blank",rel:"noreferrer",className:"break-all text-sm text-blue-600 hover:underline",children:c}):(0,n.jsx)("div",{className:"text-sm text-gray-400",children:"-"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"开始时间"}),(0,n.jsx)("div",{className:"text-sm",children:(0,d.d3)(u)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"最近事件"}),(0,n.jsx)("div",{className:"text-sm",children:(0,d.d3)(x)})]})]}),v.length>0?(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2 border-t border-gray-100 pt-3",children:v.map(e=>(0,n.jsxs)("span",{className:"rounded bg-gray-100 px-2 py-1 text-xs text-gray-700",children:[e.label,": ",e.value]},e.label))}):null,(0,n.jsx)("div",{className:"mt-3 border-t border-gray-100 pt-3",children:(0,n.jsx)("div",{className:"font-mono text-xs text-gray-400",children:i})})]})}let u={rrweb:"rrweb",network:"network",console:"console",resume:"简历",action:"操作"},x={rrweb:"bg-purple-100 text-purple-700",network:"bg-blue-100 text-blue-700",console:"bg-yellow-100 text-yellow-700",resume:"bg-green-100 text-green-700",action:"bg-gray-100 text-gray-700"};function m(e){var t,s;let{type:r}=e,l=null!==(t=u[r])&&void 0!==t?t:r,a=null!==(s=x[r])&&void 0!==s?s:"bg-gray-100 text-gray-600";return(0,n.jsx)("span",{className:"inline-flex items-center rounded px-2 py-0.5 text-xs font-medium ".concat(a),children:l})}let v=["rrweb","network","console","resume","action"];function h(e){let{events:t,selectedEventId:s,onSelectEvent:l}=e,[a,i]=(0,r.useState)("all"),o=(0,r.useMemo)(()=>{let e=[...t].sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime());return"all"===a?e:e.filter(e=>e.eventType===a)},[t,a]);return(0,n.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>i("all"),className:"rounded px-2 py-1 text-xs ".concat("all"===a?"bg-gray-800 text-white":"border border-gray-300 text-gray-600 hover:bg-gray-50"),children:"全部"}),v.map(e=>(0,n.jsx)("button",{type:"button",onClick:()=>i(e),className:"rounded px-2 py-1 text-xs ".concat(a===e?"bg-gray-800 text-white":"border border-gray-300 text-gray-600 hover:bg-gray-50"),children:(0,n.jsx)(m,{type:e})},e))]}),(0,n.jsx)("div",{className:"max-h-96 overflow-auto",children:0===o.length?(0,n.jsx)("div",{className:"py-8 text-center text-sm text-gray-400",children:"暂无事件"}):(0,n.jsx)("ul",{className:"space-y-1",children:o.map((e,t)=>{var r;return(0,n.jsxs)("li",{role:l?"button":void 0,tabIndex:l?0:void 0,onClick:()=>null==l?void 0:l(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(null==l||l(e))},className:"flex items-start gap-3 rounded p-2 text-sm ".concat(l?"cursor-pointer hover:bg-gray-50":""," ").concat(s===e.id?"bg-blue-50":""),children:[(0,n.jsx)(m,{type:e.eventType}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"truncate text-gray-900",children:function(e){var t,s,n,r,l,a,i;let{eventType:o,payload:d}=e;switch(o){case"rrweb":return"rrweb ".concat(null!==(t=null==d?void 0:d.type)&&void 0!==t?t:"event");case"network":return"".concat(null!==(s=null==d?void 0:d.method)&&void 0!==s?s:"GET"," ").concat(null!==(n=null==d?void 0:d.url)&&void 0!==n?n:"?");case"console":return"[".concat(null!==(l=null==d?void 0:d.level)&&void 0!==l?l:"log","] ").concat(String(null!==(a=null==d?void 0:null===(r=d.args)||void 0===r?void 0:r[0])&&void 0!==a?a:""));case"resume":return"简历提取事件";case"action":return null!==(i=null==d?void 0:d.action)&&void 0!==i?i:"操作事件";default:return o}}(e)}),(0,n.jsx)("div",{className:"text-xs text-gray-400",children:(0,d.d3)(e.createdAt)})]})]},null!==(r=e.id)&&void 0!==r?r:t)})})})]})}function f(e){let{data:t}=e;return(0,n.jsx)("pre",{className:"max-h-64 overflow-auto rounded bg-gray-50 p-3 text-xs text-gray-700",children:JSON.stringify(t,null,2)})}function g(e){var t;let{event:s}=e,r=s.payload,l=(null==r?void 0:r.type)===2?"全量快照":(null==r?void 0:r.type)===3?"增量":"类型 ".concat(null!==(t=null==r?void 0:r.type)&&void 0!==t?t:"?");return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"text-sm text-gray-500",children:["rrweb ",l," \xb7 ",s.sourceUrl?(0,n.jsx)("a",{href:s.sourceUrl,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:s.sourceUrl}):"来源未知"]}),(0,n.jsx)("div",{className:"rounded border border-purple-100 bg-purple-50 p-3 text-sm text-purple-700",children:"rrweb-player 完整回放将在后续迭代接入,当前可查看下方原始 JSON。"}),(0,n.jsx)(f,{data:s.payload})]})}function b(e){var t,s,r,l;let{event:a}=e,i=a.payload;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"Method"}),(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(t=null==i?void 0:i.method)&&void 0!==t?t:"?"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"Status"}),(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(s=null==i?void 0:i.status)&&void 0!==s?s:"?"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"MIME"}),(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(r=null==i?void 0:i.mimeType)&&void 0!==r?r:"?"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"Size"}),(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(l=null==i?void 0:i.size)&&void 0!==l?l:"?"})]})]}),(null==i?void 0:i.url)?(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"URL"}),(0,n.jsx)("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"break-all text-sm text-blue-600 hover:underline",children:i.url})]}):null,(0,n.jsx)(f,{data:a.payload})]})}function y(e){var t,s,r,l;let{event:a}=e,i=a.payload,o=null!==(r=({error:"text-red-600",warn:"text-yellow-600",info:"text-blue-600",debug:"text-gray-500",log:"text-gray-700"})[null!==(s=null==i?void 0:i.level)&&void 0!==s?s:"log"])&&void 0!==r?r:"text-gray-700";return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"text-sm",children:["Level: ",(0,n.jsx)("span",{className:"font-medium ".concat(o),children:null!==(l=null==i?void 0:i.level)&&void 0!==l?l:"log"})]}),(null==i?void 0:null===(t=i.args)||void 0===t?void 0:t.length)?(0,n.jsx)("div",{className:"space-y-2",children:i.args.map((e,t)=>(0,n.jsx)(f,{data:e},t))}):(0,n.jsx)(f,{data:a.payload})]})}function p(e){var t;let{event:s}=e,r=s.payload;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(t=null==r?void 0:r.title)&&void 0!==t?t:"简历提取事件"}),(null==r?void 0:r.source)?(0,n.jsxs)("div",{className:"text-xs text-gray-500",children:["来源: ",(0,n.jsx)("a",{href:r.source,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:r.source})]}):null,(null==r?void 0:r.fields)?(0,n.jsx)(f,{data:r.fields}):(0,n.jsx)(f,{data:s.payload})]})}function j(e){var t;let{event:s}=e,r=s.payload;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(t=null==r?void 0:r.action)&&void 0!==t?t:"操作事件"}),(0,n.jsx)(f,{data:s.payload})]})}function N(e){let t,{event:s}=e,[l,a]=(0,r.useState)(!1);switch(s.eventType){case"rrweb":t=(0,n.jsx)(g,{event:s});break;case"network":t=(0,n.jsx)(b,{event:s});break;case"console":t=(0,n.jsx)(y,{event:s});break;case"resume":t=(0,n.jsx)(p,{event:s});break;case"action":t=(0,n.jsx)(j,{event:s});break;default:t=(0,n.jsx)(f,{data:s.payload})}return(0,n.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold",children:"事件详情"}),(0,n.jsx)("button",{type:"button",onClick:()=>a(e=>!e),className:"rounded border border-gray-300 px-3 py-1 text-sm hover:bg-gray-50",children:l?"收起原始 JSON":"查看原始 JSON"})]}),t,l?(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(f,{data:s})}):null]})}function w(e){let{sessionId:t}=e,[s,l]=(0,r.useState)("idle"),[i,o]=(0,r.useState)(null),[d,c]=(0,r.useState)("");async function u(){l("loading"),c("");try{let e=await (0,a.aA)("/api/recordings/".concat(encodeURIComponent(t),"/parse"),{method:"POST"});o(e),l("success")}catch(e){l("error"),c(e instanceof Error?e.message:String(e))}}let x=i&&"object"==typeof i&&"entity"in i&&i.entity&&"object"==typeof i.entity&&"id"in i.entity&&"type"in i.entity?"/entity?type=".concat(encodeURIComponent(String(i.entity.type)),"&id=").concat(encodeURIComponent(String(i.entity.id))):null;return(0,n.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold",children:"解析"}),(0,n.jsx)("button",{type:"button",onClick:u,disabled:"loading"===s,className:"rounded bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:"loading"===s?"解析中…":"触发解析"})]}),"success"===s?(0,n.jsxs)("div",{className:"mt-3 rounded border border-green-200 bg-green-50 p-3 text-sm text-green-700",children:[(0,n.jsx)("div",{children:"解析成功 ✅"}),x?(0,n.jsx)("a",{href:x,className:"mt-1 inline-block text-blue-600 hover:underline",children:"查看解析结果 →"}):null]}):null,"error"===s?(0,n.jsxs)("div",{className:"mt-3 rounded border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:[(0,n.jsx)("div",{children:"解析失败"}),d?(0,n.jsx)("div",{className:"mt-1",children:d}):null]}):null]})}function S(e){let{events:t}=e,l=(0,r.useRef)(null),[a,i]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{let e;if(!l.current||0===t.length)return;let n=!1;return async function(){let r=await Promise.all([s.e(131),s.e(671)]).then(s.bind(s,15841));await Promise.all([s.e(608),s.e(166)]).then(s.t.bind(s,20166,23)),!n&&l.current&&(e=new(r.default||r)({target:l.current,props:{events:t}}),i(!0))}(),()=>{var t;n=!0,null==e||null===(t=e.$destroy)||void 0===t||t.call(e),l.current&&(l.current.innerHTML="")}},[t]),0===t.length)?(0,n.jsx)("div",{className:"rounded border border-gray-200 bg-white p-4 shadow-sm text-sm text-gray-500",children:"暂无 rrweb 回放事件"}):(0,n.jsxs)("div",{className:"rounded border border-gray-200 bg-white p-4 shadow-sm",children:[(0,n.jsx)("div",{ref:l,className:"w-full"}),a?null:(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"播放器加载中…"})]})}function k(e){let{data:t}=e,s=(0,l.useSearchParams)().get("eventId"),[a,i]=(0,r.useState)(null),[o,d]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!s||!t.events.length){i(null);return}let e=Number(s),n=t.events.find(t=>t.id===e);i(null!=n?n:null)},[s,t.events]);let u=t.events.filter(e=>"rrweb"===e.eventType).map(e=>e.payload);return(0,n.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,n.jsx)("header",{className:"mb-6",children:(0,n.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"录制会话"})}),(0,n.jsx)(c,{sessionId:t.sessionId,eventCount:t.eventCount,sourceUrl:t.sourceUrl,startedAt:t.startedAt,lastEventAt:t.lastEventAt,summary:t.summary}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(S,{events:u})}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(w,{sessionId:t.sessionId})}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(h,{events:t.events,selectedEventId:null==a?void 0:a.id,onSelectEvent:i})}),a?(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(N,{event:a})}):null,(0,n.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold",children:"原始事件 JSON"}),(0,n.jsx)("button",{type:"button",onClick:()=>d(e=>!e),className:"rounded border border-gray-300 px-3 py-1 text-sm hover:bg-gray-50",children:o?"收起":"展开"})]}),o?(0,n.jsx)("pre",{className:"max-h-96 overflow-auto rounded bg-gray-50 p-3 text-xs text-gray-700",children:JSON.stringify(t.events,null,2)}):(0,n.jsxs)("div",{className:"text-sm text-gray-500",children:["共 ",t.events.length," 条事件,点击展开查看原始 JSON"]})]})]})}var I=s(63718);function C(e){let{session:t}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-mono text-xs text-gray-500",children:t.sessionId}),(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-900",children:[(0,n.jsxs)("span",{children:[t.eventCount," 事件"]}),"number"==typeof t.tabId?(0,n.jsxs)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-600",children:["tab #",t.tabId]}):null]}),t.sourceUrl?(0,n.jsx)("div",{className:"truncate text-xs text-blue-600",children:t.sourceUrl}):null,(0,n.jsx)("div",{className:"text-xs text-gray-400",children:(0,d.d3)(t.lastEventAt)})]})}function E(e){let{sessions:t,selectedId:s,onSelect:r,loading:l}=e,a=t.map(e=>({id:e.sessionId,content:(0,n.jsx)(C,{session:e})}));return(0,n.jsx)(I.L,{items:a,selectedId:s,onSelect:r,loading:l,emptyText:"暂无录制会话"})}function L(e){let t=new URLSearchParams;Object.entries(e).forEach(e=>{let[s,n]=e;n&&t.set(s,n)});let s=t.toString();return s?"?".concat(s):""}function A(){var e,t,s,d;let c=(0,l.useRouter)(),u=(0,l.usePathname)(),x=(0,l.useSearchParams)(),m=x.get("sessionId")||"",v=(0,r.useMemo)(()=>({q:x.get("q")||"",status:"",from:x.get("from")||"",to:x.get("to")||""}),[x]),[h,f]=(0,r.useState)([]),[g,b]=(0,r.useState)(!1),[y,p]=(0,r.useState)(null),[j,N]=(0,r.useState)(!0),[w,S]=(0,r.useState)(!1),[I,C]=(0,r.useState)(!1),A=(0,r.useCallback)(e=>{var t,s;let n=null!==(t=e.filters)&&void 0!==t?t:v,r=L({sessionId:null!==(s=e.sessionId)&&void 0!==s?s:m,q:n.q,from:n.from,to:n.to});c.replace("".concat(u).concat(r))},[v,m,u,c]),T=(0,r.useCallback)(e=>{(null==e?void 0:e.withLoading)&&N(!0);let t=L({q:v.q,from:v.from,to:v.to});(0,a.aA)("/api/recordings?limit=200".concat(t.replace("?","&"))).then(e=>{f(t=>{var s;return function(e,t){let s=new Map(e.map(e=>[e.sessionId,e]));return t.map(e=>{let t=s.get(e.sessionId);return t&&t.eventCount===e.eventCount&&t.lastEventAt===e.lastEventAt&&t.tabId===e.tabId?t:{...e}})}(t,null!==(s=e.sessions)&&void 0!==s?s:[])}),b(!1)}).catch(()=>{b(!0)}).finally(()=>{(null==e?void 0:e.withLoading)&&N(!1)})},[v.q,v.from,v.to]),P=(0,r.useCallback)(e=>{if(!m){p(null),C(!1);return}(null==e?void 0:e.withLoading)&&S(!0),(0,a.aA)("/api/recordings/".concat(encodeURIComponent(m))).then(e=>{p(e),C(!1)}).catch(()=>{p(null),C(!0)}).finally(()=>{(null==e?void 0:e.withLoading)&&S(!1)})},[m]);(0,r.useEffect)(()=>{T({withLoading:!0})},[T]),(0,r.useEffect)(()=>{let e=setInterval(()=>T({withLoading:!1}),1e4);return()=>clearInterval(e)},[T]),(0,r.useEffect)(()=>{P({withLoading:!0})},[P]),(0,r.useEffect)(()=>{let e=setInterval(()=>P({withLoading:!1}),1e4);return()=>clearInterval(e)},[P]);let R=g?(0,n.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,n.jsx)("button",{type:"button",onClick:()=>T({withLoading:!0}),className:"text-blue-500 hover:underline",children:"重试"})]}):(0,n.jsx)(E,{sessions:h,selectedId:m,onSelect:e=>A({sessionId:e}),loading:j}),U=m?w?(0,n.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):I?(0,n.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,n.jsx)("button",{type:"button",onClick:()=>P({withLoading:!0}),className:"text-blue-500 hover:underline",children:"重试"})]}):y?(0,n.jsx)(k,{data:{sessionId:y.sessionId,eventCount:y.eventCount,sourceUrl:null!==(d=null===(e=h.find(e=>e.sessionId===m))||void 0===e?void 0:e.sourceUrl)&&void 0!==d?d:null,startedAt:(null===(t=y.events[0])||void 0===t?void 0:t.createdAt)||"",lastEventAt:(null===(s=y.events[y.events.length-1])||void 0===s?void 0:s.createdAt)||"",events:y.events}}):(0,n.jsx)("div",{className:"flex h-full items-center justify-center text-red-500",children:"未找到该录制会话"}):(0,n.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"请在左侧选择一个录制会话查看详情"});return(0,n.jsx)(o.m,{filterBar:(0,n.jsx)(i.f,{value:v,onChange:e=>A({filters:e})}),listPanel:R,detailPanel:U})}function T(){return(0,n.jsx)(r.Suspense,{fallback:(0,n.jsx)("div",{className:"p-6 text-gray-500",children:"加载中…"}),children:(0,n.jsx)(A,{})})}},37202:function(e,t,s){"use strict";s.d(t,{f:function(){return l}});var n=s(72835),r=s(60635);function l(e){let{value:t,showStatus:s,statusOptions:l,onChange:a}=e,[i,o]=(0,r.useState)(t);return(0,r.useEffect)(()=>{o(t)},[t.q,t.status,t.from,t.to]),(0,r.useEffect)(()=>{let e=setTimeout(()=>{(i.q!==t.q||i.status!==t.status||i.from!==t.from||i.to!==t.to)&&a(i)},300);return()=>clearTimeout(e)},[i.q,i.status,i.from,i.to]),(0,n.jsxs)("div",{className:"space-y-2 border-b border-gray-200 bg-white p-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)("div",{className:"relative flex-1",children:[(0,n.jsx)("input",{type:"text",value:i.q,onChange:e=>o(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,n.jsx)("button",{type:"button",onClick:()=>a({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,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.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"})})})]}),s?(0,n.jsxs)("select",{value:i.status,onChange:e=>o(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,n.jsx)("option",{value:"",children:"全部状态"}),(l||[]).map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]}):null]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{type:"date",value:i.from,onChange:e=>o(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,n.jsx)("span",{className:"text-sm text-gray-400",children:"-"}),(0,n.jsx)("input",{type:"date",value:i.to,onChange:e=>o(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"})]})]})}},94518:function(e,t,s){"use strict";s.d(t,{m:function(){return r}});var n=s(72835);function r(e){let{filterBar:t,listPanel:s,detailPanel:r}=e;return(0,n.jsxs)("div",{className:"flex h-full",children:[(0,n.jsxs)("div",{className:"flex w-80 flex-col border-r border-gray-200 bg-white",children:[t,s]}),(0,n.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:r})]})}},63718:function(e,t,s){"use strict";s.d(t,{L:function(){return l}});var n=s(72835),r=s(60635);function l(e){let{items:t,selectedId:s,onSelect:l,loading:a,emptyText:i="暂无数据",onLoadMore:o,loadingMore:d,exhausted:c}=e,u=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!o)return;let e=u.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&o()},{root:e.closest(".overflow-auto"),rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[o]),(0,n.jsxs)("div",{className:"flex-1 overflow-auto",children:[a?(0,n.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:"加载中…"}):0===t.length?(0,n.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:i}):(0,n.jsx)("ul",{className:"divide-y divide-gray-100",children:t.map(e=>(0,n.jsx)("li",{role:"button",tabIndex:0,onClick:()=>l(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&l(e.id)},className:"cursor-pointer px-3 py-2 text-sm transition-colors ".concat(s===e.id?"bg-blue-50":"hover:bg-gray-50"),children:e.content},e.id))}),o&&!a&&t.length>0&&(0,n.jsx)("div",{ref:u,className:"p-3 text-center text-xs text-gray-400",children:d?"加载更多…":c?"没有更多了":""})]})}},8448:function(e,t,s){"use strict";function n(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("zh-CN",{hour12:!1}):""}s.d(t,{d3:function(){return n}})},74431:function(e,t,s){"use strict";s.d(t,{Ox:function(){return l},aA:function(){return o}});var n=s(67002),r=s(60529);function l(){return r.env.HUNTER_MATE_SERVER_URL||""}let a=l();class i extends Error{constructor(e,t,s){super(null!=s?s:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function o(e,t){let s;try{s=await fetch("".concat(a).concat(e),{cache:"no-store",...function(e){let t=(0,n.Xc)();if(!t)return e;let s=new Headers(null==e?void 0:e.headers);return s.has("Authorization")||s.set("Authorization","UTOKEN ".concat(t)),{...e,headers:s}}(t)})}catch(t){throw new i(0,e,t instanceof Error?t.message:"网络错误")}if(!s.ok)throw new i(s.status,e,"HTTP ".concat(s.status));try{return await s.json()}catch(t){throw new i(s.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,s){"use strict";s.d(t,{GK:function(){return a},Lc:function(){return i},Xc:function(){return l}});let n=null,r=new Set;function l(){return n}function a(e){e!==n&&(n=e,r.forEach(e=>e()))}function i(e){return r.add(e),()=>{r.delete(e)}}}},function(e){e.O(0,[400,935,744],function(){return e(e.s=71428)}),_N_E=e.O()}]);
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]="3da81d10-4e17-46c2-8913-e52b1e07ce22",e._sentryDebugIdIdentifier="sentry-dbid-3da81d10-4e17-46c2-8913-e52b1e07ce22")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[370],{71428:function(e,t,s){Promise.resolve().then(s.bind(s,36297))},27473:function(e,t,s){"use strict";var n=s(38321);s.o(n,"useParams")&&s.d(t,{useParams:function(){return n.useParams}}),s.o(n,"usePathname")&&s.d(t,{usePathname:function(){return n.usePathname}}),s.o(n,"useRouter")&&s.d(t,{useRouter:function(){return n.useRouter}}),s.o(n,"useSearchParams")&&s.d(t,{useSearchParams:function(){return n.useSearchParams}}),s.o(n,"useServerInsertedHTML")&&s.d(t,{useServerInsertedHTML:function(){return n.useServerInsertedHTML}})},36297:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return T}});var n=s(72835),r=s(60635),l=s(27473),a=s(74431),i=s(37202),o=s(94518),d=s(8448);function c(e){var t,s,r,l,a;let{sessionId:i,eventCount:o,sourceUrl:c,startedAt:u,lastEventAt:x,summary:m}=e,v=[{label:"rrweb",value:null!==(t=null==m?void 0:m.rrwebCount)&&void 0!==t?t:0},{label:"network",value:null!==(s=null==m?void 0:m.networkCount)&&void 0!==s?s:0},{label:"console",value:null!==(r=null==m?void 0:m.consoleCount)&&void 0!==r?r:0},{label:"简历",value:null!==(l=null==m?void 0:m.resumeCount)&&void 0!==l?l:0},{label:"操作",value:null!==(a=null==m?void 0:m.actionCount)&&void 0!==a?a:0}].filter(e=>e.value>0);return(0,n.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"事件数"}),(0,n.jsx)("div",{className:"text-lg font-semibold",children:o})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"来源页面"}),c?(0,n.jsx)("a",{href:c,target:"_blank",rel:"noreferrer",className:"break-all text-sm text-blue-600 hover:underline",children:c}):(0,n.jsx)("div",{className:"text-sm text-gray-400",children:"-"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"开始时间"}),(0,n.jsx)("div",{className:"text-sm",children:(0,d.d3)(u)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"最近事件"}),(0,n.jsx)("div",{className:"text-sm",children:(0,d.d3)(x)})]})]}),v.length>0?(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2 border-t border-gray-100 pt-3",children:v.map(e=>(0,n.jsxs)("span",{className:"rounded bg-gray-100 px-2 py-1 text-xs text-gray-700",children:[e.label,": ",e.value]},e.label))}):null,(0,n.jsx)("div",{className:"mt-3 border-t border-gray-100 pt-3",children:(0,n.jsx)("div",{className:"font-mono text-xs text-gray-400",children:i})})]})}let u={rrweb:"rrweb",network:"network",console:"console",resume:"简历",action:"操作"},x={rrweb:"bg-purple-100 text-purple-700",network:"bg-blue-100 text-blue-700",console:"bg-yellow-100 text-yellow-700",resume:"bg-green-100 text-green-700",action:"bg-gray-100 text-gray-700"};function m(e){var t,s;let{type:r}=e,l=null!==(t=u[r])&&void 0!==t?t:r,a=null!==(s=x[r])&&void 0!==s?s:"bg-gray-100 text-gray-600";return(0,n.jsx)("span",{className:"inline-flex items-center rounded px-2 py-0.5 text-xs font-medium ".concat(a),children:l})}let v=["rrweb","network","console","resume","action"];function h(e){let{events:t,selectedEventId:s,onSelectEvent:l}=e,[a,i]=(0,r.useState)("all"),o=(0,r.useMemo)(()=>{let e=[...t].sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime());return"all"===a?e:e.filter(e=>e.eventType===a)},[t,a]);return(0,n.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>i("all"),className:"rounded px-2 py-1 text-xs ".concat("all"===a?"bg-gray-800 text-white":"border border-gray-300 text-gray-600 hover:bg-gray-50"),children:"全部"}),v.map(e=>(0,n.jsx)("button",{type:"button",onClick:()=>i(e),className:"rounded px-2 py-1 text-xs ".concat(a===e?"bg-gray-800 text-white":"border border-gray-300 text-gray-600 hover:bg-gray-50"),children:(0,n.jsx)(m,{type:e})},e))]}),(0,n.jsx)("div",{className:"max-h-96 overflow-auto",children:0===o.length?(0,n.jsx)("div",{className:"py-8 text-center text-sm text-gray-400",children:"暂无事件"}):(0,n.jsx)("ul",{className:"space-y-1",children:o.map((e,t)=>{var r;return(0,n.jsxs)("li",{role:l?"button":void 0,tabIndex:l?0:void 0,onClick:()=>null==l?void 0:l(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(null==l||l(e))},className:"flex items-start gap-3 rounded p-2 text-sm ".concat(l?"cursor-pointer hover:bg-gray-50":""," ").concat(s===e.id?"bg-blue-50":""),children:[(0,n.jsx)(m,{type:e.eventType}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"truncate text-gray-900",children:function(e){var t,s,n,r,l,a,i;let{eventType:o,payload:d}=e;switch(o){case"rrweb":return"rrweb ".concat(null!==(t=null==d?void 0:d.type)&&void 0!==t?t:"event");case"network":return"".concat(null!==(s=null==d?void 0:d.method)&&void 0!==s?s:"GET"," ").concat(null!==(n=null==d?void 0:d.url)&&void 0!==n?n:"?");case"console":return"[".concat(null!==(l=null==d?void 0:d.level)&&void 0!==l?l:"log","] ").concat(String(null!==(a=null==d?void 0:null===(r=d.args)||void 0===r?void 0:r[0])&&void 0!==a?a:""));case"resume":return"简历提取事件";case"action":return null!==(i=null==d?void 0:d.action)&&void 0!==i?i:"操作事件";default:return o}}(e)}),(0,n.jsx)("div",{className:"text-xs text-gray-400",children:(0,d.d3)(e.createdAt)})]})]},null!==(r=e.id)&&void 0!==r?r:t)})})})]})}function g(e){let{data:t}=e;return(0,n.jsx)("pre",{className:"max-h-64 overflow-auto rounded bg-gray-50 p-3 text-xs text-gray-700",children:JSON.stringify(t,null,2)})}function f(e){var t;let{event:s}=e,r=s.payload,l=(null==r?void 0:r.type)===2?"全量快照":(null==r?void 0:r.type)===3?"增量":"类型 ".concat(null!==(t=null==r?void 0:r.type)&&void 0!==t?t:"?");return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"text-sm text-gray-500",children:["rrweb ",l," \xb7 ",s.sourceUrl?(0,n.jsx)("a",{href:s.sourceUrl,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:s.sourceUrl}):"来源未知"]}),(0,n.jsx)("div",{className:"rounded border border-purple-100 bg-purple-50 p-3 text-sm text-purple-700",children:"rrweb-player 完整回放将在后续迭代接入,当前可查看下方原始 JSON。"}),(0,n.jsx)(g,{data:s.payload})]})}function b(e){var t,s,r,l;let{event:a}=e,i=a.payload;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"Method"}),(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(t=null==i?void 0:i.method)&&void 0!==t?t:"?"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"Status"}),(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(s=null==i?void 0:i.status)&&void 0!==s?s:"?"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"MIME"}),(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(r=null==i?void 0:i.mimeType)&&void 0!==r?r:"?"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"Size"}),(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(l=null==i?void 0:i.size)&&void 0!==l?l:"?"})]})]}),(null==i?void 0:i.url)?(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"URL"}),(0,n.jsx)("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"break-all text-sm text-blue-600 hover:underline",children:i.url})]}):null,(0,n.jsx)(g,{data:a.payload})]})}function y(e){var t,s,r,l;let{event:a}=e,i=a.payload,o=null!==(r=({error:"text-red-600",warn:"text-yellow-600",info:"text-blue-600",debug:"text-gray-500",log:"text-gray-700"})[null!==(s=null==i?void 0:i.level)&&void 0!==s?s:"log"])&&void 0!==r?r:"text-gray-700";return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"text-sm",children:["Level: ",(0,n.jsx)("span",{className:"font-medium ".concat(o),children:null!==(l=null==i?void 0:i.level)&&void 0!==l?l:"log"})]}),(null==i?void 0:null===(t=i.args)||void 0===t?void 0:t.length)?(0,n.jsx)("div",{className:"space-y-2",children:i.args.map((e,t)=>(0,n.jsx)(g,{data:e},t))}):(0,n.jsx)(g,{data:a.payload})]})}function p(e){var t;let{event:s}=e,r=s.payload;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(t=null==r?void 0:r.title)&&void 0!==t?t:"简历提取事件"}),(null==r?void 0:r.source)?(0,n.jsxs)("div",{className:"text-xs text-gray-500",children:["来源: ",(0,n.jsx)("a",{href:r.source,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:r.source})]}):null,(null==r?void 0:r.fields)?(0,n.jsx)(g,{data:r.fields}):(0,n.jsx)(g,{data:s.payload})]})}function j(e){var t;let{event:s}=e,r=s.payload;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:null!==(t=null==r?void 0:r.action)&&void 0!==t?t:"操作事件"}),(0,n.jsx)(g,{data:s.payload})]})}function N(e){let t,{event:s}=e,[l,a]=(0,r.useState)(!1);switch(s.eventType){case"rrweb":t=(0,n.jsx)(f,{event:s});break;case"network":t=(0,n.jsx)(b,{event:s});break;case"console":t=(0,n.jsx)(y,{event:s});break;case"resume":t=(0,n.jsx)(p,{event:s});break;case"action":t=(0,n.jsx)(j,{event:s});break;default:t=(0,n.jsx)(g,{data:s.payload})}return(0,n.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold",children:"事件详情"}),(0,n.jsx)("button",{type:"button",onClick:()=>a(e=>!e),className:"rounded border border-gray-300 px-3 py-1 text-sm hover:bg-gray-50",children:l?"收起原始 JSON":"查看原始 JSON"})]}),t,l?(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(g,{data:s})}):null]})}function w(e){let{sessionId:t}=e,[s,l]=(0,r.useState)("idle"),[i,o]=(0,r.useState)(null),[d,c]=(0,r.useState)("");async function u(){l("loading"),c("");try{let e=await (0,a.aA)("/api/recordings/".concat(encodeURIComponent(t),"/parse"),{method:"POST"});o(e),l("success")}catch(e){l("error"),c(e instanceof Error?e.message:String(e))}}let x=i&&"object"==typeof i&&"entity"in i&&i.entity&&"object"==typeof i.entity&&"id"in i.entity&&"type"in i.entity?"/entity?type=".concat(encodeURIComponent(String(i.entity.type)),"&id=").concat(encodeURIComponent(String(i.entity.id))):null;return(0,n.jsxs)("section",{className:"rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold",children:"解析"}),(0,n.jsx)("button",{type:"button",onClick:u,disabled:"loading"===s,className:"rounded bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:"loading"===s?"解析中…":"触发解析"})]}),"success"===s?(0,n.jsxs)("div",{className:"mt-3 rounded border border-green-200 bg-green-50 p-3 text-sm text-green-700",children:[(0,n.jsx)("div",{children:"解析成功 ✅"}),x?(0,n.jsx)("a",{href:x,className:"mt-1 inline-block text-blue-600 hover:underline",children:"查看解析结果 →"}):null]}):null,"error"===s?(0,n.jsxs)("div",{className:"mt-3 rounded border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:[(0,n.jsx)("div",{children:"解析失败"}),d?(0,n.jsx)("div",{className:"mt-1",children:d}):null]}):null]})}function S(e){let{events:t}=e,l=(0,r.useRef)(null),[a,i]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{let e;if(!l.current||0===t.length)return;let n=!1;return async function(){let r=await Promise.all([s.e(131),s.e(671)]).then(s.bind(s,15841));await Promise.all([s.e(608),s.e(166)]).then(s.t.bind(s,20166,23)),!n&&l.current&&(e=new(r.default||r)({target:l.current,props:{events:t}}),i(!0))}(),()=>{var t;n=!0,null==e||null===(t=e.$destroy)||void 0===t||t.call(e),l.current&&(l.current.innerHTML="")}},[t]),0===t.length)?(0,n.jsx)("div",{className:"rounded border border-gray-200 bg-white p-4 shadow-sm text-sm text-gray-500",children:"暂无 rrweb 回放事件"}):(0,n.jsxs)("div",{className:"rounded border border-gray-200 bg-white p-4 shadow-sm",children:[(0,n.jsx)("div",{ref:l,className:"w-full"}),a?null:(0,n.jsx)("div",{className:"text-sm text-gray-500",children:"播放器加载中…"})]})}function k(e){let{data:t}=e,s=(0,l.useSearchParams)().get("eventId"),[a,i]=(0,r.useState)(null),[o,d]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!s||!t.events.length){i(null);return}let e=Number(s),n=t.events.find(t=>t.id===e);i(null!=n?n:null)},[s,t.events]);let u=t.events.filter(e=>"rrweb"===e.eventType).map(e=>e.payload);return(0,n.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,n.jsx)("header",{className:"mb-6",children:(0,n.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"录制会话"})}),(0,n.jsx)(c,{sessionId:t.sessionId,eventCount:t.eventCount,sourceUrl:t.sourceUrl,startedAt:t.startedAt,lastEventAt:t.lastEventAt,summary:t.summary}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(S,{events:u})}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(w,{sessionId:t.sessionId})}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(h,{events:t.events,selectedEventId:null==a?void 0:a.id,onSelectEvent:i})}),a?(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(N,{event:a})}):null,(0,n.jsxs)("section",{className:"mt-4 rounded-lg border border-gray-200 bg-white p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold",children:"原始事件 JSON"}),(0,n.jsx)("button",{type:"button",onClick:()=>d(e=>!e),className:"rounded border border-gray-300 px-3 py-1 text-sm hover:bg-gray-50",children:o?"收起":"展开"})]}),o?(0,n.jsx)("pre",{className:"max-h-96 overflow-auto rounded bg-gray-50 p-3 text-xs text-gray-700",children:JSON.stringify(t.events,null,2)}):(0,n.jsxs)("div",{className:"text-sm text-gray-500",children:["共 ",t.events.length," 条事件,点击展开查看原始 JSON"]})]})]})}var I=s(63718);function C(e){let{session:t}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-mono text-xs text-gray-500",children:t.sessionId}),(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-900",children:[(0,n.jsxs)("span",{children:[t.eventCount," 事件"]}),"number"==typeof t.tabId?(0,n.jsxs)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-600",children:["tab #",t.tabId]}):null]}),t.sourceUrl?(0,n.jsx)("div",{className:"truncate text-xs text-blue-600",children:t.sourceUrl}):null,(0,n.jsx)("div",{className:"text-xs text-gray-400",children:(0,d.d3)(t.lastEventAt)})]})}function E(e){let{sessions:t,selectedId:s,onSelect:r,loading:l}=e,a=t.map(e=>({id:e.sessionId,content:(0,n.jsx)(C,{session:e})}));return(0,n.jsx)(I.L,{items:a,selectedId:s,onSelect:r,loading:l,emptyText:"暂无录制会话"})}function L(e){let t=new URLSearchParams;Object.entries(e).forEach(e=>{let[s,n]=e;n&&t.set(s,n)});let s=t.toString();return s?"?".concat(s):""}function A(){var e,t,s,d;let c=(0,l.useRouter)(),u=(0,l.usePathname)(),x=(0,l.useSearchParams)(),m=x.get("sessionId")||"",v=(0,r.useMemo)(()=>({q:x.get("q")||"",status:"",from:x.get("from")||"",to:x.get("to")||""}),[x]),[h,g]=(0,r.useState)([]),[f,b]=(0,r.useState)(!1),[y,p]=(0,r.useState)(null),[j,N]=(0,r.useState)(!0),[w,S]=(0,r.useState)(!1),[I,C]=(0,r.useState)(!1),A=(0,r.useCallback)(e=>{var t,s;let n=null!==(t=e.filters)&&void 0!==t?t:v,r=L({sessionId:null!==(s=e.sessionId)&&void 0!==s?s:m,q:n.q,from:n.from,to:n.to});c.replace("".concat(u).concat(r))},[v,m,u,c]),T=(0,r.useCallback)(e=>{(null==e?void 0:e.withLoading)&&N(!0);let t=L({q:v.q,from:v.from,to:v.to});(0,a.aA)("/api/recordings?limit=200".concat(t.replace("?","&"))).then(e=>{g(t=>{var s;return function(e,t){let s=new Map(e.map(e=>[e.sessionId,e]));return t.map(e=>{let t=s.get(e.sessionId);return t&&t.eventCount===e.eventCount&&t.lastEventAt===e.lastEventAt&&t.tabId===e.tabId?t:{...e}})}(t,null!==(s=e.sessions)&&void 0!==s?s:[])}),b(!1)}).catch(()=>{b(!0)}).finally(()=>{(null==e?void 0:e.withLoading)&&N(!1)})},[v.q,v.from,v.to]),P=(0,r.useCallback)(e=>{if(!m){p(null),C(!1);return}(null==e?void 0:e.withLoading)&&S(!0),(0,a.aA)("/api/recordings/".concat(encodeURIComponent(m))).then(e=>{p(e),C(!1)}).catch(()=>{p(null),C(!0)}).finally(()=>{(null==e?void 0:e.withLoading)&&S(!1)})},[m]);(0,r.useEffect)(()=>{T({withLoading:!0})},[T]),(0,r.useEffect)(()=>{let e=setInterval(()=>T({withLoading:!1}),1e4);return()=>clearInterval(e)},[T]),(0,r.useEffect)(()=>{P({withLoading:!0})},[P]),(0,r.useEffect)(()=>{let e=setInterval(()=>P({withLoading:!1}),1e4);return()=>clearInterval(e)},[P]);let R=f?(0,n.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,n.jsx)("button",{type:"button",onClick:()=>T({withLoading:!0}),className:"text-blue-500 hover:underline",children:"重试"})]}):(0,n.jsx)(E,{sessions:h,selectedId:m,onSelect:e=>A({sessionId:e}),loading:j}),U=m?w?(0,n.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"加载中…"}):I?(0,n.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-red-500",children:["加载失败",(0,n.jsx)("button",{type:"button",onClick:()=>P({withLoading:!0}),className:"text-blue-500 hover:underline",children:"重试"})]}):y?(0,n.jsx)(k,{data:{sessionId:y.sessionId,eventCount:y.eventCount,sourceUrl:null!==(d=null===(e=h.find(e=>e.sessionId===m))||void 0===e?void 0:e.sourceUrl)&&void 0!==d?d:null,startedAt:(null===(t=y.events[0])||void 0===t?void 0:t.createdAt)||"",lastEventAt:(null===(s=y.events[y.events.length-1])||void 0===s?void 0:s.createdAt)||"",events:y.events}}):(0,n.jsx)("div",{className:"flex h-full items-center justify-center text-red-500",children:"未找到该录制会话"}):(0,n.jsx)("div",{className:"flex h-full items-center justify-center text-gray-400",children:"请在左侧选择一个录制会话查看详情"});return(0,n.jsx)(o.m,{filterBar:(0,n.jsx)(i.f,{value:v,onChange:e=>A({filters:e})}),listPanel:R,detailPanel:U})}function T(){return(0,n.jsx)(r.Suspense,{fallback:(0,n.jsx)("div",{className:"p-6 text-gray-500",children:"加载中…"}),children:(0,n.jsx)(A,{})})}},37202:function(e,t,s){"use strict";s.d(t,{f:function(){return l}});var n=s(72835),r=s(60635);function l(e){let{value:t,showStatus:s,statusOptions:l,onChange:a}=e,[i,o]=(0,r.useState)(t);return(0,r.useEffect)(()=>{o(t)},[t.q,t.status,t.from,t.to]),(0,r.useEffect)(()=>{let e=setTimeout(()=>{(i.q!==t.q||i.status!==t.status||i.from!==t.from||i.to!==t.to)&&a(i)},300);return()=>clearTimeout(e)},[i.q,i.status,i.from,i.to]),(0,n.jsxs)("div",{className:"space-y-2 border-b border-gray-200 bg-white p-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)("div",{className:"relative flex-1",children:[(0,n.jsx)("input",{type:"text",value:i.q,onChange:e=>o(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,n.jsx)("button",{type:"button",onClick:()=>a({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,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.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"})})})]}),s?(0,n.jsxs)("select",{value:i.status,onChange:e=>o(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,n.jsx)("option",{value:"",children:"全部状态"}),(l||[]).map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]}):null]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{type:"date",value:i.from,onChange:e=>o(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,n.jsx)("span",{className:"text-sm text-gray-400",children:"-"}),(0,n.jsx)("input",{type:"date",value:i.to,onChange:e=>o(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"})]})]})}},94518:function(e,t,s){"use strict";s.d(t,{m:function(){return r}});var n=s(72835);function r(e){let{filterBar:t,listPanel:s,detailPanel:r}=e;return(0,n.jsxs)("div",{className:"flex h-full",children:[(0,n.jsxs)("div",{className:"flex w-80 flex-col border-r border-gray-200 bg-white",children:[t,s]}),(0,n.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:r})]})}},63718:function(e,t,s){"use strict";s.d(t,{L:function(){return l}});var n=s(72835),r=s(60635);function l(e){let{items:t,selectedId:s,onSelect:l,loading:a,emptyText:i="暂无数据",onLoadMore:o,loadingMore:d,exhausted:c}=e,u=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!o)return;let e=u.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&o()},{root:e.closest(".overflow-auto"),rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[o]),(0,n.jsxs)("div",{className:"flex-1 overflow-auto",children:[a?(0,n.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:"加载中…"}):0===t.length?(0,n.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:i}):(0,n.jsx)("ul",{className:"divide-y divide-gray-100",children:t.map(e=>(0,n.jsx)("li",{role:"button",tabIndex:0,onClick:()=>l(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&l(e.id)},className:"cursor-pointer px-3 py-2 text-sm transition-colors ".concat(s===e.id?"bg-blue-50":"hover:bg-gray-50"),children:e.content},e.id))}),o&&!a&&t.length>0&&(0,n.jsx)("div",{ref:u,className:"p-3 text-center text-xs text-gray-400",children:d?"加载更多…":c?"没有更多了":""})]})}},8448:function(e,t,s){"use strict";function n(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("zh-CN",{hour12:!1}):""}s.d(t,{d3:function(){return n}})},74431:function(e,t,s){"use strict";s.d(t,{Ox:function(){return l},aA:function(){return o}});var n=s(67002),r=s(60529);function l(){return r.env.HUNTER_MATE_SERVER_URL||""}let a=l();class i extends Error{constructor(e,t,s){super(null!=s?s:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function o(e,t){let s;try{s=await fetch("".concat(a).concat(e),{cache:"no-store",...function(e){let t=(0,n.Xc)();if(!t)return e;let s=new Headers(null==e?void 0:e.headers);return s.has("Authorization")||s.set("Authorization","UTOKEN ".concat(t)),{...e,headers:s}}(t)})}catch(t){throw new i(0,e,t instanceof Error?t.message:"网络错误")}if(!s.ok)throw new i(s.status,e,"HTTP ".concat(s.status));try{return await s.json()}catch(t){throw new i(s.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,s){"use strict";s.d(t,{GK:function(){return a},Lc:function(){return i},Xc:function(){return l}});let n=null,r=new Set;function l(){return n}function a(e){e!==n&&(n=e,r.forEach(e=>e()))}function i(e){return r.add(e),()=>{r.delete(e)}}}},function(e){e.O(0,[400,935,744],function(){return e(e.s=71428)}),_N_E=e.O()}]);
@@ -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]="f01d8687-a3d8-4288-9840-2a0bc4165e88",e._sentryDebugIdIdentifier="sentry-dbid-f01d8687-a3d8-4288-9840-2a0bc4165e88")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[514],{19155:function(e,t,s){Promise.resolve().then(s.bind(s,80611))},80611:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return T}});var r=s(72835),a=s(60635),n=s(74431),l=s(51140),c=s(96049),i=s(85018),o=s(5200),d=s(85673),u=s(86583),h=s(74800),m=s(16308),x=s(8425),p=s(95090);let y=["#2563eb","#16a34a","#f59e0b","#dc2626","#7c3aed","#0891b2"],f={hm:"hunter-mate",hmh:"harness 工具链",extra:"其他"},g={hm:"#2563eb",hmh:"#16a34a",extra:"#94a3b8"};function j(e){if(!Number.isFinite(e)||e<0)return"-";let t=["B","KB","MB","GB","TB"],s=e,r=0;for(;s>=1024&&r<t.length-1;)s/=1024,r++;return"".concat(s>=100||0===r?Math.round(s):s.toFixed(1)," ").concat(t[r])}function b(e){let t=new Date(e);return"".concat(String(t.getMonth()+1).padStart(2,"0"),"-").concat(String(t.getDate()).padStart(2,"0")," ").concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"))}function v(e){let t=new Date(e);return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"))}function N(e){return e.group?e.group:e.key.startsWith("hunter-mate-h")?"hmh":e.key.startsWith("hunter-mate-")?"hm":"extra"}function w(e){return e.group?e.group:/hunter-mate-harness|chromepilot|hmx/i.test(e.cmd)||/hmx|chromepilot/i.test(e.name)?"hmh":"hm"}function S(e){let{title:t,children:s}=e;return(0,r.jsxs)("section",{className:"rounded-xl border border-gray-200 bg-white p-4",children:[(0,r.jsx)("h3",{className:"mb-3 text-sm font-medium text-gray-700",children:t}),s]})}let k=(0,a.memo)(function(e){let{items:t}=e,s=Array.from(new Set(t.flatMap(e=>e.paths.map(e=>e.key)))),a=t.map(e=>{let t={ts:b(e.ts)};for(let s of e.paths)t[s.key]=Number((s.totalBytes/1073741824).toFixed(3));return t});return(0,r.jsx)(S,{title:"磁盘占用趋势(按受监控路径,GB)",children:(0,r.jsx)(l.h,{width:"100%",height:260,children:(0,r.jsxs)(c.T,{data:a,margin:{top:4,right:12,bottom:0,left:0},children:[(0,r.jsx)(i.q,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),(0,r.jsx)(o.K,{dataKey:"ts",tick:{fontSize:11},minTickGap:40}),(0,r.jsx)(d.B,{tick:{fontSize:11},width:56}),(0,r.jsx)(u.u,{formatter:e=>["".concat(e," GB"),void 0]}),(0,r.jsx)(h.D,{}),s.map((e,t)=>(0,r.jsx)(m.uN,{type:"monotone",dataKey:e,stroke:y[t%y.length],fill:y[t%y.length],fillOpacity:.15,name:e,connectNulls:!0},e))]})})})}),B=(0,a.memo)(function(e){let{p:t,diskTotalBytes:s}=e,a=N(t),n=s>0?(t.totalBytes/s*100).toFixed(1):null;return(0,r.jsx)(S,{title:"路径构成:".concat(t.key,"(").concat(f[a],")(").concat(t.path,")— 共 ").concat(j(t.totalBytes)).concat(null!==n?" \xb7 占总磁盘 ".concat(n,"%"):""),children:(0,r.jsx)(l.h,{width:"100%",height:Math.max(120,26*t.topEntries.length+40),children:(0,r.jsxs)(x.v,{data:t.topEntries,layout:"vertical",margin:{top:0,right:16,bottom:0,left:8},children:[(0,r.jsx)(i.q,{strokeDasharray:"3 3",stroke:"#e5e7eb",horizontal:!1}),(0,r.jsx)(o.K,{type:"number",tick:{fontSize:11},tickFormatter:e=>j(e)}),(0,r.jsx)(d.B,{type:"category",dataKey:"name",tick:{fontSize:11},width:180}),(0,r.jsx)(u.u,{formatter:e=>j(Number(e))}),(0,r.jsx)(p.$Q,{dataKey:"bytes",name:"占用",fill:g[a],radius:[0,3,3,0]})]})})})}),M=(0,a.memo)(function(e){var t,s,a;let{items:n}=e,l=n[n.length-1];if(!l)return null;let c=new Map;for(let e of l.paths.filter(e=>e.exists)){let t=N(e);c.set(t,(null!==(s=c.get(t))&&void 0!==s?s:0)+e.totalBytes)}let i=Array.from(c.entries()).sort((e,t)=>t[1]-e[1]),o=null!==(a=null===(t=l.totals)||void 0===t?void 0:t.diskTotalBytes)&&void 0!==a?a:0;return(0,r.jsx)(S,{title:"磁盘分组概览(hm / harness 工具链,占总磁盘比例)",children:(0,r.jsxs)("table",{className:"w-full text-xs text-gray-600",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-gray-100 text-left",children:[(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"分组"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"占用"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"占总磁盘"}),(0,r.jsx)("th",{className:"py-1 font-medium",children:"占比条"})]})}),(0,r.jsxs)("tbody",{children:[i.map(e=>{let[t,s]=e,a=o>0?s/o*100:null;return(0,r.jsxs)("tr",{className:"border-b border-gray-50",children:[(0,r.jsx)("td",{className:"py-1 pr-4",children:f[t]}),(0,r.jsx)("td",{className:"py-1 pr-4",children:j(s)}),(0,r.jsx)("td",{className:"py-1 pr-4",children:null===a?"-":"".concat(a.toFixed(1),"%")}),(0,r.jsx)("td",{className:"py-1",children:null!==a&&(0,r.jsx)("div",{className:"h-2 w-full min-w-[120px] rounded bg-gray-100",children:(0,r.jsx)("div",{className:"h-2 rounded",style:{width:"".concat(Math.min(100,a),"%"),background:g[t]}})})})]},t)}),!i.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:4,className:"py-2 text-gray-400",children:"本帧无路径数据"})})]})]})})}),A=(0,a.memo)(function(e){let{items:t,liveSamples:s}=e,a=s.length>0,n=a?s[s.length-1]:null,x=t[t.length-1],p=a?s.map(e=>{var t,s,r,a;if(e.groups)return{ts:v(e.ts),rssMBHm:Number((e.groups.hm.rssBytes/1048576).toFixed(1)),rssMBHmh:Number((e.groups.hmh.rssBytes/1048576).toFixed(1)),cpuHm:Number((null!==(t=e.groups.hm.cpuPercent)&&void 0!==t?t:0).toFixed(1)),cpuHmh:Number((null!==(s=e.groups.hmh.cpuPercent)&&void 0!==s?s:0).toFixed(1))};let n=0,l=0,c=0,i=0;for(let t of e.processes)"hmh"===w(t)?(l+=t.rssBytes,i+=null!==(r=t.cpuPercent)&&void 0!==r?r:0):(n+=t.rssBytes,c+=null!==(a=t.cpuPercent)&&void 0!==a?a:0);return{ts:v(e.ts),rssMBHm:Number((n/1048576).toFixed(1)),rssMBHmh:Number((l/1048576).toFixed(1)),cpuHm:Number(c.toFixed(1)),cpuHmh:Number(i.toFixed(1))}}):t.map(e=>{let t=0,s=0,r=0,a=0;for(let n of e.processes)"hmh"===w(n)?(s+=n.rssBytes,a+=n.cpuPercent):(t+=n.rssBytes,r+=n.cpuPercent);return{ts:b(e.ts),rssMBHm:Number((t/1048576).toFixed(1)),rssMBHmh:Number((s/1048576).toFixed(1)),cpuHm:Number(r.toFixed(1)),cpuHmh:Number(a.toFixed(1))}}),y=n?n.processes:x.processes;return(0,r.jsxs)(S,{title:a?"相关进程占用趋势(准实时 5s \xb7 按 hm / 工具链分开 \xb7 内存 MB / CPU %)":"相关进程占用趋势(按 hm / harness 工具链分开 \xb7 内存 MB / CPU %)",children:[(0,r.jsx)(l.h,{width:"100%",height:240,children:(0,r.jsxs)(c.T,{data:p,margin:{top:4,right:12,bottom:0,left:0},children:[(0,r.jsx)(i.q,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),(0,r.jsx)(o.K,{dataKey:"ts",tick:{fontSize:11},minTickGap:40}),(0,r.jsx)(d.B,{yAxisId:"mb",tick:{fontSize:11},width:52}),(0,r.jsx)(d.B,{yAxisId:"pct",orientation:"right",tick:{fontSize:11},width:44}),(0,r.jsx)(u.u,{}),(0,r.jsx)(h.D,{}),(0,r.jsx)(m.uN,{yAxisId:"mb",type:"monotone",dataKey:"rssMBHm",name:"hm 内存(MB)",stroke:g.hm,fill:g.hm,fillOpacity:.15,isAnimationActive:!1}),(0,r.jsx)(m.uN,{yAxisId:"mb",type:"monotone",dataKey:"rssMBHmh",name:"工具链内存(MB)",stroke:g.hmh,fill:g.hmh,fillOpacity:.15,isAnimationActive:!1}),(0,r.jsx)(m.uN,{yAxisId:"pct",type:"monotone",dataKey:"cpuHm",name:"hm CPU(%)",stroke:"#dc2626",fill:"#dc2626",fillOpacity:.1,isAnimationActive:!1}),(0,r.jsx)(m.uN,{yAxisId:"pct",type:"monotone",dataKey:"cpuHmh",name:"工具链 CPU(%)",stroke:"#f59e0b",fill:"#f59e0b",fillOpacity:.1,isAnimationActive:!1})]})}),(0,r.jsx)("div",{className:"mt-3 overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-xs text-gray-600",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-gray-100 text-left",children:[(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"分组"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"PID"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"进程"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"RSS"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"CPU%"})]})}),(0,r.jsxs)("tbody",{children:[y.map(e=>(0,r.jsxs)("tr",{className:"border-b border-gray-50",children:[(0,r.jsx)("td",{className:"py-1 pr-4",children:"hmh"===w(e)?"工具链":"hm"}),(0,r.jsx)("td",{className:"py-1 pr-4",children:e.pid}),(0,r.jsx)("td",{className:"max-w-[360px] truncate py-1 pr-4",title:e.cmd,children:e.cmd||e.name}),(0,r.jsx)("td",{className:"py-1 pr-4",children:j(e.rssBytes)}),(0,r.jsx)("td",{className:"py-1 pr-4",children:null===e.cpuPercent?"—":"".concat(e.cpuPercent,"%")})]},e.pid)),!y.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:5,className:"py-2 text-gray-400",children:"本帧无匹配进程"})})]})]})})]})});function P(e){var t;let{items:s,liveSamples:a=[]}=e,n=s[s.length-1];if(!n)return null;let l=n.paths.filter(e=>e.exists),c=null!==(t=n.totals)&&void 0!==t?t:null;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("section",{className:"rounded-xl border border-gray-200 bg-white p-4",children:[(0,r.jsx)("h3",{className:"mb-2 text-sm font-medium text-gray-700",children:"系统信息"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-x-6 gap-y-1 text-xs text-gray-600",children:[(0,r.jsxs)("span",{children:["主机:",n.system.hostname]}),(0,r.jsxs)("span",{children:["用户:",n.system.username]}),(0,r.jsxs)("span",{children:["系统:",n.system.platform," ",n.system.osRelease,"(",n.system.arch,")"]}),(0,r.jsxs)("span",{children:["CPU:",n.system.cpuModel," \xd7 ",n.system.cpuCores," 核"]}),(0,r.jsxs)("span",{children:["内存:",j(n.system.totalMemBytes)]}),(0,r.jsxs)("span",{children:["快照:",new Date(n.ts).toLocaleString()]})]}),c&&(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-x-6 gap-y-1 border-t border-gray-100 pt-2 text-xs text-gray-600",children:[(0,r.jsxs)("span",{children:["整机 CPU:",c.cpuPercent,"%"]}),(0,r.jsxs)("span",{children:["整机内存:",j(c.memUsedBytes)," / ",j(c.memTotalBytes),"(",c.memUsedPercent,"%)"]}),(0,r.jsxs)("span",{children:["整机磁盘:",j(c.diskUsedBytes)," / ",j(c.diskTotalBytes),"(",c.diskUsedPercent,"%)"]})]})]}),(0,r.jsx)(M,{items:s}),(0,r.jsx)(k,{items:s}),(0,r.jsx)(A,{items:s,liveSamples:a}),l.map(e=>{var t;return(0,r.jsx)(B,{p:e,diskTotalBytes:null!==(t=null==c?void 0:c.diskTotalBytes)&&void 0!==t?t:0},e.key)})]})}let H=[{value:24,label:"最近 1 天"},{value:72,label:"最近 3 天"},{value:168,label:"最近 7 天"}];function T(){let[e,t]=(0,a.useState)(72),[s,l]=(0,a.useState)([]),[c,i]=(0,a.useState)([]),[o,d]=(0,a.useState)(!1),[u,h]=(0,a.useState)(!0),[m,x]=(0,a.useState)(!1),[p,y]=(0,a.useState)(""),f=(0,a.useRef)(e),g=(0,a.useRef)(null),j=(0,a.useRef)(null);(0,a.useEffect)(()=>{f.current=e},[e]);let b=(0,a.useCallback)(async e=>{h(!0);try{var t;let s=await (0,n.aA)("/resource-usage/history?hours=".concat(e)),r=null!==(t=null==s?void 0:s.items)&&void 0!==t?t:[];l(r);let a=r[r.length-1];a&&(g.current=a.ts)}catch(e){l([]),y("历史快照加载失败,请稍后重试")}finally{h(!1)}},[]);(0,a.useEffect)(()=>{b(e)},[e,b]),(0,a.useEffect)(()=>{let e,t=!1,s=e=>{if(!t){if(!e.sampleIntervalMs||e.sampleIntervalMs<=0){d(!1);return}if(d(!0),e.last&&e.last.ts!==j.current){j.current=e.last.ts;let t=e.last;i(e=>{let s=[...e,t];return s.length>720?s.slice(s.length-720):s})}e.lastFullSnapshotTs&&e.lastFullSnapshotTs!==g.current&&(g.current=e.lastFullSnapshotTs,b(f.current))}};return(async()=>{var r,a,l,c;try{let e=await (0,n.aA)("/resource-usage/samples");if(t)return;if(null==e?void 0:null===(r=e.samples)||void 0===r?void 0:r.length){let t=e.samples.slice(-720);i(t),j.current=null!==(l=null===(a=t[t.length-1])||void 0===a?void 0:a.ts)&&void 0!==l?l:null}}catch(e){}(0,n.aA)("/resource-usage/collect-now",{method:"POST",headers:{"Content-Type":"application/json"}}).catch(()=>{});let o=null;try{o=await (0,n.aA)("/resource-usage/live")}catch(e){}o&&s(o),t||(e=setInterval(()=>{(0,n.aA)("/resource-usage/live").then(s).catch(()=>{})},Math.max(null!==(c=null==o?void 0:o.sampleIntervalMs)&&void 0!==c?c:5e3,2e3)))})(),()=>{t=!0,e&&clearInterval(e)}},[b]);let v=async()=>{x(!0),y("");try{var e;let t=await (0,n.aA)("/resource-usage/collect-now",{method:"POST",headers:{"Content-Type":"application/json"}});y((null===(e=t.report)||void 0===e?void 0:e.reported)?"已采集并上报 ".concat(t.report.reported," 条"):"已采集(本地)"),b(f.current)}catch(e){y("采集失败(查看 server 日志)")}finally{x(!1)}};return(0,r.jsx)("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:(0,r.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-lg font-semibold text-gray-900",children:"资源占用"}),(0,r.jsxs)("p",{className:"text-xs text-gray-500",children:["hunter-mate / hunter-mate-harness 磁盘占用、相关进程内存 CPU 与系统配置(默认保留 3 天)",o&&" \xb7 进程准实时 5s"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("select",{value:e,onChange:e=>t(Number(e.target.value)),className:"rounded-lg border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700",children:H.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsx)("button",{type:"button",onClick:v,disabled:m,className:"rounded-lg bg-blue-600 px-3 py-1.5 text-sm text-white transition-colors hover:bg-blue-700 disabled:opacity-50",children:m?"采集中…":"立即采集"})]})]}),p&&(0,r.jsx)("p",{className:"mb-3 text-xs text-gray-500",children:p}),u?(0,r.jsx)("div",{className:"py-20 text-center text-sm text-gray-400",children:"加载中…"}):0===s.length?(0,r.jsxs)("div",{className:"rounded-xl border border-dashed border-gray-300 bg-white py-20 text-center",children:[(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"窗口内暂无快照"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:"server 每 5 分钟自动采集一帧,也可点「立即采集」"})]}):(0,r.jsx)(P,{items:s,liveSamples:c})]})})}},74431:function(e,t,s){"use strict";s.d(t,{Ox:function(){return n},aA:function(){return i}});var r=s(67002),a=s(60529);function n(){return a.env.HUNTER_MATE_SERVER_URL||""}let l=n();class c extends Error{constructor(e,t,s){super(null!=s?s:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function i(e,t){let s;try{s=await fetch("".concat(l).concat(e),{cache:"no-store",...function(e){let t=(0,r.Xc)();if(!t)return e;let s=new Headers(null==e?void 0:e.headers);return s.has("Authorization")||s.set("Authorization","UTOKEN ".concat(t)),{...e,headers:s}}(t)})}catch(t){throw new c(0,e,t instanceof Error?t.message:"网络错误")}if(!s.ok)throw new c(s.status,e,"HTTP ".concat(s.status));try{return await s.json()}catch(t){throw new c(s.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,s){"use strict";s.d(t,{GK:function(){return l},Lc:function(){return c},Xc:function(){return n}});let r=null,a=new Set;function n(){return r}function l(e){e!==r&&(r=e,a.forEach(e=>e()))}function c(e){return a.add(e),()=>{a.delete(e)}}}},function(e){e.O(0,[865,400,935,744],function(){return e(e.s=19155)}),_N_E=e.O()}]);
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]="a94964b7-1d94-4954-a8b5-b9e31e742668",e._sentryDebugIdIdentifier="sentry-dbid-a94964b7-1d94-4954-a8b5-b9e31e742668")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[514],{19155:function(e,t,s){Promise.resolve().then(s.bind(s,80611))},80611:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return T}});var r=s(72835),a=s(60635),n=s(74431),l=s(51140),c=s(96049),i=s(85018),o=s(5200),d=s(85673),u=s(86583),h=s(74800),m=s(16308),x=s(8425),p=s(95090);let y=["#2563eb","#16a34a","#f59e0b","#dc2626","#7c3aed","#0891b2"],f={hm:"hunter-mate",hmh:"harness 工具链",extra:"其他"},g={hm:"#2563eb",hmh:"#16a34a",extra:"#94a3b8"};function j(e){if(!Number.isFinite(e)||e<0)return"-";let t=["B","KB","MB","GB","TB"],s=e,r=0;for(;s>=1024&&r<t.length-1;)s/=1024,r++;return"".concat(s>=100||0===r?Math.round(s):s.toFixed(1)," ").concat(t[r])}function b(e){let t=new Date(e);return"".concat(String(t.getMonth()+1).padStart(2,"0"),"-").concat(String(t.getDate()).padStart(2,"0")," ").concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"))}function v(e){let t=new Date(e);return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"))}function N(e){return e.group?e.group:e.key.startsWith("hunter-mate-h")?"hmh":e.key.startsWith("hunter-mate-")?"hm":"extra"}function w(e){return e.group?e.group:/hunter-mate-harness|chromepilot|hmx/i.test(e.cmd)||/hmx|chromepilot/i.test(e.name)?"hmh":"hm"}function S(e){let{title:t,children:s}=e;return(0,r.jsxs)("section",{className:"rounded-xl border border-gray-200 bg-white p-4",children:[(0,r.jsx)("h3",{className:"mb-3 text-sm font-medium text-gray-700",children:t}),s]})}let k=(0,a.memo)(function(e){let{items:t}=e,s=Array.from(new Set(t.flatMap(e=>e.paths.map(e=>e.key)))),a=t.map(e=>{let t={ts:b(e.ts)};for(let s of e.paths)t[s.key]=Number((s.totalBytes/1073741824).toFixed(3));return t});return(0,r.jsx)(S,{title:"磁盘占用趋势(按受监控路径,GB)",children:(0,r.jsx)(l.h,{width:"100%",height:260,children:(0,r.jsxs)(c.T,{data:a,margin:{top:4,right:12,bottom:0,left:0},children:[(0,r.jsx)(i.q,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),(0,r.jsx)(o.K,{dataKey:"ts",tick:{fontSize:11},minTickGap:40}),(0,r.jsx)(d.B,{tick:{fontSize:11},width:56}),(0,r.jsx)(u.u,{formatter:e=>["".concat(e," GB"),void 0]}),(0,r.jsx)(h.D,{}),s.map((e,t)=>(0,r.jsx)(m.uN,{type:"monotone",dataKey:e,stroke:y[t%y.length],fill:y[t%y.length],fillOpacity:.15,name:e,connectNulls:!0},e))]})})})}),B=(0,a.memo)(function(e){let{p:t,diskTotalBytes:s}=e,a=N(t),n=s>0?(t.totalBytes/s*100).toFixed(1):null;return(0,r.jsx)(S,{title:"路径构成:".concat(t.key,"(").concat(f[a],")(").concat(t.path,")— 共 ").concat(j(t.totalBytes)).concat(null!==n?" \xb7 占总磁盘 ".concat(n,"%"):""),children:(0,r.jsx)(l.h,{width:"100%",height:Math.max(120,26*t.topEntries.length+40),children:(0,r.jsxs)(x.v,{data:t.topEntries,layout:"vertical",margin:{top:0,right:16,bottom:0,left:8},children:[(0,r.jsx)(i.q,{strokeDasharray:"3 3",stroke:"#e5e7eb",horizontal:!1}),(0,r.jsx)(o.K,{type:"number",tick:{fontSize:11},tickFormatter:e=>j(e)}),(0,r.jsx)(d.B,{type:"category",dataKey:"name",tick:{fontSize:11},width:180}),(0,r.jsx)(u.u,{formatter:e=>j(Number(e))}),(0,r.jsx)(p.$Q,{dataKey:"bytes",name:"占用",fill:g[a],radius:[0,3,3,0]})]})})})}),M=(0,a.memo)(function(e){var t,s,a;let{items:n}=e,l=n[n.length-1];if(!l)return null;let c=new Map;for(let e of l.paths.filter(e=>e.exists)){let t=N(e);c.set(t,(null!==(s=c.get(t))&&void 0!==s?s:0)+e.totalBytes)}let i=Array.from(c.entries()).sort((e,t)=>t[1]-e[1]),o=null!==(a=null===(t=l.totals)||void 0===t?void 0:t.diskTotalBytes)&&void 0!==a?a:0;return(0,r.jsx)(S,{title:"磁盘分组概览(hm / harness 工具链,占总磁盘比例)",children:(0,r.jsxs)("table",{className:"w-full text-xs text-gray-600",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-gray-100 text-left",children:[(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"分组"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"占用"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"占总磁盘"}),(0,r.jsx)("th",{className:"py-1 font-medium",children:"占比条"})]})}),(0,r.jsxs)("tbody",{children:[i.map(e=>{let[t,s]=e,a=o>0?s/o*100:null;return(0,r.jsxs)("tr",{className:"border-b border-gray-50",children:[(0,r.jsx)("td",{className:"py-1 pr-4",children:f[t]}),(0,r.jsx)("td",{className:"py-1 pr-4",children:j(s)}),(0,r.jsx)("td",{className:"py-1 pr-4",children:null===a?"-":"".concat(a.toFixed(1),"%")}),(0,r.jsx)("td",{className:"py-1",children:null!==a&&(0,r.jsx)("div",{className:"h-2 w-full min-w-[120px] rounded bg-gray-100",children:(0,r.jsx)("div",{className:"h-2 rounded",style:{width:"".concat(Math.min(100,a),"%"),background:g[t]}})})})]},t)}),!i.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:4,className:"py-2 text-gray-400",children:"本帧无路径数据"})})]})]})})}),A=(0,a.memo)(function(e){let{items:t,liveSamples:s}=e,a=s.length>0,n=a?s[s.length-1]:null,x=t[t.length-1],p=a?s.map(e=>{var t,s,r,a;if(e.groups)return{ts:v(e.ts),rssMBHm:Number((e.groups.hm.rssBytes/1048576).toFixed(1)),rssMBHmh:Number((e.groups.hmh.rssBytes/1048576).toFixed(1)),cpuHm:Number((null!==(t=e.groups.hm.cpuPercent)&&void 0!==t?t:0).toFixed(1)),cpuHmh:Number((null!==(s=e.groups.hmh.cpuPercent)&&void 0!==s?s:0).toFixed(1))};let n=0,l=0,c=0,i=0;for(let t of e.processes)"hmh"===w(t)?(l+=t.rssBytes,i+=null!==(r=t.cpuPercent)&&void 0!==r?r:0):(n+=t.rssBytes,c+=null!==(a=t.cpuPercent)&&void 0!==a?a:0);return{ts:v(e.ts),rssMBHm:Number((n/1048576).toFixed(1)),rssMBHmh:Number((l/1048576).toFixed(1)),cpuHm:Number(c.toFixed(1)),cpuHmh:Number(i.toFixed(1))}}):t.map(e=>{let t=0,s=0,r=0,a=0;for(let n of e.processes)"hmh"===w(n)?(s+=n.rssBytes,a+=n.cpuPercent):(t+=n.rssBytes,r+=n.cpuPercent);return{ts:b(e.ts),rssMBHm:Number((t/1048576).toFixed(1)),rssMBHmh:Number((s/1048576).toFixed(1)),cpuHm:Number(r.toFixed(1)),cpuHmh:Number(a.toFixed(1))}}),y=n?n.processes:x.processes;return(0,r.jsxs)(S,{title:a?"相关进程占用趋势(准实时 5s \xb7 按 hm / 工具链分开 \xb7 内存 MB / CPU %)":"相关进程占用趋势(按 hm / harness 工具链分开 \xb7 内存 MB / CPU %)",children:[(0,r.jsx)(l.h,{width:"100%",height:240,children:(0,r.jsxs)(c.T,{data:p,margin:{top:4,right:12,bottom:0,left:0},children:[(0,r.jsx)(i.q,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),(0,r.jsx)(o.K,{dataKey:"ts",tick:{fontSize:11},minTickGap:40}),(0,r.jsx)(d.B,{yAxisId:"mb",tick:{fontSize:11},width:52}),(0,r.jsx)(d.B,{yAxisId:"pct",orientation:"right",tick:{fontSize:11},width:44}),(0,r.jsx)(u.u,{}),(0,r.jsx)(h.D,{}),(0,r.jsx)(m.uN,{yAxisId:"mb",type:"monotone",dataKey:"rssMBHm",name:"hm 内存(MB)",stroke:g.hm,fill:g.hm,fillOpacity:.15,isAnimationActive:!1}),(0,r.jsx)(m.uN,{yAxisId:"mb",type:"monotone",dataKey:"rssMBHmh",name:"工具链内存(MB)",stroke:g.hmh,fill:g.hmh,fillOpacity:.15,isAnimationActive:!1}),(0,r.jsx)(m.uN,{yAxisId:"pct",type:"monotone",dataKey:"cpuHm",name:"hm CPU(%)",stroke:"#dc2626",fill:"#dc2626",fillOpacity:.1,isAnimationActive:!1}),(0,r.jsx)(m.uN,{yAxisId:"pct",type:"monotone",dataKey:"cpuHmh",name:"工具链 CPU(%)",stroke:"#f59e0b",fill:"#f59e0b",fillOpacity:.1,isAnimationActive:!1})]})}),(0,r.jsx)("div",{className:"mt-3 overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-xs text-gray-600",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-gray-100 text-left",children:[(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"分组"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"PID"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"进程"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"RSS"}),(0,r.jsx)("th",{className:"py-1 pr-4 font-medium",children:"CPU%"})]})}),(0,r.jsxs)("tbody",{children:[y.map(e=>(0,r.jsxs)("tr",{className:"border-b border-gray-50",children:[(0,r.jsx)("td",{className:"py-1 pr-4",children:"hmh"===w(e)?"工具链":"hm"}),(0,r.jsx)("td",{className:"py-1 pr-4",children:e.pid}),(0,r.jsx)("td",{className:"max-w-[360px] truncate py-1 pr-4",title:e.cmd,children:e.cmd||e.name}),(0,r.jsx)("td",{className:"py-1 pr-4",children:j(e.rssBytes)}),(0,r.jsx)("td",{className:"py-1 pr-4",children:null===e.cpuPercent?"—":"".concat(e.cpuPercent,"%")})]},e.pid)),!y.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:5,className:"py-2 text-gray-400",children:"本帧无匹配进程"})})]})]})})]})});function P(e){var t;let{items:s,liveSamples:a=[]}=e,n=s[s.length-1];if(!n)return null;let l=n.paths.filter(e=>e.exists),c=null!==(t=n.totals)&&void 0!==t?t:null;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("section",{className:"rounded-xl border border-gray-200 bg-white p-4",children:[(0,r.jsx)("h3",{className:"mb-2 text-sm font-medium text-gray-700",children:"系统信息"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-x-6 gap-y-1 text-xs text-gray-600",children:[(0,r.jsxs)("span",{children:["主机:",n.system.hostname]}),(0,r.jsxs)("span",{children:["用户:",n.system.username]}),(0,r.jsxs)("span",{children:["系统:",n.system.platform," ",n.system.osRelease,"(",n.system.arch,")"]}),(0,r.jsxs)("span",{children:["CPU:",n.system.cpuModel," \xd7 ",n.system.cpuCores," 核"]}),(0,r.jsxs)("span",{children:["内存:",j(n.system.totalMemBytes)]}),(0,r.jsxs)("span",{children:["快照:",new Date(n.ts).toLocaleString()]})]}),c&&(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-x-6 gap-y-1 border-t border-gray-100 pt-2 text-xs text-gray-600",children:[(0,r.jsxs)("span",{children:["整机 CPU:",c.cpuPercent,"%"]}),(0,r.jsxs)("span",{children:["整机内存:",j(c.memUsedBytes)," / ",j(c.memTotalBytes),"(",c.memUsedPercent,"%)"]}),(0,r.jsxs)("span",{children:["整机磁盘:",j(c.diskUsedBytes)," / ",j(c.diskTotalBytes),"(",c.diskUsedPercent,"%)"]})]})]}),(0,r.jsx)(M,{items:s}),(0,r.jsx)(k,{items:s}),(0,r.jsx)(A,{items:s,liveSamples:a}),l.map(e=>{var t;return(0,r.jsx)(B,{p:e,diskTotalBytes:null!==(t=null==c?void 0:c.diskTotalBytes)&&void 0!==t?t:0},e.key)})]})}let H=[{value:24,label:"最近 1 天"},{value:72,label:"最近 3 天"},{value:168,label:"最近 7 天"}];function T(){let[e,t]=(0,a.useState)(72),[s,l]=(0,a.useState)([]),[c,i]=(0,a.useState)([]),[o,d]=(0,a.useState)(!1),[u,h]=(0,a.useState)(!0),[m,x]=(0,a.useState)(!1),[p,y]=(0,a.useState)(""),f=(0,a.useRef)(e),g=(0,a.useRef)(null),j=(0,a.useRef)(null);(0,a.useEffect)(()=>{f.current=e},[e]);let b=(0,a.useCallback)(async e=>{h(!0);try{var t;let s=await (0,n.aA)("/resource-usage/history?hours=".concat(e)),r=null!==(t=null==s?void 0:s.items)&&void 0!==t?t:[];l(r);let a=r[r.length-1];a&&(g.current=a.ts)}catch(e){l([]),y("历史快照加载失败,请稍后重试")}finally{h(!1)}},[]);(0,a.useEffect)(()=>{b(e)},[e,b]),(0,a.useEffect)(()=>{let e,t=!1,s=e=>{if(!t){if(!e.sampleIntervalMs||e.sampleIntervalMs<=0){d(!1);return}if(d(!0),e.last&&e.last.ts!==j.current){j.current=e.last.ts;let t=e.last;i(e=>{let s=[...e,t];return s.length>720?s.slice(s.length-720):s})}e.lastFullSnapshotTs&&e.lastFullSnapshotTs!==g.current&&(g.current=e.lastFullSnapshotTs,b(f.current))}};return(async()=>{var r,a,l,c;try{let e=await (0,n.aA)("/resource-usage/samples");if(t)return;if(null==e?void 0:null===(r=e.samples)||void 0===r?void 0:r.length){let t=e.samples.slice(-720);i(t),j.current=null!==(l=null===(a=t[t.length-1])||void 0===a?void 0:a.ts)&&void 0!==l?l:null}}catch(e){}(0,n.aA)("/resource-usage/collect-now",{method:"POST",headers:{"Content-Type":"application/json"}}).catch(()=>{});let o=null;try{o=await (0,n.aA)("/resource-usage/live")}catch(e){}o&&s(o),t||(e=setInterval(()=>{(0,n.aA)("/resource-usage/live").then(s).catch(()=>{})},Math.max(null!==(c=null==o?void 0:o.sampleIntervalMs)&&void 0!==c?c:5e3,2e3)))})(),()=>{t=!0,e&&clearInterval(e)}},[b]);let v=async()=>{x(!0),y("");try{var e;let t=await (0,n.aA)("/resource-usage/collect-now",{method:"POST",headers:{"Content-Type":"application/json"}});y((null===(e=t.report)||void 0===e?void 0:e.reported)?"已采集并上报 ".concat(t.report.reported," 条"):"已采集(本地)"),b(f.current)}catch(e){y("采集失败(查看 server 日志)")}finally{x(!1)}};return(0,r.jsx)("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:(0,r.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-lg font-semibold text-gray-900",children:"资源占用"}),(0,r.jsxs)("p",{className:"text-xs text-gray-500",children:["hunter-mate / hunter-mate-harness 磁盘占用、相关进程内存 CPU 与系统配置(默认保留 3 天)",o&&" \xb7 进程准实时 5s"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("select",{value:e,onChange:e=>t(Number(e.target.value)),className:"rounded-lg border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700",children:H.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsx)("button",{type:"button",onClick:v,disabled:m,className:"rounded-lg bg-blue-600 px-3 py-1.5 text-sm text-white transition-colors hover:bg-blue-700 disabled:opacity-50",children:m?"采集中…":"立即采集"})]})]}),p&&(0,r.jsx)("p",{className:"mb-3 text-xs text-gray-500",children:p}),u?(0,r.jsx)("div",{className:"py-20 text-center text-sm text-gray-400",children:"加载中…"}):0===s.length?(0,r.jsxs)("div",{className:"rounded-xl border border-dashed border-gray-300 bg-white py-20 text-center",children:[(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"窗口内暂无快照"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:"server 每 5 分钟自动采集一帧,也可点「立即采集」"})]}):(0,r.jsx)(P,{items:s,liveSamples:c})]})})}},74431:function(e,t,s){"use strict";s.d(t,{Ox:function(){return n},aA:function(){return i}});var r=s(67002),a=s(60529);function n(){return a.env.HUNTER_MATE_SERVER_URL||""}let l=n();class c extends Error{constructor(e,t,s){super(null!=s?s:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function i(e,t){let s;try{s=await fetch("".concat(l).concat(e),{cache:"no-store",...function(e){let t=(0,r.Xc)();if(!t)return e;let s=new Headers(null==e?void 0:e.headers);return s.has("Authorization")||s.set("Authorization","UTOKEN ".concat(t)),{...e,headers:s}}(t)})}catch(t){throw new c(0,e,t instanceof Error?t.message:"网络错误")}if(!s.ok)throw new c(s.status,e,"HTTP ".concat(s.status));try{return await s.json()}catch(t){throw new c(s.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,s){"use strict";s.d(t,{GK:function(){return l},Lc:function(){return c},Xc:function(){return n}});let r=null,a=new Set;function n(){return r}function l(e){e!==r&&(r=e,a.forEach(e=>e()))}function c(e){return a.add(e),()=>{a.delete(e)}}}},function(e){e.O(0,[865,400,935,744],function(){return e(e.s=19155)}),_N_E=e.O()}]);
@@ -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]="2f3e9703-a870-405f-a9d3-3d1a6fa8ed25",e._sentryDebugIdIdentifier="sentry-dbid-2f3e9703-a870-405f-a9d3-3d1a6fa8ed25")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[245],{41689:function(e,t,n){Promise.resolve().then(n.bind(n,48517))},48517:function(e,t,n){"use strict";n.d(t,{default:function(){return l}});var s=n(72835),r=n(60635),o=n(74431),d=n(67002);let a={not_found:"分享链接不存在、已失效,或你没有访问权限",expired:"分享链接已过期,请让分享者重新生成",revoked:"分享已被分享者撤销",out_of_scope:"你不在本次分享的范围内,请联系分享者"},i={recommended:"已推荐",pending_invite:"待邀请",invited:"已邀请",replied:"已回复",interview_scheduled:"已约面试",offer:"Offer",onboarding:"已入职",rejected:"已拒绝"};function l(){var e;let[t,n]=(0,r.useState)({kind:"loading"}),[i,l]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=window.location.pathname.match(/^\/shared\/([^/]+)/);l((null==e?void 0:e[1])?decodeURIComponent(e[1]):"")},[]),(0,r.useEffect)(()=>{if(i)return e(),(0,d.Lc)(()=>void e());async function e(){let e=(0,d.Xc)();if(!e){n({kind:"need-login"});return}let t=await fetch("".concat((0,o.Ox)(),"/shared/").concat(encodeURIComponent(i),"/data"),{headers:{Authorization:"UTOKEN ".concat(e)},cache:"no-store"});if(401===t.status){n({kind:"need-login"});return}let s=await t.json().catch(()=>({}));if(!t.ok){var r,a,l;n({kind:"error",code:null!==(a=null!==(r=null==s?void 0:s.errorCode)&&void 0!==r?r:null==s?void 0:s.code)&&void 0!==a?a:"not_found",message:null!==(l=null==s?void 0:s.message)&&void 0!==l?l:""});return}n({kind:"ok",data:s})}},[i]),(0,s.jsx)("div",{className:"h-full overflow-auto p-6",children:(0,s.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,s.jsx)("h1",{className:"mb-1 text-lg font-semibold",children:"同事分享的职位推荐"}),"loading"===t.kind?(0,s.jsx)("div",{className:"py-10 text-center text-sm text-gray-400",children:"加载中…"}):null,"need-login"===t.kind?(0,s.jsx)("div",{className:"mt-4 rounded border border-amber-200 bg-amber-50 px-4 py-6 text-center text-sm text-amber-800",children:"请先登录本地 hm(左下角登录),登录后本页会自动加载分享内容。"}):null,"error"===t.kind?(0,s.jsxs)("div",{className:"mt-4 rounded border border-red-200 bg-red-50 px-4 py-6 text-center text-sm text-red-700",children:[null!==(e=a[t.code])&&void 0!==e?e:a.not_found,t.message?(0,s.jsx)("div",{className:"mt-1 text-xs text-red-400",children:t.message}):null]}):null,"ok"===t.kind?(0,s.jsx)(c,{data:t.data}):null]})})}function c(e){var t,n,r,o,d,a,l,c,u;let{data:x}=e,m=null!==(a=x.recommendations)&&void 0!==a?a:[];return(0,s.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-medium",children:null!==(c=null===(t=x.jobCase)||void 0===t?void 0:t.title)&&void 0!==c?c:"职位 #".concat(null!==(l=null===(n=x.jobCase)||void 0===n?void 0:n.id)&&void 0!==l?l:"")}),(0,s.jsxs)("div",{className:"mt-0.5 text-xs text-gray-500",children:["分享者:",(null===(r=x.fromUser)||void 0===r?void 0:r.email)||"#".concat(null===(o=x.fromUser)||void 0===o?void 0:o.hmUserId),x.expiresAt?" \xb7 有效期至 ".concat(new Date(x.expiresAt).toLocaleString()):""]})]}),(0,s.jsx)("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-600",children:null!==(u=null===(d=x.jobCase)||void 0===d?void 0:d.status)&&void 0!==u?u:""})]}),x.note?(0,s.jsx)("div",{className:"mt-2 rounded bg-blue-50 px-3 py-2 text-sm text-blue-800",children:x.note}):null]}),(0,s.jsxs)("div",{className:"text-xs text-gray-500",children:["共 ",m.length," 位推荐人才(只读快照,实时数据以分享者本地为准)"]}),m.map(e=>{var t,n,r,o,d,a,l,c;return(0,s.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:"font-medium",children:null!==(l=null!==(a=null===(t=e.snapshot)||void 0===t?void 0:t.name)&&void 0!==a?a:e.portraitName)&&void 0!==l?l:"推荐 #".concat(e.id.slice(0,8))}),(0,s.jsx)("span",{className:"rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700",children:null!==(c=i[e.stage])&&void 0!==c?c:e.stage})]}),(null===(n=e.snapshot)||void 0===n?void 0:n.headline)?(0,s.jsx)("div",{className:"mt-1 text-xs text-gray-500",children:e.snapshot.headline}):null,"number"==typeof(null===(o=e.scores)||void 0===o?void 0:null===(r=o.dimensions)||void 0===r?void 0:r.overall)?(0,s.jsxs)("div",{className:"mt-1 text-xs text-gray-500",children:["综合匹配分:",e.scores.dimensions.overall]}):null,(null===(d=e.scores)||void 0===d?void 0:d.aiReason)?(0,s.jsx)("pre",{className:"mt-2 whitespace-pre-wrap rounded bg-gray-50 p-2 text-xs text-gray-600",children:e.scores.aiReason}):null]},e.id)}),m.length?null:(0,s.jsx)("div",{className:"py-8 text-center text-sm text-gray-400",children:"该职位暂无推荐人才"})]})}},74431:function(e,t,n){"use strict";n.d(t,{Ox:function(){return o},aA:function(){return i}});var s=n(67002),r=n(60529);function o(){return r.env.HUNTER_MATE_SERVER_URL||""}let d=o();class a extends Error{constructor(e,t,n){super(null!=n?n:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function i(e,t){let n;try{n=await fetch("".concat(d).concat(e),{cache:"no-store",...function(e){let t=(0,s.Xc)();if(!t)return e;let n=new Headers(null==e?void 0:e.headers);return n.has("Authorization")||n.set("Authorization","UTOKEN ".concat(t)),{...e,headers:n}}(t)})}catch(t){throw new a(0,e,t instanceof Error?t.message:"网络错误")}if(!n.ok)throw new a(n.status,e,"HTTP ".concat(n.status));try{return await n.json()}catch(t){throw new a(n.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,n){"use strict";n.d(t,{GK:function(){return d},Lc:function(){return a},Xc:function(){return o}});let s=null,r=new Set;function o(){return s}function d(e){e!==s&&(s=e,r.forEach(e=>e()))}function a(e){return r.add(e),()=>{r.delete(e)}}}},function(e){e.O(0,[400,935,744],function(){return e(e.s=41689)}),_N_E=e.O()}]);
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]="2fb88101-209d-4d18-97f4-aff29efd5cfd",e._sentryDebugIdIdentifier="sentry-dbid-2fb88101-209d-4d18-97f4-aff29efd5cfd")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[245],{41689:function(e,t,n){Promise.resolve().then(n.bind(n,48517))},48517:function(e,t,n){"use strict";n.d(t,{default:function(){return l}});var s=n(72835),r=n(60635),d=n(74431),o=n(67002);let i={not_found:"分享链接不存在、已失效,或你没有访问权限",expired:"分享链接已过期,请让分享者重新生成",revoked:"分享已被分享者撤销",out_of_scope:"你不在本次分享的范围内,请联系分享者"},a={recommended:"已推荐",pending_invite:"待邀请",invited:"已邀请",replied:"已回复",interview_scheduled:"已约面试",offer:"Offer",onboarding:"已入职",rejected:"已拒绝"};function l(){var e;let[t,n]=(0,r.useState)({kind:"loading"}),[a,l]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=window.location.pathname.match(/^\/shared\/([^/]+)/);l((null==e?void 0:e[1])?decodeURIComponent(e[1]):"")},[]),(0,r.useEffect)(()=>{if(a)return e(),(0,o.Lc)(()=>void e());async function e(){let e=(0,o.Xc)();if(!e){n({kind:"need-login"});return}let t=await fetch("".concat((0,d.Ox)(),"/shared/").concat(encodeURIComponent(a),"/data"),{headers:{Authorization:"UTOKEN ".concat(e)},cache:"no-store"});if(401===t.status){n({kind:"need-login"});return}let s=await t.json().catch(()=>({}));if(!t.ok){var r,i,l;n({kind:"error",code:null!==(i=null!==(r=null==s?void 0:s.errorCode)&&void 0!==r?r:null==s?void 0:s.code)&&void 0!==i?i:"not_found",message:null!==(l=null==s?void 0:s.message)&&void 0!==l?l:""});return}n({kind:"ok",data:s})}},[a]),(0,s.jsx)("div",{className:"h-full overflow-auto p-6",children:(0,s.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,s.jsx)("h1",{className:"mb-1 text-lg font-semibold",children:"同事分享的职位推荐"}),"loading"===t.kind?(0,s.jsx)("div",{className:"py-10 text-center text-sm text-gray-400",children:"加载中…"}):null,"need-login"===t.kind?(0,s.jsx)("div",{className:"mt-4 rounded border border-amber-200 bg-amber-50 px-4 py-6 text-center text-sm text-amber-800",children:"请先登录本地 hm(左下角登录),登录后本页会自动加载分享内容。"}):null,"error"===t.kind?(0,s.jsxs)("div",{className:"mt-4 rounded border border-red-200 bg-red-50 px-4 py-6 text-center text-sm text-red-700",children:[null!==(e=i[t.code])&&void 0!==e?e:i.not_found,t.message?(0,s.jsx)("div",{className:"mt-1 text-xs text-red-400",children:t.message}):null]}):null,"ok"===t.kind?(0,s.jsx)(c,{data:t.data}):null]})})}function c(e){var t,n,r,d,o,i,l,c,u;let{data:f}=e,x=null!==(i=f.recommendations)&&void 0!==i?i:[];return(0,s.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-medium",children:null!==(c=null===(t=f.jobCase)||void 0===t?void 0:t.title)&&void 0!==c?c:"职位 #".concat(null!==(l=null===(n=f.jobCase)||void 0===n?void 0:n.id)&&void 0!==l?l:"")}),(0,s.jsxs)("div",{className:"mt-0.5 text-xs text-gray-500",children:["分享者:",(null===(r=f.fromUser)||void 0===r?void 0:r.email)||"#".concat(null===(d=f.fromUser)||void 0===d?void 0:d.hmUserId),f.expiresAt?" \xb7 有效期至 ".concat(new Date(f.expiresAt).toLocaleString()):""]})]}),(0,s.jsx)("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-600",children:null!==(u=null===(o=f.jobCase)||void 0===o?void 0:o.status)&&void 0!==u?u:""})]}),f.note?(0,s.jsx)("div",{className:"mt-2 rounded bg-blue-50 px-3 py-2 text-sm text-blue-800",children:f.note}):null]}),(0,s.jsxs)("div",{className:"text-xs text-gray-500",children:["共 ",x.length," 位推荐人才(只读快照,实时数据以分享者本地为准)"]}),x.map(e=>{var t,n,r,d,o,i,l,c;return(0,s.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:"font-medium",children:null!==(l=null!==(i=null===(t=e.snapshot)||void 0===t?void 0:t.name)&&void 0!==i?i:e.portraitName)&&void 0!==l?l:"推荐 #".concat(e.id.slice(0,8))}),(0,s.jsx)("span",{className:"rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700",children:null!==(c=a[e.stage])&&void 0!==c?c:e.stage})]}),(null===(n=e.snapshot)||void 0===n?void 0:n.headline)?(0,s.jsx)("div",{className:"mt-1 text-xs text-gray-500",children:e.snapshot.headline}):null,"number"==typeof(null===(d=e.scores)||void 0===d?void 0:null===(r=d.dimensions)||void 0===r?void 0:r.overall)?(0,s.jsxs)("div",{className:"mt-1 text-xs text-gray-500",children:["综合匹配分:",e.scores.dimensions.overall]}):null,(null===(o=e.scores)||void 0===o?void 0:o.aiReason)?(0,s.jsx)("pre",{className:"mt-2 whitespace-pre-wrap rounded bg-gray-50 p-2 text-xs text-gray-600",children:e.scores.aiReason}):null]},e.id)}),x.length?null:(0,s.jsx)("div",{className:"py-8 text-center text-sm text-gray-400",children:"该职位暂无推荐人才"})]})}},74431:function(e,t,n){"use strict";n.d(t,{Ox:function(){return d},aA:function(){return a}});var s=n(67002),r=n(60529);function d(){return r.env.HUNTER_MATE_SERVER_URL||""}let o=d();class i extends Error{constructor(e,t,n){super(null!=n?n:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function a(e,t){let n;try{n=await fetch("".concat(o).concat(e),{cache:"no-store",...function(e){let t=(0,s.Xc)();if(!t)return e;let n=new Headers(null==e?void 0:e.headers);return n.has("Authorization")||n.set("Authorization","UTOKEN ".concat(t)),{...e,headers:n}}(t)})}catch(t){throw new i(0,e,t instanceof Error?t.message:"网络错误")}if(!n.ok)throw new i(n.status,e,"HTTP ".concat(n.status));try{return await n.json()}catch(t){throw new i(n.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,n){"use strict";n.d(t,{GK:function(){return o},Lc:function(){return i},Xc:function(){return d}});let s=null,r=new Set;function d(){return s}function o(e){e!==s&&(s=e,r.forEach(e=>e()))}function i(e){return r.add(e),()=>{r.delete(e)}}}},function(e){e.O(0,[400,935,744],function(){return e(e.s=41689)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- !function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c4ffa788-8d1e-4031-99ee-67af253cc858",t._sentryDebugIdIdentifier="sentry-dbid-c4ffa788-8d1e-4031-99ee-67af253cc858")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[325],{71765:function(t,e,n){Promise.resolve().then(n.bind(n,24492))},27473:function(t,e,n){"use strict";var r=n(38321);n.o(r,"useParams")&&n.d(e,{useParams:function(){return r.useParams}}),n.o(r,"usePathname")&&n.d(e,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(e,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(e,{useSearchParams:function(){return r.useSearchParams}}),n.o(r,"useServerInsertedHTML")&&n.d(e,{useServerInsertedHTML:function(){return r.useServerInsertedHTML}})},24492:function(t,e,n){"use strict";n.d(e,{default:function(){return c}});var r=n(72835),a=n(60635),s=n(27473),u=n(74431);function c(){let t=(0,s.useParams)().id,[e,n]=(0,a.useState)(null),[c,o]=(0,a.useState)(!1),[i,d]=(0,a.useState)(!1),[f,l]=(0,a.useState)(null);async function h(){o(!0),l(null);try{let e=await fetch("".concat((0,u.Ox)(),"/parsing/snapshots/").concat(t,"/agent-prompt"));if(!e.ok)throw Error("HTTP ".concat(e.status));let r=await e.json();n(r.prompt)}catch(t){l(t.message)}finally{o(!1)}}async function p(){e&&(await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3))}return(0,r.jsxs)("div",{style:{padding:24,maxWidth:800,margin:"0 auto"},children:[(0,r.jsx)("h1",{children:"Agent 解析 Prompt"}),(0,r.jsxs)("p",{children:["Snapshot ID: ",t]}),(0,r.jsx)("button",{onClick:h,disabled:c,children:c?"加载中...":"生成 Prompt"}),f&&(0,r.jsx)("div",{style:{color:"red",marginTop:12},children:f}),e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:p,style:{marginLeft:12},children:i?"已复制 ✅":"复制到剪贴板"}),(0,r.jsx)("pre",{style:{marginTop:16,padding:16,background:"#f5f5f5",borderRadius:8,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e})]})]})}},74431:function(t,e,n){"use strict";n.d(e,{Ox:function(){return s},aA:function(){return o}});var r=n(67002),a=n(60529);function s(){return a.env.HUNTER_MATE_SERVER_URL||""}let u=s();class c extends Error{constructor(t,e,n){super(null!=n?n:"请求失败(".concat(t,")").concat(e?": ".concat(e):"")),this.status=t,this.path=e,this.name="HttpError"}}async function o(t,e){let n;try{n=await fetch("".concat(u).concat(t),{cache:"no-store",...function(t){let e=(0,r.Xc)();if(!e)return t;let n=new Headers(null==t?void 0:t.headers);return n.has("Authorization")||n.set("Authorization","UTOKEN ".concat(e)),{...t,headers:n}}(e)})}catch(e){throw new c(0,t,e instanceof Error?e.message:"网络错误")}if(!n.ok)throw new c(n.status,t,"HTTP ".concat(n.status));try{return await n.json()}catch(e){throw new c(n.status,t,e instanceof Error?"响应解析失败: ".concat(e.message):"响应解析失败")}}},67002:function(t,e,n){"use strict";n.d(e,{GK:function(){return u},Lc:function(){return c},Xc:function(){return s}});let r=null,a=new Set;function s(){return r}function u(t){t!==r&&(r=t,a.forEach(t=>t()))}function c(t){return a.add(t),()=>{a.delete(t)}}}},function(t){t.O(0,[400,935,744],function(){return t(t.s=71765)}),_N_E=t.O()}]);
1
+ !function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="437ca156-7bdd-4ffc-935b-8fa41c839b4b",t._sentryDebugIdIdentifier="sentry-dbid-437ca156-7bdd-4ffc-935b-8fa41c839b4b")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[325],{71765:function(t,e,n){Promise.resolve().then(n.bind(n,24492))},27473:function(t,e,n){"use strict";var r=n(38321);n.o(r,"useParams")&&n.d(e,{useParams:function(){return r.useParams}}),n.o(r,"usePathname")&&n.d(e,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(e,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(e,{useSearchParams:function(){return r.useSearchParams}}),n.o(r,"useServerInsertedHTML")&&n.d(e,{useServerInsertedHTML:function(){return r.useServerInsertedHTML}})},24492:function(t,e,n){"use strict";n.d(e,{default:function(){return c}});var r=n(72835),a=n(60635),s=n(27473),u=n(74431);function c(){let t=(0,s.useParams)().id,[e,n]=(0,a.useState)(null),[c,o]=(0,a.useState)(!1),[i,d]=(0,a.useState)(!1),[f,l]=(0,a.useState)(null);async function h(){o(!0),l(null);try{let e=await fetch("".concat((0,u.Ox)(),"/parsing/snapshots/").concat(t,"/agent-prompt"));if(!e.ok)throw Error("HTTP ".concat(e.status));let r=await e.json();n(r.prompt)}catch(t){l(t.message)}finally{o(!1)}}async function p(){e&&(await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3))}return(0,r.jsxs)("div",{style:{padding:24,maxWidth:800,margin:"0 auto"},children:[(0,r.jsx)("h1",{children:"Agent 解析 Prompt"}),(0,r.jsxs)("p",{children:["Snapshot ID: ",t]}),(0,r.jsx)("button",{onClick:h,disabled:c,children:c?"加载中...":"生成 Prompt"}),f&&(0,r.jsx)("div",{style:{color:"red",marginTop:12},children:f}),e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:p,style:{marginLeft:12},children:i?"已复制 ✅":"复制到剪贴板"}),(0,r.jsx)("pre",{style:{marginTop:16,padding:16,background:"#f5f5f5",borderRadius:8,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e})]})]})}},74431:function(t,e,n){"use strict";n.d(e,{Ox:function(){return s},aA:function(){return o}});var r=n(67002),a=n(60529);function s(){return a.env.HUNTER_MATE_SERVER_URL||""}let u=s();class c extends Error{constructor(t,e,n){super(null!=n?n:"请求失败(".concat(t,")").concat(e?": ".concat(e):"")),this.status=t,this.path=e,this.name="HttpError"}}async function o(t,e){let n;try{n=await fetch("".concat(u).concat(t),{cache:"no-store",...function(t){let e=(0,r.Xc)();if(!e)return t;let n=new Headers(null==t?void 0:t.headers);return n.has("Authorization")||n.set("Authorization","UTOKEN ".concat(e)),{...t,headers:n}}(e)})}catch(e){throw new c(0,t,e instanceof Error?e.message:"网络错误")}if(!n.ok)throw new c(n.status,t,"HTTP ".concat(n.status));try{return await n.json()}catch(e){throw new c(n.status,t,e instanceof Error?"响应解析失败: ".concat(e.message):"响应解析失败")}}},67002:function(t,e,n){"use strict";n.d(e,{GK:function(){return u},Lc:function(){return c},Xc:function(){return s}});let r=null,a=new Set;function s(){return r}function u(t){t!==r&&(r=t,a.forEach(t=>t()))}function c(t){return a.add(t),()=>{a.delete(t)}}}},function(t){t.O(0,[400,935,744],function(){return t(t.s=71765)}),_N_E=t.O()}]);
@@ -1 +1 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2ae30522-b816-4718-9069-1b92e437a582",e._sentryDebugIdIdentifier="sentry-dbid-2ae30522-b816-4718-9069-1b92e437a582")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[93],{85539:function(e,n,r){Promise.resolve().then(r.bind(r,70852))},27473:function(e,n,r){"use strict";var u=r(38321);r.o(u,"useParams")&&r.d(n,{useParams:function(){return u.useParams}}),r.o(u,"usePathname")&&r.d(n,{usePathname:function(){return u.usePathname}}),r.o(u,"useRouter")&&r.d(n,{useRouter:function(){return u.useRouter}}),r.o(u,"useSearchParams")&&r.d(n,{useSearchParams:function(){return u.useSearchParams}}),r.o(u,"useServerInsertedHTML")&&r.d(n,{useServerInsertedHTML:function(){return u.useServerInsertedHTML}})}},function(e){e.O(0,[253,852,400,935,744],function(){return e(e.s=85539)}),_N_E=e.O()}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6c34ac09-6bd6-4e86-9dc2-3c34a5cfc955",e._sentryDebugIdIdentifier="sentry-dbid-6c34ac09-6bd6-4e86-9dc2-3c34a5cfc955")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[93],{85539:function(e,n,r){Promise.resolve().then(r.bind(r,59659))},27473:function(e,n,r){"use strict";var u=r(38321);r.o(u,"useParams")&&r.d(n,{useParams:function(){return u.useParams}}),r.o(u,"usePathname")&&r.d(n,{usePathname:function(){return u.usePathname}}),r.o(u,"useRouter")&&r.d(n,{useRouter:function(){return u.useRouter}}),r.o(u,"useSearchParams")&&r.d(n,{useSearchParams:function(){return u.useSearchParams}}),r.o(u,"useServerInsertedHTML")&&r.d(n,{useServerInsertedHTML:function(){return u.useServerInsertedHTML}})}},function(e){e.O(0,[253,659,400,935,744],function(){return e(e.s=85539)}),_N_E=e.O()}]);
@@ -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]="d17ecac6-91b1-4227-8066-b46d4eab06cf",e._sentryDebugIdIdentifier="sentry-dbid-d17ecac6-91b1-4227-8066-b46d4eab06cf")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[14],{80812:function(e,t,n){Promise.resolve().then(n.bind(n,21670))},21670:function(e,t,n){"use strict";n.d(t,{default:function(){return x}});var l=n(72835),r=n(60635),a=n(74431),s=n(67002),i=n(65777);let o=[{key:"today",label:"今天"},{key:"yesterday",label:"昨天"},{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"last7",label:"近 7 天"},{key:"custom",label:"自定义"}],c={recommended:"已推荐",pending_invite:"待邀请",invited:"已邀请",replied:"已回复",interview_scheduled:"已约面试",offer:"Offer",onboarding:"已入职",rejected:"已拒绝"},u={create:"建档",move:"阶段迁移",form:"保存表单",invite:"记录邀请",invite_approved:"批准邀请",note:"备注",delete:"移出流程"};function d(e){let t=new Date(e);return t.setHours(0,0,0,0),t}function m(e){let{actorType:t}=e;return"agent"===t?(0,l.jsx)("span",{className:"rounded bg-purple-100 px-1.5 py-0.5 text-xs text-purple-700",children:"agent 代操作"}):"human"===t?(0,l.jsx)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-xs text-emerald-700",children:"本人操作"}):(0,l.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-500",children:"来源不明"})}function x(){var e,t,n,x,h;let[y,f]=(0,r.useState)(null),[p,v]=(0,r.useState)(null),[b,j]=(0,r.useState)("last7"),[N,w]=(0,r.useState)(""),[S,I]=(0,r.useState)(""),[E,k]=(0,r.useState)(null),[T,O]=(0,r.useState)(!1),[D,_]=(0,r.useState)(null),{sync:A}=(0,i.nu)(),U=null!==(e=null==A?void 0:A.activeTenantId)&&void 0!==e?e:null,C=(0,r.useCallback)(()=>{(0,a.aA)("/team/members").then(e=>{let t=Array.isArray(null==e?void 0:e.items)?e.items:[];f(t),v(e=>{var n,l;return null!=e&&t.some(t=>t.hmUserId===e)?e:null!==(l=null===(n=t[0])||void 0===n?void 0:n.hmUserId)&&void 0!==l?l:null})}).catch(()=>{})},[U]);(0,r.useEffect)(()=>(C(),(0,s.Lc)(C)),[C]);let R=(0,r.useCallback)(async()=>{if(null==p)return;O(!0),_(null);let{from:e,to:t}=function(e,t,n){let l=d(new Date);switch(e){case"today":return{from:l.toISOString(),to:new Date(l.getTime()+864e5).toISOString()};case"yesterday":return{from:new Date(l.getTime()-864e5).toISOString(),to:l.toISOString()};case"week":{let e=(l.getDay()+6)%7;return{from:new Date(l.getTime()-864e5*e).toISOString(),to:new Date(l.getTime()+864e5).toISOString()}}case"month":return{from:new Date(l.getFullYear(),l.getMonth(),1).toISOString(),to:new Date(l.getTime()+864e5).toISOString()};case"custom":return{from:t?d(new Date("".concat(t,"T00:00:00"))).toISOString():l.toISOString(),to:n?new Date(d(new Date("".concat(n,"T00:00:00"))).getTime()+864e5).toISOString():new Date(l.getTime()+864e5).toISOString()};default:return{from:new Date(l.getTime()-5184e5).toISOString(),to:new Date(l.getTime()+864e5).toISOString()}}}(b,N,S);try{let n=await (0,a.aA)("/team/insights?hmUserId=".concat(p,"&from=").concat(encodeURIComponent(e),"&to=").concat(encodeURIComponent(t)));k(n)}catch(e){_("加载失败:未登录云端账号、与对方不在同一公司租户,或云服务不可达"),k(null)}finally{O(!1)}},[p,b,N,S,U]);(0,r.useEffect)(()=>(R(),(0,s.Lc)(()=>void R())),[R]);let H=null==E?void 0:E.summary,X=(0,r.useMemo)(()=>{var e;return Object.entries(null!==(e=null==H?void 0:H.terminal)&&void 0!==e?e:{})},[H]);return(0,l.jsx)("div",{className:"h-full overflow-auto p-6",children:(0,l.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,l.jsx)("h1",{className:"mb-4 text-lg font-semibold",children:"同事工作统计"}),(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-3 rounded-lg border border-gray-200 bg-white p-3",children:[(0,l.jsxs)("label",{className:"text-sm text-gray-600",children:["同事:",(0,l.jsxs)("select",{value:null!=p?p:"",onChange:e=>v(Number(e.target.value)),className:"ml-2 rounded border border-gray-300 px-2 py-1 text-sm",children:[null===y?(0,l.jsx)("option",{children:"加载中…"}):null,(null!=y?y:[]).map(e=>(0,l.jsxs)("option",{value:e.hmUserId,children:[e.name,"(",e.email,")"]},e.hmUserId))]})]}),(0,l.jsx)("div",{className:"flex gap-1",children:o.map(e=>(0,l.jsx)("button",{onClick:()=>j(e.key),className:"rounded px-2.5 py-1 text-xs ".concat(b===e.key?"bg-blue-100 font-medium text-blue-800":"text-gray-500 hover:bg-gray-100"),children:e.label},e.key))}),"custom"===b?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-sm",children:[(0,l.jsx)("input",{type:"date",value:N,onChange:e=>w(e.target.value),className:"rounded border border-gray-300 px-2 py-1 text-sm"}),"~",(0,l.jsx)("input",{type:"date",value:S,onChange:e=>I(e.target.value),className:"rounded border border-gray-300 px-2 py-1 text-sm"})]}):null]}),D?(0,l.jsx)("div",{className:"mb-4 rounded border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700",children:D}):null,T?(0,l.jsx)("div",{className:"py-10 text-center text-sm text-gray-400",children:"加载中…"}):null,!T&&E?(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[(0,l.jsx)(g,{label:"区间新建推荐",value:null!==(t=null==H?void 0:H.recsTotal)&&void 0!==t?t:0}),(0,l.jsx)(g,{label:"agent 代操作",value:null!==(n=null==H?void 0:H.recsByAgent)&&void 0!==n?n:0,tone:"purple"}),(0,l.jsx)(g,{label:"本人操作",value:null!==(x=null==H?void 0:H.recsByHuman)&&void 0!==x?x:0,tone:"green"}),(0,l.jsx)(g,{label:"来源不明(存量)",value:null!==(h=null==H?void 0:H.recsUnknown)&&void 0!==h?h:0,tone:"gray"})]}),X.length?(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-3 text-sm",children:[(0,l.jsx)("span",{className:"mr-2 text-xs text-gray-500",children:"终端阶段:"}),X.map(e=>{var t;let[n,r]=e;return(0,l.jsxs)("span",{className:"mr-3",children:[null!==(t=c[n])&&void 0!==t?t:n," ",(0,l.jsx)("b",{children:r})]},n)})]}):null,(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white",children:[(0,l.jsx)("div",{className:"border-b border-gray-100 px-4 py-2 text-sm font-medium",children:"分职位产出"}),E.jobs.length?(0,l.jsxs)("table",{className:"w-full text-sm",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"text-left text-xs text-gray-400",children:[(0,l.jsx)("th",{className:"px-4 py-2",children:"职位"}),(0,l.jsx)("th",{className:"px-2 py-2",children:"推荐数"}),(0,l.jsx)("th",{className:"px-2 py-2",children:"agent"}),(0,l.jsx)("th",{className:"px-2 py-2",children:"本人"}),(0,l.jsx)("th",{className:"px-2 py-2",children:"不明"}),(0,l.jsx)("th",{className:"px-4 py-2",children:"阶段分布"})]})}),(0,l.jsx)("tbody",{children:E.jobs.map(e=>(0,l.jsxs)("tr",{className:"border-t border-gray-50",children:[(0,l.jsxs)("td",{className:"px-4 py-2",children:[e.title,e.status?(0,l.jsxs)("span",{className:"ml-1 text-xs text-gray-400",children:["(",e.status,")"]}):null]}),(0,l.jsx)("td",{className:"px-2 py-2 font-medium",children:e.recsTotal}),(0,l.jsx)("td",{className:"px-2 py-2 text-purple-600",children:e.byAgent}),(0,l.jsx)("td",{className:"px-2 py-2 text-emerald-600",children:e.byHuman}),(0,l.jsx)("td",{className:"px-2 py-2 text-gray-400",children:e.byUnknown}),(0,l.jsx)("td",{className:"px-4 py-2 text-xs text-gray-500",children:Object.entries(e.stageDist).map(e=>{var t;let[n,l]=e;return"".concat(null!==(t=c[n])&&void 0!==t?t:n," ").concat(l)}).join(" / ")})]},e.jobCaseId))})]}):(0,l.jsx)("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:"该区间无推荐产出"})]}),(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white",children:[(0,l.jsxs)("div",{className:"border-b border-gray-100 px-4 py-2 text-sm font-medium",children:["操作时间线(区间内 ",E.timeline.length," 条)"]}),E.timeline.length?(0,l.jsx)("ul",{className:"divide-y divide-gray-50",children:E.timeline.map((e,t)=>{var n,r;return(0,l.jsxs)("li",{className:"flex items-center gap-3 px-4 py-2 text-sm",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-xs text-gray-400",children:new Date(e.at).toLocaleString()}),(0,l.jsx)(m,{actorType:e.actorType}),(0,l.jsx)("span",{className:"font-medium",children:e.talentName||"—"}),(0,l.jsxs)("span",{className:"text-xs text-gray-500",children:[null!==(n=u[e.action])&&void 0!==n?n:e.action,e.toStage?" → ".concat(null!==(r=c[e.toStage])&&void 0!==r?r:e.toStage):""]}),(0,l.jsx)("span",{className:"ml-auto truncate text-xs text-gray-400",children:e.jobTitle})]},"".concat(e.at,"-").concat(t))})}):(0,l.jsx)("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:"该区间无操作记录"})]})]}):null,T||E||D?null:(0,l.jsx)("div",{className:"py-10 text-center text-sm text-gray-400",children:y&&!y.length?"暂无公司租户同事(加入公司租户后可用)":"选择同事与时间段查看统计"})]})})}function g(e){let{label:t,value:n,tone:r}=e;return(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-3",children:[(0,l.jsx)("div",{className:"text-xs text-gray-500",children:t}),(0,l.jsx)("div",{className:"mt-1 text-2xl font-semibold ".concat("purple"===r?"text-purple-700":"green"===r?"text-emerald-700":"gray"===r?"text-gray-500":"text-gray-900"),children:n})]})}},65777:function(e,t,n){"use strict";let l;n.d(t,{Cd:function(){return I},Xc:function(){return k},aG:function(){return w},cp:function(){return S},nu:function(){return N},tQ:function(){return E}});var r=n(60635),a=n(74431),s=n(67002),i=n(60529);let o=null,c=null,u=null,d=new Set;function m(){d.forEach(e=>e())}function x(e){o=o?{...o,refreshing:e}:{...v,refreshing:e},m()}async function g(){try{return await (0,a.aA)("/auth/session")}catch(e){return null}}async function h(e){let t=new Headers,n=(0,s.Xc)();n&&t.set("Authorization","UTOKEN ".concat(n));try{return await (0,a.aA)(e,{headers:t})}catch(e){return null}}async function y(){x(!0);try{var e;let[t,n]=await Promise.all([g(),h("/datasync/state")]),r=(null==t?void 0:t.loggedIn)&&t.token?t.token:null,a=null!=n?n:null;!a&&t&&r&&r!==(0,s.Xc)()?((0,s.GK)(r),a=await h("/datasync/state")):(0,s.GK)(r),function(e){if(void 0===l){l=e;return}if(e!==l){l=e;try{window.localStorage.removeItem("hm-view-mode")}catch(e){}}}((null==t?void 0:t.loggedIn)&&null!==(e=t.hmUserId)&&void 0!==e?e:null);let i=!!((null==t?void 0:t.loggedIn)||(null==a?void 0:a.loggedIn));if(!t&&!a){o=o?{...o,loadError:"本地服务无响应"}:{...v,loadError:"本地服务无响应"},m();return}o={session:null!=t?t:{loggedIn:!1},sync:a,utoken:(0,s.Xc)(),loadError:null,refreshing:!1,authStatus:i?"in":"out",refresh:f},m()}finally{(null==o?void 0:o.refreshing)&&x(!1)}}function f(){return c||(c=y().finally(()=>{c=null}))}function p(e){return d.add(e),1===d.size&&(f(),u=setInterval(()=>void f(),6e4)),()=>{d.delete(e),0===d.size&&u&&(clearInterval(u),u=null)}}let v={session:null,sync:null,utoken:null,loadError:null,refreshing:!1,authStatus:"loading",refresh:f};function b(){return null!=o?o:v}function j(){return b()}function N(){return(0,r.useSyncExternalStore)(p,b,j)}function w(e){var t;return(null!==(t=null==e?void 0:e.memberships)&&void 0!==t?t:[]).filter(e=>!e.isPersonal&&!e.leftAt)}function S(e){var t,n;let l=null!==(t=null==e?void 0:e.activeTenantId)&&void 0!==t?t:null;if(null==l)return null;let r=(null!==(n=null==e?void 0:e.memberships)&&void 0!==n?n:[]).find(e=>e.tenantId===l&&!e.leftAt);return!r||r.isPersonal?null:l}function I(e,t){var n,l;if(!t)return null;let r=(null!==(n=null==e?void 0:e.memberships)&&void 0!==n?n:[]).find(e=>e.tenantId===t&&!e.leftAt&&!e.isPersonal);return null!==(l=null==r?void 0:r.role)&&void 0!==l?l:null}function E(){return i.env.NEXT_PUBLIC_HUNTER_MATE_SERVER_URL||""}function k(){return(0,s.Xc)()}},74431:function(e,t,n){"use strict";n.d(t,{Ox:function(){return a},aA:function(){return o}});var l=n(67002),r=n(60529);function a(){return r.env.HUNTER_MATE_SERVER_URL||""}let s=a();class i extends Error{constructor(e,t,n){super(null!=n?n:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function o(e,t){let n;try{n=await fetch("".concat(s).concat(e),{cache:"no-store",...function(e){let t=(0,l.Xc)();if(!t)return e;let n=new Headers(null==e?void 0:e.headers);return n.has("Authorization")||n.set("Authorization","UTOKEN ".concat(t)),{...e,headers:n}}(t)})}catch(t){throw new i(0,e,t instanceof Error?t.message:"网络错误")}if(!n.ok)throw new i(n.status,e,"HTTP ".concat(n.status));try{return await n.json()}catch(t){throw new i(n.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,n){"use strict";n.d(t,{GK:function(){return s},Lc:function(){return i},Xc:function(){return a}});let l=null,r=new Set;function a(){return l}function s(e){e!==l&&(l=e,r.forEach(e=>e()))}function i(e){return r.add(e),()=>{r.delete(e)}}}},function(e){e.O(0,[400,935,744],function(){return e(e.s=80812)}),_N_E=e.O()}]);
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]="6833f1e5-7eae-410e-8036-962cf8c702ee",e._sentryDebugIdIdentifier="sentry-dbid-6833f1e5-7eae-410e-8036-962cf8c702ee")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[14],{80812:function(e,t,n){Promise.resolve().then(n.bind(n,21670))},21670:function(e,t,n){"use strict";n.d(t,{default:function(){return x}});var l=n(72835),r=n(60635),a=n(74431),s=n(67002),i=n(65777);let o=[{key:"today",label:"今天"},{key:"yesterday",label:"昨天"},{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"last7",label:"近 7 天"},{key:"custom",label:"自定义"}],c={recommended:"已推荐",pending_invite:"待邀请",invited:"已邀请",replied:"已回复",interview_scheduled:"已约面试",offer:"Offer",onboarding:"已入职",rejected:"已拒绝"},u={create:"建档",move:"阶段迁移",form:"保存表单",invite:"记录邀请",invite_approved:"批准邀请",note:"备注",delete:"移出流程"};function d(e){let t=new Date(e);return t.setHours(0,0,0,0),t}function m(e){let{actorType:t}=e;return"agent"===t?(0,l.jsx)("span",{className:"rounded bg-purple-100 px-1.5 py-0.5 text-xs text-purple-700",children:"agent 代操作"}):"human"===t?(0,l.jsx)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-xs text-emerald-700",children:"本人操作"}):(0,l.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-500",children:"来源不明"})}function x(){var e,t,n,x,h;let[f,y]=(0,r.useState)(null),[p,v]=(0,r.useState)(null),[b,j]=(0,r.useState)("last7"),[N,w]=(0,r.useState)(""),[S,I]=(0,r.useState)(""),[E,k]=(0,r.useState)(null),[T,O]=(0,r.useState)(!1),[D,_]=(0,r.useState)(null),{sync:A}=(0,i.nu)(),U=null!==(e=null==A?void 0:A.activeTenantId)&&void 0!==e?e:null,C=(0,r.useCallback)(()=>{(0,a.aA)("/team/members").then(e=>{let t=Array.isArray(null==e?void 0:e.items)?e.items:[];y(t),v(e=>{var n,l;return null!=e&&t.some(t=>t.hmUserId===e)?e:null!==(l=null===(n=t[0])||void 0===n?void 0:n.hmUserId)&&void 0!==l?l:null})}).catch(()=>{})},[U]);(0,r.useEffect)(()=>(C(),(0,s.Lc)(C)),[C]);let R=(0,r.useCallback)(async()=>{if(null==p)return;O(!0),_(null);let{from:e,to:t}=function(e,t,n){let l=d(new Date);switch(e){case"today":return{from:l.toISOString(),to:new Date(l.getTime()+864e5).toISOString()};case"yesterday":return{from:new Date(l.getTime()-864e5).toISOString(),to:l.toISOString()};case"week":{let e=(l.getDay()+6)%7;return{from:new Date(l.getTime()-864e5*e).toISOString(),to:new Date(l.getTime()+864e5).toISOString()}}case"month":return{from:new Date(l.getFullYear(),l.getMonth(),1).toISOString(),to:new Date(l.getTime()+864e5).toISOString()};case"custom":return{from:t?d(new Date("".concat(t,"T00:00:00"))).toISOString():l.toISOString(),to:n?new Date(d(new Date("".concat(n,"T00:00:00"))).getTime()+864e5).toISOString():new Date(l.getTime()+864e5).toISOString()};default:return{from:new Date(l.getTime()-5184e5).toISOString(),to:new Date(l.getTime()+864e5).toISOString()}}}(b,N,S);try{let n=await (0,a.aA)("/team/insights?hmUserId=".concat(p,"&from=").concat(encodeURIComponent(e),"&to=").concat(encodeURIComponent(t)));k(n)}catch(e){_("加载失败:未登录云端账号、与对方不在同一公司租户,或云服务不可达"),k(null)}finally{O(!1)}},[p,b,N,S,U]);(0,r.useEffect)(()=>(R(),(0,s.Lc)(()=>void R())),[R]);let H=null==E?void 0:E.summary,X=(0,r.useMemo)(()=>{var e;return Object.entries(null!==(e=null==H?void 0:H.terminal)&&void 0!==e?e:{})},[H]);return(0,l.jsx)("div",{className:"h-full overflow-auto p-6",children:(0,l.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,l.jsx)("h1",{className:"mb-4 text-lg font-semibold",children:"同事工作统计"}),(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-3 rounded-lg border border-gray-200 bg-white p-3",children:[(0,l.jsxs)("label",{className:"text-sm text-gray-600",children:["同事:",(0,l.jsxs)("select",{value:null!=p?p:"",onChange:e=>v(Number(e.target.value)),className:"ml-2 rounded border border-gray-300 px-2 py-1 text-sm",children:[null===f?(0,l.jsx)("option",{children:"加载中…"}):null,(null!=f?f:[]).map(e=>(0,l.jsxs)("option",{value:e.hmUserId,children:[e.name,"(",e.email,")"]},e.hmUserId))]})]}),(0,l.jsx)("div",{className:"flex gap-1",children:o.map(e=>(0,l.jsx)("button",{onClick:()=>j(e.key),className:"rounded px-2.5 py-1 text-xs ".concat(b===e.key?"bg-blue-100 font-medium text-blue-800":"text-gray-500 hover:bg-gray-100"),children:e.label},e.key))}),"custom"===b?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-sm",children:[(0,l.jsx)("input",{type:"date",value:N,onChange:e=>w(e.target.value),className:"rounded border border-gray-300 px-2 py-1 text-sm"}),"~",(0,l.jsx)("input",{type:"date",value:S,onChange:e=>I(e.target.value),className:"rounded border border-gray-300 px-2 py-1 text-sm"})]}):null]}),D?(0,l.jsx)("div",{className:"mb-4 rounded border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700",children:D}):null,T?(0,l.jsx)("div",{className:"py-10 text-center text-sm text-gray-400",children:"加载中…"}):null,!T&&E?(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[(0,l.jsx)(g,{label:"区间新建推荐",value:null!==(t=null==H?void 0:H.recsTotal)&&void 0!==t?t:0}),(0,l.jsx)(g,{label:"agent 代操作",value:null!==(n=null==H?void 0:H.recsByAgent)&&void 0!==n?n:0,tone:"purple"}),(0,l.jsx)(g,{label:"本人操作",value:null!==(x=null==H?void 0:H.recsByHuman)&&void 0!==x?x:0,tone:"green"}),(0,l.jsx)(g,{label:"来源不明(存量)",value:null!==(h=null==H?void 0:H.recsUnknown)&&void 0!==h?h:0,tone:"gray"})]}),X.length?(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-3 text-sm",children:[(0,l.jsx)("span",{className:"mr-2 text-xs text-gray-500",children:"终端阶段:"}),X.map(e=>{var t;let[n,r]=e;return(0,l.jsxs)("span",{className:"mr-3",children:[null!==(t=c[n])&&void 0!==t?t:n," ",(0,l.jsx)("b",{children:r})]},n)})]}):null,(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white",children:[(0,l.jsx)("div",{className:"border-b border-gray-100 px-4 py-2 text-sm font-medium",children:"分职位产出"}),E.jobs.length?(0,l.jsxs)("table",{className:"w-full text-sm",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"text-left text-xs text-gray-400",children:[(0,l.jsx)("th",{className:"px-4 py-2",children:"职位"}),(0,l.jsx)("th",{className:"px-2 py-2",children:"推荐数"}),(0,l.jsx)("th",{className:"px-2 py-2",children:"agent"}),(0,l.jsx)("th",{className:"px-2 py-2",children:"本人"}),(0,l.jsx)("th",{className:"px-2 py-2",children:"不明"}),(0,l.jsx)("th",{className:"px-4 py-2",children:"阶段分布"})]})}),(0,l.jsx)("tbody",{children:E.jobs.map(e=>(0,l.jsxs)("tr",{className:"border-t border-gray-50",children:[(0,l.jsxs)("td",{className:"px-4 py-2",children:[e.title,e.status?(0,l.jsxs)("span",{className:"ml-1 text-xs text-gray-400",children:["(",e.status,")"]}):null]}),(0,l.jsx)("td",{className:"px-2 py-2 font-medium",children:e.recsTotal}),(0,l.jsx)("td",{className:"px-2 py-2 text-purple-600",children:e.byAgent}),(0,l.jsx)("td",{className:"px-2 py-2 text-emerald-600",children:e.byHuman}),(0,l.jsx)("td",{className:"px-2 py-2 text-gray-400",children:e.byUnknown}),(0,l.jsx)("td",{className:"px-4 py-2 text-xs text-gray-500",children:Object.entries(e.stageDist).map(e=>{var t;let[n,l]=e;return"".concat(null!==(t=c[n])&&void 0!==t?t:n," ").concat(l)}).join(" / ")})]},e.jobCaseId))})]}):(0,l.jsx)("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:"该区间无推荐产出"})]}),(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white",children:[(0,l.jsxs)("div",{className:"border-b border-gray-100 px-4 py-2 text-sm font-medium",children:["操作时间线(区间内 ",E.timeline.length," 条)"]}),E.timeline.length?(0,l.jsx)("ul",{className:"divide-y divide-gray-50",children:E.timeline.map((e,t)=>{var n,r;return(0,l.jsxs)("li",{className:"flex items-center gap-3 px-4 py-2 text-sm",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-xs text-gray-400",children:new Date(e.at).toLocaleString()}),(0,l.jsx)(m,{actorType:e.actorType}),(0,l.jsx)("span",{className:"font-medium",children:e.talentName||"—"}),(0,l.jsxs)("span",{className:"text-xs text-gray-500",children:[null!==(n=u[e.action])&&void 0!==n?n:e.action,e.toStage?" → ".concat(null!==(r=c[e.toStage])&&void 0!==r?r:e.toStage):""]}),(0,l.jsx)("span",{className:"ml-auto truncate text-xs text-gray-400",children:e.jobTitle})]},"".concat(e.at,"-").concat(t))})}):(0,l.jsx)("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:"该区间无操作记录"})]})]}):null,T||E||D?null:(0,l.jsx)("div",{className:"py-10 text-center text-sm text-gray-400",children:f&&!f.length?"暂无公司租户同事(加入公司租户后可用)":"选择同事与时间段查看统计"})]})})}function g(e){let{label:t,value:n,tone:r}=e;return(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-3",children:[(0,l.jsx)("div",{className:"text-xs text-gray-500",children:t}),(0,l.jsx)("div",{className:"mt-1 text-2xl font-semibold ".concat("purple"===r?"text-purple-700":"green"===r?"text-emerald-700":"gray"===r?"text-gray-500":"text-gray-900"),children:n})]})}},65777:function(e,t,n){"use strict";let l;n.d(t,{Cd:function(){return I},Xc:function(){return k},aG:function(){return w},cp:function(){return S},nu:function(){return N},tQ:function(){return E}});var r=n(60635),a=n(74431),s=n(67002),i=n(60529);let o=null,c=null,u=null,d=new Set;function m(){d.forEach(e=>e())}function x(e){o=o?{...o,refreshing:e}:{...v,refreshing:e},m()}async function g(){try{return await (0,a.aA)("/auth/session")}catch(e){return null}}async function h(e){let t=new Headers,n=(0,s.Xc)();n&&t.set("Authorization","UTOKEN ".concat(n));try{return await (0,a.aA)(e,{headers:t})}catch(e){return null}}async function f(){x(!0);try{var e;let[t,n]=await Promise.all([g(),h("/datasync/state")]),r=(null==t?void 0:t.loggedIn)&&t.token?t.token:null,a=null!=n?n:null;!a&&t&&r&&r!==(0,s.Xc)()?((0,s.GK)(r),a=await h("/datasync/state")):(0,s.GK)(r),function(e){if(void 0===l){l=e;return}if(e!==l){l=e;try{window.localStorage.removeItem("hm-view-mode")}catch(e){}}}((null==t?void 0:t.loggedIn)&&null!==(e=t.hmUserId)&&void 0!==e?e:null);let i=!!((null==t?void 0:t.loggedIn)||(null==a?void 0:a.loggedIn));if(!t&&!a){o=o?{...o,loadError:"本地服务无响应"}:{...v,loadError:"本地服务无响应"},m();return}o={session:null!=t?t:{loggedIn:!1},sync:a,utoken:(0,s.Xc)(),loadError:null,refreshing:!1,authStatus:i?"in":"out",refresh:y},m()}finally{(null==o?void 0:o.refreshing)&&x(!1)}}function y(){return c||(c=f().finally(()=>{c=null}))}function p(e){return d.add(e),1===d.size&&(y(),u=setInterval(()=>void y(),6e4)),()=>{d.delete(e),0===d.size&&u&&(clearInterval(u),u=null)}}let v={session:null,sync:null,utoken:null,loadError:null,refreshing:!1,authStatus:"loading",refresh:y};function b(){return null!=o?o:v}function j(){return b()}function N(){return(0,r.useSyncExternalStore)(p,b,j)}function w(e){var t;return(null!==(t=null==e?void 0:e.memberships)&&void 0!==t?t:[]).filter(e=>!e.isPersonal&&!e.leftAt)}function S(e){var t,n;let l=null!==(t=null==e?void 0:e.activeTenantId)&&void 0!==t?t:null;if(null==l)return null;let r=(null!==(n=null==e?void 0:e.memberships)&&void 0!==n?n:[]).find(e=>e.tenantId===l&&!e.leftAt);return!r||r.isPersonal?null:l}function I(e,t){var n,l;if(!t)return null;let r=(null!==(n=null==e?void 0:e.memberships)&&void 0!==n?n:[]).find(e=>e.tenantId===t&&!e.leftAt&&!e.isPersonal);return null!==(l=null==r?void 0:r.role)&&void 0!==l?l:null}function E(){return i.env.NEXT_PUBLIC_HUNTER_MATE_SERVER_URL||""}function k(){return(0,s.Xc)()}},74431:function(e,t,n){"use strict";n.d(t,{Ox:function(){return a},aA:function(){return o}});var l=n(67002),r=n(60529);function a(){return r.env.HUNTER_MATE_SERVER_URL||""}let s=a();class i extends Error{constructor(e,t,n){super(null!=n?n:"请求失败(".concat(e,")").concat(t?": ".concat(t):"")),this.status=e,this.path=t,this.name="HttpError"}}async function o(e,t){let n;try{n=await fetch("".concat(s).concat(e),{cache:"no-store",...function(e){let t=(0,l.Xc)();if(!t)return e;let n=new Headers(null==e?void 0:e.headers);return n.has("Authorization")||n.set("Authorization","UTOKEN ".concat(t)),{...e,headers:n}}(t)})}catch(t){throw new i(0,e,t instanceof Error?t.message:"网络错误")}if(!n.ok)throw new i(n.status,e,"HTTP ".concat(n.status));try{return await n.json()}catch(t){throw new i(n.status,e,t instanceof Error?"响应解析失败: ".concat(t.message):"响应解析失败")}}},67002:function(e,t,n){"use strict";n.d(t,{GK:function(){return s},Lc:function(){return i},Xc:function(){return a}});let l=null,r=new Set;function a(){return l}function s(e){e!==l&&(l=e,r.forEach(e=>e()))}function i(e){return r.add(e),()=>{r.delete(e)}}}},function(e){e.O(0,[400,935,744],function(){return e(e.s=80812)}),_N_E=e.O()}]);
@@ -0,0 +1,3 @@
1
+ *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
+ ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
3
+ */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-left-\[21px\]{left:-21px}.bottom-full{bottom:100%}.left-2{left:.5rem}.right-1{right:.25rem}.right-2{right:.5rem}.top-1{top:.25rem}.top-1\/2{top:50%}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-\[7px\]{margin-left:7px}.ml-auto{margin-left:auto}.mr-0\.5{margin-right:.125rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-36{max-height:9rem}.max-h-48{max-height:12rem}.max-h-56{max-height:14rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[32rem\]{max-height:32rem}.max-h-\[90vh\]{max-height:90vh}.max-h-\[92vh\]{max-height:92vh}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.min-h-screen{min-height:100vh}.w-12{width:3rem}.w-14{width:3.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-56{width:14rem}.w-8{width:2rem}.w-80{width:20rem}.w-96{width:24rem}.w-\[520px\]{width:520px}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-\[120px\]{min-width:120px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-\[360px\]{max-width:360px}.max-w-\[92vw\]{max-width:92vw}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[2\]{flex:2}.flex-\[3\]{flex:3}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr\2c 2fr\2c auto\]{grid-template-columns:1fr 2fr auto}.grid-cols-\[90px\2c 1fr\2c auto\]{grid-template-columns:90px 1fr auto}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity,1))}.divide-gray-50>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(249 250 251/var(--tw-divide-opacity,1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.bg-\[color\:var\(--brand-soft\)\]{background-color:var(--brand-soft)}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-black\/30{background-color:rgba(0,0,0,.3)}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-50\/50{background-color:rgba(239,246,255,.5)}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-8{padding-right:2rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.tracking-widest{letter-spacing:.1em}.text-\[color\:var\(--brand-strong\)\]{color:var(--brand-strong)}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.decoration-red-300{text-decoration-color:#fca5a5}.accent-amber-600{accent-color:#d97706}.accent-blue-600{accent-color:#2563eb}.opacity-40{opacity:.4}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-current{--tw-ring-color:currentColor}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root,:root[data-view=delivery]{--brand:#0e7490;--brand-strong:#155e75;--brand-soft:#ecfeff;--accent:#2563eb}:root[data-view=bd]{--brand:#b45309;--brand-strong:#92400e;--brand-soft:#fffbeb;--accent:#7c3aed}.hm-active{background:var(--brand-soft);color:var(--brand-strong)}.hm-spinner{display:inline-block;width:28px;height:28px;border:3px solid var(--brand-soft);border-top-color:var(--brand);border-radius:9999px;animation:hm-spin .8s linear infinite}.hm-spinner-sm{width:16px;height:16px;border-width:2px}@keyframes hm-spin{to{transform:rotate(1turn)}}.hm-top-bar{position:fixed;top:0;left:0;right:0;height:3px;z-index:100;overflow:hidden;pointer-events:none}.hm-top-bar:before{content:"";position:absolute;top:0;bottom:0;width:40%;background:var(--accent);animation:hm-top-bar-slide 1.1s ease-in-out infinite}@keyframes hm-top-bar-slide{0%{left:-40%}to{left:100%}}.last\:border-0:last-child{border-width:0}.hover\:border-amber-400:hover{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.hover\:border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.hover\:bg-amber-100:hover{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.hover\:bg-amber-200:hover{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.hover\:bg-amber-50:hover{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.hover\:bg-amber-700:hover{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-cyan-700:hover{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.hover\:bg-emerald-50:hover{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.hover\:bg-emerald-700:hover{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-green-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.hover\:bg-indigo-100:hover{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.hover\:bg-violet-700:hover{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.active\:bg-blue-200:active{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.disabled\:border-gray-300:disabled{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.disabled\:text-gray-300:disabled{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.disabled\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}@media (min-width:640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:p-4{padding:1rem}}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-\[250px\2c 1fr\]{grid-template-columns:250px 1fr}.md\:border-b-0{border-bottom-width:0}.md\:border-r{border-right-width:1px}}@media (min-width:1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}