hunter-mate 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/assets/extension/background/{service-worker.20261019161523.js → service-worker.20261020181646.js} +4 -0
  2. package/dist/assets/extension/background/service-worker.js +4 -0
  3. package/dist/assets/extension/build-info.json +1 -1
  4. package/dist/assets/extension/content/index.js +284 -64
  5. package/dist/assets/extension/manifest.json +3 -3
  6. package/dist/assets/extension/sidepanel/index.html +1 -1
  7. package/dist/assets/extension/sidepanel/index.js +14 -14
  8. package/dist/assets/server/main.mjs +1433 -1205
  9. package/dist/index.js +33 -64
  10. package/dist/watchdog.js +49 -4
  11. package/dist/web/dist/404.html +1 -1
  12. package/dist/web/dist/_next/static/chunks/{253-9278ce6c4d446329.js → 253-f4ac7af6647e4dba.js} +1 -1
  13. package/dist/web/dist/_next/static/chunks/{589-cc56950ae4117cdd.js → 589-5bb84ab8060e960b.js} +1 -1
  14. package/dist/web/dist/_next/static/chunks/{659-122057f46f941df7.js → 659-b23050764c004f5f.js} +1 -1
  15. package/dist/web/dist/_next/static/chunks/{686-05b99d3674f45bf7.js → 686-5f4ee3649cce07f1.js} +1 -1
  16. package/dist/web/dist/_next/static/chunks/896-9dce6a3bc525edba.js +1 -0
  17. package/dist/web/dist/_next/static/chunks/{935-efb30b9f6f558e3f.js → 935-12f1084f0e18c962.js} +1 -1
  18. package/dist/web/dist/_next/static/chunks/app/_not-found/{page-d939b40bb8878d26.js → page-46929212b0496a89.js} +1 -1
  19. package/dist/web/dist/_next/static/chunks/app/admin/data/{page-df1d84c14e85f294.js → page-666f99fbfee46cc9.js} +1 -1
  20. package/dist/web/dist/_next/static/chunks/app/auth/verify/{page-cfeb844e1b72ccaa.js → page-2da5807d6cdfdb4e.js} +1 -1
  21. package/dist/web/dist/_next/static/chunks/app/companies/{page-57b1ef0b12134ce0.js → page-390d5e3073ec151d.js} +1 -1
  22. package/dist/web/dist/_next/static/chunks/app/company/admin/{page-010928306f8df0ed.js → page-02244f3f1a212c76.js} +1 -1
  23. package/dist/web/dist/_next/static/chunks/app/entity/{page-fa96319650d38e78.js → page-d59a8103f8107d3b.js} +1 -1
  24. package/dist/web/dist/_next/static/chunks/app/jobs/{page-5ba0bdc881b98d42.js → page-fa83ce1b6c3b345d.js} +1 -1
  25. package/dist/web/dist/_next/static/chunks/app/layout-15c4c2ba595b2a92.js +1 -0
  26. package/dist/web/dist/_next/static/chunks/app/logs/{page-bcdbb3885abda5a2.js → page-badf48f4e7e32e17.js} +1 -1
  27. package/dist/web/dist/_next/static/chunks/app/matching/jobs/[id]/talents/{page-8aca89db1e666a49.js → page-73bca3864b8b9e44.js} +1 -1
  28. package/dist/web/dist/_next/static/chunks/app/matching/portraits/[id]/jobs/{page-7086f1b773e57511.js → page-477c66bee61225fa.js} +1 -1
  29. package/dist/web/dist/_next/static/chunks/app/{page-49fe1e8630d2237e.js → page-8ea324b366e3d374.js} +1 -1
  30. package/dist/web/dist/_next/static/chunks/app/parselog/{page-fcdfdd41cf1f86f7.js → page-4f5c186442feb386.js} +1 -1
  31. package/dist/web/dist/_next/static/chunks/app/recordings/page-0fb8cafdd2f6762c.js +1 -0
  32. package/dist/web/dist/_next/static/chunks/app/resource-usage/{page-7b939cf673d764e6.js → page-76be36ca978391a3.js} +1 -1
  33. package/dist/web/dist/_next/static/chunks/app/shared/[token]/{page-df87328c52f862f1.js → page-fe2b986867d317c0.js} +1 -1
  34. package/dist/web/dist/_next/static/chunks/app/snapshots/[id]/agent-prompt/{page-7d4d25de2c6704e9.js → page-60ea46364a74b294.js} +1 -1
  35. package/dist/web/dist/_next/static/chunks/app/team/insights/{page-f097b4b8578a6e5d.js → page-5385dcd363f6e0cd.js} +1 -1
  36. package/dist/web/dist/_next/static/chunks/webpack-9cebd25e322e2cd7.js +1 -0
  37. package/dist/web/dist/_next/static/css/8f3c454cab3414d0.css +3 -0
  38. package/dist/web/dist/admin/data.html +1 -1
  39. package/dist/web/dist/admin/data.txt +5 -5
  40. package/dist/web/dist/auth/verify.html +1 -1
  41. package/dist/web/dist/auth/verify.txt +5 -5
  42. package/dist/web/dist/companies.html +1 -1
  43. package/dist/web/dist/companies.txt +5 -5
  44. package/dist/web/dist/company/admin.html +1 -1
  45. package/dist/web/dist/company/admin.txt +5 -5
  46. package/dist/web/dist/entity.html +1 -1
  47. package/dist/web/dist/entity.txt +5 -5
  48. package/dist/web/dist/index.html +1 -1
  49. package/dist/web/dist/index.txt +5 -5
  50. package/dist/web/dist/jobs.html +1 -1
  51. package/dist/web/dist/jobs.txt +5 -5
  52. package/dist/web/dist/logs.html +1 -1
  53. package/dist/web/dist/logs.txt +5 -5
  54. package/dist/web/dist/matching/jobs/placeholder/talents.html +1 -1
  55. package/dist/web/dist/matching/jobs/placeholder/talents.txt +5 -5
  56. package/dist/web/dist/matching/portraits/placeholder/jobs.html +1 -1
  57. package/dist/web/dist/matching/portraits/placeholder/jobs.txt +5 -5
  58. package/dist/web/dist/parselog.html +1 -1
  59. package/dist/web/dist/parselog.txt +5 -5
  60. package/dist/web/dist/recordings.html +1 -1
  61. package/dist/web/dist/recordings.txt +5 -5
  62. package/dist/web/dist/resource-usage.html +1 -1
  63. package/dist/web/dist/resource-usage.txt +5 -5
  64. package/dist/web/dist/shared/placeholder.html +1 -1
  65. package/dist/web/dist/shared/placeholder.txt +5 -5
  66. package/dist/web/dist/snapshots/placeholder/agent-prompt.html +1 -1
  67. package/dist/web/dist/snapshots/placeholder/agent-prompt.txt +5 -5
  68. package/dist/web/dist/talents.html +1 -1
  69. package/dist/web/dist/talents.txt +5 -5
  70. package/dist/web/dist/team/insights.html +1 -1
  71. package/dist/web/dist/team/insights.txt +5 -5
  72. package/package.json +3 -6
  73. package/dist/web/dist/_next/static/chunks/166.b263e636ff66212f.js +0 -1
  74. package/dist/web/dist/_next/static/chunks/app/layout-bd9a7e5e4474b692.js +0 -1
  75. package/dist/web/dist/_next/static/chunks/app/recordings/page-7ba5d89391c9dace.js +0 -1
  76. package/dist/web/dist/_next/static/chunks/webpack-54e74ccc9e9451ee.js +0 -1
  77. package/dist/web/dist/_next/static/css/a8f0a381a2372781.css +0 -3
  78. package/dist/web/dist/_next/static/css/f60d210841fab76b.css +0 -1
  79. /package/dist/web/dist/_next/static/{m0UGHVTGvtvb9mn4-uzJJ → tYFZz41gyWi4-BhxuxlGU}/_buildManifest.js +0 -0
  80. /package/dist/web/dist/_next/static/{m0UGHVTGvtvb9mn4-uzJJ → tYFZz41gyWi4-BhxuxlGU}/_ssgManifest.js +0 -0
package/dist/index.js CHANGED
@@ -4974,7 +4974,7 @@ var require_source = __commonJS({
4974
4974
  }
4975
4975
  });
4976
4976
 
4977
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/updater.js
4977
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/updater.js
4978
4978
  import fs from "node:fs";
4979
4979
  import path from "node:path";
4980
4980
  import { spawnSync } from "node:child_process";
@@ -5100,13 +5100,13 @@ function createCliUpdater(opts) {
5100
5100
  }
5101
5101
  var LAST_CHECK_BASENAME, DEFAULT_INTERVAL_MS;
5102
5102
  var init_updater = __esm({
5103
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/updater.js"() {
5103
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/updater.js"() {
5104
5104
  LAST_CHECK_BASENAME = ".last-cli-update-check";
5105
5105
  DEFAULT_INTERVAL_MS = 60 * 60 * 1e3;
5106
5106
  }
5107
5107
  });
5108
5108
 
5109
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/native-check.js
5109
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/native-check.js
5110
5110
  import { createRequire } from "node:module";
5111
5111
  import path2 from "node:path";
