+
     hr%  c                   s   ^ RI t ^ RIHtHt ^ RIHtHt ^RIHtH	t	 R R lt
 ! R R]4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t]R8X  Ed   ^RIHt ]! 4       t]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R4       ]P)                  R 4       ]P)                  R!4       ]P)                  R"4       ]P)                  R#4       ]P)                  R$4       ]P)                  R+4       ]P)                  R,4       ]P)                  R%4       ^ RIt]P-                  ]P.                  ! R&R'R(^/R)7      RR*7       R# R# )-i    N)ABCabstractmethod)ListUnion)SpanTextc                s0    V ^8  d   QhR\         R\         /# )   regexesreturn)str)formats   "A/usr/lib/python3.14/site-packages/pip/_vendor/rich/highlighter.py__annotate__r      s      S S     c                 s$    RP                  V 4      # )zoCombine a number of regexes in to a single regex.

Returns:
    str: New regex with all regexes ORed together.
Z|)Zjoin)r   s   *r   _combine_regexr      s     88Gr   c                   sR   a  ] tR t^t o RtV 3R lR lt]V 3R lR l4       tRtV t	R# )Highlighterz%Abstract base class for highlighters.c                s<   < V ^8  d   QhRS[ S[S[3,          RS[/# )r   textr   )r   r	   r   r
   __classdict__   "r   r   Highlighter.__annotate__   s$      U39- $ r   c                s    \        V\        4      '       d   \        V4      pM6\        V\        4      '       d   VP                  4       pM\	        RV: 24      hV P                  V4       V# )zHighlight a str or Text instance.

Args:
    text (Union[str, ~Text]): Text to highlight.

Raises:
    TypeError: If not called with text or str.

Returns:
    Text: A test instance with highlighting applied.
z#str or Text instance required, not )Z
isinstancer	   r   ZcopyZ	TypeError	highlight)selfr   Zhighlight_texts   && r   __call__ZHighlighter.__call__   sW     dC  !$ZNd##!YY[NA$JKK~&r   c                $   < V ^8  d   QhRS[ RR/# r   r   r   Nr   r   r   r   r   r   *   s      d t r   c                    R# )zWApply highlighting in place to text.

Args:
    text (~Text): A text object highlight.
N r   r      &&r   r   ZHighlighter.highlight)       r   r   N)
__name__
__module____qualname____firstlineno____doc__r   r   r   __static_attributes____classdictcell__r      @r   r   r      s&     / *  r   r   c                   s6   a  ] tR t^2t o RtV 3R lR ltRtV tR# )NullHighlighterz]A highlighter object that doesn't highlight.

May be used to disable highlighting entirely.

c                r   r   r   r   r   r   r   ZNullHighlighter.__annotate__9   s      d t r   c                r   )zNothing to doNr   r   r   r   r   ZNullHighlighter.highlight9   r   r   r   N)r    r!   r"   r#   r$   r   r%   r&   r'   r(   r   r)   r)   2   s      r   r)   c                   sJ   a  ] tR t^=t o Rt. tRtV 3R lR ltV 3R ltRt	V t
R# )RegexHighlighterz8Applies highlighting from a list of regular expressions.Z c                r   r   r   r   r   r   r   RegexHighlighter.__annotate__C   s     
H 
Hd 
Ht 
Hr   c                sj    VP                   pV P                   F  pV! W0P                  R7       K  	  R# )zlHighlight :class:`rich.text.Text` using regular expressions.

