import re
from typing import Sequence

from rich.console import Console
from rich.text import Text

from epstein_files.documents.documents.categories import (CATEGORY_STYLES, CATEGORY_STYLE_MAPPING,
     DEFAULT_CATEGORY_STYLE, Interesting, Neutral, Uninteresting)
from epstein_files.documents.emails.constants import REPLY_REGEX, SENT_FROM_REGEX, XML_STRIPPED_MSG
from epstein_files.output.highlighted_names import HighlightGroup, HighlightedNames, HighlightedText, ManualHighlight
from epstein_files.people.contact import Contact
from epstein_files.util.constant.names import *
from epstein_files.util.constant.strings import *
from epstein_files.util.constants import EPSTEIN_V_ROTHSTEIN_EDWARDS
from epstein_files.util.helpers.string_helper import indented
from epstein_files.util.logging import logger

CIVIL_ATTORNEY = 'civil attorney'
CRIMINAL_DEFENSE_ATTORNEY = 'criminal defense attorney'
CRIMINAL_DEFENSE_2008 = f"{CRIMINAL_DEFENSE_ATTORNEY} on 2008 case"
EPSTEIN_V_ROTHSTEIN_EDWARDS_ATTORNEY = f"{CIVIL_ATTORNEY} {EPSTEIN_V_ROTHSTEIN_EDWARDS}"
ESTATE_EXECUTOR = 'estate executor'
EPSTEIN_ESTATE_EXECUTOR = f"Epstein {ESTATE_EXECUTOR}"
MC2_MODEL_MANAGEMENT = f"{JEAN_LUC_BRUNEL}'s MC2 Model Management"
QUESTION_MARKS_TXT = Text(QUESTION_MARKS, style='grey50')
THIELS_VALAR = f"{PETER_THIEL}'s {VALAR_VENTURES}"
VICTIM_COLOR = 'orchid1'

debug_console = Console(color_system='256')


