U vâ’iƒã@s†ddlmZddlmZmZmZddlZddlmZmZedƒZ d ege feee dfedee dfee dœdd „Z d gZ dS) é)ÚFuture)ÚCallableÚTypeVarÚUnionN)Ú ObservableÚabcÚ_Tú Future[_T])Ú conditionÚ then_sourceÚ else_sourceÚreturncsl|p t ¡‰tˆtƒr t ˆ¡nˆ‰tˆtƒr8t ˆ¡nˆ‰tjttt dfdœ‡‡‡fdd„ }t  |¡S)aêDetermines whether an observable collection contains values. Example: 1 - res = reactivex.if_then(condition, obs1) 2 - res = reactivex.if_then(condition, obs1, obs2) Args: condition: The condition which determines if the then_source or else_source will be run. then_source: The observable sequence or Promise that will be run if the condition function returns true. else_source: [Optional] The observable sequence or Promise that will be run if the condition function returns False. If this is not provided, it defaults to reactivex.empty Returns: An observable sequence which is either the then_source or else_source. r )Ú_r csˆƒr ˆSˆS)N©)r©r Z else_source_r rúL/opt/alt/python38/lib/python3.8/site-packages/reactivex/observable/ifthen.pyÚfactory1szif_then_..factory) Ú reactivexÚemptyÚ isinstancerZ from_futurerZ SchedulerBaserrrZdefer)r r r rrrrÚif_then_ s ÿ ýÿ ý&r)N) ÚasynciorÚtypingrrrrrrrÚboolrÚ__all__rrrrÚs ý ü -