Args:
    text (~Text): Text to highlighted.

)Zstyle_prefixN)highlight_regex
highlights
base_style)r   r   r,   Zre_highlights   &&  r   r   ZRegexHighlighter.highlightC   s)     .. OOLLG ,r   c                sB   < V ^8  d   Qh/ S[ S[,          ;R&   S[;R&   # )r   r-   r.   )r   r	   r   r   r   r   r+   =   s#      S	  	 r   r   N)r    r!   r"   r#   r$   r-   r.   r   Z__annotate_func__r%   r&   r'   r(   r   r*   r*   =   s%     BJJ
H 
H  r   r*   c                   sN    ] tR t^PtRtRtRRR]! RRRR	R
RRRRRRRR4      .tRtR# )ReprHighlighterzAHighlights the text typically produced from ``__repr__`` methods.zrepr.zN(?P<tag_start><)(?P<tag_name>[-\w.:|]*)(?P<tag_contents>[\w\W]*)(?P<tag_end>>)z:(?P<attrib_name>[\w_]{1,50})=(?P<attrib_value>"?[\w_]+"?)?z(?P<brace>[][{}()])z8(?P<ipv4>[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})z4(?P<ipv6>([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})z(?P<eui64>(?:[0-9A-Fa-f]{1,2}-){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){3}[0-9A-Fa-f]{4})z(?P<eui48>(?:[0-9A-Fa-f]{1,2}-){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4})zU(?P<uuid>[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})z(?P<call>[\w.]*?)\(zD\b(?P<bool_true>True)\b|\b(?P<bool_false>False)\b|\b(?P<none>None)\bz(?P<ellipsis>\.\.\.)zk(?P<number_complex>(?<!\w)(?:\-?[0-9]+\.?[0-9]*(?:e[-+]?\d+?)?)(?:[-+](?:[0-9]+\.?[0-9]*(?:e[-+]?\d+)?))?j)zC(?P<number>(?<!\w)\-?[0-9]+\.?[0-9]*(e[-+]?\d+?)?\b|0x[0-9a-fA-F]*)z3(?P<path>\B(/[-\w._+]+)*\/)(?P<filename>[-\w._+]*)?z_(?<![\\\w])(?P<str>b?'''.*?(?<!\\)'''|b?'.*?(?<!\\)'|b?\"\"\".*?(?<!\\)\"\"\"|b?\".*?(?<!\\)\")zD(?P<url>(file|https|http|ws|wss)://[-0-9a-zA-Z$_+!`(),.?/;:&=%#~@]*)r   N)	r    r!   r"   r#   r$   r.   r   r-   r%   r   r   r   r/   r/   P   sO    KJYEGC R Rd"S#zRBnS	
	Jr   r/   c                   sj   a a ] tR t^jt oRtRt0 R
