
    u-jF}                     L   d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlm	Z	 d dl
mZ d dlmZ d dlmZ d dlmZmZmZmZmZ d dlZd dlmZ d dlmZ d d	lmZmZ d d
lmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% d dl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z, d dl-m.Z.m/Z/ d dl0m1Z1 ddl2m3Z3m4Z4 ddl5m6Z6m7Z7m8Z8 ddl9m:Z: ddl;m<Z<m=Z=m>Z>  e1            Z?dZ@e(dddddddfdeAdeAdeeA         deeA         deeeAdf         deeB         dee         deeA         deeA         deeA         deeA         fd ZCe'dddddddfd!eAdeAdeeA         deeAedf         deeA         deeeeAf                  deeB         dee         deeA         deeA         deAfd"ZDde(ddddddddd#
d$eAdeAd%eAdeeA         deeA         deeeAdf         deeB         dee         deeA         d&eBdeeA         deeA         deeA         fd'ZEdeAdeAfd(ZFdde+fdeAdeAdeAd%eAfd)ZG	 d5deAdeAdeAdeeA         fd*ZHd+ ZI	 	 	 	 	 d6d,eAdeAd-eAded.eeeAeAf                  d/eJd&eBd0eee3                  deAfd1ZK	 	 	 d7d,eAdeAd-eAd/eJded.eeeAeAf                  d&eBd0eee3                  fd2ZL	 d5d,eAdeAd-eAded.eeeAeAf                  f
d3ZM	 	 d8d0eee3                  fd4ZNdS )9    N)ThreadPoolExecutor)partial)	CookieJar)Path)DictListOptionalTypeUnion)Retry)tqdm)HubApiModelScopeConfig)API_FILE_DOWNLOAD_CHUNK_SIZEAPI_FILE_DOWNLOAD_RETRY_TIMESAPI_FILE_DOWNLOAD_TIMEOUT	FILE_HASHMODELSCOPE_DOWNLOAD_PARALLELS)MODELSCOPE_PARALLEL_DOWNLOAD_THRESHOLD_MBTEMPORARY_FOLDER_NAME)DEFAULT_DATASET_REVISIONDEFAULT_MODEL_REVISIONINTRA_CLOUD_ACCELERATIONREPO_TYPE_DATASETREPO_TYPE_MODELREPO_TYPE_SUPPORT)get_dataset_cache_rootget_model_cache_root)
get_logger   )ProgressCallbackTqdmCallback)FileDownloadErrorInvalidParameterNotExistError)ModelFileSystemCache)file_integrity_validationget_endpointmodel_id_to_group_owner_name   Fmodel_id	file_pathrevision	cache_dir
user_agentlocal_files_onlycookies	local_dirtokenendpointreturnc
                 @    t          | |t          ||||||||	          S )a  Download from a given URL and cache it if it's not already present in the local cache.

    Given a URL, this function looks for the corresponding file in the local
    cache. If it's not there, download it. Then return the path to the cached
    file.

    Args:
        model_id (str): The model to whom the file to be downloaded belongs.
        file_path(str): Path of the file to be downloaded, relative to the root of model repo.
        revision(str, optional): revision of the model file to be downloaded.
            Can be any of a branch, tag or commit hash.
        cache_dir (str, Path, optional): Path to the folder where cached files are stored.
        user_agent (dict, str, optional): The user-agent info in the form of a dictionary or a string.
        local_files_only (bool, optional):  If `True`, avoid downloading the file and return the path to the
            local cached file if it exists. if `False`, download the file anyway even it exists.
        cookies (CookieJar, optional): The cookie of download request.
        local_dir (str, optional): Specific local directory path to which the file will be downloaded.
        token (str, optional): The user token.
        endpoint (str, optional): The remote endpoint.

    Returns:
        string: string of local file or if networking is off, last version of
        file cached on disk.

    Raises:
        NotExistError: The file is not exist.
        ValueError: The request parameter error.

    Note:
        Raises the following errors:

            - [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
            if `use_auth_token=True` and the token cannot be found.
            - [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError)
            if ETag cannot be determined.
            - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
            if some parameter value is invalid
    		repo_typer-   r.   r/   r0   r1   r2   r3   r4   )_repo_file_downloadr   )
r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   s
             \/var/www/html/banglarbhumi/venv/lib/python3.11/site-packages/modelscope/hub/file_download.pymodel_file_downloadr;   .   s=    d !)       
