if"ddlZddlZddlZddlZejrddlZGddejZ dZ ej dZ de dejdfd ZGd d e ZGd d ejZejdeeZdedejejdejejgefdefdZGddZ ddlmZddlmZddlmZddlmZdS#e $rddl!mZddl!mZddl!mZddl!mZYdSwxYw)NceZdZdefdZdS)HasHTMLreturncdSNselfs u/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/markupsafe/__init__.py__html__zHasHTML.__html__ s DN)__name__ __module__ __qualname__strr rr r rr s/ c      r rz2.0.1z(|<[^>]*>)namer).Markupc tt|tjdddtjdtjddffd }|S)Nr rargskwargsrctt|t||j}t|||j||g|Ri|Sr)_escape_argspeclist enumerateescapeitems __class__)r rrorigs r wrappedz)_simple_escaping_wrapper..wrappedsjtDzz9T??DKHH  <<<~~dd49$999&99:::r )getattrr functoolswrapstAny)rrrs @r _simple_escaping_wrapperr%sl 3  D_T;h;qu;;(;;;;;; Nr c eZdZdZdZ d,dejdejeded dffd Z d-d Z d ej ed fd dffd Z d ej ed fd dfdZ ded dffd ZeZdejd dffd Zd effd Zdejej ed fd dffd Zejje_ d.dejeded ejdffd Zejje_ d.dejeded ejdffd Zejje_d/ded ejdffd Zejje_d efdZd efd Zed!ejd dfd"Zd#D]Zeee e<[ded ej!d$ffd% Z"ded ej!d$ffd& Z#d'ejd(ejd dfd)Z$d*ed dfd+Z%xZ&S)0raA string that is ready to be safely inserted into an HTML or XML document, either because it was escaped or because it was marked safe. Passing an object to the constructor converts it to text and wraps it to mark it safe without escaping. To escape the text, use the :meth:`escape` class method instead. >>> Markup("Hello, World!") Markup('Hello, World!') >>> Markup(42) Markup('42') >>> Markup.escape("Hello, World!") Markup('Hello <em>World</em>!') This implements the ``__html__()`` interface that some frameworks use. Passing an object that implements ``__html__()`` will wrap the output of that method, marking it safe. >>> class Foo: ... def __html__(self): ... return 'foo' ... >>> Markup(Foo()) Markup('foo') This is a subclass of :class:`str`. It has the same methods, but escapes their arguments and returns a ``Markup`` instance. >>> Markup("%s") % ("foo & bar",) Markup('foo & bar') >>> Markup("Hello ") + "" Markup('Hello <foo>') rNstrictbaseencodingerrorsrct|dr|}|"t||St||||SNr )hasattrr super__new__)clsr)r*r+rs r r0zMarkup.__new__Es^ 4 $ $ #==??D  77??3-- -wwsD(F;;;r c|Srrr s r r zMarkup.__html__Ps r otherrct|tst|drG|t ||StSr-) isinstancerr.rr/__add__rNotImplemented)r r3rs r r6zMarkup.__add__Ss\ eS ! ! GWUJ%?%? G>>%''//$++e2D2D"E"EFF Fr ct|tst|dr(|||St Sr-)r5rr.rr6r7)r r3s r __radd__zMarkup.__radd__YsK eS ! ! 4WUJ%?%? 4;;u%%--d33 3r numct|tr4|t|St Sr)r5intrr/__mul__r7)r r:rs r r=zMarkup.__mul___s= c3   8>>%''//#"6"677 7r argct|trtfd|D}nt|j}t |S)Nc3BK|]}t|jVdSr)_MarkupEscapeHelperr).0xr s r z!Markup.__mod__..is0II+At{;;IIIIIIr )r5tuplerArrr/__mod__)r r>rs` r rFzMarkup.__mod__gsm c5 ! ! 8IIIISIIIIICC%c4;77C~~eggooc22333r cd|jjdtdS)N())rrr/__repr__)r rs r rJzMarkup.__repr__os/.)AAEGG,<,<,>,>AAAAr seqc|tt|j|Sr)rr/joinmapr)r rKrs r rMz Markup.joinrs1~~eggll3t{C+@+@AABBBr sepmaxsplitcbfdt||DS)Nc:g|]}|SrrrBvr s r z Markup.split..z%HHHaq!!HHHr )r/splitr rPrQrs` r rYz Markup.splitws3IHHH577==h+G+GHHHHr cbfdt||DS)Nc:g|]}|SrrTrUs r rWz!Markup.rsplit..s%IIIaq!!IIIr )r/rsplitrZs` r r]z Markup.rsplit~s3JIII577>>#x+H+HIIIIr Fkeependsc`fdt|DS)Nc:g|]}|SrrTrUs r rWz%Markup.splitlines..rXr )r/ splitlines)r r^rs` r razMarkup.splitliness0HHHH577+=+=h+G+GHHHHr c>ddlm}|t|S)uConvert escaped markup back into a text string. This replaces HTML entities with the characters they represent. >>> Markup("Main » About").unescape() 'Main » About' r)unescape)htmlrcr)r rcs r rczMarkup.unescapes, "!!!!!xD """r cdtd|}t |S)u:meth:`unescape` the markup, remove tags, and normalize whitespace to single spaces. >>> Markup("Main » About").striptags() 'Main » About'  r')rM _striptags_resubrYrrc)r strippeds r striptagszMarkup.striptagssK88M--b$77==??@@h((***r scLt|}|j|ur ||S|S)ztEscape a string. Calls :func:`escape` and ensures that for subclasses the correct type is returned. )rr)r1rkrvs r rz Markup.escapes. AYY #:;CCCCCCC8#DL<>II:c?I58I  IIIIII I%EM<>JJ:c?J58J  JJJJJJ Z'FNII4IAF84DIIIIII/J ## # # # #+3++++ qu    [ <<$43F;;&S&QW-I%J&&&&&& &c&ag.J&K&&&&&& EAEEQUExEEEE38r rcpeZdZdZdejejgefddffd Zdejde de fdZ xZ S) rrrrNcV||_tdSr)rr/__init__)r rrs r rzEscapeFormatter.__init__s&  r valuerct|dr||}nxt|dr:|r#td|dt|d|}n.t j||t|}t| |S)Nrr zFormat specifier z given, but z{ does not define __html_format__. A class that defines __html__ must define __html_format__ to work with format specifiers.) r.rrtyper string Formatter format_fieldrr)r rrrms r rzEscapeFormatter.format_fields 5+ , , N&&{33BB UJ ' ' N  G GGeGGG !!BB!..tUC 4;???r cPt||jSr)rrrr s r __str__z_MarkupEscapeHelper.__str__ s4;;tx(()))r cjt|t|jSr)rrreprrr s r rJz_MarkupEscapeHelper.__repr__ s$4;;tDH~~..///r c*t|jSr)r<rr s r __int__z_MarkupEscapeHelper.__int__s48}}r c*t|jSr)floatrr s r __float__z_MarkupEscapeHelper.__float__sTXr )rrrrrr#r$rrrrnrrrJr<rrrrr r rArAs,,!IAE1:qugvo+F4@@*?@@@@*****0#00005r rAr) escape_silent)soft_str) soft_unicode)"r!rertypingr# TYPE_CHECKINGtyping_extensionsteProtocolr __version__compilergrrr%rrrTypeVarrdictrrr$rrA _speedupsrrrr ImportError_nativerr r rs] ?"""""+   233  3 1:m+D    tttttStttn$$$$$f&$$$2ai tT22   ! 15 1;<:qugvo;V4 &++++++999999//////''''''''&&&))))))777777------%%%%%%%%% &sCC?>C?