+
    }i                    6    ^ RI Ht ^ RItRR0t ! R R4      tR# )    )annotationsN*$c                  H    ] tR t^tRtR R ltR R lt]R R l4       tRt	R	# )
_URLPatternz.Internal class which represents a URL pattern.c                   V ^8  d   QhRR/# )   patternstr )formats   "e/Users/ahmad/.openclaw/workspace/my-crawler/.venv/lib/python3.14/site-packages/protego/_urlpattern.py__annotate___URLPattern.__annotate__   s     > > >    c                	t   Wn         \        V4      V n        R V P                   9   V n        V P                   P	                  R4      V n        V P                  '       d/   V P                   RV P                   P                  R 4       V n        M&V P
                  '       d   V P                   RR V n        RV n	        R# )r   r   N)
_patternlenpriority_contains_asteriskendswith_contains_dollarfind_pattern_before_asterisk_pattern_before_dollar_pattern_compiled)selfr
   s   &&r   __init___URLPattern.__init__   s    $ \(+t}}(<&*mm&<&<S&A"""15)$--$$S)2D) """/3}}Sb/AD'9=r   c                    V ^8  d   QhRRRR/# )r	   urlr   returnboolr   )r   s   "r   r   r      s     7 7 7 7r   c                   V P                   e%   \        V P                   P                  V4      4      # V P                  '       g<   V P                  '       g   VP                  V P                  4      # WP                  8H  # VP                  V P                  4      '       g   R# V P                  V P                  4      p\        P                  ! V4      V n         \        V P                   P                  V4      4      # )zEReturn True if pattern matches the given URL, otherwise return False.F)r   r$   matchr   r   
startswithr   r   r   _prepare_pattern_for_regexrecompile)r   r"   _pattern_regexs   && r   r&   _URLPattern.match   s     !!-..44S9::&&&(((~~dmm44 5555~~d;;<<88G!#N!;D**00566r   c                    V ^8  d   QhRRRR/# )r	   r
   r   r#   r   )r   s   "r   r   r   0   s     	 	C 	C 	r   c                   \         P                  ! RRV 4      p \         P                  ! RV 4      p\        V4       F=  w  r#V\        9  d   \         P
                  ! V4      W&   K*  W,          R8X  g   K9  RW&   K?  	  RP                  V4      # )z:Return equivalent regex pattern for the given URL pattern.z\*+r   z(\*|\$$)z.*? )r)   subsplit	enumerate
_WILDCARDSescapejoin)r
   sindexsubstrs   &   r   r(   &_URLPattern._prepare_pattern_for_regex/   sn     &&g.HH['*&q\MEZ'99V,S 	 *
 wwqzr   )r   r   r   r   r   r   r   N)
__name__
__module____qualname____firstlineno____doc__r   r&   staticmethodr(   __static_attributes__r   r   r   r   r      s#    8>7* 	 	r   r   )
__future__r   r)   r3   r   r   r   r   <module>rB      s    " 	3Z
1 1r   