mtRt]! RRR]4      .t	V3R lV 3R llt
R	tVtV ;t# )JSONHighlighterzHighlights JSONz$(?<![\\\w])(?P<str>b?\".*?(?<!\\)\")zjson.z(?P<brace>[\{\[\(\)\]\}])zD\b(?P<bool_true>true)\b|\b(?P<bool_false>false)\b|\b(?P<null>null)\bzE(?P<number>(?<!\w)\-?[0-9]+\.?[0-9]*(e[\-\+]?\d+?)?\b|0x[0-9a-fA-F]*)c                r   r   r   r   r   r   r   ZJSONHighlighter.__annotate__{   s      d t r   c                s  < \         S
V `  V4       VP                  pVP                  P                  pV P
                  p\        P                  ! V P                  V4       F\  pVP                  4       w  rgTpV\        V4      8  g   K)  W(,          p	V^,          pV	R8X  d   V! \        WgR4      4       MW9   d   KE  K^  	  R# )i   Z:zjson.keyN)Zsuperr   plainZspansappendJSON_WHITESPACEreZfinditerJSON_STRZspanZlenr   )r   r   r1   r2   Z
whitespaceZmatchZstartZendZcursorZchar	__class__s   &&        r   r   ZJSONHighlighter.highlight{   s    $ 

""))
[[6EJEF3u:%}!3;4J78' 7r   r   >   Z	Z
ZZ )r    r!   r"   r#   r$   r5   r3   r.   r   r-   r   r%   r&   Z__classcell__)r6   r   s   @@r   r0   r0   j   sC      7H-OJ(ST		
J  r   r0   c                   s&    ] tR t^tRtRt. ROtRtR# )ISO8601HighlighterzHighlights the ISO8601 date time strings.
Regex reference: https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s07.html
ziso8601.r   N)z-^(?P<year>[0-9]{4})-(?P<month>1[0-2]|0[1-9])$zU^(?P<date>(?P<year>[0-9]{4})(?P<month>1[0-2]|0[1-9])(?P<day>3[01]|0[1-9]|[12][0-9]))$z]^(?P<date>(?P<year>[0-9]{4})-?(?P<day>36[0-6]|3[0-5][0-9]|[12][0-9]{2}|0[1-9][0-9]|00[1-9]))$zC^(?P<date>(?P<year>[0-9]{4})-?W(?P<week>5[0-3]|[1-4][0-9]|0[1-9]))$zS^(?P<date>(?P<year>[0-9]{4})-?W(?P<week>5[0-3]|[1-4][0-9]|0[1-9])-?(?P<day>[1-7]))$z>^(?P<time>(?P<hour>2[0-3]|[01][0-9]):?(?P<minute>[0-5][0-9]))$zR^(?P<time>(?P<hour>2[0-3]|[01][0-9])(?P<minute>[0-5][0-9])(?P<second>[0-5][0-9]))$zA^(?P<timezone>(Z|[+-](?:2[0-3]|[01][0-9])(?::?(?:[0-5][0-9]))?))$z^(?P<time>(?P<hour>2[0-3]|[01][0-9])(?P<minute>[0-5][0-9])(?P<second>[0-5][0-9]))(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9])(?::?(?:[0-5][0-9]))?)$z^(?P<date>(?P<year>[0-9]{4})(?P<hyphen>-)?(?P<month>1[0-2]|0[1-9])(?(hyphen)-)(?P<day>3[01]|0[1-9]|[12][0-9])) (?P<time>(?P<hour>2[0-3]|[01][0-9])(?(hyphen):)(?P<minute>[0-5][0-9])(?(hyphen):)(?P<second>[0-5][0-9]))$z^(?P<date>(?P<year>-?(?:[1-9][0-9]*)?[0-9]{4})-(?P<month>1[0-2]|0[1-9])-(?P<day>3[01]|0[1-9]|[12][0-9]))(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$z^(?P<time>(?P<hour>2[0-3]|[01][0-9]):(?P<minute>[0-5][0-9]):(?P<second>[0-5][0-9])(?P<frac>\.[0-9]+)?)(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$a  ^(?P<date>(?P<year>-?(?:[1-9][0-9]*)?[0-9]{4})-(?P<month>1[0-2]|0[1-9])-(?P<day>3[01]|0[1-9]|[12][0-9]))T(?P<time>(?P<hour>2[0-3]|[01][0-9]):(?P<minute>[0-5][0-9]):(?P<second>[0-5][0-9])(?P<ms>\.[0-9]+)?)(?P<timezone>Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$)r    r!   r"   r#   r$   r.   r-   r%   r   r   r   r7   r7      s     J1Jr   r7   Z__main__)Consolez%[bold green]hello world![/bold green]z''[bold green]hello world![/bold green]'z /fooz/foo/z/foo/barzfoo/bar/bazz /foo/bar/baz?foo=bar+egg&egg=bazz/foo/bar/baz/z/foo/bar/baz/eggz/foo/bar/baz/egg.pyz/foo/bar/baz/egg.py wordz /foo/bar/baz/egg.py wordzfoo /foo/bar/baz/egg.py wordz!foo /foo/bar/ba._++z/egg+.py wordz"https://example.org?foo=bar#headergq=
W2AzE127.0.1.1 bar 192.168.1.4 2001:0db8:85a3:0000:0000:8a2e:0370:7334 fooZnameZappleZcount)Zobj)Zindentg      ?gF!@ܡ)r4   Zabcr    r   Ztypingr   r   r   r   r   r   r   r)   r*   r/   r0   r7   r    Zconsoler8   ZprintZjsonZ
print_jsonZdumpsr   r   r   <module>r9      s   	 #  # Bk H{ H&& 4"& "J7) 7t z iGMM9:MM;<MM'MM'MM*MM- MM45MM/"MM$%MM'(MM,-MM-.MM01MM56MM67MM*MM%MM#$MMO tzzvw&CDTR? r   