dataset_idc
                 @    t          | |t          ||||||||	          S )aI  Download raw files of a dataset.
    Downloads all files at the specified revision. This
    is useful when you want all files from a dataset, because you don't know which
    ones you will need a priori. All files are nested inside a folder in order
    to keep their actual filename relative to that folder.

    An alternative would be to just clone a dataset but this would require that the
    user always has git and git-lfs installed, and properly configured.

    Args:
        dataset_id (str): A user or an organization name and a dataset name separated by a `/`.
        file_path (str): The relative path of the file to download.
        revision (str, optional): An optional Git revision id which can be a branch name, a tag, or a
            commit hash. NOTE: currently only branch and tag name is supported
        cache_dir (str, Path, optional): Path to the folder where cached files are stored, dataset file will
            be save as cache_dir/dataset_id/THE_DATASET_FILES.
        local_dir (str, optional): Specific local directory path to which the file will be downloaded.
        user_agent (str, dict, optional): The user-agent info in the form of a dictionary or a string.
        local_files_only (bool, optional): If `True`, avoid downloading the file and return the path to the
            local cached file if it exists.
        cookies (CookieJar, optional): The cookie of the request, default None.
        token (str, optional): The user token.
        endpoint (str, optional): The remote endpoint.
    Raises:
        ValueError: the value details.

    Returns:
        str: Local folder path (string) of repo snapshot

    Note:
        Raises the following errors:
        - [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
        if `use_auth_token=True` and the token cannot be found.
        - [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError) if
        ETag cannot be determined.
        - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        if some parameter value is invalid
    r7   )r9   r   )
r=   r,   r-   r.   r2   r/   r0   r1   r3   r4   s
             r:   dataset_file_downloadr?   n   s=    d #)   r<   )
r8   r-   r.   r/   r0   r1   r2   disable_tqdmr3   r4   repo_idr8   r@   c       
            |st           }|t          vrt          d|dt                    t          | |||          \  }}|rB|                    |          }|t
                              d           |S t          d          t          |
          }t          j
        |          t          t          j                              d}t          d	k    rLt          j        d
          p|                                }|r"t
                              d|             ||d<   ||                                }g }||                    | ||
          }d }|t           k    r|                    | |||          }|                    | |d|dn||          }|D ]q}|d         dk    r|d         |k    rV|                    |          r=|d         }t
                              d| d           |                    |          c S |} nrn3|t4          k    r't7          |           \  }}|st8          }|                    ||||
          \  }}d}d}	 	 |                    | |dd||||
|	  	        }n7# t>          $ r*}t
                               d|  d|            Y d }~nd }~ww xY wd}|D ]s}|d         dk    r|d         |k    rX|                    |          r=|d         }t
                              d| d           |                    |          c S |}d} nttC          |          |k     s|rn|dz  }|tE          d|d |           |t           k    rtG          | |||          }n>|t4          k    r!|$                    |d         ||||!          }nt          d"|           tK          ||||||          S )#NzInvalid repo type: z, only support: )r2   r.   r8   z>File exists in local cache, but we're not sure it's up to datezCannot find the requested files in the cached path and outgoing traffic has been disabled. To enable look-ups and downloads online, set 'local_files_only' to False.)r3   )r/   )z
user-agentzsnapshot-identifiertrueINTRA_CLOUD_ACCELERATION_REGIONz6Intra-cloud acceleration enabled for downloading from zx-aliyun-region-id)rA   r8   r3   )r-   r1   r4   TF)r+   r-   	recursiveuse_cookiesr4   r
   treer   NameFile z8 already in cache with identical hash, skip downloading!)dataset_name	namespacer4   r3   r    d   /)	rA   r-   	root_pathrE   page_number	page_sizer4   r3   dataset_hub_idzGet dataset: z file list failed, error: zThe file path: z not exist in: )	file_namerJ   rK   r-   r4   zInvalid repo type )&r   r   r$   $create_temporary_directory_and_cacheget_file_by_pathloggerwarning