5112
5112
  function abiToNodeLabel(abi) {
@@ -5180,7 +5180,7 @@ function createNativeChecker(opts) {
5180
5180
  }
5181
5181
  var ABI_NODE_MAP;
5182
5182
  var init_native_check = __esm({
5183
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/native-check.js"() {
5183
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/native-check.js"() {
5184
5184
  ABI_NODE_MAP = {
5185
5185
  127: "Node 22",
5186
5186
  131: "Node 23",
@@ -45211,7 +45211,7 @@ var init_esm8 = __esm({
45211
45211
  }
45212
45212
  });
45213
45213
 
45214
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/sentry.js
45214
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/sentry.js
45215
45215
  function isLocalDsn(dsn) {
45216
45216
  try {
45217
45217
  const url2 = new URL(dsn);
@@ -45263,18 +45263,18 @@ function initSentryFromEnv(envPrefix, o = {}) {
45263
45263
  });
45264
45264
  }
45265
45265
  var init_sentry = __esm({
45266
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/sentry.js"() {
45266
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/sentry.js"() {
45267
45267
  init_esm8();
45268
45268
  }
45269
45269
  });
45270
45270
 
45271
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/redactor.js
45271
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/redactor.js
45272
45272
  var init_redactor = __esm({
45273
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/redactor.js"() {
45273
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/redactor.js"() {
45274
45274
  }
45275
45275
  });
45276
45276
 
45277
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/config.js
45277
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/config.js
45278
45278
  import fs2 from "node:fs";
45279
45279
  import path3 from "node:path";
45280
45280
  function createJsonConfigStore(opts) {
@@ -45306,51 +45306,58 @@ function createJsonConfigStore(opts) {
45306
45306
  return store2;
45307
45307
  }
45308
45308
  var init_config = __esm({
45309
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/config.js"() {
45309
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/config.js"() {
45310
45310
  }
45311
45311
  });
45312
45312
 
45313
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/protocol.js
45313
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/protocol.js
45314
45314
  var init_protocol = __esm({
45315
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/protocol.js"() {
45315
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/protocol.js"() {
45316
45316
  }
45317
45317
  });
45318
45318
 
45319
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/usagesink.js
45319
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/url-key.js
45320
+ var init_url_key = __esm({
45321
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/url-key.js"() {
45322
+ }
45323
+ });
45324
+
45325
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/usagesink.js
45320
45326
  var init_usagesink = __esm({
45321
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/usagesink.js"() {
45327
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/usagesink.js"() {
45322
45328
  }
45323
45329
  });
45324
45330
 
45325
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/logsink.js
45331
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/logsink.js
45326
45332
  var init_logsink = __esm({
45327
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/logsink.js"() {
45333
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/logsink.js"() {
45328
45334
  }
45329
45335
  });
45330
45336
 
45331
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/deferred-reload.js
45337
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/deferred-reload.js
45332
45338
  var DEFAULT_PENDING_RELOAD_TTL_MS;
45333
45339
  var init_deferred_reload = __esm({
45334
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/deferred-reload.js"() {
45340
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/deferred-reload.js"() {
45335
45341
  DEFAULT_PENDING_RELOAD_TTL_MS = 30 * 6e4;
45336
45342
  }
45337
45343
  });
45338
45344
 
45339
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/connection.js
45345
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/connection.js
45340
45346
  var init_connection = __esm({
45341
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/connection.js"() {
45347
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/connection.js"() {
45342
45348
  }
45343
45349
  });
45344
45350
 
