2biiSSKrSSKJr SSKJrJr SSKJr SSKJ r J r J r J r J r JrJrJr SSKJr SSKJrJrJrJr SS KJrJr SS KJrJr \\S 4r"S S 5r \"SS 55r!\!"5r""SS5r#g)N) lru_cache)dumpsloads)randint)AnyDictIterableListOptionalTypeUnioncast)errors)ColorColorParseError ColorSystem blend_rgb)Result rich_repr)DEFAULT_TERMINAL_THEME TerminalThemeStylecR\rSrSrSrS/rS\SS4SjrSS S \S S\ \ 4S jr S r g) _Bitz.A descriptor to get/set a style attribute bit.bitbit_noreturnNcSU-Ulg)Nrr)selfrs ڈ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/rich/style.py__init__ _Bit.__init__s ;objrobjtypecxURUR-(aURUR-S:g$g)Nr)_set_attributesr _attributes)r"r'r(s r#__get__ _Bit.__get__s/    )??TXX-2 2r&r!) __name__ __module__ __qualname____firstlineno____doc__ __slots__intr$r r boolr,__static_attributes__r&r#rrsA8Ist7T']x~r&rc&\rSrSr%Sr\\\S'\\\S'\\S'\\S'\\\S'\ \S'\\ \S '/S Qr S S S SSSSSSSSSSS. r 0SS_SS_SS_SS_SS_SS_SS_S S_S!S!_S"S"_S#S#_S$S#_S%S%_S&S%_S'S'_S(S'_S)S)_S)S*S+S,S,S-.Er S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S/.S0\\\\4S1\\\\4S\\ S\\ S\\ S\\ S!\\ S"\\ S#\\ S%\\ S'\\ S)\\ S*\\ S+\\ S,\\ S2\\S3\\\\44"S4jjr\StS6j5r\SuS0\\S1\\S5S4S7jj5r\S3\\\\4S5S4S8j5r\SvS3\\\\4S9\S5S4S:jj5r\"S;5r\"S<5r\"S=5r\"S>5r\"S?5r\"S@5r\"SA5r\"SB5r \"SC5r!\"SD5r"\"SE5r#\"SF5r$\"SG5r%\&S5\4SHj5r'S5\4SIjr(S5\ 4SJjr)SK\*S5\4SLjr+\\,"SMSN9SO\S5\4SPj55r-\SQ\\.S5\.4SRj5r/S5\04SSjr1ST\S5\ 4SUjr2ST\S5\ 4SVjr3S5\4SWjr4\&S5\\4SXj5r5\&S5\\4SYj5r6\&S5\\4SZj5r7\&S5\ 4S[j5r8\&StS\j5r9\&S5\\\44S]j5r:\&StS^j5r;\\,"S_SN9S`\S5S4Saj55r<\,"SMSN9SvSb\\=S5\4Scjj5r>\Sd\?SS5S4Sej5r@\SwSfj5rAStSgjrB\,"ShSN9StSij5rCSvS2\\S5S4SjjjrDSx\*RSkSl.Sm\SK\\*Sn\ S5\4SojjjrFSvSm\\S5S.4SpjjrG\,"SMSN9SO\SS5S4Sqj5rHSO\SS5S4SrjrISsrJg.)yra|A terminal style. A terminal style consists of a color (`color`), a background color (`bgcolor`), and a number of attributes, such as bold, italic etc. The attributes have 3 states: they can either be on (``True``), off (``False``), or not set (``None``). Args: color (Union[Color, str], optional): Color of terminal text. Defaults to None. bgcolor (Union[Color, str], optional): Color of terminal background. Defaults to None. bold (bool, optional): Enable bold text. Defaults to None. dim (bool, optional): Enable dim text. Defaults to None. italic (bool, optional): Enable italic text. Defaults to None. underline (bool, optional): Enable underlined text. Defaults to None. blink (bool, optional): Enabled blinking text. Defaults to None. blink2 (bool, optional): Enable fast blinking text. Defaults to None. reverse (bool, optional): Enabled reverse text. Defaults to None. conceal (bool, optional): Enable concealed text. Defaults to None. strike (bool, optional): Enable strikethrough text. Defaults to None. underline2 (bool, optional): Enable doubly underlined text. Defaults to None. frame (bool, optional): Enable framed text. Defaults to None. encircle (bool, optional): Enable encircled text. Defaults to None. overline (bool, optional): Enable overlined text. Defaults to None. link (str, link): Link URL. Defaults to None. _color_bgcolorr+r*_hash_null_meta) r:r;r+r*_link_link_id_ansi_style_definitionr<r=r>12345678921515253) rr dimdboldbitalici underlineublinkblink2reverserconcealcstrikes underline2frameencircleoverline)uurlrmrnoN)colorbgcolorr]r[r_rarcrdrergrirkrlrmrnlinkmetarqrrrsrtcJSUlSUlS[[[4S[4SjnUcSOU"U5UlUcSOU"U5Ul[USLUSL=(a SUSL=(a SUSL=(a SUSL=(a SUSL=(a SU SL=(a S U SL=(a S U SL=(a S U SL=(a S U SL=(a S USL=(a SUSL=(a S4 5UlUR(Ga[U=(a S=(d SU=(a S=(d SU=(a S=(d SU=(a S=(d SU=(a S=(d SU=(a S=(d SU =(a S =(d SU =(a S =(d SU =(a S =(d SU =(a S =(d SU =(a S =(d SU=(a S=(d SU=(a S=(d S4 5OSUl UUl UcSO [U5Ul U(dU(a#[SS5[UR53OSUlSUlUR=(d U=(d U=(d U=(d U(+Ulg)Nrqrc\[U[5(aU$[R"U5$N) isinstancerparse)rqs r# _make_color#Style.__init__.._make_colors"&ue445 L%++e:L Lr&rPrRrVr @rr?B)rArBr rstrr:r;sumr*r+r?rr>rhashr@r<r=)r"rqrrr]r[r_rarcrdrergrirkrlrmrnrsrtrzs r#r$Style.__init__zsG*%) 04 MuUCZ0 MU M$mdU1C '[5I "D 4%Ad"(q%+!T!(bd")rt#*t#+d"*s$&.3T!*d$-$-  F#### JQO!IANLq%AO!(qLb%AMr&QN'aO(qNs'a&3+!Nd'a%*%* $' , !\TuT{ :>$wq&!"4 #3"4 5R %) ..R%R7RdRdS r&rc[$)zCCreate an 'null' style, equivalent to Style(), but more performant.) NULL_STYLE)clss r#null Style.nulls r&cUR[5nSUlSUlXlX#lSUlSUlSUlSUl SUl U=(d U(+Ul SUl U$)zCreate a new style with colors and no attributes. Returns: color (Optional[Color]): A (foreground) color, or None for no color. Defaults to None. bgcolor (Optional[Color]): A (background) color, or None for no color. Defaults to None. Nrr) __new__rrArBr:r;r*r+r?r@r>r=r<)rrqrrstyles r# from_colorStyle.from_colorsk{{5) "&   !   +G,   r&c(UR[5nSUlSUlSUlSUlSUlSUlSUl[U5Ul [SS5[UR53Ul SUlU(+UlU$)zCreate a new style with meta data. Returns: meta (Optional[Dict[str, Any]]): A dictionary of meta data. Defaults to None. Nrr)rrrArBr:r;r*r+r?rr>rrr@r<r=)rrtrs r# from_metaStyle.from_metas{{5) "&  ! Dk #Av./U[[0A/BC j  r&handlersc Uc0OUnURUR5VVs0sH up4SU3U_M snn5 URU5$s snnf)a@Create a blank style with meta information. Example: style = Style.on(click=self.on_click) Args: meta (Optional[Dict[str, Any]], optional): An optional dict of meta information. **handlers (Any): Keyword arguments are translated in to handlers. Returns: Style: A Style with meta information attached. @)updateitemsr)rrtrkeyvalues r#onStyle.onsU\rt 8HI8H*#qY%8HIJ}}T""JsA rrrPrQrRrSrTrUrVrWrXrYrZcUR$)z+Get a link id, used in ansi code for links.)r@r"s r#link_id Style.link_id}}r&cURGc/nURnURnUS-(aUS-(aU"UR(aSOS5 US-(aU"UR(aSOS5 US-(aU"UR (aS OS 5 US -(aU"UR (aS OS 5 US-(aUS-(aU"UR(aSOS5 US-(aU"UR(aSOS5 US-(aU"UR(aSOS5 US-(aU"UR(aSOS5 US-(aU"UR(aSOS5 US-(aUS-(aU"UR(aS OS!5 US"-(aU"UR(aS#OS$5 US%-(aU"UR(aS&OS'5 US(-(aU"UR(aS)OS*5 UR bU"UR R"5 UR$b$U"S+5 U"UR$R"5 UR&(aU"S,5 U"UR&5 S-R)U5=(d S.UlUR$)/z-Re-generate style definition from attributes.rr]znot boldrPr[znot dimrRr_z not italicrVraz not underlinerrcz not blinkr|rdz not blink2r}rez not reverser~rgz not concealrriz not strikerrkznot underline2rrlz not framerrmz not encirclerrnz not overlinerrs none)rBappendr*r]r[r_rarcrdrergrirkrlrmrnr:namer;r?join)r" attributesrbitss r#__str__ Style.__str__s  ! ! )$&J&&F''Do%!8TYY6J?6?DHH5)<6?t{{8 E6?$..;oNo%6?djj7kB6?t{{8 E6? 9-H6? 9-H6?t{{8 Eo%6?4??<@PQ7#djj7kB7#:NK7#:NK{{&t{{''(}}(t t}}))*zzvtzz"%(XXj%9%CVD "%%%r&c$UR(+$)z;A Style is false if it has no attributes, colors, or links.)r=rs r#__bool__Style.__bool__Ks::~r& color_systemchURGc/nURnURnURUR-nU(aUS-(a U"US5 US-(a U"US5 US-(a U"US5 US-(a U"US5 US-(a,[ SS5HnUSU--(dMU"XF5 M US -(a,[ SS 5HnUSU--(dMU"XF5 M UR b8URUR RU5R55 URb7URURRU5RS S 95 S RU5UlUR$)zGenerate ANSI codes for this style. Args: color_system (ColorSystem): Color system. Returns: str: String containing codes. rrrPrRrVrQrrWr F foreground;) rAr _style_mapr+r*ranger:extend downgradeget_ansi_codesr;r)r"rsgrrrrrs r#_make_ansi_codesStyle._make_ansi_codesOsu :: CZZFJ))D,@,@@J>:a=)>:a=)>:a=)>:a=)/$Q{%c22":?3 +/$Q|%c22":?3 ,{{& 4;;00>MMOP}}( MM++L9HH#(I #DJzzr&r)maxsizerc[URU55$![Ra! UR 5R 5s$f=f)zNormalize a style definition so that styles with the same effect have the same string representation. Args: style (str): A style definition. Returns: str: Normal form of style definition. )rryrStyleSyntaxErrorstriplower)rrs r# normalizeStyle.normalizezsE )syy'( (&& );;=&&( ( )s2AAvaluesc8UH nUcMUs $ [S5e)zPick first non-None style.z$expected at least one non-None style) ValueError)rrrs r# pick_firstStyle.pick_firsts'E  ?@@r&c#N# SURS4v SURS4v SURS4v SURS4v SURS4v SUR S4v SUR S4v SURS4v S URS4v S URS4v S URS4v S URS4v S URS4v SURS4v SURS4v UR(aSUR 4v gg7f)Nrqrrr]r[r_rarcrdrergrirkrlrmrsrt)rqrrr]r[r_rarcrdrergrirkrlrmrsr>rtrs r# __rich_repr__Style.__rich_repr__stzz4''t++dii&&TXXt$$ T))4>>400tzz4'' T))t++t++ T))DOOT11tzz4''$----dii%% ::$))# # sD#D%othercz[U[5(d[$UR5UR5:H$rwrxrNotImplemented__hash__r"rs r#__eq__ Style.__eq__-%''! !}}%.."222r&cz[U[5(d[$UR5UR5:g$rwrrs r#__ne__ Style.__ne__rr&cURb UR$[URURURUR UR UR45UlUR$rw)r<rr:r;r+r*r?r>rs r#rStyle.__hash__sa :: !::     $$      zzr&cUR$)z.The foreground color or None if it is not set.)r:rs r#rq Style.colors{{r&cUR$)z.The background color or None if it is not set.)r;rs r#rr Style.bgcolorrr&cUR$)zLink text, if set.)r?rs r#rs Style.linkszzr&cXURSL=(d URR$)z6Check if the style specified a transparent background.N)rr is_defaultrs r#transparent_backgroundStyle.transparent_backgrounds"||t#>t||'>'>>r&c([URS9$)zA Style with background only.)rr)rrrrs r#background_styleStyle.background_stylesT\\**r&cURc0$[[[[4[ UR55$)z=Get meta information (can not be changed after construction).)r>rrrrrrs r#rt Style.metas0ZZ'rTT$sCx.% BS-TTr&cpUR(a[$UR[5nSUlSUlSUlSUlURUlURUl URUl UR(a [SS5OSUl SUlSUl SUlU$)z+Get a copy of the style with color removed.NrrrF)r=rrrrArBr:r;r+r*r?rr@r>r<r"rs r# without_colorStyle.without_colors :: ||E* "&  ,, $ 4 4jj 48JJGAv./B    r&rstyle_definitioncUR5S:XdU(dUR5$URnSnSn0nSn[UR 55nUGHnUR 5n U S:XaF[ US5n U (d[R"S5e[R"U 5SL U nM`U S:Xa@[ US5n URU 5n U c[R"S U <35eS X['MU S :Xa-[ US5n U (d[R"S 5eU nMX;a S XRU 'M[R"U 5 U nGM [SX4US.UD6n U $![a#n [R"SU <SU 35SeSn A ff=f![a#n [R"SU <SU 35SeSn A ff=f)zParse a style definition. Args: style_definition (str): A string containing a style. Raises: errors.StyleSyntaxError: If the style definition syntax is invalid. Returns: `Style`: A Style instance. rNrrzcolor expected after 'on'zunable to parse z as background color; notz,expected style attribute after 'not', found FrszURL expected after 'link'Tz as color; )rqrrrsr7)rrSTYLE_ATTRIBUTESitersplitrnextrrrryrgetr) rrrrqrrrrswords original_wordworderror attributers r#ry Style.parses  ! ! #v -5E88: //#!%/1 "%++-."M &&(Dt|E2 112MNN KK%- E2,006 $ 11FthO). %E2 112MNN)59 D12 KK% O#PLELL C'  11*4(2HP  6'  11*4(+eWE  s0E0F 0 F:FF G *GG themec0U=(d [n/nURnURnURnUR(aXTpTUR (aJUc UR OURU5n[R"[XaRS55nUb;URU5nU"SUR35 U"SUR35 Ub%URUSS9nU"SUR35 UR(aU"S5 UR(aU"S5 UR(aU"S 5 UR (aU"S 5 UR"(aU"S 5 S R%U5$) zGet a CSS style rule.g?zcolor: ztext-decoration-color: Frzbackground-color: zfont-weight: boldzfont-style: italicztext-decoration: underlineztext-decoration: line-throughztext-decoration: overlinez; )rrrqrrrer[foreground_color get_truecolorr from_tripletrbackground_colorhexr]r_rarirnr)r"rcssrrqrrr theme_colors r#get_html_styleStyle.get_html_style3sT// ,, <<$7 88*/-&&U=P=PQV=W &&*,B,BCHE  --e4K W[__-. / ,[__,=> ?  !//%/HK ' '89 : 99 & ' ;; ' ( >> / 0 ;; 2 3 == . /yy~r&stylescB[U5n[U[U55$)zCombine styles and get result. Args: styles (Iterable[Style]): Styles to combine. Returns: Style: A new style instance. rrrrr  iter_styless r#combine Style.combineX6l ;[ 122r&cB[U5n[U[U55$)zCombine styles from positional argument in to a single style. Args: *styles (Iterable[Style]): Styles to combine. Returns: Style: A new style instance. rrs r#chain Style.chainerr&cUR(a[$UR[5nURUlUR UlUR UlURUlURUlURUl URUl UR(a [SS5OSUl URUl SUlURUlU$)z_Get a copy of this style. Returns: Style: A new Style instance with identical attributes. rrrF)r=rrrrArBr:r;r+r*r?rr@r<r>rs r#copy Style.copyrs :: ||E*jj "&"8"8{{  ,, $ 4 4jj 48JJGAv./Bjj  jj  r&r~cUR(a[$UR[5nURUlUR UlUR UlURUlURUlURUl SUl SUl URUl SUlSUl U$)zhGet a copy of this style with link and meta information removed. Returns: Style: New style object. NrF)r=rrrrArBr:r;r+r*r?r@r<r>rs r#clear_meta_and_linksStyle.clear_meta_and_linkss :: ||E*jj "&"8"8{{  ,, $ 4 4 jj    r&c|UR[5nURUlURUlURUlUR UlUR UlURUlXlU(a [SS5OSUl SUl SUl URUl U$)zGet a copy with a different value for link. Args: link (str, optional): New value for link. Defaults to None. Returns: Style: A new Style instance. rrrNF)rrrArBr:r;r+r*r?rr@r<r=r>)r"rsrs r# update_linkStyle.update_links||E*jj "&"8"8{{  ,, $ 4 4 48GAv./b  jj  r&F)rlegacy_windowstextr cU(aUcU$UR=(d URU5nU(a SUSUS3OUnUR(a'U(d SURSURSUS3nU$)aRender the ANSI codes for the style. Args: text (str, optional): A string to style. Defaults to "". color_system (Optional[ColorSystem], optional): Color system to render to. Defaults to ColorSystem.TRUECOLOR. Returns: str: A string containing ANSI style codes. z[mzz]8;id=rz\z]8;;\)rArr?r@)r"r!rr attrsrendereds r#render Style.rendersw |+K Ad33LA49U5'4&0t ::nT]]O1TZZLxjW r&cU=(d [U5n[RRUR U5S35 g)zWrite text with style directly to terminal. This method is for testing purposes only. Args: text (Optional[str], optional): Text to style or None for style name.  N)rsysstdoutwriter&)r"r!s r#test Style.tests5 s4y DKK-.b12r&czUbUR(aU$UR(aU$UR[5nSUlSUlUR =(d UR UlUR =(d UR UlURUR)-URUR--UlURUR-UlUR=(d URUl UR=(d URUl URUlUR(a:UR(a)[0UREURE5Ul O$UR=(d URUl SUlU$rw)r=rrrArBr:r;r+r*r?r@r>rrtr<)r"r new_styles r#_add Style._adds6 =EKKK ::L<<.  &* # <<64;; "^^r=r*rB)rr)NNrw)r rrr)r)Kr.r/r0r1r2r r__annotations__r4r5bytesr3rrr rrrr$ classmethodrrrrrr]r[r_rarcrdrergrirkrlrmrnpropertyrrrrrrr StyleTyperrrrrrrqrrrsrrrtrryrr r rrrrr TRUECOLORr&r-r1r5r6r7r&r#rrs4 UOuo C= K E? I             J  u U  V  (  X  [ [  ( 9 Y 9 Y ( X!" l#$ -8.2/3#"!%$( $!%"&"&!%%) $#'#'")-'JTeSj)*JT%s +, JT tn JT d^ JTJTD>JT~JTJT$JT$JTJTTNJT~JT 4.!JT"4.#JT$sm%JT&tCH~&'JTXGKUO5=e_ .Xd38n5'(#htCH~.#3#7##" 7D q'C !WFQI GE !WF1gG1gG !WFaJ HEBxHBxH ,&,&\$)[)S)Vt )c )c ) )A)!4AAA$v$&3C3D3 3C3D3 # x%hsm???++Ud38nUU$t?S?W??Bt"H]$;"s""H 3Xg. 37 3 3 3 3,s, 2/:.C.C$ {+    4 3# 3$ 3t(7+0PXg.P7Pr&cn\rSrSrSrS/rS SjrS\4Sjr\ S\ 4Sj5r S \ SS4S jr S\ 4S jr S rg) StyleStackizA stack of styles._stackrNcU/Ulgrwr?)r" default_styles r#r$StyleStack.__init__s $1? r&c$SUR<S3$)Nz rArs r#__repr__StyleStack.__repr__sdkk_A..r&c URS$)z&Get the Style at the top of the stack.rArs r#currentStyleStack.currents{{2r&rcZURRURSU-5 g)zePush a new style on to the stack. Args: style (Style): New style to combine with current style. rIN)r?rrs r#pushStyleStack.push s# 4;;r?U23r&cTURR5 URS$)zePop last style and discard. Returns: Style: New current style (also available as stack.current) rI)r?poprs r#rPStyleStack.pops {{2r&rA)rBrrN)r.r/r0r1r2r3r$rrFr:rrJrMrPr6r7r&r#r>r>sW I3/#/4%4D4Ur&r>)$r* functoolsrmarshalrrrandomrtypingrrr r r r r rrrrqrrrrreprrrterminal_themerrrr;rrrr>r7r&r#rXsv  IIIAA#A #w,     X PX P X PvW r&