8f dZdgZddlmZmZmZmZddddedeed ed eed eed ef d Z dedeed ed eeeffdZ dddded eed eed efdZ dS)aFunctions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2 The functions declared in this module should cover the different use cases needed to generate a string representation of a file size using several different units. Since there are many standards regarding file size units, three different functions have been implemented. See Also: * `Wikipedia: Binary prefix `_ decimal)IterableListOptionalTuple  precision separatorsizesuffixesbaser r returnc|dkrdS||krd|St|dD]\}}||z}||krnd||z|z |||S)Nrz1 bytez {:,} bytesz{:,.{precision}f}{separator}{}r )format enumerate)r rrr r isuffixunits y/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/rich/filesize.py_to_strrs qyyx ""4(((x++ 6Qw $;; E  + 2 2 t  3  cTt|D]\}}||z}|||zkrn||fS)z*Pick a suffix and base for the given size.)r)r rrrrrs rpick_unit_and_suffixr,sIx(( 6Qw $+   E  <rc*t|dd||S)a3Convert a filesize in to a string (powers of 1000, SI prefixes). In this convention, ``1000 B = 1 kB``. This is typically the format used to advertise the storage capacity of USB flash drives and the like (*256 MB* meaning actually a storage capacity of more than *256 000 000 B*), or used by **Mac OS X** since v10.6 to report file sizes. Arguments: int (size): A file size. int (precision): The number of decimal places to include (default = 1). str (separator): The string to separate the value from the units (default = " "). Returns: `str`: A string containing a abbreviated file size and units. Example: >>> filesize.decimal(30000) '30.0 kB' >>> filesize.decimal(30000, precision=2, separator="") '30.00kB' )kBMBGBTBPBEBZBYBir )r)r r r s rrr5s*<  8     rN) __doc____all__typingrrrrintstrrrrrrr,sA   +222222222222 !"  sm  }  }  2sd3isuSRUX !" $$$ $}$} $  $$$$$$r