python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
uuid.cpython-312.opt-1.pyc

ˑes&dZddlZddlZddlmZmZdZejdvrdxZZ	nddlZejZedk(Zedk(Z	d	ZdZ
erd
ZdZ
gd\ZZZZeZeZeeGd
dZGddZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#	ddl$Z$e%e$ddZ&e%e$ddZ'e$jPZ)dZ+d Z,d!Z-d"Z.e	reegZ/n4ejd#k(reee!gZ/nejd$k(rgZ/n
ere!gZ/neeee!e gZ/ej`d%k(re,ge/zZ1nej`d&k(re-ge/zZ1ne/Z1da2d'Z3da4d2d(Z5d)Z6d*Z7d+Z8d,Z9ed-Z:ed.Z;ed/Z<ed0Z=e>d1k(re9yy#e*$rdZ$dZ&dZ'dZ)YwxYw)3aQUUID objects (universally unique identifiers) according to RFC 4122.

This module provides immutable UUID objects (class UUID) and the functions
uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
UUIDs as specified in RFC 4122.

If all you want is a unique ID, you should probably call uuid1() or uuid4().
Note that uuid1() may compromise privacy since it creates a UUID containing
the computer's network address.  uuid4() creates a random UUID.

Typical usage:

    >>> import uuid

    # make a UUID based on the host ID and current time
    >>> uuid.uuid1()    # doctest: +SKIP
    UUID('a8098c1a-f86e-11da-bd1a-00112444be1e')

    # make a UUID using an MD5 hash of a namespace UUID and a name
    >>> uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
    UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e')

    # make a random UUID
    >>> uuid.uuid4()    # doctest: +SKIP
    UUID('16fd2706-8baf-433b-82eb-8c7fada847da')

    # make a UUID using a SHA-1 hash of a namespace UUID and a name
    >>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
    UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d')

    # make a UUID from a string of hex digits (braces and hyphens ignored)
    >>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')

    # convert a UUID to a string of hex digits in standard form
    >>> str(x)
    '00010203-0405-0607-0809-0a0b0c0d0e0f'

    # get the raw 16 bytes of the UUID
    >>> x.bytes
    b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f'

    # make a UUID from a 16-byte string
    >>> uuid.UUID(bytes=x.bytes)
    UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')
N)Enum_simple_enumzKa-Ping Yee <ping@zesty.ca>)win32darwin
emscriptenwasiFAIXLinux:.T)zreserved for NCS compatibilityzspecified in RFC 4122z$reserved for Microsoft compatibilityzreserved for future definitionceZdZdZdZdZy)SafeUUIDrN)__name__
__module____qualname__safeunsafeunknown8/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/uuid.pyrrNsD
FGrrcreZdZdZdZ		d!ejddZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZedZedZedZedZedZedZedZedZedZedZedZedZ edZ!edZ"ed Z#y)"UUIDa	Instances of the UUID class represent UUIDs as specified in RFC 4122.
    UUID objects are immutable, hashable, and usable as dictionary keys.
    Converting a UUID to a string with str() yields something in the form
    '12345678-1234-1234-1234-123456789abc'.  The UUID constructor accepts
    five possible forms: a similar string of hexadecimal digits, or a tuple
    of six integer fields (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and
    48-bit values respectively) as an argument named 'fields', or a string
    of 16 bytes (with all the integer fields in big-endian order) as an
    argument named 'bytes', or a string of 16 bytes (with the first three
    fields in little-endian order) as an argument named 'bytes_le', or a
    single 128-bit integer as an argument named 'int'.

    UUIDs have these read-only attributes:

        bytes       the UUID as a 16-byte string (containing the six
                    integer fields in big-endian byte order)

        bytes_le    the UUID as a 16-byte string (with time_low, time_mid,
                    and time_hi_version in little-endian byte order)

        fields      a tuple of the six integer fields of the UUID,
                    which are also available as six individual attributes
                    and two derived attributes:

            time_low                the first 32 bits of the UUID
            time_mid                the next 16 bits of the UUID
            time_hi_version         the next 16 bits of the UUID
            clock_seq_hi_variant    the next 8 bits of the UUID
            clock_seq_low           the next 8 bits of the UUID
            node                    the last 48 bits of the UUID

            time                    the 60-bit timestamp
            clock_seq               the 14-bit sequence number

        hex         the UUID as a 32-character hexadecimal string

        int         the UUID as a 128-bit integer

        urn         the UUID as a URN as specified in RFC 4122

        variant     the UUID variant (one of the constants RESERVED_NCS,
                    RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE)

        version     the UUID version number (1 through 5, meaningful only
                    when the variant is RFC_4122)

        is_safe     An enum indicating whether the UUID has been generated in
                    a way that is safe for multiprocessing applications, via
                    uuid_generate_time_safe(3).
    )intis_safe__weakref__N)rc<|||||gjddk7rtd|h|jddjdd}|jdjdd}t	|d	k7rtd
