six-degrees 0.4.8 → 0.4.9
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.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +6 -0
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +12 -12
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +11 -11
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js +2 -1
- package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/company-scores/route.js +2 -1
- package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/scraper/route.js +2 -2
- package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/route.js +3 -2
- package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js +2 -1
- package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js +2 -1
- package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/messages/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/social/messages/route/build-manifest.json +12 -0
- package/.next/standalone/.next/server/app/api/social/messages/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/social/messages/route.js +9 -0
- package/.next/standalone/.next/server/app/api/social/messages/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/social/messages/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/social/messages/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/social/route.js +4 -2
- package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/import.html +1 -1
- package/.next/standalone/.next/server/app/import.rsc +14 -14
- package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/launch.html +2 -2
- package/.next/standalone/.next/server/app/launch.rsc +14 -14
- package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/paths.html +1 -1
- package/.next/standalone/.next/server/app/paths.rsc +14 -14
- package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/profile.html +1 -1
- package/.next/standalone/.next/server/app/profile.rsc +14 -14
- package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/queue.html +1 -1
- package/.next/standalone/.next/server/app/queue.rsc +14 -14
- package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/scores.html +1 -1
- package/.next/standalone/.next/server/app/scores.rsc +14 -14
- package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +14 -14
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup.html +1 -1
- package/.next/standalone/.next/server/app/setup.rsc +14 -14
- package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/social.html +1 -1
- package/.next/standalone/.next/server/app/social.rsc +14 -14
- package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06mi9k2._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08f5awg._.js +8 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bat8nx._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__17hjtzl._.js +8 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__20tmem7._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0ea9qwy._.js +3 -0
- package/.next/standalone/.next/server/chunks/_1_fynia._.js +6 -6
- package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
- package/.next/standalone/.next/server/chunks/_1xh07bp._.js +1 -1
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_social_messages_route_actions_0skh09r.js +3 -0
- package/.next/standalone/.next/server/chunks/lib_18cr1gi._.js +8 -0
- package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_03i8xef.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_08fc3rp.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_08r2t_q.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_0btpv1t.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_0c9d9ti.js +5 -5
- package/.next/standalone/.next/server/chunks/lib_rpc_0cm2ev3.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_0iovswz.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_0is8flp.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_0v8ajtd.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_0xgmvvt.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_144mzbf.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_1bggi0n.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_1dkcu9f.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_rpc_1o0jb6w.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_scoring_1-e4ur0.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_next_1zc5q0a._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1feicqq._.js → [root-of-the-server]__0qdeuyo._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0c_y09g._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ezj4e0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_1mj739k._.js → _0l8cxmo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_1errbuf._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0wxbq78._.js → app_components_19c2d9c._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_components_ui_0pdmz2z.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/app_paths_page_1ol90m7.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_profile_page_0u3-l5y.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_queue_page_0c6znd6.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_scores_page_09wepvv.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_social_page_0h7zxda.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_1wax83z._.js → node_modules_0h91jdk._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_1nkgb45._.js → node_modules_1f8t_rp._.js} +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/{static/chunks/1z-zp93cyoxvz.js → standalone/.next/static/chunks/04bbi55urkrd6.js} +1 -1
- package/.next/{static/chunks/3q3pmt5vv-4pi.js → standalone/.next/static/chunks/054zdthcnyd2h.js} +1 -1
- package/.next/standalone/.next/static/chunks/{236f0jtp68j_h.js → 1_mohm2643nxp.js} +1 -1
- package/.next/{static/chunks/3zw8bv7-mc4n6.js → standalone/.next/static/chunks/1z_rt4jteewqp.js} +1 -1
- package/.next/standalone/.next/static/chunks/2bftn9gubwf0w.js +1 -0
- package/.next/{static/chunks/0g_p4p7oci18u.js → standalone/.next/static/chunks/2kfhc58df2xyo.js} +1 -1
- package/.next/standalone/.next/static/chunks/2pw6_osz1n_te.js +1 -0
- package/.next/standalone/.next/static/chunks/39csdcx7yv227.js +1 -0
- package/.next/standalone/.next/static/chunks/3yzlf70j5t0-o.js +1 -0
- package/.next/standalone/.next/static/chunks/{2_wcobfqry2uj.js → 3z-swu5pet507.js} +1 -1
- package/.next/standalone/CHANGELOG.md +39 -0
- package/.next/standalone/app/api/social/messages/route.js +130 -0
- package/.next/standalone/app/api/social/route.js +89 -47
- package/.next/standalone/app/components/ScanStatusBar.js +40 -3
- package/.next/standalone/app/components/settings/DataSection.js +2 -1
- package/.next/standalone/app/paths/page.js +2 -0
- package/.next/standalone/app/profile/page.js +2 -0
- package/.next/standalone/app/queue/page.js +2 -0
- package/.next/standalone/app/scores/page.js +2 -0
- package/.next/standalone/app/settings/page.js +2 -0
- package/.next/standalone/app/setup/page.js +6 -3
- package/.next/standalone/app/social/Conversations.js +246 -0
- package/.next/standalone/app/social/page.js +90 -9
- package/.next/standalone/lib/galaxy-lab.js +6 -1
- package/.next/standalone/lib/linkedin-export.js +175 -5
- package/.next/standalone/lib/social-store.js +73 -0
- package/.next/standalone/package-lock.json +2 -2
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/scripts/scrape.py +156 -23
- package/.next/{standalone/.next/static/chunks/1z-zp93cyoxvz.js → static/chunks/04bbi55urkrd6.js} +1 -1
- package/.next/{standalone/.next/static/chunks/3q3pmt5vv-4pi.js → static/chunks/054zdthcnyd2h.js} +1 -1
- package/.next/static/chunks/{236f0jtp68j_h.js → 1_mohm2643nxp.js} +1 -1
- package/.next/{standalone/.next/static/chunks/3zw8bv7-mc4n6.js → static/chunks/1z_rt4jteewqp.js} +1 -1
- package/.next/static/chunks/2bftn9gubwf0w.js +1 -0
- package/.next/{standalone/.next/static/chunks/0g_p4p7oci18u.js → static/chunks/2kfhc58df2xyo.js} +1 -1
- package/.next/static/chunks/2pw6_osz1n_te.js +1 -0
- package/.next/static/chunks/39csdcx7yv227.js +1 -0
- package/.next/static/chunks/3yzlf70j5t0-o.js +1 -0
- package/.next/static/chunks/{2_wcobfqry2uj.js → 3z-swu5pet507.js} +1 -1
- package/CHANGELOG.md +39 -0
- package/lib/galaxy-lab.js +6 -1
- package/lib/linkedin-export.js +175 -5
- package/lib/social-store.js +73 -0
- package/package.json +1 -1
- package/scripts/scrape.py +156 -23
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__17kn1mk._.js +0 -8
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1dmc7-t._.js +0 -8
- package/.next/standalone/.next/server/chunks/ssr/_005q9n1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_217nddo._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/app_0i3fw_m._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_server-async-storage_0t1dato.js +0 -3
- package/.next/standalone/.next/static/chunks/0a5iadnmt9u9k.js +0 -1
- package/.next/standalone/.next/static/chunks/0y1yms5kez2f3.js +0 -1
- package/.next/standalone/.next/static/chunks/14m1zu-8warte.js +0 -1
- package/.next/standalone/.next/static/chunks/15qbli9udo0vh.js +0 -1
- package/.next/static/chunks/0a5iadnmt9u9k.js +0 -1
- package/.next/static/chunks/0y1yms5kez2f3.js +0 -1
- package/.next/static/chunks/14m1zu-8warte.js +0 -1
- package/.next/static/chunks/15qbli9udo0vh.js +0 -1
- /package/.next/standalone/.next/static/{T0eWMsKjgSiPnmx1E0q3G → yPlsfKhdS8MMtyXF7twSZ}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{T0eWMsKjgSiPnmx1E0q3G → yPlsfKhdS8MMtyXF7twSZ}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{T0eWMsKjgSiPnmx1E0q3G → yPlsfKhdS8MMtyXF7twSZ}/_ssgManifest.js +0 -0
- /package/.next/static/{T0eWMsKjgSiPnmx1E0q3G → yPlsfKhdS8MMtyXF7twSZ}/_buildManifest.js +0 -0
- /package/.next/static/{T0eWMsKjgSiPnmx1E0q3G → yPlsfKhdS8MMtyXF7twSZ}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{T0eWMsKjgSiPnmx1E0q3G → yPlsfKhdS8MMtyXF7twSZ}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[78386,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(23310),e=a.i(58834),f=a.i(38246),g=a.i(91443);let h={S:25,A:15,B:10,C:5,D:2},i={S:100,A:60,B:35,C:15,D:5};var j=a.i(76939),k=a.i(56377);let l={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},m="1px solid rgba(255,255,255,0.1)";function n({person:a,size:c=36,ring:d}){let e=l[a?.tier]||"#667";return(0,b.jsxs)("div",{style:{position:"relative",width:c,height:c,flexShrink:0},children:[(0,b.jsx)("div",{style:{width:c,height:c,borderRadius:"50%",background:e,color:a?.tier==="S"?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:.34*c,fontWeight:800,border:`2px solid ${d||e}`},children:(0,j.initialsFor)(a?.name||"?")}),(0,k.localPhoto)(a?.profile_image_url)&&(0,b.jsx)("img",{src:(0,k.localPhoto)(a.profile_image_url),alt:"",onError:a=>{a.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:c,height:c,borderRadius:"50%",objectFit:"cover",border:`2px solid ${d||e}`}})]})}function o({progress:a,size:c=86,color:d="#FF6B35",children:e}){let f=c/2-5,g=2*Math.PI*f;return(0,b.jsxs)("div",{style:{position:"relative",width:c,height:c},children:[(0,b.jsxs)("svg",{width:c,height:c,style:{position:"absolute",inset:0,transform:"rotate(-90deg)"},children:[(0,b.jsx)("circle",{cx:c/2,cy:c/2,r:f,fill:"none",stroke:"rgba(255,255,255,0.08)",strokeWidth:5}),(0,b.jsx)("circle",{cx:c/2,cy:c/2,r:f,fill:"none",stroke:d,strokeWidth:5,strokeLinecap:"round",strokeDasharray:`${g*Math.min(1,a)} ${g}`,style:{transition:"stroke-dasharray 0.5s ease"}})]}),(0,b.jsx)("div",{style:{position:"absolute",inset:9,display:"flex",alignItems:"center",justifyContent:"center"},children:e})]})}function p({recs:a,sentIds:d,added:e,mappedIds:j,reach:k,onSend:s,onUndo:t}){let u=(0,c.useMemo)(()=>(function({recs:a=[],sentIds:b=new Set,added:c=[],mappedIds:d=new Set,reach:e=null}){var f;let j,k,l,m=new Map,n=new Set;for(let b of[...a].sort((a,b)=>(b.priority||0)-(a.priority||0))){if(!b.bridge)continue;let a=`${b.bridge.id}|${b.profile_url||b.id}`;if(n.has(a))continue;n.add(a);let c=m.get(b.bridge.id);c||(c={bridge:b.bridge,people:[]},m.set(b.bridge.id,c)),c.people.push(b)}let o=new Map;for(let a of c){let b=a.unlocked_from_bridge_id;b&&o.set(b,[...o.get(b)||[],a])}let p=[],q=0,r=0;for(let{bridge:a,people:c}of m.values()){let d=c.filter(a=>b.has(a.id)),e=o.get(a.id)||[];r+=d.length,q+=d.reduce((a,b)=>a+(h[b.tier]||2),0),q+=e.reduce((a,b)=>a+(i[b.tier]||5),0);let f=Math.ceil(c.length/5)||1,g=0;for(;g<f-1&&c.slice(5*g,(g+1)*5).every(a=>b.has(a.id));)g++;let j=c.slice(5*g,(g+1)*5),k=j.filter(a=>b.has(a.id)).length,l=k===j.length&&g===f-1;p.push({bridge:a,people:c,stage:g+1,stages:f,targets:j,done:k,progress:j.length?k/j.length:1,complete:l,sent:d.length,added:e,value:j.filter(a=>!b.has(a.id)).reduce((a,b)=>a+(b.priority||0),0),open:{S:j.filter(a=>"S"===a.tier&&!b.has(a.id)).length,A:j.filter(a=>"A"===a.tier&&!b.has(a.id)).length}})}p.sort((a,b)=>a.complete-b.complete||(b.progress>0&&b.progress<1)-(a.progress>0&&a.progress<1)||b.progress-a.progress||b.value-a.value);let s=p.filter(a=>!a.complete).flatMap(a=>a.targets.filter(a=>!b.has(a.id)).map(b=>({person:b,cluster:a,score:(b.priority||0)*(1+.6*a.progress)}))).sort((a,b)=>b.score-a.score),t=new Set,u=[];for(let a of s){let b=a.person.profile_url||a.person.id;if(!t.has(b)&&(t.add(b),u.push(a),3===u.length))break}let v=c.filter(a=>a.unlocked_from_bridge_id).length;return{clusters:p,nextMoves:u,points:q,level:(k=((j=Math.floor(Math.sqrt(Math.max(0,f=q)/40))+1)-1)**2*40,l=j**2*40,{level:j,floor:k,next:l,progress:(f-k)/(l-k)}),sentTotal:r,addedTotal:v,newDoors:c.filter(a=>a.unlocked_from_bridge_id&&"todo"===(0,g.circleState)(a,e||{scanned:d,hidden:new Set})),clearedStages:p.reduce((a,b)=>a+(b.stage-1)+ +!!b.complete,0)}})({recs:a,sentIds:d,added:e,mappedIds:j,reach:k}),[a,d,e,j,k]),[v,w]=(0,c.useState)(null),[x,y]=(0,c.useState)(null),{level:z}=u;async function A(a,b){await s(a);let c=b.done+1,d=String(b.bridge.name||"").split(/[\s,]+/)[0];y(c>=b.targets.length?`+${h[a.tier]||2} \xb7 Stage ${b.stage} of ${d}'s circle cleared — the next 5 are up`:`+${h[a.tier]||2} \xb7 ${d}'s circle ${c}/${b.targets.length}`),setTimeout(()=>y(null),3500)}let B=u.clusters.find(a=>a.bridge.id===v);return(0,b.jsxs)("div",{style:{maxWidth:1100,margin:"0 auto",padding:"16px 20px 60px"},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap",padding:16,borderRadius:12,border:m,background:"linear-gradient(135deg, rgba(255,107,53,0.10), rgba(155,89,182,0.08))"},children:[(0,b.jsxs)("div",{style:{width:64,height:64,borderRadius:16,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:800},children:"LEVEL"}),(0,b.jsx)("div",{style:{fontSize:26,fontWeight:900,lineHeight:1},children:z.level})]}),(0,b.jsxs)("div",{style:{flex:1,minWidth:220},children:[(0,b.jsxs)("div",{style:{fontSize:13,color:"#dfe6e9"},children:[(0,b.jsx)("b",{children:u.points})," points · ",(0,b.jsx)("b",{children:z.next-u.points})," to level ",z.level+1]}),(0,b.jsx)("div",{style:{height:8,borderRadius:4,background:"rgba(255,255,255,0.08)",marginTop:6,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.round(100*z.progress)}%`,background:"linear-gradient(90deg, #FFD700, #FF6B35)",transition:"width 0.5s"}})}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",marginTop:6},children:"Points come from invites you send and people who accept — not from browsing."})]}),[[u.sentTotal,"invites sent"],[u.addedTotal,"people added"],[u.clearedStages,"stages cleared"]].map(([a,c])=>(0,b.jsxs)("div",{style:{textAlign:"center",minWidth:80},children:[(0,b.jsx)("div",{style:{fontSize:24,fontWeight:900},children:a}),(0,b.jsx)("div",{style:{fontSize:11,color:"#8b9a9a"},children:c})]},c))]}),u.newDoors.length>0&&(0,b.jsxs)("div",{style:{marginTop:12,padding:"10px 14px",borderRadius:10,border:"1px solid rgba(0,255,136,0.3)",background:"rgba(0,255,136,0.06)",fontSize:13},children:["🚪 ",(0,b.jsxs)("b",{children:[u.newDoors.length," new ",1===u.newDoors.length?"door":"doors",":"]})," people you added through a circle, whose own circle isn’t mapped yet. That’s the next degree. ",(0,b.jsx)(f.default,{href:"/setup",style:{color:"#00ff88"},children:"Map them on the Scan page →"})]}),u.nextMoves.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h3",{style:{margin:"22px 0 10px",fontSize:15},children:"Next best moves"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))",gap:12},children:u.nextMoves.map(({person:a,cluster:c},d)=>(0,b.jsxs)("div",{style:{padding:14,borderRadius:12,border:`1px solid ${l[a.tier]}55`,background:"rgba(255,255,255,0.03)",position:"relative"},children:[(0,b.jsxs)("div",{style:{position:"absolute",top:10,right:12,fontSize:11,fontWeight:800,color:"#FF6B35"},children:["#",d+1]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,b.jsx)(n,{person:a,size:44}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontWeight:700,fontSize:14},children:a.name}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:220},children:a.headline})]})]}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#aab7b7",margin:"10px 0"},children:["via ",(0,b.jsx)("b",{style:{color:l[c.bridge.tier]},children:c.bridge.name})," · their circle ",c.done,"/",c.targets.length," this stage"]}),(0,b.jsxs)("div",{style:{display:"flex",gap:8},children:[a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:r,children:"Open on LinkedIn"}),(0,b.jsxs)("button",{onClick:()=>A(a,c),style:q,children:["I sent an invite · +",h[a.tier]||2]})]})]},a.id))})]}),(0,b.jsx)("h3",{style:{margin:"26px 0 4px",fontSize:15},children:"Circles to work through"}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",marginBottom:12},children:["Each is one of your connections and the best people they know, ",5," at a time. Fill the ring to clear a stage."]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:12},children:u.clusters.map(a=>{let c=v===a.bridge.id;return(0,b.jsxs)("button",{onClick:()=>w(c?null:a.bridge.id),style:{padding:12,borderRadius:12,cursor:"pointer",textAlign:"center",color:"#fff",border:c?"1px solid #FF6B35":m,background:a.complete?"rgba(0,255,136,0.06)":"rgba(255,255,255,0.03)",display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[(0,b.jsx)(o,{progress:a.progress,color:a.complete?"#00ff88":"#FF6B35",children:(0,b.jsx)(n,{person:a.bridge,size:60})}),(0,b.jsx)("div",{style:{fontWeight:700,fontSize:13,maxWidth:170,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.name}),(0,b.jsx)("div",{style:{fontSize:11,color:a.complete?"#00ff88":"#aab7b7"},children:a.complete?"Circle cleared":`Stage ${a.stage} of ${a.stages} \xb7 ${a.done}/${a.targets.length}`}),(0,b.jsx)("div",{style:{display:"flex",gap:4},children:a.targets.map(a=>(0,b.jsx)("span",{title:a.name,style:{width:12,height:12,borderRadius:"50%",border:`2px solid ${l[a.tier]||"#667"}`,background:d.has(a.id)?l[a.tier]||"#667":"transparent"}},a.id))}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#778"},children:[a.open.S?`${a.open.S} S \xb7 `:"",a.open.A?`${a.open.A} A \xb7 `:"",a.people.length," worth adding",a.added.length?` \xb7 ★ ${a.added.length} added`:""]})]},a.bridge.id)})}),B&&(0,b.jsxs)("div",{style:{marginTop:14,padding:16,borderRadius:12,border:"1px solid rgba(255,107,53,0.4)",background:"rgba(255,107,53,0.05)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,b.jsx)(n,{person:B.bridge,size:40}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontWeight:800},children:[B.bridge.name,"’s circle · stage ",B.stage," of ",B.stages]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#aab7b7"},children:["Ask ",B.bridge.name?.split(" ")[0]," for an intro, or invite them directly. Mark each one when it’s sent."]})]})]}),B.targets.map(a=>{let c=d.has(a.id);return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},children:[(0,b.jsx)(n,{person:a,size:34,ring:c?"#00ff88":void 0}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:{fontWeight:600,fontSize:13},children:[a.name," ",(0,b.jsx)("span",{style:{color:l[a.tier],fontSize:11},children:a.tier})]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline})]}),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:r,children:"LinkedIn"}),c?(0,b.jsx)("button",{onClick:()=>t(a),style:{...r,color:"#00ff88"},children:"Sent ✓ (undo)"}):(0,b.jsxs)("button",{onClick:()=>A(a,B),style:q,children:["Sent · +",h[a.tier]||2]})]},a.id)}),B.added.length>0&&(0,b.jsxs)("div",{style:{marginTop:10,fontSize:12,color:"#00ff88"},children:["★ Added from this circle: ",B.added.map(a=>a.name).join(", ")]})]}),x&&(0,b.jsx)("div",{role:"status",style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",padding:"10px 18px",borderRadius:24,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:13,boxShadow:"0 8px 30px rgba(0,0,0,0.5)",zIndex:50},children:x})]})}let q={padding:"7px 12px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:800,fontSize:12,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000"},r={padding:"7px 12px",borderRadius:8,border:m,cursor:"pointer",fontWeight:600,fontSize:12,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",textDecoration:"none"};var s=a.i(36839),t=a.i(75857),u=a.i(30889),v=a.i(76892),w=a.i(24475),x=a.i(90231),y=a.i(37732);let z={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function A(){let{userId:a,userProfile:h}=(0,t.useUser)(),i=h?.sectors||[],[j,l]=(0,c.useState)([]),[m,n]=(0,c.useState)(!0),[o,q]=(0,c.useState)("all"),[r,s]=(0,c.useState)(new Set),A=(0,v.default)(),[B,C]=(0,c.useState)([]),[D,E]=(0,c.useState)({}),[F,G]=(0,c.useState)("quest"),[H,I]=(0,c.useState)([]),[J,K]=(0,c.useState)(()=>new Set),[L,M]=(0,c.useState)(null),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)(()=>"bridge");(0,c.useEffect)(()=>{},[]),(0,c.useEffect)(()=>{!e.IS_DEMO&&a&&b();async function b(){let[b,c,e]=await Promise.all([(0,d.loadNetwork)(a),fetch(`/api/outreach?userId=${a}`).then(a=>a.json()).catch(()=>({pending:[]})),(0,y.loadScanNotes)()]),f=b.degree1,h=b.degree2;I(f.filter(a=>a.unlocked_from_bridge_id)),K(new Set(h.map(a=>a.source_connection_id).filter(Boolean))),M((0,g.reachIndex)(f,h,e));let j=new Set(f.map(a=>a.profile_url)),k={};f.forEach(a=>{k[a.id]=a}),C(c.pending||[]),E(k),l(h.filter(a=>("S"===a.tier||"A"===a.tier||"B"===a.tier)&&!j.has(a.profile_url)).map(a=>{let b,c,d=k[a.source_connection_id],e=(b=parseFloat(a.power_score)||0,c=(a.headline||"").toLowerCase(),(0,u.rowCompanyScore)(a)>=u.TOP_COMPANY&&(b+=1),(i||[]).forEach(a=>{c.includes(a.toLowerCase())&&(b+=.5)}),"S"===a.tier?b*=1.5:"A"===a.tier&&(b*=1.2),b),f="S"===a.tier?50:"A"===a.tier?25:10;return{...a,bridge:d,priority:e,xp:f}}).sort((a,b)=>b.priority-a.priority)),n(!1)}},[a]);let R=(0,c.useMemo)(()=>new Set([...B,...j].filter(a=>(0,w.hasRequest)(a,A)).map(a=>a.id)),[B,j,A]),S=(0,c.useMemo)(()=>{let a=new Set,b=[];for(let c of[...B,...j]){let d=(0,x.keyFor)(c);!a.has(d)&&(0,w.hasRequest)(c,A)&&(a.add(d),b.push({...c,bridge:D[c.source_connection_id]||c.bridge||null}))}return b},[B,j,A,D]);if(e.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:10,textAlign:"center",padding:24},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("div",{style:{fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(f.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let T="all"===o?j:j.filter(a=>a.tier===o);N&&(T=T.filter(a=>a.bridge?.id===N));let U={S:0,A:0,B:0};j.forEach(a=>{void 0!==U[a.tier]&&U[a.tier]++});let V={};T.forEach(a=>{let b;V[b="bridge"===P?a.bridge?.id||"unknown":"company"===P?(a.company||"Unknown").trim()||"Unknown":a.tier]||(V[b]=[]),V[b].push(a)});let W={S:0,A:1,B:2},X=Object.entries(V).sort((a,b)=>{if("tier"===P)return(W[a[0]]||9)-(W[b[0]]||9);if("bridge"===P){let c=a[1][0]?.bridge,d=b[1][0]?.bridge,e=W[c?.tier]??9,f=W[d?.tier]??9;if(e!==f)return e-f}return b[1].length-a[1].length});function Y(a){s(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})}return m?(0,b.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:"Loading..."}):(0,b.jsxs)("div",{style:{height:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,b.jsxs)("header",{style:{padding:"14px 24px",borderBottom:"1px solid rgba(255,255,255,0.1)",flexShrink:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:10},children:[(0,b.jsxs)(f.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Map"]}),(0,b.jsx)("h1",{style:{fontSize:20,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FF6B35, #FFD700)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Outlink"}),(0,b.jsxs)("div",{style:{display:"flex",gap:2,background:"rgba(255,255,255,0.06)",borderRadius:6,padding:2},children:[(0,b.jsx)("button",{onClick:()=>G("quest"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:700,cursor:"pointer",background:"quest"===F?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:"quest"===F?"#000":"#FFD700"},children:"Circles"}),(0,b.jsxs)("button",{onClick:()=>G("recs"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"recs"===F?"#fff":"transparent",color:"recs"===F?"#000":"#888"},children:["To Add (",j.length,")"]}),(0,b.jsxs)("button",{onClick:()=>G("pending"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"pending"===F?"linear-gradient(135deg, #FF6B35, #FFD700)":"transparent",color:"pending"===F?"#000":"#FF6B35"},children:["Pending (",S.length,")"]})]}),(0,b.jsx)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:"recs"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>Q("tier"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"tier"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"tier"===P?"#fff":"#666"},children:"By Tier"}),(0,b.jsx)("button",{onClick:()=>Q("bridge"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"bridge"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"bridge"===P?"#fff":"#666"},children:"By Bridge"}),(0,b.jsx)("button",{onClick:()=>Q("company"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"company"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"company"===P?"#fff":"#666"},children:"By Company"})]})})]}),(0,b.jsx)("div",{style:{display:"quest"===F?"none":"flex",gap:6},children:[{k:"all",l:`All (${j.length})`},{k:"S",l:`S (${U.S})`,c:z.S},{k:"A",l:`A (${U.A})`,c:z.A},{k:"B",l:`B (${U.B})`,c:z.B}].map(a=>(0,b.jsx)("button",{onClick:()=>q(a.k),style:{padding:"4px 12px",borderRadius:16,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:o===a.k?a.c||"#fff":"rgba(255,255,255,0.06)",color:o===a.k?"#000":a.c||"#888"},children:a.l},a.k))})]}),"recs"===F&&r.size>0&&(0,b.jsxs)("div",{style:{padding:"10px 24px",background:"rgba(255,215,0,0.08)",borderBottom:"1px solid rgba(255,215,0,0.2)",display:"flex",alignItems:"center",gap:12,flexShrink:0},children:[(0,b.jsxs)("span",{style:{fontSize:12,color:"#FFD700",fontWeight:600},children:[r.size," selected"]}),(0,b.jsxs)("button",{onClick:function(){let a=T.filter(a=>r.has(a.id));if(0===a.length)return;if(1===a.length)return void window.open(a[0].profile_url,"_blank");let b=new Blob([`<!DOCTYPE html><html><head><title>Outlink — ${a.length} profiles</title>
|
|
1
|
+
module.exports=[78386,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(23310),e=a.i(58834),f=a.i(38246),g=a.i(91443);let h={S:25,A:15,B:10,C:5,D:2},i={S:100,A:60,B:35,C:15,D:5};var j=a.i(76939),k=a.i(56377);let l={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},m="1px solid rgba(255,255,255,0.1)";function n({person:a,size:c=36,ring:d}){let e=l[a?.tier]||"#667";return(0,b.jsxs)("div",{style:{position:"relative",width:c,height:c,flexShrink:0},children:[(0,b.jsx)("div",{style:{width:c,height:c,borderRadius:"50%",background:e,color:a?.tier==="S"?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:.34*c,fontWeight:800,border:`2px solid ${d||e}`},children:(0,j.initialsFor)(a?.name||"?")}),(0,k.localPhoto)(a?.profile_image_url)&&(0,b.jsx)("img",{src:(0,k.localPhoto)(a.profile_image_url),alt:"",onError:a=>{a.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:c,height:c,borderRadius:"50%",objectFit:"cover",border:`2px solid ${d||e}`}})]})}function o({progress:a,size:c=86,color:d="#FF6B35",children:e}){let f=c/2-5,g=2*Math.PI*f;return(0,b.jsxs)("div",{style:{position:"relative",width:c,height:c},children:[(0,b.jsxs)("svg",{width:c,height:c,style:{position:"absolute",inset:0,transform:"rotate(-90deg)"},children:[(0,b.jsx)("circle",{cx:c/2,cy:c/2,r:f,fill:"none",stroke:"rgba(255,255,255,0.08)",strokeWidth:5}),(0,b.jsx)("circle",{cx:c/2,cy:c/2,r:f,fill:"none",stroke:d,strokeWidth:5,strokeLinecap:"round",strokeDasharray:`${g*Math.min(1,a)} ${g}`,style:{transition:"stroke-dasharray 0.5s ease"}})]}),(0,b.jsx)("div",{style:{position:"absolute",inset:9,display:"flex",alignItems:"center",justifyContent:"center"},children:e})]})}function p({recs:a,sentIds:d,added:e,mappedIds:j,reach:k,onSend:s,onUndo:t}){let u=(0,c.useMemo)(()=>(function({recs:a=[],sentIds:b=new Set,added:c=[],mappedIds:d=new Set,reach:e=null}){var f;let j,k,l,m=new Map,n=new Set;for(let b of[...a].sort((a,b)=>(b.priority||0)-(a.priority||0))){if(!b.bridge)continue;let a=`${b.bridge.id}|${b.profile_url||b.id}`;if(n.has(a))continue;n.add(a);let c=m.get(b.bridge.id);c||(c={bridge:b.bridge,people:[]},m.set(b.bridge.id,c)),c.people.push(b)}let o=new Map;for(let a of c){let b=a.unlocked_from_bridge_id;b&&o.set(b,[...o.get(b)||[],a])}let p=[],q=0,r=0;for(let{bridge:a,people:c}of m.values()){let d=c.filter(a=>b.has(a.id)),e=o.get(a.id)||[];r+=d.length,q+=d.reduce((a,b)=>a+(h[b.tier]||2),0),q+=e.reduce((a,b)=>a+(i[b.tier]||5),0);let f=Math.ceil(c.length/5)||1,g=0;for(;g<f-1&&c.slice(5*g,(g+1)*5).every(a=>b.has(a.id));)g++;let j=c.slice(5*g,(g+1)*5),k=j.filter(a=>b.has(a.id)).length,l=k===j.length&&g===f-1;p.push({bridge:a,people:c,stage:g+1,stages:f,targets:j,done:k,progress:j.length?k/j.length:1,complete:l,sent:d.length,added:e,value:j.filter(a=>!b.has(a.id)).reduce((a,b)=>a+(b.priority||0),0),open:{S:j.filter(a=>"S"===a.tier&&!b.has(a.id)).length,A:j.filter(a=>"A"===a.tier&&!b.has(a.id)).length}})}p.sort((a,b)=>a.complete-b.complete||(b.progress>0&&b.progress<1)-(a.progress>0&&a.progress<1)||b.progress-a.progress||b.value-a.value);let s=p.filter(a=>!a.complete).flatMap(a=>a.targets.filter(a=>!b.has(a.id)).map(b=>({person:b,cluster:a,score:(b.priority||0)*(1+.6*a.progress)}))).sort((a,b)=>b.score-a.score),t=new Set,u=[];for(let a of s){let b=a.person.profile_url||a.person.id;if(!t.has(b)&&(t.add(b),u.push(a),3===u.length))break}let v=c.filter(a=>a.unlocked_from_bridge_id).length;return{clusters:p,nextMoves:u,points:q,level:(k=((j=Math.floor(Math.sqrt(Math.max(0,f=q)/40))+1)-1)**2*40,l=j**2*40,{level:j,floor:k,next:l,progress:(f-k)/(l-k)}),sentTotal:r,addedTotal:v,newDoors:c.filter(a=>a.unlocked_from_bridge_id&&"todo"===(0,g.circleState)(a,e||{scanned:d,hidden:new Set})),clearedStages:p.reduce((a,b)=>a+(b.stage-1)+ +!!b.complete,0)}})({recs:a,sentIds:d,added:e,mappedIds:j,reach:k}),[a,d,e,j,k]),[v,w]=(0,c.useState)(null),[x,y]=(0,c.useState)(null),{level:z}=u;async function A(a,b){await s(a);let c=b.done+1,d=String(b.bridge.name||"").split(/[\s,]+/)[0];y(c>=b.targets.length?`+${h[a.tier]||2} \xb7 Stage ${b.stage} of ${d}'s circle cleared — the next 5 are up`:`+${h[a.tier]||2} \xb7 ${d}'s circle ${c}/${b.targets.length}`),setTimeout(()=>y(null),3500)}let B=u.clusters.find(a=>a.bridge.id===v);return(0,b.jsxs)("div",{style:{maxWidth:1100,margin:"0 auto",padding:"16px 20px 60px"},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap",padding:16,borderRadius:12,border:m,background:"linear-gradient(135deg, rgba(255,107,53,0.10), rgba(155,89,182,0.08))"},children:[(0,b.jsxs)("div",{style:{width:64,height:64,borderRadius:16,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:800},children:"LEVEL"}),(0,b.jsx)("div",{style:{fontSize:26,fontWeight:900,lineHeight:1},children:z.level})]}),(0,b.jsxs)("div",{style:{flex:1,minWidth:220},children:[(0,b.jsxs)("div",{style:{fontSize:13,color:"#dfe6e9"},children:[(0,b.jsx)("b",{children:u.points})," points · ",(0,b.jsx)("b",{children:z.next-u.points})," to level ",z.level+1]}),(0,b.jsx)("div",{style:{height:8,borderRadius:4,background:"rgba(255,255,255,0.08)",marginTop:6,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.round(100*z.progress)}%`,background:"linear-gradient(90deg, #FFD700, #FF6B35)",transition:"width 0.5s"}})}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",marginTop:6},children:"Points come from invites you send and people who accept — not from browsing."})]}),[[u.sentTotal,"invites sent"],[u.addedTotal,"people added"],[u.clearedStages,"stages cleared"]].map(([a,c])=>(0,b.jsxs)("div",{style:{textAlign:"center",minWidth:80},children:[(0,b.jsx)("div",{style:{fontSize:24,fontWeight:900},children:a}),(0,b.jsx)("div",{style:{fontSize:11,color:"#8b9a9a"},children:c})]},c))]}),u.newDoors.length>0&&(0,b.jsxs)("div",{style:{marginTop:12,padding:"10px 14px",borderRadius:10,border:"1px solid rgba(0,255,136,0.3)",background:"rgba(0,255,136,0.06)",fontSize:13},children:["🚪 ",(0,b.jsxs)("b",{children:[u.newDoors.length," new ",1===u.newDoors.length?"door":"doors",":"]})," people you added through a circle, whose own circle isn’t mapped yet. That’s the next degree. ",(0,b.jsx)(f.default,{href:"/setup",style:{color:"#00ff88"},children:"Map them on the Scan page →"})]}),u.nextMoves.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h3",{style:{margin:"22px 0 10px",fontSize:15},children:"Next best moves"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))",gap:12},children:u.nextMoves.map(({person:a,cluster:c},d)=>(0,b.jsxs)("div",{style:{padding:14,borderRadius:12,border:`1px solid ${l[a.tier]}55`,background:"rgba(255,255,255,0.03)",position:"relative"},children:[(0,b.jsxs)("div",{style:{position:"absolute",top:10,right:12,fontSize:11,fontWeight:800,color:"#FF6B35"},children:["#",d+1]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,b.jsx)(n,{person:a,size:44}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontWeight:700,fontSize:14},children:a.name}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:220},children:a.headline})]})]}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#aab7b7",margin:"10px 0"},children:["via ",(0,b.jsx)("b",{style:{color:l[c.bridge.tier]},children:c.bridge.name})," · their circle ",c.done,"/",c.targets.length," this stage"]}),(0,b.jsxs)("div",{style:{display:"flex",gap:8},children:[a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:r,children:"Open on LinkedIn"}),(0,b.jsxs)("button",{onClick:()=>A(a,c),style:q,children:["I sent an invite · +",h[a.tier]||2]})]})]},a.id))})]}),(0,b.jsx)("h3",{style:{margin:"26px 0 4px",fontSize:15},children:"Circles to work through"}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",marginBottom:12},children:["Each is one of your connections and the best people they know, ",5," at a time. Fill the ring to clear a stage."]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:12},children:u.clusters.map(a=>{let c=v===a.bridge.id;return(0,b.jsxs)("button",{onClick:()=>w(c?null:a.bridge.id),style:{padding:12,borderRadius:12,cursor:"pointer",textAlign:"center",color:"#fff",border:c?"1px solid #FF6B35":m,background:a.complete?"rgba(0,255,136,0.06)":"rgba(255,255,255,0.03)",display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[(0,b.jsx)(o,{progress:a.progress,color:a.complete?"#00ff88":"#FF6B35",children:(0,b.jsx)(n,{person:a.bridge,size:60})}),(0,b.jsx)("div",{style:{fontWeight:700,fontSize:13,maxWidth:170,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.name}),(0,b.jsx)("div",{style:{fontSize:11,color:a.complete?"#00ff88":"#aab7b7"},children:a.complete?"Circle cleared":`Stage ${a.stage} of ${a.stages} \xb7 ${a.done}/${a.targets.length}`}),(0,b.jsx)("div",{style:{display:"flex",gap:4},children:a.targets.map(a=>(0,b.jsx)("span",{title:a.name,style:{width:12,height:12,borderRadius:"50%",border:`2px solid ${l[a.tier]||"#667"}`,background:d.has(a.id)?l[a.tier]||"#667":"transparent"}},a.id))}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#778"},children:[a.open.S?`${a.open.S} S \xb7 `:"",a.open.A?`${a.open.A} A \xb7 `:"",a.people.length," worth adding",a.added.length?` \xb7 ★ ${a.added.length} added`:""]})]},a.bridge.id)})}),B&&(0,b.jsxs)("div",{style:{marginTop:14,padding:16,borderRadius:12,border:"1px solid rgba(255,107,53,0.4)",background:"rgba(255,107,53,0.05)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,b.jsx)(n,{person:B.bridge,size:40}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontWeight:800},children:[B.bridge.name,"’s circle · stage ",B.stage," of ",B.stages]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#aab7b7"},children:["Ask ",B.bridge.name?.split(" ")[0]," for an intro, or invite them directly. Mark each one when it’s sent."]})]})]}),B.targets.map(a=>{let c=d.has(a.id);return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},children:[(0,b.jsx)(n,{person:a,size:34,ring:c?"#00ff88":void 0}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:{fontWeight:600,fontSize:13},children:[a.name," ",(0,b.jsx)("span",{style:{color:l[a.tier],fontSize:11},children:a.tier})]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline})]}),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:r,children:"LinkedIn"}),c?(0,b.jsx)("button",{onClick:()=>t(a),style:{...r,color:"#00ff88"},children:"Sent ✓ (undo)"}):(0,b.jsxs)("button",{onClick:()=>A(a,B),style:q,children:["Sent · +",h[a.tier]||2]})]},a.id)}),B.added.length>0&&(0,b.jsxs)("div",{style:{marginTop:10,fontSize:12,color:"#00ff88"},children:["★ Added from this circle: ",B.added.map(a=>a.name).join(", ")]})]}),x&&(0,b.jsx)("div",{role:"status",style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",padding:"10px 18px",borderRadius:24,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:13,boxShadow:"0 8px 30px rgba(0,0,0,0.5)",zIndex:50},children:x})]})}let q={padding:"7px 12px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:800,fontSize:12,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000"},r={padding:"7px 12px",borderRadius:8,border:m,cursor:"pointer",fontWeight:600,fontSize:12,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",textDecoration:"none"};var s=a.i(36839),t=a.i(75857),u=a.i(30889),v=a.i(76892),w=a.i(24475),x=a.i(90231),y=a.i(37732);let z={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function A(){let{userId:a,userProfile:h}=(0,t.useUser)(),i=h?.sectors||[],[j,l]=(0,c.useState)([]),[m,n]=(0,c.useState)(!0),[o,q]=(0,c.useState)("all"),[r,s]=(0,c.useState)(new Set),A=(0,v.default)(),[B,C]=(0,c.useState)([]),[D,E]=(0,c.useState)({}),[F,G]=(0,c.useState)("quest"),[H,I]=(0,c.useState)([]),[J,K]=(0,c.useState)(()=>new Set),[L,M]=(0,c.useState)(null),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)(()=>"bridge");(0,c.useEffect)(()=>{},[]),(0,c.useEffect)(()=>{!e.IS_DEMO&&a&&b();async function b(){let[b,c,e]=await Promise.all([(0,d.loadNetwork)(a),fetch(`/api/outreach?userId=${a}`).then(a=>a.json()).catch(()=>({pending:[]})),(0,y.loadScanNotes)()]),f=b.degree1,h=b.degree2;I(f.filter(a=>a.unlocked_from_bridge_id)),K(new Set(h.map(a=>a.source_connection_id).filter(Boolean))),M((0,g.reachIndex)(f,h,e));let j=new Set(f.map(a=>a.profile_url)),k={};f.forEach(a=>{k[a.id]=a}),C(c.pending||[]),E(k),l(h.filter(a=>("S"===a.tier||"A"===a.tier||"B"===a.tier)&&!j.has(a.profile_url)).map(a=>{let b,c,d=k[a.source_connection_id],e=(b=parseFloat(a.power_score)||0,c=(a.headline||"").toLowerCase(),(0,u.rowCompanyScore)(a)>=u.TOP_COMPANY&&(b+=1),(i||[]).forEach(a=>{c.includes(a.toLowerCase())&&(b+=.5)}),"S"===a.tier?b*=1.5:"A"===a.tier&&(b*=1.2),b),f="S"===a.tier?50:"A"===a.tier?25:10;return{...a,bridge:d,priority:e,xp:f}}).sort((a,b)=>b.priority-a.priority)),n(!1)}},[a]);let R=(0,c.useMemo)(()=>new Set([...B,...j].filter(a=>(0,w.hasRequest)(a,A)).map(a=>a.id)),[B,j,A]),S=(0,c.useMemo)(()=>{let a=new Set,b=[];for(let c of[...B,...j]){let d=(0,x.keyFor)(c);!a.has(d)&&(0,w.hasRequest)(c,A)&&(a.add(d),b.push({...c,bridge:D[c.source_connection_id]||c.bridge||null}))}return b},[B,j,A,D]);if(e.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:10,textAlign:"center",padding:24},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("div",{style:{fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(f.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let T="all"===o?j:j.filter(a=>a.tier===o);N&&(T=T.filter(a=>a.bridge?.id===N));let U={S:0,A:0,B:0};j.forEach(a=>{void 0!==U[a.tier]&&U[a.tier]++});let V={};T.forEach(a=>{let b;V[b="bridge"===P?a.bridge?.id||"unknown":"company"===P?(a.company||"Unknown").trim()||"Unknown":a.tier]||(V[b]=[]),V[b].push(a)});let W={S:0,A:1,B:2},X=Object.entries(V).sort((a,b)=>{if("tier"===P)return(W[a[0]]||9)-(W[b[0]]||9);if("bridge"===P){let c=a[1][0]?.bridge,d=b[1][0]?.bridge,e=W[c?.tier]??9,f=W[d?.tier]??9;if(e!==f)return e-f}return b[1].length-a[1].length});function Y(a){s(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})}return m?(0,b.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:"Loading..."}):(0,b.jsxs)("div",{style:{height:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,b.jsxs)("header",{style:{padding:"14px 24px",borderBottom:"1px solid rgba(255,255,255,0.1)",flexShrink:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:10},children:[(0,b.jsxs)(f.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Map"]}),(0,b.jsx)("h1",{style:{fontSize:20,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FF6B35, #FFD700)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Outlink"}),(0,b.jsxs)("div",{style:{display:"flex",gap:2,background:"rgba(255,255,255,0.06)",borderRadius:6,padding:2},children:[(0,b.jsx)("button",{onClick:()=>G("quest"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:700,cursor:"pointer",background:"quest"===F?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:"quest"===F?"#000":"#FFD700"},children:"Circles"}),(0,b.jsxs)("button",{onClick:()=>G("recs"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"recs"===F?"#fff":"transparent",color:"recs"===F?"#000":"#888"},children:["To Add (",j.length,")"]}),(0,b.jsxs)("button",{onClick:()=>G("pending"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"pending"===F?"linear-gradient(135deg, #FF6B35, #FFD700)":"transparent",color:"pending"===F?"#000":"#FF6B35"},children:["Pending (",S.length,")"]})]}),(0,b.jsx)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:"recs"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>Q("tier"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"tier"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"tier"===P?"#fff":"#666"},children:"By Tier"}),(0,b.jsx)("button",{onClick:()=>Q("bridge"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"bridge"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"bridge"===P?"#fff":"#666"},children:"By Bridge"}),(0,b.jsx)("button",{onClick:()=>Q("company"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"company"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"company"===P?"#fff":"#666"},children:"By Company"})]})})]}),(0,b.jsx)("div",{style:{display:"quest"===F?"none":"flex",gap:6},children:[{k:"all",l:`All (${j.length})`},{k:"S",l:`S (${U.S})`,c:z.S},{k:"A",l:`A (${U.A})`,c:z.A},{k:"B",l:`B (${U.B})`,c:z.B}].map(a=>(0,b.jsx)("button",{onClick:()=>q(a.k),style:{padding:"4px 12px",borderRadius:16,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:o===a.k?a.c||"#fff":"rgba(255,255,255,0.06)",color:o===a.k?"#000":a.c||"#888"},children:a.l},a.k))})]}),(0,b.jsx)("div",{id:"scan-bar-slot"}),"recs"===F&&r.size>0&&(0,b.jsxs)("div",{style:{padding:"10px 24px",background:"rgba(255,215,0,0.08)",borderBottom:"1px solid rgba(255,215,0,0.2)",display:"flex",alignItems:"center",gap:12,flexShrink:0},children:[(0,b.jsxs)("span",{style:{fontSize:12,color:"#FFD700",fontWeight:600},children:[r.size," selected"]}),(0,b.jsxs)("button",{onClick:function(){let a=T.filter(a=>r.has(a.id));if(0===a.length)return;if(1===a.length)return void window.open(a[0].profile_url,"_blank");let b=new Blob([`<!DOCTYPE html><html><head><title>Outlink — ${a.length} profiles</title>
|
|
2
2
|
<style>body{background:#0a0a1a;color:#fff;font-family:-apple-system,sans-serif;padding:24px;margin:0}
|
|
3
3
|
h2{color:#FFD700;margin-bottom:4px}p{color:#888;font-size:13px;margin-bottom:16px}
|
|
4
4
|
.btn{display:block;padding:12px 16px;margin-bottom:6px;background:rgba(255,255,255,0.06);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[94264,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(36839),f=a.i(16874),g=a.i(803),h=a.i(79663),i=a.i(59534),j=a.i(54919),k=a.i(30889),l=a.i(76939);a.i(42510);var m=a.i(31483);let n={lean:"Lean",strong:"Strong"},o=["wheel","touchstart","keydown","pointerdown"],p={1:"1st",2:"2nd",3:"3rd"},q=(a,b,c=`${b}s`)=>`${a.toLocaleString()} ${1===a?b:c}`,r=i.DIRECTORY.filter(a=>"function"===a.kind).map(a=>a.label);function s(a,b,c){let[d,e]=c?["moved","moved"]:["moves","move"];if(!a&&!b)return c?"No one changed tier.":"No one changes tier.";let f=a=>1===a?d:e;return a&&b?`${q(a,"person","people")} ${f(a)} up a tier and ${b.toLocaleString()} ${f(b)} down.`:a?`${q(a,"person","people")} ${f(a)} up a tier.`:`${q(b,"person","people")} ${f(b)} down a tier.`}function t({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[i,l]=(0,c.useState)(null),[p,v]=(0,c.useState)(null),[w,x]=(0,c.useState)(!1),[y,z]=(0,c.useState)(null),[A,B]=(0,c.useState)(null),[C,D]=(0,c.useState)({loading:!0}),[E]=(0,c.useState)(()=>null),F=(0,c.useRef)(null),G=(0,c.useRef)(0),H=(0,c.useRef)(!1);function I(a){l(a),z(null),clearTimeout(F.current);let b=++G.current;if((0,h.sameFocus)(a,d))return void v(null);let c=(0,h.focusFingerprint)(a);v({key:c,loading:!0}),F.current=setTimeout(async()=>{try{let d=await fetch("/api/settings/sector-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorFocus:a})}),e=await d.json();if(b!==G.current)return;v(d.ok?{key:c,...e}:{key:c,error:e.error||"Could not work out what would change."})}catch{b===G.current&&v({key:c,error:"Could not reach the app to work out what would change."})}},250)}async function J(){var b,c;let d;x(!0),z(null),clearTimeout(F.current),G.current++;let f=await (0,m.saveSettings)({sectorFocus:i});(x(!1),f.settings&&(e(f.settings.sectorFocus),l(f.settings.sectorFocus),v(null)),f.error)?z({tone:"bad",text:f.error}):(z({tone:"ok",text:(b=f.settings.sectorFocus,c=f.effects?.sectorFocus,d=b.sectors.length?`Saved: ${b.sectors.map(a=>(0,j.sectorByKey)(a).label).join(" · ")} (${n[b.strength].toLowerCase()}).`:"Saved: no sector.",c?c.scored?`${d} Rescored your network (${q(c.people??c.scored,"person","people")}). ${s(c.up,c.down,!0)}`:`${d} There's no scanned network yet; it will apply when you scan.`:d)}),a?.())}(0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your sector.")))).then(b=>{if(a)return;let c=b.settings?.sectorFocus||{sectors:[],strength:"lean"};e(c),l(c)}).catch(b=>{a||B(b.message)}),fetch("/api/settings/sector-suggestions").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load suggestions.")))).then(b=>{a||D({scored:b.scored,list:b.suggestions||[]})}).catch(b=>{a||D({error:b.message})}),()=>{a=!0,clearTimeout(F.current)}},[]),(0,c.useEffect)(()=>{if(H.current||!i&&!A)return;H.current=!0;let a=document.getElementById("sector");if("#sector"!==window.location.hash||!a)return;let b=()=>a.scrollIntoView({block:"start"});b();let c=new ResizeObserver(b);c.observe(document.body);let d=()=>{for(let a of(c.disconnect(),clearTimeout(e),o))window.removeEventListener(a,d,!0)},e=setTimeout(d,2e3);for(let a of o)window.addEventListener(a,d,{capture:!0,passive:!0});return d},[i,A]);let K=i&&d&&!(0,h.sameFocus)(i,d);return(0,b.jsxs)(f.Section,{id:"sector",title:"Your sector",intro:"Pick up to three sectors you work in. Companies in them count for more when your network is scored, so the people there rank higher.",children:[A&&(0,b.jsx)(f.Status,{tone:"bad",children:A}),!i&&!A&&(0,b.jsx)(f.Body,{children:"Loading…"}),i&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.default,{sectors:i.sectors,onChange:a=>I({...i,sectors:a}),disabled:w,suggest:C}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:8,marginTop:14},children:[(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"How much:"}),Object.keys(k.SECTOR_BONUS).map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":i.strength===a,disabled:w,onClick:()=>I({...i,strength:a}),style:{padding:"5px 12px",borderRadius:7,fontSize:12.5,fontWeight:600,cursor:"pointer",color:i.strength===a?"#fff":"#8b9a9a",background:i.strength===a?"rgba(52,152,219,0.25)":"transparent",border:f.LINE},children:[n[a]," · +",k.SECTOR_BONUS[a]]},a))]}),(0,b.jsx)(f.Body,{style:{fontSize:12.5},children:"Each company in your sectors gets +1 (lean) or +2 (strong) on its score out of 10, never above 10. A company in more than one of your picks still gets it once."}),(0,b.jsx)(u,{preview:K?p:null,draft:i}),(0,b.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:J,disabled:!K||w,children:w?"Saving and rescoring…":"Save"}),K&&!w&&(0,b.jsx)(f.Btn,{onClick:()=>I(d),children:"Cancel"}),!K&&i.sectors.length>0&&!w&&(0,b.jsx)(f.Btn,{onClick:()=>I({...i,sectors:[]}),children:"Turn off"})]}),y&&(0,b.jsx)(f.Status,{tone:y.tone,children:y.text}),(0,b.jsxs)("ul",{style:{margin:"16px 0 0",paddingLeft:18,fontSize:12.5,color:"#778",lineHeight:1.7},children:[(0,b.jsx)("li",{children:"Tiers rank how reachable someone is through your network, not the people themselves."}),(0,b.jsxs)("li",{children:["A company score you set on ",(0,b.jsx)("a",{href:"#companies",style:{color:"#3498DB"},children:"Company scores"}),", below, always wins. Your sector never changes it."]}),(0,b.jsx)("li",{children:"If you scan highest tier first, people in your sectors come up sooner. Scanning newest first, the default, doesn’t go by tier."}),(0,b.jsx)("li",{children:"An industry includes its sectors. It counts a company in any of its sectors (Healthcare & Biotech counts a practice that is only in Dental), and a company whose industry the app’s list of well-known companies or the company’s own name gives (Meridian Health). Not one known only from its people’s job titles: a recruiter at Acme Widgets doesn’t make Acme a consulting firm."}),(0,b.jsx)("li",{children:"A narrower sector counts a company when its name says so (Smith Family Dental), it’s a well-known company in that sector, or at least half of the people you know there say so in their headlines (dentist, DDS, orthodontist). The words are a fixed list that comes with the app, the same on every computer. Nothing is sent anywhere."}),(0,b.jsxs)("li",{children:["Some sectors are work every kind of company has: ",r.length>1?`${r.slice(0,-1).join(", ")} and ${r.at(-1)}`:r.join(""),". For those a job title doesn’t count, since a recruiter at Acme Widgets doesn’t make it a recruiting firm. The company’s name does (Acme Staffing, Smith CPA), and so does a kind of firm in a headline (staffing agency, law firm, SaaS)."]}),E&&(0,b.jsxs)("li",{style:{color:"#FFD700"},children:["sample"===E?"The sample network":"The CSV import"," open in this window isn’t changed by this, and isn’t counted in the suggestions. Your sector applies to networks you’ve scanned."]})]})]})]})}function u({preview:a,draft:c}){if(!a||a.key!==(0,h.focusFingerprint)(c))return null;let d={marginTop:12,padding:"10px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,border:f.LINE,background:"rgba(255,255,255,0.03)",color:"#cfd8d8"};if(a.loading)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"Working out what would change…"});if(a.error)return(0,b.jsx)(f.Status,{tone:"bad",children:a.error});if(!a.scored)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"There’s no scanned network yet, so nothing changes now. Your choice applies once you scan."});let e=(a,b)=>`${q(a,"company","companies")} ${1===a?"scores":"score"} ${b}`,g=[a.companiesUp&&e(a.companiesUp,"higher"),a.companiesDown&&e(a.companiesDown,"lower")].filter(Boolean).join(" and ");return(0,b.jsxs)("div",{style:d,"aria-live":"polite",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:"If you save:"})," ",g?`${g}.`:"No company changes score."," ",s(a.up,a.down,!1)]}),a.examples?.length>0&&(0,b.jsx)("div",{style:{marginTop:6,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:12.5},children:a.examples.map((a,c)=>(0,b.jsxs)("span",{title:a.company||void 0,children:[a.name,a.degree?(0,b.jsxs)("span",{style:{color:"#667"},children:[" (",p[a.degree]||`${a.degree}th`,")"]}):null," ",(0,b.jsx)("b",{style:{color:l.TIER_COLORS_CLASSIC[a.from]||"#889"},children:a.from||"–"})," → ",(0,b.jsx)("b",{style:{color:l.TIER_COLORS_CLASSIC[a.to]||"#889"},children:a.to})]},c))}),a.companyExamples?.length>0&&(0,b.jsx)("div",{style:{marginTop:4,fontSize:12,color:"#8b9a9a"},children:a.companyExamples.slice(0,3).map(a=>`${a.name} ${a.from} → ${a.to}`).join(" · ")})]})}let v=a=>`${Math.round(100*a)}%`,[w,x,y]=k.CURVE.map(([,a])=>a),z=[{key:"curve",label:"On your network's curve",note:`Your top ${v(w)} are S, the next ${v(x-w)} A and the next ${v(y-x)} B, so any network has a top, even one full of companies the app doesn't know. It only lifts: nobody drops a tier because their network is strong, and nobody under ${k.CURVE_FLOOR} is lifted into S or A.`},{key:"fixed",label:"On the fixed scale",note:"The same lines for everyone: S from 7.5, A from 5.5, B from 4, C from 2.5. Easy to compare from one network to another, but a network outside well-known companies has almost nobody in S or A."}];function A({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[n]=(0,c.useState)(()=>null);async function o(b){if(g||b===d)return;h(!0),j(null);let{settings:c,effects:f,error:i}=await (0,m.saveSettings)({tierScale:b});if(c&&e(c.tierScale),i)j({tone:"bad",text:i});else{let b,c=f?.tierScale;j({tone:"ok",text:c?`Saved. ${b=c.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}h(!1)}return(0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load how tiers are graded.")))).then(b=>{a||e(b.settings?.tierScale||"curve")}).catch(b=>{a||l(b.message)}),()=>{a=!0}},[]),(0,b.jsxs)(f.Section,{id:"tiers",title:"Tiers",intro:"How the S to D rings are drawn. A tier says where someone sits in your network, not what they're worth.",children:[k&&(0,b.jsx)(f.Status,{tone:"bad",children:k}),d&&(0,b.jsx)("div",{role:"radiogroup","aria-label":"How tiers are graded",style:{display:"grid",gap:8},children:z.map(a=>{let c=d===a.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":c,disabled:g,onClick:()=>o(a.key),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,cursor:g?"wait":c?"default":"pointer",color:"#fff",background:c?"rgba(155,89,182,0.14)":"rgba(255,255,255,0.03)",border:c?"1px solid rgba(155,89,182,0.6)":f.LINE},children:[(0,b.jsxs)("div",{style:{fontSize:14,fontWeight:650},children:[c?"● ":"○ ",a.label,"curve"===a.key?" (recommended)":""]}),(0,b.jsx)(f.Body,{style:{marginTop:4},children:a.note})]},a.key)})}),n&&(0,b.jsxs)(f.Body,{style:{color:"#FFD700",marginTop:10},children:["sample"===n?"The sample network open in this window keeps its own tiers (they’re the same either way).":"The CSV import open in this window is always graded on its own curve."," ","This applies to networks you’ve scanned."]}),i&&(0,b.jsx)(f.Status,{tone:i.tone,children:i.text})]})}var B=a.i(75857),C=a.i(23310),D=a.i(45889);let E={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},F=a=>`${Math.round(100*a)}%`;function G(){let{userId:a}=(0,B.useUser)(),[e,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(!a)return;let b=!0;return(0,C.loadNetwork)(a).then(a=>{b&&g(function({degree1:a=[],degree2:b=[],ties:c=0}={}){let d=new Map;for(let a of b)a?.source_connection_id!=null&&d.set(a.source_connection_id,(d.get(a.source_connection_id)||0)+1);let e=(0,D.exclusiveReach)(b,a),f=a.length,g=Math.max(0,Number(c)||0),h=f?f-2*g/f:0,i=new Map(a.map(a=>[a.id,a])),j=[...e.entries()].sort((a,b)=>b[1].reach-a[1].reach||String(a[0]).localeCompare(String(b[0]))).slice(0,5).map(([a,b])=>{let c=i.get(a)||{};return{id:a,name:c.name||"",company:c.company||"",tier:c.tier||"",circle:d.get(a)||0,only:b.only,share:b.total?b.only/b.total:0}});return{circles:d.size,early:d.size<5,twoWays:(0,D.redundancy)(b,a),effective:{n:f,ties:g,size:h,efficiency:f?h/f:0},top:j}}(a))}).catch(()=>{b&&i(!0)}),()=>{b=!1}},[a]);let j={padding:"12px 14px",borderRadius:8,border:f.LINE,background:"rgba(255,255,255,0.03)"};return(0,b.jsxs)("section",{id:"health",style:{marginTop:20},children:[(0,b.jsx)("h2",{style:{fontSize:16,margin:"0 0 6px"},children:"Network health"}),h&&(0,b.jsx)(f.Body,{children:"Couldn’t read your network just now."}),!h&&!e&&(0,b.jsx)(f.Body,{children:"Reading your network…"}),e&&0===e.circles&&(0,b.jsx)(f.Body,{children:"Scan a few of your connections’ circles (the Scan page, step 4) and this shows how your network holds together."}),e&&e.circles>0&&(0,b.jsxs)(b.Fragment,{children:[e.early&&(0,b.jsxs)("div",{style:{fontSize:12.5,color:"#FFD700",margin:"4px 0 10px"},children:["An early estimate: ",e.circles," ",1===e.circles?"circle":"circles"," scanned. These get sharper as you scan more."]}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:10},children:[(0,b.jsxs)("div",{style:j,children:[(0,b.jsx)("div",{style:{fontSize:22,fontWeight:700},children:F(e.twoWays)}),(0,b.jsx)("div",{style:{fontSize:12.5,color:"#b8c4c4"},children:"of your 2nd degree you reach two or more ways"}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#778",marginTop:4},children:"Higher is safer: lose one connection and they’re still reachable."})]}),(0,b.jsxs)("div",{style:j,children:[(0,b.jsx)("div",{style:{fontSize:22,fontWeight:700},children:Math.round(e.effective.size).toLocaleString()}),(0,b.jsxs)("div",{style:{fontSize:12.5,color:"#b8c4c4"},children:["effective reach of your ",e.effective.n.toLocaleString()," connections (",F(e.effective.efficiency)," non-overlapping)"]}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#778",marginTop:4},children:["From ",e.effective.ties.toLocaleString()," ",1===e.effective.ties?"tie":"ties"," between your connections seen in circle scans so far, so it can only come down as you scan more."]})]})]}),e.top.length>0&&(0,b.jsxs)("div",{style:{...j,marginTop:10,padding:0},children:[(0,b.jsx)("div",{style:{padding:"10px 14px",fontSize:12.5,color:"#b8c4c4",borderBottom:f.LINE},children:"Your connections who reach the most people no one else does"}),e.top.map((a,c)=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 14px",borderBottom:c<e.top.length-1?"1px solid rgba(255,255,255,0.04)":"none",fontSize:13},children:[(0,b.jsxs)("span",{style:{width:22,color:"#778"},children:["#",c+1]}),(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:E[a.tier]||"#667",flexShrink:0}}),(0,b.jsxs)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[(0,b.jsx)("b",{children:a.name}),a.company?(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" · ",a.company]}):null]}),(0,b.jsxs)("span",{style:{color:"#b8c4c4",whiteSpace:"nowrap"},children:[a.circle.toLocaleString()," in circle"]}),(0,b.jsxs)("span",{style:{color:"#00ff88",whiteSpace:"nowrap"},children:[a.only.toLocaleString()," only them (",F(a.share),")"]}),(0,b.jsx)(d.default,{href:`/?chain=${encodeURIComponent(a.id)}`,style:{color:"#3498DB",textDecoration:"none",whiteSpace:"nowrap"},children:"Explore →"})]},a.id))]})]})]})}var H=a.i(90017),I=a.i(58834);let J={color:"#3498DB",textDecoration:"none",fontWeight:600};function K(){let[a,e]=(0,c.useState)(0),g=()=>e(a=>a+1);return I.IS_DEMO?(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:f.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(d.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]}):(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:f.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:f.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:f.LINE},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Scores"})]}),(0,b.jsxs)("main",{style:{maxWidth:980,margin:"0 auto",padding:"8px 24px 64px"},children:[(0,b.jsxs)(f.Body,{style:{marginTop:16},children:["How someone’s power score is worked out, and the three things you can change about it:"," ",(0,b.jsx)("a",{href:"#sector",style:J,children:"your field"}),", ",(0,b.jsx)("a",{href:"#tiers",style:J,children:"how tiers are graded"})," and"," ",(0,b.jsx)("a",{href:"#companies",style:J,children:"any company’s score"}),". A change here rescores everyone."," ","First, ",(0,b.jsx)("a",{href:"#health",style:J,children:"how your network holds together"}),"."]}),(0,b.jsx)(G,{}),(0,b.jsx)(t,{onSaved:g}),(0,b.jsx)(A,{onSaved:g}),(0,b.jsx)("div",{id:"companies",style:{marginTop:28},children:(0,b.jsx)(H.default,{version:a})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(e.default,{children:(0,b.jsx)(K,{})})}],94264)}];
|
|
1
|
+
module.exports=[94264,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(36839),f=a.i(16874),g=a.i(803),h=a.i(79663),i=a.i(59534),j=a.i(54919),k=a.i(30889),l=a.i(76939);a.i(42510);var m=a.i(31483);let n={lean:"Lean",strong:"Strong"},o=["wheel","touchstart","keydown","pointerdown"],p={1:"1st",2:"2nd",3:"3rd"},q=(a,b,c=`${b}s`)=>`${a.toLocaleString()} ${1===a?b:c}`,r=i.DIRECTORY.filter(a=>"function"===a.kind).map(a=>a.label);function s(a,b,c){let[d,e]=c?["moved","moved"]:["moves","move"];if(!a&&!b)return c?"No one changed tier.":"No one changes tier.";let f=a=>1===a?d:e;return a&&b?`${q(a,"person","people")} ${f(a)} up a tier and ${b.toLocaleString()} ${f(b)} down.`:a?`${q(a,"person","people")} ${f(a)} up a tier.`:`${q(b,"person","people")} ${f(b)} down a tier.`}function t({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[i,l]=(0,c.useState)(null),[p,v]=(0,c.useState)(null),[w,x]=(0,c.useState)(!1),[y,z]=(0,c.useState)(null),[A,B]=(0,c.useState)(null),[C,D]=(0,c.useState)({loading:!0}),[E]=(0,c.useState)(()=>null),F=(0,c.useRef)(null),G=(0,c.useRef)(0),H=(0,c.useRef)(!1);function I(a){l(a),z(null),clearTimeout(F.current);let b=++G.current;if((0,h.sameFocus)(a,d))return void v(null);let c=(0,h.focusFingerprint)(a);v({key:c,loading:!0}),F.current=setTimeout(async()=>{try{let d=await fetch("/api/settings/sector-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorFocus:a})}),e=await d.json();if(b!==G.current)return;v(d.ok?{key:c,...e}:{key:c,error:e.error||"Could not work out what would change."})}catch{b===G.current&&v({key:c,error:"Could not reach the app to work out what would change."})}},250)}async function J(){var b,c;let d;x(!0),z(null),clearTimeout(F.current),G.current++;let f=await (0,m.saveSettings)({sectorFocus:i});(x(!1),f.settings&&(e(f.settings.sectorFocus),l(f.settings.sectorFocus),v(null)),f.error)?z({tone:"bad",text:f.error}):(z({tone:"ok",text:(b=f.settings.sectorFocus,c=f.effects?.sectorFocus,d=b.sectors.length?`Saved: ${b.sectors.map(a=>(0,j.sectorByKey)(a).label).join(" · ")} (${n[b.strength].toLowerCase()}).`:"Saved: no sector.",c?c.scored?`${d} Rescored your network (${q(c.people??c.scored,"person","people")}). ${s(c.up,c.down,!0)}`:`${d} There's no scanned network yet; it will apply when you scan.`:d)}),a?.())}(0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your sector.")))).then(b=>{if(a)return;let c=b.settings?.sectorFocus||{sectors:[],strength:"lean"};e(c),l(c)}).catch(b=>{a||B(b.message)}),fetch("/api/settings/sector-suggestions").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load suggestions.")))).then(b=>{a||D({scored:b.scored,list:b.suggestions||[]})}).catch(b=>{a||D({error:b.message})}),()=>{a=!0,clearTimeout(F.current)}},[]),(0,c.useEffect)(()=>{if(H.current||!i&&!A)return;H.current=!0;let a=document.getElementById("sector");if("#sector"!==window.location.hash||!a)return;let b=()=>a.scrollIntoView({block:"start"});b();let c=new ResizeObserver(b);c.observe(document.body);let d=()=>{for(let a of(c.disconnect(),clearTimeout(e),o))window.removeEventListener(a,d,!0)},e=setTimeout(d,2e3);for(let a of o)window.addEventListener(a,d,{capture:!0,passive:!0});return d},[i,A]);let K=i&&d&&!(0,h.sameFocus)(i,d);return(0,b.jsxs)(f.Section,{id:"sector",title:"Your sector",intro:"Pick up to three sectors you work in. Companies in them count for more when your network is scored, so the people there rank higher.",children:[A&&(0,b.jsx)(f.Status,{tone:"bad",children:A}),!i&&!A&&(0,b.jsx)(f.Body,{children:"Loading…"}),i&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.default,{sectors:i.sectors,onChange:a=>I({...i,sectors:a}),disabled:w,suggest:C}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:8,marginTop:14},children:[(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"How much:"}),Object.keys(k.SECTOR_BONUS).map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":i.strength===a,disabled:w,onClick:()=>I({...i,strength:a}),style:{padding:"5px 12px",borderRadius:7,fontSize:12.5,fontWeight:600,cursor:"pointer",color:i.strength===a?"#fff":"#8b9a9a",background:i.strength===a?"rgba(52,152,219,0.25)":"transparent",border:f.LINE},children:[n[a]," · +",k.SECTOR_BONUS[a]]},a))]}),(0,b.jsx)(f.Body,{style:{fontSize:12.5},children:"Each company in your sectors gets +1 (lean) or +2 (strong) on its score out of 10, never above 10. A company in more than one of your picks still gets it once."}),(0,b.jsx)(u,{preview:K?p:null,draft:i}),(0,b.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:J,disabled:!K||w,children:w?"Saving and rescoring…":"Save"}),K&&!w&&(0,b.jsx)(f.Btn,{onClick:()=>I(d),children:"Cancel"}),!K&&i.sectors.length>0&&!w&&(0,b.jsx)(f.Btn,{onClick:()=>I({...i,sectors:[]}),children:"Turn off"})]}),y&&(0,b.jsx)(f.Status,{tone:y.tone,children:y.text}),(0,b.jsxs)("ul",{style:{margin:"16px 0 0",paddingLeft:18,fontSize:12.5,color:"#778",lineHeight:1.7},children:[(0,b.jsx)("li",{children:"Tiers rank how reachable someone is through your network, not the people themselves."}),(0,b.jsxs)("li",{children:["A company score you set on ",(0,b.jsx)("a",{href:"#companies",style:{color:"#3498DB"},children:"Company scores"}),", below, always wins. Your sector never changes it."]}),(0,b.jsx)("li",{children:"If you scan highest tier first, people in your sectors come up sooner. Scanning newest first, the default, doesn’t go by tier."}),(0,b.jsx)("li",{children:"An industry includes its sectors. It counts a company in any of its sectors (Healthcare & Biotech counts a practice that is only in Dental), and a company whose industry the app’s list of well-known companies or the company’s own name gives (Meridian Health). Not one known only from its people’s job titles: a recruiter at Acme Widgets doesn’t make Acme a consulting firm."}),(0,b.jsx)("li",{children:"A narrower sector counts a company when its name says so (Smith Family Dental), it’s a well-known company in that sector, or at least half of the people you know there say so in their headlines (dentist, DDS, orthodontist). The words are a fixed list that comes with the app, the same on every computer. Nothing is sent anywhere."}),(0,b.jsxs)("li",{children:["Some sectors are work every kind of company has: ",r.length>1?`${r.slice(0,-1).join(", ")} and ${r.at(-1)}`:r.join(""),". For those a job title doesn’t count, since a recruiter at Acme Widgets doesn’t make it a recruiting firm. The company’s name does (Acme Staffing, Smith CPA), and so does a kind of firm in a headline (staffing agency, law firm, SaaS)."]}),E&&(0,b.jsxs)("li",{style:{color:"#FFD700"},children:["sample"===E?"The sample network":"The CSV import"," open in this window isn’t changed by this, and isn’t counted in the suggestions. Your sector applies to networks you’ve scanned."]})]})]})]})}function u({preview:a,draft:c}){if(!a||a.key!==(0,h.focusFingerprint)(c))return null;let d={marginTop:12,padding:"10px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,border:f.LINE,background:"rgba(255,255,255,0.03)",color:"#cfd8d8"};if(a.loading)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"Working out what would change…"});if(a.error)return(0,b.jsx)(f.Status,{tone:"bad",children:a.error});if(!a.scored)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"There’s no scanned network yet, so nothing changes now. Your choice applies once you scan."});let e=(a,b)=>`${q(a,"company","companies")} ${1===a?"scores":"score"} ${b}`,g=[a.companiesUp&&e(a.companiesUp,"higher"),a.companiesDown&&e(a.companiesDown,"lower")].filter(Boolean).join(" and ");return(0,b.jsxs)("div",{style:d,"aria-live":"polite",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:"If you save:"})," ",g?`${g}.`:"No company changes score."," ",s(a.up,a.down,!1)]}),a.examples?.length>0&&(0,b.jsx)("div",{style:{marginTop:6,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:12.5},children:a.examples.map((a,c)=>(0,b.jsxs)("span",{title:a.company||void 0,children:[a.name,a.degree?(0,b.jsxs)("span",{style:{color:"#667"},children:[" (",p[a.degree]||`${a.degree}th`,")"]}):null," ",(0,b.jsx)("b",{style:{color:l.TIER_COLORS_CLASSIC[a.from]||"#889"},children:a.from||"–"})," → ",(0,b.jsx)("b",{style:{color:l.TIER_COLORS_CLASSIC[a.to]||"#889"},children:a.to})]},c))}),a.companyExamples?.length>0&&(0,b.jsx)("div",{style:{marginTop:4,fontSize:12,color:"#8b9a9a"},children:a.companyExamples.slice(0,3).map(a=>`${a.name} ${a.from} → ${a.to}`).join(" · ")})]})}let v=a=>`${Math.round(100*a)}%`,[w,x,y]=k.CURVE.map(([,a])=>a),z=[{key:"curve",label:"On your network's curve",note:`Your top ${v(w)} are S, the next ${v(x-w)} A and the next ${v(y-x)} B, so any network has a top, even one full of companies the app doesn't know. It only lifts: nobody drops a tier because their network is strong, and nobody under ${k.CURVE_FLOOR} is lifted into S or A.`},{key:"fixed",label:"On the fixed scale",note:"The same lines for everyone: S from 7.5, A from 5.5, B from 4, C from 2.5. Easy to compare from one network to another, but a network outside well-known companies has almost nobody in S or A."}];function A({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[n]=(0,c.useState)(()=>null);async function o(b){if(g||b===d)return;h(!0),j(null);let{settings:c,effects:f,error:i}=await (0,m.saveSettings)({tierScale:b});if(c&&e(c.tierScale),i)j({tone:"bad",text:i});else{let b,c=f?.tierScale;j({tone:"ok",text:c?`Saved. ${b=c.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}h(!1)}return(0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load how tiers are graded.")))).then(b=>{a||e(b.settings?.tierScale||"curve")}).catch(b=>{a||l(b.message)}),()=>{a=!0}},[]),(0,b.jsxs)(f.Section,{id:"tiers",title:"Tiers",intro:"How the S to D rings are drawn. A tier says where someone sits in your network, not what they're worth.",children:[k&&(0,b.jsx)(f.Status,{tone:"bad",children:k}),d&&(0,b.jsx)("div",{role:"radiogroup","aria-label":"How tiers are graded",style:{display:"grid",gap:8},children:z.map(a=>{let c=d===a.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":c,disabled:g,onClick:()=>o(a.key),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,cursor:g?"wait":c?"default":"pointer",color:"#fff",background:c?"rgba(155,89,182,0.14)":"rgba(255,255,255,0.03)",border:c?"1px solid rgba(155,89,182,0.6)":f.LINE},children:[(0,b.jsxs)("div",{style:{fontSize:14,fontWeight:650},children:[c?"● ":"○ ",a.label,"curve"===a.key?" (recommended)":""]}),(0,b.jsx)(f.Body,{style:{marginTop:4},children:a.note})]},a.key)})}),n&&(0,b.jsxs)(f.Body,{style:{color:"#FFD700",marginTop:10},children:["sample"===n?"The sample network open in this window keeps its own tiers (they’re the same either way).":"The CSV import open in this window is always graded on its own curve."," ","This applies to networks you’ve scanned."]}),i&&(0,b.jsx)(f.Status,{tone:i.tone,children:i.text})]})}var B=a.i(75857),C=a.i(23310),D=a.i(45889);let E={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},F=a=>`${Math.round(100*a)}%`;function G(){let{userId:a}=(0,B.useUser)(),[e,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(!a)return;let b=!0;return(0,C.loadNetwork)(a).then(a=>{b&&g(function({degree1:a=[],degree2:b=[],ties:c=0}={}){let d=new Map;for(let a of b)a?.source_connection_id!=null&&d.set(a.source_connection_id,(d.get(a.source_connection_id)||0)+1);let e=(0,D.exclusiveReach)(b,a),f=a.length,g=Math.max(0,Number(c)||0),h=f?f-2*g/f:0,i=new Map(a.map(a=>[a.id,a])),j=[...e.entries()].sort((a,b)=>b[1].reach-a[1].reach||String(a[0]).localeCompare(String(b[0]))).slice(0,5).map(([a,b])=>{let c=i.get(a)||{};return{id:a,name:c.name||"",company:c.company||"",tier:c.tier||"",circle:d.get(a)||0,only:b.only,share:b.total?b.only/b.total:0}});return{circles:d.size,early:d.size<5,twoWays:(0,D.redundancy)(b,a),effective:{n:f,ties:g,size:h,efficiency:f?h/f:0},top:j}}(a))}).catch(()=>{b&&i(!0)}),()=>{b=!1}},[a]);let j={padding:"12px 14px",borderRadius:8,border:f.LINE,background:"rgba(255,255,255,0.03)"};return(0,b.jsxs)("section",{id:"health",style:{marginTop:20},children:[(0,b.jsx)("h2",{style:{fontSize:16,margin:"0 0 6px"},children:"Network health"}),h&&(0,b.jsx)(f.Body,{children:"Couldn’t read your network just now."}),!h&&!e&&(0,b.jsx)(f.Body,{children:"Reading your network…"}),e&&0===e.circles&&(0,b.jsx)(f.Body,{children:"Scan a few of your connections’ circles (the Scan page, step 4) and this shows how your network holds together."}),e&&e.circles>0&&(0,b.jsxs)(b.Fragment,{children:[e.early&&(0,b.jsxs)("div",{style:{fontSize:12.5,color:"#FFD700",margin:"4px 0 10px"},children:["An early estimate: ",e.circles," ",1===e.circles?"circle":"circles"," scanned. These get sharper as you scan more."]}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:10},children:[(0,b.jsxs)("div",{style:j,children:[(0,b.jsx)("div",{style:{fontSize:22,fontWeight:700},children:F(e.twoWays)}),(0,b.jsx)("div",{style:{fontSize:12.5,color:"#b8c4c4"},children:"of your 2nd degree you reach two or more ways"}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#778",marginTop:4},children:"Higher is safer: lose one connection and they’re still reachable."})]}),(0,b.jsxs)("div",{style:j,children:[(0,b.jsx)("div",{style:{fontSize:22,fontWeight:700},children:Math.round(e.effective.size).toLocaleString()}),(0,b.jsxs)("div",{style:{fontSize:12.5,color:"#b8c4c4"},children:["effective reach of your ",e.effective.n.toLocaleString()," connections (",F(e.effective.efficiency)," non-overlapping)"]}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#778",marginTop:4},children:["From ",e.effective.ties.toLocaleString()," ",1===e.effective.ties?"tie":"ties"," between your connections seen in circle scans so far, so it can only come down as you scan more."]})]})]}),e.top.length>0&&(0,b.jsxs)("div",{style:{...j,marginTop:10,padding:0},children:[(0,b.jsx)("div",{style:{padding:"10px 14px",fontSize:12.5,color:"#b8c4c4",borderBottom:f.LINE},children:"Your connections who reach the most people no one else does"}),e.top.map((a,c)=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 14px",borderBottom:c<e.top.length-1?"1px solid rgba(255,255,255,0.04)":"none",fontSize:13},children:[(0,b.jsxs)("span",{style:{width:22,color:"#778"},children:["#",c+1]}),(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:E[a.tier]||"#667",flexShrink:0}}),(0,b.jsxs)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[(0,b.jsx)("b",{children:a.name}),a.company?(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" · ",a.company]}):null]}),(0,b.jsxs)("span",{style:{color:"#b8c4c4",whiteSpace:"nowrap"},children:[a.circle.toLocaleString()," in circle"]}),(0,b.jsxs)("span",{style:{color:"#00ff88",whiteSpace:"nowrap"},children:[a.only.toLocaleString()," only them (",F(a.share),")"]}),(0,b.jsx)(d.default,{href:`/?chain=${encodeURIComponent(a.id)}`,style:{color:"#3498DB",textDecoration:"none",whiteSpace:"nowrap"},children:"Explore →"})]},a.id))]})]})]})}var H=a.i(90017),I=a.i(58834);let J={color:"#3498DB",textDecoration:"none",fontWeight:600};function K(){let[a,e]=(0,c.useState)(0),g=()=>e(a=>a+1);return I.IS_DEMO?(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:f.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(d.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]}):(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:f.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:f.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:f.LINE},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Scores"})]}),(0,b.jsx)("div",{id:"scan-bar-slot"}),(0,b.jsxs)("main",{style:{maxWidth:980,margin:"0 auto",padding:"8px 24px 64px"},children:[(0,b.jsxs)(f.Body,{style:{marginTop:16},children:["How someone’s power score is worked out, and the three things you can change about it:"," ",(0,b.jsx)("a",{href:"#sector",style:J,children:"your field"}),", ",(0,b.jsx)("a",{href:"#tiers",style:J,children:"how tiers are graded"})," and"," ",(0,b.jsx)("a",{href:"#companies",style:J,children:"any company’s score"}),". A change here rescores everyone."," ","First, ",(0,b.jsx)("a",{href:"#health",style:J,children:"how your network holds together"}),"."]}),(0,b.jsx)(G,{}),(0,b.jsx)(t,{onSaved:g}),(0,b.jsx)(A,{onSaved:g}),(0,b.jsx)("div",{id:"companies",style:{marginTop:28},children:(0,b.jsx)(H.default,{version:a})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(e.default,{children:(0,b.jsx)(K,{})})}],94264)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_scores_page_09wepvv.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[54209,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(50944),f=a.i(36839),g=a.i(16874);function h(){let[a,d]=(0,c.useState)(null);return((0,c.useEffect)(()=>{fetch("/api/update").then(a=>a.json()).then(d).catch(()=>{})},[]),a)?a.installed?(0,b.jsx)(l,{local:a}):(0,b.jsx)(j,{local:a}):null}async function i(a){let b=await fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json().catch(()=>({}));return{ok:b.ok,d:c}}function j({local:a}){let[d,e]=(0,c.useState)(null),[f,h]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(a){h(a),l(null);try{let{ok:b,d:c}=await i({action:a});if(!b){l(c.error||"Something went wrong."),c.dirty&&e({dirty:c.dirty});return}"check"===a?e(c):(n(c),e(null))}catch(a){l(a.message)}finally{h(null)}}return(0,c.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&(document.getElementById("updates")?.scrollIntoView({block:"center"}),o("check"),window.history.replaceState(null,"",window.location.pathname))},[]),(0,b.jsxs)(g.Section,{id:"updates",title:"Updates",children:[m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["Updated to ",(0,b.jsx)(g.Mono,{children:m.sha})," — “",m.subject,"”."]}),(0,b.jsx)(g.Body,{style:{color:m.needsRestart?"#FFD700":void 0},children:m.needsRestart?"Stop the app in your terminal and start it again — this update changed how it starts.":"The page will pick up most changes on its own. Restart the app if anything looks odd."})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["You are on ",(0,b.jsx)(g.Mono,{children:a.sha})," — “",a.subject,"”."]}),d&&0===d.behind&&(0,b.jsx)(g.Status,{tone:"ok",children:"You’re up to date."}),d&&d.behind>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{style:{color:"#00ff88"},children:[d.behind," update",1===d.behind?"":"s"," available."]}),(0,b.jsx)("pre",{style:r,children:d.commits.join("\n")})]}),d?.dirty?.length>0&&(0,b.jsxs)(g.Body,{children:["Changed files here:"," ",(0,b.jsx)(g.Mono,{children:d.dirty.join(", ")}),". Commit or discard them first — this will not throw away your work."]}),(0,b.jsxs)(q,{children:[(0,b.jsx)(g.Btn,{onClick:()=>o("check"),disabled:!!f,children:"check"===f?"Checking…":"Check for updates"}),d?.behind>0&&(0,b.jsx)(g.Btn,{onClick:()=>o("pull"),disabled:!!f,primary:!0,children:"pull"===f?"Updating…":`Install ${d.behind} update${1===d.behind?"":"s"}`})]})]}),k&&(0,b.jsx)(g.Body,{style:{color:"#ff7676"},children:k}),(0,b.jsxs)(g.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically and nothing about you is sent — this runs the same ",(0,b.jsx)(g.Mono,{children:"git fetch"})," and ",(0,b.jsx)(g.Mono,{children:"git pull"})," you would type yourself."]})]})}let k=["checking","downloading","verifying","preparing","restarting"];function l({local:a}){let d="mac-app"===a.kind,[e,f]=(0,c.useState)(!1),[h,j]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(a.job||null),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)(null),[G,H]=(0,c.useState)(void 0),[I,J]=(0,c.useState)(0),[K,L]=(0,c.useState)(!1),M=!!(y&&k.includes(y.phase)),N=M&&("restarting"===y.phase||I>0);async function O(){f(!0),j(null),t(null),D(null),F(null),H(void 0),z(a=>a&&k.includes(a.phase)?a:null);try{let{ok:a,d:b}=await i({action:"check-release"});a?(j(b),x(new Date)):t(b.error||"Could not check.")}catch(a){t(a.message)}finally{f(!1)}}async function P(){B(!0),D(null),F(null),H(void 0),J(0),L(!1);try{let{ok:a,d:b}=await i({action:"install-release"});b.job&&z(b.job),!a&&(D(b.error||"The update could not start."),F(b.refusal||null),"fallback"in b&&H(b.fallback))}catch(a){D(a.message)}finally{B(!1)}}async function Q(){try{let{d:a}=await i({action:"cancel-install"});a.job&&z(a.job)}catch{}}async function R(){try{await navigator.clipboard.writeText(a.command),v(!0),setTimeout(()=>v(!1),1600)}catch{t("Could not copy — select the line and copy it by hand.")}}(0,c.useEffect)(()=>{"#updates"===window.location.hash&&document.getElementById("updates")?.scrollIntoView({block:"start"}),"updates"!==new URLSearchParams(window.location.search).get("check")||(window.history.replaceState(null,"",window.location.pathname),a.job&&k.includes(a.job.phase)||(document.getElementById("updates")?.scrollIntoView({block:"center"}),O().then(()=>document.getElementById("updates")?.scrollIntoView({block:"end",behavior:"smooth"}))))},[a.job]),(0,c.useEffect)(()=>{if(!M)return;let a=!0,b=setTimeout(async()=>{try{if(N){let b=await fetch("/api/update",{cache:"no-store"}),c=await b.json();if(!a)return;if(!c.job||c.job.id!==y.id)return void window.location.reload();J(0),z(c.job)}else{let{ok:b,d:c}=await i({action:"update-status"});a&&b&&c.job&&z(c.job)}}catch{a&&J(a=>a+1)}},N?1500:600);return()=>{a=!1,clearTimeout(b)}},[y,I,M,N]),(0,c.useEffect)(()=>{if(!N)return;let a=setTimeout(()=>L(!0),6e4);return()=>clearTimeout(a)},[N]);let S=y?.phase==="failed",T=d&&h?.install?.possible,U=S&&"stale-check"===y.code||"not-checked"===E,V=void 0!==G?G:h?.fallback,W=h?.newer&&(!d||V)&&(!T||S||C||a.lastUpdate?.tone==="bad"),X=function({mac:a,kind:b,canInstall:c,fallback:d}){if(!a)return"source"===b?"A copy built from the source code updates by fetching the code and building it again, which it can't do while it runs. Stop it (Ctrl-C), then run this in the six-degrees folder. Your network stays where it is.":"This copy runs inside the terminal that started it, so it can't replace itself while it runs. Stop it first (Ctrl-C), then run this to start the newest version. Your network stays where it is.";if(!d)return null;let e=d.dataDir?` It opens the new version on the usual data folder, not on ${d.dataDir}: to use that one, quit it and open it again with --data-dir, as you opened this one.`:"";return"replace"===d.mode?`${c?"Or paste this into Terminal.":"Paste this into Terminal instead."} It closes this app, puts the new version in its place and opens it. Your network stays where it is.${e}`:`${c?"Or copy":"Copy"} this line, quit Six Degrees, then paste it into Terminal. It installs the new version at ${d.installsTo}, not where this copy is, and opens it: use that one from then on. Your network stays where it is.${e}`}({mac:d,kind:a.kind,canInstall:T,fallback:V});return(0,b.jsxs)(g.Section,{id:"updates",title:"Updates",children:[a.lastUpdate&&!M&&(0,b.jsx)(o,{report:a.lastUpdate}),(0,b.jsxs)(g.Body,{children:["You have version ",(0,b.jsx)(g.Mono,{children:a.version}),"."]}),M?(0,b.jsx)(n,{job:y,restarting:N,slow:K,onCancel:Q}):(0,b.jsxs)(b.Fragment,{children:[S&&(0,b.jsxs)(g.Status,{tone:"bad",children:[(0,b.jsx)("strong",{children:"The update didn’t finish."})," ",y.error," Nothing was changed."]}),y?.phase==="cancelled"&&(0,b.jsx)(g.Status,{children:"Cancelled. Nothing was changed."}),C&&(0,b.jsx)(g.Status,{tone:"bad",children:C}),h&&!h.latest&&(0,b.jsx)(g.Status,{children:"No release has been published yet."}),h?.latest&&!h.newer&&(0,b.jsxs)(g.Status,{tone:"ok",children:["You’re up to date: ",h.latest.version," is the newest version.",w&&(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" Checked at ",w.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),"."]})]}),h?.newer&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{style:{color:"#00ff88"},children:["Version ",h.latest.version," is available."]}),T&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["It downloads ",h.install.size?`about ${m(h.install.size)} MB`:"the new version"," from GitHub, checks it, then closes, replaces itself and reopens. Your network isn’t touched, and a backup of it is made first."]}),(0,b.jsxs)(q,{children:[U?(0,b.jsx)(g.Btn,{onClick:O,disabled:e,primary:!0,children:e?"Checking…":"Check again"}):(0,b.jsx)(g.Btn,{onClick:P,disabled:A,primary:!0,children:A?"Starting…":S||C?"Try again":"Install and restart"}),(0,b.jsx)(p,{url:h.latest.url})]})]}),d&&!T&&h.install?.reason&&(0,b.jsx)(g.Body,{children:h.install.reason}),W&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Body,{children:X}),a.testReleases?(0,b.jsx)("pre",{style:r,children:"Not shown in test mode: it would install the real release from GitHub into Applications."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("pre",{style:r,children:a.command}),(0,b.jsxs)(q,{children:[(0,b.jsx)(g.Btn,{onClick:R,primary:!T,children:u?"Copied":"Copy"}),!T&&(0,b.jsx)(p,{url:h.latest.url})]})]})]}),!T&&!W&&(0,b.jsx)(q,{children:(0,b.jsx)(p,{url:h.latest.url})})]}),!h?.newer&&(0,b.jsx)(q,{children:(0,b.jsx)(g.Btn,{onClick:O,disabled:e,children:e?"Checking…":h?"Check again":"Check for updates"})})]}),s&&(0,b.jsx)(g.Body,{style:{color:"#ff7676"},children:s}),(0,b.jsxs)(g.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically. The button asks GitHub for the newest version number, and nothing about you is sent.",d&&" Only a second click, Install and restart, downloads the new version."]}),a.testReleases&&(0,b.jsxs)(g.Body,{style:{fontSize:12,color:"#FFD700",marginTop:6},children:["Test mode: releases are read from ",(0,b.jsx)(g.Mono,{children:a.testReleases})," on this computer, not from GitHub."]})]})}let m=a=>Math.max(1,Math.round(a/1e6));function n({job:a,restarting:c,slow:d,onCancel:e}){let f=a.total?Math.min(100,Math.round(a.received/a.total*100)):null,h=c?"Restarting… Six Degrees closes and opens again in a moment.":"checking"===a.phase?"Asking GitHub for the newest version…":"downloading"===a.phase?`Downloading ${a.version}…${null!==f?` ${f}% (${m(a.received)} of ${m(a.total)} MB)`:""}`:"verifying"===a.phase?"Checking the download…":"Preparing the new version…";return(0,b.jsxs)("div",{role:"status","aria-live":"polite",style:{marginTop:12},children:[(0,b.jsx)(g.Body,{style:{color:"#e8e8ee"},children:h}),"downloading"===a.phase&&null!==f&&(0,b.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":f,"aria-label":"Download",style:{height:6,borderRadius:3,background:"rgba(255,255,255,0.08)",marginTop:10,overflow:"hidden",maxWidth:420},children:(0,b.jsx)("div",{style:{width:`${f}%`,height:"100%",background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.4s ease"}})}),d&&(0,b.jsx)(g.Body,{children:"This is taking longer than it should. If Six Degrees doesn’t open again by itself, open it from your Applications folder."}),!c&&(0,b.jsx)(q,{children:(0,b.jsx)(g.Btn,{onClick:e,children:"Cancel"})})]})}function o({report:a}){let c=new Date(a.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"});return(0,b.jsxs)(g.Status,{tone:"ok"===a.tone?"ok":"bad",children:[a.text," ",(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:["(",c,")"]}),"ok"===a.tone&&a.previous&&(0,b.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"#8b9a9a",marginTop:4},children:["A copy of the version you had is kept in ",(0,b.jsx)(g.Mono,{children:a.previous})," until the next update. To go back to it, open that file and drag the app it gives you into your Applications folder."]})]})}function p({url:a}){return a?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",fontSize:13.5},children:"What changed →"}):null}function q({children:a}){return(0,b.jsx)("div",{style:{display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},children:a})}let r={background:"rgba(0,0,0,0.45)",border:g.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"#b9c6c6",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",maxHeight:180,overflow:"auto"};function s(a){if(!a)return"0 KB";if(a<1048576)return`${Math.max(1,Math.round(a/1024))} KB`;let b=a/1048576;return`${b<10?b.toFixed(1):Math.round(b)} MB`}let t=a=>Number(a||0).toLocaleString("en-US"),u=(a,b,c=`${b}s`)=>`${t(a)} ${1===Number(a)?b:c}`;function v(a,b=!0){if(!a)return null;let c=new Date(a);return Number.isNaN(c.getTime())?null:c.toLocaleString(void 0,b?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"medium"})}let w={auto:"before a new version",import:"before an import",manual:"made by hand"};async function x(a,b){let c=await a.json().catch(()=>({}));if(!a.ok)throw Object.assign(Error(c.error||b),{data:c});return c}let y={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},z={fontSize:12,color:"#667",marginTop:10},A={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"#e8e8ee"},B={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"#c8d0d0",lineHeight:1.5,cursor:"pointer"};function C({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,justifyContent:"space-between",padding:"7px 0",borderTop:g.LINE,fontSize:13.5},children:[(0,b.jsx)("span",{style:{color:"#8b9a9a"},children:a}),(0,b.jsx)("span",{style:{color:"#e8e8ee",textAlign:"right"},children:c})]})}function D(){return(0,b.jsx)("a",{href:"https://github.com/blakeb056/six-degrees#undo-an-import",target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Undo an import"})}function E(){let[a,d]=(0,c.useState)(null),[e,f]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!0),[r,E]=(0,c.useState)(null),[F,G]=(0,c.useState)(!1),[H,I]=(0,c.useState)(!1),J=(0,c.useRef)(null),K=(0,c.useRef)(!1),L=(0,c.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(a=>x(a,"The data folder could not be read.")).then(a=>{let b=Date.parse(a.lastImport?.appliedAt||"");d({...a,importIsRecent:Number.isFinite(b)&&Date.now()-b<864e5}),f(null)}).catch(a=>f(a.message)),[]);async function M(){k(null);try{await navigator.clipboard.writeText(a.dataDir),k({tone:"ok",text:"Copied the folder’s path."})}catch{k({tone:"bad",text:"This window can’t copy. Select the path above and copy it instead."})}}async function N(){i("reveal"),k(null);try{await x(await fetch("/api/data/reveal",{method:"POST"}),"The folder could not be opened."),k({tone:"ok",text:"darwin"===a.platform?"Opened in Finder.":"Opened in your file browser."})}catch(a){k({tone:"bad",text:a.message})}finally{i(null)}}async function O(){i("export"),m(null);try{let a,b=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:p})});b.ok||await x(b,"The copy could not be made.");let c=await b.blob(),d=/filename="([^"]+)"/.exec(b.headers.get("content-disposition")||"")?.[1]||"Six Degrees backup.sixdegrees",e=URL.createObjectURL(c),f=document.createElement("a");f.href=e,f.download=d,f.style.position="fixed",f.style.left="-9999px",document.body.appendChild(f),f.click(),f.remove(),setTimeout(()=>URL.revokeObjectURL(e),6e4);let g=[(a=Number(b.headers.get("x-six-degrees-people")),u(a,"person","people"))];g.push(p?u(Number(b.headers.get("x-six-degrees-photos")),"photo"):"no photos"),m({tone:"ok",text:`Made “${d}” (${s(c.size)}: ${g.join(", ")}). Look for it in your Downloads folder, or wherever you chose to save it.`})}catch(a){m({tone:"bad",text:a.message})}finally{i(null)}}async function P(){if(r){i("import"),o(null);try{let b={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(r.size)};a.people>0&&(b["X-Six-Degrees-Replace"]=String(a.people)),await x(await fetch("/api/data/import",{method:"POST",headers:b,body:r}),"The file could not be imported."),E(null),G(!1),J.current&&(J.current.value=""),await L()}catch(a){a.data?.needsConfirm&&(G(!1),await L()),o({tone:"bad",text:a.message})}finally{i(null)}}}async function Q(){i("cancel"),o(null);try{await x(await fetch("/api/data/import",{method:"DELETE"}),"The import could not be cancelled."),await L(),o({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}async function R(){i("restart"),o(null);try{await x(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),I(!0);let a=a=>new Promise(b=>setTimeout(b,a)),b=Date.now()+9e4;for(await a(2500);Date.now()<b;){try{if((await fetch("/api/data",{cache:"no-store"})).ok)return void window.location.reload()}catch{}await a(1e3)}I(!1),o({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: the import finishes as it starts."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}if((0,c.useEffect)(()=>{L()},[L]),(0,c.useEffect)(()=>{a&&!K.current&&(K.current=!0,"#data"===window.location.hash&&document.getElementById("data")?.scrollIntoView({block:"start"}))},[a]),!a)return(0,b.jsx)(g.Section,{id:"data",title:"Your data",children:e?(0,b.jsx)(g.Status,{tone:"bad",children:e}):(0,b.jsx)(g.Body,{children:"Loading…"})});let S=a.pending,T=a.photosInCopy||a.photos,U=a.backups||[],V=U.reduce((a,b)=>a+(b.bytes||0),0),W=!!(r&&r.size>a.maxImportBytes),X=a.people>0,Y=a.lastImport;return(0,b.jsxs)(g.Section,{id:"data",title:"Your data",intro:"Everything Six Degrees knows about your network is in one folder on this computer.",children:[(0,b.jsx)(g.Body,{children:(0,b.jsx)(g.Mono,{children:a.dataDir})}),(0,b.jsxs)("div",{style:y,children:[(0,b.jsx)(g.Btn,{onClick:M,children:"Copy the path"}),(0,b.jsx)(g.Btn,{onClick:N,disabled:"reveal"===h,children:"reveal"===h?"Opening…":"darwin"===a.platform?"Show in Finder":"Open the folder"})]}),j&&(0,b.jsx)(g.Status,{tone:j.tone,children:j.text}),(0,b.jsxs)("div",{style:{marginTop:16,borderBottom:g.LINE},children:[(0,b.jsxs)(C,{label:"Your network",children:[u(a.people,"person","people")," · ",s(a.databaseBytes)]}),(0,b.jsx)(C,{label:"Profile photos",children:a.photos.count?`${t(a.photos.count)} \xb7 ${s(a.photos.bytes)}`:"none saved yet"}),(0,b.jsx)(C,{label:"Backups",children:U.length?`${u(U.length,"copy","copies")} \xb7 ${s(V)}`:"none yet"}),(0,b.jsx)(C,{label:"LinkedIn sign-in for scanning",children:a.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),U.length>0&&(0,b.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"#8b9a9a"},children:[(0,b.jsx)("summary",{style:{cursor:"pointer"},children:"The backups"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto auto",gap:"6px 14px",marginTop:8},children:U.map(a=>(0,b.jsxs)("div",{style:{display:"contents"},children:[(0,b.jsxs)("span",{style:{wordBreak:"break-all",color:"#c8d0d0"},children:[a.name,a.folder?"/":"",(0,b.jsxs)("span",{style:{color:"#667"},children:[" · ",a.folder?"its photos and files":w[a.kind]||a.kind]})]}),(0,b.jsx)("span",{children:v(a.modifiedAt)}),(0,b.jsx)("span",{style:{textAlign:"right"},children:s(a.bytes)})]},a.name))})]}),(0,b.jsx)(g.Body,{style:z,children:"Backups are copies of your network from before a new version or an import. The newest five from new versions are kept; copies from before an import stay until you delete them."}),(0,b.jsx)(g.Body,{style:z,children:"The folder can’t be moved from here. A database that a sync service (iCloud Drive, Dropbox) copies while it’s open can be damaged, and this folder also holds your LinkedIn sign-in, which should never be synced. To use your network on another computer, save a copy below and import it there."}),(0,b.jsx)("h3",{style:A,children:"Move your network to another computer"}),(0,b.jsx)(g.Body,{children:"Save a copy here, then on the new computer install Six Degrees, open Settings → Your data and import the copy. Sign in to LinkedIn again there before you scan: your sign-in never goes into a copy."}),(0,b.jsxs)("label",{style:B,children:[(0,b.jsx)("input",{type:"checkbox",checked:p,onChange:a=>q(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Include profile photos",T.count?` (${t(T.count)}, ${s(T.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,b.jsxs)("div",{style:y,children:[(0,b.jsx)(g.Btn,{primary:!0,onClick:O,disabled:!!h||H||0===a.people,children:"export"===h?"Saving…":"Save a copy of my network"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"There’s no network here to save yet."})]}),l&&(0,b.jsx)(g.Status,{tone:l.tone,children:l.text}),(0,b.jsx)(g.Body,{style:z,children:"The copy holds the names, headlines and photos of the people in your network. Keep it private: don’t post it or share it, and delete it once it has been imported. A network opened from a LinkedIn CSV lives only in its browser tab, so it isn’t in the copy; import the CSV again on the new computer."}),(0,b.jsx)("h3",{style:A,children:"Bring in a network from another computer"}),S?(0,b.jsxs)(g.Status,{children:[(0,b.jsx)("div",{style:{fontWeight:650},children:"An import is waiting to finish."}),(0,b.jsxs)("div",{children:["The network in the copy",S.exportedAt?` saved ${v(S.exportedAt,!1)}`:""," ","(",u(S.people,"person","people"),S.photos?`, ${u(S.photos,"photo")}`:"",S.fromVersion?`, from Six Degrees ${S.fromVersion}`:"",")",S.replacedPeople>0?` replaces the ${u(S.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so the import can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),S.error&&(0,b.jsxs)("div",{style:{color:"#ff7676",marginTop:6},children:["The last try stopped: ",S.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),H?(0,b.jsx)("div",{style:{marginTop:8},children:"Restarting… this page comes back in a few seconds."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{marginTop:8},children:a.restart.how}),a.restart.command&&(0,b.jsx)("div",{style:{marginTop:6},children:(0,b.jsx)(g.Mono,{children:a.restart.command})}),(0,b.jsxs)("div",{style:y,children:[a.restart.canRestart&&(0,b.jsx)(g.Btn,{primary:!0,onClick:R,disabled:!!h,children:"restart"===h?"Restarting…":"Restart now"}),!S.started&&(0,b.jsx)(g.Btn,{onClick:Q,disabled:!!h,children:"cancel"===h?"Cancelling…":"Cancel the import"})]})]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Body,{children:"Pick the copy you saved on the other computer (a .sixdegrees file). It replaces the network here; the two networks are never merged. Your LinkedIn search budget and any pause on scanning are kept, with the other computer’s searches added."}),(0,b.jsx)("input",{ref:J,type:"file",accept:".sixdegrees",onChange:function(a){o(null),G(!1),E(a.target.files?.[0]||null)},style:{display:"none"}}),(0,b.jsxs)("div",{style:y,children:[(0,b.jsx)(g.Btn,{onClick:()=>J.current?.click(),disabled:!!h,children:"Choose a file…"}),r&&(0,b.jsxs)("span",{style:{fontSize:13,color:"#c8d0d0",wordBreak:"break-all"},children:[r.name," · ",s(r.size)]})]}),W&&(0,b.jsxs)(g.Status,{tone:"bad",children:["That file is ",s(r.size),". This copy can import files up to ",s(a.maxImportBytes),"."]}),r&&X&&!W&&(0,b.jsxs)("label",{style:B,children:[(0,b.jsx)("input",{type:"checkbox",checked:F,onChange:a=>G(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Replace the ",u(a.people,"person","people")," in this copy’s network with the network in this file. A copy of what’s here is kept in backups first. Your search budget and any pause on scanning are kept too."]})]}),(0,b.jsx)("div",{style:y,children:(0,b.jsx)(g.Btn,{primary:!0,onClick:P,disabled:!r||W||X&&!F||!!h,children:"import"===h?"Checking the file…":"Import"})})]}),n&&(0,b.jsx)(g.Status,{tone:n.tone,children:n.text}),Y&&!S&&(a.importIsRecent?(0,b.jsxs)(g.Status,{tone:"ok",children:["Imported ",v(Y.appliedAt),": ",u(Y.people,"person","people"),Y.exportedAt?` from the copy saved ${v(Y.exportedAt,!1)}`:"",".",Y.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" ","What was here before is kept in ",(0,b.jsx)(g.Mono,{children:Y.keptDatabase}),Y.keptFiles?", with its photos and files beside it":"",".",Y.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, see ",(0,b.jsx)(D,{}),"."]})]}):(0,b.jsxs)(g.Body,{style:z,children:["Last import: ",v(Y.appliedAt)," (",u(Y.people,"person","people"),").",Y.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" What was here before is kept in ",(0,b.jsx)(g.Mono,{children:Y.keptDatabase})," (",(0,b.jsx)(D,{}),")."]})]}))]})}var F=a.i(58834);let G={"mac-app":"the Mac app",npm:"the npm package (npx six-degrees)",source:"a copy built from the source code",git:"a git checkout of the source code"};function H(){let[a,f]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),k=(0,e.useRouter)();if((0,c.useEffect)(()=>{let a=window.location.hash;("#sector"===a||"#tiers"===a)&&k.replace(`/scores${a}`)},[k]),(0,c.useEffect)(()=>{fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load settings.")))).then(f).catch(a=>j(a.message))},[]),F.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:g.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(d.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let l=a?.about;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:g.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:g.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:g.LINE},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Settings"})]}),(0,b.jsxs)("main",{style:{maxWidth:720,margin:"0 auto",padding:"8px 24px 64px"},children:[i&&(0,b.jsx)(g.Body,{style:{color:"#ff7676",marginTop:16},children:i}),(0,b.jsx)(h,{}),(0,b.jsx)(g.Section,{id:"scoring",title:"Your field and tiers",children:(0,b.jsxs)(g.Body,{children:["They’re on the ",(0,b.jsx)(d.default,{href:"/scores",style:{color:"#3498DB"},children:"Scores"})," tab now, beside every company’s score: ",(0,b.jsx)(d.default,{href:"/scores#sector",style:{color:"#3498DB"},children:"your field"})," and"," ",(0,b.jsx)(d.default,{href:"/scores#tiers",style:{color:"#3498DB"},children:"how tiers are graded"}),"."]})}),(0,b.jsx)(E,{}),(0,b.jsx)(g.Section,{id:"about",title:"About this copy",children:l?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["Version ",(0,b.jsx)(g.Mono,{children:l.version}),", running as ",G[l.kind]||l.kind,"."]}),(0,b.jsxs)(g.Body,{children:["Your network is kept in ",(0,b.jsx)(g.Mono,{children:l.dataDir}),l.customDataDir?" (a folder you chose).":".","mac-app"===l.kind&&" Help → Show the Data Folder opens it."]}),(0,b.jsx)(g.Body,{style:{fontSize:12,color:"#667",marginTop:10},children:"Settings are saved with your network, on this computer. Nothing here is sent anywhere."})]}):!i&&(0,b.jsx)(g.Body,{children:"Loading…"})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(f.default,{children:(0,b.jsx)(H,{})})}],54209)}];
|
|
1
|
+
module.exports=[54209,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(50944),f=a.i(36839),g=a.i(16874);function h(){let[a,d]=(0,c.useState)(null);return((0,c.useEffect)(()=>{fetch("/api/update").then(a=>a.json()).then(d).catch(()=>{})},[]),a)?a.installed?(0,b.jsx)(l,{local:a}):(0,b.jsx)(j,{local:a}):null}async function i(a){let b=await fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json().catch(()=>({}));return{ok:b.ok,d:c}}function j({local:a}){let[d,e]=(0,c.useState)(null),[f,h]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(a){h(a),l(null);try{let{ok:b,d:c}=await i({action:a});if(!b){l(c.error||"Something went wrong."),c.dirty&&e({dirty:c.dirty});return}"check"===a?e(c):(n(c),e(null))}catch(a){l(a.message)}finally{h(null)}}return(0,c.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&(document.getElementById("updates")?.scrollIntoView({block:"center"}),o("check"),window.history.replaceState(null,"",window.location.pathname))},[]),(0,b.jsxs)(g.Section,{id:"updates",title:"Updates",children:[m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["Updated to ",(0,b.jsx)(g.Mono,{children:m.sha})," — “",m.subject,"”."]}),(0,b.jsx)(g.Body,{style:{color:m.needsRestart?"#FFD700":void 0},children:m.needsRestart?"Stop the app in your terminal and start it again — this update changed how it starts.":"The page will pick up most changes on its own. Restart the app if anything looks odd."})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["You are on ",(0,b.jsx)(g.Mono,{children:a.sha})," — “",a.subject,"”."]}),d&&0===d.behind&&(0,b.jsx)(g.Status,{tone:"ok",children:"You’re up to date."}),d&&d.behind>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{style:{color:"#00ff88"},children:[d.behind," update",1===d.behind?"":"s"," available."]}),(0,b.jsx)("pre",{style:r,children:d.commits.join("\n")})]}),d?.dirty?.length>0&&(0,b.jsxs)(g.Body,{children:["Changed files here:"," ",(0,b.jsx)(g.Mono,{children:d.dirty.join(", ")}),". Commit or discard them first — this will not throw away your work."]}),(0,b.jsxs)(q,{children:[(0,b.jsx)(g.Btn,{onClick:()=>o("check"),disabled:!!f,children:"check"===f?"Checking…":"Check for updates"}),d?.behind>0&&(0,b.jsx)(g.Btn,{onClick:()=>o("pull"),disabled:!!f,primary:!0,children:"pull"===f?"Updating…":`Install ${d.behind} update${1===d.behind?"":"s"}`})]})]}),k&&(0,b.jsx)(g.Body,{style:{color:"#ff7676"},children:k}),(0,b.jsxs)(g.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically and nothing about you is sent — this runs the same ",(0,b.jsx)(g.Mono,{children:"git fetch"})," and ",(0,b.jsx)(g.Mono,{children:"git pull"})," you would type yourself."]})]})}let k=["checking","downloading","verifying","preparing","restarting"];function l({local:a}){let d="mac-app"===a.kind,[e,f]=(0,c.useState)(!1),[h,j]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(a.job||null),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)(null),[G,H]=(0,c.useState)(void 0),[I,J]=(0,c.useState)(0),[K,L]=(0,c.useState)(!1),M=!!(y&&k.includes(y.phase)),N=M&&("restarting"===y.phase||I>0);async function O(){f(!0),j(null),t(null),D(null),F(null),H(void 0),z(a=>a&&k.includes(a.phase)?a:null);try{let{ok:a,d:b}=await i({action:"check-release"});a?(j(b),x(new Date)):t(b.error||"Could not check.")}catch(a){t(a.message)}finally{f(!1)}}async function P(){B(!0),D(null),F(null),H(void 0),J(0),L(!1);try{let{ok:a,d:b}=await i({action:"install-release"});b.job&&z(b.job),!a&&(D(b.error||"The update could not start."),F(b.refusal||null),"fallback"in b&&H(b.fallback))}catch(a){D(a.message)}finally{B(!1)}}async function Q(){try{let{d:a}=await i({action:"cancel-install"});a.job&&z(a.job)}catch{}}async function R(){try{await navigator.clipboard.writeText(a.command),v(!0),setTimeout(()=>v(!1),1600)}catch{t("Could not copy — select the line and copy it by hand.")}}(0,c.useEffect)(()=>{"#updates"===window.location.hash&&document.getElementById("updates")?.scrollIntoView({block:"start"}),"updates"!==new URLSearchParams(window.location.search).get("check")||(window.history.replaceState(null,"",window.location.pathname),a.job&&k.includes(a.job.phase)||(document.getElementById("updates")?.scrollIntoView({block:"center"}),O().then(()=>document.getElementById("updates")?.scrollIntoView({block:"end",behavior:"smooth"}))))},[a.job]),(0,c.useEffect)(()=>{if(!M)return;let a=!0,b=setTimeout(async()=>{try{if(N){let b=await fetch("/api/update",{cache:"no-store"}),c=await b.json();if(!a)return;if(!c.job||c.job.id!==y.id)return void window.location.reload();J(0),z(c.job)}else{let{ok:b,d:c}=await i({action:"update-status"});a&&b&&c.job&&z(c.job)}}catch{a&&J(a=>a+1)}},N?1500:600);return()=>{a=!1,clearTimeout(b)}},[y,I,M,N]),(0,c.useEffect)(()=>{if(!N)return;let a=setTimeout(()=>L(!0),6e4);return()=>clearTimeout(a)},[N]);let S=y?.phase==="failed",T=d&&h?.install?.possible,U=S&&"stale-check"===y.code||"not-checked"===E,V=void 0!==G?G:h?.fallback,W=h?.newer&&(!d||V)&&(!T||S||C||a.lastUpdate?.tone==="bad"),X=function({mac:a,kind:b,canInstall:c,fallback:d}){if(!a)return"source"===b?"A copy built from the source code updates by fetching the code and building it again, which it can't do while it runs. Stop it (Ctrl-C), then run this in the six-degrees folder. Your network stays where it is.":"This copy runs inside the terminal that started it, so it can't replace itself while it runs. Stop it first (Ctrl-C), then run this to start the newest version. Your network stays where it is.";if(!d)return null;let e=d.dataDir?` It opens the new version on the usual data folder, not on ${d.dataDir}: to use that one, quit it and open it again with --data-dir, as you opened this one.`:"";return"replace"===d.mode?`${c?"Or paste this into Terminal.":"Paste this into Terminal instead."} It closes this app, puts the new version in its place and opens it. Your network stays where it is.${e}`:`${c?"Or copy":"Copy"} this line, quit Six Degrees, then paste it into Terminal. It installs the new version at ${d.installsTo}, not where this copy is, and opens it: use that one from then on. Your network stays where it is.${e}`}({mac:d,kind:a.kind,canInstall:T,fallback:V});return(0,b.jsxs)(g.Section,{id:"updates",title:"Updates",children:[a.lastUpdate&&!M&&(0,b.jsx)(o,{report:a.lastUpdate}),(0,b.jsxs)(g.Body,{children:["You have version ",(0,b.jsx)(g.Mono,{children:a.version}),"."]}),M?(0,b.jsx)(n,{job:y,restarting:N,slow:K,onCancel:Q}):(0,b.jsxs)(b.Fragment,{children:[S&&(0,b.jsxs)(g.Status,{tone:"bad",children:[(0,b.jsx)("strong",{children:"The update didn’t finish."})," ",y.error," Nothing was changed."]}),y?.phase==="cancelled"&&(0,b.jsx)(g.Status,{children:"Cancelled. Nothing was changed."}),C&&(0,b.jsx)(g.Status,{tone:"bad",children:C}),h&&!h.latest&&(0,b.jsx)(g.Status,{children:"No release has been published yet."}),h?.latest&&!h.newer&&(0,b.jsxs)(g.Status,{tone:"ok",children:["You’re up to date: ",h.latest.version," is the newest version.",w&&(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" Checked at ",w.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),"."]})]}),h?.newer&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{style:{color:"#00ff88"},children:["Version ",h.latest.version," is available."]}),T&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["It downloads ",h.install.size?`about ${m(h.install.size)} MB`:"the new version"," from GitHub, checks it, then closes, replaces itself and reopens. Your network isn’t touched, and a backup of it is made first."]}),(0,b.jsxs)(q,{children:[U?(0,b.jsx)(g.Btn,{onClick:O,disabled:e,primary:!0,children:e?"Checking…":"Check again"}):(0,b.jsx)(g.Btn,{onClick:P,disabled:A,primary:!0,children:A?"Starting…":S||C?"Try again":"Install and restart"}),(0,b.jsx)(p,{url:h.latest.url})]})]}),d&&!T&&h.install?.reason&&(0,b.jsx)(g.Body,{children:h.install.reason}),W&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Body,{children:X}),a.testReleases?(0,b.jsx)("pre",{style:r,children:"Not shown in test mode: it would install the real release from GitHub into Applications."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("pre",{style:r,children:a.command}),(0,b.jsxs)(q,{children:[(0,b.jsx)(g.Btn,{onClick:R,primary:!T,children:u?"Copied":"Copy"}),!T&&(0,b.jsx)(p,{url:h.latest.url})]})]})]}),!T&&!W&&(0,b.jsx)(q,{children:(0,b.jsx)(p,{url:h.latest.url})})]}),!h?.newer&&(0,b.jsx)(q,{children:(0,b.jsx)(g.Btn,{onClick:O,disabled:e,children:e?"Checking…":h?"Check again":"Check for updates"})})]}),s&&(0,b.jsx)(g.Body,{style:{color:"#ff7676"},children:s}),(0,b.jsxs)(g.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically. The button asks GitHub for the newest version number, and nothing about you is sent.",d&&" Only a second click, Install and restart, downloads the new version."]}),a.testReleases&&(0,b.jsxs)(g.Body,{style:{fontSize:12,color:"#FFD700",marginTop:6},children:["Test mode: releases are read from ",(0,b.jsx)(g.Mono,{children:a.testReleases})," on this computer, not from GitHub."]})]})}let m=a=>Math.max(1,Math.round(a/1e6));function n({job:a,restarting:c,slow:d,onCancel:e}){let f=a.total?Math.min(100,Math.round(a.received/a.total*100)):null,h=c?"Restarting… Six Degrees closes and opens again in a moment.":"checking"===a.phase?"Asking GitHub for the newest version…":"downloading"===a.phase?`Downloading ${a.version}…${null!==f?` ${f}% (${m(a.received)} of ${m(a.total)} MB)`:""}`:"verifying"===a.phase?"Checking the download…":"Preparing the new version…";return(0,b.jsxs)("div",{role:"status","aria-live":"polite",style:{marginTop:12},children:[(0,b.jsx)(g.Body,{style:{color:"#e8e8ee"},children:h}),"downloading"===a.phase&&null!==f&&(0,b.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":f,"aria-label":"Download",style:{height:6,borderRadius:3,background:"rgba(255,255,255,0.08)",marginTop:10,overflow:"hidden",maxWidth:420},children:(0,b.jsx)("div",{style:{width:`${f}%`,height:"100%",background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.4s ease"}})}),d&&(0,b.jsx)(g.Body,{children:"This is taking longer than it should. If Six Degrees doesn’t open again by itself, open it from your Applications folder."}),!c&&(0,b.jsx)(q,{children:(0,b.jsx)(g.Btn,{onClick:e,children:"Cancel"})})]})}function o({report:a}){let c=new Date(a.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"});return(0,b.jsxs)(g.Status,{tone:"ok"===a.tone?"ok":"bad",children:[a.text," ",(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:["(",c,")"]}),"ok"===a.tone&&a.previous&&(0,b.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"#8b9a9a",marginTop:4},children:["A copy of the version you had is kept in ",(0,b.jsx)(g.Mono,{children:a.previous})," until the next update. To go back to it, open that file and drag the app it gives you into your Applications folder."]})]})}function p({url:a}){return a?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",fontSize:13.5},children:"What changed →"}):null}function q({children:a}){return(0,b.jsx)("div",{style:{display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},children:a})}let r={background:"rgba(0,0,0,0.45)",border:g.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"#b9c6c6",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",maxHeight:180,overflow:"auto"};function s(a){if(!a)return"0 KB";if(a<1048576)return`${Math.max(1,Math.round(a/1024))} KB`;let b=a/1048576;return`${b<10?b.toFixed(1):Math.round(b)} MB`}let t=a=>Number(a||0).toLocaleString("en-US"),u=(a,b,c=`${b}s`)=>`${t(a)} ${1===Number(a)?b:c}`;function v(a,b=!0){if(!a)return null;let c=new Date(a);return Number.isNaN(c.getTime())?null:c.toLocaleString(void 0,b?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"medium"})}let w={auto:"before a new version",import:"before an import",manual:"made by hand"};async function x(a,b){let c=await a.json().catch(()=>({}));if(!a.ok)throw Object.assign(Error(c.error||b),{data:c});return c}let y={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},z={fontSize:12,color:"#667",marginTop:10},A={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"#e8e8ee"},B={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"#c8d0d0",lineHeight:1.5,cursor:"pointer"};function C({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,justifyContent:"space-between",padding:"7px 0",borderTop:g.LINE,fontSize:13.5},children:[(0,b.jsx)("span",{style:{color:"#8b9a9a"},children:a}),(0,b.jsx)("span",{style:{color:"#e8e8ee",textAlign:"right"},children:c})]})}function D(){return(0,b.jsx)("a",{href:"https://github.com/blakeb056/six-degrees#undo-an-import",target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Undo an import"})}function E(){let[a,d]=(0,c.useState)(null),[e,f]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!0),[r,E]=(0,c.useState)(null),[F,G]=(0,c.useState)(!1),[H,I]=(0,c.useState)(!1),J=(0,c.useRef)(null),K=(0,c.useRef)(!1),L=(0,c.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(a=>x(a,"The data folder could not be read.")).then(a=>{let b=Date.parse(a.lastImport?.appliedAt||"");d({...a,importIsRecent:Number.isFinite(b)&&Date.now()-b<864e5}),f(null)}).catch(a=>f(a.message)),[]);async function M(){k(null);try{await navigator.clipboard.writeText(a.dataDir),k({tone:"ok",text:"Copied the folder’s path."})}catch{k({tone:"bad",text:"This window can’t copy. Select the path above and copy it instead."})}}async function N(){i("reveal"),k(null);try{await x(await fetch("/api/data/reveal",{method:"POST"}),"The folder could not be opened."),k({tone:"ok",text:"darwin"===a.platform?"Opened in Finder.":"Opened in your file browser."})}catch(a){k({tone:"bad",text:a.message})}finally{i(null)}}async function O(){i("export"),m(null);try{let a,b=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:p})});b.ok||await x(b,"The copy could not be made.");let c=await b.blob(),d=/filename="([^"]+)"/.exec(b.headers.get("content-disposition")||"")?.[1]||"Six Degrees backup.sixdegrees",e=URL.createObjectURL(c),f=document.createElement("a");f.href=e,f.download=d,f.style.position="fixed",f.style.left="-9999px",document.body.appendChild(f),f.click(),f.remove(),setTimeout(()=>URL.revokeObjectURL(e),6e4);let g=[(a=Number(b.headers.get("x-six-degrees-people")),u(a,"person","people"))];g.push(p?u(Number(b.headers.get("x-six-degrees-photos")),"photo"):"no photos"),m({tone:"ok",text:`Made “${d}” (${s(c.size)}: ${g.join(", ")}). Look for it in your Downloads folder, or wherever you chose to save it.`})}catch(a){m({tone:"bad",text:a.message})}finally{i(null)}}async function P(){if(r){i("import"),o(null);try{let b={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(r.size)};a.people>0&&(b["X-Six-Degrees-Replace"]=String(a.people)),await x(await fetch("/api/data/import",{method:"POST",headers:b,body:r}),"The file could not be imported."),E(null),G(!1),J.current&&(J.current.value=""),await L()}catch(a){a.data?.needsConfirm&&(G(!1),await L()),o({tone:"bad",text:a.message})}finally{i(null)}}}async function Q(){i("cancel"),o(null);try{await x(await fetch("/api/data/import",{method:"DELETE"}),"The import could not be cancelled."),await L(),o({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}async function R(){i("restart"),o(null);try{await x(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),I(!0);let a=a=>new Promise(b=>setTimeout(b,a)),b=Date.now()+9e4;for(await a(2500);Date.now()<b;){try{if((await fetch("/api/data",{cache:"no-store"})).ok)return void window.location.reload()}catch{}await a(1e3)}I(!1),o({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: the import finishes as it starts."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}if((0,c.useEffect)(()=>{L()},[L]),(0,c.useEffect)(()=>{a&&!K.current&&(K.current=!0,"#data"===window.location.hash&&document.getElementById("data")?.scrollIntoView({block:"start"}))},[a]),!a)return(0,b.jsx)(g.Section,{id:"data",title:"Your data",children:e?(0,b.jsx)(g.Status,{tone:"bad",children:e}):(0,b.jsx)(g.Body,{children:"Loading…"})});let S=a.pending,T=a.photosInCopy||a.photos,U=a.backups||[],V=U.reduce((a,b)=>a+(b.bytes||0),0),W=!!(r&&r.size>a.maxImportBytes),X=a.people>0,Y=a.lastImport;return(0,b.jsxs)(g.Section,{id:"data",title:"Your data",intro:"Everything Six Degrees knows about your network is in one folder on this computer.",children:[(0,b.jsx)(g.Body,{children:(0,b.jsx)(g.Mono,{children:a.dataDir})}),(0,b.jsxs)("div",{style:y,children:[(0,b.jsx)(g.Btn,{onClick:M,children:"Copy the path"}),(0,b.jsx)(g.Btn,{onClick:N,disabled:"reveal"===h,children:"reveal"===h?"Opening…":"darwin"===a.platform?"Show in Finder":"Open the folder"})]}),j&&(0,b.jsx)(g.Status,{tone:j.tone,children:j.text}),(0,b.jsxs)("div",{style:{marginTop:16,borderBottom:g.LINE},children:[(0,b.jsxs)(C,{label:"Your network",children:[u(a.people,"person","people")," · ",s(a.databaseBytes)]}),(0,b.jsx)(C,{label:"Profile photos",children:a.photos.count?`${t(a.photos.count)} \xb7 ${s(a.photos.bytes)}`:"none saved yet"}),(0,b.jsx)(C,{label:"Backups",children:U.length?`${u(U.length,"copy","copies")} \xb7 ${s(V)}`:"none yet"}),(0,b.jsx)(C,{label:"LinkedIn sign-in for scanning",children:a.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),U.length>0&&(0,b.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"#8b9a9a"},children:[(0,b.jsx)("summary",{style:{cursor:"pointer"},children:"The backups"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto auto",gap:"6px 14px",marginTop:8},children:U.map(a=>(0,b.jsxs)("div",{style:{display:"contents"},children:[(0,b.jsxs)("span",{style:{wordBreak:"break-all",color:"#c8d0d0"},children:[a.name,a.folder?"/":"",(0,b.jsxs)("span",{style:{color:"#667"},children:[" · ",a.folder?"its photos and files":w[a.kind]||a.kind]})]}),(0,b.jsx)("span",{children:v(a.modifiedAt)}),(0,b.jsx)("span",{style:{textAlign:"right"},children:s(a.bytes)})]},a.name))})]}),(0,b.jsx)(g.Body,{style:z,children:"Backups are copies of your network from before a new version or an import. The newest five from new versions are kept; copies from before an import stay until you delete them."}),(0,b.jsx)(g.Body,{style:z,children:"The folder can’t be moved from here. A database that a sync service (iCloud Drive, Dropbox) copies while it’s open can be damaged, and this folder also holds your LinkedIn sign-in, which should never be synced. To use your network on another computer, save a copy below and import it there."}),(0,b.jsx)("h3",{style:A,children:"Move your network to another computer"}),(0,b.jsx)(g.Body,{children:"Save a copy here, then on the new computer install Six Degrees, open Settings → Your data and import the copy. Sign in to LinkedIn again there before you scan: your sign-in never goes into a copy."}),(0,b.jsxs)("label",{style:B,children:[(0,b.jsx)("input",{type:"checkbox",checked:p,onChange:a=>q(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Include profile photos",T.count?` (${t(T.count)}, ${s(T.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,b.jsxs)("div",{style:y,children:[(0,b.jsx)(g.Btn,{primary:!0,onClick:O,disabled:!!h||H||0===a.people,children:"export"===h?"Saving…":"Save a copy of my network"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"There’s no network here to save yet."})]}),l&&(0,b.jsx)(g.Status,{tone:l.tone,children:l.text}),(0,b.jsx)(g.Body,{style:z,children:"The copy holds the names, headlines and photos of the people in your network. Keep it private: don’t post it or share it, and delete it once it has been imported. A network opened from a LinkedIn CSV lives only in its browser tab, so it isn’t in the copy; import the CSV again on the new computer. The Social tab’s findings, and any messages you keep there, stay on this computer and aren’t in the copy either."}),(0,b.jsx)("h3",{style:A,children:"Bring in a network from another computer"}),S?(0,b.jsxs)(g.Status,{children:[(0,b.jsx)("div",{style:{fontWeight:650},children:"An import is waiting to finish."}),(0,b.jsxs)("div",{children:["The network in the copy",S.exportedAt?` saved ${v(S.exportedAt,!1)}`:""," ","(",u(S.people,"person","people"),S.photos?`, ${u(S.photos,"photo")}`:"",S.fromVersion?`, from Six Degrees ${S.fromVersion}`:"",")",S.replacedPeople>0?` replaces the ${u(S.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so the import can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),S.error&&(0,b.jsxs)("div",{style:{color:"#ff7676",marginTop:6},children:["The last try stopped: ",S.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),H?(0,b.jsx)("div",{style:{marginTop:8},children:"Restarting… this page comes back in a few seconds."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{marginTop:8},children:a.restart.how}),a.restart.command&&(0,b.jsx)("div",{style:{marginTop:6},children:(0,b.jsx)(g.Mono,{children:a.restart.command})}),(0,b.jsxs)("div",{style:y,children:[a.restart.canRestart&&(0,b.jsx)(g.Btn,{primary:!0,onClick:R,disabled:!!h,children:"restart"===h?"Restarting…":"Restart now"}),!S.started&&(0,b.jsx)(g.Btn,{onClick:Q,disabled:!!h,children:"cancel"===h?"Cancelling…":"Cancel the import"})]})]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Body,{children:"Pick the copy you saved on the other computer (a .sixdegrees file). It replaces the network here; the two networks are never merged. Your LinkedIn search budget and any pause on scanning are kept, with the other computer’s searches added."}),(0,b.jsx)("input",{ref:J,type:"file",accept:".sixdegrees",onChange:function(a){o(null),G(!1),E(a.target.files?.[0]||null)},style:{display:"none"}}),(0,b.jsxs)("div",{style:y,children:[(0,b.jsx)(g.Btn,{onClick:()=>J.current?.click(),disabled:!!h,children:"Choose a file…"}),r&&(0,b.jsxs)("span",{style:{fontSize:13,color:"#c8d0d0",wordBreak:"break-all"},children:[r.name," · ",s(r.size)]})]}),W&&(0,b.jsxs)(g.Status,{tone:"bad",children:["That file is ",s(r.size),". This copy can import files up to ",s(a.maxImportBytes),"."]}),r&&X&&!W&&(0,b.jsxs)("label",{style:B,children:[(0,b.jsx)("input",{type:"checkbox",checked:F,onChange:a=>G(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Replace the ",u(a.people,"person","people")," in this copy’s network with the network in this file. A copy of what’s here is kept in backups first. Your search budget and any pause on scanning are kept too."]})]}),(0,b.jsx)("div",{style:y,children:(0,b.jsx)(g.Btn,{primary:!0,onClick:P,disabled:!r||W||X&&!F||!!h,children:"import"===h?"Checking the file…":"Import"})})]}),n&&(0,b.jsx)(g.Status,{tone:n.tone,children:n.text}),Y&&!S&&(a.importIsRecent?(0,b.jsxs)(g.Status,{tone:"ok",children:["Imported ",v(Y.appliedAt),": ",u(Y.people,"person","people"),Y.exportedAt?` from the copy saved ${v(Y.exportedAt,!1)}`:"",".",Y.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" ","What was here before is kept in ",(0,b.jsx)(g.Mono,{children:Y.keptDatabase}),Y.keptFiles?", with its photos and files beside it":"",".",Y.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, see ",(0,b.jsx)(D,{}),"."]})]}):(0,b.jsxs)(g.Body,{style:z,children:["Last import: ",v(Y.appliedAt)," (",u(Y.people,"person","people"),").",Y.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" What was here before is kept in ",(0,b.jsx)(g.Mono,{children:Y.keptDatabase})," (",(0,b.jsx)(D,{}),")."]})]}))]})}var F=a.i(58834);let G={"mac-app":"the Mac app",npm:"the npm package (npx six-degrees)",source:"a copy built from the source code",git:"a git checkout of the source code"};function H(){let[a,f]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),k=(0,e.useRouter)();if((0,c.useEffect)(()=>{let a=window.location.hash;("#sector"===a||"#tiers"===a)&&k.replace(`/scores${a}`)},[k]),(0,c.useEffect)(()=>{fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load settings.")))).then(f).catch(a=>j(a.message))},[]),F.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:g.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(d.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let l=a?.about;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:g.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:g.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:g.LINE},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Settings"})]}),(0,b.jsx)("div",{id:"scan-bar-slot"}),(0,b.jsxs)("main",{style:{maxWidth:720,margin:"0 auto",padding:"8px 24px 64px"},children:[i&&(0,b.jsx)(g.Body,{style:{color:"#ff7676",marginTop:16},children:i}),(0,b.jsx)(h,{}),(0,b.jsx)(g.Section,{id:"scoring",title:"Your field and tiers",children:(0,b.jsxs)(g.Body,{children:["They’re on the ",(0,b.jsx)(d.default,{href:"/scores",style:{color:"#3498DB"},children:"Scores"})," tab now, beside every company’s score: ",(0,b.jsx)(d.default,{href:"/scores#sector",style:{color:"#3498DB"},children:"your field"})," and"," ",(0,b.jsx)(d.default,{href:"/scores#tiers",style:{color:"#3498DB"},children:"how tiers are graded"}),"."]})}),(0,b.jsx)(E,{}),(0,b.jsx)(g.Section,{id:"about",title:"About this copy",children:l?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["Version ",(0,b.jsx)(g.Mono,{children:l.version}),", running as ",G[l.kind]||l.kind,"."]}),(0,b.jsxs)(g.Body,{children:["Your network is kept in ",(0,b.jsx)(g.Mono,{children:l.dataDir}),l.customDataDir?" (a folder you chose).":".","mac-app"===l.kind&&" Help → Show the Data Folder opens it."]}),(0,b.jsx)(g.Body,{style:{fontSize:12,color:"#667",marginTop:10},children:"Settings are saved with your network, on this computer. Nothing here is sent anywhere."})]}):!i&&(0,b.jsx)(g.Body,{children:"Loading…"})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(f.default,{children:(0,b.jsx)(H,{})})}],54209)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_settings_page_1f8mjj_.js.map
|
|
@@ -2,7 +2,7 @@ module.exports=[65375,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944
|
|
|
2
2
|
|
|
3
3
|
Set ${b.daily} a day anyway?`:0===b.monthly&&0!==a.monthly?`With no monthly cap, only the daily budget stops a scan. A real account was restricted after 373 searches in 24 hours with no monthly cap set.
|
|
4
4
|
|
|
5
|
-
Turn the monthly cap off anyway?`:null}(e,{...e,...a});(!b||window.confirm(b))&&h(a)},j=function({daily:a,monthly:b}={}){if(!(({daily:a,monthly:b}={})=>Number(a)>100||0===b)({daily:a,monthly:b}))return null;let c=["A real account was restricted after 373 searches in 24 hours."];return Number(a)>100&&c.push(`${a} a day can use up a free account's month in a day or two.`),0===b&&c.push("With no monthly cap, nothing but the daily budget stops a long run."),c.join(" ")}(e);return(0,b.jsxs)("div",{style:{padding:"12px 14px",borderRadius:8,border:l,background:"rgba(255,255,255,0.03)",fontSize:12.5,color:"#b8c4c4"},children:[(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(210px, 1fr))",gap:14},children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:f})," of ",e.daily||"no limit"," searches in the last 24 hours"]}),(0,b.jsx)(s,{used:a.searchesToday||0,cap:e.daily})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:a.searchesMonth})," of ",e.monthly||"no limit"," this month · resets ",q(a.monthResets)]}),(0,b.jsx)(s,{used:a.searchesMonth,cap:e.monthly})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:g})," of ",e.profiles," profile views today"]}),(0,b.jsx)(s,{used:a.unreadable?e.profiles:a.profilesToday,cap:e.profiles})]})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",marginTop:10},children:[(0,b.jsx)("span",{children:"Budget:"}),(0,b.jsx)("select",{value:e.daily,disabled:d,onChange:a=>i({daily:Number(a.target.value)}),style:x,children:n.map(a=>(0,b.jsxs)("option",{value:a,children:[a," a day"]},a))}),(0,b.jsx)("select",{value:e.monthly,disabled:d,onChange:a=>i({monthly:Number(a.target.value)}),style:x,children:o.map(a=>(0,b.jsx)("option",{value:a,children:a?`${a} a month`:"no monthly cap (Premium)"},a))}),(0,b.jsx)("select",{value:e.profiles,disabled:d,onChange:a=>h({profiles:Number(a.target.value)}),style:x,children:p.map(a=>(0,b.jsxs)("option",{value:a,children:[a," profile views a day"]},a))})]}),(0,b.jsx)("div",{style:{marginTop:8,color:"#778",lineHeight:1.6},children:"Every page of someone’s connections is one search. LinkedIn limits a free account’s people searches by the month (it doesn’t say how many; reports put it around 250–350), resetting on the 1st. When a budget is used, a scan saves what it read and stops; the next one carries on from the same page."}),j&&(0,b.jsxs)("div",{style:{marginTop:8,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",color:"#FFD700",lineHeight:1.6},children:[(0,b.jsx)("b",{style:{flex:1,minWidth:200},children:j}),(0,b.jsxs)("button",{onClick:()=>h(k),disabled:d,style:{...x,cursor:d?"not-allowed":"pointer",color:"#FFD700",borderColor:"rgba(255,215,0,0.4)"},children:["Back to ",k.daily," a day, ",k.monthly," a month"]})]}),(0,b.jsx)("div",{style:{marginTop:6,color:"#778",lineHeight:1.6},children:"Each circle scan opens the person’s profile once, which is one profile view. Profile views are what LinkedIn restricted an account for, after about 20 in an hour. The scanner opens at most one a minute, and once today’s are used, a scan stops before the next profile and tries that person next time."})]})}function u({paused:a=[],onResume:d,onResumeAll:e,disabled:f}){let[g,h]=(0,c.useState)(!1);if(!a.length)return null;let i=a.filter(a=>a.legacy).length,j=g?a:a.slice(0,8);return(0,b.jsxs)("div",{style:{borderRadius:8,border:l,background:"rgba(255,255,255,0.03)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",borderBottom:l,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{flex:1,minWidth:200},children:[(0,b.jsxs)("b",{style:{fontSize:13.5},children:["Paused — ",a.length," ",1===a.length?"list":"lists"," with more to read"]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",marginTop:2},children:["Each carries on from the page it stopped at",i?`; ${i} were read to page 10 before whole lists were read`:"","."]})]}),(0,b.jsx)("button",{onClick:e,disabled:f,style:{...v,opacity:f?.4:1,cursor:f?"not-allowed":"pointer",background:f?"rgba(255,255,255,0.06)":"linear-gradient(135deg, #3498DB, #9B59B6)"},children:"Resume all"})]}),(0,b.jsx)("div",{children:j.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 14px",borderBottom:"1px solid rgba(255,255,255,0.04)"},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:m[a.tier]||"#667",flexShrink:0}}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#8b9a9a"},children:["Read to page ",a.pagesRead," · carries on at ",a.nextPage,a.at?` \xb7 ${q(a.at)}`:"",a.unclear>=2?" · came back unclear twice, so it waits at the back of Resume all":""]})]}),(0,b.jsx)("button",{onClick:()=>d(a),disabled:f,style:{...v,padding:"6px 12px",fontSize:12,opacity:f?.4:1,cursor:f?"not-allowed":"pointer"},children:"Resume"})]},a.id))}),a.length>8&&(0,b.jsx)("button",{onClick:()=>h(!g),style:{...w,padding:"10px 14px"},children:g?"Show fewer":`Show all ${a.length}`})]})}let v={padding:"8px 14px",borderRadius:7,fontSize:13,fontWeight:700,cursor:"pointer",border:l,background:"rgba(255,255,255,0.08)",color:"#fff"},w={background:"none",border:"none",color:"#8fb8d6",cursor:"pointer",fontSize:12.5,fontWeight:600,padding:0},x={padding:"6px 8px",borderRadius:6,fontSize:12.5,fontWeight:600,background:"rgba(255,255,255,0.08)",color:"#fff",border:l};var y=a.i(16874),z=a.i(803);a.i(59534);var A=a.i(54919),B=a.i(31483);let C={color:"#3498DB"};function D({onDone:a}){let[d,e]=(0,c.useState)([]),[f,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(null);async function j(){g("pick"),i(null);let b=await (0,B.saveSettings)({sectorFocus:{sectors:d,strength:"lean"},fieldAsked:!0});b.settings?a(b.settings.sectorFocus.sectors):(i(b.error),g(null))}async function k(){g("skip"),i(null),await (0,B.saveSettings)({fieldAsked:!0}),a([])}return(0,b.jsxs)("section",{"aria-labelledby":"field-question","data-field-question":!0,style:{margin:"8px 0 0",padding:"20px 22px 0",borderRadius:12,border:y.LINE,background:"rgba(255,255,255,0.03)"},children:[(0,b.jsx)("div",{style:{fontSize:12,color:"#788",textTransform:"uppercase",letterSpacing:.6},children:"Before you scan · optional"}),(0,b.jsx)("h2",{id:"field-question",style:{fontSize:18,fontWeight:700,margin:"6px 0 4px"},children:"What field are you in?"}),(0,b.jsx)(y.Body,{style:{marginTop:0,marginBottom:14},children:"Pick up to three. Companies in your field count for more when your network is scored, so the people there rank higher. You can change it anytime on the Scores tab."}),(0,b.jsx)(z.default,{sectors:d,onChange:e,disabled:!!f}),(0,b.jsxs)("div",{style:{position:"sticky",bottom:0,margin:"16px -22px 0",padding:"12px 22px 16px",borderTop:y.LINE,borderRadius:"0 0 11px 11px",background:"#111121"},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,b.jsx)(y.Btn,{primary:!0,onClick:j,disabled:!d.length||!!f,children:"pick"===f?"Saving…":"Continue"}),(0,b.jsx)(y.Btn,{onClick:k,disabled:!!f,children:"Skip for now"})]}),h&&(0,b.jsx)(y.Status,{tone:"bad",children:h})]})]})}function E({sectors:a}){return a.length?(0,b.jsxs)(y.Status,{tone:"ok",children:["Your field: ",a.map(a=>(0,A.sectorByKey)(a).label).join(" · "),". Your first scan is scored with it. Change it anytime on ",(0,b.jsx)(f.default,{href:"/scores#sector",style:C,children:"Scores"}),"."]}):(0,b.jsxs)(y.Status,{children:["No field for now. You can pick one anytime on ",(0,b.jsx)(f.default,{href:"/scores#sector",style:C,children:"Scores"}),"."]})}let F="1px solid rgba(255,255,255,0.1)",G={photos:"Saving profile photos to this computer",install:"Installing the scanner",setup:"Setting up the scanner",login:"Waiting for you to sign in",full:"Scanning your whole network",refresh:"Checking for new connections","auto-bridge":"Mapping 2nd-degree connections","auto-bridge-retry":"Mapping 2nd degree, hidden ones included",resume:"Carrying on with one paused list","resume-all":"Carrying on with every paused list"};function H(){let a;(0,c.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&window.location.replace("/settings?check=updates")},[]);let[e,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(!1),[n,o]=(0,c.useState)(10),[p,q]=(0,c.useState)(["S","A"]),[s,v]=K("six-degrees-bridge-order","newest"),[w,x]=K("six-degrees-bridge-pages-v2",100),[y,z]=K("six-degrees-bridge-finish",!0),[A,B]=K("six-degrees-experimental-auto",!1),[C,H]=K("six-degrees-hide-chrome",!1),[J,S]=(0,c.useState)(null),T=(0,c.useRef)(null),[U,V]=(0,c.useState)(void 0),[W,X]=(0,c.useState)(null),Y=(0,d.useSearchParams)().get("scan"),[Z,$]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!Y)return;let a=!0;return(0,g.pickedPerson)(Y).then(b=>{a&&$(b?.person?b:null)},()=>{}),()=>{a=!1}},[Y]);let _=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/scraper");k(await a.json())}catch{k(a=>a||{ready:!1,checks:{},log:[]})}},[]);async function aa(){S(null),await (0,g.stopScrape)().catch(a=>S(a.message)),_()}async function ab(a,b={}){S(null),m(!0);try{let c=await fetch("/api/scraper",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:a,...b})}),d=await c.json();c.ok||S(d.error||"Could not start.")}catch(a){S(a.message)}finally{m(!1),_()}}(0,c.useEffect)(()=>{_();let a=setInterval(_,1500);return()=>clearInterval(a)},[_]),(0,c.useEffect)(()=>{if(i.IS_DEMO)return;let a=!1;return fetch("/api/settings").then(a=>a.ok?a.json():null).then(b=>{a||V(b?.settings||null)}).catch(()=>{a||V(null)}),()=>{a=!0}},[]),(0,c.useEffect)(()=>{T.current&&(T.current.scrollTop=T.current.scrollHeight)},[e?.log?.length]);let ac=e?.checks||{},ad=e?.running,ae={...a=function(a){let b=a?.checks||{},c=(b,c,d)=>a?.running&&a.action===b?d:c;if(b.dependencies)return"bundled"===b.pythonSource?{done:!0,text:"Ready. The scanner and its Python come with the app, so there is nothing to install.",button:null}:"custom"===b.pythonSource?{done:!0,text:`Ready, on the Python named in SIX_DEGREES_PYTHON (${b.pythonPath}).`,button:null}:{done:!0,text:"Installed.",button:null};let d=b.ownPython&&"bundled"!==b.ownPython.source?`The Python named in SIX_DEGREES_PYTHON didn't work (${b.ownPython.problem}), so the scanner needs setting up another way. `:"";if(b.installFrom)return{done:!1,text:d+("downloaded"===b.installFrom.source?"Its own Python is already here. One more step, about a minute: it installs the browser-automation packages into it.":"One-time, about a minute. Downloads the browser-automation packages."),button:{action:"install",label:c("install","Install","Installing…")}};if(b.download){let a=Math.round(b.download.size/1048576);return{done:!1,text:`${d}${function(a){if(!a?.version)return"This computer has no Python the scanner can use.";let[b,c]=String(a.version).split(".").map(Number);return 3===b&&c>=10&&c<=14&&!1===a.venv?`This computer's Python ${a.version} can't make the scanner's own environment (on Ubuntu or Debian, python3-venv isn't installed).`:`This computer has Python ${a.version}, and the scanner needs 3.10 to 3.14.`}(b.systemPython)} Set up the scanner downloads its own Python ${b.download.version} (${a} MB, from GitHub) and the scanner's packages (from PyPI) into your data folder. Nothing else on this computer changes. About two minutes.`,button:{action:"setup",label:c("setup","Set up the scanner","Setting up…")}}}return{done:!1,text:`${d}No Python 3.10 to 3.14 was found on this machine. Install one from python.org, then reload.`,button:null}}(e),note:function(a,{done:b,button:c}){if(a?.source!=="bundled")return null;let d=/SIGKILL|code signature|not valid for use in process|quarantine|not permitted/i.test(a.problem||""),e=[`The Python that comes with the app didn't work (${a.problem}).`];return d&&e.push("macOS may have blocked it."),!1===a.retry&&e.push("Six Degrees won't try it again until you restart it."),b?e.push("The scanner uses another Python on this computer instead."):c?e.push(`To scan now, use ${h[c.action]} below: it gives the scanner a Python of its own in your data folder.`):e.push("To scan now, install Python 3.10 to 3.14 from python.org, then reload."),e.join(" ")}(e?.checks?.ownPython,a)};e&&ac.dependencies;let af=e&&!ac.chrome,ag=e&&!ac.scriptsFound,ah=e?.ready&&!ad,ai=e?.linkedin,aj=!!ai?.cooldown,ak=ah&&!aj,al=e?.network||{first:0,second:0,third:0},am=al.first,an=!i.IS_DEMO&&!W&&function(a,b){if(!a)return null;let c=a.network;return!!c&&!c.first&&!c.second&&!c.third&&!a.running&&(void 0===b?null:!!(b&&!b.fieldAsked&&!b.sectorFocus?.sectors?.length))}(e,U),ao=e&&!ad&&null!=e.exitCode&&0!==e.exitCode,ap=ao?e.failure?.length?e.failure.join("\n"):[...e.log||[]].reverse().find(a=>!/^Stopped \(exit/.test(a)&&!/Warning|warnings\.warn/.test(a)):null;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:F,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(f.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:F},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Scan your network"})]}),(0,b.jsxs)("div",{style:{maxWidth:720,margin:"0 auto",padding:"32px 24px 64px"},children:[(0,b.jsxs)("p",{style:{color:"#9aa",fontSize:15,lineHeight:1.6,marginTop:0},children:["This reads your own LinkedIn connections in a real Chrome window on this machine and saves them here. Nothing leaves your computer, and you will never be asked for your password — you sign in yourself, once.",!am&&(an?" One optional question, then three steps and your galaxy appears.":" Three steps and your galaxy appears; each one ticks itself off.")]}),null===an&&(0,b.jsx)("p",{style:{color:"#778",fontSize:13},children:"Checking your setup…"}),an&&(0,b.jsx)(D,{onDone:function(a){X({sectors:a}),window.scrollTo(0,0)}}),W&&(0,b.jsx)(E,{sectors:W.sectors}),!1===an&&(0,b.jsxs)(b.Fragment,{children:[Z?.person.id===Y&&(0,b.jsx)(I,{pick:Z,pages:w,setPages:x,li:ai,running:ad,s:e,canSearch:ak,busy:l,onUnpick:function(){$(null);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},onStart:()=>ab("bridge",{id:Z.person.id,maxPages:w})}),am>0&&!ad&&(0,b.jsx)(P,{children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{flex:1,minWidth:200},children:[(0,b.jsxs)("b",{children:[am.toLocaleString()," connections"]}),al.second>0&&(0,b.jsxs)(b.Fragment,{children:[", plus ",al.second.toLocaleString()," people in their circles"]}),al.third>0&&(0,b.jsxs)(b.Fragment,{children:[" and ",al.third.toLocaleString()," from company scans"]}),"."," ",(0,b.jsx)("span",{style:{color:"#9aa"},children:"Your galaxy is ready."})]}),(0,b.jsx)(f.default,{href:"/",style:{padding:"9px 18px",borderRadius:7,fontSize:13.5,fontWeight:700,color:"#0a0a1a",textDecoration:"none",background:"linear-gradient(135deg, #FFD700, #FF6B35)"},children:"See your network →"})]})}),e?.photosWaiting>0&&!ad&&(0,b.jsx)(P,{children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{flex:1,minWidth:200},children:[(0,b.jsxs)("b",{children:[e.photosWaiting.toLocaleString()," ",1===e.photosWaiting?"photo isn’t":"photos aren’t"," saved on this computer yet."]})," ",(0,b.jsx)("span",{style:{color:"#9aa"},children:"An older version kept them as links to LinkedIn. The app doesn’t load photos from LinkedIn while you browse, so those people show initials until the photos are saved here: now, or at the end of your next scan. An expired link can’t be saved; that person’s photo comes back when they’re next scanned."}),e&&!ac.dependencies&&(0,b.jsx)("div",{style:{color:"#8b9a9a",fontSize:12.5,marginTop:6},children:"Set up the scanner first (step 1 below): it saves them."})]}),(0,b.jsx)(O,{onClick:()=>ab("photos"),disabled:l||!ac.dependencies,children:"Save photos"})]})}),ao&&(0,b.jsxs)(P,{tone:"bad",children:[(0,b.jsx)("b",{children:"The last run stopped before it finished."}),ap&&(0,b.jsx)("div",{style:{marginTop:6,color:"#e8c4c4",whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12.5},children:ap}),(0,b.jsx)("div",{style:{color:"#9aa",marginTop:6},children:"The full log is below."})]}),ag&&(0,b.jsxs)(P,{tone:"bad",children:[(0,b.jsx)("b",{children:"Can’t find the scanner files."}),(0,b.jsx)("br",{}),(0,b.jsxs)("span",{style:{color:"#9aa"},children:["Expected ",(0,b.jsx)("code",{style:L,children:"scripts/scrape.py"})," next to the app. If you downloaded a zip, run the app from inside the project folder."]})]}),af&&(0,b.jsxs)(P,{tone:"bad",children:[(0,b.jsx)("b",{children:"Google Chrome isn’t installed."}),(0,b.jsx)("br",{}),(0,b.jsxs)("span",{style:{color:"#9aa"},children:["The scanner drives your real Chrome. Install it from"," ",(0,b.jsx)("a",{href:"https://www.google.com/chrome/",target:"_blank",rel:"noreferrer",style:{color:"#3498DB"},children:"google.com/chrome"}),", then reload this page."]})]}),e&&ae.note&&(0,b.jsx)(P,{tone:ae.done?void 0:"bad",children:ae.note}),(0,b.jsx)(N,{n:1,done:ae.done,title:"Set up the scanner",body:e?ae.text:"",action:e&&ae.button&&(0,b.jsx)(O,{onClick:()=>ab(ae.button.action),disabled:l||ad,children:ae.button.label})}),(0,b.jsx)(N,{n:2,done:!!ac.signedIn,title:"Sign into LinkedIn",body:ac.signedIn?"Signed in on this machine. If LinkedIn ever asks for a security check, or a scan says you were signed out, open LinkedIn here and finish it by hand.":"Opens a Chrome window. Sign in with your email and password — “Continue with Google” cannot work here, because Google blocks its sign-in inside automated browsers.",action:ac.dependencies&&(0,b.jsx)(O,{onClick:()=>ab("login"),disabled:l||ad,children:ad&&"login"===e.action?"Waiting for you…":"Open LinkedIn"})}),(0,b.jsx)(N,{n:3,done:am>0,title:"1st degree — the people you know",body:"The first scan walks your whole connections list, about a minute and a half for 750 people. After that, Check for new only looks at what has been added since.",action:(0,b.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:[(0,b.jsx)(O,{onClick:()=>ab("full"),disabled:!ak,primary:!0,children:ad&&"full"===e.action?"Scanning…":"Scan my whole network"}),(0,b.jsx)(O,{onClick:()=>ab("refresh"),disabled:!ak,children:ad&&"refresh"===e.action?"Checking…":"Check for new"})]})}),(0,b.jsx)(N,{n:4,done:!1,title:"2nd degree — the people they know",body:(0,b.jsxs)(b.Fragment,{children:["This is what fills ",(0,b.jsx)("b",{children:"Degrees"})," and ",(0,b.jsx)("b",{children:"Outlink"}),": it opens each of your connections in turn and reads who ",(0,b.jsx)("i",{children:"they"})," know. Most people hide their connections — those are noted and never tried again.",(0,b.jsx)("br",{}),(0,b.jsx)("br",{}),"It is slow on purpose, about two minutes between each person, because this is the part LinkedIn notices. During development a real account was temporarily restricted after roughly ",(0,b.jsx)("b",{children:"19 people in one sitting"}),". Run a batch, leave it for a day, run another — and stop the moment LinkedIn mentions unusual activity. It always picks up where it left off: anyone still without a mapped circle, in the order you choose below — your newest connections first, or highest tier first. Each person’s list is read to the end, saving every 10 pages, and a read that is stopped carries on from the same page next time."]}),action:(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,b.jsx)(r,{cooldown:ai?.cooldown,disabled:l,onLift:()=>ab("lift-cooldown")}),(0,b.jsx)(t,{li:ai,disabled:l,onSetLimits:a=>ab("set-limits",a)}),"score"===s&&(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:12,color:"#8b9a9a"},children:"Work through"}),["S","A","B","C","D"].map(a=>{let c=p.includes(a);return(0,b.jsx)("button",{onClick:()=>q(b=>b.includes(a)?b.filter(b=>b!==a):[...b,a]),disabled:ad,style:{width:30,height:28,borderRadius:7,fontSize:12,fontWeight:700,cursor:ad?"not-allowed":"pointer",border:F,background:c?"rgba(52,152,219,0.22)":"rgba(255,255,255,0.05)",color:c?"#cfe6f7":"#667"},children:a},a)}),(0,b.jsx)("span",{style:{fontSize:11.5,color:"#667"},children:p.length?"":"pick at least one"})]}),"newest"===s&&(0,b.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",lineHeight:1.6},children:["Goes by the date you connected, newest first, across every tier. Run"," ",(0,b.jsx)("b",{children:"Check for new"})," first so your latest connections are in the list."]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontSize:12,color:"#8b9a9a"},children:"Start with"}),(0,b.jsxs)("select",{value:s,onChange:a=>v(a.target.value),disabled:ad,style:M,children:[(0,b.jsx)("option",{value:"newest",children:"Newest connections first"}),(0,b.jsx)("option",{value:"score",children:"Highest tier first"})]}),(0,b.jsx)("span",{style:{fontSize:12,color:"#8b9a9a"},children:"Read up to"}),(0,b.jsxs)("select",{value:w,onChange:a=>x(Number(a.target.value)),disabled:ad,style:M,children:[(0,b.jsx)("option",{value:100,children:"every page, to the end of their list"}),(0,b.jsx)("option",{value:50,children:"50 pages each"}),(0,b.jsx)("option",{value:25,children:"25 pages each"}),(0,b.jsx)("option",{value:10,children:"10 pages (~100 people) each"})]})]}),(0,b.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"center",fontSize:12.5,color:"#cfd8d8",cursor:ad?"not-allowed":"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:y,onChange:a=>z(a.target.checked),disabled:ad}),"Also finish people already mapped, from the page each one stopped at"]}),(0,b.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",fontSize:12.5,color:"#b8c4c4",cursor:ad?"default":"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:A,disabled:ad,style:{marginTop:3},onChange:a=>{B(a.target.checked),window.dispatchEvent(new Event("six-degrees:experimental"))}}),(0,b.jsxs)("span",{children:[(0,b.jsx)("b",{style:{color:"#FFD700"},children:"Experimental:"})," all-day pacing. Up to 10 pages in a sitting, then a 45-minute rest; searches only from 9:00 to 19:00; at the daily budget it waits for it to free up instead of stopping; and it saves every page. It also reads LinkedIn’s own data beside the page text, to fill gaps and measure how the two compare. It keeps running while the app is open."]})]}),(0,b.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",fontSize:12.5,color:"#b8c4c4",cursor:ad?"default":"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:C,disabled:ad,style:{marginTop:3},onChange:a=>H(a.target.checked)}),(0,b.jsxs)("span",{children:[(0,b.jsx)("b",{style:{color:"#FFD700"},children:"Hide the Chrome window while scanning."})," Every scan runs with no window popping up; the status bar still shows what it’s doing, and Stop still works. Signing in always opens the window.",(0,b.jsx)("span",{style:{display:"block",marginTop:4,color:"#e0a080"},children:"The risks: a hidden Chrome is easier for LinkedIn to tell apart from a person, so it may make a warning or restriction more likely. If LinkedIn asks you to check it’s you (a code, a puzzle, signing in again) you won’t see it, and the scan will stop instead of waiting for you. Untick this and scan again to see what LinkedIn wants. It changes nothing about pacing or your daily budget."})]})]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#FFD700",lineHeight:1.6},children:["Every page is a LinkedIn search, so it rests 20 seconds before each one and a minute after every 10, and a long list can take"," ","about ",(0,j.circleScanCost)(w).minutes," minutes a person. LinkedIn shows 100 pages of anyone’s connections at most. Free accounts have a monthly search limit: if LinkedIn says it has been reached, the scan saves what it read and stops, and carries on from that page next time. Keep batches small."]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)(O,{onClick:()=>ab("auto-bridge",{maxBridges:n,tiers:"score"===s?p:[],order:s,maxPages:w,deeper:y,experimental:A}),disabled:!ak||"score"===s&&!p.length,primary:!0,children:ad&&"auto-bridge"===e.action?"Mapping…":"Map 2nd degree"}),(0,b.jsxs)("select",{value:n,onChange:a=>o(Number(a.target.value)),disabled:ad,style:M,children:[(0,b.jsx)("option",{value:5,children:"5 people"}),(0,b.jsx)("option",{value:10,children:"10 people"}),(0,b.jsx)("option",{value:25,children:"25 people"}),(0,b.jsx)("option",{value:0,children:"everyone — not advised"})]}),(0,b.jsx)(O,{onClick:()=>ab("auto-bridge-retry",{maxBridges:n,tiers:"score"===s?p:[],order:s,maxPages:w,deeper:y}),disabled:!ak||"score"===s&&!p.length,children:"Retry hidden ones"})]}),(0,b.jsx)(u,{paused:e?.paused||[],disabled:!ak,onResume:a=>ab("resume",{id:a.id}),onResumeAll:()=>ab("resume-all",{maxBridges:n})})]})}),ad&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:20,padding:"14px 16px",borderRadius:8,background:"rgba(255,255,255,0.05)",border:F},children:[(0,b.jsx)(R,{}),(0,b.jsxs)("div",{style:{flex:1,fontSize:13.5},children:[(0,b.jsx)("b",{children:G[e.action]||"Working"}),e.progress&&(0,b.jsx)(Q,{p:e.progress,action:e.action}),(0,b.jsx)("div",{style:{color:"#8b9a9a",fontSize:12.5,marginTop:2},children:"Stopping closes the browser cleanly and keeps everything found so far."})]}),(0,b.jsx)(O,{onClick:aa,tone:"bad",children:"Stop"})]}),J&&(0,b.jsx)(P,{tone:"bad",children:J}),e?.log?.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,margin:"28px 0 8px",fontSize:12,color:"#788",textTransform:"uppercase",letterSpacing:.6},children:[ad&&(0,b.jsx)(R,{}),ad?"Working":"Last run"]}),(0,b.jsx)("pre",{ref:T,style:{background:"rgba(0,0,0,0.45)",border:F,borderRadius:8,padding:14,maxHeight:280,overflow:"auto",margin:0,fontSize:12.5,lineHeight:1.7,color:"#b9c6c6",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.log.join("\n")})]})]}),(0,b.jsxs)("div",{style:{marginTop:32,paddingTop:20,borderTop:F,fontSize:13.5,color:"#8b9a9a"},children:["Checking for updates has moved to"," ",(0,b.jsx)(f.default,{href:"/settings#updates",style:{color:"#3498DB"},children:"Settings →"})]}),(0,b.jsxs)("p",{style:{color:"#667",fontSize:12.5,lineHeight:1.7,marginTop:32},children:["Automating LinkedIn may go against its User Agreement, and accounts have been restricted for it. This runs locally against your own account, at your own risk. LinkedIn’s own CSV export is the supported route and needs none of this —"," ",(0,b.jsx)(f.default,{href:"/import",style:{color:"#3498DB"},children:"import a CSV instead"}),"."]})]}),(0,b.jsx)("style",{children:`@keyframes spin { to { transform: rotate(360deg) } }
|
|
5
|
+
Turn the monthly cap off anyway?`:null}(e,{...e,...a});(!b||window.confirm(b))&&h(a)},j=function({daily:a,monthly:b}={}){if(!(({daily:a,monthly:b}={})=>Number(a)>100||0===b)({daily:a,monthly:b}))return null;let c=["A real account was restricted after 373 searches in 24 hours."];return Number(a)>100&&c.push(`${a} a day can use up a free account's month in a day or two.`),0===b&&c.push("With no monthly cap, nothing but the daily budget stops a long run."),c.join(" ")}(e);return(0,b.jsxs)("div",{style:{padding:"12px 14px",borderRadius:8,border:l,background:"rgba(255,255,255,0.03)",fontSize:12.5,color:"#b8c4c4"},children:[(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(210px, 1fr))",gap:14},children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:f})," of ",e.daily||"no limit"," searches in the last 24 hours"]}),(0,b.jsx)(s,{used:a.searchesToday||0,cap:e.daily})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:a.searchesMonth})," of ",e.monthly||"no limit"," this month · resets ",q(a.monthResets)]}),(0,b.jsx)(s,{used:a.searchesMonth,cap:e.monthly})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:g})," of ",e.profiles," profile views today"]}),(0,b.jsx)(s,{used:a.unreadable?e.profiles:a.profilesToday,cap:e.profiles})]})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",marginTop:10},children:[(0,b.jsx)("span",{children:"Budget:"}),(0,b.jsx)("select",{value:e.daily,disabled:d,onChange:a=>i({daily:Number(a.target.value)}),style:x,children:n.map(a=>(0,b.jsxs)("option",{value:a,children:[a," a day"]},a))}),(0,b.jsx)("select",{value:e.monthly,disabled:d,onChange:a=>i({monthly:Number(a.target.value)}),style:x,children:o.map(a=>(0,b.jsx)("option",{value:a,children:a?`${a} a month`:"no monthly cap (Premium)"},a))}),(0,b.jsx)("select",{value:e.profiles,disabled:d,onChange:a=>h({profiles:Number(a.target.value)}),style:x,children:p.map(a=>(0,b.jsxs)("option",{value:a,children:[a," profile views a day"]},a))})]}),(0,b.jsx)("div",{style:{marginTop:8,color:"#778",lineHeight:1.6},children:"Every page of someone’s connections is one search. LinkedIn limits a free account’s people searches by the month (it doesn’t say how many; reports put it around 250–350), resetting on the 1st. When a budget is used, a scan saves what it read and stops; the next one carries on from the same page."}),j&&(0,b.jsxs)("div",{style:{marginTop:8,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",color:"#FFD700",lineHeight:1.6},children:[(0,b.jsx)("b",{style:{flex:1,minWidth:200},children:j}),(0,b.jsxs)("button",{onClick:()=>h(k),disabled:d,style:{...x,cursor:d?"not-allowed":"pointer",color:"#FFD700",borderColor:"rgba(255,215,0,0.4)"},children:["Back to ",k.daily," a day, ",k.monthly," a month"]})]}),(0,b.jsx)("div",{style:{marginTop:6,color:"#778",lineHeight:1.6},children:"Each circle scan opens the person’s profile once, which is one profile view. Profile views are what LinkedIn restricted an account for, after about 20 in an hour. The scanner opens at most one a minute, and once today’s are used, a scan stops before the next profile and tries that person next time."})]})}function u({paused:a=[],onResume:d,onResumeAll:e,disabled:f}){let[g,h]=(0,c.useState)(!1);if(!a.length)return null;let i=a.filter(a=>a.legacy).length,j=g?a:a.slice(0,8);return(0,b.jsxs)("div",{style:{borderRadius:8,border:l,background:"rgba(255,255,255,0.03)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",borderBottom:l,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{flex:1,minWidth:200},children:[(0,b.jsxs)("b",{style:{fontSize:13.5},children:["Paused — ",a.length," ",1===a.length?"list":"lists"," with more to read"]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",marginTop:2},children:["Each carries on from the page it stopped at",i?`; ${i} were read to page 10 before whole lists were read`:"","."]})]}),(0,b.jsx)("button",{onClick:e,disabled:f,style:{...v,opacity:f?.4:1,cursor:f?"not-allowed":"pointer",background:f?"rgba(255,255,255,0.06)":"linear-gradient(135deg, #3498DB, #9B59B6)"},children:"Resume all"})]}),(0,b.jsx)("div",{children:j.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 14px",borderBottom:"1px solid rgba(255,255,255,0.04)"},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:m[a.tier]||"#667",flexShrink:0}}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#8b9a9a"},children:["Read to page ",a.pagesRead," · carries on at ",a.nextPage,a.at?` \xb7 ${q(a.at)}`:"",a.unclear>=2?" · came back unclear twice, so it waits at the back of Resume all":""]})]}),(0,b.jsx)("button",{onClick:()=>d(a),disabled:f,style:{...v,padding:"6px 12px",fontSize:12,opacity:f?.4:1,cursor:f?"not-allowed":"pointer"},children:"Resume"})]},a.id))}),a.length>8&&(0,b.jsx)("button",{onClick:()=>h(!g),style:{...w,padding:"10px 14px"},children:g?"Show fewer":`Show all ${a.length}`})]})}let v={padding:"8px 14px",borderRadius:7,fontSize:13,fontWeight:700,cursor:"pointer",border:l,background:"rgba(255,255,255,0.08)",color:"#fff"},w={background:"none",border:"none",color:"#8fb8d6",cursor:"pointer",fontSize:12.5,fontWeight:600,padding:0},x={padding:"6px 8px",borderRadius:6,fontSize:12.5,fontWeight:600,background:"rgba(255,255,255,0.08)",color:"#fff",border:l};var y=a.i(16874),z=a.i(803);a.i(59534);var A=a.i(54919),B=a.i(31483);let C={color:"#3498DB"};function D({onDone:a}){let[d,e]=(0,c.useState)([]),[f,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(null);async function j(){g("pick"),i(null);let b=await (0,B.saveSettings)({sectorFocus:{sectors:d,strength:"lean"},fieldAsked:!0});b.settings?a(b.settings.sectorFocus.sectors):(i(b.error),g(null))}async function k(){g("skip"),i(null),await (0,B.saveSettings)({fieldAsked:!0}),a([])}return(0,b.jsxs)("section",{"aria-labelledby":"field-question","data-field-question":!0,style:{margin:"8px 0 0",padding:"20px 22px 0",borderRadius:12,border:y.LINE,background:"rgba(255,255,255,0.03)"},children:[(0,b.jsx)("div",{style:{fontSize:12,color:"#788",textTransform:"uppercase",letterSpacing:.6},children:"Before you scan · optional"}),(0,b.jsx)("h2",{id:"field-question",style:{fontSize:18,fontWeight:700,margin:"6px 0 4px"},children:"What field are you in?"}),(0,b.jsx)(y.Body,{style:{marginTop:0,marginBottom:14},children:"Pick up to three. Companies in your field count for more when your network is scored, so the people there rank higher. You can change it anytime on the Scores tab."}),(0,b.jsx)(z.default,{sectors:d,onChange:e,disabled:!!f}),(0,b.jsxs)("div",{style:{position:"sticky",bottom:0,margin:"16px -22px 0",padding:"12px 22px 16px",borderTop:y.LINE,borderRadius:"0 0 11px 11px",background:"#111121"},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,b.jsx)(y.Btn,{primary:!0,onClick:j,disabled:!d.length||!!f,children:"pick"===f?"Saving…":"Continue"}),(0,b.jsx)(y.Btn,{onClick:k,disabled:!!f,children:"Skip for now"})]}),h&&(0,b.jsx)(y.Status,{tone:"bad",children:h})]})]})}function E({sectors:a}){return a.length?(0,b.jsxs)(y.Status,{tone:"ok",children:["Your field: ",a.map(a=>(0,A.sectorByKey)(a).label).join(" · "),". Your first scan is scored with it. Change it anytime on ",(0,b.jsx)(f.default,{href:"/scores#sector",style:C,children:"Scores"}),"."]}):(0,b.jsxs)(y.Status,{children:["No field for now. You can pick one anytime on ",(0,b.jsx)(f.default,{href:"/scores#sector",style:C,children:"Scores"}),"."]})}let F="1px solid rgba(255,255,255,0.1)",G={photos:"Saving profile photos to this computer",install:"Installing the scanner",setup:"Setting up the scanner",login:"Waiting for you to sign in",full:"Scanning your whole network",refresh:"Checking for new connections","auto-bridge":"Mapping 2nd-degree connections","auto-bridge-retry":"Mapping 2nd degree, hidden ones included",resume:"Carrying on with one paused list","resume-all":"Carrying on with every paused list"};function H(){let a;(0,c.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&window.location.replace("/settings?check=updates")},[]);let[e,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(!1),[n,o]=(0,c.useState)(10),[p,q]=(0,c.useState)(["S","A"]),[s,v]=K("six-degrees-bridge-order","newest"),[w,x]=K("six-degrees-bridge-pages-v2",100),[y,z]=K("six-degrees-bridge-finish",!0),[A,B]=K("six-degrees-experimental-auto",!1),[C,H]=K("six-degrees-hide-chrome",!1),[J,S]=(0,c.useState)(null),T=(0,c.useRef)(null),[U,V]=(0,c.useState)(void 0),[W,X]=(0,c.useState)(null),Y=(0,d.useSearchParams)().get("scan"),[Z,$]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!Y)return;let a=!0;return(0,g.pickedPerson)(Y).then(b=>{a&&$(b?.person?b:null)},()=>{}),()=>{a=!1}},[Y]);let _=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/scraper");k(await a.json())}catch{k(a=>a||{ready:!1,checks:{},log:[]})}},[]);async function aa(){S(null),await (0,g.stopScrape)().catch(a=>S(a.message)),_()}async function ab(a,b={}){S(null),m(!0);try{let c=await fetch("/api/scraper",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:a,...b})}),d=await c.json();c.ok||S(d.error||"Could not start.")}catch(a){S(a.message)}finally{m(!1),_()}}(0,c.useEffect)(()=>{_();let a=setInterval(_,1500);return()=>clearInterval(a)},[_]),(0,c.useEffect)(()=>{if(i.IS_DEMO)return;let a=!1;return fetch("/api/settings").then(a=>a.ok?a.json():null).then(b=>{a||V(b?.settings||null)}).catch(()=>{a||V(null)}),()=>{a=!0}},[]),(0,c.useEffect)(()=>{T.current&&(T.current.scrollTop=T.current.scrollHeight)},[e?.log?.length]);let ac=e?.checks||{},ad=e?.running,ae={...a=function(a){let b=a?.checks||{},c=(b,c,d)=>a?.running&&a.action===b?d:c;if(b.dependencies)return"bundled"===b.pythonSource?{done:!0,text:"Ready. The scanner and its Python come with the app, so there is nothing to install.",button:null}:"custom"===b.pythonSource?{done:!0,text:`Ready, on the Python named in SIX_DEGREES_PYTHON (${b.pythonPath}).`,button:null}:{done:!0,text:"Installed.",button:null};let d=b.ownPython&&"bundled"!==b.ownPython.source?`The Python named in SIX_DEGREES_PYTHON didn't work (${b.ownPython.problem}), so the scanner needs setting up another way. `:"";if(b.installFrom)return{done:!1,text:d+("downloaded"===b.installFrom.source?"Its own Python is already here. One more step, about a minute: it installs the browser-automation packages into it.":"One-time, about a minute. Downloads the browser-automation packages."),button:{action:"install",label:c("install","Install","Installing…")}};if(b.download){let a=Math.round(b.download.size/1048576);return{done:!1,text:`${d}${function(a){if(!a?.version)return"This computer has no Python the scanner can use.";let[b,c]=String(a.version).split(".").map(Number);return 3===b&&c>=10&&c<=14&&!1===a.venv?`This computer's Python ${a.version} can't make the scanner's own environment (on Ubuntu or Debian, python3-venv isn't installed).`:`This computer has Python ${a.version}, and the scanner needs 3.10 to 3.14.`}(b.systemPython)} Set up the scanner downloads its own Python ${b.download.version} (${a} MB, from GitHub) and the scanner's packages (from PyPI) into your data folder. Nothing else on this computer changes. About two minutes.`,button:{action:"setup",label:c("setup","Set up the scanner","Setting up…")}}}return{done:!1,text:`${d}No Python 3.10 to 3.14 was found on this machine. Install one from python.org, then reload.`,button:null}}(e),note:function(a,{done:b,button:c}){if(a?.source!=="bundled")return null;let d=/SIGKILL|code signature|not valid for use in process|quarantine|not permitted/i.test(a.problem||""),e=[`The Python that comes with the app didn't work (${a.problem}).`];return d&&e.push("macOS may have blocked it."),!1===a.retry&&e.push("Six Degrees won't try it again until you restart it."),b?e.push("The scanner uses another Python on this computer instead."):c?e.push(`To scan now, use ${h[c.action]} below: it gives the scanner a Python of its own in your data folder.`):e.push("To scan now, install Python 3.10 to 3.14 from python.org, then reload."),e.join(" ")}(e?.checks?.ownPython,a)};e&&ac.dependencies;let af=e&&!ac.chrome,ag=e&&!ac.scriptsFound,ah=e?.ready&&!ad,ai=e?.linkedin,aj=!!ai?.cooldown,ak=ah&&!aj,al=e?.network||{first:0,second:0,third:0},am=al.first,an=!i.IS_DEMO&&!W&&function(a,b){if(!a)return null;let c=a.network;return!!c&&!c.first&&!c.second&&!c.third&&!a.running&&(void 0===b?null:!!(b&&!b.fieldAsked&&!b.sectorFocus?.sectors?.length))}(e,U),ao=e&&!ad&&null!=e.exitCode&&0!==e.exitCode,ap=ao?e.failure?.length?e.failure.join("\n"):[...e.log||[]].reverse().find(a=>!/^Stopped \(exit/.test(a)&&!/Warning|warnings\.warn/.test(a)):null;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:F,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(f.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:F},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Scan your network"})]}),(0,b.jsx)("div",{id:"scan-bar-slot"}),(0,b.jsxs)("div",{style:{maxWidth:720,margin:"0 auto",padding:"32px 24px 64px"},children:[(0,b.jsxs)("p",{style:{color:"#9aa",fontSize:15,lineHeight:1.6,marginTop:0},children:["This reads your own LinkedIn connections in a real Chrome window on this machine and saves them here. Nothing leaves your computer, and you will never be asked for your password — you sign in yourself, once.",!am&&(an?" One optional question, then three steps and your galaxy appears.":" Three steps and your galaxy appears; each one ticks itself off.")]}),null===an&&(0,b.jsx)("p",{style:{color:"#778",fontSize:13},children:"Checking your setup…"}),an&&(0,b.jsx)(D,{onDone:function(a){X({sectors:a}),window.scrollTo(0,0)}}),W&&(0,b.jsx)(E,{sectors:W.sectors}),!1===an&&(0,b.jsxs)(b.Fragment,{children:[Z?.person.id===Y&&(0,b.jsx)(I,{pick:Z,pages:w,setPages:x,li:ai,running:ad,s:e,canSearch:ak,busy:l,onUnpick:function(){$(null);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},onStart:()=>ab("bridge",{id:Z.person.id,maxPages:w})}),am>0&&!ad&&(0,b.jsx)(P,{children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{flex:1,minWidth:200},children:[(0,b.jsxs)("b",{children:[am.toLocaleString()," connections"]}),al.second>0&&(0,b.jsxs)(b.Fragment,{children:[", plus ",al.second.toLocaleString()," people in their circles"]}),al.third>0&&(0,b.jsxs)(b.Fragment,{children:[" and ",al.third.toLocaleString()," from company scans"]}),"."," ",(0,b.jsx)("span",{style:{color:"#9aa"},children:"Your galaxy is ready."})]}),(0,b.jsx)(f.default,{href:"/",style:{padding:"9px 18px",borderRadius:7,fontSize:13.5,fontWeight:700,color:"#0a0a1a",textDecoration:"none",background:"linear-gradient(135deg, #FFD700, #FF6B35)"},children:"See your network →"})]})}),e?.photosWaiting>0&&!ad&&(0,b.jsx)(P,{children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{flex:1,minWidth:200},children:[(0,b.jsxs)("b",{children:[e.photosWaiting.toLocaleString()," ",1===e.photosWaiting?"photo isn’t":"photos aren’t"," saved on this computer yet."]})," ",(0,b.jsx)("span",{style:{color:"#9aa"},children:"An older version kept them as links to LinkedIn. The app doesn’t load photos from LinkedIn while you browse, so those people show initials until the photos are saved here: now, or at the end of your next scan. An expired link can’t be saved; that person’s photo comes back when they’re next scanned."}),e&&!ac.dependencies&&(0,b.jsx)("div",{style:{color:"#8b9a9a",fontSize:12.5,marginTop:6},children:"Set up the scanner first (step 1 below): it saves them."})]}),(0,b.jsx)(O,{onClick:()=>ab("photos"),disabled:l||!ac.dependencies,children:"Save photos"})]})}),ao&&(0,b.jsxs)(P,{tone:"bad",children:[(0,b.jsx)("b",{children:"The last run stopped before it finished."}),ap&&(0,b.jsx)("div",{style:{marginTop:6,color:"#e8c4c4",whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12.5},children:ap}),(0,b.jsx)("div",{style:{color:"#9aa",marginTop:6},children:"The full log is below."})]}),ag&&(0,b.jsxs)(P,{tone:"bad",children:[(0,b.jsx)("b",{children:"Can’t find the scanner files."}),(0,b.jsx)("br",{}),(0,b.jsxs)("span",{style:{color:"#9aa"},children:["Expected ",(0,b.jsx)("code",{style:L,children:"scripts/scrape.py"})," next to the app. If you downloaded a zip, run the app from inside the project folder."]})]}),af&&(0,b.jsxs)(P,{tone:"bad",children:[(0,b.jsx)("b",{children:"Google Chrome isn’t installed."}),(0,b.jsx)("br",{}),(0,b.jsxs)("span",{style:{color:"#9aa"},children:["The scanner drives your real Chrome. Install it from"," ",(0,b.jsx)("a",{href:"https://www.google.com/chrome/",target:"_blank",rel:"noreferrer",style:{color:"#3498DB"},children:"google.com/chrome"}),", then reload this page."]})]}),e&&ae.note&&(0,b.jsx)(P,{tone:ae.done?void 0:"bad",children:ae.note}),(0,b.jsx)(N,{n:1,done:ae.done,title:"Set up the scanner",body:e?ae.text:"",action:e&&ae.button&&(0,b.jsx)(O,{onClick:()=>ab(ae.button.action),disabled:l||ad,children:ae.button.label})}),(0,b.jsx)(N,{n:2,done:!!ac.signedIn,title:"Sign into LinkedIn",body:ac.signedIn?"Signed in on this machine. If LinkedIn ever asks for a security check, or a scan says you were signed out, open LinkedIn here and finish it by hand.":"Opens a Chrome window. Sign in with your email and password — “Continue with Google” cannot work here, because Google blocks its sign-in inside automated browsers.",action:ac.dependencies&&(0,b.jsx)(O,{onClick:()=>ab("login"),disabled:l||ad,children:ad&&"login"===e.action?"Waiting for you…":"Open LinkedIn"})}),(0,b.jsx)(N,{n:3,done:am>0,title:"1st degree — the people you know",body:"The first scan walks your whole connections list, about a minute and a half for 750 people. After that, Check for new only looks at what has been added since.",action:(0,b.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:[(0,b.jsx)(O,{onClick:()=>ab("full"),disabled:!ak,primary:!0,children:ad&&"full"===e.action?"Scanning…":"Scan my whole network"}),(0,b.jsx)(O,{onClick:()=>ab("refresh"),disabled:!ak,children:ad&&"refresh"===e.action?"Checking…":"Check for new"})]})}),(0,b.jsx)(N,{n:4,done:!1,title:"2nd degree — the people they know",body:(0,b.jsxs)(b.Fragment,{children:["This is what fills ",(0,b.jsx)("b",{children:"Degrees"})," and ",(0,b.jsx)("b",{children:"Outlink"}),": it opens each of your connections in turn and reads who ",(0,b.jsx)("i",{children:"they"})," know. Most people hide their connections — those are noted and never tried again.",(0,b.jsx)("br",{}),(0,b.jsx)("br",{}),"It is slow on purpose, about two minutes between each person, because this is the part LinkedIn notices. During development a real account was temporarily restricted after roughly ",(0,b.jsx)("b",{children:"19 people in one sitting"}),". Run a batch, leave it for a day, run another — and stop the moment LinkedIn mentions unusual activity. It always picks up where it left off: anyone still without a mapped circle, in the order you choose below — your newest connections first, or highest tier first. Each person’s list is read to the end, saving every 10 pages, and a read that is stopped carries on from the same page next time."]}),action:(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,b.jsx)(r,{cooldown:ai?.cooldown,disabled:l,onLift:()=>ab("lift-cooldown")}),(0,b.jsx)(t,{li:ai,disabled:l,onSetLimits:a=>ab("set-limits",a)}),"score"===s&&(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:12,color:"#8b9a9a"},children:"Work through"}),["S","A","B","C","D"].map(a=>{let c=p.includes(a);return(0,b.jsx)("button",{onClick:()=>q(b=>b.includes(a)?b.filter(b=>b!==a):[...b,a]),disabled:ad,style:{width:30,height:28,borderRadius:7,fontSize:12,fontWeight:700,cursor:ad?"not-allowed":"pointer",border:F,background:c?"rgba(52,152,219,0.22)":"rgba(255,255,255,0.05)",color:c?"#cfe6f7":"#667"},children:a},a)}),(0,b.jsx)("span",{style:{fontSize:11.5,color:"#667"},children:p.length?"":"pick at least one"})]}),"newest"===s&&(0,b.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",lineHeight:1.6},children:["Goes by the date you connected, newest first, across every tier. Run"," ",(0,b.jsx)("b",{children:"Check for new"})," first so your latest connections are in the list."]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontSize:12,color:"#8b9a9a"},children:"Start with"}),(0,b.jsxs)("select",{value:s,onChange:a=>v(a.target.value),disabled:ad,style:M,children:[(0,b.jsx)("option",{value:"newest",children:"Newest connections first"}),(0,b.jsx)("option",{value:"score",children:"Highest tier first"})]}),(0,b.jsx)("span",{style:{fontSize:12,color:"#8b9a9a"},children:"Read up to"}),(0,b.jsxs)("select",{value:w,onChange:a=>x(Number(a.target.value)),disabled:ad,style:M,children:[(0,b.jsx)("option",{value:100,children:"every page, to the end of their list"}),(0,b.jsx)("option",{value:50,children:"50 pages each"}),(0,b.jsx)("option",{value:25,children:"25 pages each"}),(0,b.jsx)("option",{value:10,children:"10 pages (~100 people) each"})]})]}),(0,b.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"center",fontSize:12.5,color:"#cfd8d8",cursor:ad?"not-allowed":"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:y,onChange:a=>z(a.target.checked),disabled:ad}),"Also finish people already mapped, from the page each one stopped at"]}),(0,b.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",fontSize:12.5,color:"#b8c4c4",cursor:ad?"default":"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:A,disabled:ad,style:{marginTop:3},onChange:a=>{B(a.target.checked),window.dispatchEvent(new Event("six-degrees:experimental"))}}),(0,b.jsxs)("span",{children:[(0,b.jsx)("b",{style:{color:"#FFD700"},children:"Experimental:"})," all-day pacing. Up to 8 pages in a sitting, then an hour’s rest; searches only from 9:00 to 18:00; never more than 40 searches in a day or 200 in a week, however high your budget; two days’ rest after any check from LinkedIn; at the budget it waits instead of stopping; and it saves every page. It also reads LinkedIn’s own data beside the page text, to fill gaps and measure how the two compare. It keeps running while the app is open."]})]}),(0,b.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",fontSize:12.5,color:"#b8c4c4",cursor:ad?"default":"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:C,disabled:ad,style:{marginTop:3},onChange:a=>H(a.target.checked)}),(0,b.jsxs)("span",{children:[(0,b.jsx)("b",{style:{color:"#FFD700"},children:"Hide the Chrome window while scanning."})," Every scan runs with no window popping up; the status bar still shows what it’s doing, and Stop still works. Signing in always opens the window.",(0,b.jsx)("span",{style:{display:"block",marginTop:4,color:"#e0a080"},children:"The risks: a hidden Chrome is easier for LinkedIn to tell apart from a person, so it may make a warning or restriction more likely. If LinkedIn asks you to check it’s you (a code, a puzzle, signing in again) you won’t see it, and the scan will stop instead of waiting for you. Untick this and scan again to see what LinkedIn wants. It changes nothing about pacing or your daily budget."})]})]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#FFD700",lineHeight:1.6},children:["Every page is a LinkedIn search, so it rests 20 seconds before each one and a minute after every 10, and a long list can take"," ","about ",(0,j.circleScanCost)(w).minutes," minutes a person. LinkedIn shows 100 pages of anyone’s connections at most. Free accounts have a monthly search limit: if LinkedIn says it has been reached, the scan saves what it read and stops, and carries on from that page next time. Keep batches small."]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)(O,{onClick:()=>ab("auto-bridge",{maxBridges:n,tiers:"score"===s?p:[],order:s,maxPages:w,deeper:y,experimental:A}),disabled:!ak||"score"===s&&!p.length,primary:!0,children:ad&&"auto-bridge"===e.action?"Mapping…":"Map 2nd degree"}),(0,b.jsxs)("select",{value:n,onChange:a=>o(Number(a.target.value)),disabled:ad,style:M,children:[(0,b.jsx)("option",{value:5,children:"5 people"}),(0,b.jsx)("option",{value:10,children:"10 people"}),(0,b.jsx)("option",{value:25,children:"25 people"}),(0,b.jsx)("option",{value:0,children:"everyone — not advised"})]}),(0,b.jsx)(O,{onClick:()=>ab("auto-bridge-retry",{maxBridges:n,tiers:"score"===s?p:[],order:s,maxPages:w,deeper:y}),disabled:!ak||"score"===s&&!p.length,children:"Retry hidden ones"})]}),(0,b.jsx)(u,{paused:e?.paused||[],disabled:!ak,onResume:a=>ab("resume",{id:a.id}),onResumeAll:()=>ab("resume-all",{maxBridges:n})})]})}),ad&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:20,padding:"14px 16px",borderRadius:8,background:"rgba(255,255,255,0.05)",border:F},children:[(0,b.jsx)(R,{}),(0,b.jsxs)("div",{style:{flex:1,fontSize:13.5},children:[(0,b.jsx)("b",{children:G[e.action]||"Working"}),e.progress&&(0,b.jsx)(Q,{p:e.progress,action:e.action}),(0,b.jsx)("div",{style:{color:"#8b9a9a",fontSize:12.5,marginTop:2},children:"Stopping closes the browser cleanly and keeps everything found so far."})]}),(0,b.jsx)(O,{onClick:aa,tone:"bad",children:"Stop"})]}),J&&(0,b.jsx)(P,{tone:"bad",children:J}),e?.log?.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,margin:"28px 0 8px",fontSize:12,color:"#788",textTransform:"uppercase",letterSpacing:.6},children:[ad&&(0,b.jsx)(R,{}),ad?"Working":"Last run"]}),(0,b.jsx)("pre",{ref:T,style:{background:"rgba(0,0,0,0.45)",border:F,borderRadius:8,padding:14,maxHeight:280,overflow:"auto",margin:0,fontSize:12.5,lineHeight:1.7,color:"#b9c6c6",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.log.join("\n")})]})]}),(0,b.jsxs)("div",{style:{marginTop:32,paddingTop:20,borderTop:F,fontSize:13.5,color:"#8b9a9a"},children:["Checking for updates has moved to"," ",(0,b.jsx)(f.default,{href:"/settings#updates",style:{color:"#3498DB"},children:"Settings →"})]}),(0,b.jsxs)("p",{style:{color:"#667",fontSize:12.5,lineHeight:1.7,marginTop:32},children:["Automating LinkedIn may go against its User Agreement, and accounts have been restricted for it. This runs locally against your own account, at your own risk. LinkedIn’s own CSV export is the supported route and needs none of this —"," ",(0,b.jsx)(f.default,{href:"/import",style:{color:"#3498DB"},children:"import a CSV instead"}),"."]})]}),(0,b.jsx)("style",{children:`@keyframes spin { to { transform: rotate(360deg) } }
|
|
6
6
|
@keyframes slide { 0% { transform: translateX(-100%) } 100% { transform: translateX(300%) } }`})]})}function I({pick:a,pages:c,setPages:d,li:e,running:g,s:h,canSearch:i,busy:k,onStart:l,onUnpick:m}){let{person:n,circle:o}=a,p=String(n.name||"").trim().split(/\s+/)[0]||"them",q=(0,j.circleScanCost)(c),r=g&&h?.target?.id===n.id,s=e?.leftToday!=null&&e.leftToday<q.searches;return(0,b.jsxs)("div",{style:{margin:"16px 0",padding:"16px 18px",borderRadius:10,fontSize:13.5,lineHeight:1.6,background:"rgba(0,255,136,0.05)",border:"1px solid rgba(0,255,136,0.3)"},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:700,color:"#00ff88",letterSpacing:.6,textTransform:"uppercase",marginBottom:4},children:"Scan one circle"}),(0,b.jsxs)("div",{style:{fontSize:16,fontWeight:700},children:[n.name," ",(0,b.jsxs)("span",{style:{fontSize:12,color:J[n.tier]||"#888"},children:[n.tier,"-tier"]})]}),n.unlocked_from_name&&(0,b.jsxs)("div",{style:{fontSize:12.5,color:"#9aa"},children:["Was in ",n.unlocked_from_name,"’s circle"]}),r?(0,b.jsxs)("div",{style:{marginTop:10},children:[(0,b.jsxs)("b",{children:["Scanning ",p,"’s circle."]})," It saves every 10 pages, and"," ",(0,b.jsx)(f.default,{href:`/?chain=${encodeURIComponent(n.id)}`,style:{color:"#00ff88"},children:"Bridge Chains shows it filling in →"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{color:"#b8c4c4",marginTop:10},children:["It costs ",(0,b.jsxs)("b",{children:[q.profileViews," profile view"]})," to find their list, then ",(0,b.jsx)("b",{children:"one LinkedIn search for every page"})," of it: up to ",q.searches," ",1===q.searches?"page":"pages",", about ",q.minutes," minutes.",e?.leftToday!=null&&(0,b.jsxs)(b.Fragment,{children:[" ",(0,b.jsx)("b",{children:e.leftToday})," of your ",e.limits?.daily," searches a day are left",s?"; the scan stops when they run out, and can carry on from that page later":"","."]})]}),"scanned"===o&&(0,b.jsx)("div",{style:{color:"#FFD700",fontSize:12.5,marginTop:6},children:"Their circle is already scanned. This reads their whole list again from page 1; to carry on from where a read stopped, use Resume on their card or in the Paused list below."}),"hidden"===o&&(0,b.jsx)("div",{style:{color:"#FFD700",fontSize:12.5,marginTop:6},children:"Their list was hidden last time it was tried. Trying again costs a profile view."}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:12},children:[(0,b.jsxs)(O,{onClick:l,disabled:!i||k,primary:!0,children:["Scan ",p,"’s circle"]}),(0,b.jsxs)("select",{value:c,onChange:a=>d(Number(a.target.value)),disabled:g,style:M,"aria-label":"How many pages of their list to read",children:[(0,b.jsx)("option",{value:100,children:"every page, to the end of their list"}),(0,b.jsx)("option",{value:50,children:"up to 50 pages"}),(0,b.jsx)("option",{value:25,children:"up to 25 pages"}),(0,b.jsx)("option",{value:10,children:"up to 10 pages (~100 people)"})]}),(0,b.jsx)(O,{onClick:m,children:"Not now"})]}),!i&&(0,b.jsx)("div",{style:{fontSize:12.5,color:"#8b9a9a",marginTop:8},children:g?"Something else is running. One scan at a time: this one can start when it finishes.":e?.cooldown?"Scanning is paused for now (see below).":"The scanner isn’t ready yet: finish the steps below first."})]})]})}let J={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function K(a,b){let[d,e]=(0,c.useState)(b);return(0,c.useEffect)(()=>{try{let b=localStorage.getItem(a);null!==b&&e(JSON.parse(b))}catch{}},[a]),[d,b=>{e(b);try{localStorage.setItem(a,JSON.stringify(b))}catch{}}]}let L={background:"rgba(255,255,255,0.08)",padding:"1px 5px",borderRadius:4},M={padding:"9px 10px",borderRadius:7,fontSize:13.5,fontWeight:600,background:"rgba(255,255,255,0.08)",color:"#fff",border:F};function N({n:a,done:c,title:d,body:e,action:f}){return(0,b.jsxs)("div",{style:{display:"flex",gap:16,padding:"20px 0",borderBottom:F,alignItems:"flex-start"},children:[(0,b.jsx)("div",{style:{flexShrink:0,width:28,height:28,borderRadius:"50%",display:"grid",placeItems:"center",fontSize:13,fontWeight:700,background:c?"rgba(0,255,136,0.15)":"rgba(255,255,255,0.08)",color:c?"#00ff88":"#889",border:`1px solid ${c?"rgba(0,255,136,0.4)":"rgba(255,255,255,0.14)"}`},children:c?"✓":a}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:15.5,fontWeight:650,marginBottom:4},children:d}),(0,b.jsx)("div",{style:{fontSize:13.5,color:"#8b9a9a",lineHeight:1.6,marginBottom:12*!!f},children:e}),f]})]})}function O({children:a,onClick:c,disabled:d,primary:e,tone:f}){return(0,b.jsx)("button",{onClick:c,disabled:d,style:{padding:"9px 18px",borderRadius:7,fontSize:13.5,fontWeight:650,color:d?"#667":"#fff",background:d?"rgba(255,255,255,0.05)":"bad"===f?"rgba(255,80,80,0.15)":e?"linear-gradient(135deg, #9B59B6, #3498DB)":"rgba(255,255,255,0.08)",border:F,cursor:d?"not-allowed":"pointer"},children:a})}function P({children:a,tone:c}){return(0,b.jsx)("div",{style:{margin:"16px 0",padding:"14px 16px",borderRadius:8,fontSize:13.5,lineHeight:1.6,background:"bad"===c?"rgba(255,80,80,0.08)":"rgba(255,255,255,0.05)",border:`1px solid ${"bad"===c?"rgba(255,80,80,0.3)":"rgba(255,255,255,0.12)"}`},children:a})}function Q({p:a,action:c}){let d;if("saving"===a.kind)return(0,b.jsxs)("div",{style:{margin:"8px 0 6px"},children:[(0,b.jsx)("div",{role:"progressbar","aria-label":"Saving",style:{height:8,borderRadius:4,overflow:"hidden",background:"rgba(255,255,255,0.08)",marginBottom:6},children:(0,b.jsx)("div",{style:{width:"35%",height:"100%",borderRadius:4,background:"linear-gradient(90deg, #9B59B6, #3498DB)",animation:"slide 1.2s ease-in-out infinite"}})}),(0,b.jsx)("div",{style:{fontSize:12.5,color:"#cfe6f7"},children:"Saving to your network and fetching photos — this can take a minute or two."})]});let e=Math.max(0,Math.min(100,Math.round(a.done/a.total*100)));return d="download"===a.kind?`Downloading Python: ${a.done.toFixed(1)} of ${a.total.toFixed(1)} MB \xb7 ${e}%`:"batch"===a.kind?`Person ${a.current} of ${a.total}`:"refresh"===c?`Looked at ${a.done.toLocaleString()} so far — stops once it reaches people already saved`:`${a.done.toLocaleString()} of ${a.total.toLocaleString()} connections \xb7 ${e}%`,(0,b.jsxs)("div",{style:{margin:"8px 0 6px"},children:["refresh"!==c&&(0,b.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":a.total,"aria-valuenow":a.done,"aria-label":d,style:{height:8,borderRadius:4,overflow:"hidden",background:"rgba(255,255,255,0.08)",marginBottom:6},children:(0,b.jsx)("div",{style:{width:`${e}%`,height:"100%",borderRadius:4,background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.6s ease"}})}),(0,b.jsx)("div",{style:{fontSize:12.5,color:"#cfe6f7"},children:d})]})}function R(){return(0,b.jsx)("span",{style:{width:11,height:11,borderRadius:"50%",display:"inline-block",border:"2px solid rgba(255,255,255,0.2)",borderTopColor:"#3498DB",animation:"spin 0.8s linear infinite"}})}a.s(["default",0,function(){return(0,b.jsx)(e.default,{children:(0,b.jsx)(c.Suspense,{children:(0,b.jsx)(H,{})})})}],65375)}];
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=app_setup_page_1-282zx.js.map
|