gh<9 dZdZddlZddlZddlmZddlmZmZddl m Z m Z ddl m Zidd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)id*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;dd?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdU Z iZ dVZdWZdXZdYZdZZd[Zd\Zd]Zd^Zgd_Zd`ZdaZdpdcZddZejdeej Z!dfZ"dgZ#dhZ$diZ%djZ&dkZ'dlZ(dmZ)dnZ*doZ+dS)qz9 This package contains directive implementation modules. reStructuredTextN) import_module)nodesparsers)split_escaped_whitespace escape2null)en attention) admonitions Attentioncaution)r Cautioncode)body CodeBlockdanger)r Dangererror)r Error important)r Importantnote)r Notetip)r Tiphint)r Hintwarning)r Warning admonition)r Admonitionsidebar)rSidebartopic)rTopicz line-block)r LineBlockzparsed-literal)r ParsedLiteralmath)r MathBlockrubric)rRubricepigraph)rEpigraph highlights)r Highlightsz pull-quote)r PullQuotecompound)rCompound container)r Containertable)tablesRSTTablez csv-table)r6CSVTablez list-table)r6 ListTableimage)imagesImagefigure)r;Figurecontents)partsContentssectnum)r@Sectnumheader)r@Headerfooter)r@Footerz target-notes) references TargetNotesmeta)miscMetaraw)rKRaw)rKInclude)rKReplace)rKUnicode)rKClass)rKRole)rK DefaultRole)rKTitle)rKDate)rK TestDirective) includereplaceunicodeclassrolez default-roletitledatezrestructuredtext-test-directivec |}g}g}|tvrt||fSd} |j|}n_#t$r&}|d|d|dYd}~n4d}~wt $r$|d|d|jdYnwxYw|sV tj|}|d|zn*#t $r|d |z|}YnwxYw|rI|j d ||j }|| t|\} } n#t $rd|fcYSwxYw td | z} nX#t$rK} ||jd | d|d| |j d|fcYd} ~ Sd} ~ wwxYw t!| | } | t|<nR#t$rE||jd| d| d|d|j d|fcYSwxYw| |fS)z Locate and return a directive function from its language-dependent name. If not found in the current language, check English. Return None if the named directive cannot be found. Nz8Problem retrieving directive entry from language module z: .zNo directive entry for "z " in module "z".z*Using English fallback for directive "%s".z(Trying "%s" as canonical directive name. )linez docutils.parsers.rst.directives.z"Error importing directive module "z" (directive "z"): zNo directive class "z").)lower _directives directivesAttributeErrorappendKeyError__name___fallback_language_modulereporterinfojoin current_line_directive_registryr ImportErrorrgetattr)directive_namelanguage_moduledocumentnormnamemessagesmsg_text canonicalnamermessage modulename classnamemoduledetail directives /builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/docutils/parsers/rst/directives/__init__.pyr~r~Ms} ##%%HHH;8$h..MF'28< EEE,;OOUUUD E E E E E E E E FFF)>>?+C+C+CE F F F F FF  % %5@JM OOH,- . . . . % % % OOF,- . . .%MMM  % !#(( IIh  h&;)==    3M B II X~A*LMM )///zz>>>66 3&0(( ) ) )X~  FI.. ) H )///yy***nnn 6&0(( ) ) )X~  h ss A B A--.BB$*C$C65C6EE'&E'+E>> GAGGGG22A IIc|t|<dS)z Register a nonstandard application-defined directive function. Language lookups are not needed for such functions. N)rd)namer~s rregister_directivers "KcV|r&|rtd|zdS)z Check for a valid flag option (no argument) and return ``None``. (Directive option conversion function.) Raise ``ValueError`` if an argument is found. z%no argument is allowed; "%s" suppliedN)strip ValueErrorarguments rflagrs6HNN$$@8KLLLtrc(|td|S)z Return the argument text, unchanged. (Directive option conversion function.) Raise ``ValueError`` if no argument is found. N#argument required but none supplied)rrs runchanged_requiredrs>???rc|dS|S)z Return the argument text, unchanged. (Directive option conversion function.) No argument implies empty string (""). Nrs r unchangedrsrrc|tddd|DS)z Return the path argument unwrapped (with newlines removed). (Directive option conversion function.) Raise ``ValueError`` if no argument is found. Nrrc3>K|]}|VdSN)r.0ss r zpath..s*@@Qqwwyy@@@@@@r)rrm splitlinesrs rpathrsF>???ww@@(*=*=*?*?@@@@@@rc|tdtt|}dd|DS)z Return the URI argument with unescaped whitespace removed. (Directive option conversion function.) Raise ``ValueError`` if no argument is found. Nr c3K|]=}dtj|V>dS)rN)rmrunescapesplit)rparts rrzuri..sX++ t 4 4 : : < <==++++++r)rrrrm)rr@s rurirs`>???(X)>)>??xx++$)+++++ +rcNt|}|dkrtd|S)z| Check for a nonnegative integer argument; raise ``ValueError`` if not. (Directive option conversion function.) rz(negative value; must be positive or zerointrrvalues rnonnegative_intr, MME qyyCDDD Lrcn |d}n#t$rYnwxYwt|S)zw Check for an integer percentage value with optional percent sign. (Directive option conversion function.) z %)rstriprfrrs r percentagersH  ??4((      8 $ $$s  %%)emexpxincmmmptpcc~tjdd|z|} t|dnD#t t f$r0t ddd|DzwxYw|d|dzS)a Check for a positive argument of one of the units and return a normalized string of the form "" (without space in between). (Directive option conversion function.) To be called from directive option conversion functions. z^([0-9.]+) *(%s)$|z8not a positive measure of one of the following units: %src3 K|] }d|zV dSz"%s"Nr)ris rrzget_measure..s&11avz111111r)rematchrmfloatgrouprfr)runitsrs r get_measurers H)CHHUOO;X F FE3 ekk!nn J '333 Ghh11511111 233 33 ;;q>>EKKNN **s "AABc4t|tdgzS)Nr)r length_unitsrs rlength_or_unitlessrs x!4 5 55rrc t|tdgzS#t$rC t|dg|zcYS#t$rt|tdgzcYcYSwxYwwxYw)a Return normalized string of a length or percentage unit. (Directive option conversion function.) Add if there is no unit. Raise ValueError if the argument is not a positive measure of one of the valid CSS units (or without unit). >>> length_or_percentage_or_unitless('3 pt') '3pt' >>> length_or_percentage_or_unitless('3%', 'em') '3%' >>> length_or_percentage_or_unitless('3') '3' >>> length_or_percentage_or_unitless('3', 'px') '3px' %r)rrr)rdefaults r length_or_percentage_or_unitlessrs"?8\SE%9::: ??? ?x"..8 8 8 8 ? ? ?x)=>> > > > > > ??s) A(<A(#A$A(#A$$A(c|td|}g}|D]?}tj|}|std|z||@|S)z Convert the argument into a list of ID-compatible strings and return it. (Directive option conversion function.) Raise ``ValueError`` if no argument is found. Nrz"cannot make "%s" into a class name)rrrmake_idrg)rnames class_namesr class_names r class_optionrs>??? NN  EK'']4((  JADHII I:&&&& rz2(?:0x|x|\\x|U\+?|\\u)([0-9a-f]+)$|&#x([0-9a-f]+);$cv |rtt|St|}|rG|dp|d}tt|dS|S#t $r}td|zd}~wwxYw)a Convert a Unicode character code to a Unicode character. (Directive option conversion function.) Codes may be decimal numbers, hexadecimal numbers (prefixed by ``0x``, ``x``, ``\x``, ``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style numeric character entities (e.g. ``☮``). Other text remains as-is. Raise ValueError for illegal Unicode code values. rrzcode too large (%s)N)isdigitchrrunicode_patternrr OverflowErrorr)rrrr}s r unicode_coder6s 9 <<>> s4yy>> !#))$//E  A8%++a..3ub>>*** 999.78889s#/BA"BB B8!B33B8cnt|}t|dkrtd|z|S)z A single character is returned as-is. Unicode character codes are converted as in `unicode_code`. (Directive option conversion function.) rz8%r invalid; must be a single character or a Unicode code)rlenrrchars rsingle_char_or_unicoderOsD  ! !D 4yy1}}*,0122 2 KrcH|dkrd}n|dkrd}nt|}|S)z As with `single_char_or_unicode`, but "tab" and "space" are also supported. (Directive option conversion function.) tab spacer)rrs r$single_char_or_whitespace_or_unicoder[s: 5 W  %h// KrcNt|}|dkrtd|S)z Converts the argument into an integer. Raises ValueError for negative, zero, or non-integer values. (Directive option conversion function.) rz(negative or zero value; must be positiverrs r positive_intrirrcvd|vr|d}n|}d|DS)z Converts a space- or comma-separated list of values into a Python list of integers. (Directive option conversion function.) Raises ValueError for non-positive-integer values. ,c,g|]}t|Sr)r)rentrys r z%positive_int_list..s 5 5 5EL   5 5 5r)r)rentriess rpositive_int_listrtsC h..%%.."" 5 5W 5 5 55rcr tj|n #t$rtd|zwxYw|S)z Verifies the encoding argument by lookup. (Directive option conversion function.) Raises ValueError for unknown encodings. zunknown encoding: "%s")codecslookup LookupErrorrrs rencodingrsN> h >>>1H<===> Os4c |}n-#t$r tdt |zwxYw||vr|Std|dt |)a Directive option utility function, supplied to enable options whose argument must be a member of a finite set of possible values (must be lower case). A custom conversion function must be written to use it. For example:: from docutils.parsers.rst import directives def yesno(argument): return directives.choice(argument, ('yes', 'no')) Raise ``ValueError`` if no argument is found or if the argument's value is not valid (not an entry in the supplied list). z'must supply an argument; choose from %s"z" unknown; choose from )rcrrfr format_values)rvaluesrs rchoicers2  &&(( 222B(00122 22  j$HHmF&;&;&;=>> >s &)*Achdd|ddDd|ddS)Nz, c3 K|] }d|zV dSrrrs rrz format_values..s&%F%FQfqj%F%F%F%F%F%Frz, or "r)rm)rs rrrsC II%F%F&"+%F%F%FFFFF"2JJJ ((rcfd}|S)zl Directive option conversion function. The argument can be any of `values` or `argument_type`. c&|vr|S|Srr)rotherrs r auto_or_otherzvalue_or..auto_or_others! v  O5?? "rr)rrrs`` rvalue_orrs* ###### rc|sdS tj|S#t$r!}tt |d}~wwxYw)z Return a docutils parser whose name matches the argument. (Directive option conversion function.) Return `None`, if the argument evaluates to `False`. Raise `ValueError` if importing the parser module fails. N)rget_parser_classrprstr)rerrs r parser_namersZ t#'111 ###S"""#s AAA)r),__doc__ __docformat__rr importlibrdocutilsrrdocutils.utilsrrdocutils.parsers.rst.languagesr rjrordr~rrrrrrrrrrrrrcompile IGNORECASErrrrrrrrrrrrrrrs! # ##############@@@@@@@@JJJJJJ0/0+0 #0) 0 ' 0 / 0 %0 #0 %0+010$0 0)010  #!0""#00$&%0&*'0())0*&+0,(-00%102)304+506"708$90:';0<%=0>#?0@#A0F3G0H I0L _M00N%$$ - )B_000b5 #888v"""          A A A + + + % % %@?? +++&666????6&"*92=JJ9992       6 6 6   >>>6(((    # # # # #r