45345
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/index.js
45351
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/index.js
45346
45352
  var init_dist = __esm({
45347
- "../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/index.js"() {
45353
+ "../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/index.js"() {
45348
45354
  init_updater();
45349
45355
  init_native_check();
45350
45356
  init_sentry();
45351
45357
  init_redactor();
45352
45358
  init_config();
45353
45359
  init_protocol();
45360
+ init_url_key();
45354
45361
  init_usagesink();
45355
45362
  init_logsink();
45356
45363
  init_deferred_reload();
@@ -62809,26 +62816,8 @@ function fallbackDelete() {
62809
62816
  fs4.unlinkSync(tokenFile());
62810
62817
  }
62811
62818
  }
62812
- async function getKeytar() {
62813
- if (process.platform === "linux") return null;
62814
- try {
62815
- const mod = await import("keytar");
62816
- return mod.setPassword ? mod : mod.default || null;
62817
- } catch {
62818
- return null;
62819
- }
62820
- }
62821
62819
  async function saveToken(token, issuer = "local") {
62822
62820
  invalidateSessionCache();
62823
- const payload = JSON.stringify({ token, issuer });
62824
- const keytar = await getKeytar();
62825
- if (keytar) {
62826
- try {
62827
- await keytar.setPassword(SERVICE, ACCOUNT, payload);
62828
- return;
62829
- } catch {
62830
- }
62831
- }
62832
62821
  fallbackSave({ token, issuer });
62833
62822
  }
62834
62823
  async function getToken() {
@@ -62893,35 +62882,18 @@ async function getTokenInfo() {
62893
62882
  return (await getSessionStatus()).info;
62894
62883
  }
62895
62884
  async function getTokenInfoLocal() {
62896
- const keytar = await getKeytar();
62897
- if (keytar) {
62898
- try {
62899
- const raw = await keytar.getPassword(SERVICE, ACCOUNT);
62900
- if (raw) return parseStored(raw);
62901
- } catch {
62902
- }
62903
- }
62904
62885
  return fallbackGet();
62905
62886
  }
62906
62887
  async function deleteToken() {
62907
62888
  invalidateSessionCache();
62908
- const keytar = await getKeytar();
62909
- if (keytar) {
62910
- try {
62911
- await keytar.deletePassword(SERVICE, ACCOUNT);
62912
- } catch {
62913
- }
62914
- }
62915
62889
  fallbackDelete();
62916
62890
  }
62917
- var SERVICE, ACCOUNT, sessionCache, SESSION_CACHE_TTL_MS;
62891
+ var sessionCache, SESSION_CACHE_TTL_MS;
62918
62892
  var init_keychain = __esm({
62919
62893
  "src/keychain.ts"() {
62920
62894
  "use strict";
62921
62895
  init_axios2();
62922
62896
  init_config2();
62923
- SERVICE = "hunter-mate";
62924
- ACCOUNT = "user";
62925
62897
  sessionCache = null;
62926
62898
  SESSION_CACHE_TTL_MS = 6e4;
62927
62899
  }
@@ -71736,7 +71708,7 @@ init_axios2();
71736
71708
  import * as fs23 from "fs";
71737
71709
  import * as path25 from "path";
71738
71710
 
71739
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/diagnose.js
71711
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/diagnose.js
71740
71712
  import { execFile as execFile2 } from "node:child_process";
71741
71713
  function isChromeRunning(platform3 = process.platform) {
71742
71714
  if (platform3 !== "darwin")
@@ -72139,7 +72111,7 @@ ${B3.bold}${B3.cyan}\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
72139
72111
  }
72140
72112
  }
72141
72113
  } catch (e) {
72142
- checks.push({ key: "auth", status: "skip", detail: `\u8DF3\u8FC7(keychain \u8BFB\u53D6\u5931\u8D25): ${e.message}` });
72114
+ checks.push({ key: "auth", status: "skip", detail: `\u8DF3\u8FC7(\u672C\u5730\u7F13\u5B58\u8BFB\u53D6\u5931\u8D25): ${e.message}` });
72143
72115
  }
72144
72116
  let data = null;
72145
72117
  if (serverUp) {
@@ -73776,7 +73748,7 @@ function installLocalProxyBypass() {
73776
73748
  // package.json
73777
73749
  var package_default = {
73778
73750
  name: "hunter-mate",
73779
- version: "0.1.26",
73751
+ version: "0.1.27",
73780
73752
  type: "module",
73781
73753
  description: "HiredChina \u730E\u5934 Agent \u6570\u636E\u52A9\u624B CLI:\u4EBA\u624D\u5E93/\u5BA2\u6237/\u804C\u4F4D\u6570\u636E\u8BBF\u95EE,\u6D4F\u89C8\u5668\u5F55\u5236\u89E3\u6790\u7B80\u5386,server/\u6269\u5C55\u4E00\u81F4\u6027\u81EA\u6108",
73782
73754
  license: "MIT",
@@ -73847,9 +73819,6 @@ var package_default = {
73847
73819
  uuid: "^9.0.0",
73848
73820
  vitest: "^1.3.0",
73849
73821
  ws: "^8.21.3"
73850
- },
73851
- optionalDependencies: {
73852
- keytar: "^7.9.0"
73853
73822
  }
73854
73823
  };
73855
73824
 
package/dist/watchdog.js CHANGED
@@ -35,10 +35,10 @@ function isMainModule(metaUrl) {
35
35
  // src/config.ts
36
36
  import * as path3 from "path";
37
37
 
38
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/updater.js
38
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/updater.js
39
39
  var DEFAULT_INTERVAL_MS = 60 * 60 * 1e3;
40
40
 
41
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/config.js
41
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/config.js
42
42
  import fs2 from "node:fs";
43
43
  import path2 from "node:path";
44
44
  function createJsonConfigStore(opts) {
@@ -70,7 +70,7 @@ function createJsonConfigStore(opts) {
70
70
  return store2;
71
71
  }
72
72
 
73
- // ../../node_modules/.pnpm/@chromepilot+kit@0.1.8_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/deferred-reload.js
73
+ // ../../node_modules/.pnpm/@chromepilot+kit@0.1.13_@sentry+node@10.70.0_@opentelemetry+core@2.10.0_@opentelemetry+api@1.9.1__/node_modules/@chromepilot/kit/dist/deferred-reload.js
74
74
  var DEFAULT_PENDING_RELOAD_TTL_MS = 30 * 6e4;
75
75
 
76
76
  // src/config.ts
@@ -113,9 +113,12 @@ var LivenessProbe = class {
113
113
  timer = null;
114
114
  /** 启动宽限截止:spawn 后这段时间内探测一律跳过(高负载机器 boot 可达 2min+,2026-10-19 实证) */
115
115
  graceUntilMs = 0;
116
+ /** spawn 时刻:maxBootMs 总窗口从这里起算 */
117
+ spawnMs = 0;
116
118
  /** 每次拉起子进程时调用:重设启动宽限并清零失败计数 */
117
119
  markBootStart(graceMs) {
118
120
  this.graceUntilMs = Date.now() + graceMs;
121
+ this.spawnMs = Date.now();
119
122
  this.failCount = 0;
120
123
  }
121
124
  async doCheck() {
@@ -136,13 +139,21 @@ var LivenessProbe = class {
136
139
  await check(this.opts.healthUrl);
137
140
  }
138
141
  /** 立即探测一次并更新失败计数;达到阈值时回调 onFailure 并清零。
139
- * 启动宽限期内直接跳过(子进程尚在 boot,探测无意义且会误判假活)。 */
142
+ * 启动宽限期内直接跳过(子进程尚在 boot,探测无意义且会误判假活)。
143
+ * boot 窗口内日志仍在推进(isBootProgressing)时不计失败;
144
+ * 超过 maxBootMs 后恢复计数,防"永远 boot 中"的僵尸态漏检。 */
140
145
  async checkNow() {
141
146
  if (Date.now() < this.graceUntilMs) return;
142
147
  try {
143
148
  await this.doCheck();
144
149
  this.failCount = 0;
150
+ this.opts.onSuccess?.();
145
151
  } catch (err) {
152
+ const maxBootMs = this.opts.maxBootMs ?? Number.POSITIVE_INFINITY;
153
+ if (this.spawnMs > 0 && Date.now() - this.spawnMs < maxBootMs && this.opts.isBootProgressing?.()) {
154
+ this.failCount = 0;
155
+ return;
156
+ }
146
157
  this.failCount++;
147
158
  if (this.failCount >= this.opts.threshold) {
148
159
  const lastError = err.message;
@@ -247,6 +258,8 @@ async function runWatchdog() {
247
258
  const nodeArgs = parseNodeArgs(process.env.HM_SERVER_NODE_ARGS);
248
259
  const maxRestartDelayMs = Number(process.env.HM_WATCHDOG_MAX_DELAY_MS || "30000");
249
260
  const bootGraceMs = Number(process.env.HM_WATCHDOG_BOOT_GRACE_MS || "150000");
261
+ const maxBootMs = Number(process.env.HM_WATCHDOG_MAX_BOOT_MS || "600000");
262
+ const maxConsecutiveBoots = Number(process.env.HM_WATCHDOG_MAX_CONSECUTIVE_BOOTS || "8");
250
263
  if (!entry || !logFile) {
251
264
  console.error("[HunterMate watchdog] HM_SERVER_ENTRY and HM_SERVER_LOG are required");
252
265
  process.exit(1);
@@ -267,13 +280,31 @@ async function runWatchdog() {
267
280
  }
268
281
  let child = null;
269
282
  let restartCount = 0;
283
+ let consecutiveBoots = 0;
270
284
  let restartTimer = null;
271
285
  let stopping = false;
272
286
  let crashReason;
287
+ let lastLogMtimeMs = 0;
273
288
  const probe = new LivenessProbe({
274
289
  healthUrl,
275
290
  intervalMs: Number(process.env.HM_WATCHDOG_PROBE_INTERVAL_MS || 3e4),
276
291
  threshold: Number(process.env.HM_WATCHDOG_PROBE_THRESHOLD || 3),
292
+ onSuccess: () => {
293
+ restartCount = 0;
294
+ consecutiveBoots = 0;
295
+ },
296
+ isBootProgressing: () => {
297
+ try {
298
+ const m = fs3.statSync(logFile).mtimeMs;
299
+ if (m > lastLogMtimeMs) {
300
+ lastLogMtimeMs = m;
301
+ return true;
302
+ }
303
+ } catch {
304
+ }
305
+ return false;
306
+ },
307
+ maxBootMs,
277
308
  onFailure: (lastError) => {
278
309
  if (stopping || !child || child.killed || child.exitCode !== null) return;
279
310
  console.error(`[HunterMate watchdog] server unresponsive (last error: ${lastError}), killing for restart`);
@@ -300,6 +331,12 @@ async function runWatchdog() {
300
331
  windowsHide: true
301
332
  });
302
333
  if (child.pid) writePid(SERVER_PID_FILE(), child.pid);
334
+ try {
335
+ lastLogMtimeMs = fs3.statSync(logFile).mtimeMs;
336
+ } catch {
337
+ lastLogMtimeMs = 0;
338
+ }
339
+ consecutiveBoots++;
303
340
  probe.markBootStart(bootGraceMs);
304
341
  probe.start();
305
342
  child.on("exit", (code, signal) => {
@@ -317,6 +354,14 @@ async function runWatchdog() {
317
354
  console.log(`[HunterMate watchdog] child exited (code=${code}) but ${healthUrl} healthy (port adopted by another server), stopping restart loop`);
318
355
  process.exit(0);
319
356
  }
357
+ if (consecutiveBoots >= maxConsecutiveBoots) {
358
+ logCrash(code ?? null, signal, restartCount, `circuit breaker: ${consecutiveBoots} consecutive boots without healthy /health, giving up`);
359
+ console.error(
360
+ `[HunterMate watchdog] circuit breaker open: ${consecutiveBoots} consecutive boots without healthy /health. Giving up; restart manually after the machine recovers (hm start / hm doctor).`
361
+ );
362
+ stop();
363
+ process.exit(1);
364
+ }
320
365
  scheduleRestart();
321
366
  });
322
367
  });
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/a8f0a381a2372781.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-54e74ccc9e9451ee.js"/><script src="/_next/static/chunks/a7067448-3f2b194cfadb91fb.js" async=""></script><script src="/_next/static/chunks/935-efb30b9f6f558e3f.js" async=""></script><script src="/_next/static/chunks/main-app-f496bd51a73ef9f3.js" async=""></script><script src="/_next/static/chunks/589-cc56950ae4117cdd.js" async=""></script><script src="/_next/static/chunks/187-f067914dcd1330c2.js" async=""></script><script src="/_next/static/chunks/app/layout-bd9a7e5e4474b692.js" async=""></script><meta name="robots" content="noindex"/><title>HunterMate 采集仪表盘</title><meta name="description" content="HunterMate 采集/解析/入库仪表盘"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex h-screen overflow-hidden bg-gray-50 text-gray-900"><div class="flex h-screen w-screen flex-col items-center justify-center bg-gray-50"><span class="hm-spinner" aria-label="加载中"></span><div class="mt-4 text-sm text-gray-400">正在加载,请稍候…</div></div><script src="/_next/static/chunks/webpack-54e74ccc9e9451ee.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/a8f0a381a2372781.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[76939,[],\"\"]\n4:I[74268,[],\"\"]\n5:I[81050,[],\"\"]\n6:I[15214,[\"589\",\"static/chunks/589-cc56950ae4117cdd.js\",\"187\",\"static/chunks/187-f067914dcd1330c2.js\",\"185\",\"static/chunks/app/layout-bd9a7e5e4474b692.js\"],\"AuthGate\"]\n7:I[67188,[\"589\",\"static/chunks/589-cc56950ae4117cdd.js\",\"187\",\"static/chunks/187-f067914dcd1330c2.js\",\"185\",\"static/chunks/app/layout-bd9a7e5e4474b692.js\"],\"AntdProvider\"]\n8:I[9424,[\"589\",\"static/chunks/589-cc56950ae4117cdd.js\",\"187\",\"static/chunks/187-f067914dcd1330c2.js\",\"185\",\"static/chunks/app/layout-bd9a7e5e4474b692.js\"],\"SystemSidebar\"]\ne:I[62319,[],\"\"]\n9:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\na:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nb:{\"display\":\"inline-block\"}\nc:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nf:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"m0UGHVTGvtvb9mn4-uzJJ\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a8f0a381a2372781.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"children\":[\"$\",\"body\",null,{\"className\":\"flex h-screen overflow-hidden bg-gray-50 text-gray-900\",\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"children\":[[\"$\",\"$L8\",null,{}],[\"$\",\"main\",null,{\"className\":\"flex-1 overflow-hidden\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$a\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$b\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$c\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Ld\"],\"globalErrorComponent\":\"$e\",\"missingSlots\":\"$Wf\"}]\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"HunterMate 采集仪表盘\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"HunterMate 采集/解析/入库仪表盘\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/8f3c454cab3414d0.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9cebd25e322e2cd7.js"/><script src="/_next/static/chunks/a7067448-3f2b194cfadb91fb.js" async=""></script><script src="/_next/static/chunks/935-12f1084f0e18c962.js" async=""></script><script src="/_next/static/chunks/main-app-f496bd51a73ef9f3.js" async=""></script><script src="/_next/static/chunks/589-5bb84ab8060e960b.js" async=""></script><script src="/_next/static/chunks/187-f067914dcd1330c2.js" async=""></script><script src="/_next/static/chunks/app/layout-15c4c2ba595b2a92.js" async=""></script><meta name="robots" content="noindex"/><title>HunterMate 采集仪表盘</title><meta name="description" content="HunterMate 采集/解析/入库仪表盘"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex h-screen overflow-hidden bg-gray-50 text-gray-900"><div class="flex h-screen w-screen flex-col items-center justify-center bg-gray-50"><span class="hm-spinner" aria-label="加载中"></span><div class="mt-4 text-sm text-gray-400">正在加载,请稍候…</div></div><script src="/_next/static/chunks/webpack-9cebd25e322e2cd7.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/8f3c454cab3414d0.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[76939,[],\"\"]\n4:I[74268,[],\"\"]\n5:I[81050,[],\"\"]\n6:I[15214,[\"589\",\"static/chunks/589-5bb84ab8060e960b.js\",\"187\",\"static/chunks/187-f067914dcd1330c2.js\",\"185\",\"static/chunks/app/layout-15c4c2ba595b2a92.js\"],\"AuthGate\"]\n7:I[67188,[\"589\",\"static/chunks/589-5bb84ab8060e960b.js\",\"187\",\"static/chunks/187-f067914dcd1330c2.js\",\"185\",\"static/chunks/app/layout-15c4c2ba595b2a92.js\"],\"AntdProvider\"]\n8:I[9424,[\"589\",\"static/chunks/589-5bb84ab8060e960b.js\",\"187\",\"static/chunks/187-f067914dcd1330c2.js\",\"185\",\"static/chunks/app/layout-15c4c2ba595b2a92.js\"],\"SystemSidebar\"]\ne:I[62319,[],\"\"]\n9:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\na:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nb:{\"display\":\"inline-block\"}\nc:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nf:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"tYFZz41gyWi4-BhxuxlGU\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/8f3c454cab3414d0.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"children\":[\"$\",\"body\",null,{\"className\":\"flex h-screen overflow-hidden bg-gray-50 text-gray-900\",\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"children\":[[\"$\",\"$L8\",null,{}],[\"$\",\"main\",null,{\"className\":\"flex-1 overflow-hidden\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$a\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$b\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$c\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Ld\"],\"globalErrorComponent\":\"$e\",\"missingSlots\":\"$Wf\"}]\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"HunterMate 采集仪表盘\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"HunterMate 采集/解析/入库仪表盘\"}]]\n3:null\n"])</script></body></html>
@@ -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]="9718ccf1-22b2-4fa0-9793-71c183f46705",e._sentryDebugIdIdentifier="sentry-dbid-9718ccf1-22b2-4fa0-9793-71c183f46705")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[253],{94518:function(e,t,n){n.d(t,{m:function(){return r}});var l=n(72835);function r(e){let{filterBar:t,listPanel:n,detailPanel:r}=e;return(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"flex w-80 flex-col border-r border-gray-200 bg-white",children:[t,n]}),(0,l.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:r})]})}},63718:function(e,t,n){n.d(t,{L:function(){return a}});var l=n(72835),r=n(60635);function a(e){let{items:t,selectedId:n,onSelect:a,loading:s,emptyText:i="暂无数据",onLoadMore:c,loadingMore:u,exhausted:o}=e,d=(0,r.useRef)(null);return(0,r.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,l.jsxs)("div",{className:"flex-1 overflow-auto",children:[s?(0,l.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:"加载中…"}):0===t.length?(0,l.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:i}):(0,l.jsx)("ul",{className:"divide-y divide-gray-100",children:t.map(e=>(0,l.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(n===e.id?"bg-blue-50":"hover:bg-gray-50"),children:e.content},e.id))}),c&&!s&&t.length>0&&(0,l.jsx)("div",{ref:d,className:"p-3 text-center text-xs text-gray-400",children:u?"加载更多…":o?"没有更多了":""})]})}},27828:function(e,t,n){n.d(t,{dy:function(){return f},rY:function(){return g},h5:function(){return x},oj:function(){return i}});var l=n(72835),r=n(84704);function a(e){return String(e).padStart(2,"0")}function s(e){let{value:t}=e;if(!t)return null;let n=new Date(t);return Number.isNaN(n.getTime())?null:(0,l.jsx)("span",{title:function(e){let t="string"==typeof e?new Date(e):e;return Number.isNaN(t.getTime())?"":"".concat(t.getFullYear(),"/").concat(a(t.getMonth()+1),"/").concat(a(t.getDate())," ")+"".concat(a(t.getHours()),":").concat(a(t.getMinutes()),":").concat(a(t.getSeconds()))}(n),className:"cursor-default",children:function(e,t){let n="string"==typeof e?new Date(e):e,l=n.getTime();if(Number.isNaN(l))return"";let r=Math.floor(Math.max(0,t.getTime()-l)/6e4);if(r<1)return"刚刚";if(r<60)return"".concat(r," 分钟前");let s=Math.floor(r/60);if(s<24)return"".concat(s," 小时前");let i=Math.floor((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime())/864e5);return i<=1?"昨天":i<30?"".concat(i," 天前"):"".concat(n.getFullYear(),"/").concat(a(n.getMonth()+1),"/").concat(a(n.getDate()))}(n,new Date)})}function i(e){let{name:t,headline:n,source:r,updatedAt:a}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900",children:t}),n?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:n}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{children:r}),(0,l.jsx)("span",{children:"\xb7"})]}):null,(0,l.jsx)(s,{value:a})]})]})}let c={active:"启动中",closed:"结束"},u={recommended:"推荐人才",pending_invite:"待邀请",invited:"已邀请待回复",replied:"已回复待筛选",to_client:"待推荐给客户",interview_pending:"已推荐待安排面试",interview_scheduled:"已安排面试",offer_pending:"待offer",onboarding:"待上班",rejected:"不合适"};function o(e){let{stages:t}=e,n=Object.keys(t).filter(e=>{var n,l;return(null!==(l=null===(n=t[e])||void 0===n?void 0:n.total)&&void 0!==l?l:0)>0});return n.length?(0,l.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:n.map(e=>{var n;let r=t[e],a=null!==(n=u[e])&&void 0!==n?n:e;return(0,l.jsxs)("span",{title:"".concat(a," 今天").concat(r.today,"/本周").concat(r.week,"/全部").concat(r.total),className:"rounded bg-[color:var(--brand-soft)] px-1.5 py-0.5 text-[10px] font-medium",style:{color:"var(--brand)"},children:[a," ",r.today,"/",r.week,"/",r.total]},e)})}):null}function d(e){let{platforms:t}=e;return t.length?(0,l.jsx)("span",{className:"flex items-center gap-0.5",title:t.join("、"),children:t.map(e=>{let t=(0,r.mS)(e);return(0,l.jsx)("span",{title:e,className:"flex h-4 w-4 items-center justify-center rounded bg-[color:var(--brand-soft)] text-[9px] font-semibold",style:{color:t.fg},children:t.label},e)})}):null}function f(e){var t,n;let{title:r,status:a,hmhLocal:i,subtitle:u,customerName:f,opName:x,rsNames:g,time:h,updatedAt:m,createdAt:p,stages:v,platforms:y,myRole:b}=e,j=null!==(t=null!=m?m:h)&&void 0!==t?t:"",N=null!=p?p:"",w=!!j&&!!N&&1e3>Math.abs(new Date(j).getTime()-new Date(N).getTime());return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"truncate font-medium text-gray-900",children:r}),(0,l.jsx)("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-xs ".concat("active"===a?"bg-emerald-100 text-emerald-700":"bg-gray-100 text-gray-500"),children:null!==(n=c[a])&&void 0!==n?n:a}),i?(0,l.jsx)("span",{className:"shrink-0 rounded bg-purple-100 px-1.5 py-0.5 text-xs text-purple-700",children:"本地"}):null,"op"===b?(0,l.jsx)("span",{className:"shrink-0 rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",children:"op"}):null,"rs"===b?(0,l.jsx)("span",{className:"shrink-0 rounded bg-cyan-100 px-1.5 py-0.5 text-xs text-cyan-700",children:"rs"}):null,y?(0,l.jsx)(d,{platforms:y}):null]}),u?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:u}):null,void 0!==f?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:f}):null,x||g&&g.length?(0,l.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-gray-500",children:[x?(0,l.jsxs)("span",{children:["op:",(0,l.jsx)("span",{className:"text-gray-700",children:x})]}):null,g&&g.length?(0,l.jsxs)("span",{children:["rs:",(0,l.jsx)("span",{className:"text-gray-700",children:g.join("、")})]}):null]}):null,v?(0,l.jsx)(o,{stages:v}):null,j?(0,l.jsxs)("div",{className:"mt-0.5 flex items-center justify-between gap-2 text-xs text-gray-400",children:[(0,l.jsx)(s,{value:j}),N&&!w?(0,l.jsx)(s,{value:N}):null]}):null]})}function x(e){var t;let{name:n,headline:r,aiReason:a,overall:i,invitationChannel:c,stageLabel:u,updatedAt:o,onNameClick:d}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,l.jsx)("button",{type:"button",title:"查看人才详情",onClick:e=>{e.stopPropagation(),d()},className:"font-medium text-blue-600 hover:underline",children:n}):(0,l.jsx)("span",{className:"font-medium text-gray-900",children:n}),null!=i?(0,l.jsxs)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-xs text-emerald-700",children:[i,"分"]}):null,c?(0,l.jsx)("span",{className:"rounded bg-sky-100 px-1.5 py-0.5 text-xs text-sky-700",children:null!==(t=({email:"邮件",linkedin:"LinkedIn",wechat:"微信"})[c])&&void 0!==t?t:c}):null]}),a?(0,l.jsxs)("div",{className:"line-clamp-2 text-xs text-gray-600",title:a,children:[(0,l.jsx)("span",{className:"text-blue-500",children:"AI 理由:"}),a]}):r?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:r}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[u?(0,l.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-500",children:u}):null,(0,l.jsx)(s,{value:o})]})]})}function g(e){let{title:t,source:n,company:r,sourceUrl:a,updatedAt:i}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"font-medium text-gray-900",children:t}),(0,l.jsx)("span",{className:"rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",children:n})]}),r?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:r}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[(0,l.jsx)(s,{value:i}),a?(0,l.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"text-blue-500 hover:underline",onClick:e=>e.stopPropagation(),children:"来源"}):null]})]})}},26119:function(e,t,n){n.d(t,{B:function(){return s}});var l=n(72835),r=n(60635),a=n(82182);function s(e){let[t,n]=(0,r.useState)(new Set),[s,i]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[o,d]=(0,r.useState)(null),f=(0,r.useCallback)(e=>{n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),x=(0,r.useCallback)(e=>{let t=new Set(e);n(e=>{let n=new Set(Array.from(e).filter(e=>t.has(e)));return n.size===e.size?e:n})},[]),g=(0,r.useCallback)(()=>n(new Set),[]),h=(0,r.useCallback)(e=>(0,l.jsx)("input",{type:"checkbox",className:"mt-1 accent-blue-600",checked:t.has(e),onChange:()=>f(e),onClick:e=>e.stopPropagation()}),[t,f]),m=(0,r.useCallback)(async()=>{if(!s)return;u(!0),d(null);let t=s.ids;try{var l,r;let s=await fetch(e.deleteUrl,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})});if(!s.ok){let l=await s.json().catch(()=>null),i=null==l?void 0:l.message;if(401===s.status){d("登录已过期,请在弹窗中重新登录;登录后自动继续删除"),(0,a.jr)({message:"string"==typeof i?i:"登录已过期,请重新登录",oldUserId:null!==(r=e.currentUserId)&&void 0!==r?r:null,retry:async()=>{var l;let r=await fetch(e.deleteUrl,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})});if(!r.ok){let e=await r.json().catch(()=>null),t=null==e?void 0:e.message;return d("string"==typeof t?t:"续跑删除仍失败,请稍后重试"),!1}return n(new Set),d("已删除 ".concat(t.length," 条")),null===(l=e.onDeleted)||void 0===l||l.call(e),!0}});return}d("string"==typeof i?i:"操作失败,请稍后重试");return}n(new Set),d("已删除 ".concat(t.length," 条")),null===(l=e.onDeleted)||void 0===l||l.call(e)}finally{u(!1),i(null)}},[s,e.deleteUrl,e.onDeleted,e.currentUserId]),p=(0,r.useCallback)(e=>(0,l.jsxs)("div",{className:"flex items-center gap-3 border-t border-gray-100 px-3 py-2",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-sm text-gray-600",children:[(0,l.jsx)("input",{type:"checkbox",className:"accent-blue-600",checked:e.length>0&&t.size===e.length,onChange:()=>n(t=>t.size===e.length&&e.length>0?new Set:new Set(e.map(e=>String(e.id))))}),"全选"]}),t.size>0&&(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm",children:[(0,l.jsxs)("span",{className:"text-gray-500",children:["已选 ",t.size," 条"]}),(0,l.jsx)("button",{type:"button",onClick:()=>i({ids:Array.from(t).map(Number)}),className:"rounded-lg bg-red-600 px-3 py-1 text-white hover:bg-red-700",children:"删除"})]}),o&&(0,l.jsx)("span",{className:"text-xs text-green-600",children:o})]}),[t,o]);return{selectedIds:t,checkbox:h,prune:x,bar:p,modal:(0,r.useCallback)(()=>s?(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,l.jsxs)("div",{className:"w-96 rounded-xl bg-white p-6 shadow-xl",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"删除确认"}),(0,l.jsxs)("p",{className:"mt-3 text-sm text-gray-600",children:["确定删除选中的 ",s.ids.length," 条",e.label,"吗?删除后不能自行恢复;如误删,请联系管理员找回。"]}),(0,l.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,l.jsx)("button",{type:"button",disabled:c,onClick:()=>i(null),className:"rounded-lg px-4 py-1.5 text-sm text-gray-600 hover:bg-gray-100",children:"取消"}),(0,l.jsx)("button",{type:"button",disabled:c,onClick:()=>void m(),className:"rounded-lg bg-red-600 px-4 py-1.5 text-sm text-white hover:bg-red-700 disabled:opacity-50",children:c?"处理中…":"确定"})]})]})}):null,[s,c,m,e.label]),clear:g}}},93464:function(e,t,n){n.d(t,{k:function(){return r}});var l=n(60635);function r(e){var t,n,r;let a=null!==(t=e.pageSize)&&void 0!==t?t:50,[s,i]=(0,l.useState)([]),[c,u]=(0,l.useState)(0),[o,d]=(0,l.useState)(!0),[f,x]=(0,l.useState)(!1),[g,h]=(0,l.useState)(null),m=(0,l.useRef)(0),p=(0,l.useRef)(!1),v=(0,l.useRef)([]),y=null!==(n=e.byKey)&&void 0!==n?n:e=>String(e.id),b=(0,l.useRef)(0),j=(0,l.useCallback)(async(t,n)=>{let l=++m.current;0===t?d(!0):x(!0),h(null);try{var r;let s=await e.fetchPage(t,a);if(l!==m.current)return;b.current=null!==(r=s.nextOffset)&&void 0!==r?r:t+s.items.length,n&&0===s.items.length?u(e=>Math.min(e,v.current.length)):u(s.total),i(e=>{if(!n)return s.items;let t=new Set(e.map(y));return[...e,...s.items.filter(e=>!t.has(y(e)))]})}catch(e){if(l!==m.current)return;h(e instanceof Error?e.message:"加载失败")}finally{l===m.current&&(d(!1),x(!1),p.current=!1)}},[e.fetchPage,a]);(0,l.useEffect)(()=>{p.current=!0,j(0,!1)},[j,...null!==(r=e.deps)&&void 0!==r?r:[]]),(0,l.useEffect)(()=>{v.current=s},[s]);let N=(0,l.useCallback)(()=>{!p.current&&(v.current.length>=c||(p.current=!0,j(b.current,!0)))},[j,c]),w=(0,l.useCallback)(()=>{p.current=!0,b.current=0,j(0,!1)},[j]);return{items:s,total:c,loading:o,loadingMore:f,exhausted:!o&&s.length>=c,error:g,loadMore:N,refresh:w}}},65777:function(e,t,n){let l;n.d(t,{Cd:function(){return S},Xc:function(){return C},aG:function(){return w},cp:function(){return k},nu:function(){return N},tQ:function(){return E}});var r=n(60635),a=n(74431),s=n(67002),i=n(60529);let c=null,u=null,o=null,d=new Set;function f(){d.forEach(e=>e())}function x(e){c=c?{...c,refreshing:e}:{...y,refreshing:e},f()}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 m(){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){c=c?{...c,loadError:"本地服务无响应"}:{...y,loadError:"本地服务无响应"},f();return}c={session:null!=t?t:{loggedIn:!1},sync:a,utoken:(0,s.Xc)(),loadError:null,refreshing:!1,authStatus:i?"in":"out",refresh:p},f()}finally{(null==c?void 0:c.refreshing)&&x(!1)}}function p(){return u||(u=m().finally(()=>{u=null}))}function v(e){return d.add(e),1===d.size&&(p(),o=setInterval(()=>void p(),6e4)),()=>{d.delete(e),0===d.size&&o&&(clearInterval(o),o=null)}}let y={session:null,sync:null,utoken:null,loadError:null,refreshing:!1,authStatus:"loading",refresh:p};function b(){return null!=c?c:y}function j(){return b()}function N(){return(0,r.useSyncExternalStore)(v,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 k(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 S(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 C(){return(0,s.Xc)()}},82182:function(e,t,n){n.d(t,{H7:function(){return o},jr:function(){return s},mn:function(){return u},nk:function(){return c},qd:function(){return i}});let l=null,r=new Set;function a(){r.forEach(e=>e())}function s(e){l=e,a()}function i(){l&&(l=null,a())}function c(){return l}function u(e){return r.add(e),()=>r.delete(e)}function o(e){if(!e)return null;try{var t,n,l,r,a;let s=e.split(".")[1],i=JSON.parse(decodeURIComponent(escape(atob(s.replace(/-/g,"+").replace(/_/g,"/"))))),c=null!==(a=null!==(r=null!==(l=null==i?void 0:null===(t=i.data)||void 0===t?void 0:t._id)&&void 0!==l?l:null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.id)&&void 0!==r?r:null==i?void 0:i.sub)&&void 0!==a?a:null;return"number"==typeof c?c:null}catch(e){return null}}},8448:function(e,t,n){n.d(t,{d3:function(){return l}});function l(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("zh-CN",{hour12:!1}):""}},74431:function(e,t,n){n.d(t,{Ox:function(){return a},aA:function(){return c}});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 c(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):"响应解析失败")}}},84704:function(e,t,n){n.d(t,{mS:function(){return r}});let l={linkedin:{label:"in",fg:"#0a66c2"},builtin:{label:"bi",fg:"#5c2d91"},lagou:{label:"拉",fg:"#00b38a"},zhaopin:{label:"智",fg:"#ff7f00"},"51job":{label:"前",fg:"#ff6000"},liepin:{label:"猎",fg:"#008ccb"},boss:{label:"B",fg:"#00bebd"}};function r(e){var t;return null!==(t=l[e.replace(/^www\./,"").split(".")[0].toLowerCase()])&&void 0!==t?t:{label:e.slice(0,1).toUpperCase(),fg:"var(--brand)"}}},67002:function(e,t,n){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)}}}}]);
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]="48493fbd-acd1-451a-9644-620723a18a83",e._sentryDebugIdIdentifier="sentry-dbid-48493fbd-acd1-451a-9644-620723a18a83")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[253],{94518:function(e,t,n){n.d(t,{m:function(){return r}});var l=n(72835);function r(e){let{filterBar:t,listPanel:n,detailPanel:r}=e;return(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"flex w-80 flex-col border-r border-gray-200 bg-white",children:[t,n]}),(0,l.jsx)("div",{className:"flex-1 overflow-auto bg-gray-50 p-6",children:r})]})}},63718:function(e,t,n){n.d(t,{L:function(){return a}});var l=n(72835),r=n(60635);function a(e){let{items:t,selectedId:n,onSelect:a,loading:s,emptyText:i="暂无数据",onLoadMore:c,loadingMore:u,exhausted:o}=e,d=(0,r.useRef)(null);return(0,r.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,l.jsxs)("div",{className:"flex-1 overflow-auto",children:[s?(0,l.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:"加载中…"}):0===t.length?(0,l.jsx)("div",{className:"p-4 text-center text-sm text-gray-400",children:i}):(0,l.jsx)("ul",{className:"divide-y divide-gray-100",children:t.map(e=>(0,l.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(n===e.id?"bg-blue-50":"hover:bg-gray-50"),children:e.content},e.id))}),c&&!s&&t.length>0&&(0,l.jsx)("div",{ref:d,className:"p-3 text-center text-xs text-gray-400",children:u?"加载更多…":o?"没有更多了":""})]})}},27828:function(e,t,n){n.d(t,{dy:function(){return f},rY:function(){return g},h5:function(){return x},oj:function(){return i}});var l=n(72835),r=n(84704);function a(e){return String(e).padStart(2,"0")}function s(e){let{value:t}=e;if(!t)return null;let n=new Date(t);return Number.isNaN(n.getTime())?null:(0,l.jsx)("span",{title:function(e){let t="string"==typeof e?new Date(e):e;return Number.isNaN(t.getTime())?"":"".concat(t.getFullYear(),"/").concat(a(t.getMonth()+1),"/").concat(a(t.getDate())," ")+"".concat(a(t.getHours()),":").concat(a(t.getMinutes()),":").concat(a(t.getSeconds()))}(n),className:"cursor-default",children:function(e,t){let n="string"==typeof e?new Date(e):e,l=n.getTime();if(Number.isNaN(l))return"";let r=Math.floor(Math.max(0,t.getTime()-l)/6e4);if(r<1)return"刚刚";if(r<60)return"".concat(r," 分钟前");let s=Math.floor(r/60);if(s<24)return"".concat(s," 小时前");let i=Math.floor((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime())/864e5);return i<=1?"昨天":i<30?"".concat(i," 天前"):"".concat(n.getFullYear(),"/").concat(a(n.getMonth()+1),"/").concat(a(n.getDate()))}(n,new Date)})}function i(e){let{name:t,headline:n,source:r,updatedAt:a}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900",children:t}),n?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:n}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{children:r}),(0,l.jsx)("span",{children:"\xb7"})]}):null,(0,l.jsx)(s,{value:a})]})]})}let c={active:"启动中",closed:"结束"},u={recommended:"推荐人才",pending_invite:"待邀请",invited:"已邀请待回复",replied:"已回复待筛选",to_client:"待推荐给客户",interview_pending:"已推荐待安排面试",interview_scheduled:"已安排面试",offer_pending:"待offer",onboarding:"待上班",rejected:"不合适"};function o(e){let{stages:t}=e,n=Object.keys(t).filter(e=>{var n,l;return(null!==(l=null===(n=t[e])||void 0===n?void 0:n.total)&&void 0!==l?l:0)>0});return n.length?(0,l.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:n.map(e=>{var n;let r=t[e],a=null!==(n=u[e])&&void 0!==n?n:e;return(0,l.jsxs)("span",{title:"".concat(a," 今天").concat(r.today,"/本周").concat(r.week,"/全部").concat(r.total),className:"rounded bg-[color:var(--brand-soft)] px-1.5 py-0.5 text-[10px] font-medium",style:{color:"var(--brand)"},children:[a," ",r.today,"/",r.week,"/",r.total]},e)})}):null}function d(e){let{platforms:t}=e;return t.length?(0,l.jsx)("span",{className:"flex items-center gap-0.5",title:t.join("、"),children:t.map(e=>{let t=(0,r.mS)(e);return(0,l.jsx)("span",{title:e,className:"flex h-4 w-4 items-center justify-center rounded bg-[color:var(--brand-soft)] text-[9px] font-semibold",style:{color:t.fg},children:t.label},e)})}):null}function f(e){var t,n;let{title:r,status:a,hmhLocal:i,subtitle:u,customerName:f,opName:x,rsNames:g,time:h,updatedAt:m,createdAt:p,stages:v,platforms:y,myRole:b}=e,j=null!==(t=null!=m?m:h)&&void 0!==t?t:"",N=null!=p?p:"",w=!!j&&!!N&&1e3>Math.abs(new Date(j).getTime()-new Date(N).getTime());return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"truncate font-medium text-gray-900",children:r}),(0,l.jsx)("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-xs ".concat("active"===a?"bg-emerald-100 text-emerald-700":"bg-gray-100 text-gray-500"),children:null!==(n=c[a])&&void 0!==n?n:a}),i?(0,l.jsx)("span",{className:"shrink-0 rounded bg-purple-100 px-1.5 py-0.5 text-xs text-purple-700",children:"本地"}):null,"op"===b?(0,l.jsx)("span",{className:"shrink-0 rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",children:"op"}):null,"rs"===b?(0,l.jsx)("span",{className:"shrink-0 rounded bg-cyan-100 px-1.5 py-0.5 text-xs text-cyan-700",children:"rs"}):null,y?(0,l.jsx)(d,{platforms:y}):null]}),u?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:u}):null,void 0!==f?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:f}):null,x||g&&g.length?(0,l.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-gray-500",children:[x?(0,l.jsxs)("span",{children:["op:",(0,l.jsx)("span",{className:"text-gray-700",children:x})]}):null,g&&g.length?(0,l.jsxs)("span",{children:["rs:",(0,l.jsx)("span",{className:"text-gray-700",children:g.join("、")})]}):null]}):null,v?(0,l.jsx)(o,{stages:v}):null,j?(0,l.jsxs)("div",{className:"mt-0.5 flex items-center justify-between gap-2 text-xs text-gray-400",children:[(0,l.jsx)(s,{value:j}),N&&!w?(0,l.jsx)(s,{value:N}):null]}):null]})}function x(e){var t;let{name:n,headline:r,aiReason:a,overall:i,invitationChannel:c,stageLabel:u,updatedAt:o,onNameClick:d}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,l.jsx)("button",{type:"button",title:"查看人才详情",onClick:e=>{e.stopPropagation(),d()},className:"font-medium text-blue-600 hover:underline",children:n}):(0,l.jsx)("span",{className:"font-medium text-gray-900",children:n}),null!=i?(0,l.jsxs)("span",{className:"rounded bg-emerald-100 px-1.5 py-0.5 text-xs text-emerald-700",children:[i,"分"]}):null,c?(0,l.jsx)("span",{className:"rounded bg-sky-100 px-1.5 py-0.5 text-xs text-sky-700",children:null!==(t=({email:"邮件",linkedin:"LinkedIn",wechat:"微信"})[c])&&void 0!==t?t:c}):null]}),a?(0,l.jsxs)("div",{className:"line-clamp-2 text-xs text-gray-600",title:a,children:[(0,l.jsx)("span",{className:"text-blue-500",children:"AI 理由:"}),a]}):r?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:r}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[u?(0,l.jsx)("span",{className:"rounded bg-gray-100 px-1.5 py-0.5 text-xs text-gray-500",children:u}):null,(0,l.jsx)(s,{value:o})]})]})}function g(e){let{title:t,source:n,company:r,sourceUrl:a,updatedAt:i}=e;return(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"font-medium text-gray-900",children:t}),(0,l.jsx)("span",{className:"rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",children:n})]}),r?(0,l.jsx)("div",{className:"truncate text-xs text-gray-500",children:r}):null,(0,l.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-xs text-gray-400",children:[(0,l.jsx)(s,{value:i}),a?(0,l.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"text-blue-500 hover:underline",onClick:e=>e.stopPropagation(),children:"来源"}):null]})]})}},26119:function(e,t,n){n.d(t,{B:function(){return s}});var l=n(72835),r=n(60635),a=n(82182);function s(e){let[t,n]=(0,r.useState)(new Set),[s,i]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[o,d]=(0,r.useState)(null),f=(0,r.useCallback)(e=>{n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),x=(0,r.useCallback)(e=>{let t=new Set(e);n(e=>{let n=new Set(Array.from(e).filter(e=>t.has(e)));return n.size===e.size?e:n})},[]),g=(0,r.useCallback)(()=>n(new Set),[]),h=(0,r.useCallback)(e=>(0,l.jsx)("input",{type:"checkbox",className:"mt-1 accent-blue-600",checked:t.has(e),onChange:()=>f(e),onClick:e=>e.stopPropagation()}),[t,f]),m=(0,r.useCallback)(async()=>{if(!s)return;u(!0),d(null);let t=s.ids;try{var l,r;let s=await fetch(e.deleteUrl,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})});if(!s.ok){let l=await s.json().catch(()=>null),i=null==l?void 0:l.message;if(401===s.status){d("登录已过期,请在弹窗中重新登录;登录后自动继续删除"),(0,a.jr)({message:"string"==typeof i?i:"登录已过期,请重新登录",oldUserId:null!==(r=e.currentUserId)&&void 0!==r?r:null,retry:async()=>{var l;let r=await fetch(e.deleteUrl,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})});if(!r.ok){let e=await r.json().catch(()=>null),t=null==e?void 0:e.message;return d("string"==typeof t?t:"续跑删除仍失败,请稍后重试"),!1}return n(new Set),d("已删除 ".concat(t.length," 条")),null===(l=e.onDeleted)||void 0===l||l.call(e),!0}});return}d("string"==typeof i?i:"操作失败,请稍后重试");return}n(new Set),d("已删除 ".concat(t.length," 条")),null===(l=e.onDeleted)||void 0===l||l.call(e)}finally{u(!1),i(null)}},[s,e.deleteUrl,e.onDeleted,e.currentUserId]),p=(0,r.useCallback)(e=>(0,l.jsxs)("div",{className:"flex items-center gap-3 border-t border-gray-100 px-3 py-2",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-sm text-gray-600",children:[(0,l.jsx)("input",{type:"checkbox",className:"accent-blue-600",checked:e.length>0&&t.size===e.length,onChange:()=>n(t=>t.size===e.length&&e.length>0?new Set:new Set(e.map(e=>String(e.id))))}),"全选"]}),t.size>0&&(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm",children:[(0,l.jsxs)("span",{className:"text-gray-500",children:["已选 ",t.size," 条"]}),(0,l.jsx)("button",{type:"button",onClick:()=>i({ids:Array.from(t).map(Number)}),className:"rounded-lg bg-red-600 px-3 py-1 text-white hover:bg-red-700",children:"删除"})]}),o&&(0,l.jsx)("span",{className:"text-xs text-green-600",children:o})]}),[t,o]);return{selectedIds:t,checkbox:h,prune:x,bar:p,modal:(0,r.useCallback)(()=>s?(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,l.jsxs)("div",{className:"w-96 rounded-xl bg-white p-6 shadow-xl",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"删除确认"}),(0,l.jsxs)("p",{className:"mt-3 text-sm text-gray-600",children:["确定删除选中的 ",s.ids.length," 条",e.label,"吗?删除后不能自行恢复;如误删,请联系管理员找回。"]}),(0,l.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,l.jsx)("button",{type:"button",disabled:c,onClick:()=>i(null),className:"rounded-lg px-4 py-1.5 text-sm text-gray-600 hover:bg-gray-100",children:"取消"}),(0,l.jsx)("button",{type:"button",disabled:c,onClick:()=>void m(),className:"rounded-lg bg-red-600 px-4 py-1.5 text-sm text-white hover:bg-red-700 disabled:opacity-50",children:c?"处理中…":"确定"})]})]})}):null,[s,c,m,e.label]),clear:g}}},93464:function(e,t,n){n.d(t,{k:function(){return r}});var l=n(60635);function r(e){var t,n,r;let a=null!==(t=e.pageSize)&&void 0!==t?t:50,[s,i]=(0,l.useState)([]),[c,u]=(0,l.useState)(0),[o,d]=(0,l.useState)(!0),[f,x]=(0,l.useState)(!1),[g,h]=(0,l.useState)(null),m=(0,l.useRef)(0),p=(0,l.useRef)(!1),v=(0,l.useRef)([]),y=null!==(n=e.byKey)&&void 0!==n?n:e=>String(e.id),b=(0,l.useRef)(0),j=(0,l.useCallback)(async(t,n)=>{let l=++m.current;0===t?d(!0):x(!0),h(null);try{var r;let s=await e.fetchPage(t,a);if(l!==m.current)return;b.current=null!==(r=s.nextOffset)&&void 0!==r?r:t+s.items.length,n&&0===s.items.length?u(e=>Math.min(e,v.current.length)):u(s.total),i(e=>{if(!n)return s.items;let t=new Set(e.map(y));return[...e,...s.items.filter(e=>!t.has(y(e)))]})}catch(e){if(l!==m.current)return;h(e instanceof Error?e.message:"加载失败")}finally{l===m.current&&(d(!1),x(!1),p.current=!1)}},[e.fetchPage,a]);(0,l.useEffect)(()=>{p.current=!0,j(0,!1)},[j,...null!==(r=e.deps)&&void 0!==r?r:[]]),(0,l.useEffect)(()=>{v.current=s},[s]);let N=(0,l.useCallback)(()=>{!p.current&&(v.current.length>=c||(p.current=!0,j(b.current,!0)))},[j,c]),w=(0,l.useCallback)(()=>{p.current=!0,b.current=0,j(0,!1)},[j]);return{items:s,total:c,loading:o,loadingMore:f,exhausted:!o&&s.length>=c,error:g,loadMore:N,refresh:w}}},65777:function(e,t,n){let l;n.d(t,{Cd:function(){return S},Xc:function(){return C},aG:function(){return w},cp:function(){return k},nu:function(){return N},tQ:function(){return E}});var r=n(60635),a=n(74431),s=n(67002),i=n(60529);let c=null,u=null,o=null,d=new Set;function f(){d.forEach(e=>e())}function x(e){c=c?{...c,refreshing:e}:{...y,refreshing:e},f()}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 m(){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){c=c?{...c,loadError:"本地服务无响应"}:{...y,loadError:"本地服务无响应"},f();return}c={session:null!=t?t:{loggedIn:!1},sync:a,utoken:(0,s.Xc)(),loadError:null,refreshing:!1,authStatus:i?"in":"out",refresh:p},f()}finally{(null==c?void 0:c.refreshing)&&x(!1)}}function p(){return u||(u=m().finally(()=>{u=null}))}function v(e){return d.add(e),1===d.size&&(p(),o=setInterval(()=>void p(),6e4)),()=>{d.delete(e),0===d.size&&o&&(clearInterval(o),o=null)}}let y={session:null,sync:null,utoken:null,loadError:null,refreshing:!1,authStatus:"loading",refresh:p};function b(){return null!=c?c:y}function j(){return b()}function N(){return(0,r.useSyncExternalStore)(v,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 k(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 S(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 C(){return(0,s.Xc)()}},82182:function(e,t,n){n.d(t,{H7:function(){return o},jr:function(){return s},mn:function(){return u},nk:function(){return c},qd:function(){return i}});let l=null,r=new Set;function a(){r.forEach(e=>e())}function s(e){l=e,a()}function i(){l&&(l=null,a())}function c(){return l}function u(e){return r.add(e),()=>r.delete(e)}function o(e){if(!e)return null;try{var t,n,l,r,a;let s=e.split(".")[1],i=JSON.parse(decodeURIComponent(escape(atob(s.replace(/-/g,"+").replace(/_/g,"/"))))),c=null!==(a=null!==(r=null!==(l=null==i?void 0:null===(t=i.data)||void 0===t?void 0:t._id)&&void 0!==l?l:null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.id)&&void 0!==r?r:null==i?void 0:i.sub)&&void 0!==a?a:null;return"number"==typeof c?c:null}catch(e){return null}}},8448:function(e,t,n){n.d(t,{d3:function(){return l}});function l(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("zh-CN",{hour12:!1}):""}},74431:function(e,t,n){n.d(t,{Ox:function(){return a},aA:function(){return c}});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 c(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):"响应解析失败")}}},84704:function(e,t,n){n.d(t,{mS:function(){return r}});let l={linkedin:{label:"in",fg:"#0a66c2"},builtin:{label:"bi",fg:"#5c2d91"},lagou:{label:"拉",fg:"#00b38a"},zhaopin:{label:"智",fg:"#ff7f00"},"51job":{label:"前",fg:"#ff6000"},liepin:{label:"猎",fg:"#008ccb"},boss:{label:"B",fg:"#00bebd"}};function r(e){var t;return null!==(t=l[e.replace(/^www\./,"").split(".")[0].toLowerCase()])&&void 0!==t?t:{label:e.slice(0,1).toUpperCase(),fg:"var(--brand)"}}},67002:function(e,t,n){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)}}}}]);
@@ -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]="beff98e4-a5fb-421e-919d-56b39aca277c",e._sentryDebugIdIdentifier="sentry-dbid-beff98e4-a5fb-421e-919d-56b39aca277c")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{55589:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(66867),o=n.n(r)},34656:function(e,t,n){function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(62693),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},66867:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return j}});let r=n(98422),o=n(72835),l=r._(n(60635)),u=n(86197),f=n(3076),a=n(87119),i=n(55898),c=n(54828),d=n(41931),s=n(13700),p=n(6274),b=n(34656),y=n(61533),h=n(26e3),v=new Set;function g(e,t,n,r,o,l){if("undefined"!=typeof window&&(l||(0,f.isLocalURL)(t))){if(!r.bypassPrefetchedCheck){let o=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(o))return;v.add(o)}(async()=>l?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function _(e){return"string"==typeof e?e:(0,a.formatUrl)(e)}let j=l.default.forwardRef(function(e,t){let n,r;let{href:a,as:v,children:j,prefetch:k=null,passHref:C,replace:m,shallow:M,scroll:P,locale:w,onClick:O,onMouseEnter:E,onTouchStart:I,legacyBehavior:L=!1,...x}=e;n=j,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let R=l.default.useContext(d.RouterContext),D=l.default.useContext(s.AppRouterContext),T=null!=R?R:D,S=!R,U=!1!==k,K=null===k?h.PrefetchKind.AUTO:h.PrefetchKind.FULL,{href:A,as:N}=l.default.useMemo(()=>{if(!R){let e=_(a);return{href:e,as:v?_(v):e}}let[e,t]=(0,u.resolveHref)(R,a,!0);return{href:e,as:v?(0,u.resolveHref)(R,v):t||e}},[R,a,v]),H=l.default.useRef(A),q=l.default.useRef(N);L&&(r=l.default.Children.only(n));let z=L?r&&"object"==typeof r&&r.ref:t,[B,F,G]=(0,p.useIntersection)({rootMargin:"200px"}),J=l.default.useCallback(e=>{(q.current!==N||H.current!==A)&&(G(),q.current=N,H.current=A),B(e),z&&("function"==typeof z?z(e):"object"==typeof z&&(z.current=e))},[N,z,A,G,B]);l.default.useEffect(()=>{T&&F&&U&&g(T,A,N,{locale:w},{kind:K},S)},[N,A,F,w,U,null==R?void 0:R.locale,T,S,K]);let Q={ref:J,onClick(e){L||"function"!=typeof O||O(e),L&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,n,r,o,u,a,i,c){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,f.isLocalURL)(n)))return;e.preventDefault();let s=()=>{let e=null==a||a;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:u,locale:i,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};c?l.default.startTransition(s):s()}(e,T,A,N,m,M,P,w,S)},onMouseEnter(e){L||"function"!=typeof E||E(e),L&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),T&&(U||!S)&&g(T,A,N,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:K},S)},onTouchStart:function(e){L||"function"!=typeof I||I(e),L&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),T&&(U||!S)&&g(T,A,N,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:K},S)}};if((0,i.isAbsoluteUrl)(N))Q.href=N;else if(!L||C||"a"===r.type&&!("href"in r.props)){let e=void 0!==w?w:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,b.getDomainLocale)(N,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);Q.href=t||(0,y.addBasePath)((0,c.addLocale)(N,e,null==R?void 0:R.defaultLocale))}return L?l.default.cloneElement(r,Q):(0,o.jsx)("a",{...x,...Q,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6274:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return a}});let r=n(60635),o=n(71935),l="function"==typeof IntersectionObserver,u=new Map,f=[];function a(e){let{rootRef:t,rootMargin:n,disabled:a}=e,i=a||!l,[c,d]=(0,r.useState)(!1),s=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{s.current=e},[]);return(0,r.useEffect)(()=>{if(l){if(i||c)return;let e=s.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:l}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=f.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=u.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},f.push(n),u.set(n,t),t}(n);return l.set(e,t),o.observe(e),function(){if(l.delete(e),o.unobserve(e),0===l.size){o.disconnect(),u.delete(r);let e=f.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&f.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,o.requestIdleCallback)(()=>d(!0));return()=>(0,o.cancelIdleCallback)(e)}},[i,n,t,c,s.current]),[p,c,(0,r.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
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]="7c7b2463-5305-4866-9152-d1d5bed1d314",e._sentryDebugIdIdentifier="sentry-dbid-7c7b2463-5305-4866-9152-d1d5bed1d314")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{55589:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(66867),o=n.n(r)},34656:function(e,t,n){function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(62693),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},66867:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return j}});let r=n(98422),o=n(72835),l=r._(n(60635)),u=n(86197),f=n(3076),a=n(87119),i=n(55898),c=n(54828),d=n(41931),s=n(13700),p=n(6274),b=n(34656),y=n(61533),h=n(26e3),v=new Set;function g(e,t,n,r,o,l){if("undefined"!=typeof window&&(l||(0,f.isLocalURL)(t))){if(!r.bypassPrefetchedCheck){let o=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(o))return;v.add(o)}(async()=>l?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function _(e){return"string"==typeof e?e:(0,a.formatUrl)(e)}let j=l.default.forwardRef(function(e,t){let n,r;let{href:a,as:v,children:j,prefetch:k=null,passHref:C,replace:m,shallow:M,scroll:P,locale:w,onClick:O,onMouseEnter:E,onTouchStart:I,legacyBehavior:L=!1,...x}=e;n=j,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let R=l.default.useContext(d.RouterContext),D=l.default.useContext(s.AppRouterContext),T=null!=R?R:D,S=!R,U=!1!==k,K=null===k?h.PrefetchKind.AUTO:h.PrefetchKind.FULL,{href:A,as:N}=l.default.useMemo(()=>{if(!R){let e=_(a);return{href:e,as:v?_(v):e}}let[e,t]=(0,u.resolveHref)(R,a,!0);return{href:e,as:v?(0,u.resolveHref)(R,v):t||e}},[R,a,v]),H=l.default.useRef(A),q=l.default.useRef(N);L&&(r=l.default.Children.only(n));let z=L?r&&"object"==typeof r&&r.ref:t,[B,F,G]=(0,p.useIntersection)({rootMargin:"200px"}),J=l.default.useCallback(e=>{(q.current!==N||H.current!==A)&&(G(),q.current=N,H.current=A),B(e),z&&("function"==typeof z?z(e):"object"==typeof z&&(z.current=e))},[N,z,A,G,B]);l.default.useEffect(()=>{T&&F&&U&&g(T,A,N,{locale:w},{kind:K},S)},[N,A,F,w,U,null==R?void 0:R.locale,T,S,K]);let Q={ref:J,onClick(e){L||"function"!=typeof O||O(e),L&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,n,r,o,u,a,i,c){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,f.isLocalURL)(n)))return;e.preventDefault();let s=()=>{let e=null==a||a;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:u,locale:i,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};c?l.default.startTransition(s):s()}(e,T,A,N,m,M,P,w,S)},onMouseEnter(e){L||"function"!=typeof E||E(e),L&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),T&&(U||!S)&&g(T,A,N,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:K},S)},onTouchStart:function(e){L||"function"!=typeof I||I(e),L&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),T&&(U||!S)&&g(T,A,N,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:K},S)}};if((0,i.isAbsoluteUrl)(N))Q.href=N;else if(!L||C||"a"===r.type&&!("href"in r.props)){let e=void 0!==w?w:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,b.getDomainLocale)(N,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);Q.href=t||(0,y.addBasePath)((0,c.addLocale)(N,e,null==R?void 0:R.defaultLocale))}return L?l.default.cloneElement(r,Q):(0,o.jsx)("a",{...x,...Q,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6274:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return a}});let r=n(60635),o=n(71935),l="function"==typeof IntersectionObserver,u=new Map,f=[];function a(e){let{rootRef:t,rootMargin:n,disabled:a}=e,i=a||!l,[c,d]=(0,r.useState)(!1),s=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{s.current=e},[]);return(0,r.useEffect)(()=>{if(l){if(i||c)return;let e=s.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:l}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=f.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=u.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},f.push(n),u.set(n,t),t}(n);return l.set(e,t),o.observe(e),function(){if(l.delete(e),o.unobserve(e),0===l.size){o.disconnect(),u.delete(r);let e=f.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&f.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,o.requestIdleCallback)(()=>d(!0));return()=>(0,o.cancelIdleCallback)(e)}},[i,n,t,c,s.current]),[p,c,(0,r.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);