ValueErrorr   r   get_user_agentstruuiduuid4r   osgetenv!_get_internal_acceleration_domaininfoget_cookiesget_endpoint_for_readget_valid_revisionget_model_filesexistsdebugget_file_by_infor   r)   r   get_dataset_id_and_typeget_dataset_files	Exceptionerrorlenr%   get_file_download_urlget_dataset_file_urldownload_file) rA   r,   r8   r-   r.   r/   r0   r1   r2   r@   r3   r4   temporary_cache_dircachecached_file_path_apiheaders	region_id
repo_filesfile_to_download_meta	repo_filerR   group_or_ownername_hub_id_rO   rP   dataset_fileseis_existurl_to_downloads                                    r:   r9   r9      sf      $#	))) )		+<+< > ? ? 	? "F9	Y"P "P "P
  = 11)<<'NNP   $#<= = =
 D '5NNN"4:<<00 G
  6))I788 85577 	  	6KKRRR   -6G()""$$J--y . ? ? O##**h( + L L ))!(g *  
 $ 	 	I F** I--<<	** 6 )& 1ILLc	ccc   !11)<<<<<,5) . 
'	'	';GDD 	0/H11$	 2  

 	#	 $ 6 6#%!" +'%#* !7 	!, 	!,    JGJJqJJL L L
 H*  	V$..V$	11||I.. ($-f$5	gIggg    %55i@@@@@09-#'E 2 =!!I---1KG#	J $m&YY1 2 2 	2 O##/H08: :	'	'	'33+F3$ 4   9i99:::*?,eWgG G Gs   I8 8
J, J''J,c                 r   |                      t          j        j                  r$|                     t          j        j                  } t          j                            |           }t          j                            |           }|dk    rd S |                     d          s t          j                            |d          }t          |          \  }}|	                    dd          }t          j                            | ||          }t          j                            |||          }t          j        
                    |          rht          j        
                    |          sKt                              d| d|            	 t          j        ||           d S # t          $ r Y d S w xY wd S d S )Ndatasetshub.___zLegacy cache dir exists: z
, move to )endswithr\   pathsepstripdirnamebasenamejoinr)   replacerd   rU   r_   shutilmoveri   )r.   r+   legacy_cache_root	base_namerx   ry   ro   legacy_cache_dirs           r:   !move_legacy_cache_to_standard_dirr   M  s   "'+&& 1OOBGK00		22  ++IJ%%e,, 
C GLL):EBB7AAND<<U##D',,y.$GGw||$5~tLL	w~~  	&(gnn5H&I&I	Y(8YYDWYY	
 	
 	
	K(*=>>>>> 	 	 	DD		 	 	 	s   F$ $
F21F2c                 `   |t           k    rt                      }n,|t          k    rt                      }nt	          d|           t          |           \  }}|5t          j                            |t                    }t          |          }n||}t          ||            t          |t                    rt          |          }t          j                            |t          ||          }|                    dd          }t          |||          }t          j        |d           ||fS )Nz7repo_type only support model and dataset, but now is : r   r   Texist_ok)r   r   r   r   rW   r)   r\   r   r   r   r&   r   
isinstancer   rY   r   makedirs)	r+   r2   r.   r8   default_cache_rootrx   ry   ro   rp   s	            r:   rS   rS   p  s5    O##133	'	'	'355QiQQ
 
 	
 8AAND gll96KLL$Y//*I-iBBBi&& 	'II gll96K+94A A||C''$YEEK#d3333%%r<   c                     t           j                            |          }t           j                            |          }d}|st                      }|                    || ||          S )a  Format file download url according to `model_id`, `revision` and `file_path`.
    e.g., Given `model_id=john/bert`, `revision=master`, `file_path=README.md`,
    the resulted download url is: https://modelscope.cn/api/v1/models/john/bert/repo?Revision=master&FilePath=README.md

    Args:
        model_id (str): The model_id.
        file_path (str): File path
        revision (str): File revision.
        endpoint (str): The remote endpoint

    Returns:
        str: The file url.
    zQ{endpoint}/api/v1/models/{model_id}/repo?Revision={revision}&FilePath={file_path})r4   r+   r-   r,   )urllibparse
quote_plusr(   format)r+   r,   r-   r4   download_url_templates        r:   rl   rl     sn    " ''	22I|&&x00Ho ">> ''	 (   r<   c                 X   | \  }}}}}}}}|i nt          j        |          }	t          t          j                    j                  |	d<   t          t          ddg          }
|d|d|z   }	 	 d}t          j	        
                    |          rct          |d          5 }|                    dt          j                  }|D ]}|                    |           	 d d d            n# 1 swxY w Y   ||z   }||k    rd S d	|d
||	d<   t          |d          5 }t!          j        |d|	|t$                    }|                                 |                    t*                    D ]@}|r<|                    |           |D ]$}|                    t/          |                     %A	 d d d            n# 1 swxY w Y   d S # t0          $ rW}|
                    d||          }
t4                              d|d|d           |
                                 Y d }~nd }~ww xY w)NX-Request-IDr    GETtotalbackoff_factorallowed_methodsr{   Tr   rbbytes=-Rangeab+streamrs   r1   timeout
chunk_sizerj   zDownloading: z failed, reason: z will retry)copydeepcopyrY   rZ   r[   hexr   r   r\   r   rd   openseekioSEEK_ENDupdaterequestsgetr   raise_for_statusiter_contentr   writerk   ri   	incrementrU   rV   sleep)paramsmodel_file_pathprogress_callbacksstartendurlrR   r1   rs   get_headersretrypart_file_namepartial_lengthfcallbackdownload_startrchunkr}   s                      r:   download_part_with_retryr     s   X^UO'S)Wg""T]7-C-CK"%djll&6"7"7K+! ! !E %_555##'>>N 	Nw~~"$ $ 8.$// 81%&VVAr{%;%;N$6 8 8 777788 8 8 8 8 8 8 8 8 8 8 8 8 8 8 #^3N## $4BNNCC#HK ne,, 8L'#57 7 7 ""$$$^^#? , A A 8 8E 8(: 8 8H$OOCJJ777788 8 8 8 8 8 8 8 8 8 8 8 8 8 8 E 	 	 	OOE3aO88ENNN+OOQQQ0 1 1 1KKMMMMMMMM		9 sh   11G ";C*G *C..G 1C.2G G BF9-G 9F==G  F=G 
H'AH""H'r   rR   rs   	file_sizer   c	                 `   |g n|                                 }|s|                    t                     fd|D             }d}	g }
t          j                            |          }t          j        t          j                            |          d           t          t          |	z                      D ]/}||	z  }|dz   |	z  dz
  }|
                    ||||| ||f           0|dz   k     r#|
                    |||dz   dz
  | ||f           t          t          d          }t          |d          5 }t          |                    t          |
                     d d d            n# 1 swxY w Y   |D ]}|                                 t#          j                    }t'          t          j                            |          d	          5 }|