t
|d}|9t	|dk7rtd|d
dd|dd
dz|dddz|ddz}|.t	|dk7rtdtj|}|t	|dk7rtd|\}}	}
}}}
d|cxkrdkstdtdd|	cxkrdkstdtdd|
cxkrdkstdtdd|cxkrdkstdtdd|cxkrdkstdtdd|
cxkrdkstdtd|dz|z}|d z|	d!zz|
d"zz|d#zz|
z}|%d|cxkrd$d%zkstd&td&|9d$|cxkrdkstd'td'|d(z}|d)z}|d*z}||d+zz}tj|d,|tj|d-|y).aLCreate a UUID from either a string of 32 hexadecimal digits,
        a string of 16 bytes as the 'bytes' argument, a string of 16 bytes
        in little-endian order as the 'bytes_le' argument, a tuple of six
        integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_version,
        8-bit clock_seq_hi_variant, 8-bit clock_seq_low, 48-bit node) as
        the 'fields' argument, or a single 128-bit integer as the 'int'
        argument.  When a string of hex digits is given, curly braces,
        hyphens, and a URN prefix are all optional.  For example, these
        expressions all yield the same UUID:

        UUID('{12345678-1234-5678-1234-567812345678}')
        UUID('12345678123456781234567812345678')
        UUID('urn:uuid:12345678-1234-5678-1234-567812345678')
        UUID(bytes='\x12\x34\x56\x78'*4)
        UUID(bytes_le='\x78\x56\x34\x12\x34\x12\x78\x56' +
                      '\x12\x34\x56\x78\x12\x34\x56\x78')
        UUID(fields=(0x12345678, 0x1234, 0x5678, 0x12, 0x34, 0x567812345678))
        UUID(int=0x12345678123456781234567812345678)

        Exactly one of 'hex', 'bytes', 'bytes_le', 'fields', or 'int' must
        be given.  The 'version' argument is optional; if given, the resulting
        UUID will have its variant and version set according to RFC 4122,
        overriding the given 'hex', 'bytes', 'bytes_le', 'fields', or 'int'.

        is_safe is an enum exposed as an attribute on the instance.  It
        indicates whether the UUID has been generated in a way that is safe
        for multiprocessing applications, via uuid_generate_time_safe(3).
        NzGone of the hex, bytes, bytes_le, fields, or int arguments must be givenzurn:zuuid:z{}- z$badly formed hexadecimal UUID stringz bytes_le is not a 16-char stringrzbytes is not a 16-char stringzfields is not a 6-tuplerlz*field 1 out of range (need a 32-bit value)iz*field 2 out of range (need a 16-bit value)z*field 3 out of range (need a 16-bit value)z*field 4 out of range (need an 8-bit value)z*field 5 out of range (need an 8-bit value)z*field 6 out of range (need a 48-bit value)`P@0z*int is out of range (need a 128-bit value)zillegal version numberllLrr)
count	TypeErrorreplacestriplen
ValueErrorint_
from_bytesobject__setattr__)selfhexbytesbytes_lefieldsrversionrtime_lowtime_midtime_hi_versionclock_seq_hi_variant
clock_seq_lownode	clock_seqs               r__init__z
UUID.__init__sD@
&#.44T:a?=>
>?++fb)11'2>C))D/))#r2C3x2~ !GHHsB-C8}" !CDDcg2g&#c"*)==c#bj)*,4QRL9E5zR !@AA//%(C6{a !:;;:@
8Xx
!=$(5( !MNN) !MNN(5( !MNN) !MNN/%/ !MNN0 !MNN,3t3 !MNN4 !MNN
,, !MNN- !MNN$u$ !MNN% !MNN-2mCINx2~6#r)+.72o?AEFC?$af$ !MNN% !MNN$1$ !9::% !9::?"C<C?"C7b= C4,4G4rcd|ji}|jtjk7r|jj|d<|SNrr)rrrrvalue)r=ds  r__getstate__zUUID.__getstate__s<
DHH<<8+++ <<--AiLrctj|d|dtj|dd|vrt|dytjyrL)r;r<rr)r=states  r__setstate__zUUID.__setstate__sQ4e54'50$E)$45	H6>6F6F	Hrc`t|tr|j|jk(StSN
isinstancerrNotImplementedr=others  r__eq__zUUID.__eq__%eT"88uyy((rc`t|tr|j|jkStSrTrUrXs  r__lt__zUUID.__lt__%eT"88eii''rc`t|tr|j|jkDStSrTrUrXs  r__gt__zUUID.__gt__r^rc`t|tr|j|jkStSrTrUrXs  r__le__zUUID.__le__r[rc`t|tr|j|jk\StSrTrUrXs  r__ge__zUUID.__ge__r[rc,t|jSrT)hashrr=s r__hash__z
UUID.__hash__sDHH~rc|jSrTrrgs r__int__zUUID.__int__sxxrcL|jjdt|dS)N())	__class__rstrrgs r__repr__z
UUID.__repr__s>>22CI>>rctd)NzUUID objects are immutable)r4)r=namerMs   rr<zUUID.__setattr__s455rc^d|jz}|ddd|ddd|ddd|ddd|dd	S)N%032xr'r!r#rj)r=r>s  r__str__zUUID.__str__sE GS2YBr
C2JBCB	Brc8|jjdS)Nr#)rto_bytesrgs rr?z
UUID.bytessxx  $$rcZ|j}|ddd|dddz|dddz|ddzS)Nr$rr%r&r'r?)r=r?s  rr@z
UUID.bytes_le!sK

cg2gs3rz!22U3s2:5FFab		rc|j|j|j|j|j|j
fSrT)rCrDrErFrGrHrgs rrAzUUID.fields's:

t}}d.B.B))4+=+=tyyJ	Jrc |jdz	S)Nr+rjrgs rrCz
UUID.time_low,sxx2~rc&|jdz	dzS)Nr,rjrgs rrDz
UUID.time_mid0B&((rc&|jdz	dzS)Nr-rrjrgs rrEzUUID.time_hi_version4rrc&|jdz	dzS)N8rjrgs rrFzUUID.clock_seq_hi_variant8B$&&rc&|jdz	dzS)Nr.rrjrgs rrGzUUID.clock_seq_low<rrc`|jdzdz|jdzz|jzS)Nr.r")rErDrCrgs rtimez	UUID.time@s7&&/B6"$&(,

6	7rc@|jdzdz|jzS)N?r')rFrGrgs rrIzUUID.clock_seqEs(++d2q8""#	$rc |jdzS)Nlrjrgs rrHz	UUID.nodeJsxx.((rc d|jzS)Nrurjrgs rr>zUUID.hexNs!!rcdt|zS)Nz	urn:uuid:)rprgs rurnzUUID.urnRsSY&&rc|jdzstS|jdzstS|jdzstStS)Nr1ll)rRESERVED_NCSRFC_4122RESERVED_MICROSOFTRESERVED_FUTURErgs rvariantzUUID.variantVs=xx<(\*O\*%%""rc`|jtk(rt|jdz	dzSy)Nr2)rrrrgs rrBzUUID.versionas-<<8#B#-..$r)NNNNNN)$rrr__doc__	__slots__rrrJrOrRrZr]r`rbrdrhrkrqr<rxpropertyr?r@rArCrDrErFrGrrIrHr>rrrBrrrrrUs1f2ICG)-T5"*"2"2T5lH



?6B
%%
JJ))))''''77$$))""''##//rrcNddl}ddl}ddl}ddl}	|jjd|jj|j}|jddg|j||jj|}|yt|j}d|d<|dk7r|g|}n|f}|j||j|j|	}	|	sy|	j!\}
}|j#|
S#t$|j&f$rYywxYw)
NrPATHz/sbinz	/usr/sbin)pathCLC_ALL)r )stdoutstderrenv)ioosshutil
subprocessenvirongetdefpathsplitpathsepextendwhichjoindictPopenPIPEDEVNULLcommunicateBytesIOOSErrorSubprocessError)commandargsrrrr	path_dirs
executablerprocrrs            r_get_command_stdoutrhs%%JJNN62::6<<RZZH	';/0\\'

	0J\K
2::H
5=!)D)G!mG'1'1'9'9$' )))+zz&!!Z//0sBDAD(#DD$#D$c|dzS)Nlrmacs r
_is_universalrsw  rct||}|yd}|D]}|jjj}t	t|D]M}|||vs	|||}	t
|	jtdd}
t|
r|
ccS|xs|
}O|xsdS#ttf$rYiwxYw)aSearches a command's output for a MAC address near a keyword.

    Each line of words in the output is case-insensitively searched for
    any of the given keywords.  Upon a match, get_word_index is invoked
    to pick a word from the line, given the index of the match.  For
    example, lambda i: 0 would get the first word on the line, while
    lambda i: i - 1 would get the word preceding the keyword.
    Nrr#)rlowerrstriprranger7rr5
_MAC_DELIMrr8
IndexError)rrkeywordsget_word_indexrfirst_local_maclinewordsiwordrs           r_find_mac_near_keywordrs!$
/F
~O=

##%++-s5z"	=AQx8#
= !23Ddll:s;R@C%S)"
&5&<O	==$"d"#J/
s#+B//CCc.|jt}t|dk7rytr,t	d|Dsydjd|D}n$t	d|Dsydj|}	t
|dS#t$rYywxYw)Nr(c3NK|]}dt|cxkxrdkncyw)r/Nr7.0parts  r	<genexpr>z_parse_mac.<locals>.<genexpr>s!941D	&Q&&9s#%rc3@K|]}|jddyw)r0N)rjustrs  rrz_parse_mac.<locals>.<genexpr>s@$$**Q-@sc38K|]}t|dk(yw)rNrrs  rrz_parse_mac.<locals>.<genexpr>s4d3t9>4sr#)rrr7_MAC_OMITS_LEADING_ZEROESallrrr8)rpartshexstrs   r
_parse_macrs
JJz"E
5zQ 
9599@%@@4e44%62s<B	BBczt||}|y|jjj}	|j	|}d}|D]H}|jj}	||}	t|	}
|
5t|
r|
cS|G|
}J|S#t
$rYywxYw#t$rYgwxYw)aLooks for a MAC address under a heading in a command's output.

    The first line of words in the output is searched for the given
    heading. Words at the same word index as the heading in subsequent
    lines are then examined to see if they look like MAC addresses.
    N)	rreadlinerrindexr8rrr)rrheadingrrcolumn_indexrrrrrs           r_find_mac_under_headingrs!$
/F
~ '')//1H~~g.O
"
##%	&D;J"!O
"'		s#B4B.	B+*B+.	B:9B:c@d}dD]}td||d}|s|cSy)z5Get the hardware address on Unix by running ifconfig.)shwaddrsethersaddress:slladdr)r z-az-avifconfigc|dzSNr/rrs r<lambda>z#_ifconfig_getnode.<locals>.<lambda>s
1Q3rNr)rrrs   r_ifconfig_getnoders5=H!$ZxOJrc,tdddgd}|r|Sy)z/Get the hardware address on Unix by running ip.iplinks
link/etherc|dzSrrrs rrz_ip_getnode.<locals>.<lambda>s
!A#rNrrs r_ip_getnoder	s!!v

NC

rcjddl}ddl}t|dsy	|j|j	}t
dd|j|gd}|r|St
dd|j|gd}|r|St
dd|jd|zgd	}|r|Sy#t
$rYywxYw)
z0Get the hardware address on Unix by running arp.rN
gethostbynamearpz-ancy)Nrrrs rrz_arp_getnode.<locals>.<lambda>rc|dzSrrrs rrz_arp_getnode.<locals>.<lambda>!s
QRSTQTrz(%s)c|dzS)Nrrrs rrz_arp_getnode.<locals>.<lambda>'s
acr)rsockethasattrrgethostnamerrfsencode)rrip_addrrs    r_arp_getnoders6?+&&v'9'9';<
!G0D/E|
TC

!G0D/E}
UC

!FW<L0M/N!#C
'sB&&	B21B2c"tdddgdS)z4Get the hardware address on Unix by running lanscan.lanscanz-aislan0cy)Nrrrs rrz"_lanscan_getnode.<locals>.<lambda>0rrrrrr_lanscan_getnoder-s")UWI{KKrctdddS)z4Get the hardware address on Unix by running netstat.netstatz-iansAddress)rrrr_netstat_getnoder2s#9fjAArctSz1[DEPRECATED] Get the hardware address on Windows._windll_getnoderrr_ipconfig_getnoder7
rctSr	r
rrr_netbios_getnoder<r
rgenerate_time_safe
UuidCreatecy)z>[DEPRECATED] Platform-specific functions loaded at import timeNrrrr_load_system_functionsrOrrcVtr#t\}}t|jSy)zBGet the hardware address on Unix using the _uuid extension module.r|N)_generate_time_saferrH)	uuid_time_s  r
_unix_getnoderSs'*,	1)$)))rcPtr t}t|jSy)zEGet the hardware address on Windows using the _uuid extension module.)r@N)_UuidCreaterrH)
uuid_bytess rrrYs" ]
Z(---rc2ddl}|jddzS)zGet a random node ID.rNr.l)randomgetrandbits)rs r_random_getnoder_sb!W--rrrposixntcttSttgzD]*}	|atdtcxkr
dks"tcS,y#Y2xYw)a3Get the hardware address as a 48-bit positive integer.

    The first time this runs, it may launch a separate program, which could
    be quite slow.  If all attempts to obtain the hardware address fail, we
    choose a random 48-bit number with its eighth bit set to 1 as recommended
    in RFC 4122.
    Nrr*)_node_GETTERSr)getters rgetnoder&sZ
o..	HE
A$:'$:L%;	sA		A
ct0||cxur)nn&t\}}	t|}t	||Sddl}|j
}|dzdz}t|tkr	tdz}|a|ddl}|jd}|dz}	|d	z	d
z}
|dz	dz}|d
z}|dz	dz}
|
t}t	|	|
||
||fdS#t$rtj}YwxYw)aGenerate a UUID from a host ID, sequence number, and the current time.
    If 'node' is not given, getnode() is used to obtain the hardware
    address.  If 'clock_seq' is given, it is used as the sequence number;
    otherwise a random 14-bit sequence number is chosen.N)r?rrdl@'Hw
r/lr"rr.rrr'r)rArB)rrr8rrrtime_ns_last_timestamprrr&)rHrIrsafely_generatedrrnanoseconds	timestamprrCrDrErGrFs              ruuid1r/s!&49+D&9&;#	#	'/0G)W55,,.Ks"%77I"yO'C#a'	O&&r*	:%HR6)H B&0O$M%Nd2|y(O,mTCLMOO/	'&&G	'sCC! C!ct|trt|d}ddlm}||j|zdj}t
|ddd	S)
zAGenerate a UUID from the MD5 hash of a namespace UUID and a name.utf-8r)md5F)usedforsecurityNr#r$r?rB)rVrpr?hashlibr2digestr)	namespacersr2r6s    ruuid3r8sU$T7#
$
fhfSbk1--rcBttjddS)zGenerate a random UUID.r#rr4)rrurandomrrruuid4r;sbjjna00rct|trt|d}ddlm}||j|zj}t
|dddS)zCGenerate a UUID from the SHA-1 hash of a namespace UUID and a name.r1r)sha1Nr#r%r4)rVrpr?r5r=r6r)r7rsr=rfs    ruuid5r>sJ$T7#	$&'..0Dd3Bi++rcfttttd}d}tt
ttd}ddl}|jd}|jdd	|jd
d|jd
dd|jddd|j}||j}|j}|j}|j|vrJ|r|s|j!d|jd||vr||n
t#|}t%|||yt%|y)z$Run the uuid command line interface.)r/r8r;r>)r8r>)z@dnsz@urlz@oidz@x500rNz2Generates a uuid using the selected uuid function.)descriptionz-uz--uuidr;zLThe function to use to generate the uuid. By default uuid4 function is used.)choicesdefaulthelpz-nz--namespacezThe namespace is a UUID, or '@ns' where 'ns' is a well-known predefined UUID addressed by namespace name. Such as @dns, @url, @oid, and @x500. Only required for uuid3/uuid5 functions.)rCz-Nz--namezVThe name used as part of generating the uuid. Only required for uuid3/uuid5 functions.zIncorrect number of arguments. zO requires a namespace and a name. Run 'python -m uuid -h' for more information.)r/r8r;r>
NAMESPACE_DNS
NAMESPACE_URL
NAMESPACE_OIDNAMESPACE_X500argparseArgumentParseradd_argumentkeys
parse_argsuuidr7rserrorrprint)	
uuid_funcsuuid_namespace_funcs
namespacesrHparserr	uuid_funcr7rss	         rmainrUsO	J.	J

$
$H%JF
h
0A7=>mCD
hCDD499%II99Dyy((LL199+@@

.7*-DJy)$y/	
i	4()
ikrz$6ba7b810-9dad-11d1-80b4-00c04fd430c8z$6ba7b811-9dad-11d1-80b4-00c04fd430c8z$6ba7b812-9dad-11d1-80b4-00c04fd430c8z$6ba7b814-9dad-11d1-80b4-00c04fd430c8__main__)NN)?rrsysenumrr
__author__platform_AIX_LINUXsystem_platform_systemrrrrrrrr9r?bytes_rrrrrrrrrrrrrr_uuidgetattrrrhas_uuid_generate_time_safe_has_uuid_generate_time_safeImportErrorrrrr_OS_GETTERSrsr$r#r&r+r/r8r;r>rUrDrErFrGrrrr<module>rfsj,\

#+
<<<<D6&x(5(D7*F

!J $?N;h*O	dP/P/f\! #F8!L8L
B

	(!%)=tD%t4K#(#D#D I*.
.,
 12K\\X$l4DEK\\WK	#$K$k<#%57K77g,HWW_ ;.HHO,$OL	.1,.f;<
;<
;<
<=zFa(EK#' 	(s"$F
FF