Xj ZUddlmZddlZddlZddlmZmZmZmZedZ Gddee Z Gdde e Z Gd d e e Z Gd d e eZGd de eZGdde ej$Ze e eeedZded<ddZy)) annotationsN)AnyClassVarGenericTypeVarTc,eZdZUdZded<ddZddZy) Convertorz ClassVar[str]regexctNNotImplementedErrorselfvalues h/mnt/ssd/data/Dropbox/adrian/vault-secondbrain/venv/lib/python3.12/site-packages/starlette/convertors.pyconvertzConvertor.convert !##ctrrrs r to_stringzConvertor.to_stringrrN)rstrreturnr)rrrr)__name__ __module__ __qualname__r __annotations__rrrrr r sE=$$rr c eZdZdZddZddZy)StringConvertorz[^/]+c|Srr rs rrzStringConvertor.converts rcDt|}d|vsJd|sJd|S)N/zMay not contain path separatorszMust not be emptyrrs rrzStringConvertor.to_strings2E %B!BB)))u rNrrrrrrrr rrr rrr"r"s Err"c eZdZdZddZddZy) PathConvertorz.*ct|Srr&rs rrzPathConvertor.convert$ 5zrct|Srr&rs rrzPathConvertor.to_string'r,rNr'r(r rrr*r*!s Err*c eZdZdZddZddZy)IntegerConvertorz[0-9]+ct|Sr)intrs rrzIntegerConvertor.convert.r,rcFt|}|dk\sJdt|S)Nrz#Negative integers are not supported)r1rrs rrzIntegerConvertor.to_string1s'E z@@@z5zrN)rrrr1)rr1rrr(r rrr/r/+s Err/c eZdZdZddZddZy)FloatConvertorz[0-9]+(\.[0-9]+)?ct|Sr)floatrs rrzFloatConvertor.convert:s U|rct|}|dk\sJdtj|rJdtj|rJdd|zj dj dS)Ngz!Negative floats are not supportedzNaN values are not supportedz!Infinite values are not supportedz%0.20f0.)r6mathisnanisinfrstriprs rrzFloatConvertor.to_string=sne |@@@|::e$D&DD$::e$I&II$5 ((-44S99rN)rrrr6)rr6rrr(r rrr4r47s E:rr4c eZdZdZddZddZy) UUIDConvertorzO[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}c,tj|Sr)uuidUUIDrs rrzUUIDConvertor.convertHsyyrct|Srr&rs rrzUUIDConvertor.to_stringKr,rN)rrr uuid.UUID)rrDrrr(r rrr?r?Es ]E rr?)rpathr1r6rAzdict[str, Convertor[Any]]CONVERTOR_TYPESc|t|<yr)rF)key convertors rregister_url_convertorrJXs $OCr)rHrrIzConvertor[Any]rNone) __future__rr:rAtypingrrrrrr rr"r*r1r/r6r4rBr?rFrrJr rrrNs" 22 CL$ $ in IcN y~  :Yu% :Idii(   O     O .*%r