D ]}|d
         d|d         d|d         z   }t'          |d          5 }	 |                    dt*          z            }|sn+|                    |           |                    |           K	 d d d            n# 1 swxY w Y   t          j        |           	 d d d            n# 1 swxY w Y   |                                S )Nc                 (    g | ]} |          S  r   .0r   rR   r   s     r:   
<listcomp>z%parallel_download.<locals>.<listcomp>  2       +3I&&  r<   i   
Tr   r       download)max_workersthread_name_prefixwbr   r{      r*   r   )r   appendr"   r\   r   r   r   r   rangeintminr   r   listmapr   r   hashlibsha256r   readr   r   r   remove	hexdigest)r   r2   rR   r1   rs   r   r@   r   r4   	PART_SIZEtasksr,   idxr   r   	parallelsexecutorr   hash_sha256output_filetaskr   	part_filer   s     `  `                  r:   parallel_downloadr     s     29?Q?V?V @ @ 0!!,///    7I   "IEY	22IK	**T::::SY.//00 4 4iQw)#a'i!3UC'3 	4 	4 	4 	4
Qwi!3S1Wi!m9gw8 	9 	9 	91266I	!j
B 
B 
B <EMX\\2E::;;;< < < < < < < < < < < < < < < '  .""K	bgll9i00$	7	7 
&; 		& 		&D!!WW4777DGG'DDNnd++ .y.%NN20L+LMME  %%e,,,&&u---. 	. . . . . . . . . . . . . . . In%%%%		&
& 
& 
& 
& 
& 
& 
& 
& 
& 
& 
& 
& 
& 
& 
&   """sI   >)E33E7:E72J
AI$J$I((J+I(,JJJc                    |g n|                                 }|s|                    t                     fd|D             }|i nt          j        |          }t	          t          j                    j                  |d<   t          j	        
                    |          }	t          j        t          j	                            |	          d           t                              d| |	           d}
t          j                    }t#          t$          dd	g
          }	 	 dk    rEt'          |	d          5  |D ]}|                    d           	 ddd           n# 1 swxY w Y   nd}t          j	                            |	          red}
t'          |	d          5 }|                    dt.          j                  }|D ]}|                    |           	 ddd           n# 1 swxY w Y   |k    rn$d|ddz
  |d<   t'          |	d          5 }t3          j        | d||t6                    }|                                 |                    t<                    D ]W}|rS|D ]$}|                    t?          |                     %|                     |           |
s|                    |           X	 ddd           n# 1 swxY w Y   nG# tB          $ r8}d}
|"                    d	| |          }|#                                 Y d}~nd}~ww xY w|D ]}|$                                 |
rdn|%                                S )aj  Download remote file, will retry 5 times before giving up on errors.

    Args:
        url(str):
            actual download url of the file
        local_dir(str):
            local directory where the downloaded file stores
        file_name(str):
            name of the file stored in `local_dir`
        file_size(int):
            The file size.
        cookies(CookieJar):
            cookies used to authentication the user, which is used for downloading private repos
        headers(Dict[str, str], optional):
            http headers to carry necessary info when requesting the remote file
        disable_tqdm(bool, optional): Disable the progress bar with tqdm.
        progress_callbacks(List[Type[ProgressCallback]], optional):
            progress callbacks to track the download progress.

    Raises:
        FileDownloadError: File download failed.

    Nc                 (    g | ]} |          S r   r   r   s     r:   r   z'http_get_model_file.<locals>.<listcomp>4  r   r<   r   Tr   downloading %s to %sFr    r   r   r   zw+r   r   r   r   r   r   r   r   )&r   r   r"   r   rY   rZ   r[   r   r\   r   r   r   r   rU   re   r   r   r   r   r   r   rd   r   r   r   r   r   r   r   r   r   rk   r   ri   r   r   r   r   )r   r2   rR   r   r1   rs   r@   r   r   temp_file_path	has_retryr   r   r   r   r   r   r   r}   s     ``               r:   http_get_model_filer     s   B  29?Q?V?V @ @ 0!!,///    7I    ""T]7-C-CK"%djll&6"7"7KW\\)Y77NK//$????
LL'n===I.""K+! ! !E
.-	A~~.$// + +$6 + + ****++ + + + + + + + + + + + + + + Nw~~n-- 8 	.$// 81%&VVAr{%;%;N$6 8 8 777788 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ** + 5CNN4=MM$CK ne,, 6L'#57 7 7 ""$$$^^#? , A A 6 6E 6(: 8 8H$OOCJJ7777( 6'..u55566 6 6 6 6 6 6 6 6 6 6 6 6 6 6"  	 	 	IOOE3aO88EKKMMMMMMMM	W.^ '  944+"7"7"9"99s   $K :E"K "E&&K )E&*K /3K ";G*K *G..K 1G.2	K =K B&KK KK KK 
L$.LLc           
         d}t          t          j        d|d          }|i nt          j        |          }t          t          j                    j                  |d<    |            5 }t          
                    d| |j                   t          t          dd	g
          }		 	 |                                }
d|
z  |d<   t          j        | d||t"                    }|                                 |j                            d          }|t)          |          nd}t+          ddd||
d|z   dz             }|                    t.                    D ];}|r7|                    t3          |                     |                    |           <|                                 nE# t8          $ r6}|	                    d	| |          }	|	                                 Y d}~nd}~ww xY wH	 ddd           n# 1 swxY w Y   t          
                    d| |           t>          j         !                    |j                  }||k    rNt?          j"        |j                   d|d|d|d}t          #                    |           tI          |          t?          j%        |j        t>          j         &                    ||                     dS )aj  Download remote file, will retry 5 times before giving up on errors.

    Args:
        url(str):
            actual download url of the file
        local_dir(str):
            local directory where the downloaded file stores
        file_name(str):
            name of the file stored in `local_dir`
        cookies(CookieJar):
            cookies used to authentication the user, which is used for downloading private repos
        headers(Dict[str, str], optional):
            http headers to carry necessary info when requesting the remote file

    Raises:
        FileDownloadError: File download failed.

    r   F)modedirdeleteNr   r   r    r   r   Tz	bytes=%d-r   r   zContent-LengthBi   zDownloading [])unit
unit_scaleunit_divisorr   initialdescr   r   zstoring %s in cache at %srI   z& download incomplete, content_length: z5 but the                     file downloaded length: z, please download again)'r   tempfileNamedTemporaryFiler   r   rY   rZ   r[   r   rU   re   ry   r   r   tellr   r   r   r   rs   r   r   r   r   r   rk   r   closeri   r   r   r\   r   getsizer   rj   r#   r   r   )r   r2   rR   r1   rs   r   temp_file_managerr   	temp_filer   downloaded_sizer   content_lengthprogressr   r}   downloaded_lengthmsgs                     r:   http_get_filer  y  sE   2 E#$IeM M M""T]7-C-CK"%djll&6"7"7K				 &	+S).AAA/"G% % %	"+.."2"2'2_'DG$L'#57 7 7 ""$$$!"/?!@!@'5'A "$ $ $GK #!%+(94s:   ^^#? , A A / /E / E

333!...      s!<<;	8 G& & & & & & & & & & & & & & &P LL,c9===	77!!!
	).!!!! IIuuu///1 	S$$$Jy~rw||IyAABBBBBs=   *;G:&DF('G:(
G(2,G#G:#G((G::G>G>c                    t           j                            ||d                   }t          t                    D ]v}	t
          dz  dz  |d         k     rEt          dk    r:t          | ||d         ||d n|                                |d         ||          }
n#t          | ||d         |d         ||||          }
t          |v r|t                   }d}|
:|
|k    r3t                              d|d                    t          ||          sd	}nt          ||          sd	}|s|	t          dz
  k     r`t                              d
|d         |	dz   t                     t           j                            |          rt          j        |           Xt!          d|d         t          fz             |                    ||          S )Nr   i  Sizer    )rs   r1   r   r@   r   )r   rs   r1   r@   r   TzCMismatched real-time digest for %s, falling back to full hash checkFz@Hash validation failed for %s, retrying download (attempt %d/%d)zLFile %s hash validation failed after %d attempts, the file may be corrupted.)r\   r   r   r   HASH_RETRY_TIMESr   r   r   get_dictr   r   rU   rV   r'   rd   r   r#   put_file)r   	file_metaro   rp   rs   r1   r@   r   r  hash_attemptfile_digestexpected_hash
hash_valids                r:   rn   rn     s    0)F2CDDI.// 9 94t;dBYF  9A==+#&! 'W5E5E5G5G#F+)#5	 	 	KK .#&!#F+)#5	 	 	K 	!!%i0MJ&-//NN]!&)+ + + 5YNN +%*
0MJJ '!&J ?"2Q"666NN<=Fv=N$q(*:< < <
 w~~i00 -	),,,+5"6*,<=>? ? ? 	 >>)Y///r<   )N)NNFNN)NFN)FN)Or   r   r   r\   r   r  r   rZ   concurrent.futuresr   	functoolsr   http.cookiejarr   pathlibr   typingr   r   r	   r
   r   r   requests.adaptersr   	tqdm.autor   modelscope.hub.apir   r   modelscope.hub.constantsr   r   r   r   r   r   r   modelscope.utils.constantr   r   r   r   r   r   modelscope.utils.file_utilsr   r   modelscope.utils.loggerr   r   r!   r"   errorsr#   r$   r%   utils.cachingr&   utils.utilsr'   r(   r)   rU   r  rY   boolr;   r?   r9   r   rS   rl   r   r   r   r   r  rn   r   r<   r:   <module>r,     s     				 				     1 1 1 1 1 1       $ $ $ $ $ $       4 4 4 4 4 4 4 4 4 4 4 4 4 4  # # # # # #       7 7 7 7 7 7 7 7F F F F F F F F F F F F F F F F F F: : : : : : : : : : : : : : : :
? ? ? ? ? ? ? ? . . . . . . 4 4 4 4 4 4 4 4 F F F F F F F F F F / / / / / /8 8 8 8 8 8 8 8 8 8 
   5#)-',#'#"= === sm= }	=
 dCo&= tn= i = }= C== sm= c]= = = =F 7(,#-1',#'"= === sm= S$_%	=
 }= tSy)*= tn= i = C== sm= 	= = = =H 4#)-',#'#"\G \G \G\G\G 	\G
 sm\G }\G dCo&\G tn\G i \G }\G \G C=\G sm\G c]\G \G \G \G~           H ;?:>:I& &3 &47&47& 58& & & &F 59 C %($' %-SM   <* * *b ;?'++0IM&*1# 1#3 1#!$1#!$1#  )1#  (S#X7	1#
 "%1# %)1# +/t4D/E*F1# !$1# 1# 1# 1#t )-7;g: g:	g:g: g: 	g:
 g: d38n%g: g: T"234g: g: g: g:^ )-OC OC	OCOC OC 	OC
 d38n%OC OC OC OCr 7;H0 H0 T"234H0 H0 H0 H0 H0 H0r<   