six-degrees 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +13 -13
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
  10. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.rsc +18 -17
  14. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +18 -17
  15. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +14 -13
  16. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  17. package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/import/page.js +1 -1
  46. package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/import.html +1 -1
  49. package/.next/standalone/.next/server/app/import.rsc +22 -21
  50. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +22 -21
  51. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +2 -2
  52. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +16 -15
  53. package/.next/standalone/.next/server/app/index.html +1 -1
  54. package/.next/standalone/.next/server/app/index.rsc +20 -19
  55. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +16 -15
  56. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +20 -19
  57. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  58. package/.next/standalone/.next/server/app/launch/page.js +1 -1
  59. package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/launch.html +2 -2
  62. package/.next/standalone/.next/server/app/launch.rsc +22 -21
  63. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +22 -21
  64. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +2 -2
  65. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +16 -15
  66. package/.next/standalone/.next/server/app/page.js +1 -1
  67. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/paths/page.js +1 -1
  70. package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/paths.html +1 -1
  73. package/.next/standalone/.next/server/app/paths.rsc +22 -21
  74. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +22 -21
  75. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +2 -2
  76. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +16 -15
  77. package/.next/standalone/.next/server/app/profile/page.js +1 -1
  78. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/profile.html +1 -1
  81. package/.next/standalone/.next/server/app/profile.rsc +22 -21
  82. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +22 -21
  83. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +2 -2
  84. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +16 -15
  85. package/.next/standalone/.next/server/app/queue/page.js +1 -1
  86. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/queue.html +1 -1
  89. package/.next/standalone/.next/server/app/queue.rsc +22 -21
  90. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +22 -21
  91. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +2 -2
  92. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +16 -15
  93. package/.next/standalone/.next/server/app/scores/page.js +1 -1
  94. package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
  95. package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/scores.html +1 -1
  97. package/.next/standalone/.next/server/app/scores.rsc +22 -21
  98. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +22 -21
  99. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +2 -2
  100. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +16 -15
  101. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  102. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  103. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/settings.html +1 -1
  105. package/.next/standalone/.next/server/app/settings.rsc +22 -21
  106. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +22 -21
  107. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  108. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +16 -15
  109. package/.next/standalone/.next/server/app/setup/page.js +1 -1
  110. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  111. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/setup.html +1 -1
  113. package/.next/standalone/.next/server/app/setup.rsc +22 -21
  114. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +22 -21
  115. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  116. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +16 -15
  117. package/.next/standalone/.next/server/chunks/_1_fynia._.js +5 -5
  118. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
  119. package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0d3vjsq._.js +3 -0
  121. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0m4vk0b._.js +3 -0
  122. package/.next/standalone/.next/server/chunks/ssr/{_15xuwkv._.js → _012mop3._.js} +2 -2
  123. package/.next/standalone/.next/server/chunks/ssr/_1163x49._.js +3 -0
  124. package/.next/standalone/.next/server/chunks/ssr/_1av11ws._.js +3 -0
  125. package/.next/standalone/.next/server/chunks/ssr/_1ig7em7._.js +3 -0
  126. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +2 -2
  127. package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +1 -1
  128. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  129. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  130. package/.next/standalone/.next/server/pages/404.html +1 -1
  131. package/.next/standalone/.next/server/pages/500.html +1 -1
  132. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  134. package/.next/standalone/.next/static/chunks/{049vavjsmqgmn.js → 0_3ubivay59bq.js} +4 -4
  135. package/.next/standalone/.next/static/chunks/{2p6o90z0vgcwr.css → 0bo1dxn5gwzpk.css} +1 -1
  136. package/.next/standalone/.next/static/chunks/0f4ugd6v3ph0-.js +1 -0
  137. package/.next/standalone/.next/static/chunks/10ogurbcuf3nq.js +1 -0
  138. package/.next/standalone/.next/static/chunks/1489t7jrjojk_.js +1 -0
  139. package/.next/standalone/.next/static/chunks/{0ax_9zzboyv6d.js → 17-rhp8sg4m1b.js} +2 -2
  140. package/.next/standalone/.next/static/chunks/1zunq4tk-u3ng.js +1 -0
  141. package/.next/standalone/.next/static/chunks/1zwjy1mmpkdrg.js +6 -0
  142. package/.next/standalone/.next/static/chunks/2_wcobfqry2uj.js +1 -0
  143. package/.next/standalone/.next/static/chunks/2dwtoszeq91us.js +1 -0
  144. package/.next/standalone/.next/static/chunks/{0ljxa-wk_iu__.js → 2pyo4j84prgp6.js} +3 -3
  145. package/.next/{static/chunks/22x2_r768-u5i.js → standalone/.next/static/chunks/2wwmljnf7yn_5.js} +1 -1
  146. package/.next/{static/chunks/2xjho0lroiwlq.js → standalone/.next/static/chunks/3kllnkb3hof1s.js} +1 -1
  147. package/.next/standalone/CHANGELOG.md +27 -0
  148. package/.next/standalone/app/api/scraper/route.js +17 -0
  149. package/.next/standalone/app/components/FilterPanel.js +37 -5
  150. package/.next/standalone/app/components/OrbitGraph.js +17 -4
  151. package/.next/standalone/app/components/ScanStatusBar.js +82 -0
  152. package/.next/standalone/app/globals.css +4 -0
  153. package/.next/standalone/app/layout.js +3 -0
  154. package/.next/standalone/app/page.js +8 -4
  155. package/.next/standalone/app/setup/page.js +13 -1
  156. package/.next/standalone/lib/scraper-client.js +1 -0
  157. package/.next/standalone/package-lock.json +2 -2
  158. package/.next/standalone/package.json +1 -1
  159. package/.next/standalone/scripts/scrape.py +219 -5
  160. package/.next/static/chunks/{049vavjsmqgmn.js → 0_3ubivay59bq.js} +4 -4
  161. package/.next/static/chunks/{2p6o90z0vgcwr.css → 0bo1dxn5gwzpk.css} +1 -1
  162. package/.next/static/chunks/0f4ugd6v3ph0-.js +1 -0
  163. package/.next/static/chunks/10ogurbcuf3nq.js +1 -0
  164. package/.next/static/chunks/1489t7jrjojk_.js +1 -0
  165. package/.next/static/chunks/{0ax_9zzboyv6d.js → 17-rhp8sg4m1b.js} +2 -2
  166. package/.next/static/chunks/1zunq4tk-u3ng.js +1 -0
  167. package/.next/static/chunks/1zwjy1mmpkdrg.js +6 -0
  168. package/.next/static/chunks/2_wcobfqry2uj.js +1 -0
  169. package/.next/static/chunks/2dwtoszeq91us.js +1 -0
  170. package/.next/static/chunks/{0ljxa-wk_iu__.js → 2pyo4j84prgp6.js} +3 -3
  171. package/.next/{standalone/.next/static/chunks/22x2_r768-u5i.js → static/chunks/2wwmljnf7yn_5.js} +1 -1
  172. package/.next/{standalone/.next/static/chunks/2xjho0lroiwlq.js → static/chunks/3kllnkb3hof1s.js} +1 -1
  173. package/CHANGELOG.md +27 -0
  174. package/lib/scraper-client.js +1 -0
  175. package/package.json +1 -1
  176. package/scripts/scrape.py +219 -5
  177. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h1_f_2._.js +0 -3
  178. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__19ip1qq._.js +0 -3
  179. package/.next/standalone/.next/server/chunks/ssr/_06w_gl4._.js +0 -3
  180. package/.next/standalone/.next/server/chunks/ssr/_13kzrwv._.js +0 -3
  181. package/.next/standalone/.next/server/chunks/ssr/_1hgd5dp._.js +0 -3
  182. package/.next/standalone/.next/server/chunks/ssr/node_modules_1f8t_rp._.js +0 -23
  183. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_server-async-storage_0t1dato.js +0 -3
  184. package/.next/standalone/.next/static/chunks/0mp9b72fm-jp6.js +0 -6
  185. package/.next/standalone/.next/static/chunks/1pre1cotntk6-.js +0 -1
  186. package/.next/standalone/.next/static/chunks/28bu26ausqzmn.js +0 -1
  187. package/.next/standalone/.next/static/chunks/2jz311xl1pp_8.js +0 -1
  188. package/.next/standalone/.next/static/chunks/2ot61qsv6_0eq.js +0 -1
  189. package/.next/standalone/.next/static/chunks/3zs_6-nn0dapb.js +0 -1
  190. package/.next/static/chunks/0mp9b72fm-jp6.js +0 -6
  191. package/.next/static/chunks/1pre1cotntk6-.js +0 -1
  192. package/.next/static/chunks/28bu26ausqzmn.js +0 -1
  193. package/.next/static/chunks/2jz311xl1pp_8.js +0 -1
  194. package/.next/static/chunks/2ot61qsv6_0eq.js +0 -1
  195. package/.next/static/chunks/3zs_6-nn0dapb.js +0 -1
  196. /package/.next/standalone/.next/static/{wGVrXBkFLmEB4snfhtOcO → 814ehZBeFO2rUKle7mzX-}/_buildManifest.js +0 -0
  197. /package/.next/standalone/.next/static/{wGVrXBkFLmEB4snfhtOcO → 814ehZBeFO2rUKle7mzX-}/_clientMiddlewareManifest.js +0 -0
  198. /package/.next/standalone/.next/static/{wGVrXBkFLmEB4snfhtOcO → 814ehZBeFO2rUKle7mzX-}/_ssgManifest.js +0 -0
  199. /package/.next/static/{wGVrXBkFLmEB4snfhtOcO → 814ehZBeFO2rUKle7mzX-}/_buildManifest.js +0 -0
  200. /package/.next/static/{wGVrXBkFLmEB4snfhtOcO → 814ehZBeFO2rUKle7mzX-}/_clientMiddlewareManifest.js +0 -0
  201. /package/.next/static/{wGVrXBkFLmEB4snfhtOcO → 814ehZBeFO2rUKle7mzX-}/_ssgManifest.js +0 -0
@@ -6,7 +6,7 @@ module.exports=[30100,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944
6
6
  .galaxy-ring-pulse { animation: galaxy-ring-pulse 1.8s ease-in-out infinite; }
7
7
  @media (prefers-reduced-motion: reduce) {
8
8
  .galaxy-ring-pulse { animation: none; opacity: 0.8; }
9
- }`;function R(a,b){let c=j.select(a);P()?c.interrupt("hover").attr("r",b):c.transition("hover").duration(150).ease(m.cubicOut).attr("r",b)}var n=n,p=o,o=o,S=a.i(76939);function T(a){return String(a??"").replace(/[&<>"']/g,a=>"&"===a?"&amp;":"<"===a?"&lt;":">"===a?"&gt;":'"'===a?"&quot;":"&#39;")}let U=(0,c.forwardRef)(function({connections:a=[],degree2:d=[],onSelect:e,userName:f="You",userImage:i=null,selectedId:k=null,mode:l="network"},m){let u=(0,c.useRef)(null),w=(0,c.useRef)(null),x=(0,c.useRef)(null),y=(0,c.useRef)(e),z=(0,c.useRef)(k),A=(0,c.useRef)(1),B=(0,c.useRef)(null),C=(0,c.useRef)(()=>{}),D=(0,c.useRef)(()=>{}),E=(0,c.useRef)(()=>{}),[F,I]=(0,c.useState)({w:0,h:0}),J=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),K=(0,c.useMemo)(()=>`${a.length}:${d.length}:${a.map(a=>a.id).join(",")}|${d.map(a=>a.id).join(",")}`,[a,d]),L=(0,c.useRef)({connections:a,degree2:d});(0,c.useImperativeHandle)(m,()=>({focusNode:a=>E.current(a)}),[]),(0,c.useEffect)(()=>{y.current=e},[e]),(0,c.useEffect)(()=>{L.current={connections:a,degree2:d}},[a,d]),(0,c.useEffect)(()=>{let a=u.current;if(!a)return;let b=()=>{let b=a.getBoundingClientRect();I(a=>{let c=Math.round(b.width),d=Math.round(b.height);return a.w===c&&a.h===d?a:{w:c,h:d}})};b();let c=new ResizeObserver(b);return c.observe(a),window.addEventListener("resize",b),()=>{c.disconnect(),window.removeEventListener("resize",b)}},[]),(0,c.useEffect)(()=>{z.current=k,C.current(k)},[k]);let M=(0,g.default)(),N=(0,c.useRef)(M);return(0,c.useEffect)(()=>{N.current=M,D.current(M)},[M]),(0,c.useEffect)(()=>{let a=w.current;if(!a||F.w<40||F.h<40)return;let b=F.w,c=F.h,{connections:d,degree2:e}=L.current,g="degrees"===l,k=new Set(e.map(a=>a.source_connection_id).filter(Boolean)),m=g?d.filter(a=>k.has(a.id)):d,I=new Map(m.map(a=>[a.id,a])),K=e.filter(a=>a.source_connection_id&&I.has(a.source_connection_id)),M=new Set(m.map(a=>a.tier).filter(Boolean)),O=new Set(e.map(a=>a.source_connection_id).filter(Boolean)),P=new Set(O.size?m.filter(a=>O.has(a.id)).map(a=>a.id):[...m].sort((a,b)=>(Number(b.power_score)||0)-(Number(a.power_score)||0)).slice(0,14).map(a=>a.id)),Q={id:"__user__",kind:"user",tier:null,r:26,targetRadius:0,connection:null,x:0,y:0,fx:0,fy:0},R={S:0,A:0,B:0,C:0,D:0},U=[],V=new Map,W=new Map;for(let a of m){let b=a.tier||"D",c=(R[b]=(R[b]||0)+1,(R[b]-1)*2.399963),d=S.TIER_RING_RADIUS[b]||S.TIER_RING_RADIUS.D,e=P.has(a.id),f={id:a.id,kind:"d1",hub:e,tier:b,r:e?7+1.1*Number(a.power_score||0):4.5,targetRadius:d,connection:a,x:Math.cos(c)*d,y:Math.sin(c)*d};U.push(f),V.set(a.id,f),W.set(a.id,c)}let X=new Map;for(let a of K){let b=a.source_connection_id,c=X.get(b);c?c.push(a):X.set(b,[a])}let Y=[],Z=[],$=S.TIER_RING_RADIUS.B+70;if(g){let a=new Map,b=new Set;for(let c of U){let d=c.connection?.unlocked_from_bridge_id;if(null==d||d===c.id||!V.has(d))continue;b.add(c.id);let e=a.get(d);e?e.push(c):a.set(d,[c])}let c=U.filter(a=>!b.has(a.id)),d=new Set,e=b=>{for(let c of a.get(b.id)||[])d.has(c.id)||(d.add(c.id),e(c))};for(let a of(c.forEach(e),U))b.has(a.id)&&!d.has(a.id)&&c.push(a);let f=new Map,g=(b,c=new Set)=>{if(f.has(b.id))return f.get(b.id);if(c.has(b.id))return 0;c.add(b.id);let d=X.get(b.id)?.length||0;for(let e of a.get(b.id)||[])d+=1+g(e,c);return c.delete(b.id),f.set(b.id,d),d},h=[...c].sort((a,b)=>g(b)-g(a)),i=Math.max(140,9*Math.max(1,h.length)),j=a=>Math.sqrt(g(a)+4),k=h.reduce((a,b)=>a+j(b),0)||1,l=(b,c,e,f,h)=>{let i=[...(X.get(b.id)||[]).map(a=>({c:a})),...(a.get(b.id)||[]).filter(a=>d.has(a.id)).map(a=>({added:a,c:a.connection}))].sort((a,b)=>(Number(b.c?.power_score)||0)-(Number(a.c?.power_score)||0)),j=h>2,k=j?8:9,m=[],n=0,o=f;for(;n<i.length;){let a=Math.max(1,Math.floor(o*e/k)),d=i.slice(n,n+a);d.forEach((a,f)=>{let i=c+(1===d.length?0:(f/(d.length-1)-.5)*e),k=Math.cos(i)*o,l=Math.sin(i)*o;if(a.added){let b=a.added;b.x=b.fx=k,b.y=b.fy=l,b.hub=!1,b.added=!0,b.r=5+Math.min(5,g(b)/60),m.push({d:b,a:i});return}let n={id:a.c.id,kind:"d2",depth:h,tier:a.c.tier||"D",r:(j?1.3:1.8)+Math.min(10,Number(a.c.power_score)||0)*(j?.24:.32),connection:a.c,x:k,y:l};n.fx=n.x,n.fy=n.y,Y.push(n),b.added&&Z.push({source:b,target:n,faint:!0})}),n+=d.length,o+=k}let p=o;for(let{d:a,a:b}of m){if(h>=6||!g(a))continue;let c=Math.min(.6*e,Math.max(.12,8*Math.min(g(a),60)/(o+24)));p=Math.max(p,l(a,b,c,o+24,h+1))}return p},m=-Math.PI/2;h.forEach(a=>{let b=j(a)/k*Math.PI*2,c=m+b/2;m+=b;let d=Math.min(.88*b,1.6);a.x=a.fx=Math.cos(c)*i,a.y=a.fy=Math.sin(c)*i,a.hub=!0,a.r=9+Math.min(10,(X.get(a.id)?.length||0)/40),$=Math.max($,l(a,c,d,i+a.r+16,2)+10)})}for(let[a,b]of g?[]:X){let c=V.get(a);if(!c)continue;let d=W.get(a)??0,e=c.targetRadius,f=Math.min(.15,1.5/Math.max(1,b.length));b.forEach((a,g)=>{let h=d+(g-(b.length-1)/2)*f,i=e+46+g%3*13,j={id:a.id,kind:"d2",tier:a.tier||"D",r:3.5,targetRadius:e+60,connection:a,x:Math.cos(h)*i,y:Math.sin(h)*i};Y.push(j),Z.push({source:j,target:c})})}let _=[Q,...U,...Y],aa=[...Y,...U,Q],ab=(0,j.select)(a);ab.selectAll("*").remove();let ac=ab.append("defs"),ad=ac.append("radialGradient").attr("id","og-user-grad");ad.append("stop").attr("offset","0%").attr("stop-color","#f8fafc"),ad.append("stop").attr("offset","55%").attr("stop-color","#c7d2fe"),ad.append("stop").attr("offset","100%").attr("stop-color","#818cf8"),ac.append("filter").attr("id","og-blur").attr("x","-75%").attr("y","-75%").attr("width","250%").attr("height","250%").append("feGaussianBlur").attr("stdDeviation",6);let ae=ab.append("g").attr("class","viewport"),af=ae.append("g"),ag=ae.append("g"),ah=ae.append("g"),ai=ae.append("g"),aj=U.filter(a=>a.hub),ak=ag.selectAll("line").data(aj,a=>a.id).join("line").attr("stroke",a=>S.TIER_COLORS[a.tier]||S.TIER_COLORS.D).attr("stroke-opacity",.09).attr("stroke-width",.5);if(g&&U.length){let a=Math.hypot(U[0].x,U[0].y);af.append("circle").attr("r",a).attr("fill","none").attr("stroke","#FF6B35").attr("stroke-opacity",.18).attr("stroke-width",1).attr("stroke-dasharray","3 7")}for(let a of g?[]:S.TIER_ORDER)M.has(a)&&af.append("circle").attr("r",S.TIER_RING_RADIUS[a]).attr("fill","none").attr("stroke",S.TIER_COLORS[a]).attr("stroke-opacity",.14).attr("stroke-width",1).attr("stroke-dasharray","3 7");let al=ah.selectAll("line").data(Z).join("line").attr("stroke",a=>a.faint?"rgba(0,255,136,0.12)":"rgba(255,255,255,0.08)").attr("stroke-width",a=>a.faint?.5:1),am=ai.selectAll("g").data(aa,a=>a.id).join("g").attr("cursor","pointer");am.each(function(a){let b=(0,j.select)(this);if("d2"===a.kind){b.attr("opacity",g?a.depth>2?.6:.85:.55),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",S.TIER_COLORS[a.tier]||S.TIER_COLORS.D);return}let c="user"===a.kind,d=a.connection,e=c?"#818cf8":S.TIER_COLORS[a.tier]||S.TIER_COLORS.D;if(!c&&!a.hub){b.attr("opacity",a.added?1:.75),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",e).attr("stroke",a.added?"#00ff88":"none").attr("stroke-width",1.5*!!a.added);return}(c||"S"===a.tier||"A"===a.tier)&&b.append("circle").attr("r",1.8*a.r).attr("fill",e).attr("opacity",.25).attr("filter","url(#og-blur)"),d&&d.is_catalyst&&(b.append("circle").attr("r",a.r+3).attr("fill","none").attr("stroke",S.TIER_COLORS.S).attr("stroke-width",1).attr("stroke-opacity",.9),b.append("text").text("⚡").attr("x",.85*a.r).attr("y",-(.7*a.r)).attr("font-size",9).attr("text-anchor","middle").style("pointer-events","none")),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",c?"url(#og-user-grad)":e);let h=c?f:d?.name??"";b.append("text").attr("class","og-initials").text((0,S.initialsFor)(h)).attr("text-anchor","middle").attr("dy","0.35em").attr("font-size",.8*a.r).attr("font-weight",700).attr("fill","#0b0b16").style("pointer-events","none");let k=(0,H.localPhoto)(c?i:d?.profile_image_url);if(k){let c=`og-clip-${String(a.id).replace(/[^a-zA-Z0-9_-]/g,"_")}`;ac.append("clipPath").attr("id",c).append("circle").attr("r",a.r),b.append("image").attr("href",k).attr("x",-a.r).attr("y",-a.r).attr("width",2*a.r).attr("height",2*a.r).attr("clip-path",`url(#${c})`).attr("preserveAspectRatio","xMidYMid slice").on("error",function(){(0,j.select)(this).remove()})}b.append("circle").attr("class","og-sel").attr("r",a.r+5).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1.5).style("opacity",0),c?b.append("text").text(f).attr("y",a.r+18).attr("text-anchor","middle").attr("font-size",12).attr("font-weight",600).attr("fill","#e2e8f0").attr("paint-order","stroke").attr("stroke","rgba(5,5,16,0.85)").attr("stroke-width",3).style("pointer-events","none"):b.append("text").attr("class","og-label").text(d?.name??"").attr("y",a.r+13).attr("text-anchor","middle").attr("font-size",10).attr("fill","#cbd5e1").attr("paint-order","stroke").attr("stroke","rgba(5,5,16,0.8)").attr("stroke-width",3).style("pointer-events","none").style("opacity",0).style("transition","opacity 160ms ease")});let an=am.select("text.og-label"),ao=null,ap=()=>{an.style("opacity",a=>+(!0===a.hub||A.current>1.1||a.id===ao||a.id===z.current))};am.on("click",(a,b)=>{a.defaultPrevented||(a.stopPropagation(),y.current?.(b.connection))}),ab.on("click",()=>y.current?.(null));let aq=x.current,ar=a=>{let b=u.current;if(!aq||!b)return;let c=b.getBoundingClientRect();aq.style.left=`${Math.min(a.clientX-c.left+14,c.width-190)}px`,aq.style.top=`${Math.max(a.clientY-c.top-8,8)}px`};J||am.on("mouseenter",(a,b)=>{ao=b.id,ap(),((a,b)=>{if(!aq||!b.connection)return;let c=b.connection,d=[c.role||c.headline,c.company].filter(Boolean).map(String);aq.innerHTML=`<div style="font-weight:600;color:#f1f5f9">${T(c.name)}</div>`+(d.length?`<div style="color:#94a3b8;margin-top:1px">${T(d.join(" · "))}</div>`:"")+`<div style="margin-top:3px;color:${S.TIER_COLORS[c.tier]||S.TIER_COLORS.D}">`+`${T(c.tier||"?")} \xb7 power ${Number(c.power_score||0).toFixed(1)}`+`${c.is_catalyst?" · ⚡ catalyst":""}</div>`,aq.style.opacity="1",ar(a)})(a,b)}).on("mousemove",a=>ar(a)).on("mouseleave",()=>{ao=null,ap(),aq&&(aq.style.opacity="0")});let as=()=>{al.attr("x1",a=>a.source.x??0).attr("y1",a=>a.source.y??0).attr("x2",a=>a.target.x??0).attr("y2",a=>a.target.y??0),ak.attr("x1",0).attr("y1",0).attr("x2",a=>a.x??0).attr("y2",a=>a.y??0),am.attr("transform",a=>`translate(${a.x??0},${a.y??0})`)},at=null;if(J||g)as();else{let a=(0,q.forceSimulation)(_).force("radial",v(a=>a.targetRadius,0,0).strength(a=>.9*("d1"===a.kind))).force("collide",(0,t.forceCollide)(a=>a.r+2.5)).force("charge",(0,s.forceManyBody)().strength(-18)).on("tick",as);Z.length>0&&a.force("link",(0,r.forceLink)(Z).distance(26).strength(.7)),at=a,as();let b=G().on("start",(b,c)=>{b.active||a.alphaTarget(.3).restart(),c.fx=c.x,c.fy=c.y}).on("drag",(a,b)=>{b.fx=a.x,b.fy=a.y}).on("end",(b,c)=>{b.active||a.alphaTarget(0),(c.connection?.circle_power===null||c.connection?.circle_power===void 0)&&(c.fx=null,c.fy=null)});am.filter(a=>"d1"===a.kind).call(b),am.on("dblclick",(b,c)=>{"d1"===c.kind&&(b.stopPropagation(),c.fx=null,c.fy=null,a.alphaTarget(.2).restart(),window.setTimeout(()=>a.alphaTarget(0),400))})}let au=(0,n.default)().scaleExtent([.15,3]).on("zoom",a=>{ae.attr("transform",a.transform.toString()),a.sourceEvent&&(B.current=a.transform),a.transform.k!==A.current&&(A.current=a.transform.k,ap())});ab.call(au).on("dblclick.zoom",null);let av=Math.max(.15,Math.min(3,Math.min(b,c)/(2*$))),aw=B.current??p.identity.translate(b/2,c/2).scale(av);ab.call(au.transform,aw),C.current=a=>{ai.selectAll("circle.og-sel-temp").remove(),am.select("circle.og-sel").style("opacity",b=>+(b.id===a)),am.select("circle.og-base").attr("r",b=>b.id===a&&"user"!==b.kind?b.r+1.5:b.r),a&&am.filter(b=>b.id===a&&!b.hub&&"user"!==b.kind).append("circle").attr("class","og-sel-temp").attr("r",a=>a.r+3).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1.2),ap()},C.current(z.current),D.current=a=>{ai.selectAll("circle.og-asked").remove(),am.filter(b=>"d2"===b.kind&&(0,h.hasRequest)(b.connection,a)).append("circle").attr("class","og-asked").attr("r",a=>a.r+2.2).attr("fill","none").attr("stroke","#FFD700").attr("stroke-width",1).attr("stroke-dasharray","2 1.6").style("pointer-events","none")},D.current(N.current);let ax=new Map(aa.map(a=>[a.id,a]));return E.current=d=>{let e=ax.get(d);if(!e)return;let f=e.x??0,g=e.y??0,h=(0,o.default)(a),i=p.identity.translate(b/2,c/2).scale(2.5).translate(-f,-g),j=performance.now(),k=a=>{let b=Math.min(1,(a-j)/650),c=1-Math.pow(1-b,3);au.transform(ab,p.identity.translate(h.x+(i.x-h.x)*c,h.y+(i.y-h.y)*c).scale(h.k+(i.k-h.k)*c)),b<1&&requestAnimationFrame(k)};requestAnimationFrame(k),window.setTimeout(()=>au.transform(ab,i),730),y.current?.(e.connection),z.current=d,C.current(d);let l=ai.append("circle").attr("cx",f).attr("cy",g).attr("r",e.r+2).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",2).attr("opacity",.9),m=performance.now(),n=a=>{let b=Math.min(1,(a-m)/700);l.attr("r",e.r+2+26*b).attr("opacity",.9*(1-b)),b<1?requestAnimationFrame(n):l.remove()};requestAnimationFrame(n),window.setTimeout(()=>l.remove(),800)},()=>{at?.stop(),C.current=()=>{},D.current=()=>{},E.current=()=>{},ab.on(".zoom",null),ab.on("click",null),ab.selectAll("*").remove()}},[K,f,i,J,F,l]),(0,b.jsxs)("div",{ref:u,style:{position:"relative",flex:1,minHeight:0,width:"100%"},children:[(0,b.jsx)("svg",{ref:w,style:{display:"block",height:"100%",width:"100%",touchAction:"none",userSelect:"none"},role:"img","aria-label":"Your network as an orbital galaxy — closer orbits are higher-leverage tiers"}),(0,b.jsx)("div",{ref:x,"aria-hidden":!0,style:{position:"absolute",zIndex:20,maxWidth:190,pointerEvents:"none",padding:"6px 10px",fontSize:11.5,lineHeight:1.45,borderRadius:8,background:"rgba(10,10,26,0.92)",border:"1px solid rgba(255,255,255,0.12)",backdropFilter:"blur(8px)",opacity:0,transition:"opacity 150ms ease",left:0,top:0}})]})});var V=a.i(38246),W=a.i(90231);let X=a=>a?.unlock_status==="pending";function Y(a=[],b=[]){let c=new Map;for(let a of b||[]){let b=a?.source_connection_id;if(null==b)continue;let d=c.get(b);d||c.set(b,d=[]),d.push(a)}let d=new Map;for(let b of a||[]){let a=b?.unlocked_from_bridge_id;if(null==a||1!==b.degree)continue;let c=d.get(a);c||d.set(a,c=[]),c.push(b)}return{circles:c,introduced:d}}let Z={connected:0,requested:1},$=(a,b)=>(Z[a.state]??2)-(Z[b.state]??2)||(0,W.score1)(b.row)-(0,W.score1)(a.row)||String(a.row.name||"").localeCompare(String(b.row.name||"")),_=(a,b,c)=>Math.min(c,Math.max(b,a)),aa=2*Math.PI;function ab(a,b,c){if(a<=0)return 1;let d=c*a;return Math.max(1,c>=aa-1e-9?Math.floor(d/b):Math.floor(d/b)+1)}function ac(a,b,c,d){let e=[],f=0;for(let g=b;f<a;g+=c)e.push(g),f+=ab(g,c,d);return e}let ad=(a,b,c,d)=>{let e=ac(a,b,c,d);return e[e.length-1]};function ae(a,{inner:b,outer:c,spacing:d,minSpacing:e=d/3,innerMin:f=b,start:g=-Math.PI/2,sweep:h=aa}={}){let i=Math.max(0,Math.floor(a)||0);if(!i)return{spacing:d,inner:b,rings:[],points:[]};let j=d,k=b;if(ad(i,k,j,h)>c)if(ad(i,f,j,h)<=c){let a=f,d=b;for(let b=0;b<24;b++){let b=(a+d)/2;ad(i,b,j,h)<=c?a=b:d=b}k=a}else{let a=e,b=d;if(ad(i,k=f,a,h)<=c)for(let d=0;d<24;d++){let d=(a+b)/2;ad(i,k,d,h)<=c?a=d:b=d}j=a}let l=ac(i,k,j,h),m=l.map(a=>ab(a,j,h)),n=m.reduce((a,b)=>a+b,0),o=m.map(a=>Math.min(a,Math.floor(i*a/n))),p=i-o.reduce((a,b)=>a+b,0);for(;p>0;){let a=-1;for(let b=0;b<m.length;b++)o[b]<m[b]&&(a<0||m[b]-o[b]>m[a]-o[a])&&(a=b);o[a]++,p--}let q=h>=aa-1e-9,r=[],s=[];return l.forEach((a,b)=>{let c=o[b];if(!c)return;s.push({radius:a,count:c});let d=q?aa/c:c>1?h/(c-1):0,e=q?g+(b%2?d/2:0):c>1?g:g+h/2,f=q?null:function(a){let b=Math.floor((a-1)/2),c=b+1,d=[b--];for(;d.length<a;)c<a&&d.push(c++),d.length<a&&b>=0&&d.push(b--);return d}(c);for(let b=0;b<c;b++){let c=e+(f?f[b]:b)*d;r.push({x:a*Math.cos(c),y:a*Math.sin(c),angle:c,ring:s.length-1})}}),{spacing:j,inner:k,rings:s,points:r}}function af(a,b){return Math.max(1.4,Math.min(7,.42*a*("S"===b?1:"A"===b?.86:"B"===b?.72:.6)))}let ag=["S","A","B","C","D"];function ah(a=[],b=[]){let c=new Set((b||[]).map(W.keyFor)),d=new Map;for(let b of a||[]){let a=b?.source_connection_id;if(null==a)continue;let e=(0,W.keyFor)(b);if(c.has(e))continue;let f=d.get(e);f||d.set(e,f=new Set),f.add(a)}let e=new Map;for(let a of d.values())for(let b of a){let c=e.get(b)||{reach:0,only:0,total:0};c.reach+=1/a.size,c.total+=1,1===a.size&&(c.only+=1),e.set(b,c)}return e}let ai={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aj={1:"#FFD700",2:"#FF6B35",3:"#3498DB",4:"#9B59B6",5:"#00ff88",6:"#ff5050"},ak={S:0,A:1,B:2,C:3,D:4},al="#00ff88",am="#5a5a66",an=(a,b)=>(ak[a.tier]??9)-(ak[b.tier]??9)||(0,W.score)(b)-(0,W.score)(a)||String(a.name||"").localeCompare(String(b.name||"")),ao=a=>String(a?.name||"").trim().split(/\s+/)[0]||"them",ap=a=>`/setup?scan=${encodeURIComponent(a.id)}`,aq=a=>`${a}${a%10==1&&11!==a?"st":a%10==2&&12!==a?"nd":a%10==3&&13!==a?"rd":"th"}`,ar=()=>{let a=(0,e.scannerNow)();return a.running&&(0,e.isCircleScan)(a)?a.target?.id??null:null},as=()=>null,at=()=>()=>{};function au(a){return()=>void 0}let av=()=>!1,aw=()=>!0;function ax(a,b){let c=new Set([(0,W.keyFor)(a)]),d=a=>{let b=[];for(let d of a||[]){let a=(0,W.keyFor)(d);c.has(a)||(c.add(a),b.push(d))}return b.sort(an)};return[...d(b.introduced.get(a.id)),...d(b.circles.get(a.id))]}function ay({bridge:a,members:c,reach:d,cx:e,cy:f,maxR:g,still:h,band:i}){let j=c.filter(a=>1===a.degree||"S"===a.tier||"A"===a.tier||"B"===a.tier),{inner:k,outer:l}=i,m=Math.min(.9*Math.PI,Math.max(.2*Math.PI,11*j.length/k)),n=ae(j.length,{inner:k,outer:l,spacing:11,minSpacing:3.5,start:a.angle-m/2,sweep:m});return(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:e,cy:f,r:k,fill:"none",stroke:`${aj[2]}06`,strokeWidth:1}),j.map((c,g)=>{let i=n.points[g],k=e+i.x,l=f+i.y,m=(0,J.reachState)(c,d),o=Math.min(af(n.spacing,c.tier),5)*(m?1.3:1),p="hidden"===m?am:ai[c.tier]||"#555";return(0,b.jsxs)("g",{children:[(m||j.length<=40)&&(0,b.jsx)("line",{x1:a.x,y1:a.y,x2:k,y2:l,stroke:m?al:p,strokeWidth:.5,strokeOpacity:m?.35:.15}),"ready"===m&&(0,b.jsx)(az,{x:k,y:l,r:2.3*o,still:h}),(0,b.jsx)("circle",{cx:k,cy:l,r:o,fill:p,fillOpacity:m?.95:.45,stroke:m&&"hidden"!==m?al:p,strokeWidth:m?1:.5,strokeOpacity:m?1:.25}),("S"===c.tier||m)&&j.length<=60&&(0,b.jsx)("text",{x:k,y:l+o+9,textAnchor:"middle",fill:m&&"hidden"!==m?al:"#aaa",fontSize:7,children:ao(c)})]},"pv-"+c.id)})]})}function az({x:a,y:c,r:d,still:e}){return(0,b.jsxs)("circle",{cx:a,cy:c,r:d,fill:al,fillOpacity:.16,stroke:al,strokeWidth:.8,strokeOpacity:.45,pointerEvents:"none",children:[!e&&(0,b.jsx)("animate",{attributeName:"fill-opacity",values:"0.06;0.24;0.06",dur:"2.8s",repeatCount:"indefinite"}),!e&&(0,b.jsx)("animate",{attributeName:"stroke-opacity",values:"0.25;0.7;0.25",dur:"2.8s",repeatCount:"indefinite"})]})}function aA({x:a,y:c,s:d}){return(0,b.jsxs)("g",{transform:`translate(${a} ${c}) scale(${d})`,pointerEvents:"none",children:[(0,b.jsx)("path",{d:"M-1.9 -0.6 V-1.8 A1.9 1.9 0 0 1 1.9 -1.8 V-0.6",fill:"none",stroke:"#d6d6de",strokeWidth:.9}),(0,b.jsx)("rect",{x:-2.6,y:-.7,width:5.2,height:3.9,rx:.8,fill:"#d6d6de"})]})}function aB({onIn:a,onReset:c,onOut:d}){let e=a=>({width:32,height:32,borderRadius:"50%",border:"none",cursor:"pointer",background:a?"rgba(255,255,255,0.06)":"rgba(255,255,255,0.1)",color:a?"#666":"#fff",fontSize:a?10:18,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(8px)"});return(0,b.jsxs)("div",{style:{position:"absolute",bottom:64,right:20,zIndex:20,display:"flex",flexDirection:"column",gap:4},children:[(0,b.jsx)("button",{type:"button",onClick:a,"aria-label":"Zoom in",style:e(!1),children:"+"}),(0,b.jsx)("button",{type:"button",onClick:c,"aria-label":"Fit to the window",style:e(!0),children:"⊙"}),(0,b.jsx)("button",{type:"button",onClick:d,"aria-label":"Zoom out",style:e(!1),children:"−"})]})}function aC({trail:a,index:e,reach:f,dims:g,requests:i,scanningId:j,still:k,canScan:l,onOpen:m,onBack:n,onSelect:o}){var p,q,r,s,t;let u,v,w,x=a[a.length-1],y=a.length,z=(0,c.useMemo)(()=>ax(x,e),[x,e]),[A,B]=(0,c.useState)(null),[C,D]=(0,c.useState)({k:1,x:0,y:0}),E=(0,c.useRef)(null),F=(0,c.useRef)(null),G=(0,d.useRouter)(),I=g.w/2,K=g.h/2,L=Math.min(I,K)-30,M=(0,c.useMemo)(()=>z.map(a=>1===a.degree?ax(a,e):[]),[z,e]),N=M.some(a=>a.length>0),O=(0,c.useMemo)(()=>(function(a,{inner:b,outer:c,spacing:d,minSpacing:e=d/3,gap:f=d}){let g=ag.map(a=>({tier:a,idx:[]}));a.forEach((a,b)=>{let c=ag.indexOf(a?.tier);g[c<0?4:c].idx.push(b)});let h=g.filter(a=>a.idx.length),i=c=>{let e=Array(a.length),g=[],i=b;for(let a of h){let b=ae(a.idx.length,{inner:i,outer:1/0,spacing:c,minSpacing:c});a.idx.forEach((a,c)=>{let d=b.points[c];e[a]={x:d.x,y:d.y,angle:d.angle,slot:aa/b.rings[d.ring].count}});let h=Math.max(i,...b.rings.map(a=>a.radius));g.push({tier:a.tier,inner:i,outer:h}),i=h+c/d*f}return{spacing:c,points:e,bands:g,edge:g.length?g[g.length-1].outer:b}},j=i(d);if(j.edge<=c)return j;let k=e,l=d;if((j=i(k)).edge>c)return j;for(let a=0;a<20;a++){let a=(k+l)/2,b=i(a);b.edge<=c?(k=a,j=b):l=a}return j})(z,{inner:Math.max(62,.3*L),outer:L*(N?.72:.94),spacing:Math.max(14,Math.min(24,.085*L)),minSpacing:4,gap:Math.max(10,.04*L)}),[z,L,N]),P=(0,c.useMemo)(()=>N?(function(a,{from:b,spacing:c=7,cap:d=40,total:e=1200}={}){let f=Math.max(6,Math.min(d,Math.floor(e/Math.max(1,a.filter(a=>a?.count>0).length))));return a.map(a=>{if(!(a?.count>0))return null;let d=Math.min(a.count,f),e=Math.min(Math.min(a.slot||aa,aa/6),Math.max(3*c/b,d*c/b));return{points:ae(d,{inner:b,outer:1/0,spacing:c,minSpacing:c,start:a.angle-e/2,sweep:e}).points.map(({x:a,y:b})=>({x:a,y:b})),more:a.count-d}})})(z.map((a,b)=>({angle:O.points[b].angle,slot:O.points[b].slot,count:M[b].length})),{from:O.edge+1.5*O.spacing}).map((a,b)=>a&&{...a,i:b,people:M[b].slice(0,a.points.length)}).filter(Boolean):[],[z,M,N,O]),Q=(0,c.useMemo)(()=>z.map(a=>{let b=(0,J.reachState)(a,f);return{reached:b,requested:!b&&2===a.degree&&(0,h.hasRequest)(a,i),own:1===a.degree?(e.circles.get(a.id)?.length||0)+(e.introduced.get(a.id)?.length||0):0}}),[z,f,i,e]),R=a=>l&&"ready"===Q[a].reached&&z[a].id!==j,S=C.k,T=(0,c.useMemo)(()=>{let a=z.length<=60,c=O.spacing*S>=26;return z.map((d,e)=>{let f=O.points[e],g=Q[e],h=af(O.spacing,d.tier)*(g.reached?1.4:1),i="hidden"===g.reached?am:ai[d.tier]||"#555";return(0,b.jsxs)("g",{children:[(a||g.reached)&&(0,b.jsx)("line",{x1:0,y1:0,x2:f.x,y2:f.y,stroke:g.reached?al:i,strokeWidth:.6/S,strokeOpacity:g.reached?.3:.12}),"ready"===g.reached&&(0,b.jsx)(az,{x:f.x,y:f.y,r:2.3*h,still:k}),g.requested?(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:1.2*h,fill:"none",stroke:i,strokeWidth:Math.max(.6,.45*h),strokeDasharray:`${Math.max(.8,.55*h)} ${Math.max(.6,.45*h)}`}):(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:h,fill:i,fillOpacity:g.reached?1:.85,stroke:g.reached&&"hidden"!==g.reached?al:"none",strokeWidth:g.reached?Math.max(.8,.3*h):0}),"hidden"===g.reached&&(0,b.jsx)(aA,{x:f.x,y:f.y-.1*h,s:h/4.2}),d.id===j&&(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:2*h,fill:"none",stroke:aj[3],strokeWidth:1/S,strokeDasharray:`${3/S} ${2/S}`}),(g.reached||c&&"S"===d.tier)&&(0,b.jsx)("text",{x:f.x,y:f.y+h+10/S,textAnchor:"middle",fontSize:8.5/S,fontWeight:g.reached?700:400,fill:"hidden"===g.reached?"#999":g.reached?al:"#aaa",pointerEvents:"none",stroke:"#0a0a1a",strokeWidth:2.4/S,paintOrder:"stroke",children:ao(d)})]},d.id)})},[z,O,Q,S,k,j]),U=(a,b)=>{let c=F.current;if(!c)return null;let d=c.getBoundingClientRect(),e=(a-d.left-I-C.x)/S,f=(b-d.top-K-C.y)/S;if(30>=Math.hypot(e,f))return"center";let g=Math.max(.6*O.spacing,10/S),h=null,i=g;return O.points.forEach((a,b)=>{let c=Math.hypot(a.x-e,a.y-f);c<i&&(i=c,h=b)}),h},V=(a,b={x:0,y:0})=>D(c=>{let d=Math.max(.5,Math.min(6,c.k*a));return{k:d,x:b.x-(b.x-c.x)*d/c.k,y:b.y-(b.y-c.y)*d/c.k}}),X=Q.filter(a=>"ready"===a.reached).length,Y=Q.filter(a=>"hidden"===a.reached).length,Z=Q.filter(a=>a.reached).length,$=Q.filter(a=>a.requested).length,_=["S","A","B","C","D"].map(a=>[a,z.filter(b=>b.tier===a).length]).filter(([,a])=>a),ab=null!=j&&j===x.id,ac="number"==typeof A?z[A]:null,ad="number"==typeof A?O.points[A]:null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("svg",{ref:F,width:g.w,height:g.h,style:{display:"block",touchAction:"none",cursor:null!=A?"pointer":"grab"},onPointerDown:a=>{E.current={x:a.clientX,y:a.clientY,vx:C.x,vy:C.y,moved:!1},a.currentTarget.setPointerCapture?.(a.pointerId)},onPointerMove:a=>{let b=E.current;if(b){let c=a.clientX-b.x,d=a.clientY-b.y;if(!b.moved&&Math.hypot(c,d)>5&&(b.moved=!0),b.moved)return void D(a=>({...a,x:b.vx+c,y:b.vy+d}))}let c=U(a.clientX,a.clientY);B(a=>a===c?a:c)},onPointerUp:a=>{let b=E.current;if(E.current=null,!b||b.moved)return;let c=U(a.clientX,a.clientY);"center"===c?o?.(x):null!=c&&R(c)?G.push(ap(z[c])):null!=c&&m(z[c].id)},onPointerLeave:()=>{E.current||B(null)},onWheel:a=>{let b=F.current?.getBoundingClientRect();b&&V(Math.exp(-(.0015*a.deltaY)),{x:a.clientX-b.left-I,y:a.clientY-b.top-K})},role:"img","aria-label":`${x.name}’s circle: ${z.length} ${1===z.length?"person":"people"}`,children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("filter",{id:"focusGlow",children:[(0,b.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,b.jsxs)("feMerge",{children:[(0,b.jsx)("feMergeNode",{in:"blur"}),(0,b.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),(0,b.jsxs)("g",{transform:`translate(${I+C.x} ${K+C.y}) scale(${S})`,children:[O.bands.map(a=>(0,b.jsx)("circle",{r:(a.inner+a.outer)/2,fill:"none",stroke:ai[a.tier]||"#555",strokeOpacity:.07,strokeWidth:Math.max(1/S,a.outer-a.inner+O.spacing),pointerEvents:"none"},a.tier)),P.map(a=>{let c=O.points[a.i],d=a.points[a.points.length-1];return(0,b.jsxs)("g",{pointerEvents:"none",children:[a.points.map((a,d)=>(0,b.jsx)("line",{x1:c.x,y1:c.y,x2:a.x,y2:a.y,stroke:al,strokeOpacity:.12,strokeWidth:.5/S},"l"+d)),a.points.map((c,d)=>(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:2.2,fill:ai[a.people[d]?.tier]||"#555",fillOpacity:.75},"d"+d)),a.more>0&&d&&(0,b.jsxs)("text",{x:1.06*d.x,y:1.06*d.y,textAnchor:"middle",fontSize:8/S,fill:"#8b9a9a",stroke:"#0a0a1a",strokeWidth:2.4/S,paintOrder:"stroke",children:["+",a.more.toLocaleString()]})]},"fan-"+z[a.i].id)}),T,ad&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("line",{x1:0,y1:0,x2:ad.x,y2:ad.y,stroke:ai[ac.tier]||"#888",strokeWidth:1.6/S,strokeOpacity:.8}),(0,b.jsx)("circle",{cx:ad.x,cy:ad.y,r:af(O.spacing,ac.tier)*(Q[A].reached?1.4:1)+2/S,fill:"none",stroke:"#fff",strokeWidth:1.6/S})]}),"ready"===(0,J.reachState)(x,f)&&(0,b.jsx)(az,{x:0,y:0,r:40,still:k}),(0,b.jsx)("circle",{r:28,fill:"#0a0a1a",stroke:ai[x.tier]||"#888",strokeWidth:"center"===A?4:3,filter:"url(#focusGlow)"}),(0,H.localPhoto)(x.profile_image_url)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("clipPath",{id:"focus-clip",children:(0,b.jsx)("circle",{r:24})}),(0,b.jsx)("image",{href:(0,H.localPhoto)(x.profile_image_url),x:-24,y:-24,width:48,height:48,clipPath:"url(#focus-clip)"})]}):(0,b.jsx)("text",{y:5,textAnchor:"middle",fill:ai[x.tier]||"#888",fontSize:16,fontWeight:800,children:x.name?.charAt(0)}),(0,b.jsx)("text",{y:40,textAnchor:"middle",fill:"#fff",fontSize:11,fontWeight:700,pointerEvents:"none",children:x.name})]}),ac&&(0,b.jsx)(aD,{x:I+C.x+ad.x*S,y:K+C.y+ad.y*S,w:g.w,lines:(p=ac,q=Q[A],r=j,s=y,t=R(A),u=ao(p),v=p.id===r?"Their circle is being scanned now":"ready"===q.reached?"You added them · their circle is ready to scan":"hidden"===q.reached?"You added them · their list is hidden":"scanned"===q.reached?`You added them \xb7 ${q.own.toLocaleString("en-US")} in their circle`:q.requested?"Request sent":"Not connected yet",w=t?`Click to scan ${u}’s circle on the Scan page`:q.own>0?`Click to open ${u}’s circle (${aq(s+2)} degree)`:`Click to open ${u}’s circle`,[p.name,`${p.tier}-tier \xb7 ${(0,W.score)(p).toFixed(1)}`,v,w]),accent:Q[A].reached?al:ai[ac.tier]}),"center"===A&&(0,b.jsx)(aD,{x:I+C.x,y:K+C.y-28*S,w:g.w,lines:[x.name,"Open their card"],accent:ai[x.tier]})]}),(0,b.jsxs)("div",{style:{position:"absolute",top:14,left:64,right:64,pointerEvents:"none",display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",pointerEvents:"auto"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>n(y-1),style:{padding:"8px 16px",borderRadius:8,border:"none",cursor:"pointer",background:"rgba(255,255,255,0.1)",color:"#ddd",fontSize:12,fontWeight:700},children:["← ",1===y?"All bridges":`${ao(a[y-2])}’s circle`]}),(0,b.jsxs)("nav",{"aria-label":"Trail",style:{fontSize:11,color:"#777",display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("button",{type:"button",onClick:()=>n(0),style:aF,children:"All bridges"}),a.map((a,c)=>(0,b.jsxs)("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"›"}),c===y-1?(0,b.jsx)("span",{style:{color:"#fff",fontWeight:700},children:a.name}):(0,b.jsx)("button",{type:"button",onClick:()=>n(c+1),style:aF,children:a.name})]},a.id))]})]}),(0,b.jsxs)("div",{style:{fontSize:11,color:"#999"},children:[ao(x),"’s circle · ",z.length.toLocaleString("en-US")," ",1===z.length?"person":"people"," · ",aq(y+1)," degree",y>1?", counted along this chain":""]}),ab&&z.length>0&&(0,b.jsxs)("div",{role:"status",style:{...aG,borderColor:"rgba(52,152,219,0.4)",color:"#cfe6f7"},children:["Scanning ",ao(x),"’s circle now. More people appear here as it saves, every 10 pages."]})]}),0===z.length&&(0,b.jsx)(aE,{person:x,depth:y,reach:f,requests:i,scanning:ab,canScan:l,onSelect:o,top:K+64}),z.length>0&&(0,b.jsxs)("div",{style:{position:"absolute",bottom:20,left:20,maxWidth:"calc(100% - 110px)",background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"10px 14px",backdropFilter:"blur(8px)",fontSize:10,color:"#888",lineHeight:1.6},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1,marginBottom:6},children:"IN THIS CIRCLE"}),_.map(([a,c])=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:ai[a]}}),(0,b.jsxs)("span",{style:{color:ai[a],fontWeight:600,width:40},children:[a,"-Tier"]}),(0,b.jsx)("span",{children:c.toLocaleString("en-US")})]},a)),(Z>0||$>0)&&(0,b.jsxs)("div",{style:{marginTop:6},children:[Z>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:al},children:"● "}),"you added ",Z,X?`, ${X} ready to scan`:"",Y?`, ${Y} hidden`:""]}),$>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#FFD700"},children:"◌ "}),$," ",1===$?"request":"requests"," out"]})]}),(0,b.jsxs)("div",{style:{marginTop:6,color:"#555"},children:["Click anyone for their circle",X>0&&l?", or someone ready to scan theirs":""," · drag to move · scroll to zoom"]})]}),(0,b.jsx)(aB,{onIn:()=>V(1.35),onReset:()=>D({k:1,x:0,y:0}),onOut:()=>V(1/1.35)})]})}function aD({x:a,y:c,w:d,lines:e,accent:f}){let g=Math.max(150,Math.min(240,5.6*Math.max(...e.map(a=>String(a).length))+20)),h=12+12*e.length,i=Math.max(6,Math.min(d-g-6,a-g/2)),j=Math.max(6,c-h-12);return(0,b.jsxs)("g",{pointerEvents:"none",children:[(0,b.jsx)("rect",{x:i,y:j,width:g,height:h,rx:6,fill:"rgba(0,0,0,0.92)",stroke:f||"#555",strokeWidth:.6}),e.map((a,c)=>(0,b.jsx)("text",{x:i+g/2,y:j+16+12*c,textAnchor:"middle",fill:0===c?"#fff":2===c?f||"#aaa":"#999",fontSize:0===c?10.5:9,fontWeight:0===c?700:400,children:a},c))]})}function aE({person:a,depth:c,reach:d,requests:e,scanning:f,canScan:g,onSelect:i,top:j}){let k,l,m=ao(a),n=aq(c+1),o=1===a.degree,p=o?(0,J.circleState)(a,d):null,q=(0,J.circleScanCost)(),r=null;return f?(k=`Scanning ${m}’s circle now`,l="Their people appear here as the scan saves them, every 10 pages."):"hidden"===p?(k=`${m} keeps their connections hidden`,l="LinkedIn doesn’t show their list, so there is no circle to scan."):"scanned"===p?(k=`${m}’s list has been read`,l="Everyone on it was already one of your connections, so nobody new is here."):o?(k=`${m}’s circle isn’t scanned yet`,l=`${m} is your connection, so their circle can be scanned. That brings in the people they know: ${n} degree${c>1?", counted along this chain":""}.`,g&&(r=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(V.default,{href:ap(a),style:aH,children:["Scan ",m,"’s circle →"]}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#888",marginTop:8},children:[q.profileViews," profile view, then one LinkedIn search per page of their list (up to ",q.searches,", about ",q.minutes," min). It starts only once you confirm it on the Scan page."]})]}))):(0,h.hasRequest)(a,e)?(k=`Request sent to ${m}`,l=`Once ${m} accepts, ↻ Check for new brings them into your connections. Then their circle can be scanned, and the people they know fill in here: ${n} degree.`):(k=`Nobody from ${m}’s circle yet`,l=`LinkedIn only shows the connections of people you’re connected to. Connect with ${m}; once they accept and their circle is scanned, the people they know fill in here: ${n} degree.`,r=(0,b.jsxs)("button",{type:"button",onClick:()=>i?.(a),style:aI,children:["Open ",m,"’s card"]})),(0,b.jsxs)("div",{role:"status",style:{position:"absolute",left:"50%",top:j,transform:"translateX(-50%)",width:"min(360px, calc(100% - 32px))",background:"rgba(10,10,26,0.94)",border:`1px solid ${"hidden"===p?"rgba(255,255,255,0.12)":"rgba(0,255,136,0.25)"}`,borderRadius:12,padding:"14px 16px",textAlign:"center"},children:[(0,b.jsxs)("div",{style:{fontSize:13,fontWeight:800,color:"hidden"===p?"#aaa":"#fff",marginBottom:6},children:["hidden"===p&&(0,b.jsx)("span",{"aria-hidden":"true",children:"🔒 "}),k]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#9aa",lineHeight:1.55,marginBottom:12*!!r},children:l}),r]})}let aF={background:"none",border:"none",color:"#8fb8d6",fontSize:11,fontWeight:600,cursor:"pointer",padding:0},aG={fontSize:11,padding:"6px 10px",borderRadius:8,border:"1px solid",background:"rgba(0,0,0,0.6)",pointerEvents:"auto"},aH={display:"inline-block",padding:"9px 16px",borderRadius:8,textDecoration:"none",fontSize:12.5,fontWeight:800,color:"#0a0a1a",background:"linear-gradient(135deg, #00ff88, #3498DB)"},aI={padding:"8px 14px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.06)",color:"#ddd"},aJ={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aK=["S","A","B","C","D"],aL={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aM={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aN=["S","A","B","C","D"],aO=[{key:"only",label:"Only way in",range:"1",max:1,color:"#00E5FF"},{key:"rare",label:"Rare",range:"2–3",max:3,color:"#4FC3F7"},{key:"uncommon",label:"Uncommon",range:"4–10",max:10,color:"#B0BEC5"},{key:"common",label:"Common",range:"11–30",max:30,color:"#FFB74D"},{key:"warm",label:"Warm",range:"31+",max:1/0,color:"#FF7043"}],aP=new Map(aO.map(a=>[a.key,a]));function aQ(a){return aP.get(a)??null}function aR(a,b=1){let c,d=function(a,b=1){let c=Number(a?.mutual_count);return Number.isFinite(c)&&c>=1?{count:Math.floor(c),from:"linkedin"}:{count:Math.max(1,Math.floor(Number(b)||1)),from:"scans"}}(a,b);return{key:(c=Math.max(1,Math.floor(Number(d.count)||1)),aO.find(a=>c<=a.max).key),...d}}function aS({tier:a,rarity:b},{tiers:c=new Set,rarities:d=new Set}={}){return(!c.size||!!c.has(a))&&(!d.size||!!(b&&d.has(b)))}function aT(a,b){let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c}let aU={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function aV({person:a,size:c=32,tierColors:d=aU}){let e=d[a?.tier]||"#666",f=(0,H.localPhoto)(a?.profile_image_url);return(0,b.jsxs)("span",{style:{position:"relative",display:"inline-block",width:c,height:c,flexShrink:0,borderRadius:"50%",boxShadow:`0 0 0 ${c>=24?2:1}px ${e}`},children:[(0,b.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:`${e}2e`,color:e,fontWeight:800,fontSize:Math.max(7,Math.round(.36*c)),lineHeight:1},children:(0,S.initialsFor)(a?.name)}),f&&(0,b.jsx)("img",{src:f,alt:"",loading:"lazy",decoding:"async",onError:a=>{a.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:c,height:c,borderRadius:"50%",objectFit:"cover"}})]})}let aW="#FF6B35",aX={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aY="a connection we can’t name",aZ=a=>Number(a||0).toLocaleString("en-US"),a$=(a,b,c)=>`${aZ(a)} ${1===a?b:c}`;function a_(a){return a.role&&a.company?`${a.role} @ ${a.company}`:a.headline||a.role||a.company||""}let a0=`
9
+ }`;function R(a,b){let c=j.select(a);P()?c.interrupt("hover").attr("r",b):c.transition("hover").duration(150).ease(m.cubicOut).attr("r",b)}var n=n,p=o,o=o,S=a.i(76939);function T(a){return String(a??"").replace(/[&<>"']/g,a=>"&"===a?"&amp;":"<"===a?"&lt;":">"===a?"&gt;":'"'===a?"&quot;":"&#39;")}let U=(0,c.forwardRef)(function({connections:a=[],degree2:d=[],onSelect:e,userName:f="You",userImage:i=null,selectedId:k=null,mode:l="network"},m){let u=(0,c.useRef)(null),w=(0,c.useRef)(null),x=(0,c.useRef)(null),y=(0,c.useRef)(e),z=(0,c.useRef)(k),A=(0,c.useRef)(1),B=(0,c.useRef)(null),C=(0,c.useRef)(()=>{}),D=(0,c.useRef)(()=>{}),E=(0,c.useRef)(()=>{}),[F,I]=(0,c.useState)({w:0,h:0}),J=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),K=(0,c.useMemo)(()=>`${a.length}:${d.length}:${a.map(a=>a.id).join(",")}|${d.map(a=>a.id).join(",")}`,[a,d]),L=(0,c.useRef)({connections:a,degree2:d});(0,c.useImperativeHandle)(m,()=>({focusNode:a=>E.current(a)}),[]),(0,c.useEffect)(()=>{y.current=e},[e]),(0,c.useEffect)(()=>{L.current={connections:a,degree2:d}},[a,d]),(0,c.useEffect)(()=>{let a=u.current;if(!a)return;let b=()=>{let b=a.getBoundingClientRect();I(a=>{let c=Math.round(b.width),d=Math.round(b.height);return a.w===c&&a.h===d?a:{w:c,h:d}})};b();let c=new ResizeObserver(b);return c.observe(a),window.addEventListener("resize",b),()=>{c.disconnect(),window.removeEventListener("resize",b)}},[]),(0,c.useEffect)(()=>{z.current=k,C.current(k)},[k]);let M=(0,g.default)(),N=(0,c.useRef)(M);return(0,c.useEffect)(()=>{N.current=M,D.current(M)},[M]),(0,c.useEffect)(()=>{let a=w.current;if(!a||F.w<40||F.h<40)return;let b=F.w,c=F.h,{connections:d,degree2:e}=L.current,g="degrees"===l,k=new Set(e.map(a=>a.source_connection_id).filter(Boolean)),m=g?d.filter(a=>k.has(a.id)):d,I=new Map(m.map(a=>[a.id,a])),K=e.filter(a=>a.source_connection_id&&I.has(a.source_connection_id)),M=new Set(m.map(a=>a.tier).filter(Boolean)),O=new Set(e.map(a=>a.source_connection_id).filter(Boolean)),P=new Set(O.size?m.filter(a=>O.has(a.id)).map(a=>a.id):[...m].sort((a,b)=>(Number(b.power_score)||0)-(Number(a.power_score)||0)).slice(0,14).map(a=>a.id)),Q={id:"__user__",kind:"user",tier:null,r:26,targetRadius:0,connection:null,x:0,y:0,fx:0,fy:0},R={S:0,A:0,B:0,C:0,D:0},U=[],V=new Map,W=new Map;for(let a of m){let b=a.tier||"D",c=(R[b]=(R[b]||0)+1,(R[b]-1)*2.399963),d=S.TIER_RING_RADIUS[b]||S.TIER_RING_RADIUS.D,e=P.has(a.id),f={id:a.id,kind:"d1",hub:e,tier:b,r:e?7+1.1*Number(a.power_score||0):4.5,targetRadius:d,connection:a,x:Math.cos(c)*d,y:Math.sin(c)*d};U.push(f),V.set(a.id,f),W.set(a.id,c)}let X=new Map;for(let a of K){let b=a.source_connection_id,c=X.get(b);c?c.push(a):X.set(b,[a])}let Y=[],Z=[],$=S.TIER_RING_RADIUS.B+70;if(g){let a=new Map,b=new Set;for(let c of U){let d=c.connection?.unlocked_from_bridge_id;if(null==d||d===c.id||!V.has(d))continue;b.add(c.id);let e=a.get(d);e?e.push(c):a.set(d,[c])}let c=U.filter(a=>!b.has(a.id)),d=new Set,e=b=>{for(let c of a.get(b.id)||[])d.has(c.id)||(d.add(c.id),e(c))};for(let a of(c.forEach(e),U))b.has(a.id)&&!d.has(a.id)&&c.push(a);let f=new Map,g=(b,c=new Set)=>{if(f.has(b.id))return f.get(b.id);if(c.has(b.id))return 0;c.add(b.id);let d=X.get(b.id)?.length||0;for(let e of a.get(b.id)||[])d+=1+g(e,c);return c.delete(b.id),f.set(b.id,d),d},h=[...c].sort((a,b)=>g(b)-g(a)),i=Math.max(140,9*Math.max(1,h.length)),j=a=>Math.sqrt(g(a)+4),k=h.reduce((a,b)=>a+j(b),0)||1,l=(b,c,e,f,h)=>{let i=[...(X.get(b.id)||[]).map(a=>({c:a})),...(a.get(b.id)||[]).filter(a=>d.has(a.id)).map(a=>({added:a,c:a.connection}))].sort((a,b)=>(Number(b.c?.power_score)||0)-(Number(a.c?.power_score)||0)),j=h>2,k=j?8:9,m=[],n=0,o=f;for(;n<i.length;){let a=Math.max(1,Math.floor(o*e/k)),d=i.slice(n,n+a);d.forEach((a,f)=>{let i=c+(1===d.length?0:(f/(d.length-1)-.5)*e),k=Math.cos(i)*o,l=Math.sin(i)*o;if(a.added){let b=a.added;b.x=b.fx=k,b.y=b.fy=l,b.hub=!1,b.added=!0,b.r=5+Math.min(5,g(b)/60),m.push({d:b,a:i});return}let n={id:a.c.id,kind:"d2",depth:h,tier:a.c.tier||"D",r:(j?1.3:1.8)+Math.min(10,Number(a.c.power_score)||0)*(j?.24:.32),connection:a.c,x:k,y:l};n.fx=n.x,n.fy=n.y,Y.push(n),b.added&&Z.push({source:b,target:n,faint:!0})}),n+=d.length,o+=k}let p=o,q=m.filter(({d:a})=>h<6&&g(a)).sort((a,b)=>a.a-b.a);if(q.length){let a=o+24,b=10/a,d=q.map(({d:b})=>Math.max(.12,8*Math.min(g(b),60)/a)),f=d.reduce((a,b)=>a+b,0)+b*(q.length-1),i=f>e?e/f:1,j=c-f*i/2;q.forEach(({d:c},e)=>{let f=d[e]*i;p=Math.max(p,l(c,j+f/2,f,a,h+1)),j+=f+b*i})}return p},m=-Math.PI/2;h.forEach(a=>{let b=j(a)/k*Math.PI*2,c=m+b/2;m+=b;let d=Math.min(.88*b,1.6);a.x=a.fx=Math.cos(c)*i,a.y=a.fy=Math.sin(c)*i,a.hub=!0,a.r=9+Math.min(10,(X.get(a.id)?.length||0)/40),$=Math.max($,l(a,c,d,i+a.r+16,2)+10)})}for(let[a,b]of g?[]:X){let c=V.get(a);if(!c)continue;let d=W.get(a)??0,e=c.targetRadius,f=Math.min(.15,1.5/Math.max(1,b.length));b.forEach((a,g)=>{let h=d+(g-(b.length-1)/2)*f,i=e+46+g%3*13,j={id:a.id,kind:"d2",tier:a.tier||"D",r:3.5,targetRadius:e+60,connection:a,x:Math.cos(h)*i,y:Math.sin(h)*i};Y.push(j),Z.push({source:j,target:c})})}let _=[Q,...U,...Y],aa=[...Y,...U,Q],ab=(0,j.select)(a);ab.selectAll("*").remove();let ac=ab.append("defs"),ad=ac.append("radialGradient").attr("id","og-user-grad");ad.append("stop").attr("offset","0%").attr("stop-color","#f8fafc"),ad.append("stop").attr("offset","55%").attr("stop-color","#c7d2fe"),ad.append("stop").attr("offset","100%").attr("stop-color","#818cf8"),ac.append("filter").attr("id","og-blur").attr("x","-75%").attr("y","-75%").attr("width","250%").attr("height","250%").append("feGaussianBlur").attr("stdDeviation",6);let ae=ab.append("g").attr("class","viewport"),af=ae.append("g"),ag=ae.append("g"),ah=ae.append("g"),ai=ae.append("g"),aj=U.filter(a=>a.hub),ak=ag.selectAll("line").data(aj,a=>a.id).join("line").attr("stroke",a=>S.TIER_COLORS[a.tier]||S.TIER_COLORS.D).attr("stroke-opacity",.09).attr("stroke-width",.5);if(g&&U.length){let a=Math.hypot(U[0].x,U[0].y);af.append("circle").attr("r",a).attr("fill","none").attr("stroke","#FF6B35").attr("stroke-opacity",.18).attr("stroke-width",1).attr("stroke-dasharray","3 7")}for(let a of g?[]:S.TIER_ORDER)M.has(a)&&af.append("circle").attr("r",S.TIER_RING_RADIUS[a]).attr("fill","none").attr("stroke",S.TIER_COLORS[a]).attr("stroke-opacity",.14).attr("stroke-width",1).attr("stroke-dasharray","3 7");let al=ah.selectAll("line").data(Z).join("line").attr("stroke",a=>a.faint?"rgba(0,255,136,0.12)":"rgba(255,255,255,0.08)").attr("stroke-width",a=>a.faint?.5:1),am=ai.selectAll("g").data(aa,a=>a.id).join("g").attr("cursor","pointer");am.each(function(a){let b=(0,j.select)(this);if("d2"===a.kind){b.attr("opacity",g?a.depth>2?.6:.85:.55),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",S.TIER_COLORS[a.tier]||S.TIER_COLORS.D);return}let c="user"===a.kind,d=a.connection,e=c?"#818cf8":S.TIER_COLORS[a.tier]||S.TIER_COLORS.D;if(!c&&!a.hub){b.attr("opacity",a.added?1:.75),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",e).attr("stroke",a.added?"#00ff88":"none").attr("stroke-width",1.5*!!a.added);return}(c||"S"===a.tier||"A"===a.tier)&&b.append("circle").attr("r",1.8*a.r).attr("fill",e).attr("opacity",.25).attr("filter","url(#og-blur)"),d&&d.is_catalyst&&(b.append("circle").attr("r",a.r+3).attr("fill","none").attr("stroke",S.TIER_COLORS.S).attr("stroke-width",1).attr("stroke-opacity",.9),b.append("text").text("⚡").attr("x",.85*a.r).attr("y",-(.7*a.r)).attr("font-size",9).attr("text-anchor","middle").style("pointer-events","none")),b.append("circle").attr("class","og-base").attr("r",a.r).attr("fill",c?"url(#og-user-grad)":e);let h=c?f:d?.name??"";b.append("text").attr("class","og-initials").text((0,S.initialsFor)(h)).attr("text-anchor","middle").attr("dy","0.35em").attr("font-size",.8*a.r).attr("font-weight",700).attr("fill","#0b0b16").style("pointer-events","none");let k=(0,H.localPhoto)(c?i:d?.profile_image_url);if(k){let c=`og-clip-${String(a.id).replace(/[^a-zA-Z0-9_-]/g,"_")}`;ac.append("clipPath").attr("id",c).append("circle").attr("r",a.r),b.append("image").attr("href",k).attr("x",-a.r).attr("y",-a.r).attr("width",2*a.r).attr("height",2*a.r).attr("clip-path",`url(#${c})`).attr("preserveAspectRatio","xMidYMid slice").on("error",function(){(0,j.select)(this).remove()})}b.append("circle").attr("class","og-sel").attr("r",a.r+5).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1.5).style("opacity",0),c?b.append("text").text(f).attr("y",a.r+18).attr("text-anchor","middle").attr("font-size",12).attr("font-weight",600).attr("fill","#e2e8f0").attr("paint-order","stroke").attr("stroke","rgba(5,5,16,0.85)").attr("stroke-width",3).style("pointer-events","none"):b.append("text").attr("class","og-label").text(d?.name??"").attr("y",a.r+13).attr("text-anchor","middle").attr("font-size",10).attr("fill","#cbd5e1").attr("paint-order","stroke").attr("stroke","rgba(5,5,16,0.8)").attr("stroke-width",3).style("pointer-events","none").style("opacity",0).style("transition","opacity 160ms ease")});let an=am.select("text.og-label"),ao=null,ap=()=>{an.style("opacity",a=>+(!0===a.hub||A.current>1.1||a.id===ao||a.id===z.current))};am.on("click",(a,b)=>{a.defaultPrevented||(a.stopPropagation(),y.current?.(b.connection))}),ab.on("click",()=>y.current?.(null));let aq=x.current,ar=a=>{let b=u.current;if(!aq||!b)return;let c=b.getBoundingClientRect();aq.style.left=`${Math.min(a.clientX-c.left+14,c.width-190)}px`,aq.style.top=`${Math.max(a.clientY-c.top-8,8)}px`};J||am.on("mouseenter",(a,b)=>{ao=b.id,ap(),((a,b)=>{if(!aq||!b.connection)return;let c=b.connection,d=[c.role||c.headline,c.company].filter(Boolean).map(String);aq.innerHTML=`<div style="font-weight:600;color:#f1f5f9">${T(c.name)}</div>`+(d.length?`<div style="color:#94a3b8;margin-top:1px">${T(d.join(" · "))}</div>`:"")+`<div style="margin-top:3px;color:${S.TIER_COLORS[c.tier]||S.TIER_COLORS.D}">`+`${T(c.tier||"?")} \xb7 power ${Number(c.power_score||0).toFixed(1)}`+`${c.is_catalyst?" · ⚡ catalyst":""}</div>`,aq.style.opacity="1",ar(a)})(a,b)}).on("mousemove",a=>ar(a)).on("mouseleave",()=>{ao=null,ap(),aq&&(aq.style.opacity="0")});let as=()=>{al.attr("x1",a=>a.source.x??0).attr("y1",a=>a.source.y??0).attr("x2",a=>a.target.x??0).attr("y2",a=>a.target.y??0),ak.attr("x1",0).attr("y1",0).attr("x2",a=>a.x??0).attr("y2",a=>a.y??0),am.attr("transform",a=>`translate(${a.x??0},${a.y??0})`)},at=null;if(J||g)as();else{let a=(0,q.forceSimulation)(_).force("radial",v(a=>a.targetRadius,0,0).strength(a=>.9*("d1"===a.kind))).force("collide",(0,t.forceCollide)(a=>a.r+2.5)).force("charge",(0,s.forceManyBody)().strength(-18)).on("tick",as);Z.length>0&&a.force("link",(0,r.forceLink)(Z).distance(26).strength(.7)),at=a,as();let b=G().on("start",(b,c)=>{b.active||a.alphaTarget(.3).restart(),c.fx=c.x,c.fy=c.y}).on("drag",(a,b)=>{b.fx=a.x,b.fy=a.y}).on("end",(b,c)=>{b.active||a.alphaTarget(0),(c.connection?.circle_power===null||c.connection?.circle_power===void 0)&&(c.fx=null,c.fy=null)});am.filter(a=>"d1"===a.kind).call(b),am.on("dblclick",(b,c)=>{"d1"===c.kind&&(b.stopPropagation(),c.fx=null,c.fy=null,a.alphaTarget(.2).restart(),window.setTimeout(()=>a.alphaTarget(0),400))})}let au=(0,n.default)().scaleExtent([.15,3]).on("zoom",a=>{ae.attr("transform",a.transform.toString()),a.sourceEvent&&(B.current=a.transform),a.transform.k!==A.current&&(A.current=a.transform.k,ap())});ab.call(au).on("dblclick.zoom",null);let av=Math.max(.15,Math.min(3,Math.min(b,c)/(2*$))),aw=B.current??p.identity.translate(b/2,c/2).scale(av);ab.call(au.transform,aw),C.current=a=>{ai.selectAll("circle.og-sel-temp").remove(),am.select("circle.og-sel").style("opacity",b=>+(b.id===a)),am.select("circle.og-base").attr("r",b=>b.id===a&&"user"!==b.kind?b.r+1.5:b.r),a&&am.filter(b=>b.id===a&&!b.hub&&"user"!==b.kind).append("circle").attr("class","og-sel-temp").attr("r",a=>a.r+3).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1.2),ap()},C.current(z.current),D.current=a=>{ai.selectAll("circle.og-asked").remove(),am.filter(b=>"d2"===b.kind&&(0,h.hasRequest)(b.connection,a)).append("circle").attr("class","og-asked").attr("r",a=>a.r+2.2).attr("fill","none").attr("stroke","#FFD700").attr("stroke-width",1).attr("stroke-dasharray","2 1.6").style("pointer-events","none")},D.current(N.current);let ax=new Map(aa.map(a=>[a.id,a]));return E.current=d=>{let e=ax.get(d);if(!e)return;let f=e.x??0,g=e.y??0,h=(0,o.default)(a),i=p.identity.translate(b/2,c/2).scale(2.5).translate(-f,-g),j=performance.now(),k=a=>{let b=Math.min(1,(a-j)/650),c=1-Math.pow(1-b,3);au.transform(ab,p.identity.translate(h.x+(i.x-h.x)*c,h.y+(i.y-h.y)*c).scale(h.k+(i.k-h.k)*c)),b<1&&requestAnimationFrame(k)};requestAnimationFrame(k),window.setTimeout(()=>au.transform(ab,i),730),y.current?.(e.connection),z.current=d,C.current(d);let l=ai.append("circle").attr("cx",f).attr("cy",g).attr("r",e.r+2).attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",2).attr("opacity",.9),m=performance.now(),n=a=>{let b=Math.min(1,(a-m)/700);l.attr("r",e.r+2+26*b).attr("opacity",.9*(1-b)),b<1?requestAnimationFrame(n):l.remove()};requestAnimationFrame(n),window.setTimeout(()=>l.remove(),800)},()=>{at?.stop(),C.current=()=>{},D.current=()=>{},E.current=()=>{},ab.on(".zoom",null),ab.on("click",null),ab.selectAll("*").remove()}},[K,f,i,J,F,l]),(0,b.jsxs)("div",{ref:u,style:{position:"relative",flex:1,minHeight:0,width:"100%"},children:[(0,b.jsx)("svg",{ref:w,style:{display:"block",height:"100%",width:"100%",touchAction:"none",userSelect:"none"},role:"img","aria-label":"Your network as an orbital galaxy — closer orbits are higher-leverage tiers"}),(0,b.jsx)("div",{ref:x,"aria-hidden":!0,style:{position:"absolute",zIndex:20,maxWidth:190,pointerEvents:"none",padding:"6px 10px",fontSize:11.5,lineHeight:1.45,borderRadius:8,background:"rgba(10,10,26,0.92)",border:"1px solid rgba(255,255,255,0.12)",backdropFilter:"blur(8px)",opacity:0,transition:"opacity 150ms ease",left:0,top:0}})]})});var V=a.i(38246),W=a.i(90231);let X=a=>a?.unlock_status==="pending";function Y(a=[],b=[]){let c=new Map;for(let a of b||[]){let b=a?.source_connection_id;if(null==b)continue;let d=c.get(b);d||c.set(b,d=[]),d.push(a)}let d=new Map;for(let b of a||[]){let a=b?.unlocked_from_bridge_id;if(null==a||1!==b.degree)continue;let c=d.get(a);c||d.set(a,c=[]),c.push(b)}return{circles:c,introduced:d}}let Z={connected:0,requested:1},$=(a,b)=>(Z[a.state]??2)-(Z[b.state]??2)||(0,W.score1)(b.row)-(0,W.score1)(a.row)||String(a.row.name||"").localeCompare(String(b.row.name||"")),_=(a,b,c)=>Math.min(c,Math.max(b,a)),aa=2*Math.PI;function ab(a,b,c){if(a<=0)return 1;let d=c*a;return Math.max(1,c>=aa-1e-9?Math.floor(d/b):Math.floor(d/b)+1)}function ac(a,b,c,d){let e=[],f=0;for(let g=b;f<a;g+=c)e.push(g),f+=ab(g,c,d);return e}let ad=(a,b,c,d)=>{let e=ac(a,b,c,d);return e[e.length-1]};function ae(a,{inner:b,outer:c,spacing:d,minSpacing:e=d/3,innerMin:f=b,start:g=-Math.PI/2,sweep:h=aa}={}){let i=Math.max(0,Math.floor(a)||0);if(!i)return{spacing:d,inner:b,rings:[],points:[]};let j=d,k=b;if(ad(i,k,j,h)>c)if(ad(i,f,j,h)<=c){let a=f,d=b;for(let b=0;b<24;b++){let b=(a+d)/2;ad(i,b,j,h)<=c?a=b:d=b}k=a}else{let a=e,b=d;if(ad(i,k=f,a,h)<=c)for(let d=0;d<24;d++){let d=(a+b)/2;ad(i,k,d,h)<=c?a=d:b=d}j=a}let l=ac(i,k,j,h),m=l.map(a=>ab(a,j,h)),n=m.reduce((a,b)=>a+b,0),o=m.map(a=>Math.min(a,Math.floor(i*a/n))),p=i-o.reduce((a,b)=>a+b,0);for(;p>0;){let a=-1;for(let b=0;b<m.length;b++)o[b]<m[b]&&(a<0||m[b]-o[b]>m[a]-o[a])&&(a=b);o[a]++,p--}let q=h>=aa-1e-9,r=[],s=[];return l.forEach((a,b)=>{let c=o[b];if(!c)return;s.push({radius:a,count:c});let d=q?aa/c:c>1?h/(c-1):0,e=q?g+(b%2?d/2:0):c>1?g:g+h/2,f=q?null:function(a){let b=Math.floor((a-1)/2),c=b+1,d=[b--];for(;d.length<a;)c<a&&d.push(c++),d.length<a&&b>=0&&d.push(b--);return d}(c);for(let b=0;b<c;b++){let c=e+(f?f[b]:b)*d;r.push({x:a*Math.cos(c),y:a*Math.sin(c),angle:c,ring:s.length-1})}}),{spacing:j,inner:k,rings:s,points:r}}function af(a,b){return Math.max(1.4,Math.min(7,.42*a*("S"===b?1:"A"===b?.86:"B"===b?.72:.6)))}let ag=["S","A","B","C","D"];function ah(a=[],b=[]){let c=new Set((b||[]).map(W.keyFor)),d=new Map;for(let b of a||[]){let a=b?.source_connection_id;if(null==a)continue;let e=(0,W.keyFor)(b);if(c.has(e))continue;let f=d.get(e);f||d.set(e,f=new Set),f.add(a)}let e=new Map;for(let a of d.values())for(let b of a){let c=e.get(b)||{reach:0,only:0,total:0};c.reach+=1/a.size,c.total+=1,1===a.size&&(c.only+=1),e.set(b,c)}return e}let ai={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aj={1:"#FFD700",2:"#FF6B35",3:"#3498DB",4:"#9B59B6",5:"#00ff88",6:"#ff5050"},ak={S:0,A:1,B:2,C:3,D:4},al="#00ff88",am="#5a5a66",an=(a,b)=>(ak[a.tier]??9)-(ak[b.tier]??9)||(0,W.score)(b)-(0,W.score)(a)||String(a.name||"").localeCompare(String(b.name||"")),ao=a=>String(a?.name||"").trim().split(/\s+/)[0]||"them",ap=a=>`/setup?scan=${encodeURIComponent(a.id)}`,aq=a=>`${a}${a%10==1&&11!==a?"st":a%10==2&&12!==a?"nd":a%10==3&&13!==a?"rd":"th"}`,ar=()=>{let a=(0,e.scannerNow)();return a.running&&(0,e.isCircleScan)(a)?a.target?.id??null:null},as=()=>null,at=()=>()=>{};function au(a){return()=>void 0}let av=()=>!1,aw=()=>!0;function ax(a,b){let c=new Set([(0,W.keyFor)(a)]),d=a=>{let b=[];for(let d of a||[]){let a=(0,W.keyFor)(d);c.has(a)||(c.add(a),b.push(d))}return b.sort(an)};return[...d(b.introduced.get(a.id)),...d(b.circles.get(a.id))]}function ay({bridge:a,members:c,reach:d,cx:e,cy:f,maxR:g,still:h,band:i}){let j=c.filter(a=>1===a.degree||"S"===a.tier||"A"===a.tier||"B"===a.tier),{inner:k,outer:l}=i,m=Math.min(.9*Math.PI,Math.max(.2*Math.PI,11*j.length/k)),n=ae(j.length,{inner:k,outer:l,spacing:11,minSpacing:3.5,start:a.angle-m/2,sweep:m});return(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:e,cy:f,r:k,fill:"none",stroke:`${aj[2]}06`,strokeWidth:1}),j.map((c,g)=>{let i=n.points[g],k=e+i.x,l=f+i.y,m=(0,J.reachState)(c,d),o=Math.min(af(n.spacing,c.tier),5)*(m?1.3:1),p="hidden"===m?am:ai[c.tier]||"#555";return(0,b.jsxs)("g",{children:[(m||j.length<=40)&&(0,b.jsx)("line",{x1:a.x,y1:a.y,x2:k,y2:l,stroke:m?al:p,strokeWidth:.5,strokeOpacity:m?.35:.15}),"ready"===m&&(0,b.jsx)(az,{x:k,y:l,r:2.3*o,still:h}),(0,b.jsx)("circle",{cx:k,cy:l,r:o,fill:p,fillOpacity:m?.95:.45,stroke:m&&"hidden"!==m?al:p,strokeWidth:m?1:.5,strokeOpacity:m?1:.25}),("S"===c.tier||m)&&j.length<=60&&(0,b.jsx)("text",{x:k,y:l+o+9,textAnchor:"middle",fill:m&&"hidden"!==m?al:"#aaa",fontSize:7,children:ao(c)})]},"pv-"+c.id)})]})}function az({x:a,y:c,r:d,still:e}){return(0,b.jsxs)("circle",{cx:a,cy:c,r:d,fill:al,fillOpacity:.16,stroke:al,strokeWidth:.8,strokeOpacity:.45,pointerEvents:"none",children:[!e&&(0,b.jsx)("animate",{attributeName:"fill-opacity",values:"0.06;0.24;0.06",dur:"2.8s",repeatCount:"indefinite"}),!e&&(0,b.jsx)("animate",{attributeName:"stroke-opacity",values:"0.25;0.7;0.25",dur:"2.8s",repeatCount:"indefinite"})]})}function aA({x:a,y:c,s:d}){return(0,b.jsxs)("g",{transform:`translate(${a} ${c}) scale(${d})`,pointerEvents:"none",children:[(0,b.jsx)("path",{d:"M-1.9 -0.6 V-1.8 A1.9 1.9 0 0 1 1.9 -1.8 V-0.6",fill:"none",stroke:"#d6d6de",strokeWidth:.9}),(0,b.jsx)("rect",{x:-2.6,y:-.7,width:5.2,height:3.9,rx:.8,fill:"#d6d6de"})]})}function aB({onIn:a,onReset:c,onOut:d}){let e=a=>({width:32,height:32,borderRadius:"50%",border:"none",cursor:"pointer",background:a?"rgba(255,255,255,0.06)":"rgba(255,255,255,0.1)",color:a?"#666":"#fff",fontSize:a?10:18,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(8px)"});return(0,b.jsxs)("div",{style:{position:"absolute",bottom:64,right:20,zIndex:20,display:"flex",flexDirection:"column",gap:4},children:[(0,b.jsx)("button",{type:"button",onClick:a,"aria-label":"Zoom in",style:e(!1),children:"+"}),(0,b.jsx)("button",{type:"button",onClick:c,"aria-label":"Fit to the window",style:e(!0),children:"⊙"}),(0,b.jsx)("button",{type:"button",onClick:d,"aria-label":"Zoom out",style:e(!1),children:"−"})]})}function aC({trail:a,index:e,reach:f,dims:g,requests:i,scanningId:j,still:k,canScan:l,onOpen:m,onBack:n,onSelect:o}){var p,q,r,s,t;let u,v,w,x=a[a.length-1],y=a.length,z=(0,c.useMemo)(()=>ax(x,e),[x,e]),[A,B]=(0,c.useState)(null),[C,D]=(0,c.useState)({k:1,x:0,y:0}),E=(0,c.useRef)(null),F=(0,c.useRef)(null),G=(0,d.useRouter)(),I=g.w/2,K=g.h/2,L=Math.min(I,K)-30,M=(0,c.useMemo)(()=>z.map(a=>1===a.degree?ax(a,e):[]),[z,e]),N=M.some(a=>a.length>0),O=(0,c.useMemo)(()=>(function(a,{inner:b,outer:c,spacing:d,minSpacing:e=d/3,gap:f=d}){let g=ag.map(a=>({tier:a,idx:[]}));a.forEach((a,b)=>{let c=ag.indexOf(a?.tier);g[c<0?4:c].idx.push(b)});let h=g.filter(a=>a.idx.length),i=c=>{let e=Array(a.length),g=[],i=b;for(let a of h){let b=ae(a.idx.length,{inner:i,outer:1/0,spacing:c,minSpacing:c});a.idx.forEach((a,c)=>{let d=b.points[c];e[a]={x:d.x,y:d.y,angle:d.angle,slot:aa/b.rings[d.ring].count}});let h=Math.max(i,...b.rings.map(a=>a.radius));g.push({tier:a.tier,inner:i,outer:h}),i=h+c/d*f}return{spacing:c,points:e,bands:g,edge:g.length?g[g.length-1].outer:b}},j=i(d);if(j.edge<=c)return j;let k=e,l=d;if((j=i(k)).edge>c)return j;for(let a=0;a<20;a++){let a=(k+l)/2,b=i(a);b.edge<=c?(k=a,j=b):l=a}return j})(z,{inner:Math.max(62,.3*L),outer:L*(N?.72:.94),spacing:Math.max(14,Math.min(24,.085*L)),minSpacing:4,gap:Math.max(10,.04*L)}),[z,L,N]),P=(0,c.useMemo)(()=>N?(function(a,{from:b,spacing:c=7,cap:d=40,total:e=1200}={}){let f=Math.max(6,Math.min(d,Math.floor(e/Math.max(1,a.filter(a=>a?.count>0).length))));return a.map(a=>{if(!(a?.count>0))return null;let d=Math.min(a.count,f),e=Math.min(Math.min(a.slot||aa,aa/6),Math.max(3*c/b,d*c/b));return{points:ae(d,{inner:b,outer:1/0,spacing:c,minSpacing:c,start:a.angle-e/2,sweep:e}).points.map(({x:a,y:b})=>({x:a,y:b})),more:a.count-d}})})(z.map((a,b)=>({angle:O.points[b].angle,slot:O.points[b].slot,count:M[b].length})),{from:O.edge+1.5*O.spacing}).map((a,b)=>a&&{...a,i:b,people:M[b].slice(0,a.points.length)}).filter(Boolean):[],[z,M,N,O]),Q=(0,c.useMemo)(()=>z.map(a=>{let b=(0,J.reachState)(a,f);return{reached:b,requested:!b&&2===a.degree&&(0,h.hasRequest)(a,i),own:1===a.degree?(e.circles.get(a.id)?.length||0)+(e.introduced.get(a.id)?.length||0):0}}),[z,f,i,e]),R=a=>l&&"ready"===Q[a].reached&&z[a].id!==j,S=C.k,T=(0,c.useMemo)(()=>{let a=z.length<=60,c=O.spacing*S>=26;return z.map((d,e)=>{let f=O.points[e],g=Q[e],h=af(O.spacing,d.tier)*(g.reached?1.4:1),i="hidden"===g.reached?am:ai[d.tier]||"#555";return(0,b.jsxs)("g",{children:[(a||g.reached)&&(0,b.jsx)("line",{x1:0,y1:0,x2:f.x,y2:f.y,stroke:g.reached?al:i,strokeWidth:.6/S,strokeOpacity:g.reached?.3:.12}),"ready"===g.reached&&(0,b.jsx)(az,{x:f.x,y:f.y,r:2.3*h,still:k}),g.requested?(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:1.2*h,fill:"none",stroke:i,strokeWidth:Math.max(.6,.45*h),strokeDasharray:`${Math.max(.8,.55*h)} ${Math.max(.6,.45*h)}`}):(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:h,fill:i,fillOpacity:g.reached?1:.85,stroke:g.reached&&"hidden"!==g.reached?al:"none",strokeWidth:g.reached?Math.max(.8,.3*h):0}),"hidden"===g.reached&&(0,b.jsx)(aA,{x:f.x,y:f.y-.1*h,s:h/4.2}),d.id===j&&(0,b.jsx)("circle",{cx:f.x,cy:f.y,r:2*h,fill:"none",stroke:aj[3],strokeWidth:1/S,strokeDasharray:`${3/S} ${2/S}`}),(g.reached||c&&"S"===d.tier)&&(0,b.jsx)("text",{x:f.x,y:f.y+h+10/S,textAnchor:"middle",fontSize:8.5/S,fontWeight:g.reached?700:400,fill:"hidden"===g.reached?"#999":g.reached?al:"#aaa",pointerEvents:"none",stroke:"#0a0a1a",strokeWidth:2.4/S,paintOrder:"stroke",children:ao(d)})]},d.id)})},[z,O,Q,S,k,j]),U=(a,b)=>{let c=F.current;if(!c)return null;let d=c.getBoundingClientRect(),e=(a-d.left-I-C.x)/S,f=(b-d.top-K-C.y)/S;if(30>=Math.hypot(e,f))return"center";let g=Math.max(.6*O.spacing,10/S),h=null,i=g;return O.points.forEach((a,b)=>{let c=Math.hypot(a.x-e,a.y-f);c<i&&(i=c,h=b)}),h},V=(a,b={x:0,y:0})=>D(c=>{let d=Math.max(.5,Math.min(6,c.k*a));return{k:d,x:b.x-(b.x-c.x)*d/c.k,y:b.y-(b.y-c.y)*d/c.k}}),X=Q.filter(a=>"ready"===a.reached).length,Y=Q.filter(a=>"hidden"===a.reached).length,Z=Q.filter(a=>a.reached).length,$=Q.filter(a=>a.requested).length,_=["S","A","B","C","D"].map(a=>[a,z.filter(b=>b.tier===a).length]).filter(([,a])=>a),ab=null!=j&&j===x.id,ac="number"==typeof A?z[A]:null,ad="number"==typeof A?O.points[A]:null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("svg",{ref:F,width:g.w,height:g.h,style:{display:"block",touchAction:"none",cursor:null!=A?"pointer":"grab"},onPointerDown:a=>{E.current={x:a.clientX,y:a.clientY,vx:C.x,vy:C.y,moved:!1},a.currentTarget.setPointerCapture?.(a.pointerId)},onPointerMove:a=>{let b=E.current;if(b){let c=a.clientX-b.x,d=a.clientY-b.y;if(!b.moved&&Math.hypot(c,d)>5&&(b.moved=!0),b.moved)return void D(a=>({...a,x:b.vx+c,y:b.vy+d}))}let c=U(a.clientX,a.clientY);B(a=>a===c?a:c)},onPointerUp:a=>{let b=E.current;if(E.current=null,!b||b.moved)return;let c=U(a.clientX,a.clientY);"center"===c?o?.(x):null!=c&&R(c)?G.push(ap(z[c])):null!=c&&m(z[c].id)},onPointerLeave:()=>{E.current||B(null)},onWheel:a=>{let b=F.current?.getBoundingClientRect();b&&V(Math.exp(-(.0015*a.deltaY)),{x:a.clientX-b.left-I,y:a.clientY-b.top-K})},role:"img","aria-label":`${x.name}’s circle: ${z.length} ${1===z.length?"person":"people"}`,children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("filter",{id:"focusGlow",children:[(0,b.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,b.jsxs)("feMerge",{children:[(0,b.jsx)("feMergeNode",{in:"blur"}),(0,b.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),(0,b.jsxs)("g",{transform:`translate(${I+C.x} ${K+C.y}) scale(${S})`,children:[O.bands.map(a=>(0,b.jsx)("circle",{r:(a.inner+a.outer)/2,fill:"none",stroke:ai[a.tier]||"#555",strokeOpacity:.07,strokeWidth:Math.max(1/S,a.outer-a.inner+O.spacing),pointerEvents:"none"},a.tier)),P.map(a=>{let c=O.points[a.i],d=a.points[a.points.length-1];return(0,b.jsxs)("g",{pointerEvents:"none",children:[a.points.map((a,d)=>(0,b.jsx)("line",{x1:c.x,y1:c.y,x2:a.x,y2:a.y,stroke:al,strokeOpacity:.12,strokeWidth:.5/S},"l"+d)),a.points.map((c,d)=>(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:2.2,fill:ai[a.people[d]?.tier]||"#555",fillOpacity:.75},"d"+d)),a.more>0&&d&&(0,b.jsxs)("text",{x:1.06*d.x,y:1.06*d.y,textAnchor:"middle",fontSize:8/S,fill:"#8b9a9a",stroke:"#0a0a1a",strokeWidth:2.4/S,paintOrder:"stroke",children:["+",a.more.toLocaleString()]})]},"fan-"+z[a.i].id)}),T,ad&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("line",{x1:0,y1:0,x2:ad.x,y2:ad.y,stroke:ai[ac.tier]||"#888",strokeWidth:1.6/S,strokeOpacity:.8}),(0,b.jsx)("circle",{cx:ad.x,cy:ad.y,r:af(O.spacing,ac.tier)*(Q[A].reached?1.4:1)+2/S,fill:"none",stroke:"#fff",strokeWidth:1.6/S})]}),"ready"===(0,J.reachState)(x,f)&&(0,b.jsx)(az,{x:0,y:0,r:40,still:k}),(0,b.jsx)("circle",{r:28,fill:"#0a0a1a",stroke:ai[x.tier]||"#888",strokeWidth:"center"===A?4:3,filter:"url(#focusGlow)"}),(0,H.localPhoto)(x.profile_image_url)?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("clipPath",{id:"focus-clip",children:(0,b.jsx)("circle",{r:24})}),(0,b.jsx)("image",{href:(0,H.localPhoto)(x.profile_image_url),x:-24,y:-24,width:48,height:48,clipPath:"url(#focus-clip)"})]}):(0,b.jsx)("text",{y:5,textAnchor:"middle",fill:ai[x.tier]||"#888",fontSize:16,fontWeight:800,children:x.name?.charAt(0)}),(0,b.jsx)("text",{y:40,textAnchor:"middle",fill:"#fff",fontSize:11,fontWeight:700,pointerEvents:"none",children:x.name})]}),ac&&(0,b.jsx)(aD,{x:I+C.x+ad.x*S,y:K+C.y+ad.y*S,w:g.w,lines:(p=ac,q=Q[A],r=j,s=y,t=R(A),u=ao(p),v=p.id===r?"Their circle is being scanned now":"ready"===q.reached?"You added them · their circle is ready to scan":"hidden"===q.reached?"You added them · their list is hidden":"scanned"===q.reached?`You added them \xb7 ${q.own.toLocaleString("en-US")} in their circle`:q.requested?"Request sent":"Not connected yet",w=t?`Click to scan ${u}’s circle on the Scan page`:q.own>0?`Click to open ${u}’s circle (${aq(s+2)} degree)`:`Click to open ${u}’s circle`,[p.name,`${p.tier}-tier \xb7 ${(0,W.score)(p).toFixed(1)}`,v,w]),accent:Q[A].reached?al:ai[ac.tier]}),"center"===A&&(0,b.jsx)(aD,{x:I+C.x,y:K+C.y-28*S,w:g.w,lines:[x.name,"Open their card"],accent:ai[x.tier]})]}),(0,b.jsxs)("div",{style:{position:"absolute",top:14,left:64,right:64,pointerEvents:"none",display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",pointerEvents:"auto"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>n(y-1),style:{padding:"8px 16px",borderRadius:8,border:"none",cursor:"pointer",background:"rgba(255,255,255,0.1)",color:"#ddd",fontSize:12,fontWeight:700},children:["← ",1===y?"All bridges":`${ao(a[y-2])}’s circle`]}),(0,b.jsxs)("nav",{"aria-label":"Trail",style:{fontSize:11,color:"#777",display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("button",{type:"button",onClick:()=>n(0),style:aF,children:"All bridges"}),a.map((a,c)=>(0,b.jsxs)("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"›"}),c===y-1?(0,b.jsx)("span",{style:{color:"#fff",fontWeight:700},children:a.name}):(0,b.jsx)("button",{type:"button",onClick:()=>n(c+1),style:aF,children:a.name})]},a.id))]})]}),(0,b.jsxs)("div",{style:{fontSize:11,color:"#999"},children:[ao(x),"’s circle · ",z.length.toLocaleString("en-US")," ",1===z.length?"person":"people"," · ",aq(y+1)," degree",y>1?", counted along this chain":""]}),ab&&z.length>0&&(0,b.jsxs)("div",{role:"status",style:{...aG,borderColor:"rgba(52,152,219,0.4)",color:"#cfe6f7"},children:["Scanning ",ao(x),"’s circle now. More people appear here as it saves, every 10 pages."]})]}),0===z.length&&(0,b.jsx)(aE,{person:x,depth:y,reach:f,requests:i,scanning:ab,canScan:l,onSelect:o,top:K+64}),z.length>0&&(0,b.jsxs)("div",{style:{position:"absolute",bottom:20,left:20,maxWidth:"calc(100% - 110px)",background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"10px 14px",backdropFilter:"blur(8px)",fontSize:10,color:"#888",lineHeight:1.6},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1,marginBottom:6},children:"IN THIS CIRCLE"}),_.map(([a,c])=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:ai[a]}}),(0,b.jsxs)("span",{style:{color:ai[a],fontWeight:600,width:40},children:[a,"-Tier"]}),(0,b.jsx)("span",{children:c.toLocaleString("en-US")})]},a)),(Z>0||$>0)&&(0,b.jsxs)("div",{style:{marginTop:6},children:[Z>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:al},children:"● "}),"you added ",Z,X?`, ${X} ready to scan`:"",Y?`, ${Y} hidden`:""]}),$>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#FFD700"},children:"◌ "}),$," ",1===$?"request":"requests"," out"]})]}),(0,b.jsxs)("div",{style:{marginTop:6,color:"#555"},children:["Click anyone for their circle",X>0&&l?", or someone ready to scan theirs":""," · drag to move · scroll to zoom"]})]}),(0,b.jsx)(aB,{onIn:()=>V(1.35),onReset:()=>D({k:1,x:0,y:0}),onOut:()=>V(1/1.35)})]})}function aD({x:a,y:c,w:d,lines:e,accent:f}){let g=Math.max(150,Math.min(240,5.6*Math.max(...e.map(a=>String(a).length))+20)),h=12+12*e.length,i=Math.max(6,Math.min(d-g-6,a-g/2)),j=Math.max(6,c-h-12);return(0,b.jsxs)("g",{pointerEvents:"none",children:[(0,b.jsx)("rect",{x:i,y:j,width:g,height:h,rx:6,fill:"rgba(0,0,0,0.92)",stroke:f||"#555",strokeWidth:.6}),e.map((a,c)=>(0,b.jsx)("text",{x:i+g/2,y:j+16+12*c,textAnchor:"middle",fill:0===c?"#fff":2===c?f||"#aaa":"#999",fontSize:0===c?10.5:9,fontWeight:0===c?700:400,children:a},c))]})}function aE({person:a,depth:c,reach:d,requests:e,scanning:f,canScan:g,onSelect:i,top:j}){let k,l,m=ao(a),n=aq(c+1),o=1===a.degree,p=o?(0,J.circleState)(a,d):null,q=(0,J.circleScanCost)(),r=null;return f?(k=`Scanning ${m}’s circle now`,l="Their people appear here as the scan saves them, every 10 pages."):"hidden"===p?(k=`${m} keeps their connections hidden`,l="LinkedIn doesn’t show their list, so there is no circle to scan."):"scanned"===p?(k=`${m}’s list has been read`,l="Everyone on it was already one of your connections, so nobody new is here."):o?(k=`${m}’s circle isn’t scanned yet`,l=`${m} is your connection, so their circle can be scanned. That brings in the people they know: ${n} degree${c>1?", counted along this chain":""}.`,g&&(r=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(V.default,{href:ap(a),style:aH,children:["Scan ",m,"’s circle →"]}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#888",marginTop:8},children:[q.profileViews," profile view, then one LinkedIn search per page of their list (up to ",q.searches,", about ",q.minutes," min). It starts only once you confirm it on the Scan page."]})]}))):(0,h.hasRequest)(a,e)?(k=`Request sent to ${m}`,l=`Once ${m} accepts, ↻ Check for new brings them into your connections. Then their circle can be scanned, and the people they know fill in here: ${n} degree.`):(k=`Nobody from ${m}’s circle yet`,l=`LinkedIn only shows the connections of people you’re connected to. Connect with ${m}; once they accept and their circle is scanned, the people they know fill in here: ${n} degree.`,r=(0,b.jsxs)("button",{type:"button",onClick:()=>i?.(a),style:aI,children:["Open ",m,"’s card"]})),(0,b.jsxs)("div",{role:"status",style:{position:"absolute",left:"50%",top:j,transform:"translateX(-50%)",width:"min(360px, calc(100% - 32px))",background:"rgba(10,10,26,0.94)",border:`1px solid ${"hidden"===p?"rgba(255,255,255,0.12)":"rgba(0,255,136,0.25)"}`,borderRadius:12,padding:"14px 16px",textAlign:"center"},children:[(0,b.jsxs)("div",{style:{fontSize:13,fontWeight:800,color:"hidden"===p?"#aaa":"#fff",marginBottom:6},children:["hidden"===p&&(0,b.jsx)("span",{"aria-hidden":"true",children:"🔒 "}),k]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#9aa",lineHeight:1.55,marginBottom:12*!!r},children:l}),r]})}let aF={background:"none",border:"none",color:"#8fb8d6",fontSize:11,fontWeight:600,cursor:"pointer",padding:0},aG={fontSize:11,padding:"6px 10px",borderRadius:8,border:"1px solid",background:"rgba(0,0,0,0.6)",pointerEvents:"auto"},aH={display:"inline-block",padding:"9px 16px",borderRadius:8,textDecoration:"none",fontSize:12.5,fontWeight:800,color:"#0a0a1a",background:"linear-gradient(135deg, #00ff88, #3498DB)"},aI={padding:"8px 14px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.06)",color:"#ddd"},aJ={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aK=["S","A","B","C","D"],aL={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aM={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aN=["S","A","B","C","D"],aO=[{key:"only",label:"Only way in",range:"1",max:1,color:"#00E5FF"},{key:"rare",label:"Rare",range:"2–3",max:3,color:"#4FC3F7"},{key:"uncommon",label:"Uncommon",range:"4–10",max:10,color:"#B0BEC5"},{key:"common",label:"Common",range:"11–30",max:30,color:"#FFB74D"},{key:"warm",label:"Warm",range:"31+",max:1/0,color:"#FF7043"}],aP=new Map(aO.map(a=>[a.key,a]));function aQ(a){return aP.get(a)??null}function aR(a,b=1){let c,d=function(a,b=1){let c=Number(a?.mutual_count);return Number.isFinite(c)&&c>=1?{count:Math.floor(c),from:"linkedin"}:{count:Math.max(1,Math.floor(Number(b)||1)),from:"scans"}}(a,b);return{key:(c=Math.max(1,Math.floor(Number(d.count)||1)),aO.find(a=>c<=a.max).key),...d}}function aS({tier:a,rarity:b},{tiers:c=new Set,rarities:d=new Set}={}){return(!c.size||!!c.has(a))&&(!d.size||!!(b&&d.has(b)))}function aT(a,b){let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c}let aU={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function aV({person:a,size:c=32,tierColors:d=aU}){let e=d[a?.tier]||"#666",f=(0,H.localPhoto)(a?.profile_image_url);return(0,b.jsxs)("span",{style:{position:"relative",display:"inline-block",width:c,height:c,flexShrink:0,borderRadius:"50%",boxShadow:`0 0 0 ${c>=24?2:1}px ${e}`},children:[(0,b.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:`${e}2e`,color:e,fontWeight:800,fontSize:Math.max(7,Math.round(.36*c)),lineHeight:1},children:(0,S.initialsFor)(a?.name)}),f&&(0,b.jsx)("img",{src:f,alt:"",loading:"lazy",decoding:"async",onError:a=>{a.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:c,height:c,borderRadius:"50%",objectFit:"cover"}})]})}let aW="#FF6B35",aX={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aY="a connection we can’t name",aZ=a=>Number(a||0).toLocaleString("en-US"),a$=(a,b,c)=>`${aZ(a)} ${1===a?b:c}`;function a_(a){return a.role&&a.company?`${a.role} @ ${a.company}`:a.headline||a.role||a.company||""}let a0=`
10
10
  .sepmap .sp { cursor: pointer; transition: opacity .12s; }
11
11
  .sepmap .ppl:hover .sp { opacity: .28; }
12
12
  .sepmap .ppl:hover .sp:hover, .sepmap .ppl:hover .sp.sel { opacity: 1; }
@@ -15,6 +15,6 @@ module.exports=[30100,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944
15
15
  .sepmap .br:hover text { text-decoration: underline; }
16
16
  .sepmap .rt { pointer-events: none; }
17
17
  `,a1={paintOrder:"stroke",stroke:"#0a0a1a",strokeWidth:3,strokeLinejoin:"round"},a2=(0,c.memo)(function({layout:a,selectedKey:d,tierColors:e,youLabel:f,isMobile:g,onPick:h,onPickBridge:i}){let{width:j,height:k,you:l,people:m,bridges:n,links:o,spokes:p}=a,q=(0,c.useMemo)(()=>{let a=new Map;for(let b of o)a.has(b.key)||a.set(b.key,[]),a.get(b.key).push(b);return a},[o]),r=g?36:26,s=g?12:11;return(0,b.jsxs)("svg",{className:"sepmap",width:j,height:k,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,b.jsx)("style",{children:a0}),(0,b.jsx)("defs",{children:(0,b.jsxs)("linearGradient",{id:"sepYouGrad",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,b.jsx)("stop",{offset:"0",stopColor:"#FFD700"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#FF6B35"})]})}),p.map(a=>(0,b.jsx)("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,stroke:"#fff",strokeOpacity:.12,strokeWidth:1},`s-${a.id??"unresolved"}`)),(0,b.jsx)("g",{className:"ppl",children:m.map(a=>{let{p:c}=a,f=e[c.tier]||"#888",g=a.key===d,i=c.routes.map(a=>a.bridge?a.bridge.name:aY).join(", ");return(0,b.jsxs)("g",{className:g?"sp sel":"sp",onClick:()=>h(c),children:[(0,b.jsx)("title",{children:`${c.person.name} \xb7 #${c.rank}${c.tied?"=":""} \xb7 ${c.tier} \xb7 ${c.score.toFixed(1)} \xb7 via ${i}`}),(q.get(a.key)||[]).map(c=>{let d=(c.x1+c.x2)/2,f=c.unresolved?"#777":c.primary?aW:e[c.tier]||"#888";return(0,b.jsx)("path",{className:"rt",d:`M${c.x1+5},${c.y1} C${d},${c.y1} ${d},${c.y2} ${c.x2-a.r},${c.y2}`,fill:"none",stroke:f,strokeWidth:c.primary?1.5:1,strokeOpacity:c.primary?.8:.35,strokeDasharray:c.primary?void 0:"3 3"},`${c.key}-${c.bridgeId??"u"}`)}),(0,b.jsx)("rect",{x:a.x-12,y:a.y-r/2,width:Math.max(0,j-a.x+12),height:r,fill:"transparent"}),g&&(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:a.r+3.5,fill:"none",stroke:"#fff",strokeWidth:1.5}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:a.r,fill:f}),(0,b.jsxs)("text",{x:a.x+14,y:a.y,dy:"0.35em",fontSize:s,fill:"#ddd",style:a1,children:[a.label,(0,b.jsx)("tspan",{dx:6,fill:f,fontWeight:700,children:c.score.toFixed(1)})]})]},a.key)})}),n.map(a=>{let c=a.unresolved?"#777":e[a.bridge.tier]||"#888";return(0,b.jsxs)("g",{className:a.unresolved?void 0:"br",onClick:a.unresolved?void 0:()=>i(a.bridge),children:[(0,b.jsx)("title",{children:a.unresolved?"Routes whose connection record doesn’t match anyone in your 1st-degree list, so who introduces you can’t be named":`${a.bridge.name} \xb7 ${a.bridge.tier}-tier \xb7 a way in to ${a.count} of these \xb7 click to open`}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:a.r,fill:a.unresolved?"none":c,stroke:a.unresolved?"#777":"#0a0a1a",strokeWidth:a.unresolved?1:1.5,strokeDasharray:a.unresolved?"2 2":void 0}),(0,b.jsx)("text",{x:a.x-9,y:a.y,dy:"0.35em",textAnchor:"end",fontSize:s-1,fill:c,fontStyle:a.unresolved?"italic":void 0,fontWeight:a.unresolved?400:600,style:a1,children:a.label})]},`b-${a.id??"unresolved"}`)}),(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:l.r,fill:"url(#sepYouGrad)"}),(0,b.jsx)("text",{x:l.x,y:l.y,dy:"0.35em",textAnchor:"middle",fontSize:f.length>2?9:10,fontWeight:800,fill:"#000",children:f})]})]})}),a3={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function a4({p:a,route:c,tierColors:d,compact:e}){if(!c?.bridge)return(0,b.jsxs)("span",{style:{...a3,color:"#777",fontStyle:"italic",fontSize:e?11:12},children:["via ",aY]});let f=c.bridge,g=a.waysIn-1;return(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:5,minWidth:0,fontSize:e?11:12},children:[(0,b.jsx)("span",{style:{color:"#666",flexShrink:0},children:"via"}),!e&&(0,b.jsx)(aV,{person:f,size:16,tierColors:d}),(0,b.jsx)("span",{style:{...a3,color:d[f.tier]||"#aaa",fontWeight:600,minWidth:0},children:e?(0,W.shortName)(f.name):f.name}),g>0&&(0,b.jsxs)("span",{title:`Every way in:
18
- ${a.routes.map(a=>a.bridge?`${a.bridge.name} (${a.bridge.tier})`:aY).join("\n")}`,style:{flexShrink:0,padding:"1px 6px",borderRadius:8,fontSize:10,fontWeight:800,color:aW,background:"rgba(255,107,53,0.15)"},children:["+",g]})]})}function a5({status:a,rarity:c}){let d=c?aQ(c.key):null;return(0,b.jsxs)(b.Fragment,{children:["asked"===a&&(0,b.jsx)("span",{title:"You sent a request. It shows everywhere in the app.",style:{flexShrink:0,fontSize:9,fontWeight:800,color:"#FFD700",border:"1px dashed rgba(255,215,0,0.6)",borderRadius:4,padding:"0 4px"},children:"Request sent"}),"connected"===a&&(0,b.jsx)("span",{title:"Already one of your connections",style:{flexShrink:0,fontSize:9,fontWeight:800,color:"#00ff88",border:"1px solid rgba(0,255,136,0.5)",borderRadius:4,padding:"0 4px"},children:"Connected"}),d&&"connected"!==a&&(0,b.jsx)("span",{title:`${c.count} mutual connection${1===c.count?"":"s"}${"scans"===c.from?" (from your scans, so it can only go up)":""}. ${a6}`,style:{flexShrink:0,fontSize:9,fontWeight:700,color:d.color,border:`1px solid ${d.color}55`,borderRadius:4,padding:"0 4px"},children:d.label})]})}let a6="Rarity is how many mutual connections lead to them: few is a rare way in, many is warm (likely to accept). It never changes a score or a tier.",a7=(0,c.memo)(function({p:a,top:c,height:d,isMobile:e,selected:f,tierColors:g,onPick:h,q:i,status:j,rarity:k}){let{person:l}=a,m=g[a.tier]||"#888",n=function(a,b){if(b){let c=a.routes.find(a=>a.bridge&&String(a.bridge.name||"").toLowerCase().includes(b));if(c)return c}return a.routes[0]||null}(a,i),o=a.rank<=3,p=f?"rgba(255,107,53,0.08)":o?`${m}08`:"transparent",q="LinkedIn Member"===l.name,r=`#${a.rank}${a.tied?"=":""}`,s=a.waysIn-1,t=n?.bridge?`via ${n.bridge.name}${s>0?` and ${s} other${s>1?"s":""}`:""}`:`via ${aY}${s>0?` and ${s} other${s>1?"s":""}`:""}`;return(0,b.jsxs)("div",{role:"button",tabIndex:0,"aria-label":`Rank ${a.rank}${a.tied?", tied":""}, ${l.name}, ${a.tier} tier, ${a.score.toFixed(1)}, ${a.waysIn} way${1===a.waysIn?"":"s"} in, ${t}`,"aria-pressed":f,onClick:()=>h(a),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),h(a))},onMouseEnter:a=>{f||(a.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:a=>{a.currentTarget.style.background=p},style:{position:"absolute",top:c,left:0,right:0,height:d,boxSizing:"border-box",display:"grid",alignItems:"center",gap:10,padding:"0 12px",gridTemplateColumns:e?"44px 36px 1fr 44px":"64px 36px minmax(0,1.4fr) minmax(0,1fr) 96px 44px",borderLeft:`3px solid ${f?aW:"transparent"}`,borderBottom:"1px solid rgba(255,255,255,0.04)",background:p,cursor:"pointer"},children:[(0,b.jsx)("span",{style:{fontSize:e?11:12,fontWeight:800,color:o?m:"#555",whiteSpace:"nowrap"},children:r}),(0,b.jsx)(aV,{person:l,size:32,tierColors:g}),e?(0,b.jsxs)("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[(0,b.jsxs)("span",{style:{...a3,fontSize:13,fontWeight:600,color:q?"#888":"#fff",minWidth:0},children:[l.name,q&&(0,b.jsx)("span",{style:{fontSize:10,color:"#666",fontWeight:400},children:" · out of network"})]}),(0,b.jsx)(a5,{status:j,rarity:k})]}),(0,b.jsx)(a4,{p:a,route:n,tierColors:g,compact:!0}),(0,b.jsx)("span",{style:{...a3,fontSize:10,color:"#666"},children:a_(l)})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[(0,b.jsx)("span",{style:{...a3,fontSize:13,fontWeight:600,color:q?"#888":"#fff"},children:l.name}),(0,b.jsx)("span",{style:{flexShrink:0,fontSize:9,fontWeight:800,color:m,border:`1px solid ${m}55`,borderRadius:4,padding:"0 4px"},children:a.tier}),(0,b.jsx)(a5,{status:j,rarity:k}),q&&(0,b.jsx)("span",{style:{flexShrink:0,fontSize:10,color:"#666"},children:"out of network"})]}),(0,b.jsx)("div",{style:{...a3,fontSize:10,color:"#777",marginTop:2},children:a_(l)})]}),(0,b.jsx)(a4,{p:a,route:n,tierColors:g}),(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:m,width:`${100*Math.max(0,Math.min(1,a.score/10))}%`}})})]}),(0,b.jsxs)("div",{style:{textAlign:"right"},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:800,color:m},children:a.score.toFixed(1)}),e&&(0,b.jsx)("div",{style:{fontSize:9,color:"#666",fontWeight:700},children:a.tier})]})]})}),a8={galaxy:{component:function({connections:a,onSelect:d,tierColors:e,focusNodeRef:f,userName:g,selectedId:h=null,scanNotes:i,fullDegree1:m,fullDegree2:u}){let w=(0,c.useMemo)(()=>{let b=(0,J.reachIndex)(m||a,u||[],i||{}),c=(0,J.readyByCircle)(b),d=new Map;for(let e of a){if(1!==(e.degree||1))continue;let a=(0,J.scanBars)(e,b),f=c.get(e.id)||0;(null!=a||f)&&d.set(e.id,{bars:a,ready:f})}return d},[a,m,u,i]),x=(0,c.useRef)(null),y=(0,c.useRef)(null),z=(0,c.useRef)(null),A=(0,c.useRef)({transform:null,size:null}),B=(0,c.useRef)(null),[C,D]=(0,c.useState)(null),E=(0,c.useRef)(d);(0,c.useEffect)(()=>{E.current=d});let F=(0,c.useRef)(h);(0,c.useEffect)(()=>{let a=x.current?.parentElement;if(!a)return;let b=()=>{let b=Math.round(a.clientWidth),c=Math.round(a.clientHeight);B.current={width:b,height:c},D(a=>a&&a.width===b&&a.height===c?a:{width:b,height:c})};b();let c=new ResizeObserver(b);return c.observe(a),()=>c.disconnect()},[]),(0,c.useEffect)(()=>{F.current=h,z.current?.select(h)},[h]),(0,c.useEffect)(()=>{C&&z.current?.resize(C)},[C]);let S=null!==C;return(0,c.useEffect)(()=>{if(!S||!x.current||!a.length)return;let b=j.select(x.current);b.selectAll("*").remove();let c=B.current,{transform:d,size:h}=A.current,i=d?I(d,h,c):null,m=function(a,b,c,d,e,f,g,h,i,k,l=new Map){var m,u,w;let x=[{id:O,name:k||"You",tier:"center",degree:0,power_score:10,fx:0,fy:0},...d.map(a=>({id:a.id,name:a.name,tier:a.tier,degree:a.degree||1,source_connection_id:a.source_connection_id,unlocked_from_bridge_id:a.unlocked_from_bridge_id,power_score:parseFloat(a.power_score)||1,company:a.company,role:a.role,headline:a.headline,profile_url:a.profile_url,profile_image_url:(0,H.localPhoto)(a.profile_image_url),connected_date:a.connected_date,seniority_score:a.seniority_score,company_prestige_score:a.company_prestige_score,influence_signals:a.influence_signals,is_catalyst:a.is_catalyst,catalyst_score:a.catalyst_score,circle_power:a.circle_power,circle_s_count:a.circle_s_count,circle_a_count:a.circle_a_count}))],y=new Map(x.map(a=>[a.id,a])),z=new Set(d.filter(a=>1===(a.degree||1)).map(a=>a.id)),A=d.some(a=>(a.degree||1)>1),B=new Map;for(let a of x){if(a.id===O)continue;let b=a.unlocked_from_bridge_id;1===a.degree&&A&&null!=b&&b!==a.id&&z.has(b)?B.set(a.id,b):2===a.degree&&z.has(a.source_connection_id)&&B.set(a.id,a.source_connection_id)}let C=new Map,D=(a,b=new Set)=>{if(a.id===O)return 0;if(C.has(a.id))return C.get(a.id);let c=B.get(a.id),d=a.degree>=3?3:a.degree;return null==c||b.has(a.id)||(b.add(a.id),d=D(y.get(c),b)+1),d=Math.min(d,6),C.set(a.id,d),d},E=d.map(a=>{let b=B.get(a.id)??O;return{source:b,target:a.id,near:b!==O}}),F=a=>{switch(a){case"S":return 150;case"A":return 250;case"B":return 350;case"C":return 450;default:return 520}},J=["S","A","B","C","D"],Q=[[115,135,155,175,192],[265,300,335,370,398],[465,500,535,565,590],[660,690,720,745,765]],S=[...new Set(x.filter(a=>a.id!==O).map(a=>D(a)))].sort((a,b)=>a-b),T=A&&S.length>1,U=a=>{if(!T)return F(a.tier);let b=Math.min(S.indexOf(D(a)),Q.length-1),c=J.indexOf(a.tier);return Q[b][c<0?4:c]},V=a=>{if(a.id===O)return 18;let b=Math.max(3,Math.min(12,1.3*(a.power_score||1)));return a.degree>1?Math.max(2.5,.75*b):b},W=window.innerWidth<768,X=a.append("g"),Y=new Map;if(!W&&T){let a=X.append("g").attr("class","degree-guides").style("pointer-events","none"),b=["","1st","2nd","3rd","4th","5th","6th"];S.slice(0,Q.length).forEach((c,d)=>{let e=Q[d][2];a.append("circle").attr("r",e).attr("fill","none").attr("stroke","#8899aa").attr("stroke-opacity",.12).attr("stroke-width",1).attr("stroke-dasharray","2 4"),a.append("text").attr("x",0).attr("y",-Q[d][4]-8).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill","#8899aa").attr("fill-opacity",.55).text(b[c]||`${c}th`)})}else if(!W){let a=X.append("g").attr("class","tier-guides").style("pointer-events","none");for(let b of["S","A","B","C","D"]){let c=F(b),d=a.append("circle").attr("r",c).attr("fill","none").attr("stroke",f[b]||"#666").attr("stroke-opacity",.16).attr("stroke-width",1).attr("stroke-dasharray","2 4"),e=a.append("text").attr("x",0).attr("y",-c-4).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill",f[b]||"#666").attr("fill-opacity",.5).text(b);Y.set(b,{ring:d,label:e})}}let Z=null,$=n.default().scaleExtent([.3,4]).on("zoom",a=>{X.attr("transform",a.transform),i.current={transform:Z??a.transform,size:c},ac()});a.call($);let _=(b,d)=>{if(P()){Z=null,a.interrupt().call($.transform,b);return}Z=b,i.current={transform:b,size:c},a.transition().duration(d).call($.transform,b).on("end interrupt cancel",()=>{Z===b&&(Z=null)})},aa=b.firstChild,ab=null,ac=()=>{if(!ab)return;let c=o.default(a.node());b.style.transform=`translate(${c.applyX(ab.x)}px, ${c.applyY(ab.y)}px) scale(${c.k})`},ad=a=>{if(ab=null!=a&&a!==O?y.get(a)??null:null,b.style.display=ab?"block":"none",!ab)return;let c=V(ab)+8;aa.style.width=aa.style.height=`${2*c+2.5}px`,aa.style.margin=`${-(c+1.25)}px`,aa.style.borderColor=f[ab.tier]||"#FFD700",ac()};if(h)a.call($.transform,p.identity.translate(h.x,h.y).scale(h.k));else{let b=W&&c.width>0&&c.height>0?Math.min(c.width/1248,c.height/1248):1;a.call($.transform,p.identity.translate(c.width/2,c.height/2).scale(b))}if(g&&(g.current=a=>{let b=y.get(a);b&&(_(p.identity.translate(c.width/2-2.5*b.x,c.height/2-2.5*b.y).scale(2.5),750),ad(a))}),W){let a={};x.forEach(b=>{let c=b.tier||"D";a[c]||(a[c]=[]),a[c].push(b)}),Object.entries(a).forEach(([a,b])=>{b.forEach((c,d)=>{if(c.id===O){c.x=0,c.y=0,c.fx=c.x,c.fy=c.y;return}let e=F(a),f=d/b.length*Math.PI*2-Math.PI/2;c.x=e*Math.cos(f),c.y=e*Math.sin(f),c.fx=c.x,c.fy=c.y})})}let ae=q.forceSimulation(x).force("link",r.forceLink(E).id(a=>a.id).distance(a=>a.near?Math.max(40,U(a.target)-U(a.source)):U(a.target)).strength(W?0:T?.06:.1)).force("charge",s.forceManyBody().strength(W?0:a=>a.id===O?-300:-15)).force("center",W?null:function(a,b){var c,d=1;function e(){var e,f,g=c.length,h=0,i=0;for(e=0;e<g;++e)h+=(f=c[e]).x,i+=f.y;for(h=(h/g-a)*d,i=(i/g-b)*d,e=0;e<g;++e)f=c[e],f.x-=h,f.y-=i}return null==a&&(a=0),null==b&&(b=0),e.initialize=function(a){c=a},e.x=function(b){return arguments.length?(a=+b,e):a},e.y=function(a){return arguments.length?(b=+a,e):b},e.strength=function(a){return arguments.length?(d=+a,e):d},e}(0,0)).force("collision",W?null:t.forceCollide().radius(a=>V(a)+2)).force("radial",W?null:v(a=>a.id===O?0:U(a),0,0).strength(T?.45:.3));ae.on("end.guides",()=>{for(let[a,{ring:b,label:c}]of Y){let d=x.filter(b=>b.tier===a&&b.id!==O).map(a=>Math.hypot(a.x||0,a.y||0)).sort((a,b)=>a-b);if(!d.length){b.attr("opacity",0),c.attr("opacity",0);continue}let e=d[Math.floor(d.length/2)];b.attr("r",e).attr("opacity",1),c.attr("y",-e-4).attr("opacity",1)}});let af=X.append("g").selectAll("line").data(E).join("line").attr("stroke",a=>f[a.target.tier]||"#333").attr("stroke-opacity",.15).attr("stroke-width",.5),ag=x.filter(a=>a.is_catalyst&&l.get(a.id)?.bars==null);if(ag.length){let b=a.select("defs").size()?a.select("defs"):a.append("defs");if(!b.select("#catalyst-glow-nm").size()){let a=b.append("filter").attr("id","catalyst-glow-nm").attr("x","-60%").attr("y","-60%").attr("width","220%").attr("height","220%");a.append("feGaussianBlur").attr("stdDeviation","5").attr("result","blur"),a.append("feMerge").html('<feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/>')}X.append("g").selectAll("circle").data(ag).join("circle").attr("r",a=>V(a)+6).attr("fill","none").attr("stroke","#00ff88").attr("stroke-width",2).attr("stroke-dasharray","3,3").attr("filter","url(#catalyst-glow-nm)").attr("cx",a=>a.x||0).attr("cy",a=>a.y||0).attr("class","catalyst-ring")}let ah=x.filter(a=>l.has(a.id)),ai=X.append("g").attr("class","dot-rings").style("pointer-events","none").selectAll("g").data(ah).join("g").attr("transform",a=>`translate(${a.x||0},${a.y||0})`);ai.each(function(a){let{bars:b,ready:c}=l.get(a.id),d=V(a)+3.5,e=j.select(this);if(null!=b)for(let a of K(d))e.append("path").attr("d",a.d).attr("fill","none").attr("stroke-linecap","round").attr("stroke-width",1.6).attr("stroke",a.i<b?L:M);if(c>0){let a=.72*d;e.append("circle").attr("cx",a).attr("cy",a).attr("r",5.5).attr("fill","#7F77DD"),e.append("text").attr("x",a).attr("y",a+2.5).attr("text-anchor","middle").attr("font-size",7).attr("font-weight",700).attr("fill","#fff").text(c>9?"9+":c)}});let aj=X.append("g").selectAll("circle").data(x).join("circle").attr("r",V).attr("fill",a=>a.id===O?"#fff":f[a.tier]||"#666").attr("fill-opacity",a=>a.degree>=3?.55:2===a.degree?.75:1).attr("stroke",a=>a.id===O?"#FFD700":a.is_catalyst?"#00ff88":"none").attr("stroke-width",a=>a.id===O?3:2.5*!!a.is_catalyst).style("cursor","pointer").on("click",(a,b)=>{b.id!==O&&(ad(b.id),e(b))}),ak=j.select("body").append("div").attr("class","graph-tooltip").style("position","fixed").style("top","0px").style("left","0px").style("background","rgba(0,0,0,0.92)").style("color","#fff").style("padding","8px 12px").style("border-radius","6px").style("font-size","12px").style("pointer-events","none").style("opacity",0).style("z-index",1e3).style("border","1px solid rgba(255,255,255,0.2)").style("max-width","280px"),al=j.select("body").append("div").attr("class","graph-tooltip").style("position","fixed").style("top","0px").style("left","0px").style("pointer-events","none").style("opacity",0).style("z-index",1001).style("transition","opacity 0.15s");aj.on("mouseover",function(a,b){if(R(this,1.5*V(b)),b.profile_image_url&&b.id!==O){var c;let d,e=Math.max(48,5*V(b));al.style("opacity",1),c=f[b.tier]||"#555",al.selectAll("*").remove(),(d=(0,H.localPhoto)(b.profile_image_url))?al.append("img").attr("src",d).style("width",e+"px").style("height",e+"px").style("border-radius","50%").style("object-fit","cover").style("border",`2px solid ${c}`).style("display","block").on("error",function(){this.parentElement.style.display="none"}):al.style("opacity",0),al.style("left",a.clientX-e/2+"px").style("top",a.clientY-e-8+"px"),ak.style("opacity",1).html(`<strong>${N(b.name)}</strong>`).style("left",a.clientX-40+"px").style("top",a.clientY+12+"px").style("text-align","center").style("min-width","80px")}else ak.style("opacity",1).html(`<strong>${N(b.name)}</strong>${b.company?"<br/>"+N(b.company):""}${b.tier?"<br/>Tier: "+N(b.tier):""}`).style("left",a.clientX+12+"px").style("top",a.clientY-10+"px")}).on("mousemove",function(a,b){if(b.profile_image_url&&b.id!==O){let c=Math.max(48,5*V(b));al.style("left",a.clientX-c/2+"px").style("top",a.clientY-c-8+"px"),ak.style("left",a.clientX-40+"px").style("top",a.clientY+12+"px")}else ak.style("left",a.clientX+12+"px").style("top",a.clientY-10+"px")}).on("mouseout",function(a,b){R(this,V(b)),ak.style("opacity",0),al.style("opacity",0)}),m=aj,u=ae,w=O,m.call(G().on("start",(a,b)=>{a.active||u.alphaTarget(.3).restart(),b.fx=b.x,b.fy=b.y}).on("drag",(a,b)=>{b.fx=a.x,b.fy=a.y}).on("end",(a,b)=>{a.active||u.alphaTarget(0),b.id!==w&&(b.fx=null,b.fy=null)}));let am=X.append("g").selectAll("text").data(x.filter(a=>a.id===O||1===a.degree&&("S"===a.tier||a.is_catalyst))).join("text").text(a=>a.is_catalyst&&"S"!==a.tier?a.name+" ⚡":a.name).attr("font-size",a=>a.id===O?14:10).attr("font-weight",a=>a.id===O?700:500).attr("fill",a=>a.id===O?"#fff":a.is_catalyst?"#00ff88":f[a.tier]).attr("text-anchor","middle").attr("dy",a=>V(a)+14).style("pointer-events","none"),an=X.selectAll(".catalyst-ring");return ae.on("tick",()=>{af.attr("x1",a=>a.source.x).attr("y1",a=>a.source.y).attr("x2",a=>a.target.x).attr("y2",a=>a.target.y),aj.attr("cx",a=>a.x).attr("cy",a=>a.y),an.attr("cx",a=>a.x).attr("cy",a=>a.y),ai.attr("transform",a=>`translate(${a.x},${a.y})`),am.attr("x",a=>a.x).attr("y",a=>a.y),ac()}),{simulation:ae,resize:b=>{let d=I(Z??o.default(a.node()),c,b);c=b,_(p.identity.translate(d.x,d.y).scale(d.k),250)},select:ad}}(b,y.current,c,a,a=>E.current?.(a),e,f,i,A,g,w);return z.current=m,m.select(F.current),()=>{var a;m.simulation.stop(),b.interrupt(),z.current=null,("string"==typeof(a=".graph-tooltip")?new l.Selection([document.querySelectorAll(a)],[document.documentElement]):new l.Selection([(0,k.default)(a)],l.root)).remove()}},[a,e,S,w]),(0,b.jsxs)("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[(0,b.jsx)("style",{children:Q}),(0,b.jsx)("svg",{ref:x,width:C?.width??800,height:C?.height??600,style:{background:"#0a0a1a"}}),(0,b.jsx)("div",{ref:y,className:"galaxy-ring",style:{position:"absolute",left:0,top:0,display:"none",pointerEvents:"none",transformOrigin:"0 0"},children:(0,b.jsx)("div",{className:"galaxy-ring-pulse",style:{boxSizing:"border-box",border:"2.5px solid",borderRadius:"50%"}})}),(0,b.jsx)("div",{style:{position:"absolute",bottom:20,left:20,display:"flex",gap:12,fontSize:11,color:"#888"},children:Object.entries(e).map(([a,c])=>(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:c,display:"inline-block"}}),a]},a))})]})},modes:["network"],label:"Galaxy",icon:"🌌",desc:"Force-directed layout"},orbit:{component:U,modes:["degrees"],label:"Orbit",icon:"🪐",desc:"Tier orbits + circle dots; in Degrees, every mapped circle fanned out",allDegree2:!0},separation:{component:function({connections:a=[],degree2:d=[],fullDegree1:e=a,fullDegree2:f=d,onSelect:i,userName:j,selectedId:k,tierColors:l=aX}){let m=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),n=m?68:56,o=m?5:10,p=m?8:16,[q,r]=(0,c.useState)(""),s=(0,c.useDeferredValue)(q.trim().toLowerCase()),[t,u]=(0,c.useState)("power"),[v,w]=(0,c.useState)("all"),[x,y]=(0,c.useState)(()=>new Set),z=(0,g.default)(),[A,B]=(0,c.useState)(0),[C,D]=(0,c.useState)({w:0,h:800}),[E,F]=(0,c.useState)(null),G=(0,c.useRef)(null),H=(0,c.useCallback)(a=>{G.current=a,F(a)},[]),I=(0,c.useRef)(null),J=(0,c.useMemo)(()=>(0,W.separationPeople)(d,a),[d,a]),K=(0,c.useMemo)(()=>"ways"===t?[...J.people].sort(W.compareWaysIn):J.people,[J,t]),L=(0,c.useMemo)(()=>(0,W.routeIndex)(f),[f]),M=(0,c.useMemo)(()=>{let a=new Map;for(let b of J.people)a.set(b.key,aR(b.person,L.get(b.key)?.size||b.waysIn));return a},[J,L]),N=(0,c.useMemo)(()=>{let a=Object.fromEntries(aO.map(a=>[a.key,0]));for(let b of M.values())a[b.key]++;return a},[M]),O=(0,c.useCallback)((a,b)=>("all"===v||a.tier===v)&&(!x.size||x.has(M.get(a.key)?.key))&&(!b||a.haystack.includes(b)),[v,x,M]),P=(0,c.useMemo)(()=>s||"all"!==v||x.size?K.filter(a=>O(a,s)):K,[K,s,v,x,O]),Q=(0,c.useMemo)(()=>new Set(e.map(W.keyFor)),[e]),R=(0,c.useCallback)(a=>Q.has(a.key)?"connected":(0,h.hasRequest)(a.person,z)?"asked":null,[Q,z]),T=(0,c.useMemo)(()=>P.filter(a=>!R(a)).slice(0,o),[P,o,R]),U=(0,c.useMemo)(()=>P.reduce((a,b)=>a+ +!!R(b),0),[P,R]),V=null!=k?J.rowToKey.get(k)??null:null,X=(0,c.useRef)(i);(0,c.useEffect)(()=>{X.current=i});let Y=(0,c.useCallback)(a=>X.current?.(a.person),[]),Z=(0,c.useCallback)(a=>{a&&X.current?.(a)},[]);(0,c.useEffect)(()=>{if(!E)return;let a=new ResizeObserver(()=>{let a=Math.round(E.clientWidth),b=Math.round(E.clientHeight);D(c=>c.w===a&&c.h===b?c:{w:a,h:b})});return a.observe(E),()=>a.disconnect()},[E]);let $=Math.max(0,Math.min(980,C.w-2*p)),_=(0,c.useMemo)(()=>(0,W.summitLayout)(T,$||800,m),[T,$,m]),aa=m?58:40,ab=T.length?aa+_.height+12:0,ac=ab+28,ad=ac+P.length*n+72,ae=Math.max(0,Math.floor((A-ac)/n)-8),af=Math.min(P.length,ae+Math.ceil(C.h/n)+16),ag=(0,c.useCallback)(a=>{let b=16*Math.floor(a.currentTarget.scrollTop/16);B(a=>a===b?a:b)},[]),ah=(0,c.useCallback)(()=>{G.current&&(G.current.scrollTop=0),B(0)},[]);(0,c.useEffect)(()=>{let a=a=>{if("/"!==a.key||a.metaKey||a.ctrlKey||a.altKey)return;let b=a.target;b&&("INPUT"===b.tagName||"TEXTAREA"===b.tagName||"SELECT"===b.tagName||b.isContentEditable)||(a.preventDefault(),I.current?.focus())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);let ai=a=>{r(a),ah()},{summary:aj}=J,ak=!!s||"all"!==v||x.size>0,al=!j||/^you$/i.test(String(j).trim())?"You":(0,S.initialsFor)(j),am=P.slice(ae,af);return(0,b.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",background:"#0a0a1a",color:"#fff",overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{padding:"10px 56px 8px",flexShrink:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:800,background:"linear-gradient(135deg, #FFD700, #FF6B35)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Separation"}),(0,b.jsx)("span",{style:{fontSize:12,color:"#aaa"},children:m?`${a$(aj.people,"person","people")} \xb7 ${aZ(aj.byTier.S)} S \xb7 ${aZ(aj.multi)} with 2+ ways`:`${a$(aj.people,"person","people")} two steps away \xb7 ${aZ(aj.byTier.S)} S-tier \xb7 ${aZ(aj.multi)} reachable 2+ ways \xb7 through ${aZ(aj.bridges)} of your connections`})]}),(0,b.jsx)("div",{"aria-hidden":"true",style:{display:"flex",gap:1,height:6,borderRadius:3,overflow:"hidden",margin:"8px 0 6px",background:"rgba(255,255,255,0.04)"},children:W.TIERS.filter(a=>aj.byTier[a]>0).map(a=>(0,b.jsx)("div",{style:{flex:aj.byTier[a],background:l[a]||"#555"}},a))}),(0,b.jsx)("div",{style:{fontSize:11,color:"#777",lineHeight:1.4},children:m?"Ranks reachability, not people · lists scanned so far":"Ranked by each person’s own score (title, company, headline). It ranks reachability, not people. From the lists scanned so far."}),aj.peopleOnlyUnresolved>0&&(0,b.jsxs)("div",{style:{marginTop:8,padding:"8px 10px",borderRadius:8,fontSize:11.5,lineHeight:1.5,color:"#e8d9a0",background:"rgba(255,215,0,0.06)",border:"1px solid rgba(255,215,0,0.25)"},children:[a$(aj.peopleOnlyUnresolved,"of these people","of these people")," ","came only through ",a$(aj.onlyUnresolvedVia,"connection record","connection records")," ","that ",1===aj.onlyUnresolvedVia?"doesn’t":"don’t"," match anyone in your 1st-degree list, so who introduces you can’t be named. They’re still ranked."]})]}),(0,b.jsxs)("div",{style:{padding:"0 56px 10px",flexShrink:0,display:"flex",gap:8,flexDirection:m?"column":"row",alignItems:m?"stretch":"center",flexWrap:m?"nowrap":"wrap",borderBottom:"1px solid rgba(255,255,255,0.06)"},children:[(0,b.jsx)("input",{ref:I,type:"search",value:q,onChange:a=>ai(a.target.value),onKeyDown:a=>{if("Enter"===a.key){let a=q.trim().toLowerCase(),b=K.find(b=>O(b,a));b&&Y(b)}else"Escape"===a.key&&(q?ai(""):a.currentTarget.blur())},placeholder:"Search people, companies, or who knows them","aria-label":"Search people, companies, or who knows them",style:{flex:m?"none":"1 1 260px",minWidth:0,height:m?44:34,boxSizing:"border-box",padding:"0 12px",borderRadius:8,outline:"none",color:"#fff",fontSize:m?16:13,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.05)"}}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0,flexWrap:m?"nowrap":"wrap",overflowX:m?"auto":"visible",scrollbarWidth:"thin",flexShrink:+!m},children:[(0,b.jsx)("div",{role:"group","aria-label":"Order",style:{display:"flex",flexShrink:0,background:"rgba(255,255,255,0.06)",borderRadius:8,padding:2},children:[["power","Power"],["ways","Ways in"]].map(([a,c])=>(0,b.jsx)("button",{type:"button","aria-pressed":t===a,onClick:()=>{u(a),ah()},style:{height:m?40:30,padding:"0 12px",border:"none",borderRadius:6,cursor:"pointer",fontSize:12,fontWeight:700,whiteSpace:"nowrap",background:t===a?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:t===a?"#000":"#999"},children:c},a))}),(0,b.jsx)("span",{style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5},children:"Their tier"}),["all",...W.TIERS].map(a=>{let c=v===a,d="all"===a?"#fff":l[a]||"#888",e="all"===a?aj.people:aj.byTier[a];return(0,b.jsxs)("button",{type:"button","aria-pressed":c,onClick:()=>{w(a),ah()},style:{height:m?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${c?d:"rgba(255,255,255,0.1)"}`,background:c?`${"#fff"===d?"#ffffff":d}22`:"rgba(255,255,255,0.03)",color:c?d:"#999"},children:["all"===a?"All":a,(0,b.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:c?d:"#666",opacity:.85},children:aZ(e)})]},a)}),(0,b.jsx)("span",{title:a6,style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5,marginLeft:6,cursor:"help"},children:"Rarity"}),aO.map(a=>{let c=x.has(a.key);return(0,b.jsxs)("button",{type:"button","aria-pressed":c,onClick:()=>{var b;return b=a.key,void(y(a=>aT(a,b)),ah())},title:`${a.label}: ${a.range} mutual connection${"1"===a.range?"":"s"}. ${a6}`,style:{height:m?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${c?a.color:"rgba(255,255,255,0.1)"}`,background:c?`${a.color}22`:"rgba(255,255,255,0.03)",color:c?a.color:"#999"},children:[a.label,(0,b.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:c?a.color:"#666",opacity:.85},children:aZ(N[a.key])})]},a.key)})]})]}),(0,b.jsx)("div",{ref:H,onScroll:ag,style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",position:"relative",padding:`0 ${p}px`},children:(0,b.jsxs)("div",{style:{position:"relative",maxWidth:980,margin:"0 auto",height:ad},children:[T.length>0&&(0,b.jsxs)("div",{style:{height:ab,boxSizing:"border-box",paddingTop:10},children:[(0,b.jsxs)("div",{style:{height:aa-10,overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:700,color:"#ddd",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:["Top ",aZ(T.length)," you haven’t asked, of ",aZ(P.length),ak?" shown":""," · every way in drawn"]}),(0,b.jsxs)("div",{style:{fontSize:10,color:"#777",marginTop:2,whiteSpace:m?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.35},children:[U>0&&(0,b.jsxs)("span",{style:{color:"#FFD700"},children:[aZ(U)," asked or connected, so it moved on · "]}),(0,b.jsx)("span",{style:{color:aW},children:"solid orange"})," = top-scored bridge · dashed = other routes · dot size = ways in"]})]}),$>0&&(0,b.jsx)(a2,{layout:_,selectedKey:V,tierColors:l,youLabel:al,isMobile:m,onPick:Y,onPickBridge:Z})]}),P.length>0&&(0,b.jsxs)("div",{style:{height:28,display:"grid",alignItems:"center",gap:10,padding:"0 12px 0 15px",gridTemplateColumns:m?"44px 36px 1fr 44px":"64px 36px minmax(0,1.4fr) minmax(0,1fr) 96px 44px",fontSize:9,fontWeight:700,color:"#555",textTransform:"uppercase",letterSpacing:.5,borderBottom:"1px solid rgba(255,255,255,0.08)",boxSizing:"border-box"},children:[(0,b.jsx)("span",{title:"Rank by score, then ways in. = means tied",children:"#"}),(0,b.jsx)("span",{}),m?(0,b.jsx)("span",{children:"Person · way in"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"Person"}),(0,b.jsx)("span",{children:"Way in"}),(0,b.jsx)("span",{children:"Power"})]}),(0,b.jsx)("span",{style:{textAlign:"right"},children:m?"Score":""})]}),am.map((a,c)=>(0,b.jsx)(a7,{p:a,top:ac+(ae+c)*n,height:n,isMobile:m,selected:a.key===V,tierColors:l,onPick:Y,q:s,status:R(a),rarity:M.get(a.key)},a.key)),0===P.length&&(0,b.jsxs)("div",{style:{position:"absolute",top:40,left:0,right:0,textAlign:"center",color:"#888",fontSize:13,padding:"0 16px"},children:[s?(0,b.jsxs)(b.Fragment,{children:["No one matches ‘",q.trim(),"’. Search covers names, headlines, companies and who knows them."]}):(0,b.jsx)(b.Fragment,{children:"No one here with those filters."}),(0,b.jsx)("div",{style:{marginTop:12},children:(0,b.jsx)("button",{type:"button",onClick:()=>{r(""),w("all"),y(new Set),ah()},style:{padding:"8px 16px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,255,255,0.15)",background:"rgba(255,255,255,0.06)",color:"#fff"},children:"Clear"})})]})]})})]})},modes:["degrees"],label:"Separation",icon:"🏆",desc:"Every 2nd degree, ranked · every way in"},chain:{component:function({connections:a,degree2:d=[],onSelect:f,userName:h,fullDegree1:i,fullDegree2:j,scanNotes:k,canScan:l=!0,chainOpen:m=null,onChainOpened:n}){let o=(0,c.useRef)(null),[p,q]=(0,c.useState)(null),[r,s]=(0,c.useState)(1.3),[t,u]=(0,c.useState)({w:800,h:600}),v=i||a,w=j||d,[x,y]=(0,c.useState)(()=>(function(a,b){if(!a)return[];let c=b.find(b=>b.id===a);if(!c)return[];let d=c.unlocked_from_bridge_id;return null!=d&&b.some(a=>a.id===d)?[d,a]:[a]})(m,v));(0,c.useEffect)(()=>{m&&n?.()},[m,n]);let z=(0,c.useSyncExternalStore)(l?e.watchScanner:at,ar,as),A=(0,c.useSyncExternalStore)(au,av,aw),B=(0,g.default)();(0,c.useEffect)(()=>{let a=o.current;if(!a)return;let b=()=>{let b=Math.round(a.clientWidth),c=Math.round(a.clientHeight);u(a=>a.w===b&&a.h===c?a:{w:b,h:c})},c=new ResizeObserver(b);return c.observe(a),b(),()=>c.disconnect()},[]);let C=(0,c.useMemo)(()=>Y(v,w),[v,w]),D=(0,c.useMemo)(()=>(0,J.reachIndex)(v,w,k),[v,w,k]),E=(0,c.useMemo)(()=>(0,J.readyByCircle)(D),[D]),F=(0,c.useMemo)(()=>(function(a=[],b=[]){let c=ah(a,b),d=0,e=0;for(let a of c.values())d+=a.reach,e+=a.only;return d?1-e/d:0})(j||d,i||a),[j,d,i,a]),G=(0,c.useMemo)(()=>{let a=new Map;for(let b of w)a.set(b.id,b);for(let b of v)a.set(b.id,b);return a},[v,w]),I=[];for(let a of x){let b=G.get(a);if(!b)break;I.push(b)}let N=I.length>0;(0,c.useEffect)(()=>{if(!N)return;let a=a=>{"Escape"!==a.key||/^(INPUT|TEXTAREA|SELECT)$/.test(a.target?.tagName||"")||document.querySelector('[role="dialog"][aria-modal="true"]')||y(a=>a.slice(0,-1))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[N]);let O={};d.forEach(a=>{a.source_connection_id&&(O[a.source_connection_id]||(O[a.source_connection_id]=[]),O[a.source_connection_id].push(a))});let P=a.filter(a=>O[a.id]&&O[a.id].length>0).sort((a,b)=>(O[b.id]?.length||0)-(O[a.id]?.length||0)),Q=t.w/2,R=t.h/2,S=Math.min(Q,R)-30,T=ae(P.length,{inner:.55*S,innerMin:.4*S,outer:.62*S,spacing:46,minSpacing:20}),U=P.map((a,b)=>{let c=T.points[b];return{...a,x:Q+c.x,y:R+c.y,angle:c.angle,clusterSize:(O[a.id]||[]).length}}),V=(0,c.useRef)([]);(0,c.useEffect)(()=>{V.current=U.map(a=>({id:a.id,angle:a.angle}))});let W=(0,c.useRef)(0);if((0,c.useEffect)(()=>{let a=o.current;if(!a||N)return;let b=(b,c)=>{let d=a.getBoundingClientRect(),e=b-d.left,f=Math.atan2(c-d.top-t.h/2,e-t.w/2),g=null,h=1/0;return V.current.forEach(a=>{let b=Math.abs(f-a.angle)%(2*Math.PI);b>Math.PI&&(b=2*Math.PI-b),b<h&&(h=b,g=a.id)}),g},c=a=>{if(a.touches[0]){let c=b(a.touches[0].clientX,a.touches[0].clientY);c&&q(c)}},d=a=>{a.preventDefault();let c=Date.now();if(!(c-W.current<16)&&(W.current=c,a.touches[0])){let c=b(a.touches[0].clientX,a.touches[0].clientY);c&&q(c)}};return a.addEventListener("touchstart",c,{passive:!1}),a.addEventListener("touchmove",d,{passive:!1}),()=>{a.removeEventListener("touchstart",c),a.removeEventListener("touchmove",d)}},[t,r,N]),N)return(0,b.jsx)("div",{ref:o,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:(0,b.jsx)(aC,{trail:I,index:C,reach:D,dims:t,requests:B,scanningId:z,still:A,canScan:l,onOpen:a=>y(I.map(a=>a.id).concat(a)),onBack:a=>y(I.slice(0,a).map(a=>a.id)),onSelect:f},I.map(a=>a.id).join(">"))});let X=d.length,Z=d.filter(a=>"S"===a.tier).length,$=d.filter(a=>"A"===a.tier).length,_=p?U.find(a=>a.id===p):null;return(0,b.jsxs)("div",{ref:o,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:[(0,b.jsx)("svg",{width:t.w,height:t.h,children:(0,b.jsxs)("g",{transform:`translate(${Q*(1-r)}, ${R*(1-r)}) scale(${r})`,children:[(0,b.jsx)("circle",{cx:Q,cy:R,r:.55*S,fill:"none",stroke:`${aj[1]}10`,strokeWidth:1}),_&&(0,b.jsx)(ay,{bridge:_,members:ax(_,C),reach:D,cx:Q,cy:R,maxR:S,still:A,band:function(a,b=[],c=34){let d=Math.max(0,...b.map(a=>a.radius)),e=Math.max(.66*a,d?d+c:0);return{inner:e,outer:Math.max(.8*a,e+.14*a)}}(S,T.rings)}),U.map(a=>{let c,d=p===a.id,e=(O[a.id]||[]).filter(a=>"S"===a.tier).length,f=(O[a.id]||[]).filter(a=>"A"===a.tier).length,g=E.get(a.id)||0;return(0,b.jsxs)("g",{onClick:()=>{q(null),y([a.id])},onMouseEnter:()=>q(a.id),onMouseLeave:()=>q(null),style:{cursor:"pointer"},children:[(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?20:16,fill:`${ai[a.tier]}08`,stroke:`${ai[a.tier]}${d?"60":"25"}`,strokeWidth:1}),null==(c=(0,J.scanBars)(a,D))?null:(0,b.jsxs)("g",{transform:`translate(${a.x} ${a.y})`,pointerEvents:"none",children:[K((d?20:16)+3.5).map(a=>(0,b.jsx)("path",{d:a.d,fill:"none",strokeLinecap:"round",strokeWidth:1.6,stroke:a.i<c?L:M},a.i)),(0,b.jsx)("title",{children:5===c?"Their whole list is scanned":`About ${20*c}% of their list is scanned`})]}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?13:11,fill:(0,H.localPhoto)(a.profile_image_url)?"#1a1a2e":ai[a.tier],stroke:d?"#fff":ai[a.tier],strokeWidth:d?2.5:2}),(0,H.localPhoto)(a.profile_image_url)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("clipPath",{id:"bc-"+a.id,children:(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?11:9})}),(0,b.jsx)("image",{href:(0,H.localPhoto)(a.profile_image_url),x:a.x-(d?11:9),y:a.y-(d?11:9),width:d?22:18,height:d?22:18,clipPath:`url(#bc-${a.id})`})]}),!(0,H.localPhoto)(a.profile_image_url)&&(0,b.jsx)("text",{x:a.x,y:a.y+4,textAnchor:"middle",fill:"S"===a.tier?"#000":"#fff",fontSize:11,fontWeight:700,children:a.name?.charAt(0)}),g>0&&(0,b.jsxs)("g",{children:[(0,b.jsx)("title",{children:`${g} you reached through ${ao(a)}’s circle ${1===g?"is":"are"} ready for a scan`}),(0,b.jsx)("rect",{x:a.x+7,y:a.y-21,width:g>9?40:34,height:11,rx:5.5,fill:"rgba(0,255,136,0.16)",stroke:al,strokeWidth:.6}),(0,b.jsxs)("text",{x:a.x+7+(g>9?20:17),y:a.y-13,textAnchor:"middle",fill:al,fontSize:7,fontWeight:800,children:[g," ready"]})]}),(0,b.jsx)("text",{x:a.x,y:a.y+(d?24:22),textAnchor:"middle",fill:"#fff",fontSize:9,fontWeight:600,children:a.name?.split(" ")[0]}),(0,b.jsxs)("text",{x:a.x,y:a.y+(d?34:32),textAnchor:"middle",fill:"#888",fontSize:7,children:[a.clusterSize," · ",e>0?e+"S ":"",f>0?f+"A":""]})]},"b-"+a.id)}),(0,b.jsx)("circle",{cx:Q,cy:R,r:22,fill:"#0a0a1a",stroke:"#FFD700",strokeWidth:3}),(0,b.jsx)("text",{x:Q,y:R+4,textAnchor:"middle",fill:"#FFD700",fontSize:11,fontWeight:800,children:h?.split(" ")[0]||"YOU"})]})}),(0,b.jsx)(aB,{onIn:()=>s(a=>Math.min(3,a+.3)),onReset:()=>s(1.3),onOut:()=>s(a=>Math.max(.4,a-.3))}),(0,b.jsxs)("div",{style:{position:"absolute",bottom:16,left:12,background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"10px 14px",backdropFilter:"blur(12px)",border:"1px solid rgba(255,255,255,0.06)",maxWidth:"calc(100vw - 80px)"},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1.5,marginBottom:8},children:"DEGREES OF SEPARATION"}),(0,b.jsx)("div",{style:{display:"flex",gap:8},children:[1,2,3,4,5,6].map(c=>(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsxs)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:11,fontWeight:800,display:"flex",alignItems:"center",justifyContent:"center",background:c<=2?aj[c]:"rgba(255,255,255,0.04)",color:c<=2?"#000":"#333",border:c<=2?"none":"1px solid rgba(255,255,255,0.08)",boxShadow:c<=2?`0 0 6px ${aj[c]}30`:"none"},children:["D",c]}),(0,b.jsx)("div",{style:{fontSize:7,color:c<=2?"#aaa":"#333",marginTop:3},children:1===c?a.length:2===c?X:"—"})]},c))}),(0,b.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:8},children:[P.length," bridges · ",Z," S + ",$," A at 2nd degree"]}),F>0&&(0,b.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:4},title:"The share of everyone you reach through a circle that more than one of your connections reaches",children:[Math.round(100*F),"% of your 2nd degree you reach two or more ways"]}),(0,b.jsx)("div",{style:{fontSize:8,color:"#444",marginTop:4},children:"Click a bridge to open their circle, then anyone in it to open theirs"})]})]})},modes:["degrees"],label:"Bridge Chains",icon:"🔗",desc:"Degree paths"},rings:{component:function({connections:a,degree2:d=[],onSelect:e,mode:f}){let[g,h]=(0,c.useState)(null);if("degrees"===f&&d.length>0){let c={};d.forEach(a=>{a.source_connection_id&&(c[a.source_connection_id]||(c[a.source_connection_id]=[]),c[a.source_connection_id].push(a))});let f=Object.entries(c).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length,value:3*e+2*f+c.length}}).filter(Boolean).sort((a,b)=>b.value-a.value),i={S:36,A:28,B:22,C:16,D:12};return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:f.map((a,c)=>{let d={};return aN.forEach(a=>{d[a]=[]}),a.members.forEach(a=>{(d[a.tier]||d.D).push(a)}),aN.forEach(a=>{d[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}),(0,b.jsxs)("div",{style:{marginBottom:30},children:[(0,b.jsx)("div",{style:{textAlign:"center",marginBottom:12},children:(0,b.jsxs)("div",{onClick:()=>e&&e(a.bridge),onMouseEnter:()=>h(a.bridge.id),onMouseLeave:()=>h(null),style:{display:"inline-block",cursor:"pointer",position:"relative"},children:[(0,b.jsx)("div",{style:{width:56,height:56,borderRadius:"50%",margin:"0 auto",border:`3px solid ${aM[a.bridge.tier]}`,overflow:"hidden",background:"#1a1a2e",boxShadow:g===a.bridge.id?`0 0 20px ${aM[a.bridge.tier]}60`:`0 0 10px ${aM[a.bridge.tier]}20`,transition:"box-shadow 0.2s"},children:(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,b.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:aM[a.bridge.tier],color:"S"===a.bridge.tier?"#000":"#fff",fontSize:20,fontWeight:800},children:a.bridge.name?.charAt(0)})}),(0,b.jsx)("div",{style:{fontSize:12,fontWeight:700,color:"#fff",marginTop:4},children:a.bridge.name}),(0,b.jsxs)("div",{style:{fontSize:9,color:aM[a.bridge.tier],fontWeight:600},children:[a.bridge.tier,"-Tier · ",a.total," connections · ",a.sCount>0?a.sCount+"S ":"",a.aCount>0?a.aCount+"A":""]})]})}),aN.map(a=>{let c=d[a];if(0===c.length)return null;let f=i[a],j="S"===a?10:"A"===a?6:4;return(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:j},children:c.map(c=>{let d=g===c.id;return(0,b.jsxs)("div",{onClick:()=>e&&e(c),onMouseEnter:()=>h(c.id),onMouseLeave:()=>h(null),style:{position:"relative",cursor:"pointer"},children:[(0,b.jsx)("div",{style:{width:f,height:f,borderRadius:"50%",border:`2px solid ${aM[a]}`,overflow:"hidden",background:(0,H.localPhoto)(c.profile_image_url)?"#111":aM[a],transition:"transform 0.15s, box-shadow 0.15s",transform:d?"scale(1.3)":"scale(1)",boxShadow:d?`0 0 12px ${aM[a]}60`:"none"},children:(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:b=>{b.target.style.display="none",b.target.parentElement.style.background=aM[a]}}):(0,b.jsx)("span",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",fontSize:.4*f,fontWeight:700,color:"S"===a?"#000":"#fff"},children:c.name?.charAt(0)})}),("S"===a||d)&&(0,b.jsx)("div",{style:{position:"absolute",top:f+2,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:(0,b.jsxs)("div",{style:{fontSize:d?10:8,fontWeight:600,color:d?"#fff":"#aaa",background:d?"rgba(0,0,0,0.85)":"transparent",padding:d?"3px 8px":0,borderRadius:4},children:[c.name?.split(" ")[0],d&&(0,b.jsx)("span",{style:{color:aM[a],marginLeft:4},children:parseFloat(c.power_score||0).toFixed(1)})]})})]},c.id)})}),(0,b.jsx)("div",{style:{height:1,margin:"6px auto 0",width:`${40+10*aN.indexOf(a)}%`,background:`linear-gradient(90deg, transparent, ${aM[a]}20, transparent)`}})]},a)})]},a.bridge.id)})})})}let i={};aN.forEach(a=>{i[a]=[]}),a.forEach(a=>{let b=a.tier||"D";i[b]&&i[b].push(a)}),aN.forEach(a=>{i[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))});let j={S:44,A:34,B:26,C:20,D:16};return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:aN.map((a,c)=>{let d=i[a];if(0===d.length)return null;let f=j[a],k="S"===a?12:"A"===a?8:"B"===a?6:4;return(0,b.jsxs)("div",{style:{marginBottom:"S"===a?20:"A"===a?16:10},children:[(0,b.jsxs)("div",{style:{textAlign:"center",marginBottom:8,fontSize:"S"===a?14:11,fontWeight:700,color:aM[a],opacity:"S"===a?1:.7},children:["S"===a&&"👑 ",a,"-Tier (",d.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:k,padding:"0 20px"},children:d.map(c=>{let d=g===c.id;return(0,b.jsxs)("div",{onClick:()=>e&&e(c),onMouseEnter:()=>h(c.id),onMouseLeave:()=>h(null),style:{position:"relative",cursor:"pointer"},children:[(0,b.jsx)("div",{style:{width:f,height:f,borderRadius:"50%",border:`2px solid ${aM[a]}`,overflow:"hidden",background:(0,H.localPhoto)(c.profile_image_url)?"#111":aM[a],display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.15s, box-shadow 0.15s",transform:d?"scale(1.3)":"scale(1)",boxShadow:d?`0 0 16px ${aM[a]}60`:"none",zIndex:d?10:1,position:"relative"},children:(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:b=>{b.target.style.display="none",b.target.parentElement.style.background=aM[a]}}):(0,b.jsx)("span",{style:{fontSize:.4*f,fontWeight:700,color:"S"===a?"#000":"#fff"},children:c.name?.charAt(0)})}),("S"===a||d)&&(0,b.jsxs)("div",{style:{position:"absolute",top:f+4,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:[(0,b.jsxs)("div",{style:{fontSize:"S"===a?9:10,fontWeight:600,color:d?"#fff":"#aaa",background:d?"rgba(0,0,0,0.85)":"transparent",padding:d?"3px 8px":0,borderRadius:4},children:[c.name?.split(" ")[0],d&&(0,b.jsx)("span",{style:{color:aM[a],marginLeft:4,fontWeight:800},children:parseFloat(c.power_score||0).toFixed(1)})]}),d&&c.headline&&(0,b.jsx)("div",{style:{fontSize:8,color:"#888",marginTop:2,background:"rgba(0,0,0,0.85)",padding:"2px 6px",borderRadius:3,maxWidth:160,overflow:"hidden",textOverflow:"ellipsis"},children:c.headline.substring(0,40)})]})]},c.id)})}),c<aN.length-1&&(0,b.jsx)("div",{style:{height:1,margin:"12px auto 0",width:`${50+12*c}%`,background:`linear-gradient(90deg, transparent, ${aM[a]}30, transparent)`}})]},a)})})})},modes:["network","degrees"],label:"Pyramid",icon:"🔺",desc:"Tier hierarchy"},list:{component:function({connections:a,degree2:c=[],onSelect:d,mode:e}){if("degrees"===e){let e={};c.forEach(a=>{a.source_connection_id&&(e[a.source_connection_id]||(e[a.source_connection_id]=[]),e[a.source_connection_id].push(a))});let f=Object.entries(e).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length,g=3*e+2*f+c.length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length,value:g}}).filter(Boolean).sort((a,b)=>b.value-a.value);return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,b.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"40px 1fr 50px 50px 50px 80px",gap:8,padding:"8px 12px",fontSize:9,fontWeight:700,color:"#555",borderBottom:"1px solid rgba(255,255,255,0.1)",textTransform:"uppercase",letterSpacing:.5},children:[(0,b.jsx)("span",{children:"#"}),(0,b.jsx)("span",{children:"Bridge"}),(0,b.jsx)("span",{children:"S"}),(0,b.jsx)("span",{children:"A"}),(0,b.jsx)("span",{children:"Total"}),(0,b.jsx)("span",{children:"Value"})]}),f.map((a,c)=>(0,b.jsxs)("div",{onClick:()=>d&&d(a.bridge),style:{display:"grid",gridTemplateColumns:"40px 1fr 50px 50px 50px 80px",gap:8,padding:"10px 12px",alignItems:"center",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)",transition:"background 0.1s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#444"},children:c+1}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${aL[a.bridge.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:aL[a.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.name}),(0,b.jsxs)("div",{style:{fontSize:9,color:aL[a.bridge.tier],fontWeight:600},children:[a.bridge.tier,"-Tier"]})]})]}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:800,color:"#FFD700"},children:a.sCount}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:700,color:"#9B59B6"},children:a.aCount}),(0,b.jsx)("span",{style:{fontSize:12,color:"#888"},children:a.total}),(0,b.jsx)("div",{children:(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:`linear-gradient(90deg, ${aL[a.bridge.tier]}, #FF6B35)`,width:`${Math.min(100,a.value/Math.max(f[0]?.value||1,1)*100)}%`}})})})]},a.bridge.id))]})})}let f=[...a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)),g=parseFloat(f[0]?.power_score)||10;return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,b.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"40px 36px 1fr 60px 120px",gap:8,padding:"8px 12px",fontSize:9,fontWeight:700,color:"#555",borderBottom:"1px solid rgba(255,255,255,0.1)",textTransform:"uppercase",letterSpacing:.5},children:[(0,b.jsx)("span",{children:"#"}),(0,b.jsx)("span",{}),(0,b.jsx)("span",{children:"Name"}),(0,b.jsx)("span",{children:"Score"}),(0,b.jsx)("span",{children:"Power"})]}),f.map((a,c)=>(0,b.jsxs)("div",{onClick:()=>d&&d(a),style:{display:"grid",gridTemplateColumns:"40px 36px 1fr 60px 120px",gap:8,padding:"8px 12px",alignItems:"center",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)",background:c<3?`${aL[a.tier]}08`:"transparent",transition:"background 0.1s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:b=>b.currentTarget.style.background=c<3?`${aL[a.tier]}08`:"transparent",children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700,color:c<3?aL[a.tier]:"#444"},children:c+1}),(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aL[a.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:10,fontWeight:700,background:aL[a.tier],color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:800,color:aL[a.tier]},children:parseFloat(a.power_score||0).toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:a.tier})]}),(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:aL[a.tier],width:`${parseFloat(a.power_score||0)/g*100}%`}})})]},a.id))]})})},modes:["network","degrees"],label:"List",icon:"☰",desc:"Ranked power list"},grid:{component:function({connections:a,degree2:c=[],onSelect:d,mode:e}){if("degrees"===e){let e={};c.forEach(a=>{a.source_connection_id&&(e[a.source_connection_id]||(e[a.source_connection_id]=[]),e[a.source_connection_id].push(a))});let f=Object.entries(e).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length}}).filter(Boolean).sort((a,b)=>3*b.sCount+2*b.aCount+b.total-(3*a.sCount+2*a.aCount+a.total));return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:12,maxWidth:1200,margin:"0 auto"},children:f.map(a=>(0,b.jsxs)("div",{onClick:()=>d&&d(a.bridge),style:{padding:16,borderRadius:12,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${aJ[a.bridge.tier]||"#333"}30`,borderLeft:`4px solid ${aJ[a.bridge.tier]||"#555"}`,transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aJ[a.bridge.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:40,height:40,borderRadius:"50%",fontSize:16,fontWeight:700,background:aJ[a.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:a.bridge.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.headline?.substring(0,40)})]}),(0,b.jsx)("span",{style:{fontSize:12,fontWeight:800,color:aJ[a.bridge.tier]},children:a.bridge.tier})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,fontSize:10},children:[a.sCount>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[a.sCount,"S"]}),a.aCount>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[a.aCount,"A"]}),(0,b.jsxs)("span",{style:{color:"#666"},children:[a.total," total"]})]}),(0,b.jsxs)("div",{style:{display:"flex",marginTop:8},children:[a.members.slice(0,8).map((a,c)=>(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:8,fontWeight:700,background:(0,H.localPhoto)(a.profile_image_url)?"transparent":aJ[a.tier]||"#333",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #0a0a1a",marginLeft:c>0?-6:0,position:"relative",zIndex:8-c,overflow:"hidden"},children:(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):a.name?.charAt(0)},a.id)),a.total>8&&(0,b.jsxs)("span",{style:{fontSize:9,color:"#555",marginLeft:4,alignSelf:"center"},children:["+",a.total-8]})]})]},a.bridge.id))})})}let f={};return aK.forEach(a=>{f[a]=[]}),a.forEach(a=>{let b=a.tier||"D";f[b]&&f[b].push(a)}),aK.forEach(a=>{f[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}),(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:aK.map(a=>{let c=f[a];return 0===c.length?null:(0,b.jsxs)("div",{style:{marginBottom:24},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0 10px",borderBottom:`2px solid ${aJ[a]}30`,marginBottom:10},children:[(0,b.jsx)("div",{style:{width:10,height:10,borderRadius:"50%",background:aJ[a]}}),(0,b.jsxs)("span",{style:{fontSize:15,fontWeight:800,color:aJ[a]},children:[a,"-Tier"]}),(0,b.jsx)("span",{style:{fontSize:12,color:"#555"},children:c.length})]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))",gap:8},children:c.map(c=>(0,b.jsxs)("div",{onClick:()=>d&&d(c),style:{padding:10,borderRadius:8,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${aJ[a]}20`,transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aJ[a]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",fontSize:12,fontWeight:700,background:aJ[a],color:"S"===a?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:c.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.headline?.substring(0,30)})]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:6,alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,color:aJ[a]},children:parseFloat(c.power_score||0).toFixed(1)}),(0,b.jsx)("div",{style:{flex:1,marginLeft:8,height:3,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:2,background:aJ[a],width:`${Math.min(100,10*(parseFloat(c.power_score)||0))}%`}})})]})]},c.id))})]},a)})})})},modes:["network","degrees"],label:"Grid",icon:"▦",desc:"Cards"}},a9=["galaxy","chain","separation","orbit","rings","list"];function ba(a){return a9.filter(b=>a8[b]?.modes.includes(a)).map(a=>({key:a,...a8[a]}))}var bb=a.i(35112),bc=a.i(30889);let bd=/\/10, (your|sample) score\)/,be=/^(?:Former )?(?:Student · )?(.+?) \([\d.]+\) · (no company found|.+?) \(\d+(?:\.\d+)?\/10(?:[:,][^)]*)?\)/,bf={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},bg=["S","A","B","C","D"],bh="#00ff88";function bi({person:a,connections:d=[],degree2:e=[],tierColors:f=bf,onSelect:g,isRequested:h=X,canScan:i=!0}){let j=(0,c.useMemo)(()=>Y(d,e),[d,e]),k=(0,c.useMemo)(()=>(0,W.routeIndex)(e),[e]),{rings:l,totals:m}=(0,c.useMemo)(()=>(function(a,b,{maxDegree:c=6,isRequested:d=X}={}){let e=[],f={people:0,connected:0,requested:0};if(!a||!b)return{rings:e,totals:f};let g=new Set([(0,W.keyFor)(a)]),h=[a];for(let a=2;a<=c&&h.length;a++){let c=[],i=[];for(let a of h){let e=[];for(let c of b.introduced.get(a.id)||[]){let b=(0,W.keyFor)(c);g.has(b)||(g.add(b),e.push({row:c,key:b,parentId:a.id,state:"connected"}),i.push(c))}for(let c of b.circles.get(a.id)||[]){let b=(0,W.keyFor)(c);g.has(b)||(g.add(b),e.push({row:c,key:b,parentId:a.id,state:d(c)?"requested":null}))}e.sort($),c.push(...e)}if(!c.length)break;for(let a of c)f.people++,"connected"===a.state?f.connected++:"requested"===a.state&&f.requested++;e.push({degree:a,people:c}),h=i}return{rings:e,totals:f}})(a,j,{isRequested:h}),[a,j,h]),[n,o]=(0,c.useState)(()=>new Set),[p,q]=(0,c.useState)(()=>new Set),[r,s]=(0,c.useState)(!1),t=(0,c.useMemo)(()=>l.flatMap(a=>a.people.map(a=>{let b="connected"===a.state||1===a.row.degree?null:aR(a.row,k.get((0,W.keyFor)(a.row))?.size||1);return{key:a.key,tier:a.row.tier,rarity:b?.key??null,mutuals:b}})),[l,k]),u=(0,c.useMemo)(()=>new Map(t.map(a=>[a.key,a])),[t]),v=(0,c.useMemo)(()=>({tiers:n,rarities:p}),[n,p]),w=(0,c.useMemo)(()=>t.filter(a=>aS(a,v)).length,[t,v]),x=(0,c.useMemo)(()=>d.filter(a=>j.circles.has(a.id)).length,[d,j]),y=t.some(a=>a.mutuals?.from==="linkedin"),z=(0,c.useMemo)(()=>(function(a){let b,c,d,e;if(!a)return null;if(null==a.power_score||""===a.power_score||!a.tier)return{title:!1,company:!1,never:!0,companyName:null,reason:"They haven’t been scored yet."};let f=String(a.score_why||"").match(be);if(f)b=f[1],d=!(c="no company found"===f[2]?null:f[2])||!bd.test(a.score_why)&&!["known","data"].includes((0,bc.companyScore)(c).source);else{let e=(0,bc.scorePerson)(a);b=e.title.label,c=e.company||null,d=["none","default","network"].includes(e.companySource)}let g=b.startsWith("Audience of"),h="Title unclear"===b||b.includes("Works there");return(g&&(d=!1),h||d)?(e=h&&d?c?`Their headline doesn’t say their title, and the app doesn’t know ${c}.`:"Their headline names no title or company the app can read.":h?"Their headline doesn’t say their title.":c?`The app doesn’t know ${c}, so it counts as the middle of the scale.`:"The app couldn’t find where they work.",{title:h,company:d,never:!1,companyName:c,reason:e}):null})(a),[a]);if(!a)return null;if(!l.length){let c=a.name?.split(" ")[0]||"them";return(0,b.jsxs)("div",{style:z?{...bq,borderColor:"rgba(255,215,0,0.28)"}:bq,children:[(0,b.jsx)(bp,{children:"Their circle"}),z?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#d8ccb0",lineHeight:1.5,marginBottom:9*!!i},children:[(0,b.jsx)("b",{style:{color:"#FFD700"},children:"Their score is a guess."})," ",z.reason,i&&(0,b.jsxs)(b.Fragment,{children:[" Scanning ",c,"'s circle shows who you can reach through them, and a strong circle adds up to +2 to their score."]})]}),i&&(0,b.jsx)("button",{type:"button",onClick:bo,style:{width:"100%",padding:"8px 10px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,215,0,0.4)",background:"rgba(255,215,0,0.08)",color:"#FFD700"},children:"Scan their circle ↓"})]}):i?(0,b.jsxs)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:["Not scanned yet. Scan ",c,"'s circle below to see who they know, and everyone you reach through them after that."]}):(0,b.jsx)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:"Not scanned."})]})}let A=Object.fromEntries(bg.map(a=>[a,t.filter(b=>b.tier===a).length])),B=function(a=[]){let b=Object.fromEntries(aO.map(a=>[a.key,0]));for(let c of a)c?.rarity&&void 0!==b[c.rarity]&&b[c.rarity]++;return b}(t),C=n.size>0||p.size>0,D=(0,b.jsx)(bl,{tierColors:f,byTier:A,byRarity:B,tiers:n,rarities:p,onTier:a=>o(b=>aT(b,a)),onRarity:a=>q(b=>aT(b,a)),onClear:()=>{o(new Set),q(new Set)}}),E=(0,b.jsxs)("div",{style:{fontSize:9.5,color:"#777",lineHeight:1.45,marginTop:6},children:["Rarity is how many mutual connections lead to someone. It never changes a score."," ",y?"LinkedIn’s own count where a scan saved it; otherwise the ways in from your scans.":`Counted from the ${x} ${1===x?"circle":"circles"} you’ve scanned, so it can only go up as you scan more.`]});return(0,b.jsxs)("div",{style:bq,children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8},children:[(0,b.jsx)(bp,{children:"Their circle"}),(0,b.jsx)("button",{type:"button",onClick:()=>s(!0),style:bs,"aria-label":"Open the large map",children:"Enlarge ⤢"})]}),(0,b.jsx)("button",{type:"button",onClick:()=>s(!0),"aria-label":`${a.name}'s circle: open the large map`,style:{display:"block",width:"100%",padding:0,border:"none",background:"none",cursor:"zoom-in"},children:(0,b.jsx)(bj,{person:a,rings:l,facts:u,filter:v,tierColors:f,size:240})}),(0,b.jsx)(bk,{rings:l,totals:m,shown:C?w:null}),D,E,r&&(0,b.jsxs)(bn,{onClose:()=>s(!1),title:`${a.name}’s circle`,children:[(0,b.jsx)(bj,{person:a,rings:l,facts:u,filter:v,tierColors:f,size:640,labels:!0,onPick:a=>{s(!1),g?.(a)}}),(0,b.jsx)(bk,{rings:l,totals:m,shown:C?w:null}),D,(0,b.jsx)(bm,{}),E]})]})}function bj({person:a,rings:d,facts:e,filter:f,tierColors:g,size:h,labels:i=!1,onPick:j}){let k=(0,c.useMemo)(()=>(function(a=[],b=240){let c=b/2,d=a.length,e=a=>c*(1===d?.78:.4+a/(d-1)*.52),f=a.map(a=>{let b=new Map;for(let c of a.people)b.has(c.parentId)||b.set(c.parentId,[]),b.get(c.parentId).push(c);return b}),g=(a,b)=>f[a+1]?.get(b)||[],h=new Map;for(let b=d-1;b>=0;b--)for(let c of a[b].people){let a="connected"===c.state?g(b,c.row.id).reduce((a,b)=>a+h.get(b),0):0;h.set(c,Math.max(1,a))}let i=[],j=[],k=new Map,l=-Math.PI/2;for(let m=0;m<d;m++){let n=e(m);a[m].people;let o=Math.max(2.4,b/100),p=m===d-1&&d>1,q=(p?n-e(m-1):(m+1<d?e(m+1):.97*c)-n)*.45,r=Math.max(1,Math.floor(q/o)+1),s=r>1?(p?-1:1)*Math.min(1.2*o,q/(r-1)):0,t=(a,b)=>_(Math.ceil(a*o/Math.max(1e-9,n*b)),1,r),u=1,v=1/0,w=[];for(let[a,b]of f[m]){let[d,e]=0===m?[l,l+2*Math.PI]:k.get(a)||[l,l+2*Math.PI],f=b.reduce((a,b)=>a+h.get(b),0),g=t(b.length,e-d);u=Math.max(u,g),v=Math.min(v,n*(e-d)*g/Math.max(1,b.length));let i=0,j=d;for(let a of b){let b=(e-d)*h.get(a)/f,l=j+b/2,m=n+i++%g*s,o=c+m*Math.cos(l),p=c+m*Math.sin(l);w.push({...a,angle:l,x:o,y:p}),"connected"===a.state&&k.set(a.row.id,[j,j+b]),j+=b}}if(m+1<d){let a=e(m+1);for(let b of w){if("connected"!==b.state||!g(m,b.row.id).length)continue;let[d,e]=k.get(b.row.id),f=(d+e)/2;j.push({x1:b.x,y1:b.y,x2:c+a*Math.cos(f),y2:c+a*Math.sin(f)})}}let x=_(Math.min(.32*v,u>1?.42*Math.abs(s):1/0),.8,b/60);i.push({degree:a[m].degree,radius:n,dotR:x,rows:u,items:w})}return{size:b,center:{x:c,y:c},rings:i,spokes:j}})(d,h),[d,h]),l=k.center,m=h/240;return(0,b.jsxs)("svg",{viewBox:`0 0 ${h} ${h}`,width:"100%",style:{display:"block",maxWidth:h,margin:"0 auto"},role:"img","aria-label":`${a.name}'s circle, ${d.length} ${1===d.length?"ring":"rings"}`,children:[k.rings.map(a=>(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:a.radius,fill:"none",stroke:"rgba(255,255,255,0.07)",strokeWidth:.6*m}),(0,b.jsxs)("text",{x:l.x,y:l.y-a.radius-a.dotR-3*m,textAnchor:"middle",fontSize:6.5*m,fill:"#666",fontWeight:700,children:["D",a.degree]})]},a.degree)),k.spokes.map((a,c)=>(0,b.jsx)("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,stroke:"rgba(0,255,136,0.35)",strokeWidth:.7*m},c)),k.rings.map(a=>a.items.map(c=>{let d=e.get(c.key),h=aS(d,f),k=g[c.row.tier]||"#888",l="connected"===c.state?1.7*a.dotR:a.dotR,m=[`${c.row.name} \xb7 ${c.row.tier}-tier${null!=c.row.power_score?` \xb7 ${Number(c.row.power_score).toFixed(1)}`:""}`,"connected"===c.state?"You added them":"requested"===c.state?"Request sent":null,d?.mutuals?`${aQ(d.rarity)?.label}: ${d.mutuals.count} mutual${1===d.mutuals.count?"":"s"}${"scans"===d.mutuals.from?" (from your scans)":""}`:null].filter(Boolean).join("\n");return(0,b.jsxs)("g",{opacity:h?1:.12,style:j?{cursor:"pointer"}:void 0,onClick:j?a=>{a.stopPropagation(),j(c.row)}:void 0,children:[(0,b.jsx)("title",{children:m}),"requested"===c.state?(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:1.25*l,fill:"none",stroke:k,strokeWidth:Math.max(.5,.45*l),strokeDasharray:`${Math.max(.6,.55*l)} ${Math.max(.5,.45*l)}`}):(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:l,fill:k,stroke:"connected"===c.state?bh:"none",strokeWidth:Math.max(.6,.3*l)}),i&&"connected"===c.state&&(0,b.jsx)("text",{x:c.x,y:c.y-l-3,textAnchor:"middle",fontSize:9,fill:bh,fontWeight:700,children:String(c.row.name||"").split(" ")[0]})]},c.key)})),(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:7*m,fill:g[a.tier]||"#888",stroke:"#fff",strokeWidth:.8*m}),(0,b.jsx)("text",{x:l.x,y:l.y+2.4*m,textAnchor:"middle",fontSize:6.5*m,fontWeight:800,fill:"S"===a.tier?"#000":"#fff",children:String(a.name||"?").charAt(0)})]})}function bk({rings:a,totals:c,shown:d}){return(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#aaa",marginTop:6,lineHeight:1.5},children:[a.map(a=>`D${a.degree} ${a.people.length.toLocaleString("en-US")}`).join(" · "),c.connected>0&&(0,b.jsxs)("span",{style:{color:bh},children:[" · you added ",c.connected]}),c.requested>0&&(0,b.jsxs)("span",{style:{color:"#FFD700"},children:[" · ",c.requested," ",1===c.requested?"request":"requests"," out"]}),null!=d&&(0,b.jsxs)("span",{style:{color:"#fff"},children:[" · ",d.toLocaleString("en-US")," shown"]})]})}function bl({tierColors:a,byTier:c,byRarity:d,tiers:e,rarities:f,onTier:g,onRarity:h,onClear:i}){let j=(a,b)=>({height:22,padding:"0 7px",borderRadius:11,cursor:"pointer",fontSize:10,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${a?b:"rgba(255,255,255,0.1)"}`,background:a?`${b}22`:"rgba(255,255,255,0.03)",color:a?b:"#999"});return(0,b.jsxs)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:5},children:[(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,b.jsx)("span",{style:br,children:"Tier"}),bg.map(d=>(0,b.jsxs)("button",{type:"button","aria-pressed":e.has(d),onClick:()=>g(d),style:j(e.has(d),a[d]||"#888"),children:[d," ",(0,b.jsx)("span",{style:{fontWeight:500,opacity:.8},children:c[d]})]},d))]}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,b.jsx)("span",{style:br,children:"Rarity"}),aO.map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":f.has(a.key),onClick:()=>h(a.key),title:`${a.label}: ${a.range} mutual connection${"1"===a.range?"":"s"}`,style:j(f.has(a.key),a.color),children:[a.label," ",(0,b.jsx)("span",{style:{fontWeight:500,opacity:.8},children:d[a.key]})]},a.key)),(e.size>0||f.size>0)&&(0,b.jsx)("button",{type:"button",onClick:i,style:bs,children:"Clear"})]})]})}function bm(){let a=(a,c)=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,marginRight:12,whiteSpace:"nowrap"},children:[a,c]});return(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#999",marginTop:8,lineHeight:1.8},children:[a((0,b.jsx)("svg",{width:"10",height:"10",children:(0,b.jsx)("circle",{cx:"5",cy:"5",r:"4",fill:"#FFD700"})}),"colour = tier"),a((0,b.jsx)("svg",{width:"12",height:"12",children:(0,b.jsx)("circle",{cx:"6",cy:"6",r:"4",fill:"#9B59B6",stroke:bh,strokeWidth:"1.5"})}),"you added them"),a((0,b.jsx)("svg",{width:"12",height:"12",children:(0,b.jsx)("circle",{cx:"6",cy:"6",r:"4.2",fill:"none",stroke:"#3498DB",strokeWidth:"1.4",strokeDasharray:"2 1.6"})}),"request sent")]})}function bn({title:a,onClose:d,children:e}){return(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&d()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]),(0,bb.createPortal)((0,b.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":a,onClick:d,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.78)",display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:(0,b.jsxs)("div",{onClick:a=>a.stopPropagation(),style:{width:"min(720px, 100%)",maxHeight:"100%",overflowY:"auto",boxSizing:"border-box",background:"#0f0c05",border:"1px solid rgba(255,215,0,0.18)",borderRadius:14,padding:16},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,b.jsx)("div",{style:{fontSize:14,fontWeight:800,color:"#fff"},children:a}),(0,b.jsx)("button",{type:"button",onClick:d,style:{...bs,fontSize:12},children:"Close ✕"})]}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"#888",marginBottom:8},children:"Click a dot to open that person."}),e]})}),document.body)}function bo(){let a=document.getElementById("scan-box");a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.animate?.([{boxShadow:"0 0 0 3px rgba(255,215,0,0.75)"},{boxShadow:"0 0 0 0 rgba(255,215,0,0)"}],{duration:1600}),a.querySelector("button:not([disabled])")?.focus({preventScroll:!0}))}function bp({children:a}){return(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,textTransform:"uppercase",marginBottom:6},children:a})}let bq={background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.07)",borderRadius:10,padding:10,marginBottom:16},br={fontSize:9,color:"#666",textTransform:"uppercase",letterSpacing:.5,width:38,flexShrink:0},bs={background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:0};var bt=a.i(75857);function bu({selected:a,stats:d,tierColors:e,connections:f,degree2:i=[],mode:j,collapsed:k,filter:l,pending:m=[],onToggle:n,onSelect:o,onSwitchMode:p,onFocusNode:q,onMarkSent:r,onUndoPending:s,scanNotes:t,csvSource:u=null}){let v,w,x="degrees"===j,y=!u,{userId:z,userProfile:A}=(0,bt.useUser)(),[B,C]=(0,c.useState)(""),D=(0,c.useMemo)(()=>{let a={};return i.forEach(b=>{b.source_connection_id&&(a[b.source_connection_id]||(a[b.source_connection_id]=[]),a[b.source_connection_id].push(b))}),a},[i]),E=(0,c.useMemo)(()=>(0,W.routeIndex)(i),[i]),F=(0,c.useMemo)(()=>ah(i,f),[i,f]),G=(0,c.useMemo)(()=>(function(a=[],b=[]){let c=ah(a,b),d=new Set((b||[]).map(W.keyFor)),e=new Map;for(let b of a||[]){let a=b?.source_connection_id;if(null==a)continue;let c=(0,W.keyFor)(b);if(d.has(c))continue;let f=e.get(c);f||e.set(c,f=new Set),f.add(a)}let f=new Map;for(let a of e.values()){if(a.size<2)continue;let b=[...a];for(let a=0;a<b.length;a++)for(let c=a+1;c<b.length;c++){let d=b[a]<b[c]?`${b[a]}|${b[c]}`:`${b[c]}|${b[a]}`;f.set(d,(f.get(d)||0)+1)}}let g=new Map;for(let[a,b]of f){let[d,e]=a.split("|"),f=c.get(d).total+c.get(e).total-b,h=f?b/f:0;for(let[a,c]of[[d,e],[e,d]]){let d=g.get(a);(!d||h>d.share)&&g.set(a,{with:c,share:h,shared:b})}}return g})(i,f),[i,f]),I=(0,c.useMemo)(()=>new Map(f.map(a=>[a.id,a])),[f]),J=(0,g.default)(),K=(0,c.useCallback)(a=>(0,h.hasRequest)(a,J),[J]);if(a){let c,d,g,j,l,m,q,r,s=1===a.degree&&D[a.id],t=D[a.id]||[],v=2===a.degree?(0,W.routesFor)(a,E,I):[];return(0,b.jsxs)(bv,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:()=>o&&o(null),style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Back to list"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8,letterSpacing:1,textTransform:"uppercase"},children:2===a.degree?"Degree 2 Connection":"Degree 1 Connection"}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,flexWrap:"wrap"},children:[(0,b.jsx)("div",{style:{background:2===a.degree?"#FF6B35":e[a.tier],color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:700},children:2===a.degree?`DEGREE 2 \xb7 TIER ${a.tier}`:`TIER ${a.tier}`}),a.unlocked_from_name&&(0,b.jsxs)("div",{style:{background:"rgba(52,152,219,0.08)",border:"1px solid rgba(52,152,219,0.28)",borderRadius:8,padding:"9px 11px",marginBottom:10,fontSize:11.5,color:"#8fb8d6",lineHeight:1.5},children:[1===a.degree?"You met them through ":"Reachable through ",(0,b.jsx)("b",{style:{color:"#cfe6f7"},children:a.unlocked_from_name})]}),a.is_catalyst&&(0,b.jsx)("div",{style:{background:"#00ff88",color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:800,letterSpacing:.5},children:"CATALYST"})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:a.name,style:{width:52,height:52,borderRadius:"50%",objectFit:"cover",border:`2px solid ${e[a.tier]||"#555"}`,flexShrink:0},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:52,height:52,borderRadius:"50%",flexShrink:0,background:e[a.tier]||"#555",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"S"===a.tier?"#000":"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("h2",{style:{fontSize:18,fontWeight:700,margin:0},children:a.name}),(0,b.jsx)("p",{style:{color:"#aaa",fontSize:11,margin:"3px 0 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,60)}),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{fontSize:10,color:"#0077B5",textDecoration:"none",fontWeight:600},children:"View on LinkedIn"})]})]}),1===a.degree&&(0,b.jsx)(bi,{person:a,connections:f,degree2:i,tierColors:e,onSelect:o,isRequested:K,canScan:y}),2!==a.degree&&(F.get(a.id)?.only>0||G.get(a.id)?.share>=.15&&G.get(a.id)?.shared>=3)&&(c=F.get(a.id),g=(d=G.get(a.id))&&d.share>=.15&&d.shared>=3&&f.find(a=>a.id===d.with),j=a.name?.split(" ")[0]||"them",(0,b.jsxs)("div",{style:{background:"rgba(0,255,136,0.05)",border:"1px solid rgba(0,255,136,0.2)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:700,marginBottom:4,letterSpacing:1},children:c?.only>0?`ONLY THROUGH ${j.toUpperCase()}`:`${j.toUpperCase()}’S CIRCLE`}),c?.only>0&&(0,b.jsxs)("div",{style:{fontSize:12,color:"#ccc",lineHeight:1.5},children:[(0,b.jsx)("strong",{style:{color:"#00ff88"},children:c.only.toLocaleString()})," of the ",c.total.toLocaleString()," people in ",j,"’s circle are reached by none of your other connections. ",j," is your only way to them."]}),g&&(0,b.jsxs)("div",{style:{fontSize:12,color:"#aab",lineHeight:1.5,marginTop:6*(c?.only>0)},children:["Opens the same doors as"," ",(0,b.jsx)("button",{onClick:()=>o?.(g),style:{background:"none",border:"none",padding:0,color:"#fff",fontWeight:700,cursor:"pointer",fontSize:12},children:g.name}),": ",Math.round(100*d.share),"% of the people either reaches, both do (",d.shared.toLocaleString(),")."]})]})),a.is_catalyst&&(0,b.jsxs)("div",{style:{background:"rgba(0,255,136,0.08)",border:"1px solid rgba(0,255,136,0.3)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:700,marginBottom:4,letterSpacing:1},children:"CATALYST NODE"}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#ccc"},children:["This person's network power exceeds their own tier. They connect to"," ",(0,b.jsxs)("strong",{style:{color:"#00ff88"},children:[a.catalyst_score," S+A tier"]})," ","people — making them a high-value stepping stone to reach elite connections."]})]}),2===a.degree&&v.length>0&&(0,b.jsx)(by,{routes:v,selected:a,tierColors:e,onSelect:o},a.id),(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.04)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:8},children:[(0,b.jsx)("span",{style:{fontSize:11,color:"#888",fontWeight:600,letterSpacing:1,textTransform:"uppercase"},children:"Score"}),(0,b.jsx)("span",{style:{fontSize:28,fontWeight:800,color:e[a.tier]||"#fff"},children:parseFloat(a.power_score).toFixed(1)})]}),a.score_why&&(0,b.jsx)("div",{style:{fontSize:11,color:"#aab7b7",lineHeight:1.5,marginBottom:10},children:a.score_why}),(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Title"}),(0,b.jsxs)("span",{children:[a.seniority_score||0,"/10"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${10*(a.seniority_score||0)}%`,background:e[a.tier]||"#FFD700",borderRadius:2}})})]}),(0,b.jsxs)("div",{style:{marginBottom:6*(a.circle_power>0)},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Company"}),(0,b.jsxs)("span",{children:[a.company_prestige_score||0,"/10"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${10*(a.company_prestige_score||0)}%`,background:"#3498DB",borderRadius:2}})})]}),a.circle_power>0&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Circle Power"}),(0,b.jsxs)("span",{style:{color:"#FF6B35"},children:[a.circle_s_count||0,"S · ",a.circle_a_count||0,"A"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.min(parseFloat(a.circle_power)/70*100,100)}%`,background:"#FF6B35",borderRadius:2}})})]})]}),(0,b.jsxs)("div",{style:{marginBottom:16},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FFD700",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:"Why This Matters"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11,color:"#ccc"},children:(function(a,b,c,d=[]){let e=[],f=(a.headline||"").toLowerCase(),g=(a.role||"").toLowerCase(),h=(a.company||"").toLowerCase(),i=b.sectors.map(a=>a.toLowerCase());g.match(/ceo|chief|founder|president|chairman/i)?e.push({icon:"👑",text:`${a.role} — C-suite executive, highest leverage contact`,color:"#FFD700"}):g.match(/vp|vice president|svp|evp|managing director/i)?e.push({icon:"⚡",text:`${a.role} — VP-level, strong decision-making authority`,color:"#FFD700"}):g.match(/director|head of|senior director/i)?e.push({icon:"🎯",text:`${a.role} — Senior leadership, controls team/budget`,color:"#FF6B35"}):g.match(/manager|lead|principal/i)&&e.push({icon:"📊",text:`${a.role} — Mid-senior, operational influence`,color:"#3498DB"});let{now:j,before:k}=(0,bc.topCompanies)(a);j&&e.push({icon:"🏢",text:`At ${j.name} (${j.score}/10) — top-tier company network access`,color:"#9B59B6"}),k&&e.push({icon:"📜",text:`Former ${k.name} (${k.score}/10) — carries network from previous role`,color:"#95A5A6"});let l=i.filter(a=>f.includes(a)||h.includes(a));l.length>0&&e.push({icon:"🔗",text:`Shared sector: ${l.join(", ")} — direct industry relevance to you`,color:"#2ECC71"});let m=c.filter(b=>b.source_connection_id===a.id).length;if(m>0){let b=c.filter(b=>b.source_connection_id===a.id&&"S"===b.tier).length;e.push({icon:"🌐",text:`Gateway to ${m} degree-2 connections${b>0?` (${b} S-tier)`:""}`,color:"#FF6B35"})}if(a.is_catalyst&&e.push({icon:"⚡",text:"Catalyst — network power exceeds personal tier, high stepping-stone value",color:"#00ff88"}),2===a.degree&&d.length>0){let a=d.filter(a=>a.bridge);if(1===d.length)e.push(a.length?{icon:"🤝",text:`Reachable via ${a[0].bridge.name} (${a[0].bridge.tier}-tier)`,color:"#3498DB"}:{icon:"🤝",text:"Reachable through a connection we can’t name",color:"#888"});else{let b=a.slice(0,2).map(a=>`${String(a.bridge.name||"").trim().split(/\s+/)[0]} (${a.bridge.tier})`),c=d.length-b.length,f=0===b.length?"connections we can’t name":c>0?`${b.join(", ")} and ${c} more`:b.join(" and ");e.push({icon:"🤝",text:`Reachable ${d.length} ways — via ${f}`,color:"#3498DB"})}}return 0===e.length&&e.push({icon:"📌",text:`${a.tier}-tier connection with ${parseFloat(a.power_score).toFixed(1)} power score`,color:"#888"}),e.slice(0,5)})(a,A||{name:"User",sectors:[],goals:[]},i,v).map((a,c)=>(0,b.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{color:a.color||"#888",fontSize:13,lineHeight:1},children:a.icon}),(0,b.jsx)("span",{children:a.text})]},c))})]}),a.company&&(0,b.jsxs)("div",{style:{marginBottom:8},children:[(0,b.jsx)("div",{style:{color:"#666",fontSize:10},children:"Company"}),(0,b.jsx)("div",{style:{fontWeight:600,fontSize:12},children:a.company})]}),a.role&&(0,b.jsxs)("div",{style:{marginBottom:12},children:[(0,b.jsx)("div",{style:{color:"#666",fontSize:10},children:"Role"}),(0,b.jsx)("div",{style:{fontSize:12},children:a.role})]}),s&&t.length>0&&(l=t.filter(a=>"S"===a.tier),m=t.filter(a=>"A"===a.tier),q=[...t].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)).slice(0,8),(0,b.jsxs)("div",{style:{marginBottom:16},children:[(0,b.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:["Cluster Overview — ",t.length," connections"]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,fontSize:10},children:[l.length>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[l.length," S-tier"]}),m.length>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[m.length," A-tier"]})]}),(0,b.jsxs)("a",{href:`/queue?bridge=${a.id}&groupBy=bridge`,style:{display:"block",textAlign:"center",padding:"8px 12px",marginBottom:10,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000",borderRadius:6,textDecoration:"none",fontWeight:700,fontSize:11},children:["Outlink Bridge → Add ",t.filter(a=>"S"===a.tier||"A"===a.tier||"B"===a.tier).length," People"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8},children:"Most valuable in this cluster:"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:q.map(a=>(0,b.jsxs)("div",{onClick:()=>o&&o(a),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 6px",borderRadius:4,cursor:"pointer",borderLeft:`2px solid ${e[a.tier]||"#555"}`,background:"rgba(255,255,255,0.03)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",flexShrink:0,fontSize:9,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,40)})]}),(0,b.jsx)("span",{style:{fontSize:9,color:e[a.tier],fontWeight:600,flexShrink:0},children:parseFloat(a.power_score).toFixed(1)})]},a.id))})]})),s&&t.length>0&&(0,b.jsxs)("div",{style:{marginTop:16},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["Gateway to ",t.length," degree-2 connections:"]}),t.sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)).slice(0,10).map(a=>(0,b.jsxs)("div",{style:{padding:"6px 8px",background:"rgba(255,107,53,0.08)",borderRadius:6,borderLeft:"3px solid #FF6B35",marginBottom:4,fontSize:12},children:[(0,b.jsx)("div",{style:{fontWeight:600},children:a.name}),(0,b.jsxs)("div",{style:{color:"#888",fontSize:11},children:[a.role,a.company?` @ ${a.company}`:""]}),(0,b.jsxs)("div",{style:{color:"#FF6B35",fontSize:10},children:["Score: ",parseFloat(a.power_score).toFixed(1)]})]},a.id))]}),!x&&s&&t.length>0&&p&&(0,b.jsxs)("button",{onClick:()=>{p("degrees")},style:{width:"100%",padding:"12px",borderRadius:8,border:"none",cursor:"pointer",background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000",fontWeight:700,fontSize:13,marginTop:12},children:["View Bridge → ",t.length," connections"]}),(2===a.degree||a.source_connection_id)&&1!==a.degree&&"unlocked"!==a.unlock_status&&(r=K(a),(0,b.jsxs)("div",{style:{background:"rgba(255,215,0,0.06)",border:`1px ${r?"dashed":"solid"} rgba(255,215,0,${r?.45:.25})`,borderRadius:10,padding:16,marginTop:16,textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#FFD700",fontWeight:700,letterSpacing:1,marginBottom:6},children:r?"REQUEST SENT":"LOCKED PATH"}),(0,b.jsx)("div",{style:{fontSize:13,color:"#ccc",marginBottom:12},children:r?`Waiting for ${a.name} to accept. The next scan of your own connections notices when they do.`:`Connect with ${a.name} to unlock their network and extend your six degrees.`}),(0,b.jsx)("div",{style:{width:"100%",height:60,background:"rgba(255,255,255,0.03)",borderRadius:8,border:"1px dashed rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,color:"#444",marginBottom:12},children:r?"[ Cluster Pending... ]":"[ Hidden Network ]"}),r?(0,b.jsx)("button",{onClick:()=>{(0,h.undoRequest)(a).catch(()=>{})},style:{background:"none",border:"none",color:"#888",fontSize:11,fontWeight:600,cursor:"pointer"},children:"Didn't send it? Undo"}):(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",padding:"10px 16px",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",borderRadius:8,textDecoration:"none",fontWeight:700,fontSize:13},onClick:()=>{(0,h.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{})},children:"Connect to Unlock Path"})]})),(1===a.degree||"accepted"===a.outreach_status)&&(y?(0,b.jsx)(bz,{selected:a,degree2:i},a.id):(0,b.jsx)(bA,{csvSource:u,style:{marginTop:16}})),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",textAlign:"center",padding:10,marginTop:16,background:"#0077B5",color:"#fff",borderRadius:8,textDecoration:"none",fontWeight:600,fontSize:13},children:"View LinkedIn Profile"})]})}if(x){let a,c,g,h;return(0,b.jsxs)(bv,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0,color:"#FF6B35"},children:"Degrees"}),(0,b.jsx)("p",{style:{fontSize:12,color:"#888",marginBottom:12},children:"Your bridge connections and who they unlock."}),y?(0,b.jsx)(bE,{connections:f,degree2:i,scanNotes:t,tierColors:e}):(0,b.jsx)(bA,{csvSource:u,style:{marginBottom:16}}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:12},children:[(0,b.jsx)(bw,{label:"Degree-2 Found",value:i.length}),(0,b.jsx)(bw,{label:"D2 S-Tier",value:d?.d2Tiers?.S||0}),(0,b.jsx)(bw,{label:"D2 A-Tier",value:d?.d2Tiers?.A||0}),(0,b.jsx)(bw,{label:"Bridges Used",value:Object.keys(D).length})]}),(0,b.jsxs)("div",{style:{position:"relative",marginBottom:16},children:[(0,b.jsx)("input",{type:"text",placeholder:"Search bridges or d2...",value:B,onChange:a=>C(a.target.value),style:{width:"100%",padding:"8px 12px",borderRadius:8,fontSize:12,border:"1px solid rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.05)",color:"#fff",outline:"none",boxSizing:"border-box"}}),B.length>=2&&(a=B.toLowerCase(),c=f.filter(b=>i.some(a=>a.source_connection_id===b.id)&&b.name.toLowerCase().includes(a)).slice(0,5),g=i.filter(b=>b.name?.toLowerCase().includes(a)).slice(0,5),0===(h=[...c.map(a=>({...a,_matchType:"bridge"})),...g.map(a=>({...a,_matchType:"d2"}))]).length?null:(0,b.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:50,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,overflow:"hidden",maxHeight:200,overflowY:"auto",boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:h.map(a=>(0,b.jsxs)("div",{onClick:()=>{o(a),C(""),q&&"bridge"===a._matchType&&q(a.id)},style:{padding:"8px 12px",cursor:"pointer",display:"flex",alignItems:"center",gap:8,borderBottom:"1px solid rgba(255,255,255,0.05)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover"}}):(0,b.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",background:e[a.tier]||"#555",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666"},children:"bridge"===a._matchType?"Bridge":"Degree-2"})]}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:e[a.tier]},children:a.tier})]},a.id))}))]}),"pending"===l&&m.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["⏳ Pending Requests (",m.length,")"]}),(0,b.jsx)("p",{style:{fontSize:10,color:"#666",marginBottom:10,lineHeight:1.4},children:"Friend requests you've sent. When accepted, their cluster unlocks for bridging."}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:m.map(a=>{let c=2===a.degree?f.find(b=>b.id===a.source_connection_id):null;return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"rgba(255,107,53,0.06)",borderRadius:8,border:"1px solid rgba(255,107,53,0.12)"},children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,40)}),c&&(0,b.jsxs)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:1},children:["via ",c.name?.split(" ")[0]]})]}),(0,b.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:800,color:e[a.tier]||"#888"},children:a.tier}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666"},children:parseFloat(a.power_score||0).toFixed(1)})]}),(0,b.jsx)("button",{onClick:()=>s&&s(a),title:"Remove from pending",style:{background:"none",border:"none",color:"#555",cursor:"pointer",fontSize:12,padding:2,flexShrink:0},children:"✕"})]},a.id)})})]}),"pending"!==l&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:"Most Valuable Clusters"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Object.entries(D).map(([a,b])=>{let c=f.find(b=>b.id===a);if(!c)return null;let d=b.length;if(0===d)return null;let e=b.filter(a=>"S"===a.tier),g=b.filter(a=>"A"===a.tier),h=b.filter(a=>"B"===a.tier),i=e.length,j=g.length,k=h.length,l=i>0?e.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/i:0,m=j>0?g.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/j:0,n=h.filter(a=>(parseFloat(a.power_score)||0)>=5).length,o=(i+j)/d,p=l/7*i*15+m/5.5*j*6+3*n+25*o+2*Math.log2(d+1)+10*!!c.is_catalyst,q=b.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/d;return{bridge:c,members:d,sCount:i,aCount:j,bCount:k,risingCount:n,sAvgPower:l,avgPower:q,elitePct:o,clusterValue:p,sTier:e,aTier:g,topMembers:[...b].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}}).filter(Boolean).sort((a,b)=>b.clusterValue-a.clusterValue).map((a,c)=>(0,b.jsx)(bD,{cs:a,rank:c+1,tierColors:e,onSelect:o},a.bridge.id))})]})]})}let L=[...f||[]].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)),M=B.length>=2?L.filter(a=>a.name.toLowerCase().includes(B.toLowerCase())).slice(0,8):[];return(0,b.jsxs)(bv,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"#aaa",fontSize:12,cursor:"pointer",padding:"6px 12px",marginBottom:12,fontWeight:600},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0},children:"Network Circle"}),d&&(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:16},children:[(0,b.jsx)(bw,{label:"Total Connections",value:d.total}),(0,b.jsx)(bw,{label:"S-Tier",value:d.tiers?.S||0}),(0,b.jsx)(bw,{label:"A-Tier",value:d.tiers?.A||0}),(0,b.jsx)(bw,{label:"B-Tier",value:d.tiers?.B||0})]}),(0,b.jsxs)("div",{style:{position:"relative",marginBottom:12},children:[(0,b.jsx)("input",{type:"text",placeholder:"Search connections...",value:B,onChange:a=>C(a.target.value),style:{width:"100%",padding:"8px 12px",borderRadius:8,boxSizing:"border-box",border:"1px solid rgba(255,255,255,0.1)",background:"rgba(0,0,0,0.3)",color:"#fff",fontSize:12,outline:"none"}}),M.length>0&&(0,b.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:10,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,marginTop:4,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:M.map(a=>(0,b.jsxs)("div",{onClick:()=>{o&&o(a),q&&q(a.id),C("")},style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666"},children:a.headline?.substring(0,35)})]}),(0,b.jsx)("span",{style:{fontSize:10,color:e[a.tier],fontWeight:700},children:a.tier})]},a.id))})]}),(0,b.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FFD700",marginBottom:8},children:["Power Rankings (",L.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:(v={},w={},L.forEach(a=>{w[a.tier]=(w[a.tier]||0)+1}),L.map((a,c)=>{let d=c>0?L[c-1].tier:null,f=a.tier!==d;f&&(v[a.tier]=0),v[a.tier]=(v[a.tier]||0)+1;let g=v[a.tier];return(0,b.jsxs)("div",{children:[f&&(0,b.jsxs)("div",{style:{padding:"8px 10px",marginTop:8*(c>0),marginBottom:4,background:`${e[a.tier]||"#555"}15`,borderLeft:`3px solid ${e[a.tier]||"#555"}`,borderRadius:4,fontSize:11,fontWeight:700,color:e[a.tier]||"#888",display:"flex",justifyContent:"space-between"},children:[(0,b.jsx)("span",{children:{S:"S-Tier — Elite",A:"A-Tier — High Value",B:"B-Tier — Notable",C:"C-Tier — Standard",D:"D-Tier — Entry"}[a.tier]||a.tier}),(0,b.jsx)("span",{style:{fontWeight:400,opacity:.7},children:w[a.tier]||0})]}),(0,b.jsxs)("div",{onClick:()=>{o&&o(a),q&&q(a.id)},style:{padding:"6px 8px",background:"rgba(255,255,255,0.03)",borderRadius:6,borderLeft:`3px solid ${e[a.tier]||"#555"}`,cursor:"pointer",display:"flex",alignItems:"center",gap:8,transition:"background 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.1)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("span",{style:{color:"#555",fontSize:10,fontWeight:600,minWidth:22,textAlign:"right"},children:["#",g]}),(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,background:e[a.tier]||"#555",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"S"===a.tier?"#000":"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("div",{style:{fontWeight:600,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:e[a.tier]||"#555"},children:parseFloat(a.power_score).toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:a.tier})]})]})]},a.id)}))})]})}function bv({children:a,collapsed:d,onToggle:e}){let[f,g]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{let a=()=>g(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),d)?(0,b.jsxs)("div",{onClick:e,style:{position:"fixed",right:16,top:140,zIndex:30,cursor:"pointer",display:"flex",alignItems:"center",flexDirection:"row-reverse",gap:0,height:36,borderRadius:18,background:"rgba(255,215,0,0.15)",border:"2px solid rgba(255,215,0,0.5)",color:"#FFD700",fontWeight:700,boxShadow:"0 0 12px rgba(255,215,0,0.3)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",overflow:"hidden",transition:"width 0.25s ease",width:36,padding:"0 10px"},onMouseEnter:a=>{a.currentTarget.style.width="120px"},onMouseLeave:a=>{a.currentTarget.style.width="36px"},children:[(0,b.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"‹"}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginRight:6,opacity:.9},children:"Details"})]}):(0,b.jsxs)("div",{style:f?{position:"fixed",top:0,right:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[f&&(0,b.jsx)("div",{onClick:e,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,b.jsx)("div",{style:{width:f?"80vw":320,minWidth:320*!f,maxWidth:f?300:320,height:"100%",borderLeft:"1px solid rgba(255,215,0,0.12)",padding:f?"12px 10px":"16px 16px",overflowY:"auto",overflowX:"hidden",background:f?"rgba(15,12,5,0.98)":"rgba(15,12,5,0.65)",fontSize:13,backdropFilter:"blur(24px) saturate(1.4)",WebkitBackdropFilter:"blur(24px) saturate(1.4)",boxShadow:"inset 0 0 60px rgba(255,215,0,0.03), -4px 0 24px rgba(0,0,0,0.3)",marginLeft:f?"auto":0},children:a})]})}function bw({label:a,value:c}){return(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",padding:"10px 12px",borderRadius:8},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:2},children:a}),(0,b.jsx)("div",{style:{fontSize:18,fontWeight:700},children:c})]})}function bx(){return(0,b.jsx)("span",{style:{color:"#555",fontSize:16},children:"→"})}function by({routes:a,selected:d,tierColors:e,onSelect:f}){let[g,h]=(0,c.useState)(!1),i=a.length,j=g?a:a.slice(0,4),k={display:"flex",alignItems:"center",gap:6,fontSize:13,flexWrap:"wrap"};return(0,b.jsxs)("div",{style:{background:"rgba(255,107,53,0.1)",border:"1px solid rgba(255,107,53,0.3)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsxs)("div",{style:{fontSize:10,color:"#FF6B35",fontWeight:600,marginBottom:8},children:["PATH TO THIS PERSON",i>1?` \xb7 ${i} WAYS IN`:""]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:j.map((a,c)=>{if(!a.bridge)return(0,b.jsxs)("div",{title:"This route came from a scanned list whose connection record doesn’t match anyone in your 1st-degree list, so who introduces you can’t be named. The person is real, and still reachable.",style:{...k,color:"#888",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{fontWeight:700,fontStyle:"normal",color:"#fff"},children:"You"}),(0,b.jsx)(bx,{}),(0,b.jsx)("span",{children:"a connection we can’t name"}),(0,b.jsx)(bx,{}),(0,b.jsx)("span",{children:"them"})]},`unnamed-${a.id}`);let g=a.bridge,h=e[g.tier]||"#ccc",j=[[g.role,g.company].filter(Boolean).join(" @ "),g.tier?`${g.tier}-tier`:""].filter(Boolean).join(" · ");return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:k,children:[(0,b.jsx)("span",{style:{fontWeight:700},children:"You"}),(0,b.jsx)(bx,{}),(0,b.jsxs)("button",{onClick:()=>f&&f(g),title:`Open ${g.name}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:0,border:"none",background:"none",cursor:"pointer",color:h,fontWeight:600,fontSize:13,textAlign:"left"},children:[(0,b.jsx)(aV,{person:g,size:18,tierColors:e}),g.name]}),(0,b.jsx)(bx,{}),(0,b.jsx)("span",{style:{color:"#FF6B35",fontWeight:600},children:d.name}),0===c&&i>1&&(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:"#FF6B35",padding:"1px 6px",borderRadius:8,background:"rgba(255,107,53,0.15)",whiteSpace:"nowrap"},children:"top-scored bridge"})]}),j&&(0,b.jsx)("div",{style:{fontSize:11,color:"#888",marginTop:3},children:j})]},a.id)})}),i>4&&(0,b.jsx)("button",{onClick:()=>h(a=>!a),style:{marginTop:10,padding:"4px 10px",borderRadius:6,cursor:"pointer",fontSize:11,fontWeight:600,border:"1px solid rgba(255,107,53,0.35)",background:"transparent",color:"#FF6B35"},children:g?"Show fewer":`Show all ${i}`})]})}function bz({selected:a,degree2:d}){let g=(0,f.default)(),[h,i]=(0,c.useState)(!1),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(void 0),n=d?.filter(b=>b.source_connection_id===a.id).length||0,o=n>0,p=g.running&&(0,e.scansCircleOf)(g,a),q=g.running&&!p?(0,e.busyReason)(g):null,r=g.finished.find(b=>(0,e.scansCircleOf)(b,a)),s=g.finished[0]?.startedAt??null;async function t(b){k(null),i(!0);let c=(0,e.notReadyMessage)(await (0,e.scraperStatus)().catch(()=>null));if(i(!1),c)return void k({text:c,offline:!0});try{await (0,e.beginScrape)(b,"resume"===b?{id:a.id}:{name:a.name,id:a.id})}catch(a){k({text:a.message||"Could not start the scan."})}}(0,c.useEffect)(()=>{let b=!0;return(0,e.resumePoint)(a.id).then(a=>{b&&m(a)},()=>{b&&m(null)}),()=>{b=!1}},[a.id,s]);let u=o||!!l,v=o?"#00ff88":"#9B59B6",w=!!q||h,x=a=>({flex:1,padding:"11px 8px",borderRadius:8,fontWeight:700,fontSize:a?13:12,cursor:w?"not-allowed":"pointer",opacity:w?.45:1,...a?{border:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"}:{border:`1px solid ${v}55`,background:`${v}14`,color:v}});return(0,b.jsxs)("div",{id:"scan-box",style:{background:o?"rgba(0,255,136,0.06)":"rgba(155,89,182,0.08)",border:`1px solid ${o?"rgba(0,255,136,0.2)":"rgba(155,89,182,0.3)"}`,borderRadius:10,padding:16,marginTop:16},children:[(0,b.jsx)("div",{style:{fontSize:10,color:v,fontWeight:700,letterSpacing:1,marginBottom:4,textAlign:"center"},children:o?"CLUSTER ACTIVE":"CREATE CLUSTER"}),(0,b.jsx)("div",{style:{fontSize:12,color:"#aaa",marginBottom:12,textAlign:"center"},children:o?`${n} connections mapped in Six Degrees`:(0,b.jsxs)(b.Fragment,{children:["Scan ",a.name,"'s connections to map their network"]})}),p?(0,b.jsx)(bB,{title:g.pending?"Starting…":`Scanning ${a.name}’s circle…`,log:g.log}):j?.offline?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(255,80,80,0.1)",border:"1px solid rgba(255,80,80,0.3)",color:"#ff5050",fontSize:12,marginBottom:8,textAlign:"center"},children:"Scanner offline"}),(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",textAlign:"center",marginBottom:8},children:[j.text," Open the ",(0,b.jsx)("strong",{children:"Scan"})," page to finish setting the scanner up."]}),(0,b.jsx)("button",{onClick:()=>k(null),style:{width:"100%",padding:"10px",borderRadius:8,border:"none",cursor:"pointer",background:"rgba(255,255,255,0.1)",color:"#aaa",fontWeight:600,fontSize:12},children:"Retry"})]}):(0,b.jsxs)(b.Fragment,{children:[r&&(0,b.jsx)(bC,{job:r}),(0,b.jsxs)("div",{style:{display:"flex",gap:8},children:[l&&(0,b.jsxs)("button",{onClick:()=>t("resume"),disabled:w,style:x(!0),children:["Resume from page ",l.nextPage]}),(0,b.jsx)("button",{onClick:()=>t("bridge"),disabled:w,style:x(!l&&!o),children:u?"Rescan from the start":(0,b.jsxs)(b.Fragment,{children:["Scan ",a.name,"'s Network"]})})]}),l&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:["Read to page ",l.pagesRead," so far. Resume carries on from page ",l.nextPage,". LinkedIn lists their connections in its own order, not by date, so Rescan reads them all again from page 1."]}),o&&null===l&&(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:"Their whole list has been read. LinkedIn doesn't date other people's connections, so a rescan reads it all again to find anyone new."}),q&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8,textAlign:"center"},children:[q,". One scan at a time: this one can start when it finishes."]}),j&&(0,b.jsx)("div",{style:{fontSize:11,color:"#ff8080",marginTop:8,textAlign:"center"},children:j.text})]})]})}function bA({csvSource:a,style:c}){return(0,b.jsx)("div",{style:{padding:"10px 12px",borderRadius:8,fontSize:11,color:"#999",lineHeight:1.5,textAlign:"center",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.08)",...c},children:"sample"===a?"Scanning needs your own network: everyone in the sample is invented.":"Scanning needs your own network: a CSV import lives only in this window. Close it (× at the top) and open Scan."})}function bB({title:a,log:c,small:d=!1}){return(0,b.jsxs)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(155,89,182,0.1)",border:"1px solid rgba(155,89,182,0.3)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,b.jsx)("div",{style:{width:d?6:8,height:d?6:8,borderRadius:"50%",background:"#9B59B6",animation:"pulse 1s infinite"}}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,color:"#9B59B6"},children:a})]}),(0,b.jsx)("div",{style:{fontFamily:"monospace",fontSize:d?9:10,color:"#888",maxHeight:d?80:100,overflow:"auto"},children:c.slice(-40).map((a,c)=>(0,b.jsx)("div",{children:a},c))})]})}function bC({job:a,who:c=null}){let d=0===a.exitCode,e=!d&&Array.isArray(a.failure)&&a.failure.length?a.failure[a.failure.length-1]:null;return(0,b.jsx)("div",{style:{padding:"8px 10px",borderRadius:8,marginBottom:10,fontSize:11,textAlign:"center",lineHeight:1.4,background:d?"rgba(0,255,136,0.08)":"rgba(255,80,80,0.08)",border:`1px solid ${d?"rgba(0,255,136,0.25)":"rgba(255,80,80,0.25)"}`,color:d?"#00ff88":"#ff8080"},children:d?`${c?`${c}’s circle`:"The scan"} finished. What it found is on the map.`:`${c?`${c}’s scan`:"The scan"} stopped before the end${e?`: ${e}`:"."}`})}function bD({cs:a,rank:d,tierColors:e,onSelect:f}){let[g,h]=(0,c.useState)(!1);return(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",borderRadius:6,borderLeft:`3px solid ${e[a.bridge.tier]||"#FF6B35"}`,overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{padding:"10px 10px"},children:[(0,b.jsxs)("div",{onClick:()=>f&&f(a.bridge),style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.bridge.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:11,fontWeight:700,background:e[a.bridge.tier]||"#555",color:"S"===a.bridge.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontWeight:600,fontSize:12},children:[(0,b.jsxs)("span",{style:{color:"#555",marginRight:4},children:["#",d]}),a.bridge.name]}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666"},children:a.bridge.headline?.substring(0,40)})]})]}),(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 6px",borderRadius:4,background:e[a.bridge.tier],color:"S"===a.bridge.tier?"#000":"#fff"},children:a.bridge.tier})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginTop:6,fontSize:10},children:[a.sCount>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[a.sCount,"S",a.sAvgPower>0?` (${a.sAvgPower.toFixed(1)})`:""]}),a.aCount>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[a.aCount,"A"]}),a.bCount>0&&(0,b.jsxs)("span",{style:{color:"#3498DB"},children:[a.bCount,"B"]}),a.risingCount>0&&(0,b.jsxs)("span",{style:{color:"#2ECC71"},children:[a.risingCount," rising"]}),(0,b.jsxs)("span",{style:{color:"#555"},children:[a.members," total"]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:4,fontSize:10},children:[(0,b.jsxs)("span",{style:{color:"#666"},children:["Elite: ",(100*a.elitePct).toFixed(0),"% · Avg: ",a.avgPower.toFixed(1)]}),(0,b.jsx)("span",{style:{color:"#FF6B35",fontWeight:700},children:a.clusterValue.toFixed(1)})]}),(a.sTier.length>0||a.aTier.length>0)&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:8},children:[[...a.sTier,...a.aTier].slice(0,4).map(a=>(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:a.name,style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"},title:a.name},a.id):(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:9,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},title:a.name,children:a.name?.charAt(0)},a.id)),a.sCount+a.aCount>4&&(0,b.jsxs)("span",{style:{fontSize:9,color:"#666"},children:["+",a.sCount+a.aCount-4," more"]})]}),(0,b.jsxs)("button",{onClick:()=>h(!g),style:{marginTop:6,background:"none",border:"none",color:"#888",fontSize:10,cursor:"pointer",padding:0,display:"flex",alignItems:"center",gap:4},children:[(0,b.jsx)("span",{style:{fontSize:12},children:g?"▾":"▸"}),g?"Hide members":`View all ${a.members} members`]})]}),g&&(0,b.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",padding:"6px 10px 10px",maxHeight:250,overflowY:"auto"},children:a.topMembers.map(a=>(0,b.jsxs)("div",{onClick:()=>f&&f(a),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 2px",cursor:"pointer",borderRadius:4},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:20,height:20,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:20,height:20,borderRadius:"50%",flexShrink:0,fontSize:8,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsx)("div",{style:{minWidth:0,flex:1},children:(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name})}),(0,b.jsxs)("span",{style:{fontSize:9,color:e[a.tier]||"#555",fontWeight:600,flexShrink:0},children:[a.tier," ",parseFloat(a.power_score).toFixed(1)]})]},a.id))})]})}function bE({connections:a,degree2:d,scanNotes:g,tierColors:h}){let i=(0,f.default)(),[j,k]=(0,c.useState)(!1),l=(0,c.useMemo)(()=>(0,J.reachIndex)(a,d,g),[a,d,g]),m=(0,c.useMemo)(()=>(0,J.readyToScan)(a,l),[a,l]),n=(0,c.useMemo)(()=>a.filter(a=>"hidden"===(0,J.reachState)(a,l)),[a,l]),o=(0,c.useMemo)(()=>a.filter(a=>null===(0,J.reachState)(a,l)&&"todo"===(0,J.circleState)(a,l)).length,[a,l]),p=(0,c.useMemo)(()=>new Map(a.map(a=>[a.id,a])),[a]),q=(0,J.circleScanCost)(),r=i.running&&(0,e.isCircleScan)(i),s=i.running&&!r?(0,e.busyReason)(i):null,t=i.finished.find(e.isCircleScan),u=j?m:m.slice(0,5);return(0,b.jsxs)("div",{style:{background:"rgba(0,255,136,0.05)",border:"1px solid rgba(0,255,136,0.2)",borderRadius:10,padding:14,marginBottom:16},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:800,color:"#00ff88",marginBottom:4},children:["Ready to scan (",m.length,")"]}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"#999",lineHeight:1.5,marginBottom:10},children:"People you added through a circle whose own circle isn't scanned yet. Scanning one brings in who they know: 3rd degree, through the circle you found them in."}),r?(0,b.jsx)("div",{style:{marginBottom:10},children:(0,b.jsx)(bB,{small:!0,title:i.pending?"Starting…":`Scanning ${i.target?.name||"a circle"}…`,log:i.log})}):t&&(0,b.jsx)(bC,{job:t,who:t.target?.name}),0===m.length?(0,b.jsxs)("div",{style:{fontSize:11,color:"#aaa",lineHeight:1.5},children:["Nobody yet. When someone you asked from a circle accepts, ↻ ",(0,b.jsx)("b",{children:"Check for new"})," brings them into your connections, and they show here."]}):(0,b.jsxs)("div",{role:"list",style:{display:"flex",flexDirection:"column",gap:6},children:[u.map(a=>{let c=r&&(0,e.scansCircleOf)(i,a),d=p.get(a.unlocked_from_bridge_id)?.name||a.unlocked_from_name;return(0,b.jsxs)(V.default,{role:"listitem",href:`/setup?scan=${encodeURIComponent(a.id)}`,"aria-label":`Scan ${a.name}’s circle: opens the Scan page to confirm`,style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",borderRadius:8,textDecoration:"none",color:"#fff",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(0,255,136,0.18)"},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:h[a.tier]||"#888",boxShadow:"0 0 0 2px rgba(0,255,136,0.45)"}}),(0,b.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700},children:a.name}),(0,b.jsx)("span",{style:{fontSize:10,color:h[a.tier]||"#888",fontWeight:700,marginLeft:6},children:a.tier}),d&&(0,b.jsxs)("span",{style:{display:"block",fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["was in ",String(d||"").trim().split(/\s+/)[0],"'s circle"]})]}),(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"#00ff88",whiteSpace:"nowrap"},children:c?"Scanning…":"Scan… →"})]},a.id)}),m.length>5&&(0,b.jsx)("button",{type:"button",onClick:()=>k(a=>!a),style:{background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:"2px 0",textAlign:"left"},children:j?"Show fewer":`Show all ${m.length}`})]}),m.length>0&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",lineHeight:1.5,marginTop:8},children:["Each scan: ",q.profileViews," profile view, then one LinkedIn search for every page of their list, up to ",q.searches," pages (about ",q.minutes," min for a whole list). Nothing starts until you confirm it on the Scan page."]}),n.length>0&&(0,b.jsxs)("div",{style:{marginTop:10,fontSize:10.5,color:"#777",lineHeight:1.6},children:[n.slice(0,3).map(a=>(0,b.jsxs)("div",{style:{opacity:.7},children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"🔒"})," ",a.name," ",(0,b.jsx)("span",{style:{color:"#666"},children:"· their list is hidden"})]},a.id)),n.length>3&&(0,b.jsxs)("div",{style:{opacity:.7},children:["🔒 and ",n.length-3," more with hidden lists"]})]}),o>0&&(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#888",lineHeight:1.5,marginTop:10},children:[o.toLocaleString("en-US")," of your other connections aren't scanned yet."," ",(0,b.jsx)(V.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Map them in batches on the Scan page →"})]}),s&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8},children:[s,". One scan at a time."]})]})}let bF={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function bG({collapsed:a,onToggle:d,mode:e,filter:f,onFilterChange:g,visualMode:h,onVisualModeChange:i,tierCounts:j,bridgeTierCounts:k,degrees:l=[1],onDegreesChange:m,degreeCounts:n={}}){let o=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),p="degrees"===e,q=ba(p?"degrees":"network"),r=p?k||{}:j||{},s=p?Object.values(k||{}).reduce((a,b)=>a+b,0):Object.values(j||{}).reduce((a,b)=>a+b,0);return a?(0,b.jsxs)("div",{onClick:d,style:{position:"fixed",left:16,top:140,zIndex:30,cursor:"pointer",display:"flex",alignItems:"center",gap:0,height:36,borderRadius:18,background:"rgba(52,152,219,0.15)",border:"2px solid rgba(52,152,219,0.5)",color:"#3498DB",fontWeight:700,boxShadow:"0 0 12px rgba(52,152,219,0.3)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",overflow:"hidden",transition:"width 0.25s ease",width:36,padding:"0 10px"},onMouseEnter:a=>{a.currentTarget.style.width="120px"},onMouseLeave:a=>{a.currentTarget.style.width="36px"},children:[(0,b.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"›"}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginLeft:6,opacity:.9},children:"Filters"})]}):(0,b.jsxs)("div",{style:o?{position:"fixed",top:0,left:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[o&&(0,b.jsx)("div",{onClick:d,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,b.jsxs)("div",{style:{width:o?"80vw":320,minWidth:320*!o,maxWidth:o?300:320,height:"100%",borderRight:"1px solid rgba(52,152,219,0.15)",padding:o?"12px 10px":"16px 14px",overflowY:"auto",overflowX:"hidden",background:o?"rgba(10,15,30,0.98)":"rgba(10,15,30,0.65)",fontSize:13,backdropFilter:"blur(24px) saturate(1.4)",WebkitBackdropFilter:"blur(24px) saturate(1.4)",boxShadow:"inset 0 0 60px rgba(52,152,219,0.04), 4px 0 24px rgba(0,0,0,0.3)"},children:[(0,b.jsxs)("button",{onClick:d,style:{display:"flex",alignItems:"center",gap:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"#aaa",fontSize:12,cursor:"pointer",padding:"6px 12px",marginBottom:14,fontWeight:600,width:"100%"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"›"})," Close"]}),(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Visual"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:q.map(a=>(0,b.jsxs)("button",{onClick:()=>i&&i(a.key),style:{display:"flex",alignItems:"center",gap:8,padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",textAlign:"left",background:h===a.key?"rgba(52,152,219,0.15)":"rgba(255,255,255,0.03)",color:h===a.key?"#3498DB":"#888",transition:"all 0.15s"},children:[(0,b.jsx)("span",{style:{fontSize:14,width:20,textAlign:"center"},children:a.icon}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600},children:a.label}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555",marginTop:1},children:a.desc})]})]},a.key))})]}),!p&&m&&(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Degree"}),(0,b.jsx)("div",{style:{display:"flex",gap:6},children:[[1,"1st","Your connections"],[2,"2nd","In a scanned circle"],[3,"3rd","Found by a company scan"]].map(([a,c,d])=>{let e=l.includes(a),f=n[a]||0,g=e&&1===l.length;return(0,b.jsxs)("button",{title:`${d}: ${f.toLocaleString()}${g?" (keep at least one)":""}`,"aria-pressed":e,disabled:g||!e&&!f,onClick:()=>m(e?l.filter(b=>b!==a):[...l,a].sort()),style:{flex:1,padding:"7px 4px",borderRadius:8,fontSize:11.5,fontWeight:700,cursor:!g&&(e||f)?"pointer":"default",border:e?"1px solid rgba(52,152,219,0.6)":"1px solid rgba(255,255,255,0.08)",background:e?"rgba(52,152,219,0.18)":"rgba(255,255,255,0.03)",color:e?"#cfe6f7":f?"#888":"#444"},children:[c,(0,b.jsx)("div",{style:{fontSize:9.5,fontWeight:500,opacity:.8,marginTop:2},children:f.toLocaleString()})]},a)})})]}),(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:p?"Filter by bridge tier":"Filter"}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[(0,b.jsxs)("button",{onClick:()=>g&&g("all"),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",background:"all"===f?"rgba(255,255,255,0.12)":"rgba(255,255,255,0.03)",color:"all"===f?"#fff":"#888"},children:[(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600},children:"All"}),(0,b.jsx)("span",{style:{fontSize:10,color:"#555"},children:s})]}),["S","A","B","C","D"].map(a=>(0,b.jsxs)("button",{onClick:()=>g&&g(a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",background:f===a?`${bF[a]}20`:"rgba(255,255,255,0.03)",color:f===a?bF[a]:"#888",borderLeft:f===a?`3px solid ${bF[a]}`:"3px solid transparent"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:bF[a],opacity:f===a?1:.4}}),(0,b.jsxs)("span",{style:{fontSize:11,fontWeight:600},children:[a,"-Tier"]})]}),(0,b.jsx)("span",{style:{fontSize:10,color:"#555"},children:r[a]||0})]},a))]})]}),(0,b.jsxs)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",paddingTop:12},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Stats"}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[Object.entries(r).filter(([a])=>["S","A","B"].includes(a)).map(([a,c])=>(0,b.jsxs)("div",{style:{padding:"6px 8px",borderRadius:6,background:`${bF[a]}10`,textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:16,fontWeight:800,color:bF[a]},children:c}),(0,b.jsxs)("div",{style:{fontSize:8,color:"#555"},children:[a,"-Tier"]})]},a)),(0,b.jsxs)("div",{style:{padding:"6px 8px",borderRadius:6,background:"rgba(255,255,255,0.04)",textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:16,fontWeight:800,color:"#fff"},children:s}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:"Total"})]})]})]})]})]})}var bH=a.i(36839),bI=a.i(58834);function bJ(){let[a,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)("");async function g(){d(!0),f("");try{await (0,bI.loadSampleIntoSession)(),window.location.reload()}catch(a){f(a.message||"Could not load the sample network."),d(!1)}}return(0,b.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,overflowY:"auto"},children:(0,b.jsxs)("div",{style:{maxWidth:520,width:"100%",textAlign:"center"},children:[(0,b.jsx)("div",{style:{width:68,height:68,borderRadius:"50%",margin:"0 auto 22px",border:"2px solid rgba(255,215,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:26},children:"✦"}),(0,b.jsx)("h2",{style:{fontSize:28,fontWeight:800,margin:"0 0 10px",background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Welcome to Six Degrees"}),(0,b.jsx)("p",{style:{color:"rgba(255,255,255,0.5)",fontSize:14.5,lineHeight:1.7,margin:"0 0 28px"},children:"Your network, drawn as a galaxy. Everything stays on this computer. Pick how to bring it in — you can switch later."}),(0,b.jsx)(bK,{href:"/setup",primary:!0,badge:"Recommended",title:"Scan my LinkedIn",body:"A few guided steps: set up the scanner, sign into LinkedIn yourself, and watch your galaxy fill in. The only way to see who your connections know."}),(0,b.jsx)(bK,{href:"/import",title:"Import my LinkedIn CSV",body:"LinkedIn’s official export, read in your browser. Takes about ten minutes to arrive by email. Shows the people you know, not who they know."}),(0,b.jsx)(bK,{onClick:g,disabled:a,title:a?"Loading…":"Explore a sample network",body:"150 invented connections and the 598 people they know. Every view except Outlink and Scan, which need your own scan. Nothing about you is used."}),e&&(0,b.jsx)("div",{style:{color:"#ff6b6b",fontSize:13,marginTop:18},children:e}),(0,b.jsxs)("p",{style:{color:"rgba(255,255,255,0.45)",fontSize:13,lineHeight:1.6,margin:"18px 0 0"},children:["Moving from another computer?"," ",(0,b.jsx)("a",{href:"/settings#data",style:{color:"rgba(255,255,255,0.75)"},children:"Import your saved copy in Settings → Your data."})]})]})})}function bK({href:a,onClick:c,disabled:d,primary:e,badge:f,title:g,body:h}){let i={display:"block",width:"100%",boxSizing:"border-box",textAlign:"left",padding:"16px 18px",borderRadius:12,marginBottom:12,textDecoration:"none",cursor:d?"default":"pointer",font:"inherit",border:e?"1px solid rgba(255,215,0,0.45)":"1px solid rgba(255,255,255,0.12)",background:e?"linear-gradient(135deg, rgba(255,215,0,0.12), rgba(155,89,182,0.14))":"rgba(255,255,255,0.03)",color:"#fff"},j=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:5},children:[(0,b.jsx)("span",{style:{fontSize:15.5,fontWeight:750},children:g}),f&&(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",padding:"3px 8px",borderRadius:20,background:"#FFD700",color:"#0a0a1a"},children:f}),(0,b.jsx)("span",{style:{marginLeft:"auto",color:"rgba(255,255,255,0.4)"},children:"→"})]}),(0,b.jsx)("div",{style:{fontSize:13,color:"rgba(255,255,255,0.5)",lineHeight:1.6},children:h})]});return a?(0,b.jsx)("a",{href:a,style:i,children:j}):(0,b.jsx)("button",{onClick:c,disabled:d,style:i,children:j})}var bL=a.i(42510);let bM=[],bN=a=>!!a&&!["install","setup","login"].includes(a.action);function bO(a,b){let c={};a.forEach(a=>{c[a.tier]=(c[a.tier]||0)+1});let d={};return b.forEach(a=>{d[a.tier]=(d[a.tier]||0)+1}),{total:a.length,tiers:c,d2Total:b.length,d2Tiers:d}}let bP={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function bQ(){let a,f,j,k,{userId:l,userName:m}=(0,bt.useUser)(),n=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),[o,p]=(0,c.useState)([]),[q,r]=(0,c.useState)([]),[s,t]=(0,c.useState)([]),[u,v]=(0,c.useState)([1]),[w,x]=(0,c.useState)(null),y=(0,c.useRef)(null),[z,A]=(0,c.useState)("all"),B=(0,d.useSearchParams)().get("chain"),[C,D]=(0,c.useState)(B),[E,F]=(0,c.useState)(()=>C?"degrees":"network"),[G,H]=(0,c.useState)(!0),[I,J]=(0,c.useState)(null),[K,L]=(0,c.useState)(!0),[M,N]=(0,c.useState)(!0),[O,P]=(0,c.useState)(()=>C?"chain":"galaxy"),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)(!1),[U,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)("csv"),[$,_]=(0,c.useState)(e.NO_SCAN_NOTES),aa=(0,c.useRef)(""),ab=(0,h.requestCount)((0,g.default)());(0,c.useEffect)(()=>{l&&(a(),bI.IS_DEMO||(0,bL.hasCsvNetwork)()||((0,e.loadScanNotes)().then(_),fetch(`/api/notifications?userId=${l}`).then(a=>a.json()).then(a=>R(a.notifications||[])).catch(()=>{})));async function a(){let a=(0,bL.hasCsvNetwork)()?(0,bL.loadCsvNetwork)():null;a&&(X(!0),Z(a.source||"csv"));let{degree1:b,degree2:c,degree3:d=[]}=bI.IS_DEMO?await (0,bI.loadDemoNetwork)():a||await (async()=>await (0,i.loadNetwork)(l))();p(b),r(c),t(d||[]),aa.current=bR(b,c),J(bO(b,c)),H(!1)}},[l]);let ac=(0,c.useCallback)(async()=>{if(!(bI.IS_DEMO||(0,bL.hasCsvNetwork)())&&l)try{let[{degree1:a,degree2:b,degree3:c=[]},d]=await Promise.all([(0,i.loadNetwork)(l),(0,e.loadScanNotes)()]);_(a=>JSON.stringify(a)===JSON.stringify(d)?a:d),t(a=>a.length===(c||[]).length?a:c||[]);let f=bR(a,b);if(f===aa.current)return;aa.current=f,p(a),r(b),J(bO(a,b))}catch{}},[l]),ad=(0,c.useCallback)(()=>{D(null);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},[]),ae="degrees"===E,af=(0,c.useMemo)(()=>(function(a=[],b=[],c=[]){let d=new Set,e=(a,b)=>{let c=[];for(let e of a||[]){let a=(0,W.keyFor)(e);d.has(a)||(d.add(a),c.push(e.degree===b?e:{...e,degree:b}))}return c};return{1:e(a,1),2:e(b,2),3:e(c,3)}})(o,q,s),[o,q,s]),ag=(0,c.useMemo)(()=>ae?o:u.flatMap(a=>af[a]||[]),[ae,o,u,af]),ah=(0,c.useMemo)(()=>"all"===z?ag:ag.filter(a=>a.tier===z),[ag,z]),ai=(0,c.useMemo)(()=>new Map(o.map(a=>[a.id,a])),[o]),aj=(0,c.useMemo)(()=>new Set(q.map(a=>a.source_connection_id).filter(Boolean)),[q]),ak=(0,c.useMemo)(()=>{let a={};return o.forEach(b=>{aj.has(b.id)&&(a[b.tier]=(a[b.tier]||0)+1)}),a},[o,aj]),al=(0,c.useMemo)(()=>ae?"all"===z?q:q.filter(a=>ai.get(a.source_connection_id)?.tier===z):bM,[ae,z,ai,q]),am=(0,c.useCallback)(a=>{x(a),a&&L(!1)},[]);if(G)return(0,b.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:[(0,b.jsx)("div",{style:{fontSize:24,fontWeight:700},children:"Loading Six Degrees…"}),(0,b.jsx)("div",{style:{fontSize:14,color:"#888",marginTop:8},children:"Mapping your LinkedIn network"})]});let an=(a=a8[O])&&a.modes.includes(E)?{key:O,...a}:ba(E)[0]??{key:"list",...a8.list},ao=!bI.IS_DEMO&&!U;return(0,b.jsxs)("div",{"data-map":!0,style:{height:"100vh",overflow:"hidden",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,b.jsxs)("header",{style:{padding:n?"10px 12px":"20px 30px",borderBottom:"1px solid rgba(255,255,255,0.1)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:n?4:8,flexWrap:n?"wrap":"nowrap",gap:6*!!n},children:[(0,b.jsx)("h1",{style:{fontSize:n?16:28,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Six Degrees"}),(0,b.jsxs)("div",{style:{display:"flex",gap:n?2:4,background:"rgba(255,255,255,0.08)",borderRadius:8,padding:n?2:3,flexWrap:n?"wrap":"nowrap"},children:[(0,b.jsx)("button",{onClick:()=>{F("network"),x(null),A("all"),P("galaxy")},style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,cursor:"pointer",background:"network"===E?"#fff":"transparent",color:"network"===E?"#000":"#888"},children:n?"Circle":"Network Circle"}),(0,b.jsx)("button",{onClick:()=>{F("degrees"),x(null),A("all"),P("chain")},style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,cursor:"pointer",background:"degrees"===E?"linear-gradient(135deg, #FFD700, #FF6B35)":"rgba(255,255,255,0.12)",color:"degrees"===E?"#000":"#fff"},children:"Degrees"}),U&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginLeft:n?4:10,padding:n?"4px 8px":"5px 10px",borderRadius:999,background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.12)"},children:[(0,b.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:"sample"===Y?"#9B59B6":"#2ecc71"}}),(0,b.jsx)("span",{style:{fontSize:n?10:12,color:"rgba(255,255,255,0.65)",whiteSpace:"nowrap"},children:"sample"===Y?"Sample network":"Your CSV"}),(0,b.jsx)("button",{onClick:()=>{(0,bL.clearCsvNetwork)(),window.location.href="/"},title:"sample"===Y?"Leave the sample network":"Clear this import",style:{border:"none",background:"transparent",cursor:"pointer",color:"#888",fontSize:n?13:15,lineHeight:1,padding:"0 0 0 2px"},children:"×"})]}),!bI.IS_DEMO&&(0,b.jsx)(V.default,{href:"/paths",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#00ff88",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Paths"}),!bI.IS_DEMO&&!U&&(0,b.jsx)(V.default,{href:"/scores",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FFD700",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Scores"}),!bI.IS_DEMO&&!U&&(0,b.jsx)(V.default,{href:"/queue",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FF6B35",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Outlink"}),!bI.IS_DEMO&&!U&&(0,b.jsx)(V.default,{href:"/setup",style:{padding:n?"8px 12px":"8px 16px",borderRadius:6,border:"none",fontSize:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#666",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Scan"})]}),!bI.IS_DEMO&&(0,b.jsx)(V.default,{href:"/settings",title:"Settings","aria-label":"Settings",style:{width:n?28:32,height:n?28:32,borderRadius:"50%",flexShrink:0,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:n?14:16,textDecoration:"none",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:n?4:8},children:"⚙︎"}),!bI.IS_DEMO&&!U&&(0,b.jsxs)("div",{style:{position:"relative",marginLeft:n?4:8},children:[(0,b.jsxs)("button",{onClick:()=>T(!S),style:{width:n?28:32,height:n?28:32,borderRadius:"50%",border:"none",cursor:"pointer",background:"rgba(255,255,255,0.06)",color:"#888",fontSize:n?12:14,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:["🔔",Q.filter(a=>!a.seen).length>0&&(0,b.jsx)("span",{style:{position:"absolute",top:-2,right:-2,width:16,height:16,borderRadius:"50%",background:"#ff5050",color:"#fff",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center"},children:Q.filter(a=>!a.seen).length})]}),S&&(0,b.jsxs)("div",{style:{position:"absolute",top:40,right:0,width:320,maxHeight:400,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:12,overflow:"hidden",zIndex:100,backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",boxShadow:"0 8px 32px rgba(0,0,0,0.5)"},children:[(0,b.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid rgba(255,255,255,0.08)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontWeight:700,fontSize:14},children:"Notifications"}),Q.filter(a=>!a.seen).length>0&&(0,b.jsx)("button",{onClick:()=>{fetch("/api/notifications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mark-all-seen"})}),R(a=>a.map(a=>({...a,seen:!0})))},style:{background:"none",border:"none",color:"#3498DB",fontSize:11,cursor:"pointer",fontWeight:600},children:"Mark all read"})]}),(0,b.jsx)("div",{style:{overflowY:"auto",maxHeight:340},children:0===Q.length?(0,b.jsx)("div",{style:{padding:20,textAlign:"center",color:"#555",fontSize:12},children:"No notifications yet"}):Q.slice(0,20).map(a=>(0,b.jsx)("div",{style:{padding:"10px 16px",borderBottom:"1px solid rgba(255,255,255,0.04)",background:a.seen?"transparent":"rgba(255,215,0,0.04)"},children:(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:a.icon||"📌"}),(0,b.jsxs)("div",{style:{flex:1},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:a.seen?"#888":"#fff"},children:a.title}),a.message&&(0,b.jsx)("div",{style:{fontSize:10,color:"#666",marginTop:2},children:a.message}),(0,b.jsx)("div",{style:{fontSize:9,color:"#444",marginTop:3},children:new Date(a.created_at).toLocaleDateString()})]})]})},a.id))})]})]}),!bI.IS_DEMO&&!U&&(0,b.jsx)(bT,{isMobile:n}),(0,b.jsx)("a",{href:bI.IS_DEMO?"/launch":U?"/import":"/profile",style:{width:n?30:36,height:n?30:36,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:n?11:14,textDecoration:"none",marginLeft:n?6:12,flexShrink:0},children:(f=o.filter(a=>"S"===a.tier).length,j=o.filter(a=>"A"===a.tier).length,k=o.filter(a=>"B"===a.tier).length,Math.floor(Math.sqrt((100*f+40*j+15*k+200*o.filter(a=>aj.has(a.id)).length+50*q.filter(a=>"S"===a.tier).length+o.length)/10)))})]}),ae&&!U&&ab>0&&(0,b.jsxs)(V.default,{href:"/queue",style:{padding:"5px 12px",borderRadius:16,fontSize:12,fontWeight:600,textDecoration:"none",background:"rgba(255,107,53,0.12)",color:"#FF6B35",border:"1px solid rgba(255,107,53,0.25)",display:"inline-flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{style:{fontSize:10},children:"⏳"}),ab," Pending"]})]}),(0,b.jsxs)("div",{style:{display:"flex",height:n?"calc(100vh - 70px)":"calc(100vh - 130px)",position:"relative"},children:[(0,b.jsx)(bG,{collapsed:M,onToggle:()=>N(!M),mode:E,filter:z,onFilterChange:A,visualMode:an.key,onVisualModeChange:P,tierCounts:ae?I?.tiers||{}:function(a=[]){let b={};for(let c of a)b[c.tier]=(b[c.tier]||0)+1;return b}(ag),degrees:u,onDegreesChange:v,degreeCounts:{1:af[1].length,2:af[2].length,3:af[3].length},bridgeTierCounts:ak}),(()=>{if(0===o.length)return(0,b.jsx)(bJ,{});if(ae&&0===q.length)return(0,b.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,textAlign:"center"},children:(0,b.jsxs)("div",{style:{maxWidth:440},children:[(0,b.jsx)("div",{style:{fontSize:40,marginBottom:16,opacity:.5},children:"🔗"}),(0,b.jsx)("h2",{style:{fontSize:22,fontWeight:800,margin:"0 0 12px",color:"#fff"},children:"Degrees need 2nd-degree data"}),(0,b.jsxs)("p",{style:{color:"rgba(255,255,255,0.45)",fontSize:14,lineHeight:1.7,margin:"0 0 20px"},children:["This view maps who ",(0,b.jsx)("em",{children:"your connections"})," ","know — the people you haven’t met yet. LinkedIn’s CSV export only covers your own 1st-degree list, so there are no circles to open here."]}),(0,b.jsxs)("p",{style:{color:"#666",fontSize:13,lineHeight:1.7,margin:0},children:["The local scanner maps those circles (and captures real photos)."," ",(0,b.jsx)(V.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Set up scanning →"})]})]})});let a=an.component,c={connections:ah,degree2:an.allDegree2?q:al,onSelect:am,mode:E,userName:m,userImage:null,selectedId:w?.id??null,tierColors:bP,focusNodeRef:y,fullDegree1:o,fullDegree2:q,scanNotes:$,canScan:ao,chainOpen:C,onChainOpened:ad};return(0,b.jsx)(a,{...c})})(),(0,b.jsx)(bu,{selected:w,stats:I,tierColors:bP,connections:o,degree2:q,mode:E,collapsed:K,filter:z,onToggle:()=>L(!K),onSelect:a=>{x(a||null)},onSwitchMode:a=>{F(a),A("all")},onFocusNode:a=>{y.current&&y.current(a)},csvSource:bI.IS_DEMO?"sample":U?Y:null,scanNotes:$,canScan:ao}),ao&&(0,b.jsx)(bS,{onChange:ac,live:"chain"===an.key}),ae&&"separation"!==an.key&&(0,b.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,zIndex:20,display:"flex",alignItems:"center",gap:8,background:"rgba(0,0,0,0.7)",borderRadius:20,padding:"6px 14px",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.08)"},children:[(0,b.jsxs)("span",{style:{fontSize:10,color:"#666"},children:[a8.orbit.icon," ",a8.orbit.label]}),(0,b.jsx)("div",{onClick:()=>P("orbit"===an.key?"chain":"orbit"),style:{width:32,height:18,borderRadius:9,cursor:"pointer",background:"orbit"===an.key?"#FF6B35":"rgba(255,255,255,0.15)",position:"relative",transition:"background 0.2s"},children:(0,b.jsx)("div",{style:{width:14,height:14,borderRadius:"50%",background:"#fff",position:"absolute",top:2,left:"orbit"===an.key?16:2,transition:"left 0.2s"}})})]})]})]})}function bR(a,b){let c=0x811c9dc5,d=a=>{for(let b=0;b<a.length;b++)c=Math.imul(c^a.charCodeAt(b),0x1000193)};for(let c of[...a,...b])d(`${c.id}|${c.degree}|${c.source_connection_id??""}|${c.unlocked_from_bridge_id??""}|${c.tier}|${c.power_score}|${c.unlock_status??""}|${c.profile_image_url??""};`);return`${a.length}:${b.length}:${c>>>0}`}function bS({onChange:a,live:b}){let d=(0,f.default)(),g=d.finished.find(bN)?.startedAt??null,h=b&&d.running&&(0,e.isCircleScan)(d);return(0,c.useEffect)(()=>{null!=g&&a()},[g,a]),(0,c.useEffect)(()=>{if(!h)return;let b=setInterval(a,2e4);return()=>clearInterval(b)},[h,a]),null}function bT({isMobile:a}){let c=(0,f.default)(),d=(0,e.busyReason)(c);return(0,b.jsx)("button",{onClick:async()=>{try{let a=(0,e.notReadyMessage)(await (0,e.scraperStatus)());if(a)return void alert(a);if(!window.confirm("Check for new connections?\n\nThis opens a Chrome window on your LinkedIn connections list and reads it from the newest, stopping once it reaches people already saved. It usually takes under a minute. It reads your own list, not a search, so it doesn’t use your search budget, but like any scan it is LinkedIn traffic from your account."))return;await (0,e.beginScrape)("refresh"),alert("Checking for new connections — watch it on the Scan page.")}catch(a){alert(a.message)}},disabled:!!d,title:d?`${d}. One scan at a time.`:"Check for new connections",style:{width:a?28:32,height:a?28:32,borderRadius:"50%",border:"none",cursor:d?"not-allowed":"pointer",opacity:d?.4:1,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:a?12:14,display:a?"none":"flex",alignItems:"center",justifyContent:"center",marginLeft:8},children:"↻"})}a.s(["default",0,function(){return(0,b.jsx)(bH.default,{children:(0,b.jsx)(c.Suspense,{children:(0,b.jsx)(bQ,{})})})}],30100)}];
18
+ ${a.routes.map(a=>a.bridge?`${a.bridge.name} (${a.bridge.tier})`:aY).join("\n")}`,style:{flexShrink:0,padding:"1px 6px",borderRadius:8,fontSize:10,fontWeight:800,color:aW,background:"rgba(255,107,53,0.15)"},children:["+",g]})]})}function a5({status:a,rarity:c}){let d=c?aQ(c.key):null;return(0,b.jsxs)(b.Fragment,{children:["asked"===a&&(0,b.jsx)("span",{title:"You sent a request. It shows everywhere in the app.",style:{flexShrink:0,fontSize:9,fontWeight:800,color:"#FFD700",border:"1px dashed rgba(255,215,0,0.6)",borderRadius:4,padding:"0 4px"},children:"Request sent"}),"connected"===a&&(0,b.jsx)("span",{title:"Already one of your connections",style:{flexShrink:0,fontSize:9,fontWeight:800,color:"#00ff88",border:"1px solid rgba(0,255,136,0.5)",borderRadius:4,padding:"0 4px"},children:"Connected"}),d&&"connected"!==a&&(0,b.jsx)("span",{title:`${c.count} mutual connection${1===c.count?"":"s"}${"scans"===c.from?" (from your scans, so it can only go up)":""}. ${a6}`,style:{flexShrink:0,fontSize:9,fontWeight:700,color:d.color,border:`1px solid ${d.color}55`,borderRadius:4,padding:"0 4px"},children:d.label})]})}let a6="Rarity is how many mutual connections lead to them: few is a rare way in, many is warm (likely to accept). It never changes a score or a tier.",a7=(0,c.memo)(function({p:a,top:c,height:d,isMobile:e,selected:f,tierColors:g,onPick:h,q:i,status:j,rarity:k}){let{person:l}=a,m=g[a.tier]||"#888",n=function(a,b){if(b){let c=a.routes.find(a=>a.bridge&&String(a.bridge.name||"").toLowerCase().includes(b));if(c)return c}return a.routes[0]||null}(a,i),o=a.rank<=3,p=f?"rgba(255,107,53,0.08)":o?`${m}08`:"transparent",q="LinkedIn Member"===l.name,r=`#${a.rank}${a.tied?"=":""}`,s=a.waysIn-1,t=n?.bridge?`via ${n.bridge.name}${s>0?` and ${s} other${s>1?"s":""}`:""}`:`via ${aY}${s>0?` and ${s} other${s>1?"s":""}`:""}`;return(0,b.jsxs)("div",{role:"button",tabIndex:0,"aria-label":`Rank ${a.rank}${a.tied?", tied":""}, ${l.name}, ${a.tier} tier, ${a.score.toFixed(1)}, ${a.waysIn} way${1===a.waysIn?"":"s"} in, ${t}`,"aria-pressed":f,onClick:()=>h(a),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),h(a))},onMouseEnter:a=>{f||(a.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:a=>{a.currentTarget.style.background=p},style:{position:"absolute",top:c,left:0,right:0,height:d,boxSizing:"border-box",display:"grid",alignItems:"center",gap:10,padding:"0 12px",gridTemplateColumns:e?"44px 36px 1fr 44px":"64px 36px minmax(0,1.4fr) minmax(0,1fr) 96px 44px",borderLeft:`3px solid ${f?aW:"transparent"}`,borderBottom:"1px solid rgba(255,255,255,0.04)",background:p,cursor:"pointer"},children:[(0,b.jsx)("span",{style:{fontSize:e?11:12,fontWeight:800,color:o?m:"#555",whiteSpace:"nowrap"},children:r}),(0,b.jsx)(aV,{person:l,size:32,tierColors:g}),e?(0,b.jsxs)("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[(0,b.jsxs)("span",{style:{...a3,fontSize:13,fontWeight:600,color:q?"#888":"#fff",minWidth:0},children:[l.name,q&&(0,b.jsx)("span",{style:{fontSize:10,color:"#666",fontWeight:400},children:" · out of network"})]}),(0,b.jsx)(a5,{status:j,rarity:k})]}),(0,b.jsx)(a4,{p:a,route:n,tierColors:g,compact:!0}),(0,b.jsx)("span",{style:{...a3,fontSize:10,color:"#666"},children:a_(l)})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[(0,b.jsx)("span",{style:{...a3,fontSize:13,fontWeight:600,color:q?"#888":"#fff"},children:l.name}),(0,b.jsx)("span",{style:{flexShrink:0,fontSize:9,fontWeight:800,color:m,border:`1px solid ${m}55`,borderRadius:4,padding:"0 4px"},children:a.tier}),(0,b.jsx)(a5,{status:j,rarity:k}),q&&(0,b.jsx)("span",{style:{flexShrink:0,fontSize:10,color:"#666"},children:"out of network"})]}),(0,b.jsx)("div",{style:{...a3,fontSize:10,color:"#777",marginTop:2},children:a_(l)})]}),(0,b.jsx)(a4,{p:a,route:n,tierColors:g}),(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:m,width:`${100*Math.max(0,Math.min(1,a.score/10))}%`}})})]}),(0,b.jsxs)("div",{style:{textAlign:"right"},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:800,color:m},children:a.score.toFixed(1)}),e&&(0,b.jsx)("div",{style:{fontSize:9,color:"#666",fontWeight:700},children:a.tier})]})]})}),a8={galaxy:{component:function({connections:a,onSelect:d,tierColors:e,focusNodeRef:f,userName:g,selectedId:h=null,scanNotes:i,fullDegree1:m,fullDegree2:u}){let w=(0,c.useMemo)(()=>{let b=(0,J.reachIndex)(m||a,u||[],i||{}),c=(0,J.readyByCircle)(b),d=new Map;for(let e of a){if(1!==(e.degree||1))continue;let a=(0,J.scanBars)(e,b),f=c.get(e.id)||0;(null!=a||f)&&d.set(e.id,{bars:a,ready:f})}return d},[a,m,u,i]),x=(0,c.useRef)(null),y=(0,c.useRef)(null),z=(0,c.useRef)(null),A=(0,c.useRef)({transform:null,size:null}),B=(0,c.useRef)(null),[C,D]=(0,c.useState)(null),E=(0,c.useRef)(d);(0,c.useEffect)(()=>{E.current=d});let F=(0,c.useRef)(h);(0,c.useEffect)(()=>{let a=x.current?.parentElement;if(!a)return;let b=()=>{let b=Math.round(a.clientWidth),c=Math.round(a.clientHeight);B.current={width:b,height:c},D(a=>a&&a.width===b&&a.height===c?a:{width:b,height:c})};b();let c=new ResizeObserver(b);return c.observe(a),()=>c.disconnect()},[]),(0,c.useEffect)(()=>{F.current=h,z.current?.select(h)},[h]),(0,c.useEffect)(()=>{C&&z.current?.resize(C)},[C]);let S=null!==C;return(0,c.useEffect)(()=>{if(!S||!x.current||!a.length)return;let b=j.select(x.current);b.selectAll("*").remove();let c=B.current,{transform:d,size:h}=A.current,i=d?I(d,h,c):null,m=function(a,b,c,d,e,f,g,h,i,k,l=new Map){var m,u,w;let x=[{id:O,name:k||"You",tier:"center",degree:0,power_score:10,fx:0,fy:0},...d.map(a=>({id:a.id,name:a.name,tier:a.tier,degree:a.degree||1,source_connection_id:a.source_connection_id,unlocked_from_bridge_id:a.unlocked_from_bridge_id,power_score:parseFloat(a.power_score)||1,company:a.company,role:a.role,headline:a.headline,profile_url:a.profile_url,profile_image_url:(0,H.localPhoto)(a.profile_image_url),connected_date:a.connected_date,seniority_score:a.seniority_score,company_prestige_score:a.company_prestige_score,influence_signals:a.influence_signals,is_catalyst:a.is_catalyst,catalyst_score:a.catalyst_score,circle_power:a.circle_power,circle_s_count:a.circle_s_count,circle_a_count:a.circle_a_count}))],y=new Map(x.map(a=>[a.id,a])),z=new Set(d.filter(a=>1===(a.degree||1)).map(a=>a.id)),A=d.some(a=>(a.degree||1)>1),B=new Map;for(let a of x){if(a.id===O)continue;let b=a.unlocked_from_bridge_id;1===a.degree&&A&&null!=b&&b!==a.id&&z.has(b)?B.set(a.id,b):2===a.degree&&z.has(a.source_connection_id)&&B.set(a.id,a.source_connection_id)}let C=new Map,D=(a,b=new Set)=>{if(a.id===O)return 0;if(C.has(a.id))return C.get(a.id);let c=B.get(a.id),d=a.degree>=3?3:a.degree;return null==c||b.has(a.id)||(b.add(a.id),d=D(y.get(c),b)+1),d=Math.min(d,6),C.set(a.id,d),d},E=d.map(a=>{let b=B.get(a.id)??O;return{source:b,target:a.id,near:b!==O}}),F=a=>{switch(a){case"S":return 150;case"A":return 250;case"B":return 350;case"C":return 450;default:return 520}},J=["S","A","B","C","D"],Q=[[115,135,155,175,192],[265,300,335,370,398],[465,500,535,565,590],[660,690,720,745,765]],S=[...new Set(x.filter(a=>a.id!==O).map(a=>D(a)))].sort((a,b)=>a-b),T=A&&S.length>1,U=a=>{if(!T)return F(a.tier);let b=Math.min(S.indexOf(D(a)),Q.length-1),c=J.indexOf(a.tier);return Q[b][c<0?4:c]},V=a=>{if(a.id===O)return 18;let b=Math.max(3,Math.min(12,1.3*(a.power_score||1)));return a.degree>1?Math.max(2.5,.75*b):b},W=window.innerWidth<768,X=a.append("g"),Y=new Map;if(!W&&T){let a=X.append("g").attr("class","degree-guides").style("pointer-events","none"),b=["","1st","2nd","3rd","4th","5th","6th"];S.slice(0,Q.length).forEach((c,d)=>{let e=Q[d][2];a.append("circle").attr("r",e).attr("fill","none").attr("stroke","#8899aa").attr("stroke-opacity",.12).attr("stroke-width",1).attr("stroke-dasharray","2 4"),a.append("text").attr("x",0).attr("y",-Q[d][4]-8).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill","#8899aa").attr("fill-opacity",.55).text(b[c]||`${c}th`)})}else if(!W){let a=X.append("g").attr("class","tier-guides").style("pointer-events","none");for(let b of["S","A","B","C","D"]){let c=F(b),d=a.append("circle").attr("r",c).attr("fill","none").attr("stroke",f[b]||"#666").attr("stroke-opacity",.16).attr("stroke-width",1).attr("stroke-dasharray","2 4"),e=a.append("text").attr("x",0).attr("y",-c-4).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill",f[b]||"#666").attr("fill-opacity",.5).text(b);Y.set(b,{ring:d,label:e})}}let Z=null,$=n.default().scaleExtent([.3,4]).on("zoom",a=>{X.attr("transform",a.transform),i.current={transform:Z??a.transform,size:c},ac()});a.call($);let _=(b,d)=>{if(P()){Z=null,a.interrupt().call($.transform,b);return}Z=b,i.current={transform:b,size:c},a.transition().duration(d).call($.transform,b).on("end interrupt cancel",()=>{Z===b&&(Z=null)})},aa=b.firstChild,ab=null,ac=()=>{if(!ab)return;let c=o.default(a.node());b.style.transform=`translate(${c.applyX(ab.x)}px, ${c.applyY(ab.y)}px) scale(${c.k})`},ad=a=>{if(ab=null!=a&&a!==O?y.get(a)??null:null,b.style.display=ab?"block":"none",!ab)return;let c=V(ab)+8;aa.style.width=aa.style.height=`${2*c+2.5}px`,aa.style.margin=`${-(c+1.25)}px`,aa.style.borderColor=f[ab.tier]||"#FFD700",ac()};if(h)a.call($.transform,p.identity.translate(h.x,h.y).scale(h.k));else{let b=W&&c.width>0&&c.height>0?Math.min(c.width/1248,c.height/1248):1;a.call($.transform,p.identity.translate(c.width/2,c.height/2).scale(b))}if(g&&(g.current=a=>{let b=y.get(a);b&&(_(p.identity.translate(c.width/2-2.5*b.x,c.height/2-2.5*b.y).scale(2.5),750),ad(a))}),W){let a={};x.forEach(b=>{let c=b.tier||"D";a[c]||(a[c]=[]),a[c].push(b)}),Object.entries(a).forEach(([a,b])=>{b.forEach((c,d)=>{if(c.id===O){c.x=0,c.y=0,c.fx=c.x,c.fy=c.y;return}let e=F(a),f=d/b.length*Math.PI*2-Math.PI/2;c.x=e*Math.cos(f),c.y=e*Math.sin(f),c.fx=c.x,c.fy=c.y})})}let ae=q.forceSimulation(x).force("link",r.forceLink(E).id(a=>a.id).distance(a=>a.near?Math.max(40,U(a.target)-U(a.source)):U(a.target)).strength(W?0:T?.06:.1)).force("charge",s.forceManyBody().strength(W?0:a=>a.id===O?-300:-15)).force("center",W?null:function(a,b){var c,d=1;function e(){var e,f,g=c.length,h=0,i=0;for(e=0;e<g;++e)h+=(f=c[e]).x,i+=f.y;for(h=(h/g-a)*d,i=(i/g-b)*d,e=0;e<g;++e)f=c[e],f.x-=h,f.y-=i}return null==a&&(a=0),null==b&&(b=0),e.initialize=function(a){c=a},e.x=function(b){return arguments.length?(a=+b,e):a},e.y=function(a){return arguments.length?(b=+a,e):b},e.strength=function(a){return arguments.length?(d=+a,e):d},e}(0,0)).force("collision",W?null:t.forceCollide().radius(a=>V(a)+2)).force("radial",W?null:v(a=>a.id===O?0:U(a),0,0).strength(T?.45:.3));ae.on("end.guides",()=>{for(let[a,{ring:b,label:c}]of Y){let d=x.filter(b=>b.tier===a&&b.id!==O).map(a=>Math.hypot(a.x||0,a.y||0)).sort((a,b)=>a-b);if(!d.length){b.attr("opacity",0),c.attr("opacity",0);continue}let e=d[Math.floor(d.length/2)];b.attr("r",e).attr("opacity",1),c.attr("y",-e-4).attr("opacity",1)}});let af=X.append("g").selectAll("line").data(E).join("line").attr("stroke",a=>f[a.target.tier]||"#333").attr("stroke-opacity",.15).attr("stroke-width",.5),ag=x.filter(a=>a.is_catalyst&&l.get(a.id)?.bars==null);if(ag.length){let b=a.select("defs").size()?a.select("defs"):a.append("defs");if(!b.select("#catalyst-glow-nm").size()){let a=b.append("filter").attr("id","catalyst-glow-nm").attr("x","-60%").attr("y","-60%").attr("width","220%").attr("height","220%");a.append("feGaussianBlur").attr("stdDeviation","5").attr("result","blur"),a.append("feMerge").html('<feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/>')}X.append("g").selectAll("circle").data(ag).join("circle").attr("r",a=>V(a)+6).attr("fill","none").attr("stroke","#00ff88").attr("stroke-width",2).attr("stroke-dasharray","3,3").attr("filter","url(#catalyst-glow-nm)").attr("cx",a=>a.x||0).attr("cy",a=>a.y||0).attr("class","catalyst-ring")}let ah=x.filter(a=>l.has(a.id)),ai=X.append("g").attr("class","dot-rings").style("pointer-events","none").selectAll("g").data(ah).join("g").attr("transform",a=>`translate(${a.x||0},${a.y||0})`);ai.each(function(a){let{bars:b,ready:c}=l.get(a.id),d=V(a)+3.5,e=j.select(this);if(null!=b)for(let a of K(d))e.append("path").attr("d",a.d).attr("fill","none").attr("stroke-linecap","round").attr("stroke-width",1.6).attr("stroke",a.i<b?L:M);if(c>0){let a=.72*d;e.append("circle").attr("cx",a).attr("cy",a).attr("r",5.5).attr("fill","#7F77DD"),e.append("text").attr("x",a).attr("y",a+2.5).attr("text-anchor","middle").attr("font-size",7).attr("font-weight",700).attr("fill","#fff").text(c>9?"9+":c)}});let aj=X.append("g").selectAll("circle").data(x).join("circle").attr("r",V).attr("fill",a=>a.id===O?"#fff":f[a.tier]||"#666").attr("fill-opacity",a=>a.degree>=3?.55:2===a.degree?.75:1).attr("stroke",a=>a.id===O?"#FFD700":a.is_catalyst?"#00ff88":"none").attr("stroke-width",a=>a.id===O?3:2.5*!!a.is_catalyst).style("cursor","pointer").on("click",(a,b)=>{b.id!==O&&(ad(b.id),e(b))}),ak=j.select("body").append("div").attr("class","graph-tooltip").style("position","fixed").style("top","0px").style("left","0px").style("background","rgba(0,0,0,0.92)").style("color","#fff").style("padding","8px 12px").style("border-radius","6px").style("font-size","12px").style("pointer-events","none").style("opacity",0).style("z-index",1e3).style("border","1px solid rgba(255,255,255,0.2)").style("max-width","280px"),al=j.select("body").append("div").attr("class","graph-tooltip").style("position","fixed").style("top","0px").style("left","0px").style("pointer-events","none").style("opacity",0).style("z-index",1001).style("transition","opacity 0.15s");aj.on("mouseover",function(a,b){if(R(this,1.5*V(b)),b.profile_image_url&&b.id!==O){var c;let d,e=Math.max(48,5*V(b));al.style("opacity",1),c=f[b.tier]||"#555",al.selectAll("*").remove(),(d=(0,H.localPhoto)(b.profile_image_url))?al.append("img").attr("src",d).style("width",e+"px").style("height",e+"px").style("border-radius","50%").style("object-fit","cover").style("border",`2px solid ${c}`).style("display","block").on("error",function(){this.parentElement.style.display="none"}):al.style("opacity",0),al.style("left",a.clientX-e/2+"px").style("top",a.clientY-e-8+"px"),ak.style("opacity",1).html(`<strong>${N(b.name)}</strong>`).style("left",a.clientX-40+"px").style("top",a.clientY+12+"px").style("text-align","center").style("min-width","80px")}else ak.style("opacity",1).html(`<strong>${N(b.name)}</strong>${b.company?"<br/>"+N(b.company):""}${b.tier?"<br/>Tier: "+N(b.tier):""}`).style("left",a.clientX+12+"px").style("top",a.clientY-10+"px")}).on("mousemove",function(a,b){if(b.profile_image_url&&b.id!==O){let c=Math.max(48,5*V(b));al.style("left",a.clientX-c/2+"px").style("top",a.clientY-c-8+"px"),ak.style("left",a.clientX-40+"px").style("top",a.clientY+12+"px")}else ak.style("left",a.clientX+12+"px").style("top",a.clientY-10+"px")}).on("mouseout",function(a,b){R(this,V(b)),ak.style("opacity",0),al.style("opacity",0)}),m=aj,u=ae,w=O,m.call(G().on("start",(a,b)=>{a.active||u.alphaTarget(.3).restart(),b.fx=b.x,b.fy=b.y}).on("drag",(a,b)=>{b.fx=a.x,b.fy=a.y}).on("end",(a,b)=>{a.active||u.alphaTarget(0),b.id!==w&&(b.fx=null,b.fy=null)}));let am=X.append("g").selectAll("text").data(x.filter(a=>a.id===O||1===a.degree&&("S"===a.tier||a.is_catalyst))).join("text").text(a=>a.is_catalyst&&"S"!==a.tier?a.name+" ⚡":a.name).attr("font-size",a=>a.id===O?14:10).attr("font-weight",a=>a.id===O?700:500).attr("fill",a=>a.id===O?"#fff":a.is_catalyst?"#00ff88":f[a.tier]).attr("text-anchor","middle").attr("dy",a=>V(a)+14).style("pointer-events","none"),an=X.selectAll(".catalyst-ring");return ae.on("tick",()=>{af.attr("x1",a=>a.source.x).attr("y1",a=>a.source.y).attr("x2",a=>a.target.x).attr("y2",a=>a.target.y),aj.attr("cx",a=>a.x).attr("cy",a=>a.y),an.attr("cx",a=>a.x).attr("cy",a=>a.y),ai.attr("transform",a=>`translate(${a.x},${a.y})`),am.attr("x",a=>a.x).attr("y",a=>a.y),ac()}),{simulation:ae,resize:b=>{let d=I(Z??o.default(a.node()),c,b);c=b,_(p.identity.translate(d.x,d.y).scale(d.k),250)},select:ad}}(b,y.current,c,a,a=>E.current?.(a),e,f,i,A,g,w);return z.current=m,m.select(F.current),()=>{var a;m.simulation.stop(),b.interrupt(),z.current=null,("string"==typeof(a=".graph-tooltip")?new l.Selection([document.querySelectorAll(a)],[document.documentElement]):new l.Selection([(0,k.default)(a)],l.root)).remove()}},[a,e,S,w]),(0,b.jsxs)("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[(0,b.jsx)("style",{children:Q}),(0,b.jsx)("svg",{ref:x,width:C?.width??800,height:C?.height??600,style:{background:"#0a0a1a"}}),(0,b.jsx)("div",{ref:y,className:"galaxy-ring",style:{position:"absolute",left:0,top:0,display:"none",pointerEvents:"none",transformOrigin:"0 0"},children:(0,b.jsx)("div",{className:"galaxy-ring-pulse",style:{boxSizing:"border-box",border:"2.5px solid",borderRadius:"50%"}})}),(0,b.jsx)("div",{style:{position:"absolute",bottom:20,left:20,display:"flex",gap:12,fontSize:11,color:"#888"},children:Object.entries(e).map(([a,c])=>(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:c,display:"inline-block"}}),a]},a))})]})},modes:["network"],label:"Galaxy",icon:"🌌",desc:"Force-directed layout"},orbit:{component:U,modes:["degrees"],label:"Orbit",icon:"🪐",desc:"Tier orbits + circle dots; in Degrees, every mapped circle fanned out",allDegree2:!0},separation:{component:function({connections:a=[],degree2:d=[],fullDegree1:e=a,fullDegree2:f=d,onSelect:i,userName:j,selectedId:k,tierColors:l=aX}){let m=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),n=m?68:56,o=m?5:10,p=m?8:16,[q,r]=(0,c.useState)(""),s=(0,c.useDeferredValue)(q.trim().toLowerCase()),[t,u]=(0,c.useState)("power"),[v,w]=(0,c.useState)("all"),[x,y]=(0,c.useState)(()=>new Set),z=(0,g.default)(),[A,B]=(0,c.useState)(0),[C,D]=(0,c.useState)({w:0,h:800}),[E,F]=(0,c.useState)(null),G=(0,c.useRef)(null),H=(0,c.useCallback)(a=>{G.current=a,F(a)},[]),I=(0,c.useRef)(null),J=(0,c.useMemo)(()=>(0,W.separationPeople)(d,a),[d,a]),K=(0,c.useMemo)(()=>"ways"===t?[...J.people].sort(W.compareWaysIn):J.people,[J,t]),L=(0,c.useMemo)(()=>(0,W.routeIndex)(f),[f]),M=(0,c.useMemo)(()=>{let a=new Map;for(let b of J.people)a.set(b.key,aR(b.person,L.get(b.key)?.size||b.waysIn));return a},[J,L]),N=(0,c.useMemo)(()=>{let a=Object.fromEntries(aO.map(a=>[a.key,0]));for(let b of M.values())a[b.key]++;return a},[M]),O=(0,c.useCallback)((a,b)=>("all"===v||a.tier===v)&&(!x.size||x.has(M.get(a.key)?.key))&&(!b||a.haystack.includes(b)),[v,x,M]),P=(0,c.useMemo)(()=>s||"all"!==v||x.size?K.filter(a=>O(a,s)):K,[K,s,v,x,O]),Q=(0,c.useMemo)(()=>new Set(e.map(W.keyFor)),[e]),R=(0,c.useCallback)(a=>Q.has(a.key)?"connected":(0,h.hasRequest)(a.person,z)?"asked":null,[Q,z]),T=(0,c.useMemo)(()=>P.filter(a=>!R(a)).slice(0,o),[P,o,R]),U=(0,c.useMemo)(()=>P.reduce((a,b)=>a+ +!!R(b),0),[P,R]),V=null!=k?J.rowToKey.get(k)??null:null,X=(0,c.useRef)(i);(0,c.useEffect)(()=>{X.current=i});let Y=(0,c.useCallback)(a=>X.current?.(a.person),[]),Z=(0,c.useCallback)(a=>{a&&X.current?.(a)},[]);(0,c.useEffect)(()=>{if(!E)return;let a=new ResizeObserver(()=>{let a=Math.round(E.clientWidth),b=Math.round(E.clientHeight);D(c=>c.w===a&&c.h===b?c:{w:a,h:b})});return a.observe(E),()=>a.disconnect()},[E]);let $=Math.max(0,Math.min(980,C.w-2*p)),_=(0,c.useMemo)(()=>(0,W.summitLayout)(T,$||800,m),[T,$,m]),aa=m?58:40,ab=T.length?aa+_.height+12:0,ac=ab+28,ad=ac+P.length*n+72,ae=Math.max(0,Math.floor((A-ac)/n)-8),af=Math.min(P.length,ae+Math.ceil(C.h/n)+16),ag=(0,c.useCallback)(a=>{let b=16*Math.floor(a.currentTarget.scrollTop/16);B(a=>a===b?a:b)},[]),ah=(0,c.useCallback)(()=>{G.current&&(G.current.scrollTop=0),B(0)},[]);(0,c.useEffect)(()=>{let a=a=>{if("/"!==a.key||a.metaKey||a.ctrlKey||a.altKey)return;let b=a.target;b&&("INPUT"===b.tagName||"TEXTAREA"===b.tagName||"SELECT"===b.tagName||b.isContentEditable)||(a.preventDefault(),I.current?.focus())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);let ai=a=>{r(a),ah()},{summary:aj}=J,ak=!!s||"all"!==v||x.size>0,al=!j||/^you$/i.test(String(j).trim())?"You":(0,S.initialsFor)(j),am=P.slice(ae,af);return(0,b.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",background:"#0a0a1a",color:"#fff",overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{padding:"10px 56px 8px",flexShrink:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:800,background:"linear-gradient(135deg, #FFD700, #FF6B35)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Separation"}),(0,b.jsx)("span",{style:{fontSize:12,color:"#aaa"},children:m?`${a$(aj.people,"person","people")} \xb7 ${aZ(aj.byTier.S)} S \xb7 ${aZ(aj.multi)} with 2+ ways`:`${a$(aj.people,"person","people")} two steps away \xb7 ${aZ(aj.byTier.S)} S-tier \xb7 ${aZ(aj.multi)} reachable 2+ ways \xb7 through ${aZ(aj.bridges)} of your connections`})]}),(0,b.jsx)("div",{"aria-hidden":"true",style:{display:"flex",gap:1,height:6,borderRadius:3,overflow:"hidden",margin:"8px 0 6px",background:"rgba(255,255,255,0.04)"},children:W.TIERS.filter(a=>aj.byTier[a]>0).map(a=>(0,b.jsx)("div",{style:{flex:aj.byTier[a],background:l[a]||"#555"}},a))}),(0,b.jsx)("div",{style:{fontSize:11,color:"#777",lineHeight:1.4},children:m?"Ranks reachability, not people · lists scanned so far":"Ranked by each person’s own score (title, company, headline). It ranks reachability, not people. From the lists scanned so far."}),aj.peopleOnlyUnresolved>0&&(0,b.jsxs)("div",{style:{marginTop:8,padding:"8px 10px",borderRadius:8,fontSize:11.5,lineHeight:1.5,color:"#e8d9a0",background:"rgba(255,215,0,0.06)",border:"1px solid rgba(255,215,0,0.25)"},children:[a$(aj.peopleOnlyUnresolved,"of these people","of these people")," ","came only through ",a$(aj.onlyUnresolvedVia,"connection record","connection records")," ","that ",1===aj.onlyUnresolvedVia?"doesn’t":"don’t"," match anyone in your 1st-degree list, so who introduces you can’t be named. They’re still ranked."]})]}),(0,b.jsxs)("div",{style:{padding:"0 56px 10px",flexShrink:0,display:"flex",gap:8,flexDirection:m?"column":"row",alignItems:m?"stretch":"center",flexWrap:m?"nowrap":"wrap",borderBottom:"1px solid rgba(255,255,255,0.06)"},children:[(0,b.jsx)("input",{ref:I,type:"search",value:q,onChange:a=>ai(a.target.value),onKeyDown:a=>{if("Enter"===a.key){let a=q.trim().toLowerCase(),b=K.find(b=>O(b,a));b&&Y(b)}else"Escape"===a.key&&(q?ai(""):a.currentTarget.blur())},placeholder:"Search people, companies, or who knows them","aria-label":"Search people, companies, or who knows them",style:{flex:m?"none":"1 1 260px",minWidth:0,height:m?44:34,boxSizing:"border-box",padding:"0 12px",borderRadius:8,outline:"none",color:"#fff",fontSize:m?16:13,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.05)"}}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0,flexWrap:m?"nowrap":"wrap",overflowX:m?"auto":"visible",scrollbarWidth:"thin",flexShrink:+!m},children:[(0,b.jsx)("div",{role:"group","aria-label":"Order",style:{display:"flex",flexShrink:0,background:"rgba(255,255,255,0.06)",borderRadius:8,padding:2},children:[["power","Power"],["ways","Ways in"]].map(([a,c])=>(0,b.jsx)("button",{type:"button","aria-pressed":t===a,onClick:()=>{u(a),ah()},style:{height:m?40:30,padding:"0 12px",border:"none",borderRadius:6,cursor:"pointer",fontSize:12,fontWeight:700,whiteSpace:"nowrap",background:t===a?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:t===a?"#000":"#999"},children:c},a))}),(0,b.jsx)("span",{style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5},children:"Their tier"}),["all",...W.TIERS].map(a=>{let c=v===a,d="all"===a?"#fff":l[a]||"#888",e="all"===a?aj.people:aj.byTier[a];return(0,b.jsxs)("button",{type:"button","aria-pressed":c,onClick:()=>{w(a),ah()},style:{height:m?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${c?d:"rgba(255,255,255,0.1)"}`,background:c?`${"#fff"===d?"#ffffff":d}22`:"rgba(255,255,255,0.03)",color:c?d:"#999"},children:["all"===a?"All":a,(0,b.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:c?d:"#666",opacity:.85},children:aZ(e)})]},a)}),(0,b.jsx)("span",{title:a6,style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5,marginLeft:6,cursor:"help"},children:"Rarity"}),aO.map(a=>{let c=x.has(a.key);return(0,b.jsxs)("button",{type:"button","aria-pressed":c,onClick:()=>{var b;return b=a.key,void(y(a=>aT(a,b)),ah())},title:`${a.label}: ${a.range} mutual connection${"1"===a.range?"":"s"}. ${a6}`,style:{height:m?40:30,padding:"0 10px",borderRadius:15,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${c?a.color:"rgba(255,255,255,0.1)"}`,background:c?`${a.color}22`:"rgba(255,255,255,0.03)",color:c?a.color:"#999"},children:[a.label,(0,b.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:c?a.color:"#666",opacity:.85},children:aZ(N[a.key])})]},a.key)})]})]}),(0,b.jsx)("div",{ref:H,onScroll:ag,style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",position:"relative",padding:`0 ${p}px`},children:(0,b.jsxs)("div",{style:{position:"relative",maxWidth:980,margin:"0 auto",height:ad},children:[T.length>0&&(0,b.jsxs)("div",{style:{height:ab,boxSizing:"border-box",paddingTop:10},children:[(0,b.jsxs)("div",{style:{height:aa-10,overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:700,color:"#ddd",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:["Top ",aZ(T.length)," you haven’t asked, of ",aZ(P.length),ak?" shown":""," · every way in drawn"]}),(0,b.jsxs)("div",{style:{fontSize:10,color:"#777",marginTop:2,whiteSpace:m?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.35},children:[U>0&&(0,b.jsxs)("span",{style:{color:"#FFD700"},children:[aZ(U)," asked or connected, so it moved on · "]}),(0,b.jsx)("span",{style:{color:aW},children:"solid orange"})," = top-scored bridge · dashed = other routes · dot size = ways in"]})]}),$>0&&(0,b.jsx)(a2,{layout:_,selectedKey:V,tierColors:l,youLabel:al,isMobile:m,onPick:Y,onPickBridge:Z})]}),P.length>0&&(0,b.jsxs)("div",{style:{height:28,display:"grid",alignItems:"center",gap:10,padding:"0 12px 0 15px",gridTemplateColumns:m?"44px 36px 1fr 44px":"64px 36px minmax(0,1.4fr) minmax(0,1fr) 96px 44px",fontSize:9,fontWeight:700,color:"#555",textTransform:"uppercase",letterSpacing:.5,borderBottom:"1px solid rgba(255,255,255,0.08)",boxSizing:"border-box"},children:[(0,b.jsx)("span",{title:"Rank by score, then ways in. = means tied",children:"#"}),(0,b.jsx)("span",{}),m?(0,b.jsx)("span",{children:"Person · way in"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"Person"}),(0,b.jsx)("span",{children:"Way in"}),(0,b.jsx)("span",{children:"Power"})]}),(0,b.jsx)("span",{style:{textAlign:"right"},children:m?"Score":""})]}),am.map((a,c)=>(0,b.jsx)(a7,{p:a,top:ac+(ae+c)*n,height:n,isMobile:m,selected:a.key===V,tierColors:l,onPick:Y,q:s,status:R(a),rarity:M.get(a.key)},a.key)),0===P.length&&(0,b.jsxs)("div",{style:{position:"absolute",top:40,left:0,right:0,textAlign:"center",color:"#888",fontSize:13,padding:"0 16px"},children:[s?(0,b.jsxs)(b.Fragment,{children:["No one matches ‘",q.trim(),"’. Search covers names, headlines, companies and who knows them."]}):(0,b.jsx)(b.Fragment,{children:"No one here with those filters."}),(0,b.jsx)("div",{style:{marginTop:12},children:(0,b.jsx)("button",{type:"button",onClick:()=>{r(""),w("all"),y(new Set),ah()},style:{padding:"8px 16px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,255,255,0.15)",background:"rgba(255,255,255,0.06)",color:"#fff"},children:"Clear"})})]})]})})]})},modes:["degrees"],label:"Separation",icon:"🏆",desc:"Every 2nd degree, ranked · every way in"},chain:{component:function({connections:a,degree2:d=[],onSelect:f,userName:h,fullDegree1:i,fullDegree2:j,scanNotes:k,canScan:l=!0,chainOpen:m=null,onChainOpened:n}){let o=(0,c.useRef)(null),[p,q]=(0,c.useState)(null),[r,s]=(0,c.useState)(1.3),[t,u]=(0,c.useState)({w:800,h:600}),v=i||a,w=j||d,[x,y]=(0,c.useState)(()=>(function(a,b){if(!a)return[];let c=b.find(b=>b.id===a);if(!c)return[];let d=c.unlocked_from_bridge_id;return null!=d&&b.some(a=>a.id===d)?[d,a]:[a]})(m,v));(0,c.useEffect)(()=>{m&&n?.()},[m,n]);let z=(0,c.useSyncExternalStore)(l?e.watchScanner:at,ar,as),A=(0,c.useSyncExternalStore)(au,av,aw),B=(0,g.default)();(0,c.useEffect)(()=>{let a=o.current;if(!a)return;let b=()=>{let b=Math.round(a.clientWidth),c=Math.round(a.clientHeight);u(a=>a.w===b&&a.h===c?a:{w:b,h:c})},c=new ResizeObserver(b);return c.observe(a),b(),()=>c.disconnect()},[]);let C=(0,c.useMemo)(()=>Y(v,w),[v,w]),D=(0,c.useMemo)(()=>(0,J.reachIndex)(v,w,k),[v,w,k]),E=(0,c.useMemo)(()=>(0,J.readyByCircle)(D),[D]),F=(0,c.useMemo)(()=>(function(a=[],b=[]){let c=ah(a,b),d=0,e=0;for(let a of c.values())d+=a.reach,e+=a.only;return d?1-e/d:0})(j||d,i||a),[j,d,i,a]),G=(0,c.useMemo)(()=>{let a=new Map;for(let b of w)a.set(b.id,b);for(let b of v)a.set(b.id,b);return a},[v,w]),I=[];for(let a of x){let b=G.get(a);if(!b)break;I.push(b)}let N=I.length>0;(0,c.useEffect)(()=>{if(!N)return;let a=a=>{"Escape"!==a.key||/^(INPUT|TEXTAREA|SELECT)$/.test(a.target?.tagName||"")||document.querySelector('[role="dialog"][aria-modal="true"]')||y(a=>a.slice(0,-1))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[N]);let O={};d.forEach(a=>{a.source_connection_id&&(O[a.source_connection_id]||(O[a.source_connection_id]=[]),O[a.source_connection_id].push(a))});let P=a.filter(a=>O[a.id]&&O[a.id].length>0).sort((a,b)=>(O[b.id]?.length||0)-(O[a.id]?.length||0)),Q=t.w/2,R=t.h/2,S=Math.min(Q,R)-30,T=ae(P.length,{inner:.55*S,innerMin:.4*S,outer:.62*S,spacing:46,minSpacing:20}),U=P.map((a,b)=>{let c=T.points[b];return{...a,x:Q+c.x,y:R+c.y,angle:c.angle,clusterSize:(O[a.id]||[]).length}}),V=(0,c.useRef)([]);(0,c.useEffect)(()=>{V.current=U.map(a=>({id:a.id,angle:a.angle}))});let W=(0,c.useRef)(0);if((0,c.useEffect)(()=>{let a=o.current;if(!a||N)return;let b=(b,c)=>{let d=a.getBoundingClientRect(),e=b-d.left,f=Math.atan2(c-d.top-t.h/2,e-t.w/2),g=null,h=1/0;return V.current.forEach(a=>{let b=Math.abs(f-a.angle)%(2*Math.PI);b>Math.PI&&(b=2*Math.PI-b),b<h&&(h=b,g=a.id)}),g},c=a=>{if(a.touches[0]){let c=b(a.touches[0].clientX,a.touches[0].clientY);c&&q(c)}},d=a=>{a.preventDefault();let c=Date.now();if(!(c-W.current<16)&&(W.current=c,a.touches[0])){let c=b(a.touches[0].clientX,a.touches[0].clientY);c&&q(c)}};return a.addEventListener("touchstart",c,{passive:!1}),a.addEventListener("touchmove",d,{passive:!1}),()=>{a.removeEventListener("touchstart",c),a.removeEventListener("touchmove",d)}},[t,r,N]),N)return(0,b.jsx)("div",{ref:o,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:(0,b.jsx)(aC,{trail:I,index:C,reach:D,dims:t,requests:B,scanningId:z,still:A,canScan:l,onOpen:a=>y(I.map(a=>a.id).concat(a)),onBack:a=>y(I.slice(0,a).map(a=>a.id)),onSelect:f},I.map(a=>a.id).join(">"))});let X=d.length,Z=d.filter(a=>"S"===a.tier).length,$=d.filter(a=>"A"===a.tier).length,_=p?U.find(a=>a.id===p):null;return(0,b.jsxs)("div",{ref:o,style:{flex:1,background:"#0a0a1a",position:"relative",overflow:"hidden"},children:[(0,b.jsx)("svg",{width:t.w,height:t.h,children:(0,b.jsxs)("g",{transform:`translate(${Q*(1-r)}, ${R*(1-r)}) scale(${r})`,children:[(0,b.jsx)("circle",{cx:Q,cy:R,r:.55*S,fill:"none",stroke:`${aj[1]}10`,strokeWidth:1}),_&&(0,b.jsx)(ay,{bridge:_,members:ax(_,C),reach:D,cx:Q,cy:R,maxR:S,still:A,band:function(a,b=[],c=34){let d=Math.max(0,...b.map(a=>a.radius)),e=Math.max(.66*a,d?d+c:0);return{inner:e,outer:Math.max(.8*a,e+.14*a)}}(S,T.rings)}),U.map(a=>{let c,d=p===a.id,e=(O[a.id]||[]).filter(a=>"S"===a.tier).length,f=(O[a.id]||[]).filter(a=>"A"===a.tier).length,g=E.get(a.id)||0;return(0,b.jsxs)("g",{onClick:()=>{q(null),y([a.id])},onMouseEnter:()=>q(a.id),onMouseLeave:()=>q(null),style:{cursor:"pointer"},children:[(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?20:16,fill:`${ai[a.tier]}08`,stroke:`${ai[a.tier]}${d?"60":"25"}`,strokeWidth:1}),null==(c=(0,J.scanBars)(a,D))?null:(0,b.jsxs)("g",{transform:`translate(${a.x} ${a.y})`,pointerEvents:"none",children:[K((d?20:16)+3.5).map(a=>(0,b.jsx)("path",{d:a.d,fill:"none",strokeLinecap:"round",strokeWidth:1.6,stroke:a.i<c?L:M},a.i)),(0,b.jsx)("title",{children:5===c?"Their whole list is scanned":`About ${20*c}% of their list is scanned`})]}),(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?13:11,fill:(0,H.localPhoto)(a.profile_image_url)?"#1a1a2e":ai[a.tier],stroke:d?"#fff":ai[a.tier],strokeWidth:d?2.5:2}),(0,H.localPhoto)(a.profile_image_url)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("clipPath",{id:"bc-"+a.id,children:(0,b.jsx)("circle",{cx:a.x,cy:a.y,r:d?11:9})}),(0,b.jsx)("image",{href:(0,H.localPhoto)(a.profile_image_url),x:a.x-(d?11:9),y:a.y-(d?11:9),width:d?22:18,height:d?22:18,clipPath:`url(#bc-${a.id})`})]}),!(0,H.localPhoto)(a.profile_image_url)&&(0,b.jsx)("text",{x:a.x,y:a.y+4,textAnchor:"middle",fill:"S"===a.tier?"#000":"#fff",fontSize:11,fontWeight:700,children:a.name?.charAt(0)}),g>0&&(0,b.jsxs)("g",{children:[(0,b.jsx)("title",{children:`${g} you reached through ${ao(a)}’s circle ${1===g?"is":"are"} ready for a scan`}),(0,b.jsx)("rect",{x:a.x+7,y:a.y-21,width:g>9?40:34,height:11,rx:5.5,fill:"rgba(0,255,136,0.16)",stroke:al,strokeWidth:.6}),(0,b.jsxs)("text",{x:a.x+7+(g>9?20:17),y:a.y-13,textAnchor:"middle",fill:al,fontSize:7,fontWeight:800,children:[g," ready"]})]}),(0,b.jsx)("text",{x:a.x,y:a.y+(d?24:22),textAnchor:"middle",fill:"#fff",fontSize:9,fontWeight:600,children:a.name?.split(" ")[0]}),(0,b.jsxs)("text",{x:a.x,y:a.y+(d?34:32),textAnchor:"middle",fill:"#888",fontSize:7,children:[a.clusterSize," · ",e>0?e+"S ":"",f>0?f+"A":""]})]},"b-"+a.id)}),(0,b.jsx)("circle",{cx:Q,cy:R,r:22,fill:"#0a0a1a",stroke:"#FFD700",strokeWidth:3}),(0,b.jsx)("text",{x:Q,y:R+4,textAnchor:"middle",fill:"#FFD700",fontSize:11,fontWeight:800,children:h?.split(" ")[0]||"YOU"})]})}),(0,b.jsx)(aB,{onIn:()=>s(a=>Math.min(3,a+.3)),onReset:()=>s(1.3),onOut:()=>s(a=>Math.max(.4,a-.3))}),(0,b.jsxs)("div",{style:{position:"absolute",bottom:16,left:12,background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"10px 14px",backdropFilter:"blur(12px)",border:"1px solid rgba(255,255,255,0.06)",maxWidth:"calc(100vw - 80px)"},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1.5,marginBottom:8},children:"DEGREES OF SEPARATION"}),(0,b.jsx)("div",{style:{display:"flex",gap:8},children:[1,2,3,4,5,6].map(c=>(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsxs)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:11,fontWeight:800,display:"flex",alignItems:"center",justifyContent:"center",background:c<=2?aj[c]:"rgba(255,255,255,0.04)",color:c<=2?"#000":"#333",border:c<=2?"none":"1px solid rgba(255,255,255,0.08)",boxShadow:c<=2?`0 0 6px ${aj[c]}30`:"none"},children:["D",c]}),(0,b.jsx)("div",{style:{fontSize:7,color:c<=2?"#aaa":"#333",marginTop:3},children:1===c?a.length:2===c?X:"—"})]},c))}),(0,b.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:8},children:[P.length," bridges · ",Z," S + ",$," A at 2nd degree"]}),F>0&&(0,b.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:4},title:"The share of everyone you reach through a circle that more than one of your connections reaches",children:[Math.round(100*F),"% of your 2nd degree you reach two or more ways"]}),(0,b.jsx)("div",{style:{fontSize:8,color:"#444",marginTop:4},children:"Click a bridge to open their circle, then anyone in it to open theirs"})]})]})},modes:["degrees"],label:"Bridge Chains",icon:"🔗",desc:"Degree paths"},rings:{component:function({connections:a,degree2:d=[],onSelect:e,mode:f}){let[g,h]=(0,c.useState)(null);if("degrees"===f&&d.length>0){let c={};d.forEach(a=>{a.source_connection_id&&(c[a.source_connection_id]||(c[a.source_connection_id]=[]),c[a.source_connection_id].push(a))});let f=Object.entries(c).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length,value:3*e+2*f+c.length}}).filter(Boolean).sort((a,b)=>b.value-a.value),i={S:36,A:28,B:22,C:16,D:12};return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:f.map((a,c)=>{let d={};return aN.forEach(a=>{d[a]=[]}),a.members.forEach(a=>{(d[a.tier]||d.D).push(a)}),aN.forEach(a=>{d[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}),(0,b.jsxs)("div",{style:{marginBottom:30},children:[(0,b.jsx)("div",{style:{textAlign:"center",marginBottom:12},children:(0,b.jsxs)("div",{onClick:()=>e&&e(a.bridge),onMouseEnter:()=>h(a.bridge.id),onMouseLeave:()=>h(null),style:{display:"inline-block",cursor:"pointer",position:"relative"},children:[(0,b.jsx)("div",{style:{width:56,height:56,borderRadius:"50%",margin:"0 auto",border:`3px solid ${aM[a.bridge.tier]}`,overflow:"hidden",background:"#1a1a2e",boxShadow:g===a.bridge.id?`0 0 20px ${aM[a.bridge.tier]}60`:`0 0 10px ${aM[a.bridge.tier]}20`,transition:"box-shadow 0.2s"},children:(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,b.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:aM[a.bridge.tier],color:"S"===a.bridge.tier?"#000":"#fff",fontSize:20,fontWeight:800},children:a.bridge.name?.charAt(0)})}),(0,b.jsx)("div",{style:{fontSize:12,fontWeight:700,color:"#fff",marginTop:4},children:a.bridge.name}),(0,b.jsxs)("div",{style:{fontSize:9,color:aM[a.bridge.tier],fontWeight:600},children:[a.bridge.tier,"-Tier · ",a.total," connections · ",a.sCount>0?a.sCount+"S ":"",a.aCount>0?a.aCount+"A":""]})]})}),aN.map(a=>{let c=d[a];if(0===c.length)return null;let f=i[a],j="S"===a?10:"A"===a?6:4;return(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:j},children:c.map(c=>{let d=g===c.id;return(0,b.jsxs)("div",{onClick:()=>e&&e(c),onMouseEnter:()=>h(c.id),onMouseLeave:()=>h(null),style:{position:"relative",cursor:"pointer"},children:[(0,b.jsx)("div",{style:{width:f,height:f,borderRadius:"50%",border:`2px solid ${aM[a]}`,overflow:"hidden",background:(0,H.localPhoto)(c.profile_image_url)?"#111":aM[a],transition:"transform 0.15s, box-shadow 0.15s",transform:d?"scale(1.3)":"scale(1)",boxShadow:d?`0 0 12px ${aM[a]}60`:"none"},children:(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:b=>{b.target.style.display="none",b.target.parentElement.style.background=aM[a]}}):(0,b.jsx)("span",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",fontSize:.4*f,fontWeight:700,color:"S"===a?"#000":"#fff"},children:c.name?.charAt(0)})}),("S"===a||d)&&(0,b.jsx)("div",{style:{position:"absolute",top:f+2,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:(0,b.jsxs)("div",{style:{fontSize:d?10:8,fontWeight:600,color:d?"#fff":"#aaa",background:d?"rgba(0,0,0,0.85)":"transparent",padding:d?"3px 8px":0,borderRadius:4},children:[c.name?.split(" ")[0],d&&(0,b.jsx)("span",{style:{color:aM[a],marginLeft:4},children:parseFloat(c.power_score||0).toFixed(1)})]})})]},c.id)})}),(0,b.jsx)("div",{style:{height:1,margin:"6px auto 0",width:`${40+10*aN.indexOf(a)}%`,background:`linear-gradient(90deg, transparent, ${aM[a]}20, transparent)`}})]},a)})]},a.bridge.id)})})})}let i={};aN.forEach(a=>{i[a]=[]}),a.forEach(a=>{let b=a.tier||"D";i[b]&&i[b].push(a)}),aN.forEach(a=>{i[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))});let j={S:44,A:34,B:26,C:20,D:16};return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",background:"#0a0a1a",padding:"20px 10px"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:aN.map((a,c)=>{let d=i[a];if(0===d.length)return null;let f=j[a],k="S"===a?12:"A"===a?8:"B"===a?6:4;return(0,b.jsxs)("div",{style:{marginBottom:"S"===a?20:"A"===a?16:10},children:[(0,b.jsxs)("div",{style:{textAlign:"center",marginBottom:8,fontSize:"S"===a?14:11,fontWeight:700,color:aM[a],opacity:"S"===a?1:.7},children:["S"===a&&"👑 ",a,"-Tier (",d.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:k,padding:"0 20px"},children:d.map(c=>{let d=g===c.id;return(0,b.jsxs)("div",{onClick:()=>e&&e(c),onMouseEnter:()=>h(c.id),onMouseLeave:()=>h(null),style:{position:"relative",cursor:"pointer"},children:[(0,b.jsx)("div",{style:{width:f,height:f,borderRadius:"50%",border:`2px solid ${aM[a]}`,overflow:"hidden",background:(0,H.localPhoto)(c.profile_image_url)?"#111":aM[a],display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.15s, box-shadow 0.15s",transform:d?"scale(1.3)":"scale(1)",boxShadow:d?`0 0 16px ${aM[a]}60`:"none",zIndex:d?10:1,position:"relative"},children:(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:b=>{b.target.style.display="none",b.target.parentElement.style.background=aM[a]}}):(0,b.jsx)("span",{style:{fontSize:.4*f,fontWeight:700,color:"S"===a?"#000":"#fff"},children:c.name?.charAt(0)})}),("S"===a||d)&&(0,b.jsxs)("div",{style:{position:"absolute",top:f+4,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:[(0,b.jsxs)("div",{style:{fontSize:"S"===a?9:10,fontWeight:600,color:d?"#fff":"#aaa",background:d?"rgba(0,0,0,0.85)":"transparent",padding:d?"3px 8px":0,borderRadius:4},children:[c.name?.split(" ")[0],d&&(0,b.jsx)("span",{style:{color:aM[a],marginLeft:4,fontWeight:800},children:parseFloat(c.power_score||0).toFixed(1)})]}),d&&c.headline&&(0,b.jsx)("div",{style:{fontSize:8,color:"#888",marginTop:2,background:"rgba(0,0,0,0.85)",padding:"2px 6px",borderRadius:3,maxWidth:160,overflow:"hidden",textOverflow:"ellipsis"},children:c.headline.substring(0,40)})]})]},c.id)})}),c<aN.length-1&&(0,b.jsx)("div",{style:{height:1,margin:"12px auto 0",width:`${50+12*c}%`,background:`linear-gradient(90deg, transparent, ${aM[a]}30, transparent)`}})]},a)})})})},modes:["network","degrees"],label:"Pyramid",icon:"🔺",desc:"Tier hierarchy"},list:{component:function({connections:a,degree2:c=[],onSelect:d,mode:e}){if("degrees"===e){let e={};c.forEach(a=>{a.source_connection_id&&(e[a.source_connection_id]||(e[a.source_connection_id]=[]),e[a.source_connection_id].push(a))});let f=Object.entries(e).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length,g=3*e+2*f+c.length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length,value:g}}).filter(Boolean).sort((a,b)=>b.value-a.value);return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,b.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"40px 1fr 50px 50px 50px 80px",gap:8,padding:"8px 12px",fontSize:9,fontWeight:700,color:"#555",borderBottom:"1px solid rgba(255,255,255,0.1)",textTransform:"uppercase",letterSpacing:.5},children:[(0,b.jsx)("span",{children:"#"}),(0,b.jsx)("span",{children:"Bridge"}),(0,b.jsx)("span",{children:"S"}),(0,b.jsx)("span",{children:"A"}),(0,b.jsx)("span",{children:"Total"}),(0,b.jsx)("span",{children:"Value"})]}),f.map((a,c)=>(0,b.jsxs)("div",{onClick:()=>d&&d(a.bridge),style:{display:"grid",gridTemplateColumns:"40px 1fr 50px 50px 50px 80px",gap:8,padding:"10px 12px",alignItems:"center",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)",transition:"background 0.1s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#444"},children:c+1}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${aL[a.bridge.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:aL[a.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.name}),(0,b.jsxs)("div",{style:{fontSize:9,color:aL[a.bridge.tier],fontWeight:600},children:[a.bridge.tier,"-Tier"]})]})]}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:800,color:"#FFD700"},children:a.sCount}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:700,color:"#9B59B6"},children:a.aCount}),(0,b.jsx)("span",{style:{fontSize:12,color:"#888"},children:a.total}),(0,b.jsx)("div",{children:(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:`linear-gradient(90deg, ${aL[a.bridge.tier]}, #FF6B35)`,width:`${Math.min(100,a.value/Math.max(f[0]?.value||1,1)*100)}%`}})})})]},a.bridge.id))]})})}let f=[...a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)),g=parseFloat(f[0]?.power_score)||10;return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"#0a0a1a"},children:(0,b.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"40px 36px 1fr 60px 120px",gap:8,padding:"8px 12px",fontSize:9,fontWeight:700,color:"#555",borderBottom:"1px solid rgba(255,255,255,0.1)",textTransform:"uppercase",letterSpacing:.5},children:[(0,b.jsx)("span",{children:"#"}),(0,b.jsx)("span",{}),(0,b.jsx)("span",{children:"Name"}),(0,b.jsx)("span",{children:"Score"}),(0,b.jsx)("span",{children:"Power"})]}),f.map((a,c)=>(0,b.jsxs)("div",{onClick:()=>d&&d(a),style:{display:"grid",gridTemplateColumns:"40px 36px 1fr 60px 120px",gap:8,padding:"8px 12px",alignItems:"center",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)",background:c<3?`${aL[a.tier]}08`:"transparent",transition:"background 0.1s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:b=>b.currentTarget.style.background=c<3?`${aL[a.tier]}08`:"transparent",children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700,color:c<3?aL[a.tier]:"#444"},children:c+1}),(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aL[a.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:10,fontWeight:700,background:aL[a.tier],color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:800,color:aL[a.tier]},children:parseFloat(a.power_score||0).toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:a.tier})]}),(0,b.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:3,background:aL[a.tier],width:`${parseFloat(a.power_score||0)/g*100}%`}})})]},a.id))]})})},modes:["network","degrees"],label:"List",icon:"☰",desc:"Ranked power list"},grid:{component:function({connections:a,degree2:c=[],onSelect:d,mode:e}){if("degrees"===e){let e={};c.forEach(a=>{a.source_connection_id&&(e[a.source_connection_id]||(e[a.source_connection_id]=[]),e[a.source_connection_id].push(a))});let f=Object.entries(e).map(([b,c])=>{let d=a.find(a=>a.id===b);if(!d)return null;let e=c.filter(a=>"S"===a.tier).length,f=c.filter(a=>"A"===a.tier).length;return{bridge:d,members:c,sCount:e,aCount:f,total:c.length}}).filter(Boolean).sort((a,b)=>3*b.sCount+2*b.aCount+b.total-(3*a.sCount+2*a.aCount+a.total));return(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:12,maxWidth:1200,margin:"0 auto"},children:f.map(a=>(0,b.jsxs)("div",{onClick:()=>d&&d(a.bridge),style:{padding:16,borderRadius:12,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${aJ[a.bridge.tier]||"#333"}30`,borderLeft:`4px solid ${aJ[a.bridge.tier]||"#555"}`,transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aJ[a.bridge.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:40,height:40,borderRadius:"50%",fontSize:16,fontWeight:700,background:aJ[a.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:a.bridge.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.headline?.substring(0,40)})]}),(0,b.jsx)("span",{style:{fontSize:12,fontWeight:800,color:aJ[a.bridge.tier]},children:a.bridge.tier})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,fontSize:10},children:[a.sCount>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[a.sCount,"S"]}),a.aCount>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[a.aCount,"A"]}),(0,b.jsxs)("span",{style:{color:"#666"},children:[a.total," total"]})]}),(0,b.jsxs)("div",{style:{display:"flex",marginTop:8},children:[a.members.slice(0,8).map((a,c)=>(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:8,fontWeight:700,background:(0,H.localPhoto)(a.profile_image_url)?"transparent":aJ[a.tier]||"#333",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #0a0a1a",marginLeft:c>0?-6:0,position:"relative",zIndex:8-c,overflow:"hidden"},children:(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):a.name?.charAt(0)},a.id)),a.total>8&&(0,b.jsxs)("span",{style:{fontSize:9,color:"#555",marginLeft:4,alignSelf:"center"},children:["+",a.total-8]})]})]},a.bridge.id))})})}let f={};return aK.forEach(a=>{f[a]=[]}),a.forEach(a=>{let b=a.tier||"D";f[b]&&f[b].push(a)}),aK.forEach(a=>{f[a].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}),(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"#0a0a1a"},children:(0,b.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:aK.map(a=>{let c=f[a];return 0===c.length?null:(0,b.jsxs)("div",{style:{marginBottom:24},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0 10px",borderBottom:`2px solid ${aJ[a]}30`,marginBottom:10},children:[(0,b.jsx)("div",{style:{width:10,height:10,borderRadius:"50%",background:aJ[a]}}),(0,b.jsxs)("span",{style:{fontSize:15,fontWeight:800,color:aJ[a]},children:[a,"-Tier"]}),(0,b.jsx)("span",{style:{fontSize:12,color:"#555"},children:c.length})]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))",gap:8},children:c.map(c=>(0,b.jsxs)("div",{onClick:()=>d&&d(c),style:{padding:10,borderRadius:8,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${aJ[a]}20`,transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,H.localPhoto)(c.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(c.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",border:`2px solid ${aJ[a]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",fontSize:12,fontWeight:700,background:aJ[a],color:"S"===a?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:c.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.headline?.substring(0,30)})]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:6,alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,color:aJ[a]},children:parseFloat(c.power_score||0).toFixed(1)}),(0,b.jsx)("div",{style:{flex:1,marginLeft:8,height:3,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:2,background:aJ[a],width:`${Math.min(100,10*(parseFloat(c.power_score)||0))}%`}})})]})]},c.id))})]},a)})})})},modes:["network","degrees"],label:"Grid",icon:"▦",desc:"Cards"}},a9=["galaxy","chain","separation","orbit","rings","list"];function ba(a){return a9.filter(b=>a8[b]?.modes.includes(a)).map(a=>({key:a,...a8[a]}))}var bb=a.i(35112),bc=a.i(30889);let bd=/\/10, (your|sample) score\)/,be=/^(?:Former )?(?:Student · )?(.+?) \([\d.]+\) · (no company found|.+?) \(\d+(?:\.\d+)?\/10(?:[:,][^)]*)?\)/,bf={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},bg=["S","A","B","C","D"],bh="#00ff88";function bi({person:a,connections:d=[],degree2:e=[],tierColors:f=bf,onSelect:g,isRequested:h=X,canScan:i=!0}){let j=(0,c.useMemo)(()=>Y(d,e),[d,e]),k=(0,c.useMemo)(()=>(0,W.routeIndex)(e),[e]),{rings:l,totals:m}=(0,c.useMemo)(()=>(function(a,b,{maxDegree:c=6,isRequested:d=X}={}){let e=[],f={people:0,connected:0,requested:0};if(!a||!b)return{rings:e,totals:f};let g=new Set([(0,W.keyFor)(a)]),h=[a];for(let a=2;a<=c&&h.length;a++){let c=[],i=[];for(let a of h){let e=[];for(let c of b.introduced.get(a.id)||[]){let b=(0,W.keyFor)(c);g.has(b)||(g.add(b),e.push({row:c,key:b,parentId:a.id,state:"connected"}),i.push(c))}for(let c of b.circles.get(a.id)||[]){let b=(0,W.keyFor)(c);g.has(b)||(g.add(b),e.push({row:c,key:b,parentId:a.id,state:d(c)?"requested":null}))}e.sort($),c.push(...e)}if(!c.length)break;for(let a of c)f.people++,"connected"===a.state?f.connected++:"requested"===a.state&&f.requested++;e.push({degree:a,people:c}),h=i}return{rings:e,totals:f}})(a,j,{isRequested:h}),[a,j,h]),[n,o]=(0,c.useState)(()=>new Set),[p,q]=(0,c.useState)(()=>new Set),[r,s]=(0,c.useState)(!1),t=(0,c.useMemo)(()=>l.flatMap(a=>a.people.map(a=>{let b="connected"===a.state||1===a.row.degree?null:aR(a.row,k.get((0,W.keyFor)(a.row))?.size||1);return{key:a.key,tier:a.row.tier,rarity:b?.key??null,mutuals:b}})),[l,k]),u=(0,c.useMemo)(()=>new Map(t.map(a=>[a.key,a])),[t]),v=(0,c.useMemo)(()=>({tiers:n,rarities:p}),[n,p]),w=(0,c.useMemo)(()=>t.filter(a=>aS(a,v)).length,[t,v]),x=(0,c.useMemo)(()=>d.filter(a=>j.circles.has(a.id)).length,[d,j]),y=t.some(a=>a.mutuals?.from==="linkedin"),z=(0,c.useMemo)(()=>(function(a){let b,c,d,e;if(!a)return null;if(null==a.power_score||""===a.power_score||!a.tier)return{title:!1,company:!1,never:!0,companyName:null,reason:"They haven’t been scored yet."};let f=String(a.score_why||"").match(be);if(f)b=f[1],d=!(c="no company found"===f[2]?null:f[2])||!bd.test(a.score_why)&&!["known","data"].includes((0,bc.companyScore)(c).source);else{let e=(0,bc.scorePerson)(a);b=e.title.label,c=e.company||null,d=["none","default","network"].includes(e.companySource)}let g=b.startsWith("Audience of"),h="Title unclear"===b||b.includes("Works there");return(g&&(d=!1),h||d)?(e=h&&d?c?`Their headline doesn’t say their title, and the app doesn’t know ${c}.`:"Their headline names no title or company the app can read.":h?"Their headline doesn’t say their title.":c?`The app doesn’t know ${c}, so it counts as the middle of the scale.`:"The app couldn’t find where they work.",{title:h,company:d,never:!1,companyName:c,reason:e}):null})(a),[a]);if(!a)return null;if(!l.length){let c=a.name?.split(" ")[0]||"them";return(0,b.jsxs)("div",{style:z?{...bq,borderColor:"rgba(255,215,0,0.28)"}:bq,children:[(0,b.jsx)(bp,{children:"Their circle"}),z?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#d8ccb0",lineHeight:1.5,marginBottom:9*!!i},children:[(0,b.jsx)("b",{style:{color:"#FFD700"},children:"Their score is a guess."})," ",z.reason,i&&(0,b.jsxs)(b.Fragment,{children:[" Scanning ",c,"'s circle shows who you can reach through them, and a strong circle adds up to +2 to their score."]})]}),i&&(0,b.jsx)("button",{type:"button",onClick:bo,style:{width:"100%",padding:"8px 10px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,215,0,0.4)",background:"rgba(255,215,0,0.08)",color:"#FFD700"},children:"Scan their circle ↓"})]}):i?(0,b.jsxs)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:["Not scanned yet. Scan ",c,"'s circle below to see who they know, and everyone you reach through them after that."]}):(0,b.jsx)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:"Not scanned."})]})}let A=Object.fromEntries(bg.map(a=>[a,t.filter(b=>b.tier===a).length])),B=function(a=[]){let b=Object.fromEntries(aO.map(a=>[a.key,0]));for(let c of a)c?.rarity&&void 0!==b[c.rarity]&&b[c.rarity]++;return b}(t),C=n.size>0||p.size>0,D=(0,b.jsx)(bl,{tierColors:f,byTier:A,byRarity:B,tiers:n,rarities:p,onTier:a=>o(b=>aT(b,a)),onRarity:a=>q(b=>aT(b,a)),onClear:()=>{o(new Set),q(new Set)}}),E=(0,b.jsxs)("div",{style:{fontSize:9.5,color:"#777",lineHeight:1.45,marginTop:6},children:["Rarity is how many mutual connections lead to someone. It never changes a score."," ",y?"LinkedIn’s own count where a scan saved it; otherwise the ways in from your scans.":`Counted from the ${x} ${1===x?"circle":"circles"} you’ve scanned, so it can only go up as you scan more.`]});return(0,b.jsxs)("div",{style:bq,children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8},children:[(0,b.jsx)(bp,{children:"Their circle"}),(0,b.jsx)("button",{type:"button",onClick:()=>s(!0),style:bs,"aria-label":"Open the large map",children:"Enlarge ⤢"})]}),(0,b.jsx)("button",{type:"button",onClick:()=>s(!0),"aria-label":`${a.name}'s circle: open the large map`,style:{display:"block",width:"100%",padding:0,border:"none",background:"none",cursor:"zoom-in"},children:(0,b.jsx)(bj,{person:a,rings:l,facts:u,filter:v,tierColors:f,size:240})}),(0,b.jsx)(bk,{rings:l,totals:m,shown:C?w:null}),D,E,r&&(0,b.jsxs)(bn,{onClose:()=>s(!1),title:`${a.name}’s circle`,children:[(0,b.jsx)(bj,{person:a,rings:l,facts:u,filter:v,tierColors:f,size:640,labels:!0,onPick:a=>{s(!1),g?.(a)}}),(0,b.jsx)(bk,{rings:l,totals:m,shown:C?w:null}),D,(0,b.jsx)(bm,{}),E]})]})}function bj({person:a,rings:d,facts:e,filter:f,tierColors:g,size:h,labels:i=!1,onPick:j}){let k=(0,c.useMemo)(()=>(function(a=[],b=240){let c=b/2,d=a.length,e=a=>c*(1===d?.78:.4+a/(d-1)*.52),f=a.map(a=>{let b=new Map;for(let c of a.people)b.has(c.parentId)||b.set(c.parentId,[]),b.get(c.parentId).push(c);return b}),g=(a,b)=>f[a+1]?.get(b)||[],h=new Map;for(let b=d-1;b>=0;b--)for(let c of a[b].people){let a="connected"===c.state?g(b,c.row.id).reduce((a,b)=>a+h.get(b),0):0;h.set(c,Math.max(1,a))}let i=[],j=[],k=new Map,l=-Math.PI/2;for(let m=0;m<d;m++){let n=e(m);a[m].people;let o=Math.max(2.4,b/100),p=m===d-1&&d>1,q=(p?n-e(m-1):(m+1<d?e(m+1):.97*c)-n)*.45,r=Math.max(1,Math.floor(q/o)+1),s=r>1?(p?-1:1)*Math.min(1.2*o,q/(r-1)):0,t=(a,b)=>_(Math.ceil(a*o/Math.max(1e-9,n*b)),1,r),u=1,v=1/0,w=[];for(let[a,b]of f[m]){let[d,e]=0===m?[l,l+2*Math.PI]:k.get(a)||[l,l+2*Math.PI],f=b.reduce((a,b)=>a+h.get(b),0),g=t(b.length,e-d);u=Math.max(u,g),v=Math.min(v,n*(e-d)*g/Math.max(1,b.length));let i=0,j=d;for(let a of b){let b=(e-d)*h.get(a)/f,l=j+b/2,m=n+i++%g*s,o=c+m*Math.cos(l),p=c+m*Math.sin(l);w.push({...a,angle:l,x:o,y:p}),"connected"===a.state&&k.set(a.row.id,[j,j+b]),j+=b}}if(m+1<d){let a=e(m+1);for(let b of w){if("connected"!==b.state||!g(m,b.row.id).length)continue;let[d,e]=k.get(b.row.id),f=(d+e)/2;j.push({x1:b.x,y1:b.y,x2:c+a*Math.cos(f),y2:c+a*Math.sin(f)})}}let x=_(Math.min(.32*v,u>1?.42*Math.abs(s):1/0),.8,b/60);i.push({degree:a[m].degree,radius:n,dotR:x,rows:u,items:w})}return{size:b,center:{x:c,y:c},rings:i,spokes:j}})(d,h),[d,h]),l=k.center,m=h/240;return(0,b.jsxs)("svg",{viewBox:`0 0 ${h} ${h}`,width:"100%",style:{display:"block",maxWidth:h,margin:"0 auto"},role:"img","aria-label":`${a.name}'s circle, ${d.length} ${1===d.length?"ring":"rings"}`,children:[k.rings.map(a=>(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:a.radius,fill:"none",stroke:"rgba(255,255,255,0.07)",strokeWidth:.6*m}),(0,b.jsxs)("text",{x:l.x,y:l.y-a.radius-a.dotR-3*m,textAnchor:"middle",fontSize:6.5*m,fill:"#666",fontWeight:700,children:["D",a.degree]})]},a.degree)),k.spokes.map((a,c)=>(0,b.jsx)("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,stroke:"rgba(0,255,136,0.35)",strokeWidth:.7*m},c)),k.rings.map(a=>a.items.map(c=>{let d=e.get(c.key),h=aS(d,f),k=g[c.row.tier]||"#888",l="connected"===c.state?1.7*a.dotR:a.dotR,m=[`${c.row.name} \xb7 ${c.row.tier}-tier${null!=c.row.power_score?` \xb7 ${Number(c.row.power_score).toFixed(1)}`:""}`,"connected"===c.state?"You added them":"requested"===c.state?"Request sent":null,d?.mutuals?`${aQ(d.rarity)?.label}: ${d.mutuals.count} mutual${1===d.mutuals.count?"":"s"}${"scans"===d.mutuals.from?" (from your scans)":""}`:null].filter(Boolean).join("\n");return(0,b.jsxs)("g",{opacity:h?1:.12,style:j?{cursor:"pointer"}:void 0,onClick:j?a=>{a.stopPropagation(),j(c.row)}:void 0,children:[(0,b.jsx)("title",{children:m}),"requested"===c.state?(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:1.25*l,fill:"none",stroke:k,strokeWidth:Math.max(.5,.45*l),strokeDasharray:`${Math.max(.6,.55*l)} ${Math.max(.5,.45*l)}`}):(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:l,fill:k,stroke:"connected"===c.state?bh:"none",strokeWidth:Math.max(.6,.3*l)}),i&&"connected"===c.state&&(0,b.jsx)("text",{x:c.x,y:c.y-l-3,textAnchor:"middle",fontSize:9,fill:bh,fontWeight:700,children:String(c.row.name||"").split(" ")[0]})]},c.key)})),(0,b.jsx)("circle",{cx:l.x,cy:l.y,r:7*m,fill:g[a.tier]||"#888",stroke:"#fff",strokeWidth:.8*m}),(0,b.jsx)("text",{x:l.x,y:l.y+2.4*m,textAnchor:"middle",fontSize:6.5*m,fontWeight:800,fill:"S"===a.tier?"#000":"#fff",children:String(a.name||"?").charAt(0)})]})}function bk({rings:a,totals:c,shown:d}){return(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#aaa",marginTop:6,lineHeight:1.5},children:[a.map(a=>`D${a.degree} ${a.people.length.toLocaleString("en-US")}`).join(" · "),c.connected>0&&(0,b.jsxs)("span",{style:{color:bh},children:[" · you added ",c.connected]}),c.requested>0&&(0,b.jsxs)("span",{style:{color:"#FFD700"},children:[" · ",c.requested," ",1===c.requested?"request":"requests"," out"]}),null!=d&&(0,b.jsxs)("span",{style:{color:"#fff"},children:[" · ",d.toLocaleString("en-US")," shown"]})]})}function bl({tierColors:a,byTier:c,byRarity:d,tiers:e,rarities:f,onTier:g,onRarity:h,onClear:i}){let j=(a,b)=>({height:22,padding:"0 7px",borderRadius:11,cursor:"pointer",fontSize:10,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${a?b:"rgba(255,255,255,0.1)"}`,background:a?`${b}22`:"rgba(255,255,255,0.03)",color:a?b:"#999"});return(0,b.jsxs)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:5},children:[(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,b.jsx)("span",{style:br,children:"Tier"}),bg.map(d=>(0,b.jsxs)("button",{type:"button","aria-pressed":e.has(d),onClick:()=>g(d),style:j(e.has(d),a[d]||"#888"),children:[d," ",(0,b.jsx)("span",{style:{fontWeight:500,opacity:.8},children:c[d]})]},d))]}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,b.jsx)("span",{style:br,children:"Rarity"}),aO.map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":f.has(a.key),onClick:()=>h(a.key),title:`${a.label}: ${a.range} mutual connection${"1"===a.range?"":"s"}`,style:j(f.has(a.key),a.color),children:[a.label," ",(0,b.jsx)("span",{style:{fontWeight:500,opacity:.8},children:d[a.key]})]},a.key)),(e.size>0||f.size>0)&&(0,b.jsx)("button",{type:"button",onClick:i,style:bs,children:"Clear"})]})]})}function bm(){let a=(a,c)=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,marginRight:12,whiteSpace:"nowrap"},children:[a,c]});return(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#999",marginTop:8,lineHeight:1.8},children:[a((0,b.jsx)("svg",{width:"10",height:"10",children:(0,b.jsx)("circle",{cx:"5",cy:"5",r:"4",fill:"#FFD700"})}),"colour = tier"),a((0,b.jsx)("svg",{width:"12",height:"12",children:(0,b.jsx)("circle",{cx:"6",cy:"6",r:"4",fill:"#9B59B6",stroke:bh,strokeWidth:"1.5"})}),"you added them"),a((0,b.jsx)("svg",{width:"12",height:"12",children:(0,b.jsx)("circle",{cx:"6",cy:"6",r:"4.2",fill:"none",stroke:"#3498DB",strokeWidth:"1.4",strokeDasharray:"2 1.6"})}),"request sent")]})}function bn({title:a,onClose:d,children:e}){return(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&d()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]),(0,bb.createPortal)((0,b.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":a,onClick:d,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.78)",display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:(0,b.jsxs)("div",{onClick:a=>a.stopPropagation(),style:{width:"min(720px, 100%)",maxHeight:"100%",overflowY:"auto",boxSizing:"border-box",background:"#0f0c05",border:"1px solid rgba(255,215,0,0.18)",borderRadius:14,padding:16},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,b.jsx)("div",{style:{fontSize:14,fontWeight:800,color:"#fff"},children:a}),(0,b.jsx)("button",{type:"button",onClick:d,style:{...bs,fontSize:12},children:"Close ✕"})]}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"#888",marginBottom:8},children:"Click a dot to open that person."}),e]})}),document.body)}function bo(){let a=document.getElementById("scan-box");a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.animate?.([{boxShadow:"0 0 0 3px rgba(255,215,0,0.75)"},{boxShadow:"0 0 0 0 rgba(255,215,0,0)"}],{duration:1600}),a.querySelector("button:not([disabled])")?.focus({preventScroll:!0}))}function bp({children:a}){return(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,textTransform:"uppercase",marginBottom:6},children:a})}let bq={background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.07)",borderRadius:10,padding:10,marginBottom:16},br={fontSize:9,color:"#666",textTransform:"uppercase",letterSpacing:.5,width:38,flexShrink:0},bs={background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:0};var bt=a.i(75857);function bu({selected:a,stats:d,tierColors:e,connections:f,degree2:i=[],mode:j,collapsed:k,filter:l,pending:m=[],onToggle:n,onSelect:o,onSwitchMode:p,onFocusNode:q,onMarkSent:r,onUndoPending:s,scanNotes:t,csvSource:u=null}){let v,w,x="degrees"===j,y=!u,{userId:z,userProfile:A}=(0,bt.useUser)(),[B,C]=(0,c.useState)(""),D=(0,c.useMemo)(()=>{let a={};return i.forEach(b=>{b.source_connection_id&&(a[b.source_connection_id]||(a[b.source_connection_id]=[]),a[b.source_connection_id].push(b))}),a},[i]),E=(0,c.useMemo)(()=>(0,W.routeIndex)(i),[i]),F=(0,c.useMemo)(()=>ah(i,f),[i,f]),G=(0,c.useMemo)(()=>(function(a=[],b=[]){let c=ah(a,b),d=new Set((b||[]).map(W.keyFor)),e=new Map;for(let b of a||[]){let a=b?.source_connection_id;if(null==a)continue;let c=(0,W.keyFor)(b);if(d.has(c))continue;let f=e.get(c);f||e.set(c,f=new Set),f.add(a)}let f=new Map;for(let a of e.values()){if(a.size<2)continue;let b=[...a];for(let a=0;a<b.length;a++)for(let c=a+1;c<b.length;c++){let d=b[a]<b[c]?`${b[a]}|${b[c]}`:`${b[c]}|${b[a]}`;f.set(d,(f.get(d)||0)+1)}}let g=new Map;for(let[a,b]of f){let[d,e]=a.split("|"),f=c.get(d).total+c.get(e).total-b,h=f?b/f:0;for(let[a,c]of[[d,e],[e,d]]){let d=g.get(a);(!d||h>d.share)&&g.set(a,{with:c,share:h,shared:b})}}return g})(i,f),[i,f]),I=(0,c.useMemo)(()=>new Map(f.map(a=>[a.id,a])),[f]),J=(0,g.default)(),K=(0,c.useCallback)(a=>(0,h.hasRequest)(a,J),[J]);if(a){let c,d,g,j,l,m,q,r,s=1===a.degree&&D[a.id],t=D[a.id]||[],v=2===a.degree?(0,W.routesFor)(a,E,I):[];return(0,b.jsxs)(bv,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:()=>o&&o(null),style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Back to list"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8,letterSpacing:1,textTransform:"uppercase"},children:2===a.degree?"Degree 2 Connection":"Degree 1 Connection"}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,flexWrap:"wrap"},children:[(0,b.jsx)("div",{style:{background:2===a.degree?"#FF6B35":e[a.tier],color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:700},children:2===a.degree?`DEGREE 2 \xb7 TIER ${a.tier}`:`TIER ${a.tier}`}),a.unlocked_from_name&&(0,b.jsxs)("div",{style:{background:"rgba(52,152,219,0.08)",border:"1px solid rgba(52,152,219,0.28)",borderRadius:8,padding:"9px 11px",marginBottom:10,fontSize:11.5,color:"#8fb8d6",lineHeight:1.5},children:[1===a.degree?"You met them through ":"Reachable through ",(0,b.jsx)("b",{style:{color:"#cfe6f7"},children:a.unlocked_from_name})]}),a.is_catalyst&&(0,b.jsx)("div",{style:{background:"#00ff88",color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:800,letterSpacing:.5},children:"CATALYST"})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:a.name,style:{width:52,height:52,borderRadius:"50%",objectFit:"cover",border:`2px solid ${e[a.tier]||"#555"}`,flexShrink:0},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:52,height:52,borderRadius:"50%",flexShrink:0,background:e[a.tier]||"#555",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"S"===a.tier?"#000":"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("h2",{style:{fontSize:18,fontWeight:700,margin:0},children:a.name}),(0,b.jsx)("p",{style:{color:"#aaa",fontSize:11,margin:"3px 0 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,60)}),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{fontSize:10,color:"#0077B5",textDecoration:"none",fontWeight:600},children:"View on LinkedIn"})]})]}),1===a.degree&&(0,b.jsx)(bi,{person:a,connections:f,degree2:i,tierColors:e,onSelect:o,isRequested:K,canScan:y}),2!==a.degree&&(F.get(a.id)?.only>0||G.get(a.id)?.share>=.15&&G.get(a.id)?.shared>=3)&&(c=F.get(a.id),g=(d=G.get(a.id))&&d.share>=.15&&d.shared>=3&&f.find(a=>a.id===d.with),j=a.name?.split(" ")[0]||"them",(0,b.jsxs)("div",{style:{background:"rgba(0,255,136,0.05)",border:"1px solid rgba(0,255,136,0.2)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:700,marginBottom:4,letterSpacing:1},children:c?.only>0?`ONLY THROUGH ${j.toUpperCase()}`:`${j.toUpperCase()}’S CIRCLE`}),c?.only>0&&(0,b.jsxs)("div",{style:{fontSize:12,color:"#ccc",lineHeight:1.5},children:[(0,b.jsx)("strong",{style:{color:"#00ff88"},children:c.only.toLocaleString()})," of the ",c.total.toLocaleString()," people in ",j,"’s circle are reached by none of your other connections. ",j," is your only way to them."]}),g&&(0,b.jsxs)("div",{style:{fontSize:12,color:"#aab",lineHeight:1.5,marginTop:6*(c?.only>0)},children:["Opens the same doors as"," ",(0,b.jsx)("button",{onClick:()=>o?.(g),style:{background:"none",border:"none",padding:0,color:"#fff",fontWeight:700,cursor:"pointer",fontSize:12},children:g.name}),": ",Math.round(100*d.share),"% of the people either reaches, both do (",d.shared.toLocaleString(),")."]})]})),a.is_catalyst&&(0,b.jsxs)("div",{style:{background:"rgba(0,255,136,0.08)",border:"1px solid rgba(0,255,136,0.3)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:700,marginBottom:4,letterSpacing:1},children:"CATALYST NODE"}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#ccc"},children:["This person's network power exceeds their own tier. They connect to"," ",(0,b.jsxs)("strong",{style:{color:"#00ff88"},children:[a.catalyst_score," S+A tier"]})," ","people — making them a high-value stepping stone to reach elite connections."]})]}),2===a.degree&&v.length>0&&(0,b.jsx)(by,{routes:v,selected:a,tierColors:e,onSelect:o},a.id),(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.04)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:8},children:[(0,b.jsx)("span",{style:{fontSize:11,color:"#888",fontWeight:600,letterSpacing:1,textTransform:"uppercase"},children:"Score"}),(0,b.jsx)("span",{style:{fontSize:28,fontWeight:800,color:e[a.tier]||"#fff"},children:parseFloat(a.power_score).toFixed(1)})]}),a.score_why&&(0,b.jsx)("div",{style:{fontSize:11,color:"#aab7b7",lineHeight:1.5,marginBottom:10},children:a.score_why}),(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Title"}),(0,b.jsxs)("span",{children:[a.seniority_score||0,"/10"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${10*(a.seniority_score||0)}%`,background:e[a.tier]||"#FFD700",borderRadius:2}})})]}),(0,b.jsxs)("div",{style:{marginBottom:6*(a.circle_power>0)},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Company"}),(0,b.jsxs)("span",{children:[a.company_prestige_score||0,"/10"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${10*(a.company_prestige_score||0)}%`,background:"#3498DB",borderRadius:2}})})]}),a.circle_power>0&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,b.jsx)("span",{children:"Circle Power"}),(0,b.jsxs)("span",{style:{color:"#FF6B35"},children:[a.circle_s_count||0,"S · ",a.circle_a_count||0,"A"]})]}),(0,b.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.min(parseFloat(a.circle_power)/70*100,100)}%`,background:"#FF6B35",borderRadius:2}})})]})]}),(0,b.jsxs)("div",{style:{marginBottom:16},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FFD700",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:"Why This Matters"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11,color:"#ccc"},children:(function(a,b,c,d=[]){let e=[],f=(a.headline||"").toLowerCase(),g=(a.role||"").toLowerCase(),h=(a.company||"").toLowerCase(),i=b.sectors.map(a=>a.toLowerCase());g.match(/ceo|chief|founder|president|chairman/i)?e.push({icon:"👑",text:`${a.role} — C-suite executive, highest leverage contact`,color:"#FFD700"}):g.match(/vp|vice president|svp|evp|managing director/i)?e.push({icon:"⚡",text:`${a.role} — VP-level, strong decision-making authority`,color:"#FFD700"}):g.match(/director|head of|senior director/i)?e.push({icon:"🎯",text:`${a.role} — Senior leadership, controls team/budget`,color:"#FF6B35"}):g.match(/manager|lead|principal/i)&&e.push({icon:"📊",text:`${a.role} — Mid-senior, operational influence`,color:"#3498DB"});let{now:j,before:k}=(0,bc.topCompanies)(a);j&&e.push({icon:"🏢",text:`At ${j.name} (${j.score}/10) — top-tier company network access`,color:"#9B59B6"}),k&&e.push({icon:"📜",text:`Former ${k.name} (${k.score}/10) — carries network from previous role`,color:"#95A5A6"});let l=i.filter(a=>f.includes(a)||h.includes(a));l.length>0&&e.push({icon:"🔗",text:`Shared sector: ${l.join(", ")} — direct industry relevance to you`,color:"#2ECC71"});let m=c.filter(b=>b.source_connection_id===a.id).length;if(m>0){let b=c.filter(b=>b.source_connection_id===a.id&&"S"===b.tier).length;e.push({icon:"🌐",text:`Gateway to ${m} degree-2 connections${b>0?` (${b} S-tier)`:""}`,color:"#FF6B35"})}if(a.is_catalyst&&e.push({icon:"⚡",text:"Catalyst — network power exceeds personal tier, high stepping-stone value",color:"#00ff88"}),2===a.degree&&d.length>0){let a=d.filter(a=>a.bridge);if(1===d.length)e.push(a.length?{icon:"🤝",text:`Reachable via ${a[0].bridge.name} (${a[0].bridge.tier}-tier)`,color:"#3498DB"}:{icon:"🤝",text:"Reachable through a connection we can’t name",color:"#888"});else{let b=a.slice(0,2).map(a=>`${String(a.bridge.name||"").trim().split(/\s+/)[0]} (${a.bridge.tier})`),c=d.length-b.length,f=0===b.length?"connections we can’t name":c>0?`${b.join(", ")} and ${c} more`:b.join(" and ");e.push({icon:"🤝",text:`Reachable ${d.length} ways — via ${f}`,color:"#3498DB"})}}return 0===e.length&&e.push({icon:"📌",text:`${a.tier}-tier connection with ${parseFloat(a.power_score).toFixed(1)} power score`,color:"#888"}),e.slice(0,5)})(a,A||{name:"User",sectors:[],goals:[]},i,v).map((a,c)=>(0,b.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{color:a.color||"#888",fontSize:13,lineHeight:1},children:a.icon}),(0,b.jsx)("span",{children:a.text})]},c))})]}),a.company&&(0,b.jsxs)("div",{style:{marginBottom:8},children:[(0,b.jsx)("div",{style:{color:"#666",fontSize:10},children:"Company"}),(0,b.jsx)("div",{style:{fontWeight:600,fontSize:12},children:a.company})]}),a.role&&(0,b.jsxs)("div",{style:{marginBottom:12},children:[(0,b.jsx)("div",{style:{color:"#666",fontSize:10},children:"Role"}),(0,b.jsx)("div",{style:{fontSize:12},children:a.role})]}),s&&t.length>0&&(l=t.filter(a=>"S"===a.tier),m=t.filter(a=>"A"===a.tier),q=[...t].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)).slice(0,8),(0,b.jsxs)("div",{style:{marginBottom:16},children:[(0,b.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:["Cluster Overview — ",t.length," connections"]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,fontSize:10},children:[l.length>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[l.length," S-tier"]}),m.length>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[m.length," A-tier"]})]}),(0,b.jsxs)("a",{href:`/queue?bridge=${a.id}&groupBy=bridge`,style:{display:"block",textAlign:"center",padding:"8px 12px",marginBottom:10,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000",borderRadius:6,textDecoration:"none",fontWeight:700,fontSize:11},children:["Outlink Bridge → Add ",t.filter(a=>"S"===a.tier||"A"===a.tier||"B"===a.tier).length," People"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8},children:"Most valuable in this cluster:"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:q.map(a=>(0,b.jsxs)("div",{onClick:()=>o&&o(a),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 6px",borderRadius:4,cursor:"pointer",borderLeft:`2px solid ${e[a.tier]||"#555"}`,background:"rgba(255,255,255,0.03)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",flexShrink:0,fontSize:9,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,40)})]}),(0,b.jsx)("span",{style:{fontSize:9,color:e[a.tier],fontWeight:600,flexShrink:0},children:parseFloat(a.power_score).toFixed(1)})]},a.id))})]})),s&&t.length>0&&(0,b.jsxs)("div",{style:{marginTop:16},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["Gateway to ",t.length," degree-2 connections:"]}),t.sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)).slice(0,10).map(a=>(0,b.jsxs)("div",{style:{padding:"6px 8px",background:"rgba(255,107,53,0.08)",borderRadius:6,borderLeft:"3px solid #FF6B35",marginBottom:4,fontSize:12},children:[(0,b.jsx)("div",{style:{fontWeight:600},children:a.name}),(0,b.jsxs)("div",{style:{color:"#888",fontSize:11},children:[a.role,a.company?` @ ${a.company}`:""]}),(0,b.jsxs)("div",{style:{color:"#FF6B35",fontSize:10},children:["Score: ",parseFloat(a.power_score).toFixed(1)]})]},a.id))]}),!x&&s&&t.length>0&&p&&(0,b.jsxs)("button",{onClick:()=>{p("degrees")},style:{width:"100%",padding:"12px",borderRadius:8,border:"none",cursor:"pointer",background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000",fontWeight:700,fontSize:13,marginTop:12},children:["View Bridge → ",t.length," connections"]}),(2===a.degree||a.source_connection_id)&&1!==a.degree&&"unlocked"!==a.unlock_status&&(r=K(a),(0,b.jsxs)("div",{style:{background:"rgba(255,215,0,0.06)",border:`1px ${r?"dashed":"solid"} rgba(255,215,0,${r?.45:.25})`,borderRadius:10,padding:16,marginTop:16,textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#FFD700",fontWeight:700,letterSpacing:1,marginBottom:6},children:r?"REQUEST SENT":"LOCKED PATH"}),(0,b.jsx)("div",{style:{fontSize:13,color:"#ccc",marginBottom:12},children:r?`Waiting for ${a.name} to accept. The next scan of your own connections notices when they do.`:`Connect with ${a.name} to unlock their network and extend your six degrees.`}),(0,b.jsx)("div",{style:{width:"100%",height:60,background:"rgba(255,255,255,0.03)",borderRadius:8,border:"1px dashed rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,color:"#444",marginBottom:12},children:r?"[ Cluster Pending... ]":"[ Hidden Network ]"}),r?(0,b.jsx)("button",{onClick:()=>{(0,h.undoRequest)(a).catch(()=>{})},style:{background:"none",border:"none",color:"#888",fontSize:11,fontWeight:600,cursor:"pointer"},children:"Didn't send it? Undo"}):(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",padding:"10px 16px",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",borderRadius:8,textDecoration:"none",fontWeight:700,fontSize:13},onClick:()=>{(0,h.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{})},children:"Connect to Unlock Path"})]})),(1===a.degree||"accepted"===a.outreach_status)&&(y?(0,b.jsx)(bz,{selected:a,degree2:i},a.id):(0,b.jsx)(bA,{csvSource:u,style:{marginTop:16}})),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",textAlign:"center",padding:10,marginTop:16,background:"#0077B5",color:"#fff",borderRadius:8,textDecoration:"none",fontWeight:600,fontSize:13},children:"View LinkedIn Profile"})]})}if(x){let a,c,g,h;return(0,b.jsxs)(bv,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0,color:"#FF6B35"},children:"Degrees"}),(0,b.jsx)("p",{style:{fontSize:12,color:"#888",marginBottom:12},children:"Your bridge connections and who they unlock."}),y?(0,b.jsx)(bE,{connections:f,degree2:i,scanNotes:t,tierColors:e}):(0,b.jsx)(bA,{csvSource:u,style:{marginBottom:16}}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:12},children:[(0,b.jsx)(bw,{label:"Degree-2 Found",value:i.length}),(0,b.jsx)(bw,{label:"D2 S-Tier",value:d?.d2Tiers?.S||0}),(0,b.jsx)(bw,{label:"D2 A-Tier",value:d?.d2Tiers?.A||0}),(0,b.jsx)(bw,{label:"Bridges Used",value:Object.keys(D).length})]}),(0,b.jsxs)("div",{style:{position:"relative",marginBottom:16},children:[(0,b.jsx)("input",{type:"text",placeholder:"Search bridges or d2...",value:B,onChange:a=>C(a.target.value),style:{width:"100%",padding:"8px 12px",borderRadius:8,fontSize:12,border:"1px solid rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.05)",color:"#fff",outline:"none",boxSizing:"border-box"}}),B.length>=2&&(a=B.toLowerCase(),c=f.filter(b=>i.some(a=>a.source_connection_id===b.id)&&b.name.toLowerCase().includes(a)).slice(0,5),g=i.filter(b=>b.name?.toLowerCase().includes(a)).slice(0,5),0===(h=[...c.map(a=>({...a,_matchType:"bridge"})),...g.map(a=>({...a,_matchType:"d2"}))]).length?null:(0,b.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:50,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,overflow:"hidden",maxHeight:200,overflowY:"auto",boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:h.map(a=>(0,b.jsxs)("div",{onClick:()=>{o(a),C(""),q&&"bridge"===a._matchType&&q(a.id)},style:{padding:"8px 12px",cursor:"pointer",display:"flex",alignItems:"center",gap:8,borderBottom:"1px solid rgba(255,255,255,0.05)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover"}}):(0,b.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",background:e[a.tier]||"#555",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666"},children:"bridge"===a._matchType?"Bridge":"Degree-2"})]}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:e[a.tier]},children:a.tier})]},a.id))}))]}),"pending"===l&&m.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["⏳ Pending Requests (",m.length,")"]}),(0,b.jsx)("p",{style:{fontSize:10,color:"#666",marginBottom:10,lineHeight:1.4},children:"Friend requests you've sent. When accepted, their cluster unlocks for bridging."}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:m.map(a=>{let c=2===a.degree?f.find(b=>b.id===a.source_connection_id):null;return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"rgba(255,107,53,0.06)",borderRadius:8,border:"1px solid rgba(255,107,53,0.12)"},children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,40)}),c&&(0,b.jsxs)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:1},children:["via ",c.name?.split(" ")[0]]})]}),(0,b.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:800,color:e[a.tier]||"#888"},children:a.tier}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666"},children:parseFloat(a.power_score||0).toFixed(1)})]}),(0,b.jsx)("button",{onClick:()=>s&&s(a),title:"Remove from pending",style:{background:"none",border:"none",color:"#555",cursor:"pointer",fontSize:12,padding:2,flexShrink:0},children:"✕"})]},a.id)})})]}),"pending"!==l&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:"Most Valuable Clusters"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Object.entries(D).map(([a,b])=>{let c=f.find(b=>b.id===a);if(!c)return null;let d=b.length;if(0===d)return null;let e=b.filter(a=>"S"===a.tier),g=b.filter(a=>"A"===a.tier),h=b.filter(a=>"B"===a.tier),i=e.length,j=g.length,k=h.length,l=i>0?e.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/i:0,m=j>0?g.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/j:0,n=h.filter(a=>(parseFloat(a.power_score)||0)>=5).length,o=(i+j)/d,p=l/7*i*15+m/5.5*j*6+3*n+25*o+2*Math.log2(d+1)+10*!!c.is_catalyst,q=b.reduce((a,b)=>a+(parseFloat(b.power_score)||0),0)/d;return{bridge:c,members:d,sCount:i,aCount:j,bCount:k,risingCount:n,sAvgPower:l,avgPower:q,elitePct:o,clusterValue:p,sTier:e,aTier:g,topMembers:[...b].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0))}}).filter(Boolean).sort((a,b)=>b.clusterValue-a.clusterValue).map((a,c)=>(0,b.jsx)(bD,{cs:a,rank:c+1,tierColors:e,onSelect:o},a.bridge.id))})]})]})}let L=[...f||[]].sort((a,b)=>(parseFloat(b.power_score)||0)-(parseFloat(a.power_score)||0)),M=B.length>=2?L.filter(a=>a.name.toLowerCase().includes(B.toLowerCase())).slice(0,8):[];return(0,b.jsxs)(bv,{collapsed:k,onToggle:n,children:[(0,b.jsxs)("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"#aaa",fontSize:12,cursor:"pointer",padding:"6px 12px",marginBottom:12,fontWeight:600},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0},children:"Network Circle"}),d&&(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:16},children:[(0,b.jsx)(bw,{label:"Total Connections",value:d.total}),(0,b.jsx)(bw,{label:"S-Tier",value:d.tiers?.S||0}),(0,b.jsx)(bw,{label:"A-Tier",value:d.tiers?.A||0}),(0,b.jsx)(bw,{label:"B-Tier",value:d.tiers?.B||0})]}),(0,b.jsxs)("div",{style:{position:"relative",marginBottom:12},children:[(0,b.jsx)("input",{type:"text",placeholder:"Search connections...",value:B,onChange:a=>C(a.target.value),style:{width:"100%",padding:"8px 12px",borderRadius:8,boxSizing:"border-box",border:"1px solid rgba(255,255,255,0.1)",background:"rgba(0,0,0,0.3)",color:"#fff",fontSize:12,outline:"none"}}),M.length>0&&(0,b.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:10,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,marginTop:4,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:M.map(a=>(0,b.jsxs)("div",{onClick:()=>{o&&o(a),q&&q(a.id),C("")},style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666"},children:a.headline?.substring(0,35)})]}),(0,b.jsx)("span",{style:{fontSize:10,color:e[a.tier],fontWeight:700},children:a.tier})]},a.id))})]}),(0,b.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FFD700",marginBottom:8},children:["Power Rankings (",L.length,")"]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:(v={},w={},L.forEach(a=>{w[a.tier]=(w[a.tier]||0)+1}),L.map((a,c)=>{let d=c>0?L[c-1].tier:null,f=a.tier!==d;f&&(v[a.tier]=0),v[a.tier]=(v[a.tier]||0)+1;let g=v[a.tier];return(0,b.jsxs)("div",{children:[f&&(0,b.jsxs)("div",{style:{padding:"8px 10px",marginTop:8*(c>0),marginBottom:4,background:`${e[a.tier]||"#555"}15`,borderLeft:`3px solid ${e[a.tier]||"#555"}`,borderRadius:4,fontSize:11,fontWeight:700,color:e[a.tier]||"#888",display:"flex",justifyContent:"space-between"},children:[(0,b.jsx)("span",{children:{S:"S-Tier — Elite",A:"A-Tier — High Value",B:"B-Tier — Notable",C:"C-Tier — Standard",D:"D-Tier — Entry"}[a.tier]||a.tier}),(0,b.jsx)("span",{style:{fontWeight:400,opacity:.7},children:w[a.tier]||0})]}),(0,b.jsxs)("div",{onClick:()=>{o&&o(a),q&&q(a.id)},style:{padding:"6px 8px",background:"rgba(255,255,255,0.03)",borderRadius:6,borderLeft:`3px solid ${e[a.tier]||"#555"}`,cursor:"pointer",display:"flex",alignItems:"center",gap:8,transition:"background 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.1)",onMouseLeave:a=>a.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,b.jsxs)("span",{style:{color:"#555",fontSize:10,fontWeight:600,minWidth:22,textAlign:"right"},children:["#",g]}),(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,background:e[a.tier]||"#555",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"S"===a.tier?"#000":"#fff"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("div",{style:{fontWeight:600,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:e[a.tier]||"#555"},children:parseFloat(a.power_score).toFixed(1)}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:a.tier})]})]})]},a.id)}))})]})}function bv({children:a,collapsed:d,onToggle:e}){let[f,g]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{let a=()=>g(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),d)?(0,b.jsxs)("div",{onClick:e,style:{position:"fixed",right:16,top:140,zIndex:30,cursor:"pointer",display:"flex",alignItems:"center",flexDirection:"row-reverse",gap:0,height:36,borderRadius:18,background:"rgba(255,215,0,0.15)",border:"2px solid rgba(255,215,0,0.5)",color:"#FFD700",fontWeight:700,boxShadow:"0 0 12px rgba(255,215,0,0.3)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",overflow:"hidden",transition:"width 0.25s ease",width:36,padding:"0 10px"},onMouseEnter:a=>{a.currentTarget.style.width="120px"},onMouseLeave:a=>{a.currentTarget.style.width="36px"},children:[(0,b.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"‹"}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginRight:6,opacity:.9},children:"Details"})]}):(0,b.jsxs)("div",{style:f?{position:"fixed",top:0,right:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[f&&(0,b.jsx)("div",{onClick:e,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,b.jsx)("div",{style:{width:f?"80vw":320,minWidth:320*!f,maxWidth:f?300:320,height:"100%",borderLeft:"1px solid rgba(255,215,0,0.12)",padding:f?"12px 10px":"16px 16px",overflowY:"auto",overflowX:"hidden",background:f?"rgba(15,12,5,0.98)":"rgba(15,12,5,0.65)",fontSize:13,backdropFilter:"blur(24px) saturate(1.4)",WebkitBackdropFilter:"blur(24px) saturate(1.4)",boxShadow:"inset 0 0 60px rgba(255,215,0,0.03), -4px 0 24px rgba(0,0,0,0.3)",marginLeft:f?"auto":0},children:a})]})}function bw({label:a,value:c}){return(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",padding:"10px 12px",borderRadius:8},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:2},children:a}),(0,b.jsx)("div",{style:{fontSize:18,fontWeight:700},children:c})]})}function bx(){return(0,b.jsx)("span",{style:{color:"#555",fontSize:16},children:"→"})}function by({routes:a,selected:d,tierColors:e,onSelect:f}){let[g,h]=(0,c.useState)(!1),i=a.length,j=g?a:a.slice(0,4),k={display:"flex",alignItems:"center",gap:6,fontSize:13,flexWrap:"wrap"};return(0,b.jsxs)("div",{style:{background:"rgba(255,107,53,0.1)",border:"1px solid rgba(255,107,53,0.3)",borderRadius:8,padding:12,marginBottom:16},children:[(0,b.jsxs)("div",{style:{fontSize:10,color:"#FF6B35",fontWeight:600,marginBottom:8},children:["PATH TO THIS PERSON",i>1?` \xb7 ${i} WAYS IN`:""]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:j.map((a,c)=>{if(!a.bridge)return(0,b.jsxs)("div",{title:"This route came from a scanned list whose connection record doesn’t match anyone in your 1st-degree list, so who introduces you can’t be named. The person is real, and still reachable.",style:{...k,color:"#888",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{fontWeight:700,fontStyle:"normal",color:"#fff"},children:"You"}),(0,b.jsx)(bx,{}),(0,b.jsx)("span",{children:"a connection we can’t name"}),(0,b.jsx)(bx,{}),(0,b.jsx)("span",{children:"them"})]},`unnamed-${a.id}`);let g=a.bridge,h=e[g.tier]||"#ccc",j=[[g.role,g.company].filter(Boolean).join(" @ "),g.tier?`${g.tier}-tier`:""].filter(Boolean).join(" · ");return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:k,children:[(0,b.jsx)("span",{style:{fontWeight:700},children:"You"}),(0,b.jsx)(bx,{}),(0,b.jsxs)("button",{onClick:()=>f&&f(g),title:`Open ${g.name}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:0,border:"none",background:"none",cursor:"pointer",color:h,fontWeight:600,fontSize:13,textAlign:"left"},children:[(0,b.jsx)(aV,{person:g,size:18,tierColors:e}),g.name]}),(0,b.jsx)(bx,{}),(0,b.jsx)("span",{style:{color:"#FF6B35",fontWeight:600},children:d.name}),0===c&&i>1&&(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:"#FF6B35",padding:"1px 6px",borderRadius:8,background:"rgba(255,107,53,0.15)",whiteSpace:"nowrap"},children:"top-scored bridge"})]}),j&&(0,b.jsx)("div",{style:{fontSize:11,color:"#888",marginTop:3},children:j})]},a.id)})}),i>4&&(0,b.jsx)("button",{onClick:()=>h(a=>!a),style:{marginTop:10,padding:"4px 10px",borderRadius:6,cursor:"pointer",fontSize:11,fontWeight:600,border:"1px solid rgba(255,107,53,0.35)",background:"transparent",color:"#FF6B35"},children:g?"Show fewer":`Show all ${i}`})]})}function bz({selected:a,degree2:d}){let g=(0,f.default)(),[h,i]=(0,c.useState)(!1),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(void 0),n=d?.filter(b=>b.source_connection_id===a.id).length||0,o=n>0,p=g.running&&(0,e.scansCircleOf)(g,a),q=g.running&&!p?(0,e.busyReason)(g):null,r=g.finished.find(b=>(0,e.scansCircleOf)(b,a)),s=g.finished[0]?.startedAt??null;async function t(b){k(null),i(!0);let c=(0,e.notReadyMessage)(await (0,e.scraperStatus)().catch(()=>null));if(i(!1),c)return void k({text:c,offline:!0});try{await (0,e.beginScrape)(b,"resume"===b?{id:a.id}:{name:a.name,id:a.id})}catch(a){k({text:a.message||"Could not start the scan."})}}(0,c.useEffect)(()=>{let b=!0;return(0,e.resumePoint)(a.id).then(a=>{b&&m(a)},()=>{b&&m(null)}),()=>{b=!1}},[a.id,s]);let u=o||!!l,v=o?"#00ff88":"#9B59B6",w=!!q||h,x=a=>({flex:1,padding:"11px 8px",borderRadius:8,fontWeight:700,fontSize:a?13:12,cursor:w?"not-allowed":"pointer",opacity:w?.45:1,...a?{border:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"}:{border:`1px solid ${v}55`,background:`${v}14`,color:v}});return(0,b.jsxs)("div",{id:"scan-box",style:{background:o?"rgba(0,255,136,0.06)":"rgba(155,89,182,0.08)",border:`1px solid ${o?"rgba(0,255,136,0.2)":"rgba(155,89,182,0.3)"}`,borderRadius:10,padding:16,marginTop:16},children:[(0,b.jsx)("div",{style:{fontSize:10,color:v,fontWeight:700,letterSpacing:1,marginBottom:4,textAlign:"center"},children:o?"CLUSTER ACTIVE":"CREATE CLUSTER"}),(0,b.jsx)("div",{style:{fontSize:12,color:"#aaa",marginBottom:12,textAlign:"center"},children:o?`${n} connections mapped in Six Degrees`:(0,b.jsxs)(b.Fragment,{children:["Scan ",a.name,"'s connections to map their network"]})}),p?(0,b.jsx)(bB,{title:g.pending?"Starting…":`Scanning ${a.name}’s circle…`,log:g.log}):j?.offline?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(255,80,80,0.1)",border:"1px solid rgba(255,80,80,0.3)",color:"#ff5050",fontSize:12,marginBottom:8,textAlign:"center"},children:"Scanner offline"}),(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",textAlign:"center",marginBottom:8},children:[j.text," Open the ",(0,b.jsx)("strong",{children:"Scan"})," page to finish setting the scanner up."]}),(0,b.jsx)("button",{onClick:()=>k(null),style:{width:"100%",padding:"10px",borderRadius:8,border:"none",cursor:"pointer",background:"rgba(255,255,255,0.1)",color:"#aaa",fontWeight:600,fontSize:12},children:"Retry"})]}):(0,b.jsxs)(b.Fragment,{children:[r&&(0,b.jsx)(bC,{job:r}),(0,b.jsxs)("div",{style:{display:"flex",gap:8},children:[l&&(0,b.jsxs)("button",{onClick:()=>t("resume"),disabled:w,style:x(!0),children:["Resume from page ",l.nextPage]}),(0,b.jsx)("button",{onClick:()=>t("bridge"),disabled:w,style:x(!l&&!o),children:u?"Rescan from the start":(0,b.jsxs)(b.Fragment,{children:["Scan ",a.name,"'s Network"]})})]}),l&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:["Read to page ",l.pagesRead," so far. Resume carries on from page ",l.nextPage,". LinkedIn lists their connections in its own order, not by date, so Rescan reads them all again from page 1."]}),o&&null===l&&(0,b.jsx)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:"Their whole list has been read. LinkedIn doesn't date other people's connections, so a rescan reads it all again to find anyone new."}),q&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8,textAlign:"center"},children:[q,". One scan at a time: this one can start when it finishes."]}),j&&(0,b.jsx)("div",{style:{fontSize:11,color:"#ff8080",marginTop:8,textAlign:"center"},children:j.text})]})]})}function bA({csvSource:a,style:c}){return(0,b.jsx)("div",{style:{padding:"10px 12px",borderRadius:8,fontSize:11,color:"#999",lineHeight:1.5,textAlign:"center",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.08)",...c},children:"sample"===a?"Scanning needs your own network: everyone in the sample is invented.":"Scanning needs your own network: a CSV import lives only in this window. Close it (× at the top) and open Scan."})}function bB({title:a,log:c,small:d=!1}){return(0,b.jsxs)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(155,89,182,0.1)",border:"1px solid rgba(155,89,182,0.3)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,b.jsx)("div",{style:{width:d?6:8,height:d?6:8,borderRadius:"50%",background:"#9B59B6",animation:"pulse 1s infinite"}}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,color:"#9B59B6"},children:a})]}),(0,b.jsx)("div",{style:{fontFamily:"monospace",fontSize:d?9:10,color:"#888",maxHeight:d?80:100,overflow:"auto"},children:c.slice(-40).map((a,c)=>(0,b.jsx)("div",{children:a},c))})]})}function bC({job:a,who:c=null}){let d=0===a.exitCode,e=!d&&Array.isArray(a.failure)&&a.failure.length?a.failure[a.failure.length-1]:null;return(0,b.jsx)("div",{style:{padding:"8px 10px",borderRadius:8,marginBottom:10,fontSize:11,textAlign:"center",lineHeight:1.4,background:d?"rgba(0,255,136,0.08)":"rgba(255,80,80,0.08)",border:`1px solid ${d?"rgba(0,255,136,0.25)":"rgba(255,80,80,0.25)"}`,color:d?"#00ff88":"#ff8080"},children:d?`${c?`${c}’s circle`:"The scan"} finished. What it found is on the map.`:`${c?`${c}’s scan`:"The scan"} stopped before the end${e?`: ${e}`:"."}`})}function bD({cs:a,rank:d,tierColors:e,onSelect:f}){let[g,h]=(0,c.useState)(!1);return(0,b.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",borderRadius:6,borderLeft:`3px solid ${e[a.bridge.tier]||"#FF6B35"}`,overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{padding:"10px 10px"},children:[(0,b.jsxs)("div",{onClick:()=>f&&f(a.bridge),style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,H.localPhoto)(a.bridge.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${e[a.bridge.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:11,fontWeight:700,background:e[a.bridge.tier]||"#555",color:"S"===a.bridge.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.bridge.name?.charAt(0)}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontWeight:600,fontSize:12},children:[(0,b.jsxs)("span",{style:{color:"#555",marginRight:4},children:["#",d]}),a.bridge.name]}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666"},children:a.bridge.headline?.substring(0,40)})]})]}),(0,b.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 6px",borderRadius:4,background:e[a.bridge.tier],color:"S"===a.bridge.tier?"#000":"#fff"},children:a.bridge.tier})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,marginTop:6,fontSize:10},children:[a.sCount>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[a.sCount,"S",a.sAvgPower>0?` (${a.sAvgPower.toFixed(1)})`:""]}),a.aCount>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[a.aCount,"A"]}),a.bCount>0&&(0,b.jsxs)("span",{style:{color:"#3498DB"},children:[a.bCount,"B"]}),a.risingCount>0&&(0,b.jsxs)("span",{style:{color:"#2ECC71"},children:[a.risingCount," rising"]}),(0,b.jsxs)("span",{style:{color:"#555"},children:[a.members," total"]})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:4,fontSize:10},children:[(0,b.jsxs)("span",{style:{color:"#666"},children:["Elite: ",(100*a.elitePct).toFixed(0),"% · Avg: ",a.avgPower.toFixed(1)]}),(0,b.jsx)("span",{style:{color:"#FF6B35",fontWeight:700},children:a.clusterValue.toFixed(1)})]}),(a.sTier.length>0||a.aTier.length>0)&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:8},children:[[...a.sTier,...a.aTier].slice(0,4).map(a=>(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:a.name,style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",border:`1.5px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"},title:a.name},a.id):(0,b.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:9,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},title:a.name,children:a.name?.charAt(0)},a.id)),a.sCount+a.aCount>4&&(0,b.jsxs)("span",{style:{fontSize:9,color:"#666"},children:["+",a.sCount+a.aCount-4," more"]})]}),(0,b.jsxs)("button",{onClick:()=>h(!g),style:{marginTop:6,background:"none",border:"none",color:"#888",fontSize:10,cursor:"pointer",padding:0,display:"flex",alignItems:"center",gap:4},children:[(0,b.jsx)("span",{style:{fontSize:12},children:g?"▾":"▸"}),g?"Hide members":`View all ${a.members} members`]})]}),g&&(0,b.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",padding:"6px 10px 10px",maxHeight:250,overflowY:"auto"},children:a.topMembers.map(a=>(0,b.jsxs)("div",{onClick:()=>f&&f(a),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 2px",cursor:"pointer",borderRadius:4},onMouseEnter:a=>a.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[(0,H.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,H.localPhoto)(a.profile_image_url),alt:"",style:{width:20,height:20,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${e[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:20,height:20,borderRadius:"50%",flexShrink:0,fontSize:8,fontWeight:700,background:e[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,H.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsx)("div",{style:{minWidth:0,flex:1},children:(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name})}),(0,b.jsxs)("span",{style:{fontSize:9,color:e[a.tier]||"#555",fontWeight:600,flexShrink:0},children:[a.tier," ",parseFloat(a.power_score).toFixed(1)]})]},a.id))})]})}function bE({connections:a,degree2:d,scanNotes:g,tierColors:h}){let i=(0,f.default)(),[j,k]=(0,c.useState)(!1),l=(0,c.useMemo)(()=>(0,J.reachIndex)(a,d,g),[a,d,g]),m=(0,c.useMemo)(()=>(0,J.readyToScan)(a,l),[a,l]),n=(0,c.useMemo)(()=>a.filter(a=>"hidden"===(0,J.reachState)(a,l)),[a,l]),o=(0,c.useMemo)(()=>a.filter(a=>null===(0,J.reachState)(a,l)&&"todo"===(0,J.circleState)(a,l)).length,[a,l]),p=(0,c.useMemo)(()=>new Map(a.map(a=>[a.id,a])),[a]),q=(0,J.circleScanCost)(),r=i.running&&(0,e.isCircleScan)(i),s=i.running&&!r?(0,e.busyReason)(i):null,t=i.finished.find(e.isCircleScan),u=j?m:m.slice(0,5);return(0,b.jsxs)("div",{style:{background:"rgba(0,255,136,0.05)",border:"1px solid rgba(0,255,136,0.2)",borderRadius:10,padding:14,marginBottom:16},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:800,color:"#00ff88",marginBottom:4},children:["Ready to scan (",m.length,")"]}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"#999",lineHeight:1.5,marginBottom:10},children:"People you added through a circle whose own circle isn't scanned yet. Scanning one brings in who they know: 3rd degree, through the circle you found them in."}),r?(0,b.jsx)("div",{style:{marginBottom:10},children:(0,b.jsx)(bB,{small:!0,title:i.pending?"Starting…":`Scanning ${i.target?.name||"a circle"}…`,log:i.log})}):t&&(0,b.jsx)(bC,{job:t,who:t.target?.name}),0===m.length?(0,b.jsxs)("div",{style:{fontSize:11,color:"#aaa",lineHeight:1.5},children:["Nobody yet. When someone you asked from a circle accepts, ↻ ",(0,b.jsx)("b",{children:"Check for new"})," brings them into your connections, and they show here."]}):(0,b.jsxs)("div",{role:"list",style:{display:"flex",flexDirection:"column",gap:6},children:[u.map(a=>{let c=r&&(0,e.scansCircleOf)(i,a),d=p.get(a.unlocked_from_bridge_id)?.name||a.unlocked_from_name;return(0,b.jsxs)(V.default,{role:"listitem",href:`/setup?scan=${encodeURIComponent(a.id)}`,"aria-label":`Scan ${a.name}’s circle: opens the Scan page to confirm`,style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",borderRadius:8,textDecoration:"none",color:"#fff",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(0,255,136,0.18)"},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:h[a.tier]||"#888",boxShadow:"0 0 0 2px rgba(0,255,136,0.45)"}}),(0,b.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("span",{style:{fontSize:12,fontWeight:700},children:a.name}),(0,b.jsx)("span",{style:{fontSize:10,color:h[a.tier]||"#888",fontWeight:700,marginLeft:6},children:a.tier}),d&&(0,b.jsxs)("span",{style:{display:"block",fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["was in ",String(d||"").trim().split(/\s+/)[0],"'s circle"]})]}),(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"#00ff88",whiteSpace:"nowrap"},children:c?"Scanning…":"Scan… →"})]},a.id)}),m.length>5&&(0,b.jsx)("button",{type:"button",onClick:()=>k(a=>!a),style:{background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:"2px 0",textAlign:"left"},children:j?"Show fewer":`Show all ${m.length}`})]}),m.length>0&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#888",lineHeight:1.5,marginTop:8},children:["Each scan: ",q.profileViews," profile view, then one LinkedIn search for every page of their list, up to ",q.searches," pages (about ",q.minutes," min for a whole list). Nothing starts until you confirm it on the Scan page."]}),n.length>0&&(0,b.jsxs)("div",{style:{marginTop:10,fontSize:10.5,color:"#777",lineHeight:1.6},children:[n.slice(0,3).map(a=>(0,b.jsxs)("div",{style:{opacity:.7},children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"🔒"})," ",a.name," ",(0,b.jsx)("span",{style:{color:"#666"},children:"· their list is hidden"})]},a.id)),n.length>3&&(0,b.jsxs)("div",{style:{opacity:.7},children:["🔒 and ",n.length-3," more with hidden lists"]})]}),o>0&&(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#888",lineHeight:1.5,marginTop:10},children:[o.toLocaleString("en-US")," of your other connections aren't scanned yet."," ",(0,b.jsx)(V.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Map them in batches on the Scan page →"})]}),s&&(0,b.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8},children:[s,". One scan at a time."]})]})}let bF={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function bG({collapsed:a,onToggle:d,mode:e,filter:f,onFilterChange:g,visualMode:h,onVisualModeChange:i,tierCounts:j,bridgeTierCounts:k,degrees:l=[1],onDegreesChange:m,degreeCounts:n={},hiddenTiers:o=[],onHiddenTiersChange:p}){let q=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),r="degrees"===e,s=!r&&!!p,t=ba(r?"degrees":"network"),u=r?k||{}:j||{},v=r?Object.values(k||{}).reduce((a,b)=>a+b,0):Object.values(j||{}).reduce((a,b)=>a+b,0);return a?(0,b.jsxs)("div",{onClick:d,style:{position:"fixed",left:16,top:140,zIndex:30,cursor:"pointer",display:"flex",alignItems:"center",gap:0,height:36,borderRadius:18,background:"rgba(52,152,219,0.15)",border:"2px solid rgba(52,152,219,0.5)",color:"#3498DB",fontWeight:700,boxShadow:"0 0 12px rgba(52,152,219,0.3)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",overflow:"hidden",transition:"width 0.25s ease",width:36,padding:"0 10px"},onMouseEnter:a=>{a.currentTarget.style.width="120px"},onMouseLeave:a=>{a.currentTarget.style.width="36px"},children:[(0,b.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"›"}),(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginLeft:6,opacity:.9},children:"Filters"})]}):(0,b.jsxs)("div",{style:q?{position:"fixed",top:0,left:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[q&&(0,b.jsx)("div",{onClick:d,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,b.jsxs)("div",{style:{width:q?"80vw":320,minWidth:320*!q,maxWidth:q?300:320,height:"100%",borderRight:"1px solid rgba(52,152,219,0.15)",padding:q?"12px 10px":"16px 14px",overflowY:"auto",overflowX:"hidden",background:q?"rgba(10,15,30,0.98)":"rgba(10,15,30,0.65)",fontSize:13,backdropFilter:"blur(24px) saturate(1.4)",WebkitBackdropFilter:"blur(24px) saturate(1.4)",boxShadow:"inset 0 0 60px rgba(52,152,219,0.04), 4px 0 24px rgba(0,0,0,0.3)"},children:[(0,b.jsxs)("button",{onClick:d,style:{display:"flex",alignItems:"center",gap:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"#aaa",fontSize:12,cursor:"pointer",padding:"6px 12px",marginBottom:14,fontWeight:600,width:"100%"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"›"})," Close"]}),(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Visual"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:t.map(a=>(0,b.jsxs)("button",{onClick:()=>i&&i(a.key),style:{display:"flex",alignItems:"center",gap:8,padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",textAlign:"left",background:h===a.key?"rgba(52,152,219,0.15)":"rgba(255,255,255,0.03)",color:h===a.key?"#3498DB":"#888",transition:"all 0.15s"},children:[(0,b.jsx)("span",{style:{fontSize:14,width:20,textAlign:"center"},children:a.icon}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600},children:a.label}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555",marginTop:1},children:a.desc})]})]},a.key))})]}),!r&&m&&(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Degree"}),(0,b.jsx)("div",{style:{display:"flex",gap:6},children:[[1,"1st","Your connections"],[2,"2nd","In a scanned circle"],[3,"3rd","Found by a company scan"]].map(([a,c,d])=>{let e=l.includes(a),f=n[a]||0,g=e&&1===l.length;return(0,b.jsxs)("button",{title:`${d}: ${f.toLocaleString()}${g?" (keep at least one)":""}`,"aria-pressed":e,disabled:g||!e&&!f,onClick:()=>m(e?l.filter(b=>b!==a):[...l,a].sort()),style:{flex:1,padding:"7px 4px",borderRadius:8,fontSize:11.5,fontWeight:700,cursor:!g&&(e||f)?"pointer":"default",border:e?"1px solid rgba(52,152,219,0.6)":"1px solid rgba(255,255,255,0.08)",background:e?"rgba(52,152,219,0.18)":"rgba(255,255,255,0.03)",color:e?"#cfe6f7":f?"#888":"#444"},children:[c,(0,b.jsx)("div",{style:{fontSize:9.5,fontWeight:500,opacity:.8,marginTop:2},children:f.toLocaleString()})]},a)})})]}),(0,b.jsxs)("div",{style:{marginBottom:18},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:r?"Filter by bridge tier":"Filter"}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[(0,b.jsxs)("button",{onClick:()=>s?p([]):g&&g("all"),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",background:(s?o.length:"all"!==f)?"rgba(255,255,255,0.03)":"rgba(255,255,255,0.12)",color:(s?o.length:"all"!==f)?"#888":"#fff"},children:[(0,b.jsx)("span",{style:{fontSize:11,fontWeight:600},children:"All"}),(0,b.jsx)("span",{style:{fontSize:10,color:"#555"},children:v})]}),s&&(0,b.jsx)("div",{style:{fontSize:10,color:"#667",margin:"2px 2px 4px"},children:"Click a tier to hide or show it"}),s&&["S","A","B","C","D"].map(a=>{let c=!o.includes(a),d=c&&o.length>=4;return(0,b.jsxs)("button",{"aria-pressed":c,title:d?"Keep at least one tier showing":c?`Hide ${a}-Tier`:`Show ${a}-Tier`,onClick:()=>!d&&p(c?[...o,a]:o.filter(b=>b!==a)),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:d?"default":"pointer",width:"100%",background:c?`${bF[a]}14`:"rgba(255,255,255,0.02)",color:c?bF[a]:"#555",borderLeft:c?`3px solid ${bF[a]}`:"3px solid transparent"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:bF[a],opacity:c?1:.2}}),(0,b.jsxs)("span",{style:{fontSize:11,fontWeight:600,textDecoration:c?"none":"line-through"},children:[a,"-Tier"]}),!c&&(0,b.jsx)("span",{style:{fontSize:9.5,color:"#667"},children:"hidden"})]}),(0,b.jsx)("span",{style:{fontSize:10,color:"#555"},children:u[a]||0})]},a)}),!s&&["S","A","B","C","D"].map(a=>(0,b.jsxs)("button",{onClick:()=>g&&g(a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",width:"100%",background:f===a?`${bF[a]}20`:"rgba(255,255,255,0.03)",color:f===a?bF[a]:"#888",borderLeft:f===a?`3px solid ${bF[a]}`:"3px solid transparent"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:bF[a],opacity:f===a?1:.4}}),(0,b.jsxs)("span",{style:{fontSize:11,fontWeight:600},children:[a,"-Tier"]})]}),(0,b.jsx)("span",{style:{fontSize:10,color:"#555"},children:u[a]||0})]},a))]})]}),(0,b.jsxs)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",paddingTop:12},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#555",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:"Stats"}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[Object.entries(u).filter(([a])=>["S","A","B"].includes(a)).map(([a,c])=>(0,b.jsxs)("div",{style:{padding:"6px 8px",borderRadius:6,background:`${bF[a]}10`,textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:16,fontWeight:800,color:bF[a]},children:c}),(0,b.jsxs)("div",{style:{fontSize:8,color:"#555"},children:[a,"-Tier"]})]},a)),(0,b.jsxs)("div",{style:{padding:"6px 8px",borderRadius:6,background:"rgba(255,255,255,0.04)",textAlign:"center"},children:[(0,b.jsx)("div",{style:{fontSize:16,fontWeight:800,color:"#fff"},children:v}),(0,b.jsx)("div",{style:{fontSize:8,color:"#555"},children:"Total"})]})]})]})]})]})}var bH=a.i(36839),bI=a.i(58834);function bJ(){let[a,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)("");async function g(){d(!0),f("");try{await (0,bI.loadSampleIntoSession)(),window.location.reload()}catch(a){f(a.message||"Could not load the sample network."),d(!1)}}return(0,b.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,overflowY:"auto"},children:(0,b.jsxs)("div",{style:{maxWidth:520,width:"100%",textAlign:"center"},children:[(0,b.jsx)("div",{style:{width:68,height:68,borderRadius:"50%",margin:"0 auto 22px",border:"2px solid rgba(255,215,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:26},children:"✦"}),(0,b.jsx)("h2",{style:{fontSize:28,fontWeight:800,margin:"0 0 10px",background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Welcome to Six Degrees"}),(0,b.jsx)("p",{style:{color:"rgba(255,255,255,0.5)",fontSize:14.5,lineHeight:1.7,margin:"0 0 28px"},children:"Your network, drawn as a galaxy. Everything stays on this computer. Pick how to bring it in — you can switch later."}),(0,b.jsx)(bK,{href:"/setup",primary:!0,badge:"Recommended",title:"Scan my LinkedIn",body:"A few guided steps: set up the scanner, sign into LinkedIn yourself, and watch your galaxy fill in. The only way to see who your connections know."}),(0,b.jsx)(bK,{href:"/import",title:"Import my LinkedIn CSV",body:"LinkedIn’s official export, read in your browser. Takes about ten minutes to arrive by email. Shows the people you know, not who they know."}),(0,b.jsx)(bK,{onClick:g,disabled:a,title:a?"Loading…":"Explore a sample network",body:"150 invented connections and the 598 people they know. Every view except Outlink and Scan, which need your own scan. Nothing about you is used."}),e&&(0,b.jsx)("div",{style:{color:"#ff6b6b",fontSize:13,marginTop:18},children:e}),(0,b.jsxs)("p",{style:{color:"rgba(255,255,255,0.45)",fontSize:13,lineHeight:1.6,margin:"18px 0 0"},children:["Moving from another computer?"," ",(0,b.jsx)("a",{href:"/settings#data",style:{color:"rgba(255,255,255,0.75)"},children:"Import your saved copy in Settings → Your data."})]})]})})}function bK({href:a,onClick:c,disabled:d,primary:e,badge:f,title:g,body:h}){let i={display:"block",width:"100%",boxSizing:"border-box",textAlign:"left",padding:"16px 18px",borderRadius:12,marginBottom:12,textDecoration:"none",cursor:d?"default":"pointer",font:"inherit",border:e?"1px solid rgba(255,215,0,0.45)":"1px solid rgba(255,255,255,0.12)",background:e?"linear-gradient(135deg, rgba(255,215,0,0.12), rgba(155,89,182,0.14))":"rgba(255,255,255,0.03)",color:"#fff"},j=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:5},children:[(0,b.jsx)("span",{style:{fontSize:15.5,fontWeight:750},children:g}),f&&(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",padding:"3px 8px",borderRadius:20,background:"#FFD700",color:"#0a0a1a"},children:f}),(0,b.jsx)("span",{style:{marginLeft:"auto",color:"rgba(255,255,255,0.4)"},children:"→"})]}),(0,b.jsx)("div",{style:{fontSize:13,color:"rgba(255,255,255,0.5)",lineHeight:1.6},children:h})]});return a?(0,b.jsx)("a",{href:a,style:i,children:j}):(0,b.jsx)("button",{onClick:c,disabled:d,style:i,children:j})}var bL=a.i(42510);let bM=[],bN=a=>!!a&&!["install","setup","login"].includes(a.action);function bO(a,b){let c={};a.forEach(a=>{c[a.tier]=(c[a.tier]||0)+1});let d={};return b.forEach(a=>{d[a.tier]=(d[a.tier]||0)+1}),{total:a.length,tiers:c,d2Total:b.length,d2Tiers:d}}let bP={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function bQ(){let a,f,j,k,{userId:l,userName:m}=(0,bt.useUser)(),n=function(){let[a,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let a=()=>b(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),a}(),[o,p]=(0,c.useState)([]),[q,r]=(0,c.useState)([]),[s,t]=(0,c.useState)([]),[u,v]=(0,c.useState)([1]),[w,x]=(0,c.useState)([]),[y,z]=(0,c.useState)(null),A=(0,c.useRef)(null),[B,C]=(0,c.useState)("all"),D=(0,d.useSearchParams)().get("chain"),[E,F]=(0,c.useState)(D),[G,H]=(0,c.useState)(()=>E?"degrees":"network"),[I,J]=(0,c.useState)(!0),[K,L]=(0,c.useState)(null),[M,N]=(0,c.useState)(!0),[O,P]=(0,c.useState)(!0),[Q,R]=(0,c.useState)(()=>E?"chain":"galaxy"),[S,T]=(0,c.useState)([]),[U,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(!1),[$,_]=(0,c.useState)("csv"),[aa,ab]=(0,c.useState)(e.NO_SCAN_NOTES),ac=(0,c.useRef)(""),ad=(0,h.requestCount)((0,g.default)());(0,c.useEffect)(()=>{l&&(a(),bI.IS_DEMO||(0,bL.hasCsvNetwork)()||((0,e.loadScanNotes)().then(ab),fetch(`/api/notifications?userId=${l}`).then(a=>a.json()).then(a=>T(a.notifications||[])).catch(()=>{})));async function a(){let a=(0,bL.hasCsvNetwork)()?(0,bL.loadCsvNetwork)():null;a&&(Z(!0),_(a.source||"csv"));let{degree1:b,degree2:c,degree3:d=[]}=bI.IS_DEMO?await (0,bI.loadDemoNetwork)():a||await (async()=>await (0,i.loadNetwork)(l))();p(b),r(c),t(d||[]),ac.current=bR(b,c),L(bO(b,c)),J(!1)}},[l]);let ae=(0,c.useCallback)(async()=>{if(!(bI.IS_DEMO||(0,bL.hasCsvNetwork)())&&l)try{let[{degree1:a,degree2:b,degree3:c=[]},d]=await Promise.all([(0,i.loadNetwork)(l),(0,e.loadScanNotes)()]);ab(a=>JSON.stringify(a)===JSON.stringify(d)?a:d),t(a=>a.length===(c||[]).length?a:c||[]);let f=bR(a,b);if(f===ac.current)return;ac.current=f,p(a),r(b),L(bO(a,b))}catch{}},[l]),af=(0,c.useCallback)(()=>{F(null);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},[]),ag="degrees"===G,ah=(0,c.useMemo)(()=>(function(a=[],b=[],c=[]){let d=new Set,e=(a,b)=>{let c=[];for(let e of a||[]){let a=(0,W.keyFor)(e);d.has(a)||(d.add(a),c.push(e.degree===b?e:{...e,degree:b}))}return c};return{1:e(a,1),2:e(b,2),3:e(c,3)}})(o,q,s),[o,q,s]),ai=(0,c.useMemo)(()=>ag?o:u.flatMap(a=>ah[a]||[]),[ag,o,u,ah]),aj=(0,c.useMemo)(()=>ag?"all"===B?ai:ai.filter(a=>a.tier===B):w.length?ai.filter(a=>!w.includes(a.tier)):ai,[ag,ai,B,w]),ak=(0,c.useMemo)(()=>new Map(o.map(a=>[a.id,a])),[o]),al=(0,c.useMemo)(()=>new Set(q.map(a=>a.source_connection_id).filter(Boolean)),[q]),am=(0,c.useMemo)(()=>{let a={};return o.forEach(b=>{al.has(b.id)&&(a[b.tier]=(a[b.tier]||0)+1)}),a},[o,al]),an=(0,c.useMemo)(()=>ag?"all"===B?q:q.filter(a=>ak.get(a.source_connection_id)?.tier===B):bM,[ag,B,ak,q]),ao=(0,c.useCallback)(a=>{z(a),a&&N(!1)},[]);if(I)return(0,b.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:[(0,b.jsx)("div",{style:{fontSize:24,fontWeight:700},children:"Loading Six Degrees…"}),(0,b.jsx)("div",{style:{fontSize:14,color:"#888",marginTop:8},children:"Mapping your LinkedIn network"})]});let ap=(a=a8[Q])&&a.modes.includes(G)?{key:Q,...a}:ba(G)[0]??{key:"list",...a8.list},aq=!bI.IS_DEMO&&!Y;return(0,b.jsxs)("div",{"data-map":!0,style:{height:"100vh",overflow:"hidden",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,b.jsxs)("header",{style:{padding:n?"10px 12px":"20px 30px",borderBottom:"1px solid rgba(255,255,255,0.1)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:n?4:8,flexWrap:n?"wrap":"nowrap",gap:6*!!n},children:[(0,b.jsx)("h1",{style:{fontSize:n?16:28,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Six Degrees"}),(0,b.jsxs)("div",{style:{display:"flex",gap:n?2:4,background:"rgba(255,255,255,0.08)",borderRadius:8,padding:n?2:3,flexWrap:n?"wrap":"nowrap"},children:[(0,b.jsx)("button",{onClick:()=>{H("network"),z(null),C("all"),R("galaxy")},style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,cursor:"pointer",background:"network"===G?"#fff":"transparent",color:"network"===G?"#000":"#888"},children:n?"Circle":"Network Circle"}),(0,b.jsx)("button",{onClick:()=>{H("degrees"),z(null),C("all"),R("chain")},style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,cursor:"pointer",background:"degrees"===G?"linear-gradient(135deg, #FFD700, #FF6B35)":"rgba(255,255,255,0.12)",color:"degrees"===G?"#000":"#fff"},children:"Degrees"}),Y&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginLeft:n?4:10,padding:n?"4px 8px":"5px 10px",borderRadius:999,background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.12)"},children:[(0,b.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:"sample"===$?"#9B59B6":"#2ecc71"}}),(0,b.jsx)("span",{style:{fontSize:n?10:12,color:"rgba(255,255,255,0.65)",whiteSpace:"nowrap"},children:"sample"===$?"Sample network":"Your CSV"}),(0,b.jsx)("button",{onClick:()=>{(0,bL.clearCsvNetwork)(),window.location.href="/"},title:"sample"===$?"Leave the sample network":"Clear this import",style:{border:"none",background:"transparent",cursor:"pointer",color:"#888",fontSize:n?13:15,lineHeight:1,padding:"0 0 0 2px"},children:"×"})]}),!bI.IS_DEMO&&(0,b.jsx)(V.default,{href:"/paths",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#00ff88",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Paths"}),!bI.IS_DEMO&&!Y&&(0,b.jsx)(V.default,{href:"/scores",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FFD700",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Scores"}),!bI.IS_DEMO&&!Y&&(0,b.jsx)(V.default,{href:"/queue",style:{padding:n?"6px 10px":"8px 16px",borderRadius:6,border:"none",fontSize:n?11:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#FF6B35",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Outlink"}),!bI.IS_DEMO&&!Y&&(0,b.jsx)(V.default,{href:"/setup",style:{padding:n?"8px 12px":"8px 16px",borderRadius:6,border:"none",fontSize:13,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#666",textDecoration:"none",display:"flex",alignItems:"center",gap:4},children:"Scan"})]}),!bI.IS_DEMO&&(0,b.jsx)(V.default,{href:"/settings",title:"Settings","aria-label":"Settings",style:{width:n?28:32,height:n?28:32,borderRadius:"50%",flexShrink:0,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:n?14:16,textDecoration:"none",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:n?4:8},children:"⚙︎"}),!bI.IS_DEMO&&!Y&&(0,b.jsxs)("div",{style:{position:"relative",marginLeft:n?4:8},children:[(0,b.jsxs)("button",{onClick:()=>X(!U),style:{width:n?28:32,height:n?28:32,borderRadius:"50%",border:"none",cursor:"pointer",background:"rgba(255,255,255,0.06)",color:"#888",fontSize:n?12:14,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:["🔔",S.filter(a=>!a.seen).length>0&&(0,b.jsx)("span",{style:{position:"absolute",top:-2,right:-2,width:16,height:16,borderRadius:"50%",background:"#ff5050",color:"#fff",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center"},children:S.filter(a=>!a.seen).length})]}),U&&(0,b.jsxs)("div",{style:{position:"absolute",top:40,right:0,width:320,maxHeight:400,background:"rgba(10,10,26,0.98)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:12,overflow:"hidden",zIndex:100,backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",boxShadow:"0 8px 32px rgba(0,0,0,0.5)"},children:[(0,b.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid rgba(255,255,255,0.08)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontWeight:700,fontSize:14},children:"Notifications"}),S.filter(a=>!a.seen).length>0&&(0,b.jsx)("button",{onClick:()=>{fetch("/api/notifications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mark-all-seen"})}),T(a=>a.map(a=>({...a,seen:!0})))},style:{background:"none",border:"none",color:"#3498DB",fontSize:11,cursor:"pointer",fontWeight:600},children:"Mark all read"})]}),(0,b.jsx)("div",{style:{overflowY:"auto",maxHeight:340},children:0===S.length?(0,b.jsx)("div",{style:{padding:20,textAlign:"center",color:"#555",fontSize:12},children:"No notifications yet"}):S.slice(0,20).map(a=>(0,b.jsx)("div",{style:{padding:"10px 16px",borderBottom:"1px solid rgba(255,255,255,0.04)",background:a.seen?"transparent":"rgba(255,215,0,0.04)"},children:(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:a.icon||"📌"}),(0,b.jsxs)("div",{style:{flex:1},children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,color:a.seen?"#888":"#fff"},children:a.title}),a.message&&(0,b.jsx)("div",{style:{fontSize:10,color:"#666",marginTop:2},children:a.message}),(0,b.jsx)("div",{style:{fontSize:9,color:"#444",marginTop:3},children:new Date(a.created_at).toLocaleDateString()})]})]})},a.id))})]})]}),!bI.IS_DEMO&&!Y&&(0,b.jsx)(bT,{isMobile:n}),(0,b.jsx)("a",{href:bI.IS_DEMO?"/launch":Y?"/import":"/profile",style:{width:n?30:36,height:n?30:36,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:n?11:14,textDecoration:"none",marginLeft:n?6:12,flexShrink:0},children:(f=o.filter(a=>"S"===a.tier).length,j=o.filter(a=>"A"===a.tier).length,k=o.filter(a=>"B"===a.tier).length,Math.floor(Math.sqrt((100*f+40*j+15*k+200*o.filter(a=>al.has(a.id)).length+50*q.filter(a=>"S"===a.tier).length+o.length)/10)))})]}),ag&&!Y&&ad>0&&(0,b.jsxs)(V.default,{href:"/queue",style:{padding:"5px 12px",borderRadius:16,fontSize:12,fontWeight:600,textDecoration:"none",background:"rgba(255,107,53,0.12)",color:"#FF6B35",border:"1px solid rgba(255,107,53,0.25)",display:"inline-flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{style:{fontSize:10},children:"⏳"}),ad," Pending"]})]}),(0,b.jsxs)("div",{style:{display:"flex",height:n?"calc(100vh - 70px)":"calc(100vh - 130px)",position:"relative"},children:[(0,b.jsx)(bG,{collapsed:O,onToggle:()=>P(!O),mode:G,filter:B,onFilterChange:C,visualMode:ap.key,onVisualModeChange:R,tierCounts:ag?K?.tiers||{}:function(a=[]){let b={};for(let c of a)b[c.tier]=(b[c.tier]||0)+1;return b}(ai),degrees:u,onDegreesChange:v,hiddenTiers:w,onHiddenTiersChange:x,degreeCounts:{1:ah[1].length,2:ah[2].length,3:ah[3].length},bridgeTierCounts:am}),(()=>{if(0===o.length)return(0,b.jsx)(bJ,{});if(ag&&0===q.length)return(0,b.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,textAlign:"center"},children:(0,b.jsxs)("div",{style:{maxWidth:440},children:[(0,b.jsx)("div",{style:{fontSize:40,marginBottom:16,opacity:.5},children:"🔗"}),(0,b.jsx)("h2",{style:{fontSize:22,fontWeight:800,margin:"0 0 12px",color:"#fff"},children:"Degrees need 2nd-degree data"}),(0,b.jsxs)("p",{style:{color:"rgba(255,255,255,0.45)",fontSize:14,lineHeight:1.7,margin:"0 0 20px"},children:["This view maps who ",(0,b.jsx)("em",{children:"your connections"})," ","know — the people you haven’t met yet. LinkedIn’s CSV export only covers your own 1st-degree list, so there are no circles to open here."]}),(0,b.jsxs)("p",{style:{color:"#666",fontSize:13,lineHeight:1.7,margin:0},children:["The local scanner maps those circles (and captures real photos)."," ",(0,b.jsx)(V.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Set up scanning →"})]})]})});let a=ap.component,c={connections:aj,degree2:ap.allDegree2?q:an,onSelect:ao,mode:G,userName:m,userImage:null,selectedId:y?.id??null,tierColors:bP,focusNodeRef:A,fullDegree1:o,fullDegree2:q,scanNotes:aa,canScan:aq,chainOpen:E,onChainOpened:af};return(0,b.jsx)(a,{...c})})(),(0,b.jsx)(bu,{selected:y,stats:K,tierColors:bP,connections:o,degree2:q,mode:G,collapsed:M,filter:B,onToggle:()=>N(!M),onSelect:a=>{z(a||null)},onSwitchMode:a=>{H(a),C("all")},onFocusNode:a=>{A.current&&A.current(a)},csvSource:bI.IS_DEMO?"sample":Y?$:null,scanNotes:aa,canScan:aq}),aq&&(0,b.jsx)(bS,{onChange:ae,live:"chain"===ap.key}),ag&&"separation"!==ap.key&&(0,b.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,zIndex:20,display:"flex",alignItems:"center",gap:8,background:"rgba(0,0,0,0.7)",borderRadius:20,padding:"6px 14px",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.08)"},children:[(0,b.jsxs)("span",{style:{fontSize:10,color:"#666"},children:[a8.orbit.icon," ",a8.orbit.label]}),(0,b.jsx)("div",{onClick:()=>R("orbit"===ap.key?"chain":"orbit"),style:{width:32,height:18,borderRadius:9,cursor:"pointer",background:"orbit"===ap.key?"#FF6B35":"rgba(255,255,255,0.15)",position:"relative",transition:"background 0.2s"},children:(0,b.jsx)("div",{style:{width:14,height:14,borderRadius:"50%",background:"#fff",position:"absolute",top:2,left:"orbit"===ap.key?16:2,transition:"left 0.2s"}})})]})]})]})}function bR(a,b){let c=0x811c9dc5,d=a=>{for(let b=0;b<a.length;b++)c=Math.imul(c^a.charCodeAt(b),0x1000193)};for(let c of[...a,...b])d(`${c.id}|${c.degree}|${c.source_connection_id??""}|${c.unlocked_from_bridge_id??""}|${c.tier}|${c.power_score}|${c.unlock_status??""}|${c.profile_image_url??""};`);return`${a.length}:${b.length}:${c>>>0}`}function bS({onChange:a,live:b}){let d=(0,f.default)(),g=d.finished.find(bN)?.startedAt??null,h=b&&d.running&&(0,e.isCircleScan)(d);return(0,c.useEffect)(()=>{null!=g&&a()},[g,a]),(0,c.useEffect)(()=>{if(!h)return;let b=setInterval(a,2e4);return()=>clearInterval(b)},[h,a]),null}function bT({isMobile:a}){let c=(0,f.default)(),d=(0,e.busyReason)(c);return(0,b.jsx)("button",{onClick:async()=>{try{let a=(0,e.notReadyMessage)(await (0,e.scraperStatus)());if(a)return void alert(a);if(!window.confirm("Check for new connections?\n\nThis opens a Chrome window on your LinkedIn connections list and reads it from the newest, stopping once it reaches people already saved. It usually takes under a minute. It reads your own list, not a search, so it doesn’t use your search budget, but like any scan it is LinkedIn traffic from your account."))return;await (0,e.beginScrape)("refresh"),alert("Checking for new connections — watch it on the Scan page.")}catch(a){alert(a.message)}},disabled:!!d,title:d?`${d}. One scan at a time.`:"Check for new connections",style:{width:a?28:32,height:a?28:32,borderRadius:"50%",border:"none",cursor:d?"not-allowed":"pointer",opacity:d?.4:1,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:a?12:14,display:a?"none":"flex",alignItems:"center",justifyContent:"center",marginLeft:8},children:"↻"})}a.s(["default",0,function(){return(0,b.jsx)(bH.default,{children:(0,b.jsx)(c.Suspense,{children:(0,b.jsx)(bQ,{})})})}],30100)}];
19
19
 
20
20
  //# sourceMappingURL=app_page_1fazqbf.js.map