HIGHLIGHT_GROUPS: Sequence[HighlightGroup] = [
    # This has to come first to get both stylings applied to the email subjects
    ManualHighlight(
        label='email_subject',
        style='light_yellow3',
        pattern=r"^(> )?(Classification|Flag|Subject|Sujet ?): (?P<email_subject>.*)",
    ),
    HighlightedNames(
        label=Uninteresting.ACADEMIA,
        style='light_goldenrod2',
        contacts=[
            Contact('Daniel Kahneman', "Nobel economic sciences laureate and cognitivie psychologist (?)"),
            Contact(DAVID_HAIG, "evolutionary geneticist?", emailer_pattern=r"David Haig|Haig, David"),
            Contact('David Grosof', "MIT Sloan School of Management"),
            Contact('Ed Boyden', f"{MIT_MEDIA_LAB} neurobiology professor"),
            Contact('Harry Fisch', "men's health expert at New York-Presbyterian / Weill Cornell (?)"),
            Contact(JOSCHA_BACH, "cognitive science / AI research"),
            Contact(LAWRENCE_KRAUSS, "theoretical physicist with #MeToo problems", r"Lawrence Kraus[es]?|[jl]awkrauss|kruase"),
            Contact(LINDA_STONE, f"ex-Microsoft, {MIT_MEDIA_LAB}"),
            Contact(MARK_TRAMO, "professor of neurology at UCLA"),
            Contact('Nancy Dahl', f"wife of {LAWRENCE_KRAUSS}"),
            Contact(NEAL_KASSELL, "professor of neurosurgery at University of Virginia"),
            Contact(NOAM_CHOMSKY, "professor of linguistics at MIT"),
            Contact('Norman Finkelstein', "scholar, well known critic of Israel"),
            Contact(PETER_ATTIA, "longevity medicine"),
            Contact(ROBERT_TRIVERS, "evolutionary biology", r"tri[vy]ersr@gmail|Robert\s*Trivers?"),
            Contact(ROGER_SCHANK, "Teachers College, Columbia University"),
            Contact(SETH_LLOYD, "professor of mechanical engineering at MIT"),
            Contact('Valeria Chomsky', f"wife of {NOAM_CHOMSKY}"),
            Contact(YUKO_BARNABY, f"{MIT_MEDIA_LAB} Assistant to the Director", r"Y[ou]ko\s*Ba(m|rn)(aby)?"),
        ],
        patterns=[
            r"Andy\s*Lippman",  # Media Lab
            r"Arizona\s*State\s*University",
            r"Bard\s+((Early )?College|High School|Schools)",
            r"Brotherton",
            r"Carl\s*Sagan",
            r"Columbia(\s*(Business\s*School|University))?",
            r"Dan(iel|ny) Kahneman",
            r"(Francis\s*)?Crick",
            r"J(ames|im)\s*Watson",
            r"(Lord\s*)?Martin\s*Rees",
            r"Massachusetts\s*Institute\s*of\s*Technology",
            r"Mayo\s*Clinic",
            r"Media\s*Lab",
            r"(Marvin\s*)?Minsky",
            r"MIT(\s*Media\s*Lab)?",
            r"Norman\s*Finkelstein",
            r"Oxford(?! Analytica)",
            r"Praluent",
            r"Princeton(\s*University)?",
            r"Regeneron",
            r"(Richard\s*)?Dawkins",
            r"Rockefeller\s*University",
            r"(Sandy\s*)?Pentland",  # Media Lab
            r"Sanofi",
            r"Stanford(\s*University)?(\s*Hospital)?",
            r"(Ste(ph|v)en\s*)?Hawking",
            r"(Steven?\s*)?Pinker",
            r"Texas\s*A&M",
            r"Tulane",
            r"UCLA",
        ],
    ),
    HighlightedNames(
        label='Africa',
        style='light_pink4',
        contacts=[
            Contact('Abdoulaye Wade', "former president of Senegal, father of Karim Wade"),
            Contact('Ivan Glasenberg', "South African former CEO of Glencore, one of the world's largest commodity trading and mining companies"),
            Contact('Karim Wade', 'son of the president of Senegal, facing arrest for corruption, email handle is "Afri zp"'),
            Contact('Miles Alexander', "Operations Manager Michaelhouse Balgowan KwaZulu-Natal South Africa"),
            Contact('Macky Sall', "prime minister of Senegal, defeated Abdoulaye Wade")
        ],
        patterns=[
            r"Buhari",
            r"Econet(\s*Wireless)",
            r"Ethiopian?",
            r"Ghana(ian)?",
            r"Glencore",
            r"Goodluck Jonathan",
            r"Johannesburg",
            r"Kenyan?",
            r"Nigerian?",
            r"Okey Enelamah",
            r"(Paul\s*)?Kagame",
            r"Rwandan?",
            r"Senegal(ese)?",
            r"Serengeti",
            r"(South\s*)?African?",
            r"(Strive\s*)?Masiyiwa",
            r"Tanzanian?",
            r"Ugandan?",
            r"(Yoweri\s*)?Museveni",
            r"Zimbabwe(an)?",
        ],
    ),
    HighlightedNames(
        label=ARTS,
        style='light_steel_blue3',
        contacts=[
            Contact(ANDRES_SERRANO, "'Piss Christ' artist"),
            Contact('Barry Josephson', "American film producer, editor FamilySecurityMatters.org"),
            Contact(BILL_SIEGEL, "documentary film producer and director"),
            Contact(DAVID_BLAINE, "famous magician"),
            Contact('David Brenner', "American comedian and actor"),
            Contact('Richard Merkin', "painter, illustrator and arts educator"),
            Contact(STEVEN_PFEIFFER, "Associate Director at Independent Filmmaker Project (IFP)"),
            Contact('Steven Gaydos', "American screenwriter and journalist")
        ],
        patterns=[
            r"(Art )?Spiegelman",
            r"Artspace",
            r"Ayn\s*Rand",
            r"Bobby slayton",
            r"bono\s*mick",
            r"Errol(\s*Morris)?",
            r"Etienne Binant",
            r"(Frank\s)?Gehry",
            r"Harvey\s*Weinstein", r"wientstein", r"Weinstein\s*Co(s?|mpany)",
            r"IFP",
            r"Independent\s*Filmmaker\s*Project",
            r"Jagger",
            r"(Jeffrey\s*)?Katzenberg",
            r"(Johnny\s*)?Depp",
            r"Kid Rock",
            r"(Larry\s*)?Gagosian",
            r"Lena\s*Dunham",
            r"Madonna",
            r"Mark\s*Burnett",
            r"New York Film Festival",
            r"Peter Getzels",
            r"Phaidon",
            r"Ramsey Elkholy",
            r"Regan arts",
            r"shirley maclaine",
            r"Sotheby's",
            r"Woody( Allen)?",
            r"Zach Braff",
        ],
    ),
    HighlightedNames(
        label=BILL_GATES,
        style='turquoise4',
        category=TECH_BRO,
        contacts=[
            Contact(BILL_GATES, "ex-Microsoft, Gates Foundation, bgC3"),
            Contact(
                name=BORIS_NIKOLIC,
                info=f"biotech VC partner of {BILL_GATES}, Epstein estate executor",
                emailer_pattern=r"(boris )?nikolic?",
            )
        ],
        patterns=[
            r"BG",
            r"b?g?C3",
            r"(Bill\s*((and|or|&)\s*Melinda\s*)?)?Gates(\s*Foundation)?",
            r"Kofi\s*Rashid",
            r"Melinda(\s*Gates)?",
            r"Microsoft",
            r"MSFT",
        ],
    ),
    HighlightedNames(
        label=BUSINESS,
        style='spring_green4',
        contacts=[
            Contact(ALIREZA_ITTIHADIEH, "CEO Freestream Aircraft Limited", r"Alireza.[Il]ttihadieh"),
            Contact('AT&T Court Appearance Team', "AT&T"),
            Contact(BARBRO_C_EHNBOM, "Swedish pharmaceuticals, SALSS", r"behnbom@aol.com|(Barbro\s.*)?Ehnbom"),
            Contact(BARRY_J_COHEN, emailer_pattern=r"barry\s*((j.?|james)\s*)?cohen?"),
            Contact('David Mitchell', "Mitchell Holdings, New York real estate developer"),
            Contact(GERALD_BARTON, "Maryland property developer Landmark Land Company", r"Gerald.*Barton"),
            Contact(NICOLE_JUNKERMANN, f"ex-model, NJF Capital, investor in Revolut, online poker, Carbyne w/{EHUD_BARAK}", r"(Nicole\s*)?Junkermann?"),
            Contact(GORDON_GETTY, "heir to oil tycoon J. Paul Getty"),
            Contact('Philip Kafka', f"president of Prince Concepts (and son of {TERRY_KAFKA}?)"),
            Contact(ROBERT_LAWRENCE_KUHN, "investment banker, China expert", r"Robert\s*(Lawrence)?\s*Kuhn"),
            Contact(TERRY_KAFKA, "CEO of Impact Outdoor (highway billboards)", r"Terry Kafka?"),
            Contact(TOM_PRITZKER, "chairman of The Pritzker Organization and Hyatt Hotels")
        ],
        patterns=[
            r"Arthur Klein",
            r"(Barry\s*)?Honig",
            r"((Bill|David)\s*)?Koch(\s*(Bro(s|thers)|Industries))?",
            r"Gruterite",
            r"((John|Patricia)\s*)?Kluge",
            r"Mar[ck]\s+Rich",
            r"(Mi(chael|ke)\s*)?Ovitz",
            r"(Steve\s+)?Wynn",
            r"(Les(lie)?\s+)?Wexner",
            r"Michael\s*Klein",
            r"New Leaf Ventures",
            r"Park Partners",
            r"SALSS",
            r"Swedish[-\s]*American\s*Life\s*Science\s*Summit",
            r"Trilateral Commission",
            r"Valhi",
            r"(Yves\s*)?Bouvier",
        ],
    ),
    HighlightedNames(
        label='cannabis',
        style='chartreuse2',
        patterns=[
            r"CBD",
            r"cann?abis",
            r"marijuana",
            r"psychedelic",
            r"THC",
            r"WEED(guide|maps)?[^s]?",
        ],
    ),
    HighlightedNames(
        label='China',
        style='bright_red',
        contacts=[
            Contact('Gino Yu', "professor / game designer in Hong Kong")
        ],
        patterns=[
            r"Ali.?baba",
            r"Beijing",
            r"CCP",
            r"Chin(a|e?se)(?! Daily)",
            r"DPRK",
            r"Global Times",
            r"Guo",
            r"Hong",
            r"Huaw[ae]i",
            r"Kim\s*Jong\s*Un",
            r"Kong",
            r"Jack\s+Ma",
            r"Kwok",
            r"Ministry\sof\sState\sSecurity",
            r"Mongolian?",
            r"MSS",
            r"North\s*Korean?",
            r"Peking",
            r"PRC",
            r"Pyongyang",
            r"SCMP",
            r"Xi(aomi)?",
            r"Jinping",
        ],
    ),
    HighlightedNames(
        label=Interesting.CRYPTO,
        style='orange1 bold',
        contacts=[
            Contact(
                name=ADAM_BACK,
                info=f"co-founder of {BLOCKSTREAM}, bitcoin dev, long time Tether defender",
                emailer_pattern=r"Adam\s*Back?",
            ),
            Contact(AMIR_TAAKI, f"bitcoin bro, partner of {DONALD_NORMAN} (and {BROCK_PIERCE}?)", r"Amir\s*Taaki|genjix"),
            Contact(ANTHONY_SCARAMUCCI, "Skybridge Capital, FTX investor", r"mooch|(Anthony ('The Mooch' )?)?Scaramucci"),
            Contact(AUSTIN_HILL, f"{BLOCKSTREAM} co-founder with {ADAM_BACK}, Brudder Ventures"),
            Contact(BROCK_PIERCE, "Bannon partner, Tether co-founder, friend of Yair Netanyahu, sex crime history"),
            Contact(BRYAN_BISHOP, "executive at LedgerX and Polymath fund"),
            Contact(DONALD_NORMAN, f"co-founder of early British crypto exchange Intersango with {AMIR_TAAKI}"),
            Contact(ED_BOYLE, f"Medici Bank", r"Ed\s*Boy(el|le)"),
            Contact(JEFFREY_WERNICK, "former COO of Parler, involved in numerous crypto companies like Bitforex"),
            Contact(JEREMY_RUBIN, "developer/researcher", r"Jeremy\s*Rubin"),
            Contact(
                name=JOI_ITO,
                info=f"former head of {MIT_MEDIA_LAB} and MIT Digital Currency Initiative",
                emailer_pattern=r"ji@media.mit.?edu|(joichi|joi)( Ito)?",
            ),
            Contact(LORENZO_DE_MEDICI, "Medici Bank, possibly Medici heir?", r"Prince\s*Lorenzo|Lorenzo\s*de\s*Medici"),
            Contact(MADARS_VIRZA, f"ZCash lead dev, {MIT_MEDIA_LAB}")
        ],
        patterns=[
            r"Alphabit",
            r"((Andy|Adam)\s*)Back",
            r"Balaji(\s*Srinivisan)?",
            r"Barry Silbert",
            r"Bart\s*Stephens",  # co-founder, Blockchain Capital
            r"Bioptix",  # Now RIOT Blockchain
            r"bitcoin(\s*Foundation)?",
            r"Bit(Angels|Fury|Main)",
            r"block ?chain(\s*capital)?",
            r"Blockstream",
            r"Bradley\s*Rotter",
            r"Brian Forde",
            r"Brock(\s*Pierce)?",
            r"Brudder(\s*Ventures)?",
            r"Coinbase",
            r"coins?(\s*Center)?",
            r"Cory\s*Fields",  # bitcoin dev
            r"cr[iy]?pto\s*(coins?|currenc(y|ies)|PR\s*Lab)?(\s*Partners(\s*II)?)?",
            r"crypto(prlab)?",
            r"(Dan\s*)?Morehead",
            r"Digital\s*Currenc(ies|y)(\s*Initiative)?",
            r"e-?currency",
            r"Fred\s*Ehrsam",
            r"FTX",
            r"(Gavin )?Andress?en",  # bitcoin dev
            r"(Hester\s*)?Peirce",
            r"(Howard\s+)?Lutnic?k",
            r"ICO",
            r"(Jim\s*)Pallotta",  # Media lab advisory board
            r"Kraken",
            r"Kyara(\s*Investments?)?(\s*[IV]+)?",  # crypto vehicle with Joi Ito
            r"Layer\s+(1|One)",
            r"LedgerX",
            r"Libra",
            r"Madars",
            r"Medici\s*Bank",
            r"Mercantile Global Holdings",
            r"Mi(chael|ke)\s*Novogratz",
            r"Noble\s*(Bank|Markets)",  # Crypto bank with Tether ties
            r"Pantera",
            r"(Patrick\s*)?Murck",
            r"Ribbit",
            r"(?-i:RIOT)",  # (?-i:) makes it case sensitive
            r"Ron\s*Rivest",
            r"(Ross\s*)?Ulbricht",
            r"Silk\s*Road",
            r"SpanCash",
            r"Tether",
            r"virtual\s*currenc(ies|y)",
            r"Wire\s*ca\n?rd",
            r"Wladimir( van der Laan)?",  # bitcoin dev
            r"ZCash",
            r"ZECC?",
            r"ZeroCoin",
            r"(zero\s+knowledge\s+|zk)pro(of|tocols?)",
        ],
    ),
    HighlightedNames(
        label='deepak',
        style='dark_sea_green4',
        contacts=[
            Contact(CAROLYN_RANGEL, f"{DEEPAK_CHOPRA}'s assistant {'(???)'}"),
            Contact(DEEPAK_CHOPRA, "woo woo")
        ],
    ),
    HighlightedNames(
        label='Democrat',
        style='sky_blue1',
        contacts=[
            Contact(PAUL_PROSPERI, "friend of Bill Clinton")
        ],
        patterns=[
            r"(Al\s*)?Franken",
            r"Al\s*Gore",
            r"(Barac?k )?Obama",
            r"((Bill|Hillart?y)\s*)?Clinton",
            r"((Chuck|Charles)\s*)?S(ch|hc)umer",
            r"Debbie\s*Wasserman\s*Schultz",
            r"Dem(ocrat(ic)?)?",
            r"(Diana\s*)?DeGette",
            r"DNC",
            r"(Ed(ward)?\s*)?Mezvinsky",
            r"Elena\s*Kagan",
            r"(Eliott?\s*)?Spitzer(, Eliot)?",
            r"Eric Holder",
            r"George\s*Mitchell",
            r"(George\s*)?Soros",
            r"Hakeem\s*Jeffries",
            r"Hill?ary",
            r"HRC",
            r"(Jo(e|seph)\s*)?Biden",
            r"(John\s*)?Kerry",
            r"Lisa Monaco",
            r"(Matteo\s*)?Salvini",
            r"Maxine\s*Waters",
            r"(Nancy )?Pelosi",
            r"Open Society( Global Board)?",
            r"Ron\s*Dellums",
            r"Schumer",
            r"(Tim(othy)?\s*)?Geithner",
            r"Tom McMillen",
            r"Vernon\s*Jordan",
        ],
    ),
    HighlightedNames(
        label='Dubins',
        style='medium_orchid1',
        contacts=[
            Contact(EVA_DUBIN, f"Epstein's ex-girlfriend now married to {GLENN_DUBIN}"),
            Contact(GLENN_DUBIN, "Highbridge Capital Management, married to Epstein's ex-gf Eva"),
        ],
        patterns=[r"((Celina|Eva( Anderss?on)?|Glenn?) )?Dubin"],
    ),
    HighlightedNames(
        label='employee',
        style='medium_purple4',
        contacts=[
            Contact('Alfredo Rodriguez', "Epstein's butler, stole the journal"),
            Contact('Bella Klein', "Epstein's accountant"),
            Contact('Bernard Kruger', "Epstein's doctor"),
            Contact(EDUARDO_ROBLES, "home builder at Creative Kingdom Dubai", r"Ed(uardo)?\s*Robles"),
            Contact(ERIC_ROTH, "jet decorator at International Jet"),
            Contact(GWENDOLYN_BECK, "Epstein fund manager in the 90s"),
            Contact('Ike Groff', f"brother of {LESLEY_GROFF}?"),
            Contact(JANUSZ_BANASIAK, "Epstein's house manager", r"Janu[is]z Banasiak"),
            Contact('John Allessi', "Epstein's houseman"),
            Contact(JEAN_HUGUEN, "interior design at Alberto Pinto Cabinet", r"Jean[\s.]Huguen"),
            Contact(JOJO_FONTANILLA, "Filipino housekeeper", r"Jo.. Fontanilla"),
            Contact(LAWRANCE_VISOSKI, "Epstein's pilot", r"La(rry|wrance) Visoski?|Lvjet"),
            Contact(LESLEY_GROFF, "Epstein's assistant", r"Lesley\s*Gro(ff)?"),
            Contact('Linda Pinto', "interior design at Alberto Pinto Cabinet"),
            Contact(LYN_FONTANILLA, "Filipino housekeeper", r"L.nn? Fontanilla"),
            Contact(MERWIN_DELA_CRUZ, "housekeeper"),
            Contact(NADIA_MARCINKO, "Epstein's pilot", r"Na[dď]i?a\s+Marcinko(v[aá])?"),
            Contact('Sean J. Lancaster', "airplane reseller"),
            Contact(STORY_COWLES, "Epstein's male assistant")
        ],
        patterns=[
            r"Adriana\s*Ross",
            r"Merwin",
            r"(Sarah\s*)?Kellen", r"Vickers",  # Married name is Metiers
        ],
    ),
    HighlightedNames(
        label='Epstein',
        style='blue1',
        contacts=[
            Contact(ASIA_GATEWAY, f"corporate vehicle set up by Epstein and {DAVID_STERN}"),
            Contact(
                name=JEFFREY_EPSTEIN,
                emailer_pattern=r"[djl]\s?ee[vy]acation[©@]?g?(mail.com)?|Epstine|\bJEE?\b|Jeff(rey)? (Edward )?E((sp|ps)tein?)?( VI Foundation)?|jeeproject@yahoo.com|J Jep|Jeffery Edwards|(?<!(ark L.|rd Jay|Edward) )Epstein",
            ),
            Contact(MARK_EPSTEIN, "brother of Jeffrey", r"Mark (L\. )?(Epstein|Lloyd)")
        ],
        patterns=[
            r"(2017\s*)?Caterpillar\s*Trust",
            r"Enhanced\s*Education",
            r"FT\s*Real\s*Estate",
            r"Gratitude\s*America",
            r"(Butterfly|Haze|Southern)\s*(Financial|Trust)(\s*Co(mpany)?)?",
            r"Hyperion(\s*Air)?",
            r"Jeepers(\s*Inc\.?)?",
            r"JEGE(\s*(Inc|LLC))?",
            r"Laurel Inc\.?",
            r"LSJE",
            r"LSJE?(,\s*LLC)?",  # Virgin Islands corporation
            r"Nautilus",
            r"Neptune\s*LLC",
            r"NES LLC",
            r"Plan D",
            r"Southern\s*Country\s*International",
            r"Thomas\s*World\s*Air",
            r"Zorro(\s*(Management|Ranch))?",
        ],
    ),
    HighlightedNames(
        label=LAWYER,  # Epstein's lawyers
        style='purple',
        contacts=[
            Contact('Alan Dlugash', 'tax partner at Paneth and Shrone'),
            Contact('Alan S Halperin', "partner at Paul, Weiss"),
            Contact(ALAN_DERSHOWITZ, f"{HARVARD} Law School professor", r"(alan.{1,7})?dershowi(lz?|t?z)|AlanDersh"),
            Contact(ARDA_BESKARDES, "NYC immigration attorney allegedly involved in sex-trafficking operations"),
            Contact(BENNET_MOSKOWITZ, "represented the Epstein estate executors", r"Moskowitz.*Bennet|Bennet.*Moskowitz"),
            Contact(BRAD_KARP, "head of the law firm Paul Weiss", r"Brad (S.? )?Karp|Karp, Brad"),
            Contact(
                name=CHRISTIAN_EVERDELL,
                info=f"{GHISLAINE_MAXWELL}'s lawyer ca. 2021, Cohen & Gresser",
                emailer_pattern=r"C(hristian\s*)?Everdell?",
            ),
            Contact('Connie Zaguirre', f"office of {'Robert D. Critton Jr.'}"),
            Contact(DAVID_SCHOEN, "criminal defense attorney after 2019 arrest"),
            Contact(DEBBIE_FEIN, f"civil attorney Epstein v. Scott Rothstein, {BRAD_EDWARDS}, & L.M."),
            Contact('Erika Kellerhals', "attorney in St. Thomas"),
            Contact(FRED_HADDAD, "co-founder of Heck's in West Virginia"),
            Contact(GERALD_LEFCOURT, f"friend of {ALAN_DERSHOWITZ}", r"Gerald\s*(B\.?\s*)?Lefcourt"),
            Contact('Howard Rubenstein', "Epstein's former spokesman"),
            Contact(JACK_GOLDBERGER, "criminal defense attorney on 2008 case"),
            Contact(JACKIE_PERCZEK, "criminal defense attorney on 2008 case", r"jackie percze[kl]?"),
            Contact(JAY_LEFKOWITZ, "Kirkland & Ellis partner, criminal defense attorney on 2008 case"),
            Contact(JESSICA_CADWELL, f"paralegal to {ROBERT_D_CRITTON_JR}"),
            Contact(
                name=KEN_STARR,
                info="head of the Monica Lewinsky investigation against Bill Clinton",
                emailer_pattern=r"starr, ken|Ken(neth\s*(W.\s*)?)?\s+starr?|starr",
            ),
            Contact(LILLY_SANCHEZ, CRIMINAL_DEFENSE_ATTORNEY, r"Lilly.*Sanchez"),
            Contact(MARTIN_WEINBERG, CRIMINAL_DEFENSE_ATTORNEY, r"martin.*?weinberg"),
            Contact(MICHAEL_MILLER, "Steptoe LLP partner", r"Micha(el)? Miller|Miller, Micha(el)?"),
            Contact(REID_WEINGARTEN, "Steptoe LLP partner", r"Weingarten, Rei[cdi]|Rei[cdi] Weingarten"),
            Contact(ROBERT_D_CRITTON_JR, CRIMINAL_DEFENSE_ATTORNEY, r"Robert D.? Critton,? Jr\.?"),
            Contact('Robert Gold', "helped Epstein track down money belonging to Spanish families"),
            Contact('Roy Black', f"{CRIMINAL_DEFENSE_ATTORNEY} on 2008 case"),
            Contact(SCOTT_J_LINK, CRIMINAL_DEFENSE_ATTORNEY, r"scott j. link?"),
            Contact(STACEY_RICHMAN, f"New York {CRIMINAL_DEFENSE_ATTORNEY}", r"srichmanlaw|Stacey\s*Richman"),
            Contact(
                name=TONJA_HADDAD_COLEMAN,
                info=f"civil attorney Epstein v. Scott Rothstein, {BRAD_EDWARDS}, & L.M.",
                emailer_pattern=r"To(nj|rl)a Haddad Coleman|haddadfm@aol.com",
            )
        ],
        patterns=[
            r"(Barry (E. )?)?Krischer",
            r"dersh",
            r"Kate Kelly",
            r"Kirkland\s*&\s*Ellis",
            r"(Leon\s*)?Jaworski",
            r"Michael J. Pike",
            r"Paul,?\s*Weiss",
            PERKINS_COIE,
            r"Steptoe(\s*& Johnson)?(\s*LLP)?",
            r"Sull(ivan)?\s*(&|and)?\s*Crom(well)?",
            r"Wein(berg|garten)",
        ],
    ),
    HighlightedNames(
        label=ESTATE_EXECUTOR,
        style='purple3 bold',
        category=LAWYER,
        contacts=[
            Contact(
                name=DARREN_INDYKE,
                info="Epstein estate executor",
                emailer_pattern=r"darren$|Darren\s*(K\.?\s*)?[il]n[dq]_?yke?|dkiesq",
            ),
            Contact(RICHARD_KAHN, "Epstein estate executor", r"rich(ard)? kahn?")
        ],
    ),
    HighlightedNames(
        label='Europe',
        style='light_sky_blue3',
        contacts=[
            Contact(ANDRZEJ_DUDA, "former president of Poland"),
            Contact('Caroline Lang', "daughter of Jack Lang"),
            Contact(EDWARD_ROD_LARSEN, f"son of {TERJE_ROD_LARSEN}"),
            Contact('Fabrice Aidan', f"diplomat who worked with {TERJE_ROD_LARSEN}"),
            Contact('Jack Lang', "former French Minister of National Education"),
            Contact(
                name=MIROSLAV_LAJCAK,
                info=f"Russia-friendly Slovakian politician, friend of {STEVE_BANNON}",
                emailer_pattern=r"Miro(slav)?(\s+Laj[cč][aá]k)?",
            ),
            Contact(PETER_MANDELSON, "former UK ambassador to the US", r"((Lord|Peter) )?Mandelson"),
            Contact(TERJE_ROD_LARSEN, "Norwegian diplomat", r"Terje(( (R[øo]e?d[- ])?)?Lars[eo]n)?"),
            Contact(
                name=THORBJORN_JAGLAND,
                info="former prime minister of Norway, Nobel Peace Prize Committee",
                emailer_pattern=r"(Thor.{3,8})?Jag[il]and?",
            )
        ],
        patterns=[
            r"AfD",
            r"Alfa(\s*Bank)",
            r"(Angela )?Merk(el|le)",
            r"Austria",
            r"Belgi(an|um)",
            r"(Benjamin\s*)?Harnwell",
            r"Berlin",
            r"Borge",
            r"Boris\s*Johnson",
            r"Brexit(eers?)?",
            r"Brit(ain|ish)",
            r"Brussels",
            r"Cannes",
            r"Cypr(iot|us)",
            r"David\s*Cameron",
            r"Davos",
            r"Dutch",
            r"ECB",
            r"England",
            r"EU",
            r"Europe(an)?(\s*Union)?",
            r"Fr(ance|ench)",
            r"Geneva",
            r"Germany?",
            r"Gillard",
            r"Gree(ce|k)",
            r"Ibiza",
            r"Ital(ian|y)",
            r"Jacques",
            r"(Kamila\s*)?Bobinska",
            r"Kiev",
            r"Latvian?",
            r"Lithuanian?",
            r"Le\s*Pen",
            r"(?<!DOJ )London",
            r"Macron",
            r"Melusine",
            r"MI\s*5",
            r"Munich",
            r"NATO",
            r"(Nicholas\s*)?Sarkozy",
            r"Nigel(\s*Farage)?",
            r"(Northern\s*)?Ireland",
            r"Norw(ay|egian)",
            r"Oslo",
            r"Paris",
            r"Polish",
            r"pope",
            r"Portugal",
            r"Scotland",
            r"(Sebastian )?Kurz",
            r"Stockholm",
            r"Strasbourg",
            r"Strauss[- ]?Kahn",
            r"Swed(en|ish)(?![-\s]+American Life Scienc)",
            r"Swi(ss|tzerland)",
            r"Tommy\s*Robinson",
            r"(Tony\s)?Blair",
            r"United\s*Kingdom",
            r"U\.K\.",
            r"Ukrain(e|ian)",
            r"Venice",
            r"(Vi(c|k)tor\s+)?Orbah?n",
            r"Vienna",
            r"Zug",
            r"Zurich",
        ],
    ),
    HighlightedNames(
        label=Neutral.FINANCE,
        style='green',
        contacts=[
            Contact(AMANDA_ENS, "Citigroup", r"ens, amanda?|Amanda.Ens"),
            Contact(BRAD_WECHSLER, f"head of {LEON_BLACK}'s personal investment vehicle according to FT"),
            Contact(CECILIA_STEEN),
            Contact(DANIEL_SABBA, f"{UBS} Investment Bank"),
            Contact(
                name=DAVID_FISZEL,
                info="CIO Honeycomb Asset Management, Epstein invested in Spotify through him",
                emailer_pattern=r"David\s*Fis?zel",
            ),
            Contact(JES_STALEY, "former CEO of Barclays"),
            Contact(JIDE_ZEITLIN, f"former partner at {GOLDMAN_SACHS}, allegations of sexual misconduct"),
            Contact('Laurie Cameron', "currency trading"),
            Contact(
                name=LEON_BLACK,
                info="Apollo CEO who paid Epstein tens of millions for tax advice",
                emailer_pattern=r"Leon\s*Black?|(?<!Marc )Leon(?! (Botstein|Jaworski|Wieseltier))",
            ),
            Contact(MARC_LEON, "Luxury Properties Sari Morrocco", r"Marc[.\s]+(Kensington|Leon)|Kensington2"),
            Contact(MELANIE_SPINELLA, f"representative of {LEON_BLACK}", r"M?elanie Spine[Il]{2}a"),
            Contact(MORTIMER_ZUCKERMAN, "business partner of Epstein, newspaper publisher"),
            Contact(NORMAN_D_RAU, "managing director at Morgan Stanley"),
            Contact(PAUL_BARRETT, emailer_pattern=r"Paul Barre(d|tt)"),
            Contact(PAUL_MORRIS, f"{DEUTSCHE_BANK}", r"morris, paul|Paul Morris"),
            Contact('Skip Rimer', "Milken Institute (Michael Milken)"),
            Contact('Steven Elkman', f"{DEUTSCHE_BANK}"),
            Contact(TANCREDI_MARCHIOLO, "hedge fund manager"),
            Contact('Vahe Stepanian', "Cetera Financial Group"),
            Contact(VINIT_SAHNI, f"analyst at {DEUTSCHE_BANK} and {GOLDMAN_SACHS}")
        ],
        patterns=[
            r"Ace\s*Greenberg",
            r"AIG",
            r"((anti.?)?money\s+)?launder(s?|ers?|ing)?(\s+money)?",
            r"Apollo",
            r"Ari\s*Glass",
            r"Bank(\s*of\s*Scotland)",
            r"Bear\s*Stearns",
            r"(Bernie\s*)?Madoff",
            r"Black(rock|stone)",
            r"B\s*of\s*A",
            r"Boothbay(\sFund\sManagement)?",
            r"Cantor(\s*(Fitzgerald|Opportunities))?",
            r"Chase\s*Bank",
            r"Conrad B",
            r"Credit\s*Suisse",
            r"DB",
            r"Deutsche?\s*(Asset|Bank)",
            r"Electron\s*Capital\s*(Partners)?",
            r"Fenner",
            r"FRBNY",
            r"Goldman(\s*Sachs)",
            r"GRAT",
            r"Gratitude (America|& Enhanced)",  # Leon Black and/or Epstein charity?
            r"Hank\s*Greenburg",
            r"HSBC",
            r"Invesco",
            r"Jamie\s*D(imon)?",
            r"(Janet\s*)?Yellen",
            r"(Jerome\s*)?Powell(?! M\. Cabot)",
            r"(Jimmy\s*)?Cayne",
            r"Joon\s*Yun",
            r"JPMC?",
            r"j\.?p\.?\s*morgan(\.?com|\s*Chase)?",
            r"Madoff",
            r"Merrill(\s*Lynch)?",
            r"(Michael\s*)?Cembalest",
            r"(Mi(chael|ke)\s*)?Milken(\s*Conference|Institute)?",
            r"Mizrahi\s*Bank",
            r"MLPF&S",
            r"Morgan Stanley",
            r"(Peter L. )?Scher",
            r"(Ray\s*)?Dalio",
            r"(Richard\s*)?LeFrak",
            r"Rockefeller(?! University)(\s*Foundation)?",
            r"SBNY",
            r"Serageldin",
            r"Signature\s*Bank",
            r"(Ste(phen|ve)\s*)?Schwart?z?man",
            r"Susquehanna",
            r"Teneo\s*Capital",
            r"UBS",
            r"us.gio@jpmorgan.com",
            r"Wall\s*Street(?!\s*Jour)",
        ],
    ),
    HighlightedNames(
        label=FRIEND,
        style='tan',
        contacts=[
            Contact(
                name=ANDREW_FARKAS,
                info="heir to the Alexander's department store fortune",
                emailer_pattern=r"Andrew\s*(L\.\s*)?Farkas|Farkas,\s*Andrew(\s*L\.?)?",
            ),
            Contact(DANGENE_AND_JENNIE_ENTERPRISE, "founders of the members-only CORE club"),
            Contact(DAVID_STERN, f"emailed Epstein from Moscow, knows chairman of {DEUTSCHE_BANK} (?)", r"David\s*Ste(m|rn?)"),
            Contact(
                name=JONATHAN_FARKAS,
                info="heir to the Alexander's department store fortune",
                emailer_pattern=r"Jonathan Fark(a|u)(s|il)",
            ),
            Contact('linkspirit', "Skype username of someone Epstein communicated with"),
            Contact('Peter Thomas Roth', "student of Epstein at Dalton, skincare company founder"),
            Contact(STEPHEN_HANSON, emailer_pattern=r"ste(phen|ve) hanson?|Shanson900"),
            Contact(TOM_BARRACK, "long time friend of Trump")
        ],
        patterns=[
            r"Jonanthan and Kimberly Farkus",
            r"Thomas\s*(J\.?\s*)?Barrack(\s*Jr)?",
        ],
    ),
    HighlightedNames(
        label='government',
        style='color(24) bold',
        contacts=[
            Contact(
                name=ALISON_J_NATHAN,
                info="judge in New York's Southern District",
                emailer_pattern=r"Alison(\s*J\.?)?\s*Nathan|Nathan\s*NYSD\s*Chambers?",
            ),
            Contact(
                name=ANN_MARIE_VILLAFANA,
                info="Southern District of Florida (SDFL) U.S. Attorney",
                emailer_pattern=r"Villafana, Ann Marie|(A(\.|nn) Marie )?Villafa(c|n|ri)a",
            ),
            Contact(AUDREY_STRAUSS, "USA Attorney", r"Audrey Strauss|Strauss, Audrey"),
            Contact(BUREAU_OF_PRISONS, "American law enforcement", r"bop\.gov"),
            Contact(CHRISTOPHER_DILORIO, "self described whistleblower", r"Chris\s*Di[lI]o[nr](io)?"),
            Contact(
                name=DANNY_FROST,
                info="Director of Communications at Manhattan D.A.",
                emailer_pattern=r"Frost, Danny|frostd@dany.nyc.gov|Danny\s*Frost",
            ),
            Contact('DOJ Inspector General', "American law enforcement"),
            Contact('DOJ London', "American law enforcement"),
            Contact(FBI, "American law enforcement"),
            Contact('Florence Hutner', "New York Office of Chief Medical Examiner"),
            Contact('Justin Alfano', "American law enforcement"),
            Contact('Manhattan DA', "American law enforcement"),
            Contact('NY FBI', "American law enforcement"),
            Contact(OFFICE_OF_THE_DEPUTY_ATTORNEY_GENERAL, "American law enforcement", r"\bODAG\b"),
            Contact('Paula Speer', "court reporter"),
            Contact('Police Code Enforcement', "Palm Beach buildings code enforcement"),
            Contact(SDNY, "American law enforcement, Southern District of New York"),
            Contact('USAHUB-USAJournal111', "American law enforcement"),
            Contact(USANYS, "American law enforcement"),
            Contact('USMS', "United States Marshal Service")
        ],
        patterns=[
            r"AG",
            r"(Alicia\s*)?Valle",
            r'Alice\s*Fisher|Fisher, Alice',
            r"AML",
            r"(Andrew\s*)?(McCabe|Natsios)",
            r"(Assistant\s+)?State\s*Attorney",
            r"Attorney General",
            r'Barbara\s*Burns',  # AUSA
            r"((Bob|Robert)\s*)?Mueller",
            r"(Byung\s)?Pak",
            r"Case 1:19-cv-03377(-LAP)?",
            r"(CENT|NORTH|SOUTH)COM",
            r"CFTC?",
            r"CIA",
            r"CIS",
            r"CVRA",
            r"DARPA",
            r"Dep(artmen)?t\.?\s*of\s*(the\s*)?(Justice|Treasury)",
            r"DHS",
            r"DOJ",
            r"EDGAR (Filing|Search)",  # SEC database is EDGAR
            r"FCPA",
            r"FDIC",
            r"FDLE",
            r"Federal\s*Bureau\s*of\s*Investigation",
            r"FinCEN",
            r"(www\.)?FINRA(\.org)?",
            r"Florence Hutner",
            r"FOIA",
            r"FTC",
            r"Gary\s*Gensler",
            r"(General\s*)?P(a|e)traeus",
            r"Geoff\s*Ling",
            r"Homeland\s*Security",
            r"Interpol",
            r"IRS",
            r"(James\s*)?Comey",
            r"(Jennifer\s*Shasky\s*)?Calvery",
            r"((Judge|Mark)\s*)?(Carney|Filip)",
            r"(Judge\s*)?(Kenneth\s*)?(A\.?\s*)?Marra",
            r"(Justice|Treasury)\s*Dep(t|artment)",
            r"(Kirk )?Blouin",
            r"KYC",
            r"(Lann?a\s*)?Belohlavek",
            r"MDC"
            r"Metropolitan Detention Center",
            r"(Michael\s*)?Reiter",
            r"NIH",
            r"NPA",
            r"NS(A|C)",
            r"OCC",
            r"ODAG",
            r"OFAC",
            r"OGE",
            r"Office\s*of\s*Government\s*Ethics",
            r"PBPD",
            r"police",
            r"POTUS",
            r"(Preet\s*)?Bharara",
            r"Public\s*Corruption\s*Unit",
            r"SCOTUS",
            r"SD(FL|NY)",
            r"SEC(\.gov)?",
            r"Secret\s*Service",
            r"Securities\s*and\s*Exchange\s*Commission",
            r"Southern\s*District(\s*of\s*(Florida|New\s*York))?",
            r"State\s*Dep(artmen)?t",
            r"Strzok",
            r"Supreme\s*Court",
            r"Treasury\s*(Dep(artmen)?t|Secretary)",
            r"TSA",
            r"U\.?S\.? attorney",
            r"USAID",
            USANYS,
            r"UNITED STATES DISTRICT COURT?",
            r"US\s*(AF|Army|Air\s*Force)",
            r"Walter\s*Reed(\s*Army\s*Institute\s*of\s*Research)?",
            r"(William\s*J\.?\s*)?Zloch",
            r"WRAIR",
        ],
    ),
    HighlightedNames(
        label=HARVARD,
        style='light_goldenrod3',
        contacts=[
            Contact('Donald Rubin', "Professor of Statistics"),
            Contact('Kelly Friendly', f"longtime aide and spokesperson of {LARRY_SUMMERS}"),
            Contact(
                name=LARRY_SUMMERS,
                info="board of Digital Currency Group (DCG), Obama economic advisor",
                emailer_pattern=r"(La(wrence|rry).{1,5})?Summers?|^LH$|LHS|[Il]hsofficel?",
            ),
            Contact('Leah Reis-Dennis', f"producer for {LISA_NEW}'s Poetry in America"),
            Contact(
                name=LISA_NEW,
                info=f'professor of poetry, wife of {LARRY_SUMMERS}, AKA "Elisa New"',
                emailer_pattern=r"E?Lisa New?\b",
            ),
            Contact('Lisa Randall', "theoretical physicist"),
            Contact(MARTIN_NOWAK, "professor of mathematics and biology", r"(Martin.*?)?No[vw]ak|Nowak, Martin"),
            Contact(MOSHE_HOFFMAN, "behavioral and evolutionary economics")
        ],
        patterns=[
            r"Cambridge",
            r"(Derek\s*)?Bok",
            r"Elisa(\s*New)?",
            r"Harvard(\s*(Business|Law|University)(\s*School)?)?",
            r"(Jonathan\s*)?Zittrain",
            r"Poetry\s*in\s*America",
            r"(Stephen\s*)?Kosslyn",
        ],
    ),
    HighlightedNames(
        label='India',
        style='bright_green',
        contacts=[
            Contact(ANIL_AMBANI, "billionaire chairman of Reliance Group", r"Anil.Ambani")
        ],
        patterns=[
            r"Abraaj",
            r"Anna\s*Hazare",
            r"(Arif\s*)?Naqvi",
            r"(Arvind\s*)?Kejriwal",
            r"Bangalore",
            r"Hardeep( Pur[ei]e)?",
            r"Indian?",
            r"InsightsPod",
            r"Modi",
            r"Mumbai",
            r"(New\s*)?Delhi",
            r"Tranchulas",
        ],
    ),
    HighlightedNames(
        label='Israel',
        style='dodger_blue2',
        contacts=[
            Contact(
                name=EHUD_BARAK,
                info="former prime minister of Israel, Epstein business partner",
                emailer_pattern=r"(ehud|e?h)\s*barak|\behud",
            ),
            Contact('Mitchell Bard', "director of the American-Israeli Cooperative Enterprise (AICE)"),
            Contact(NILI_PRIELL_BARAK, f"wife of {EHUD_BARAK}")
        ],
        patterns=[
            r"AIPAC",
            r"(Bank\s*)?Leumi",
            r"Bibi",
            r"Carbyne",   # Co. invested in by barak + epstein
            r"(eh|(Ehud|Nili Priell)\s*)?barak",
            r"EB",
            r"Ehud\s*Barack",
            r"Hapoalim",
            r"Idan\s*Ofer",
            r"Israeli?",
            r"Jerusalem",
            r"J\s*Street",
            r"Menachem\s*Begin",
            r"Mossad",
            r"Netanyahu",
            r"Reporty",  # Co. invested in by barak + epstein
            r"(Sheldon\s*)?Adelson",
            r"Tel\s*Aviv",
            r"(The\s*)?Shimon\s*Post",
            r"Yitzhak", r"Rabin",
            r"YIVO",
            r"zionist",
        ],
    ),
    HighlightedNames(
        label='Japan',
        style='color(168)',
        patterns=[
            r"BOJ",
            r"(Bank\s+of\s+)?Japan(ese)?",
            r"jpy?(?! Morgan)",
            r"SG",
            r"Singapore",
            r"Toky[op]",
        ],
    ),
    HighlightedNames(
        label=JOURNALIST,
        style='bright_yellow',
        contacts=[
            Contact('Alain Forget', "author of \"How To Get Out Of This World ALIVE\""),
            Contact('Alex Yablon', "New York Magazine fact checker (?)"),
            Contact(
                name=EDWARD_JAY_EPSTEIN,
                info="no relation, wrote books about spies",
                emailer_pattern=r"(?<!Jeffrey )Edward (Jay )?Epstein",
            ),
            Contact('Dan Dubno', 'producer and technologist for CBS News in New York'),
            Contact(HENRY_HOLT, f"{MICHAEL_WOLFF}'s book publisher (company not a person)"),
            Contact(JAMES_HILL, "ABC News", r"hill, james e.|james.e.hill@abc.com"),
            Contact(JENNIFER_JACQUET, "Future Science magazine"),
            Contact(JOHN_BROCKMAN, "literary agent and author specializing in scientific literature"),
            Contact(
                name=LANDON_THOMAS,
                info="New York Times financial reporter",
                emailer_pattern=r"lando[nr] thomas( jr)?|thomas jr.?, lando[nr]",
            ),
            Contact(
                name=MICHAEL_WOLFF,
                info="Author of \"Fire and Fury: Inside the Trump White House\"",
                emailer_pattern=r"Michael\s*Wol(f[ef]e?|i)|Wolff",
            ),
            Contact('Newsmax', "right wing American news outlet", r"Newsmax(\.com)?"),
            Contact(PAUL_KRASSNER, "60s counterculture guy", r"Pa\s?ul Krassner"),
            Contact('Peter Aldhous', "Buzzfeed science reporter"),
            Contact('Susan Edelman', "New York Post reporter"),
            Contact('Tim Zagat', "Zagat restaurant guide CEO")
        ],
        patterns=[
            r"ABC(\s*News)?",
            r"Alexandra Wolfe|Wolfe, Alexandra",
            r"AlterNet",
            r"Arianna(\s*Huffington)?",
            r"(Arthur\s*)?Kretchmer",
            r'Associated\s*Press',
            r"Axios",
            r"BBC",
            r"(Bob|Robert)\s*(Costa|Woodward)",
            r"Breitbart",
            r"BuzzFeed(\s*News)?",
            r"C-?Span",
            r"CBS(\s*(4|Corp|News))?",
            r"Charlie\s*Rose",
            r"China\s*Daily",
            r"(C|MS)?NBC(\s*News)?",
            r"CNN(politics?)?",
            r"Con[cs]hita", r"Sarnoff",
            r"Daily Business Review",
            r"(?<!Virgin[-\s]Islands[-\s])(The\s*)?Daily\s*(Beast|Mail|News|Telegraph)",
            r"(David\s*)?(Pecker|Pegg)",
            r"David\s*Brooks",
            r"Ed\s*Krassenstein",
            r"(Emily\s*)?Michot",
            r"Ezra\s*Klein",
            r"Fire\s*and\s*Fury",
            r"Forbes",
            r"Fortune\s*Magazine",
            r"Fox\s*News(\.com)?",
            r"FrontPage Magazine",
            r"FT",
            r"(George\s*)?Stephanopoulus",
            r"Ger(ald|ry)\s*Baker",
            r"Globe\s*and\s*Mail",
            r"Good\s*Morning\s*America",
            r"Graydon(\s*Carter)?",
            r"Hollywood\s*Reporter",
            r"Huff(ington)?(\s*Po(st)?)?",
            r"Ingram, David",
            r"James\s*Hill",
            r"(James\s*)?Patterson",
            r"Jesse Kornbluth",
            r"John\s*Connolly",
            r"Jonathan\s*Karl",
            r"Journal of Criminal Law and Criminology",
            r"Julie\s*(K.?\s*)?Brown", r'jbrown@miamiherald.com',
            r"(Katie\s*)?Couric",
            r"Keith\s*Larsen",
            r"L\.?A\.?\s*Times",
            r"Law(360|\.com|fare)",
            r"(Les\s*)?Moonves",
            r"MarketWatch",
            r"Miami\s*Herald",
            r"(Mi(chael|ke)\s*)?Bloomber[gq](\s*News)?",
            r"(Michele\s*)?Dargan",
            r"Morning News USA",
            r"(National\s*)?Enquirer",
            r"News(max|week)",
            r"NYer",
            r"Palm\s*Beach\s*(Daily\s*News|Post)",
            r"PERVERSION\s*OF\s*JUSTICE",
            r"Politico",
            r"Pro\s*Publica",
            r"(Sean\s*)?Hannity",
            r"Sharon Churcher",  # Daily Mail
            r"Sulzberger",
            r"SunSentinel",
            r"(The\s*)?Financial\s*Times",
            r"The\s*Guardian",
            r"TheHill",
            r"(The\s*)?Mail\s*On\s*Sunday",
            r"(The\s*)?N(ew\s*)?Y(ork)?\s*(Magazine|Observer|P(ost)?|T(imes)?)",
            r"(The\s*)?New\s*Yorker",
            r"(The\s*)?Wall\s*Street\s*Journal",
            r"(The\s*)?Wa(shington\s*)?Po(st)?",
            r"(Thomson\s*)?Reuters",
            r"(Uma\s*)?Sanghvi",
            r"USA\s*Today",
            r"Vanity\s*Fair",
            r"Viceland",
            r"Vick[iy]\s*Ward",
            r"Vox",
            r"WGBH",
            r"WSJ",
            r"[-\w.]+@(bbc|independent|mailonline|mirror|thetimes)\.co\.uk",
        ],
    ),
    HighlightedNames(
        label=JUNK,
        style='gray46',
        contacts=[
            Contact('asmallworld@travel.asmallworld.net'),
            Contact('digest-noreply@quora.com'),
            Contact('editorialstaff@flipboard.com'),
            Contact('How To Academy', is_junk=True),
            Contact('Jokeland')
        ],
        should_match_first_last_name=False,
    ),
    HighlightedNames(
        label='Latin America',
        style='yellow',
        patterns=[
            r"Argentin(a|ian)",
            r"Bolsonar[aio]",
            r"Bra[sz]il(ian)?",
            r"Caracas",
            r"Castro",
            r"Chile",
            r"Colombian?",
            r"Cuban?",
            r"el chapo",
            r"El\s*Salvador",
            r"((Enrique )?Pena )?Nieto",
            r"Lat(in)?\s*Am(erican?)?",
            r"Lula",
            r"(?<!New )Mexic(an|o)",
            r"(Nicolas\s+)?Maduro",
            r"Panama( Papers)?",
            r"Peru(vian)?",
            r"Venezuelan?",
            r"Zambrano",
        ],
    ),
    HighlightedNames(
        label=LOBBYIST,
        style='light_coral',
        contacts=[
            Contact(BOB_CROWE, "partner at Nelson Mullins", r"[BR]ob Crowe"),
            Contact(
                name=GANBAT_CHULUUNKHUU,
                info="corrupt Mongolian politician who was later wanted by Interpol",
                emailer_pattern=r"Ganbat(@|\s*Ch(uluunkhuu)?)?",
            ),
            Contact('Joshua Cooper Ramo', "co-CEO of Henry Kissinger Associates"),
            Contact(KATHERINE_KEATING, "daughter of former Australian prime minister"),
            Contact('Khaltmaagiin Battulga', "former president of Mongolia"),
            Contact(MOHAMED_WAHEED_HASSAN, "former president of the Maldives", r"Mohamed Waheed(\s+Hassan)?"),
            Contact(OLIVIER_COLOM, "France", r"Colom, Olivier|Olivier Colom"),
            Contact('Paul Keating', "former prime minister of Australia"),
            Contact(PUREVSUREN_LUNDEG, "Mongolian ambassador to the UN"),
            Contact('Stanley Rosenberg', "former President of the Massachusetts Senate")
        ],
        patterns=[
            r"CSIS",
            r"elisabeth\s*feliho",
            r"(Kevin\s*)?Rudd",
            r"Stanley Rosenberg",
            r"Vinoda\s*Basnayake",
        ],
    ),
    HighlightedNames(
        label='locations',
        style='cornsilk1',
        patterns=[
            r"Alabama",
            r"Arizona(?! State University)",
            r"Aspen",
            r"Berkeley",
            r"Boston",
            r"Brooklyn",
            r"California",
            r"Canada",
            r"Cape Cod",
            r"Charlottesville",
            r"Colorado",
            r"Connecticut",
            r"Florida",
            r"Jersey\s*City",
            r"Los Angeles",
            r"Loudoun\s*County?",
            r"Martha's\s*Vineyard",
            r"Miami(?!\s?Herald)",
            r"Nantucket",
            r"New\s*(Jersey|Mexico)",
            r"(North|South)\s*Carolina",
            r"NY(C|\s*State)",
            r"Orange\s*County",
            r"Oregon",
            r"Palo Alto",
            r"Pennsylvania",
            r"Phoenix",
            r"Portland",
            r"San Francisco",
            r"Sant[ae]\s*Fe",
            r"Telluride",
            r"Teterboro",
            r"Texas(?! A&M)",
            r"Toronto",
            r"Tu(sc|cs)on",
            r"Vermont",
            r"Washington(\s*D\.?C)?(?!\s*Post)",
            r"Westchester",
        ],
    ),
    HighlightedNames(
        label=MIDEAST,
        style='dark_sea_green4',
        contacts=[
            Contact(ANAS_ALRASHEED, f"former information minister of Kuwait {'(???)'}", r"anas\s*al\s*rashee[cd]"),
            Contact(AZIZA_ALAHMADI, "Abu Dhabi Department of Culture & Tourism, assistant of Al Sabbagh"),
            Contact(
                name=FAWZI_SIAM,
                info="sharia auditor in Qatar, friend of Sheikh Jabor Al-Thani",
                emailer_pattern=r"Fawzi.Siam?",
            ),
            Contact(RAAFAT_ALSABBAGH, "Saudi royal advisor"),
            Contact(SHAHER_ABDULHAK_BESHER, "Yemeni billionaire", r"\bShaher(\s*Abdulhak\s*Besher)?\b")
        ],
        patterns=[
            r"Abdulmalik Al-Makhlafi",
            r"Abdullah",
            r"Abu\s+Dhabi",
            r"Afghanistan",
            r"Ahmadinejad",
            r"Al[- ]?Qasimi",
            r"Al[-\s]?Qa[ei]da",
            r"(Rakhat )?Aliyev",
            r"Arab",
            r"Aramco",
            r"Armenia",
            r"Assad",
            r"Ayatollah",
            r"Bahrain",
            r"Basiji?",
            r"Beirut",
            r"Benghazi",
            r"Brunei",
            r"Cairo",
            r"Chagoury",
            r"Damascus",
            r"Dj[iu]bo?uti",
            r"Doha",
            r"[DB]ubai",
            r"Egypt(ian)?",
            r"Emir(at(es?|i))?",
            r"Erdogan",
            r"Fashi",
            r"Gaddafi",
            r"Gulf\s*Cooperation\s*Council",
            r"GCC",
            r"(Hamid\s*)?Karzai",
            r"Hamad\s*bin\s*Jassim",
            r"Hamas",
            r"Hezbollah",
            r"HBJ",
            r"Hourani",
            r"Houthi",
            r"Imran\s+Khan",
            r"Iran(ian)?([-\s]Contra)?",
            r"Isi[ls]",
            r"Islam(abad|ic|ist)?",
            r"Istanbul",
            r"Kabul",
            r"(Kairat\s*)?Kelimbetov",
            r"kasshohgi",
            r"Kaz(akh|ich)stan",
            r"Kazakh?",
            r"Kh[ao]menei",
            r"Khalid\s*Sheikh\s*Mohammed",
            r"Kh?ashoggi",
            r"KSA",
            r"Leban(ese|on)",
            r"Libyan?",
            r"Mahmoud",
            r"Marra[hk]e[cs]h",
            r"MB(N|S|Z)",
            r"Mid(dle)?\s*East(ern)?",
            r"Mohammed\s+bin\s+Salman",
            r"Morocc(an|o)",
            r"Mubarak",
            r"Muslim(\s*Brotherhood)?",
            r"Nayaf",
            r"Nazarbayev",
            r"Pakistani?",
            r"Omar",
            r"(Osama\s*)?Bin\s*Laden",
            r"Osama(?! al)",
            r"Palestin(e|ian)",
            r"Persian?(\s*Gulf)?",
            r"Riya(dh|nd)",
            r"Saddam",
            r"Salman",
            r"Saudi(\s+Arabian?)?",
            r"Shariah?",
            r"SHC",
            r"sheikh",
            r"shia",
            r"(Sultan\s*)?Yacoub",
            r"Sultan(?! Ahmed)",
            r"Syrian?",
            r"(Tarek\s*)?El\s*Sayed",
            r"Tehran",
            r"Timur\s*Kulibayev",
            r"Tripoli",
            r"Tunisian?",
            r"Turk(ey|ish)?(?!s & Caicos)",
            r"UAE",
            r"((Iraq|Iran|Kuwait|Qatar|Yemen)i?)",
        ],
    ),
    HighlightedNames(
        label='modeling',
        style='pale_violet_red1',
        contacts=[
            Contact('Abi Schwinck', f"{JEAN_LUC_BRUNEL}'s MC2 Model Management {'(???)'}"),
            Contact(DANIEL_SIAD),
            Contact(FAITH_KATES, "Next Models co-founder", r"faith kates?"),
            Contact('Gianni Serazzi', "fashion consultant?"),
            Contact(
                name=HEATHER_MANN,
                info=f"South African former model, ex-girlfriend of {PRINCE_ANDREW} (?)",
                emailer_pattern=r"Heather Mann?",
            ),
            Contact(
                name=JEAN_LUC_BRUNEL,
                info="MC2 Model Management founder, died by suicide in French jail",
                emailer_pattern=r"Jean[- ]Luc Brunel?|JeanLuc",
            ),
            Contact(
                name=JEFF_FULLER,
                info=f"president of {JEAN_LUC_BRUNEL}'s MC2 Model Management USA",
                emailer_pattern=r"jeff@mc2mm.com|Jeff Fuller",
            ),
            Contact('lorraine@mc2mm.com', f"{JEAN_LUC_BRUNEL}'s MC2 Model Management"),
            Contact('pink@mc2mm.com', f"{JEAN_LUC_BRUNEL}'s MC2 Model Management", r"^Pink$|pink@mc2mm\.com"),
            Contact(MANUELA_MARTINEZ, "Mega Partners (Brazilian agency)", r"Manuela (- Mega Partners|Martinez)"),
            Contact(MARIANA_IDZKOWSKA, emailer_pattern=r"Mariana [Il]d[źi]kowska?"),
            Contact('Michael Sanka', f"{JEAN_LUC_BRUNEL}'s MC2 Model Management {'(???)'}"),
            Contact('Vladimir Yudashkin', "director of the 1 Mother Agency")
        ],
        patterns=[
            r"\w+@mc2mm.com",
            r"MC2",
            r"(Nicole\s*)?Junkerman",  # Also a venture fund manager now
            r"Tigrane",
        ],
    ),
    HighlightedNames(
        label=PUBLICIST,
        style='orange_red1',
        contacts=[
            Contact(AL_SECKEL, "Isabel Maxwell's husband, Mindshift conference, fell off a cliff"),
            Contact('Barnaby Marsh', "co-founder of philanthropy services company Saint Partners"),
            Contact(CHRISTINA_GALBRAITH, f"{JEFFREY_EPSTEIN} VI Foundation Media/PR, worked with {TYLER_SHEARS}"),
            Contact(IAN_OSBORNE, f"{IAN_OSBORNE} & Partners reputation repairer hired in 2011", fr"{IAN_OSBORNE}|lan Osbome"),
            Contact(MATTHEW_HILTZIK, "crisis PR at Hiltzik Strategies"),
            Contact(MICHAEL_SITRICK, "crisis PR", r"(Mi(chael|ke).{0,5})?[CS]itrick"),
            Contact('Owen Blicksilver', "OBPR, Inc."),
            Contact(PEGGY_SIEGAL, "socialite, movie promoter", r"Peggy Siegal?"),
            Contact('R. Couri Hay'),
            Contact(
                name=ROSS_GOW,
                info="Acuity Reputation Management",
                emailer_pattern=r"Ross(acuity)? Gow|(ross@)?acuity\s*reputation(\.com)?",
            ),
            Contact(
                name=TYLER_SHEARS,
                info=f"reputation management, worked on with {CHRISTINA_GALBRAITH}",
                emailer_pattern=r"T[vy]ler\s*Shears",
            )
        ],
        patterns=[
            r"(Matt(hew)? )?Hiltzi[gk]",
            r"Philip\s*Barden",
            r"PR\s*Newswire",
            REPUTATION_MGMT,
            r"Reputation.com",
            r"(Robert L\. )?Dilenschneider",
        ],
    ),
    HighlightedNames(
        label='Republican',
        style='dark_red bold',
        contacts=[
            Contact('Juleanna Glover', "CEO of D.C. public affairs advisory firm Ridgely|Walsh"),
            Contact(RUDY_GIULIANI),
            Contact(TULSI_GABBARD)
        ],
        patterns=[
            r"Alberto\sGonzale[sz]",
            r"(Alex\s*)?Acosta",
            r"Ann\s*Coulter",
            r"(Ben\s*)?Sasse",
            r"Betsy Devos",
            r"((Bill|William)\s*)?Barr",
            r"Bill\s*Shine",
            r"Blackwater",
            r"(Bob\s*)?Corker",
            r"(Brett\s*)?Kavanau?gh",
            r"Broidy",
            r"(Chris\s)?Christie",
            r"(?<!Merwin Dela )Cruz",
            r"Darrell\s*Issa",
            r"Devin\s*Nunes",
            r"(Don\s*)?McGa[hn]n",
            r"Erik\s*Prince",
            r"Gary\s*Cohn",
            r"George\s*(H\.?\s*)?(W\.?\s*)?Bush",
            r"(George\s*)?Nader",
            r"GOP",
            r"((Chair|Jay|Joseph)\s*)?Clayton",  # SEC chair, now SDNY
            r"((Bill|William)\s*)?Hinman"
            r"Jeff(rey)?\s*Sessions",
            r"(John\s*(R.?\s*)?)?Bolton",
            r"Kasich",
            r"Keith\s*Schiller",
            r"Kelly(\s*Anne?)?\s*Conway|Kellyanne",
            r"Kissinger",
            r"Kobach",
            r"Kolfage",
            r"(Larry\s*)?Kudlow",
            r"Lewandowski",
            r"(Marco\s)?Rubio",
            r"(Mark\s*)Meadows",
            r"Mattis",
            r"McCain",
            r"McMaster",
            r"(Michael\s)?Hayden",
            r"((General|Mike)\s*)?(Flynn|Pence)",
            r"(Mitt\s*)?Romney",
            r"(Steven?\s*)?Mnuchin",
            r"(Newt\s*)Gingrich",
            r"Nikki",
            r"Haley",
            r"(Paul\s*)?(Manafort|Volcker)",
            r"(Peter\s*)?Navarro",
            r"Pompeo",
            r"Reagan",
            r"Reince", r"Priebus",
            r"Republican",
            r"(Rex\s*)?Till?erson",
            r"(?<!Cynthia )(Richard\s*)?Nixon",
            r"RNC",
            r"(Roy|Stephen)\s*Moore",
            r"Tea\s*Party",
            r"Wilbur\s*Ross",
        ],
    ),
    HighlightedNames(
        label='Rothschild',
        style='indian_red',
        contacts=[
            Contact(
                name=ARIANE_DE_ROTHSCHILD,
                info="heiress",
                emailer_pattern=r"AdeR|((Ariane|Edmond) (de )?)?Rothsh?ch?ild|Ariane(?!\s+Dwyer)",
            ),
            Contact(
                name=JOHNNY_EL_HACHEM,
                info="Edmond de Rothschild Private Equity",
                emailer_pattern=r"el hachem johnny|johnny el hachem",
            )
        ],
        patterns=['AdR'],
    ),
    HighlightedNames(
        label='Russia',
        style='red bold',
        contacts=[
            Contact(ALEKSANDRA_KARPOVA, f"{CRYPTO_PR_LAB} co-founder", r"Aleksandra\s*Karpova"),
            Contact('Dasha Zhukova', "art collector, daughter of Alexander Zhukov"),
            Contact(JULIA_SANTOS, "possibly a Russian in Paris that was recruiting girls from Ukraine for Epstein"),
            Contact(
                name=KARYNA_SHULIAK,
                info="Epstein's final girlfriend to whom he tried to leave $50-100 million and the island",
                emailer_pattern=r"Karyna\s*Shuliak?",
            ),
            Contact(
                name='Maria Prusakova',
                info=f"AKA Masha Prusso, former Olympic snowboarder, {CRYPTO_PR_LAB} co-founder, \"found ladies\" for Epstein",
                emailer_pattern=r"Ma(sha|riy?a)\s*(Prus(kova|so))",
            ),
            Contact(MASHA_DROKOVA, "silicon valley VC, former Putin Youth member"),
            Contact(
                name=RENATA_BOLOTOVA,
                info="former model, fund manager at New York State Insurance Fund, Рената Болотова",
                emailer_pattern=r"Renata Bolotova|Rena B|Renata Bo\w+|renbolotova",
            ),
            Contact(
                name=SERGEY_BELYAKOV,
                info="graduate of Russia's FSB academy",
                emailer_pattern=r"Sergey\s*Belyako|Беляков\s*Сергей|Cepre(ct|il) [6BES][\w.]+|6(er|of)no\w+\s+[CE]\w+",
            ),
            Contact(SVETLANA_POZHIDAEVA, f"Epstein's Russian assistant who was recommended for a visa by Sergei Belyakov (FSB) and {DAVID_BLAINE}")
        ],
        patterns=[
            r"Alfa\s*Bank",
            r"Anya\s*Rasulova",
            r"Chernobyl",
            r"Crimea",
            r"Day\s+One\s+Ventures",
            r"(Dmitry\s)?(Kiselyov|(Lana\s*)?Pozhidaeva|Medvedev|Rybolo(o?l?ev|vlev))",
            r"Dmitry",
            r"FSB",
            r"GRU",
            r"KGB",
            r"Kislyak",
            r"Kremlin",
            r"(Anastasia\s*)?Kuznetsova",
            r"Lavrov",
            r"Lukoil",
            r'(Semion\s*)?Mogilevich',
            r"Moscow",
            r"Nic(k|holas)\s*Kovarsky",  # Friend of Belyakov
            r"(Natalia\s*)?Veselnitskaya",
            r"(Oleg\s*)?Deripaska",
            r"Oleksandr Vilkul",
            r"Onexim",  # Prokhorov investment vehicle
            r"Prokhorov",
            r"Rakishev",
            r"Rosneft",
            r"RT",
            r"Ruben\s*Vardanyan",
            r"St.?\s*?Petersburg",
            r'Svet',
            r"Russ?ian?",
            r"Sberbank",
            r"Soviet(\s*Union)?",
            r"USSR",
            r"Vlad(imir)?(?! Yudash)",
            r"(Vladimir\s*)?Putin",
            r"Women\s*Empowerment",
            r"Xitrans",
            r"(Vitaly\s*)?Churkin",
        ],
    ),
    HighlightedNames(
        label='Southeast Asia',
        style='light_salmon3 bold',
        patterns=[
            r"Australian?(?! Ave)",
            r"Bangkok",
            r"Burm(a|ese)",
            r"Cambodian?",
            r"Laos",
            r"Malaysian?",
            r"Maldives",
            r"Myan?mar",
            r"New\s*Zealand",
            r"Philippines",
            r"South\s*Korean?",
            r"Tai(pei|wan)",
            r"Thai(land)?",
            r"Vietnam(ese)?",
        ],
    ),
    HighlightedNames(
        label=TECH_BRO,
        style='bright_cyan',
        contacts=[
            Contact('Alisa Bekins', f"{PETER_THIEL}'s assistant"),
            Contact(ANDREW_MCCORMACK, f"partner at {THIELS_VALAR} {'(???)'}", r"Andrew\s*McCorm(ack?)?"),
            Contact('Auren Hoffman', "CEO of SafeGraph (firm that gathers location data from mobile devices) and LiveRamp"),
            Contact(ELON_MUSK, "father of Mecha-Hitler"),
            Contact(GOOGLE_PLUS, "Google+", r"Google\+"),
            Contact(HONGBO_ROBERT_BAO, THIELS_VALAR, r"Hong,? Robert Bao|Hongbo(\s*Robert)?\s*Bao"),
            Contact(IAN_ODONNELL, THIELS_VALAR, r"Ian\s*O'?Donnell|O'?Donnell,\s*Ian"),
            Contact(JAMES_FITZGERALD, THIELS_VALAR, r"James Fitz[g ]eral?d?"),
            Contact('LinkedIn', "LinkedIn", r"Linked[Il]n(\s*Updates)?"),
            Contact(PETER_THIEL, "Paypal mafia member, founder of Palantir, Facebook investor"),
            Contact(REID_HOFFMAN, "PayPal mafia member, founder of LinkedIn"),
            Contact('Reuben Kobulnik', THIELS_VALAR),
            Contact(STEVEN_SINOFSKY, "a16z, ex-Microsoft, loves bitcoin", r"Steven Sinofsky?"),
            Contact(VALAR_VENTURES, f"{PETER_THIEL} affiliated fintech venture fund", r"V[ae]lar\s*(Global\s*Fund|Ventures)?"),
            Contact(VINCENZO_IOZZO, "CEO of the identity-security company SlashID", r"Vincenzo [IL]ozzo"),
            Contact(ZUBAIR_KHAN, f"Tranchulas cybersecurity, InsightsPod founder, Islamabad / Dubai")
        ],
        patterns=[
            r"a16z|(?<!Gavin )Andree?ss?e?[eo]n(\s&Horowitz)?",
            r"AG?I",
            r"Artificial\s*(General\s*)?Intelligence",
            r"Ben\s*Horowitz",
            r"Chamath", r"Palihapitiya",
            r"cyber\s*security",
            r"Danny\s*Hillis",
            r"deep learning",
            r"Drew\s*Houston",
            r"Eliezer\s*Yudkowsky",
            r"Erick?\s*Sc?hmidt",
            r"Facebook",
            r"Greylock(\s*Partners)?",
            r"Honeycomb Asset Management",
            r"Instagram",
            r"(?<!(ustin|Moshe)\s)Hoffmand?",
            r"(Jeff\s*)?Bezos",
            r"Larry Page",
            r"LinkedIn",
            r"(Marc\s*)?(?<!Gavin )Andreess?en",
            r"(Mark\s*)?Zuckerberg",
            r"Masa(yoshi)?(\sSon)?",
            r"Neoteny",  # Joi Ito Japanese fund?
            r"Najeev",
            r"Nathan\s*Myhrvold",
            r"Palantir",
            r"(Peter\s)?Th(ie|ei)l",
            r"Pierre\s*Omidyar",
            r"Sergey\s*Brin",
            r"Silicon\s*Valley",
            r"Skype",
            r"Softbank",
            r"SpaceX",
            r"Spotify",
            r"Tencent",
            r"Tim\s*Ferriss?",
            r"Valar(\s*(Global\s*Fund|Ventures))?",
            r"Vision\s*Fund",
            r"Wearality(\s*Corporation)?",
            r"WikiLeak(ed|s)",
        ],
    ),
    HighlightedNames(
        label='Trump',
        style='red3 bold',
        contacts=[
            Contact('Bruce Moskowitz', "'Trump's health guy' according to Epstein"),
            Contact(
                name=NICHOLAS_RIBIS,
                info=f"Hilton CEO, former president of {TRUMP_ORG}",
                emailer_pattern=r"Nic(holas|k)[\s._]Ribi?s?|Ribbis",
            )
        ],
        patterns=[
            r"@?realDonaldTrump",
            r"(Alan\s*)?Weiss?elberg",
            r"Alex\s*Jones",
            r"(Brad(ley)?\s*)Parscale",
            r"\bDJ?T\b",
            r"Donald J. Tramp",
            r"(Donald\s+(J\.\s+)?)?Trump(ism|\s*(Org(anization)?|Properties)(\s*LLC)?)?",
            r"Don(ald| *Jr)(?! (B|Norman|Rubin))",
            r"(Howard\s*)?Lutnic?k",
            r"Ivank?a",
            r"Jared", r"(?<!Tony )Kushner",
            r"(Madeleine\s*)?Westerhout",
            r"Mar[-\s]*a[-\s]*Lago",
            r"(Marla\s*)?Maples",
            r"(Matt(hew)? )?Calamari",
            r"\bMatt C\b",
            r"Michael\s*(D\.?\s*)?Cohen",
            r"Melania",
            r"(Michael (J.? )?)?Boccio",
            r"Paul Rampell",
            r"Rebekah\s*Mercer",
            r"Roger\s+Stone",
            r"rona",
            r"(The\s*)?Art\s*of\s*the\s*Deal",
        ],
    ),
    HighlightedNames(
        label='USVI',
        style='sea_green1',
        contacts=[
            Contact(CECILE_DE_JONGH, "Virgin Islands first lady 2007-2015"),
            Contact(KENNETH_E_MAPP, "Virgin Islands Governor"),
            Contact(STACEY_PLASKETT, "Virgin Islands non-voting member of Congress")
        ],
        patterns=[
            r"Antigua",
            r"Bahamas",
            r"BVI",
            r"Caribb?ean",
            r"Dominican\s*Republic",
            r"(Great|Little)\s*St.?\s*James",
            r"Haiti(an)?",
            r"Jamaican?",
            r"(John\s*)deJongh(\s*Jr\.?)",
            r"(Kenneth E\. )?Mapp",
            r"PBI",
            r"Puerto\s*Ric(an|o)",
            r"San\s*Juan",
            r"S(ain)?t.?\s*Thomas",
            r"USVI",
            r"(?<!stein |vis-a-)VI(?!s-a-)",
            r"(The\s*)?Virgin\s*Is(al|la)nd?s(\s*Daily\s*News)?",  # Hard to make this work right
            r"(West\s*)?Palm\s*Beach(\s*County)?(?!\s*(Daily|Police|Post))",
        ],
    ),
    HighlightedNames(
        label='victim',
        style=VICTIM_COLOR,
        contacts=[
            Contact(PAULA, "ex-girlfriend who works in opera now", r"^Paula( Heil Fisher)?$")
        ],
        patterns=[
            r"child\s*pornography",
            r"(David\s*)?Bo[il]es(,?\s*Schiller( & Flexner)?)?",
            r"Ellaina\s*Astras?",
            r"(Gloria\s*)?Allred",
            r"(Jane|Tiffany)\s*Doe",
            r"Katie\s*Johnson",
            r"Minor\s*Victim",
            r"pedophile",
            r"Stephanie\s*Clifford",
            r"Stormy\s*Daniels",
            r"(Virginia\s+((L\.?|Roberts)\s+)?)?Giuffre",
            r"Virginia\s+Roberts",
        ],
    ),
    HighlightedNames(
        label='victim lawyer',
        style='medium_orchid1',
        contacts=[
            Contact(BRAD_EDWARDS, ROTHSTEIN_ROSENFELDT_ADLER, r"Brad(ley)?(\s*J(.?|ames))?\s*Edwards"),
            Contact(
                name=DOUGLAS_WIGDOR,
                info=f"lawsuit against {LEON_BLACK}, Wigdor LLP",
                emailer_pattern=r"Doug(las)?\s*(H\.?)?\s*Wigdor",
            ),
            Contact('Grant J. Smith', ROTHSTEIN_ROSENFELDT_ADLER),
            Contact(
                name=JEANNE_M_CHRISTENSEN,
                info=f"lawsuit against {LEON_BLACK}, Wigdor LLP",
                emailer_pattern=r"Jeanne\s*(M\.?)?\s*Christensen",
            ),
            Contact(JACK_SCAROLA, "Searcy Denney Scarola Barnhart & Shipley"),
            Contact(KEN_JENNE, ROTHSTEIN_ROSENFELDT_ADLER)
        ],
        patterns=[
            r"(Alan(\s*P.)?|MINTZ)\s*FRAADE",
            r"(J\.?\s*)?(Stan(ley)?\s*)?Pottinger",
            r"(Mi(chael|ke)\s*)?Avenatti",
            r"Paul\s*(G.\s*)?Cassell",
            r"Rothstein\s*Rosenfeldt\s*Adler",
            r"(Scott\s*)?Rothstein",
            r"Wigdor(Law)?",
        ],
    ),
    HighlightedNames(
        label=STEVE_BANNON,
        style='color(58)',
        category='Republican',
        contacts=[
            Contact(SEAN_BANNON, f"{STEVE_BANNON}'s brother", r"sean bannon?"),
            Contact(STEVE_BANNON, "Trump campaign manager, memecoin grifter", r"steve banno[nr]?")
        ],
        patterns=[
            r"(American\s*)?Dharma",
            r"Biosphere",
        ],
    ),

    # Individuals
    HighlightedNames(
        contacts=[Contact(STEVEN_HOFFENBERG, "Epstein's Towers Financial ponzi partner, prison for 18 years")],
        style='dark_olive_green3',
        category=Neutral.FINANCE,
        patterns=[r"(steven?\s*)?hoffenberg?w?"],
    ),
    HighlightedNames(
        label='Ghislaine',
        style='deep_pink3',
        category='Epstein',
        contacts=[
            Contact(
                name=BOBBI_C_STERNHEIM,
                info=f"{GHISLAINE_MAXWELL} {CRIMINAL_DEFENSE_ATTORNEY}",
                emailer_pattern=r"Bobbi C\.? Sternheim",
            ),
            Contact(
                name=GHISLAINE_MAXWELL,
                info="Epstein's girlfriend, daughter of the spy Robert Maxwell",
                emailer_pattern=r"g ?max(well)?|Ghislaine|Maxwell",
            )
        ],
        patterns=[
            r"gmax(1@ellmax.com)?",
            r"(The )?TerraMar Project",
            r"(Scott\s*)?Borgenson", # Ghislaine lawyer
        ],
    ),
    HighlightedNames(
        contacts=[
            Contact(
                name=JABOR_Y,
                info="former Qatari prime minister Hamad bin Jassim AKA \"HBJ\"",
                emailer_pattern=r"[ji]abor\s*y?",
            )
        ],
        category=MIDEAST,
        style='spring_green1'
    ),
    HighlightedNames(
        contacts=[Contact(KATHRYN_RUEMMLER, "former Obama legal counsel", r"Kathr?yn? Ruemmler?")],
        style='magenta2',
        category=FRIEND
    ),
    HighlightedNames(
        contacts=[Contact(MELANIE_WALKER, f"doctor, friend of {BILL_GATES}")],
        style='pale_violet_red1',
        category=FRIEND
    ),
    HighlightedNames(
        label='paula',
        style='pink1',
        contacts=[Contact(PAULA, "Epstein's ex-girlfriend who is now in the opera world", r"^Paula( Heil Fisher)?$")],
        category=FRIEND
    ),
    HighlightedNames(
        contacts=[Contact(PRINCE_ANDREW, "British royal family", r"Prince Andrew|The Duke")],
        patterns=[
            r'\bPA\b',
            r"(?<!Cantor )Urramoor(\s*Limited)?",
        ],
        style='dodger_blue1',
        category='Europe',
    ),
    HighlightedNames(
        contacts=[Contact(SOON_YI_PREVIN, "wife of Woody Allen", r"Soon[- ]Yi Previn?")],
        style='hot_pink',
        category=ARTS
    ),
    HighlightedNames(
        contacts=[
            Contact(
                name=SULTAN_BIN_SULAYEM,
                info="chairman of ports in Dubai, CEO of DP World",
                emailer_pattern=r"Sultan (Ahmed )?bin Sulaye?m?",
            )
        ],
        style='green1',
        category=MIDEAST
    ),

    # HighlightedText not HighlightedNames bc of word boundary (\b) issue with '#'
    HighlightedText(
        label='metoo',
        style=VICTIM_COLOR,
        patterns=[r"#metoo"]
    ),
    HighlightedText(
        label='unknown',
        style='cyan',
        patterns=[r'\(unknown\)']
    ),

    # Highlight regexes for things other than names, only used by RegexHighlighter pattern matching
    HighlightedText(
        label='phone_number',
        style='bright_green',
        patterns=[
            r"\+?(1?\(?\d{3}\)?[- ]\d{3}[- ]\d{4}|\d{2}[- ]\(?0?\)?\d{2}[- ]\d{4}[- ]\d{4})",
            r"(\b|\+)[\d+]{10,12}\b",
        ],
    ),
     HighlightedText(
        label='header_field',
        style='plum4',
        patterns=[r'^[>• ]{,4}(Date ?|From|Sent|To|C[cC]|Importance|Reply[- ]?To|Subject|Bee|B[cC]{2}|Attach(ed|ments)|Flag|Classification|[Il]nline-[Il]mages|((A|Debut du message transfer[&e]|De(stinataire)?|Envoye|Expe(cl|d)iteur|Objet|Q|Sujet) ?)):|^on behalf of'],
    ),
    HighlightedText(
        label='http_links',
        style=f'{ARCHIVE_LINK_COLOR} underline',
        patterns=[r"https?:[^\s]+"],
    ),
    HighlightedText(
        label='quoted_reply_line',
        style='dim',
        patterns=[
            REPLY_REGEX.pattern, r"^(> )?wrote:$",
            r"CONFIDENTIAL FOR ATTORNEY'S EYES ONLY(\nDO NOT COPY)?",
            r"PRIVILEGED ?- ?ATTORNEY WORK.*(\nCONFIDENTIAL - SUBJECT TO.*)?",
        ],
    ),
    HighlightedText(
        label='redacted',
        style='grey58',
        patterns=[fr"{REDACTED}|<?Privileged - Redacted>?"],
    ),
    HighlightedText(
        label='sent_from',
        style='light_cyan3 italic dim',
        patterns=[SENT_FROM_REGEX.pattern],
    ),
    HighlightedText(
        label='snipped_signature',
        style='gray19',
        patterns=[fr'<\.\.\.(snipped|trimmed).*\.\.\.>|{XML_STRIPPED_MSG}'],
    ),
    HighlightedText(
        label='timestamp_2',
        style=TIMESTAMP_STYLE,
        patterns=[r"\d{1,4}[-/]\d{1,2}[-/]\d{2,4} \d{1,2}:\d{2}:\d{2}( [AP]M)?"],
    ),

    # Manual regexes
    ManualHighlight(
        label='email_attachments',
        style='gray30 italic',
        pattern=r"^(> )?(Attach(ed|ments)|[Il]nline-[Il]mages): (?P<email_attachments>.*)",
    ),
    ManualHighlight(
        label='email_timestamp',
        style=TIMESTAMP_STYLE,
        pattern=r"^(> )?(Date|Sent): (?P<email_timestamp>.*)",
    ),
]

HIGHLIGHTED_NAMES = [hg for hg in HIGHLIGHT_GROUPS if isinstance(hg, HighlightedNames)]


def get_highlight_group_for_name(name: str | None) -> HighlightGroup | None:
    if not name:
        return None

    for highlight_group in HIGHLIGHT_GROUPS:
        if highlight_group.regex.search(name):
            return highlight_group


def get_style_for_category(category: str) -> str | None:
    if category in CATEGORY_STYLES:
        return CATEGORY_STYLES[category]
    elif category == Uninteresting.CONFERENCE:
        return f"{get_style_for_category(ACADEMIA)} dim"

    for highlight_group in HIGHLIGHT_GROUPS:
        if highlight_group.label == CATEGORY_STYLE_MAPPING.get(category, category):
            return highlight_group.style


def get_style_for_name(name: str | None, default_style: str = DEFAULT_NAME_STYLE, allow_bold: bool = True) -> str:
    highlight_group = get_highlight_group_for_name(name or UNKNOWN)
    style = highlight_group.style if highlight_group else default_style
    style = style if allow_bold else style.replace('bold', '').strip()
    logger.debug(f"get_style_for_name('{name}', '{default_style}', '{allow_bold}') yielded '{style}'")
    return style


def styled_category(category: str | None) -> Text:
    if category:
        return Text(category, get_style_for_category(category) or DEFAULT_CATEGORY_STYLE)
    else:
        return QUESTION_MARKS_TXT


def styled_name(name: str | None, default_style: str = DEFAULT_NAME_STYLE) -> Text:
    return Text(name or UNKNOWN, style=get_style_for_name(name, default_style=default_style))


def _print_highlighted_names_repr() -> None:
    for hn in HIGHLIGHT_GROUPS:
        if isinstance(hn, HighlightedNames):
            print(indented(repr(hn)) + ',')
            print(f"pattern: '{hn.regex.pattern}'")

    import sys
    sys.exit()

#_print_highlighted_names_repr()
